Re: i686 quirk for AMD Geode

Andres Salomon
2009-11-08T18:46:32Z

On Sun, 8 Nov 2009 19:04:35 +0100
Matteo Croce <technoboy85@gmail.com> wrote:

[...]
>
> True, but also remove the duplicate function is_geode in the NAND
> driver and use the identical one defined in geode.h:
>
> --- a/drivers/mtd/nand/cs553x_nand.c 2009-11-08
> 18:58:14.835043214 +0100 +++ b/drivers/mtd/nand/cs553x_nand.c
> 2009-11-08 19:00:07.914117831 +0100 @@ -30,6 +30,7 @@
>
> #include <asm/msr.h>
> #include <asm/io.h>
> +#include <asm/geode.h>
>
> #define NR_CS553X_CONTROLLERS 4
>
> @@ -260,23 +261,6 @@
> return err;
> }
>
> -static int is_geode(void)
> -{
> - /* These are the CPUs which will have a CS553[56] companion
> chip */
> - if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
> - boot_cpu_data.x86 == 5 &&
> - boot_cpu_data.x86_model == 10)
> - return 1; /* Geode LX */
> -
> - if ((boot_cpu_data.x86_vendor == X86_VENDOR_NSC ||
> - boot_cpu_data.x86_vendor == X86_VENDOR_CYRIX) &&
> - boot_cpu_data.x86 == 5 &&
> - boot_cpu_data.x86_model == 5)
> - return 1; /* Geode GX (née GX2) */
> -
> - return 0;
> -}
> -
>
> #ifdef CONFIG_MTD_PARTITIONS
> static const char *part_probes[] = { "cmdlinepart", NULL };

I think the nand driver needs a bit more love than this. The cs553x is
available for non-geode platforms, so a cs553x driver should not be
checking for the existence of a specific CPU.