
Dear Stefan Roese,
In message 1248331200-3505-1-git-send-email-sr@denx.de you wrote:
This patch adds a generic command for programming I2C bootstrap eeproms on PPC4xx. An implementation for Canyonlands board is included.
The command name is intentionally chosen not to be PPC4xx specific. This way other CPU's/SoC's can implement a similar command under the same name, perhaps with a different syntax.
Usage on Canyonlands:
=> chip_config Available configurations (I2C address 0x52): 600-nor - NOR CPU: 600 PLB: 200 OPB: 100 EBC: 100 600-nand - NAND CPU: 600 PLB: 200 OPB: 100 EBC: 100 800-nor - NOR CPU: 800 PLB: 200 OPB: 100 EBC: 100 800-nand - NAND CPU: 800 PLB: 200 OPB: 100 EBC: 100 1000-nor - NOR CPU:1000 PLB: 200 OPB: 100 EBC: 100 1000-nand - NAND CPU:1000 PLB: 200 OPB: 100 EBC: 100 1066-nor - NOR CPU:1066 PLB: 266 OPB: 88 EBC: 88 *** 1066-nand - NAND CPU:1066 PLB: 266 OPB: 88 EBC: 88 => chip_config 600-nor Using configuration: 600-nor - NOR CPU: 600 PLB: 200 OPB: 100 EBC: 100 done (dump via 'i2c md 52 0.1 10') Reset the board for the changes to take effect
Other 4xx boards will be migrated to use this command soon as well.
Signed-off-by: Stefan Roese sr@denx.de Signed-off-by: Dirk Eibach eibach@gdsys.de Acked-by: Matthias Fuchs matthias.fuchs@esd.eu
v6:
- Update identation of chip_config struct
v5:
- Removed bogus lines from commit text
v4:
- Command name changed from cpu_config to chip_config
- Used eeprom_read/eeprom_write if available
- Added CONFIG_4xx_CONFIG_I2C_EEPROM_OFFSET
v3:
- Line length of one printf reduced
v2:
- Patch authorship changes to Stefan
- s-o-b from Dirk added
- Added current configuration detection
- Minor coding style cleanup
board/amcc/canyonlands/Makefile | 5 +- board/amcc/canyonlands/bootstrap.c | 195 ---------------------------------- board/amcc/canyonlands/chip_config.c | 87 +++++++++++++++ cpu/ppc4xx/Makefile | 3 + cpu/ppc4xx/cmd_chip_config.c | 142 ++++++++++++++++++++++++ include/asm-ppc/ppc4xx_config.h | 42 +++++++ include/configs/canyonlands.h | 6 + 7 files changed, 283 insertions(+), 197 deletions(-) delete mode 100644 board/amcc/canyonlands/bootstrap.c create mode 100644 board/amcc/canyonlands/chip_config.c create mode 100644 cpu/ppc4xx/cmd_chip_config.c create mode 100644 include/asm-ppc/ppc4xx_config.h
Ackeds-by: Wolfgang Denk wd@denx.de
Stefan, can you please run this through your ppc4xx repo? This seems to make most sense to me, as 4xx will be the first (and so far only) user.
Best regards,
Wolfgang Denk