[PATCH] [GTA02]: Config fix for building without GTA01

Jonas Bonn jonas.bonn at gmail.com
Sun Oct 12 01:10:25 CEST 2008


On Sun, Oct 12, 2008 at 12:53 AM, Werner Almesberger
<werner at openmoko.org> wrote:
>
>  This logic will also need revisiting for the S3C24xx to generic GPIO
>  change, which Ben says is becoming a requirement.

Funny that you mention it, I was just looking at that now.  Based on
the answer you gave to my question about the shadow GPIO's earlier
today I was thinking about the following approach:

(This goes into arch/arm/mach-s3c2410/include/mach/gpio.h)

#ifdef CONFIG_MACH_GTA02
#define gpio_set_value(gpio,value) do {                                 \
        if (machine_is_gta02() && system_rev == GTA02v5_SYSTEM_REV) {   \
                switch (gpio) {                                         \
                case S3C2410_GPB0:                                      \
                case S3C2410_GPB1:                                      \
                case S3C2410_GPB2:                                      \
                        shadow_write();                                 \
                        break;                                          \
                default:                                                \
                        __gpio_set_value(gpio,value);                   \
                }                                                       \
        else {                                                          \
                __gpio_set_value(gpio,value)                            \
        }                                                               \
while(0);
#else
#define gpio_set_value  __gpio_set_value
#endif

The placeholder function shadow_write gets replaced with something
appropriate that mimics the functionality in neo1973_shadow.  Does
this sufficiently cover the cases of broken hardware?

/Jonas



More information about the openmoko-kernel mailing list