[U-Boot] [PATCH v1 3/8] am33xx: NAND support

Tom Rini trini at ti.com
Wed Oct 31 00:51:57 CET 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/30/12 15:47, Ilya Yanok wrote:
> TI AM33XX has the same GPMC controller as OMAP3 so we could just
> use the existing omap_gpmc driver. This patch adds adds required 
> definitions/intialization.
[snip]
> --- a/arch/arm/cpu/armv7/am33xx/board.c +++
> b/arch/arm/cpu/armv7/am33xx/board.c
[snip]
> +U_BOOT_CMD( +	nandecc, 2, 1,	do_switch_ecc, +	"switch OMAP3 NAND
> ECC calculation algorithm", +	"[bch8/hw/sw] - Switch between NAND
> hardware (hw) or software (sw) ecc algorithm" +);

While useful for testing, I don't want to add this command to am33xx
since we don't need it like we do on omap3.  We can be consistent and
be whole chip BCH8, or later BCH16 (and use the same logic ROM does
and Linux does or will).

[snip]
> +++ b/arch/arm/cpu/armv7/am33xx/mem.c +#if defined(CONFIG_CMD_NAND)
> || defined(CONFIG_CMD_ONENAND)

There will be no ONENAND.  ANd please fixup comment style issues that
we're copying from omap3.

[snip]
> +++ b/arch/arm/include/asm/arch-am33xx/mem.h +#ifndef __ASSEMBLY__ 
> +enum { +	STACKED = 0, +	IP_DDR = 1, +	COMBO_DDR = 2, +	IP_SDR =
> 3, +}; +#endif /* __ASSEMBLY__ */ + +#define EARLY_INIT	1 +

We don't need that enum I think.  We shouldn't need EARLY_INIT either.

> +/* + * GPMC settings - + * Definitions is as per the following
> format + * #define <PART>_GPMC_CONFIG<x> <value> + * Where: + *
> PART is the part name e.g. STNOR - Intel Strata Flash + * x is GPMC
> config registers from 1 to 6 (there will be 6 macros) + * Value is
> corresponding value + * + * For every valid PRCM configuration
> there should be only one definition of + * the same. if values are
> independent of the board, this definition will be + * present in
> this file if values are dependent on the board, then this should +
> * go into corresponding mem-boardName.h file + * + * Currently
> valid part Names are (PART): + * STNOR - Intel Strata Flash + *
> SMNAND - Samsung NAND + * MPDB - H4 MPDB board + * SBNOR - Sibley
> NOR + * MNAND - Micron Large page x16 NAND + * ONNAND - Samsung One
> NAND + * + * include/configs/file.h contains the defn - for all CS
> we are interested + * #define OMAP34XX_GPMC_CSx PART + * #define
> OMAP34XX_GPMC_CSx_SIZE Size + * #define OMAP34XX_GPMC_CSx_MAP Map +
> * Where: + * x - CS number + * PART - Part Name as defined above +
> * SIZE - how big is the mapping to be + *   GPMC_SIZE_128M - 0x8 +
> *   GPMC_SIZE_64M  - 0xC + *   GPMC_SIZE_32M  - 0xE + *
> GPMC_SIZE_16M  - 0xF + * MAP  - Map this CS to which address(GPMC
> address space)- Absolute address + *   >>24 before being used. +
> */

Lets correct this comment and drop out the GPMC values for chips other
than what we have available on the GP EVM.  We can add in more later
as needed.

[snip]
> +/* GPMC CS configuration for an SMSC LAN9221 ethernet controller
> */ +#define NET_LAN9221_GPMC_CONFIG1    0x00001000 +#define
> NET_LAN9221_GPMC_CONFIG2    0x00060700 +#define
> NET_LAN9221_GPMC_CONFIG3    0x00020201 +#define
> NET_LAN9221_GPMC_CONFIG4    0x06000700 +#define
> NET_LAN9221_GPMC_CONFIG5    0x0006090A +#define
> NET_LAN9221_GPMC_CONFIG6    0x87030000 +#define
> NET_LAN9221_GPMC_CONFIG7    0x00000f6c + +#endif /*
> __ASM_ARCH_OMAP_GPMC_H */

Also don't need those, right?

- -- 
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQIcBAEBAgAGBQJQkGgdAAoJENk4IS6UOR1WF9EP/0e48UQ3De3OeWwk0Lg8Y777
I1lFdRx7KaEDaKqQ5O7VSZCA2xHLXCody2VypPWrqB2GaVBuhuCnExjux3s2ltNB
NrIGgwV00hc3fMyYvZHHKLJEhwj8PppgJubB1Ai2yE5yYaTlXiDMAcPYs9JKxpIq
4ShuWAQTI2swulahxyCxTdVrhGPiEhiR3FVOkh7xr8JGzYl4nAqdSYAq7DHaHqCu
TTPCuar/LPgxxN2BR7rSv7KHMih1MSq2x524tt2oKU95+176BllgwUiiW8FHEHHS
uIK9NzdjdDJt5u7IYYzMiPjKi0YqwhwBGb3wc1XzgHx0m6bAORHAbD1+XIclqt2T
x8LHs6f1MmZP2nWatBr6dY1NTrDUXE2hn9zdNkTavq8Aczzj8BQbz4udsNjbp/BW
BoTQ5GZnqvHX/B+xVn44hAM1Gx7aqLDTHy65jE4E3z3NPNTd0QhmsRgqVwNeL+zL
vUU6W8r9Y3UXlhQtJSZhomHwxTbH8/VOmMFTIueErZuVwa/8naDzWL05KqtHxzzp
zOpOBbK7CkF6NGQGxmF5CrBJFgyGaSIEsMKFqWYkvVQvIkCxVgygxYe79b6mvj+P
WQHzcTC3bnAZ+iw1PME6j7aFaMPT2wXuq4PhgBvVolV6SVMNKM8NSzCAMH+ifapD
3JdN6wRkxGn707idqgsE
=sfIs
-----END PGP SIGNATURE-----


More information about the U-Boot mailing list