lsxl: add support for lschlv2 and lsxhl
PATCH v2 1/1 lsxl: add support for lschlv2 and lsxhl
Hi Prafulla,
thanks for the review.
Quoted 4 lines
Quoted 1 line
+++ b/board/buffalo/lsxl/kwbimage-lsxhl.cfg
BTW: What is difference between them? if it is very small you can manage
it through c file.
mh? arent these the values which end up in the head of an SPI image, the SoC bootstrap rom will execute? how can these be changed with a c file?
I extracted these values from the original vendor supplied uboot binary / SPI dump.
Quoted 4 lines
Quoted 4 lines
+/*
+ * Rescue mode
+ *
+ * Selected by holding the push button for 3 seconds, while powering
on
Quoted 3 lines
Quoted 3 lines
+ * the device.
+ *
+ * These linkstations don't have a (populated) serial port. There is
no
Quoted 1 line
Quoted 1 line
+ * way to access an (unmodified) board other than using the
netconsole.
Quoted 5 lines
Quoted 2 lines
If
+ * you want to recover from a bad environment setting or an emptyenvironment,
Quoted 2 lines
+ * you can do this only with a working network connection. Therefore, the
+ * following network configuration will be set when rescue mode is
stared.
Quoted 7 lines
Review
Quoted 6 lines
+ * Additionally, the bootsource is set to 'cli'.
+ */(quoted diff) +4
-0+#define RESCUE_ETHADDR "02:00:01:00:00:00" +#define RESCUE_IPADDR "192.168.11.150" +#define RESCUE_NETMASK "255.255.255.0" +#define RESCUE_SERVERIP "192.168.11.1"NAK, no hardcoding please.
Unfortunately, this is not possible. As described in the comment above, you have to have a working network to use the netconsole. Also have a look at:
http://lists.denx.de/pipermail/u-boot/2012-January/114547.html
I removed the hardcoded values from the environment and put it into a special rescue mode, so it won't show up until the user is explicitly choosing that mode. I can understand, that hardcoded values are bad but in this case i cannot think of any other (easy and reliable) way to get access to a misconfigured linkstation.
Do you have any other idea? again, the only interfaces you have are ethernet, one button, two (multiple color leds), one switch with three positions [and an usb port, only available on older linkstations].
Quoted 6 lines
Quoted 6 lines
(quoted diff) +6
-0+#define RESCUE_NCIP RESCUE_SERVERIP + +#ifndef CONFIG_ENV_OVERWRITE +# error "You need to set CONFIG_ENV_OVERWRITE" +#endif +
Quoted 8 lines
Review
Quoted 8 lines
(quoted diff) +8
-0+DECLARE_GLOBAL_DATA_PTR; + +int board_early_init_f(void) +{ + /* + * default gpio configuration + * There are maximum 64 gpios controlled through 2 sets of registers + * the below configuration configures mainly initial LED status
+ */
Quoted 56 lines
Quoted 46 lines
(quoted diff) +46
-0+ kw_config_gpio(LSXL_OE_VAL_LOW, + LSXL_OE_VAL_HIGH, + LSXL_OE_LOW, LSXL_OE_HIGH); + + /* Multi-Purpose Pins Functionality configuration */ + u32 kwmpp_config[] = { + MPP0_SPI_SCn, + MPP1_SPI_MOSI, + MPP2_SPI_SCK, + MPP3_SPI_MISO, + MPP4_UART0_RXD, + MPP5_UART0_TXD, + MPP6_SYSRST_OUTn, + MPP7_GPO, + MPP8_GPIO, + MPP9_GPIO, + MPP10_GPO, + MPP11_GPIO, + MPP12_SD_CLK, + MPP13_SD_CMD, + MPP14_SD_D0, + MPP15_SD_D1, + MPP16_SD_D2, + MPP17_SD_D3, + MPP18_GPO, + MPP19_GPO, + MPP20_GE1_0, + MPP21_GE1_1, + MPP22_GE1_2, + MPP23_GE1_3, + MPP24_GE1_4, + MPP25_GE1_5, + MPP26_GE1_6, + MPP27_GE1_7, + MPP28_GPIO, + MPP29_GPIO, + MPP30_GE1_10, + MPP31_GE1_11, + MPP32_GE1_12, + MPP33_GE1_13, + MPP34_GPIO, + MPP35_GPIO, + MPP36_GPIO, + MPP37_GPIO, + MPP38_GPIO, + MPP39_GPIO,Review
Quoted 10 lines
(quoted diff) +10
-0+ MPP40_GPIO, + MPP41_GPIO, + MPP42_GPIO, + MPP43_GPIO, + MPP44_GPIO, + MPP45_GPIO, + MPP46_GPIO, + MPP47_GPIO, + MPP48_GPIO, + MPP49_GPIO,
Quoted 1 line
are you using all there MFPs on your board, it's better to comment about
GPIOs for their usage
i guess i can only describe a subset of these gpios, as it is a proprietary board by linksys i have no documenation about ;) but i'll add the ones i know.
Quoted 11 lines
boards.cfg hawkboard_uart arm arm926ejs
Quoted 3 lines
boards.cfg +0
-0@@ -137,6 +137,9 @@ hawkboard_uart arm arm926ejsda8xxevm davinci
boards.cfg hawkboard_uart arm arm926ejs · line 137
Quoted 1 line
boards.cfg +0
-0enbw_cmc arm arm926ejs enbw_cmcenbw davinci
boards.cfg hawkboard_uart arm arm926ejs · line 138
Quoted 1 line
boards.cfg +0
-0calimain arm arm926ejs calimainomicron davinci
boards.cfg hawkboard_uart arm arm926ejs · line 141
Quoted 3 lines
boards.cfg +0
-0dns325 arm arm926ejs - d-
Quoted 8 lines
link kirkwood
boards.cfg hawkboard_uart arm arm926ejs · line 142
Quoted 1 line
boards.cfg +1
-0+lschlv2 arm arm926ejs lsxlbuffalo kirkwood lsxl:LSCHLV2
boards.cfg hawkboard_uart arm arm926ejs · line 143
Quoted 1 line
boards.cfg +1
-0+lschlv2_ramboot arm arm926ejs lsxlbuffalo kirkwood
lsxl:LSCHLV2,SYS_RAMBOOT,SYS_TEXT_BASE=0x00700000boards.cfg hawkboard_uart arm arm926ejs · line 144
Quoted 1 line
boards.cfg +1
-0+lsxhl arm arm926ejs lsxlAgain, if the board is boot from RAM, you dont need kwbimage.cfg for
that
Quoted 1 line
particular board.
mh? the lschlv2_ramboot is just for testing purposes. So you can try the bootloader without actually overwriting it in the boot flash. The actual images are the lschlv2 and lsxhl targets. I guess i should add a lsxhl_ramboot, too. There was no need for the latter because i have a jtag connector on my lsxhl (but not on the lschlv2).
Quoted 5 lines
boards.cfg hawkboard_uart arm arm926ejs · line 145
Quoted 1 line
boards.cfg +1
-0+#define CONFIG_SYS_KWD_CONFIG $(SRCTREE)/$(CONFIG_BOARDDIR)/kwbimage-lschl.cfg
boards.cfg hawkboard_uart arm arm926ejs
Quoted 2 lines
boards.cfg +2
-0+#define CONFIG_MACH_TYPE 3006 +#define CONFIG_SYS_TCLK 166666667 /* 166 MHz */No hardcoding, why you want to run kirkwood at 166?
mh, is there any autodetection, i don't know? if i run it without the TCLK set to 166mhz the serial out is screwed up.
FYI, the LS-CHLv2 is basically a stripped down version of the LS-XHL (running at TCLK=200MHz). I guess Linksys is running the CPU at 166MHz, although i couldn't find such a strapping in the manual.
Quoted 1 line
Is the chip 6281/6282 or 6192?
I'll have a look later. Don't have a board right now.
Signature · 1 line
michael
PATCH v2 1/1 lsxl: add support for lschlv2 and lsxhl
Quoted 69 lines
-----Original Message-----
From: Michael Walle [mailto:michael at walle.cc]
Sent: 27 March 2012 16:22
To: Prafulla Wadaskar
Cc: Michael Walle; u-boot at lists.denx.de
Subject: RE: [PATCH v2] lsxl: add support for lschlv2 and lsxhlHi Prafulla,
thanks for the review.
Quoted 2 lines
Quoted 1 line
+++ b/board/buffalo/lsxl/kwbimage-lsxhl.cfg
BTW: What is difference between them? if it is very small you can
manage
Quoted 1 line
it through c file.
mh? arent these the values which end up in the head of an SPI image, the
SoC bootstrap rom will execute? how can these be changed with a c file?I extracted these values from the original vendor supplied uboot binary /
SPI dump.Quoted 4 lines
Quoted 4 lines
+/*
+ * Rescue mode
+ *
+ * Selected by holding the push button for 3 seconds, whilepowering
onQuoted 3 lines
Quoted 3 lines
+ * the device.
+ *
+ * These linkstations don't have a (populated) serial port. Thereis
noQuoted 1 line
Quoted 1 line
+ * way to access an (unmodified) board other than using the
netconsole.
Quoted 4 lines
Quoted 2 lines
If
+ * you want to recover from a bad environment setting or an emptyenvironment,
Quoted 1 line
+ * you can do this only with a working network connection.
Therefore, the
Quoted 1 line
Quoted 1 line
+ * following network configuration will be set when rescue mode is
stared.
Quoted 7 lines
Review
Quoted 6 lines
+ * Additionally, the bootsource is set to 'cli'.
+ */(quoted diff) +4
-0+#define RESCUE_ETHADDR "02:00:01:00:00:00" +#define RESCUE_IPADDR "192.168.11.150" +#define RESCUE_NETMASK "255.255.255.0" +#define RESCUE_SERVERIP "192.168.11.1"NAK, no hardcoding please.
Unfortunately, this is not possible. As described in the comment above,
you have to have a working network to use the netconsole. Also have a look
at:
http://lists.denx.de/pipermail/u-boot/2012-January/114547.htmlI removed the hardcoded values from the environment and put it into a special rescue mode, so it won't show up until the user is explicitly choosing that mode. I can understand, that hardcoded values are bad but in
this case i cannot think of any other (easy and reliable) way to get access to a misconfigured linkstation.
Quoted 3 lines
Do you have any other idea? again, the only interfaces you have are ethernet, one button, two (multiple color leds), one switch with three positions [and an usb port, only available on older linkstations].
You need special environment variables by default, u-boot development policy does not allow this, so you can have clean code mainlined and keep this customization patch private to you. This is what I think the solution could be :-(
Quoted 105 lines
Quoted 15 lines
Quoted 5 lines
(quoted diff) +3
-0+#define RESCUE_NCIP RESCUE_SERVERIP + +#ifndef CONFIG_ENV_OVERWRITEReview
Quoted 10 lines
(quoted diff) +10
-0+# error "You need to set CONFIG_ENV_OVERWRITE" +#endif + +DECLARE_GLOBAL_DATA_PTR; + +int board_early_init_f(void) +{ + /* + * default gpio configuration + * There are maximum 64 gpios controlled through 2 sets ofregisters
Quoted 1 line
Quoted 1 line
+ * the below configuration configures mainly initial LED
status
+ */Quoted 56 lines
Quoted 46 lines
(quoted diff) +46
-0+ kw_config_gpio(LSXL_OE_VAL_LOW, + LSXL_OE_VAL_HIGH, + LSXL_OE_LOW, LSXL_OE_HIGH); + + /* Multi-Purpose Pins Functionality configuration */ + u32 kwmpp_config[] = { + MPP0_SPI_SCn, + MPP1_SPI_MOSI, + MPP2_SPI_SCK, + MPP3_SPI_MISO, + MPP4_UART0_RXD, + MPP5_UART0_TXD, + MPP6_SYSRST_OUTn, + MPP7_GPO, + MPP8_GPIO, + MPP9_GPIO, + MPP10_GPO, + MPP11_GPIO, + MPP12_SD_CLK, + MPP13_SD_CMD, + MPP14_SD_D0, + MPP15_SD_D1, + MPP16_SD_D2, + MPP17_SD_D3, + MPP18_GPO, + MPP19_GPO, + MPP20_GE1_0, + MPP21_GE1_1, + MPP22_GE1_2, + MPP23_GE1_3, + MPP24_GE1_4, + MPP25_GE1_5, + MPP26_GE1_6, + MPP27_GE1_7, + MPP28_GPIO, + MPP29_GPIO, + MPP30_GE1_10, + MPP31_GE1_11, + MPP32_GE1_12, + MPP33_GE1_13, + MPP34_GPIO, + MPP35_GPIO, + MPP36_GPIO, + MPP37_GPIO, + MPP38_GPIO, + MPP39_GPIO,Review
Quoted 10 lines
(quoted diff) +10
-0+ MPP40_GPIO, + MPP41_GPIO, + MPP42_GPIO, + MPP43_GPIO, + MPP44_GPIO, + MPP45_GPIO, + MPP46_GPIO, + MPP47_GPIO, + MPP48_GPIO, + MPP49_GPIO,Quoted 1 line
are you using all there MFPs on your board, it's better to comment
about
GPIOs for their usage
i guess i can only describe a subset of these gpios, as it is a proprietary board by linksys i have no documenation about ;) but i'll add
the ones i know.Quoted 3 lines
boards.cfg hawkboard_uart arm
Quoted 3 lines
boards.cfg +0
-0@@ -137,6 +137,9 @@ hawkboard_uart armarm926ejs
Quoted 8 lines
da8xxevm davinci
boards.cfg hawkboard_uart arm · line 137
Quoted 1 line
boards.cfg +0
-0enbw_cmc arm arm926ejs enbw_cmcenbw davinci
boards.cfg hawkboard_uart arm · line 138
Quoted 1 line
boards.cfg +0
-0calimain arm arm926ejs calimainomicron davinci
boards.cfg hawkboard_uart arm · line 141
Quoted 3 lines
boards.cfg +0
-0dns325 arm arm926ejs - d-Quoted 8 lines
link kirkwood
boards.cfg hawkboard_uart arm · line 142
Quoted 1 line
boards.cfg +1
-0+lschlv2 arm arm926ejs lsxlbuffalo kirkwood lsxl:LSCHLV2
boards.cfg hawkboard_uart arm · line 143
Quoted 1 line
boards.cfg +1
-0+lschlv2_ramboot arm arm926ejs lsxlbuffalo kirkwood
lsxl:LSCHLV2,SYS_RAMBOOT,SYS_TEXT_BASE=0x00700000boards.cfg hawkboard_uart arm · line 144
Quoted 1 line
boards.cfg +1
-0+lsxhl arm arm926ejs lsxlAgain, if the board is boot from RAM, you dont need kwbimage.cfg for
that
Quoted 1 line
particular board.
Quoted 8 lines
mh? the
lschlv2_rambootis just for testing purposes. So you can try the
bootloader without actually overwriting it in the boot flash. The actual
images are the lschlv2 and lsxhl targets. I guess i should add alsxhl_ramboot, too. There was no need for the latter because i have a jtag
connector on my lsxhl (but not on the lschlv2).
AFAIK, for ram boot you need u-boot ELF image, you can use u-boot.bin but u-boot.kwb image cannot be used for boot from RAM, kwbimage.cfg helps to create u-boot.kwb target which is useless for boot from RAM use case. So you need to remove it.
Regards..
Prafulla . . .
PATCH v2 1/1 lsxl: add support for lschlv2 and lsxhl
Hi,
Am Dienstag 27 M?rz 2012, 13:05:05 schrieb Prafulla Wadaskar:
Quoted 7 lines
Quoted 7 lines
I removed the hardcoded values from the environment and put it into a special rescue mode, so it won't show up until the user is explicitly choosing that mode. I can understand, that hardcoded values are bad but in
this case i cannot think of any other (easy and reliable) way to get access to a misconfigured linkstation.
Quoted 8 lines
Quoted 3 lines
Do you have any other idea? again, the only interfaces you have are ethernet, one button, two (multiple color leds), one switch with three positions [and an usb port, only available on older linkstations].
You need special environment variables by default, u-boot development policy does not allow this, so you can have clean code mainlined and keep this customization patch private to you. This is what I think the solution could be :-(
Wolfgang, what do you think about relaxing this policy a bit and allowing this class of devices (no service port/serial port available, no storage for the MAC address besides the environment) to use hardcoded values (maybe defined in a place common to all boards). Again, i don't think my device is the only one with this problem.
Quoted 9 lines
Quoted 8 lines
mh? the
lschlv2_rambootis just for testing purposes. So you can try the
bootloader without actually overwriting it in the boot flash. The actual
images are the lschlv2 and lsxhl targets. I guess i should add alsxhl_ramboot, too. There was no need for the latter because i have a jtag
connector on my lsxhl (but not on the lschlv2).
Quoted 4 lines
AFAIK, for ram boot you need u-boot ELF image, you can use u-boot.bin but u-boot.kwb image cannot be used for boot from RAM, kwbimage.cfg helps to create u-boot.kwb target which is useless for boot from RAM use case. So you need to remove it.
The elf/bin is just for testing and the kwb image will be written into the spi flash, i need both (at least i need the kwb image). I could remove the ramboot target, but i think its really handy if someone likes to play with a self compiled uboot.
Signature · 1 line
Michael
PATCH v2 1/1 lsxl: add support for lschlv2 and lsxhl
Dear Michael,
Quoted 6 lines · In message <[email protected]> you wrote:
Wolfgang, what do you think about relaxing this policy a bit and allowing this class of devices (no service port/serial port available, no storage for the MAC address besides the environment) to use hardcoded values (maybe defined in a place common to all boards). Again, i don't think my device is the only one with this problem.
Probably it is not the only device, but eventually all the others found other working solutions?
I still fail to understand why you would need fixed network settings. Evenin emergency cases, the only parameter you really need is a MAC address, all others can be fetched for example from a DHCP server.
As for the MAC address, it is in such emergencies OK to use a random locally administered Ethernet address. Note the "random" - hard- coding the same address for all devices is definitely a No-Go.
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 Disc space - the final frontier!
PATCH v2 1/1 lsxl: add support for lschlv2 and lsxhl
Hi Wolfgang,
Quoted 3 lines
I still fail to understand why you would need fixed network settings. Evenin emergency cases, the only parameter you really need is a MAC address, all others can be fetched for example from a DHCP server.
bootp/dhcp should work for getting the ip address. My initial thought was that you need to hardcode the ncip anyway, which means you need the ipaddr etc, too.
Using DHCP and setting the ncip to the delivered serverip should be ok, i think.
Quoted 3 lines
As for the MAC address, it is in such emergencies OK to use a random locally administered Ethernet address. Note the "random" - hard- coding the same address for all devices is definitely a No-Go.
Is 02:00:00:RR:RR:RR, where RR is a random byte, ok?
Signature · 1 line
Michael