Skip to contentSkip to conversation

[PATCH 0/6 for this release]

PATCH In review Jean-Christophe PLAGNIOL-VILLARD 2 participants 9 messages Mar 30, 2012 – Apr 2, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover [PATCH 0/6 for this release]

HI,

please find fixes for at91 support

- use dhcp-barebox on all at91
- re-write at91rm9200 ether driver
- fix cfi auto detect flash size

please pull
The following changes since commit 485cee59cf64b5019c5a294074007b93509b83e0:

Merge branch 'work/imx51-babbage-clk' into next (2012-03-23 21:22:14 +0100)

are available in the git repository at:

git://git.jcrosoft.org/barebox.git at91-fixes

for you to fetch changes up to 79ea2bb5284cc4b5b28a3fa3fee6ede7304e4179:

at91rm9200ek: adjust kernel partition to be able to flash mainline kernel (2012-03-30 12:51:54 +0800)

----------------------------------------------------------------
Jean-Christophe PLAGNIOL-VILLARD (6):
cfi_flash: fix missing resource update when probing the cfi size
net: at91_ether re-implement against new at91rm9200 api
at91rm9200ek: enable at91_ether and net support
at91: set ip mode to dhcp-barebox
at91rm9200ek: update config for network
at91rm9200ek: adjust kernel partition to be able to flash mainline kernel

 arch/arm/boards/at91rm9200ek/env/config     |    7 +-
 arch/arm/boards/at91sam9260ek/env/config    |    2 +-
 arch/arm/boards/at91sam9261ek/env/config    |    2 +-
 arch/arm/boards/at91sam9263ek/env/config    |    2 +-
 arch/arm/boards/at91sam9m10g45ek/env/config |    2 +-
 arch/arm/boards/tny-a926x/env/config        |    2 +-
 arch/arm/boards/usb-a926x/env/config        |    2 +-
 arch/arm/configs/at91rm9200ek_defconfig     |    9 +
 drivers/net/Kconfig                         |    1 +
 drivers/net/at91_ether.c                    |  495 ++++++++++++++-------------
 drivers/net/at91_ether.h                    |   50 +++
 drivers/nor/cfi_flash.c                     |    5 +
 12 files changed, 338 insertions(+), 241 deletions(-)
 create mode 100644 drivers/net/at91_ether.h

Best Regards,
J.

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#1 lore raw

PATCH 1/6 cfi_flash: fix missing resource update when probing the cfi size

introduce in commit 8262d20dae583a
"cfi: convert to struct resource"

---
 drivers/nor/cfi_flash.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/nor/cfi_flash.c +5 -0
index 654e647..267c95b 100644
@@ -989,6 +989,11 @@ static int cfi_probe (struct device_d *dev)
 	info->base = dev_request_mem_region(dev, 0);
 	info->size = flash_get_size(info);
 
+	if (dev->resource[0].size == 0) {
+		printf("cfi_probe: size : 0x%08lx\n", info->size);
+		dev->resource[0].size = info->size;
+	}
+
 	if (info->flash_id == FLASH_UNKNOWN) {
 		printf ("## Unknown FLASH on Bank at 0x%08x - Size = 0x%08lx = %ld MB\n",
 			dev->resource[0].start, info->size, info->size << 20);
Signature · 7 lines
1.7.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

Re: [PATCH 1/6] cfi_flash: fix missing resource update when probing the cfi size

Quoted 13 lines · Jean-Christophe PLAGNIOL-VILLARD

introduce in commit 8262d20dae583a
"cfi: convert to struct resource"

---
 drivers/nor/cfi_flash.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/nor/cfi_flash.c +0 -0
index 654e647..267c95b 100644

drivers/nor/cfi_flash.c static int cfi_probe (struct device_d *dev) · line 995

Quoted 7 lines
drivers/nor/cfi_flash.c +4 -0
@@ -989,6 +989,11 @@ static int cfi_probe (struct device_d *dev)
 	info->base = dev_request_mem_region(dev, 0);
 	info->size = flash_get_size(info);
 
+	if (dev->resource[0].size == 0) {
+		printf("cfi_probe: size : 0x%08lx\n", info->size);
+		dev->resource[0].size = info->size;
+	}

Not good. If we don't know the actual flash size, dev->resource[0].size should have the maximum size and not 0. We can't simply manipulate the resource size after having requested it.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw

PATCH 2/6 net: at91_ether re-implement against new at91rm9200 api

In reply to Jean-Christophe PLAGNIOL-VILLARD
---
 drivers/net/Kconfig      |    1 +
 drivers/net/at91_ether.c |  721 ++++++++++++++++++++++++----------------------
 drivers/net/at91_ether.h |   50 ++++
 3 files changed, 427 insertions(+), 345 deletions(-)
 rewrite drivers/net/at91_ether.c (82%)
 create mode 100644 drivers/net/at91_ether.h
drivers/net/Kconfig +1 -0
index 4cdb37b..172cc39 100644
@@ -59,6 +59,7 @@ config DRIVER_NET_NETX
 config DRIVER_NET_AT91_ETHER
 	bool "at91 ethernet driver"
 	depends on HAS_AT91_ETHER
+	select MIIDEV
 
 config DRIVER_NET_MPC5200
 	bool "MPC5200 Ethernet driver"
drivers/net/at91_ether.c +376 -345

721 lines not on this page · raw message

drivers/net/at91_ether.h new file +50 -0

50 lines not on this page · raw message

Signature · 7 lines
1.7.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#4 lore raw

PATCH 3/6 at91rm9200ek: enable at91_ether and net support

In reply to Jean-Christophe PLAGNIOL-VILLARD
---
 arch/arm/configs/at91rm9200ek_defconfig |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
arch/arm/configs/at91rm9200ek_defconfig +9 -0
index 584bfdf..b514f3d 100644
@@ -34,6 +34,15 @@ CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
+CONFIG_NET=y
+CONFIG_NET_DHCP=y
+CONFIG_NET_NFS=y
+CONFIG_NET_PING=y
+CONFIG_NET_TFTP=y
+CONFIG_NET_TFTP_PUSH=y
+CONFIG_NET_NETCONSOLE=y
+CONFIG_NET_RESOLV=y
+CONFIG_DRIVER_NET_AT91_ETHER=y
 # CONFIG_SPI is not set
 CONFIG_DRIVER_CFI=y
 # CONFIG_DRIVER_CFI_INTEL is not set
Signature · 7 lines
1.7.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#5 lore raw

PATCH 4/6 at91: set ip mode to dhcp-barebox

In reply to Jean-Christophe PLAGNIOL-VILLARD

As the mainline kernel does not enable the bootp support by default

---
 arch/arm/boards/at91rm9200ek/env/config     |    2 +-
 arch/arm/boards/at91sam9260ek/env/config    |    2 +-
 arch/arm/boards/at91sam9261ek/env/config    |    2 +-
 arch/arm/boards/at91sam9263ek/env/config    |    2 +-
 arch/arm/boards/at91sam9m10g45ek/env/config |    2 +-
 arch/arm/boards/tny-a926x/env/config        |    2 +-
 arch/arm/boards/usb-a926x/env/config        |    2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)
arch/arm/boards/at91rm9200ek/env/config +1 -1
index 12655c2..d1d9e8e 100644
@@ -2,7 +2,7 @@
 
 # use 'dhcp' to do dhcp in barebox and in kernel
 # use 'none' if you want to skip kernel ip autoconfiguration
-ip=dhcp
+ip=dhcp-barebox
 
 # or set your networking parameters here
 #eth0.ipaddr=a.b.c.d
arch/arm/boards/at91sam9260ek/env/config +1 -1
index 74e793c..2c0f075 100644
@@ -2,7 +2,7 @@
 
 # use 'dhcp' to do dhcp in barebox and in kernel
 # use 'none' if you want to skip kernel ip autoconfiguration
-ip=dhcp
+ip=dhcp-barebox
 
 if [ x$armlinux_architecture = x1099 ]
 then
arch/arm/boards/at91sam9261ek/env/config +1 -1
index fca5184..be4d37c 100644
@@ -2,7 +2,7 @@
 
 # use 'dhcp' to do dhcp in barebox and in kernel
 # use 'none' if you want to skip kernel ip autoconfiguration
-ip=dhcp
+ip=dhcp-barebox
 
 if [ x$armlinux_architecture = x848 ]
 then
arch/arm/boards/at91sam9263ek/env/config +1 -1
index 95eb8af..93eeb1e 100644
@@ -2,7 +2,7 @@
 
 # use 'dhcp' to do dhcp in barebox and in kernel
 # use 'none' if you want to skip kernel ip autoconfiguration
-ip=dhcp
+ip=dhcp-barebox
 dhcp_vendor_id=barebox-at91sam9263ek
 
 # or set your networking parameters here
arch/arm/boards/at91sam9m10g45ek/env/config +1 -1
index 6b96599..d115132 100644
@@ -2,7 +2,7 @@
 
 # use 'dhcp' to do dhcp in barebox and in kernel
 # use 'none' if you want to skip kernel ip autoconfiguration
-ip=dhcp
+ip=dhcp-barebox
 dhcp_vendor_id=barebox-at91sam9m10g45ek
 
 # or set your networking parameters here
arch/arm/boards/tny-a926x/env/config +1 -1
index 0ca38d5..b5215dc 100644
@@ -2,7 +2,7 @@
 
 # use 'dhcp' to do dhcp in barebox and in kernel
 # use 'none' if you want to skip kernel ip autoconfiguration
-ip=none
+ip=dhcp-barebox
 
 # or set your networking parameters here
 #eth0.ipaddr=a.b.c.d
arch/arm/boards/usb-a926x/env/config +1 -1
index ff097a0..1f72803 100644
@@ -2,7 +2,7 @@
 
 # use 'dhcp' to do dhcp in barebox and in kernel
 # use 'none' if you want to skip kernel ip autoconfiguration
-ip=dhcp
+ip=dhcp-barebox
 dhcp_vendor_id=barebox-at91sam9x5ek
 
 # or set your networking parameters here
Signature · 7 lines
1.7.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#6 lore raw

PATCH 5/6 at91rm9200ek: update config for network

In reply to Jean-Christophe PLAGNIOL-VILLARD

set vendor-id to barebox-at91rm9200ek and the kernel over nfs

---
 arch/arm/boards/at91rm9200ek/env/config |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/boards/at91rm9200ek/env/config +2 -1
index d1d9e8e..92101e6 100644
@@ -3,6 +3,7 @@
 # use 'dhcp' to do dhcp in barebox and in kernel
 # use 'none' if you want to skip kernel ip autoconfiguration
 ip=dhcp-barebox
+dhcp_vendor_id=barebox-at91rm9200ek
 
 # or set your networking parameters here
 #eth0.ipaddr=a.b.c.d
@@ -11,7 +12,7 @@ ip=dhcp-barebox
 #eth0.serverip=a.b.c.d
 
 # can be either 'nfs', 'tftp' or 'nor'
-kernel_loc=tftp
+kernel_loc=nfs
 # can be either 'net', 'nor' or 'initrd'
 rootfs_loc=net
 
Signature · 7 lines
1.7.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#7 lore raw

PATCH 6/6 at91rm9200ek: adjust kernel partition to be able to flash mainline kernel

In reply to Jean-Christophe PLAGNIOL-VILLARD
---
 arch/arm/boards/at91rm9200ek/env/config |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/boards/at91rm9200ek/env/config +1 -1
index 92101e6..735bb10 100644
@@ -25,7 +25,7 @@ kernelimage=uImage
 #kernelimage=Image
 #kernelimage=Image.lzo
 
-nor_parts="256k(barebox)ro,64k(bareboxenv),1536k(kernel),-(root)"
+nor_parts="256k(barebox)ro,64k(bareboxenv),3M(kernel),-(root)"
 rootfs_mtdblock_nor=3
 
 autoboot_timeout=3
Signature · 7 lines
1.7.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#8 lore raw
In reply to Jean-Christophe PLAGNIOL-VILLARD
Quoted 11 lines · Jean-Christophe PLAGNIOL-VILLARD

HI,

please find fixes for at91 support

- use dhcp-barebox on all at91
- re-write at91rm9200 ether driver
- fix cfi auto detect flash size

please pull
The following changes since commit 485cee59cf64b5019c5a294074007b93509b83e0:

Quoted 6 lines

Merge branch 'work/imx51-babbage-clk' into next (2012-03-23 21:22:14 +0100)

are available in the git repository at:

git://git.jcrosoft.org/barebox.git at91-fixes

Applied the ones I haven't commented on.

Sascha

Quoted 37 lines

for you to fetch changes up to 79ea2bb5284cc4b5b28a3fa3fee6ede7304e4179:

at91rm9200ek: adjust kernel partition to be able to flash mainline kernel (2012-03-30 12:51:54 +0800)

----------------------------------------------------------------
Jean-Christophe PLAGNIOL-VILLARD (6):
cfi_flash: fix missing resource update when probing the cfi size
net: at91_ether re-implement against new at91rm9200 api
at91rm9200ek: enable at91_ether and net support
at91: set ip mode to dhcp-barebox
at91rm9200ek: update config for network
at91rm9200ek: adjust kernel partition to be able to flash mainline kernel

 arch/arm/boards/at91rm9200ek/env/config     |    7 +-
 arch/arm/boards/at91sam9260ek/env/config    |    2 +-
 arch/arm/boards/at91sam9261ek/env/config    |    2 +-
 arch/arm/boards/at91sam9263ek/env/config    |    2 +-
 arch/arm/boards/at91sam9m10g45ek/env/config |    2 +-
 arch/arm/boards/tny-a926x/env/config        |    2 +-
 arch/arm/boards/usb-a926x/env/config        |    2 +-
 arch/arm/configs/at91rm9200ek_defconfig     |    9 +
 drivers/net/Kconfig                         |    1 +
 drivers/net/at91_ether.c                    |  495 ++++++++++++++-------------
 drivers/net/at91_ether.h                    |   50 +++
 drivers/nor/cfi_flash.c                     |    5 +
 12 files changed, 338 insertions(+), 241 deletions(-)
 create mode 100644 drivers/net/at91_ether.h

Best Regards,
J.

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox