Add "chip_config" command for PPC4xx bootstrap configuration
PATCH v6 1/1 Add "chip_config" command for PPC4xx bootstrap configuration
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.
---
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
board/amcc/canyonlands/Makefile +3 -2
@@ -25,10 +25,11 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).a -COBJS := $(BOARD).o -COBJS += bootstrap.o +COBJS-y := $(BOARD).o +COBJS-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o SOBJS := init.o +COBJS := $(COBJS-y) SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) SOBJS := $(addprefix $(obj),$(SOBJS))
board/amcc/canyonlands/bootstrap.c deleted +0 -195
195 lines not on this page · raw message
board/amcc/canyonlands/chip_config.c new file +87 -0
87 lines not on this page · raw message
cpu/ppc4xx/Makefile +3 -0
@@ -41,6 +41,9 @@ endif COBJS += 4xx_pci.o COBJS += 4xx_pcie.o COBJS += bedbug_405.o +ifdef CONFIG_CMD_CHIP_CONFIG +COBJS += cmd_chip_config.o +endif COBJS += commproc.o COBJS += cpu.o COBJS += cpu_init.o
cpu/ppc4xx/cmd_chip_config.c new file +142 -0
142 lines not on this page · raw message
include/asm-ppc/ppc4xx_config.h new file +42 -0
42 lines not on this page · raw message
include/configs/canyonlands.h +6 -0
@@ -330,6 +330,11 @@#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 +/* I2C bootstrap EEPROM */ +#define CONFIG_4xx_CONFIG_I2C_EEPROM_ADDR 0x52 +#define CONFIG_4xx_CONFIG_I2C_EEPROM_OFFSET 0 +#define CONFIG_4xx_CONFIG_BLOCKSIZE 16 +/* I2C SYSMON (LM75, AD7414 is almost compatible) */ #define CONFIG_DTT_LM75 1/* ON Semi's LM75 */ #define CONFIG_DTT_AD7414 1/* use AD7414 */
@@ -442,6 +447,7 @@/* * Commands additional to the ones defined in amcc-common.h */ +#define CONFIG_CMD_CHIP_CONFIG #if defined(CONFIG_ARCHES )#define CONFIG_CMD_DTT #define CONFIG_CMD_PCI
Signature · 1 line
1.6.3.3
PATCH v6 1/1 Add "chip_config" command for PPC4xx bootstrap configuration
Dear Stefan Roese,
Quoted 53 lines · In message <[email protected]> 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 address0x52):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_config600-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 effectOther 4xx boards will be migrated to use this command soon as well.
Signed-off-by Stefan Roese <[email protected]>Signed-off-by Dirk Eibach <[email protected]>Acked-by Matthias Fuchs <[email protected]>---
v6:
- Update identation ofchip_configstructv5:
- Removed bogus lines from commit textv4:
- Command name changed fromcpu_configtochip_config
- Used eeprom_read/eeprom_write if available
- AddedCONFIG_4xx_CONFIG_I2C_EEPROM_OFFSETv3:
- Line length of one printf reducedv2:
- Patch authorship changes to Stefan
- s-o-b from Dirk added
- Added current configuration detection
- Minor coding style cleanup
Quoted 12 lines
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
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
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Work 8 hours, sleep 8 hours; but not the same 8 hours.
PATCH v6 1/1 Add "chip_config" command for PPC4xx bootstrap configuration
Hi Wolfgang,
Quoted 14 lines · On Thursday 23 July 2009 22:04:19 Wolfgang Denk wrote:
Quoted 5 lines
board/amcc/canyonlands/Makefile | 5 +- board/amcc/canyonlands/bootstrap.c | 195 ---------------------------------- board/amcc/canyonlands/chip_config.c | 87 +++++++++++++++ cpu/ppc4xx/Makefile | 3 +Quoted 8 lines
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
Quoted 6 lines
Ackeds-by Wolfgang Denk <[email protected]>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.
Yes, will do. I'll send a pull request for this and other 4xx patches today.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
Stefan Roese
AppliedPATCH v6 1/1 Add "chip_config" command for PPC4xx bootstrap configuration
In reply to Stefan RoeseQuoted 3 lines · On Thursday 23 July 2009 08:40:00 Stefan Roese wrote:
This patch adds a generic command for programming I2C bootstrap eeproms on PPC4xx. An implementation for Canyonlands board is included.
Applied to ppc4xx/master. Thanks.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================