Re: [RFC v2 2/2] [WIP] net: add initial ENC28J60 support
On Mon, Jun 16, 2014 at 11:41:20AM +0400, Antony Pavlov wrote: ENC28J60 is a stand-alone Ethernet controller with SPI Interface. and integrated 10BASE-T PHY. This driver was ported from linux-3.15. The most notable barebox driver version changes: * add device tree support; * use IF_ENABLED for checking CONFIG_ENC28J60_WRITEVERIFY; * add mii_bus support; * rename {nolock,locked}_regw_{read,write}() to enc28j60_*_{read,write}(). TODOs: * receive only one packet per enc28j60_eth_rx() call. * fix empty enc28j60_init_dev; * add parameter for changing debug loglevel on-the-run; * ENC28J60 supports only SPI mode 0 so we have to submit this information to the SPI controller explicitly. Signed-off-by: Antony Pavlov antonynpav...@gmail.com Changes since v1: * drop unused macros; * use random_ether_addr(); * drop 'select CRC32' in Kconfig; * drop MAC address generation in driver's code; * rename {nolock,locked}_regw_{read,write}() to enc28j60_*_{read,write}(); * add mii_bus support. Signed-off-by: Antony Pavlov antonynpav...@gmail.com ... diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h new file mode 100644 index 000..4884854 I don't really like the headerfile leaking in from Linux just to make this driver compile. Also I think such a fine grained network device debugging is not so useful for barebox. So can you drop this? Otherwise I'm fine with the driver. Sascha -- 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- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: [RFC 1/2] [WIP] i2c: import SMBus stuff from linux
On Mon, Jun 16, 2014 at 12:00:12PM +0400, Antony Pavlov wrote: can we move it to drivers/i2c/i2c-smbus.c? Yes, why not? Sascha -- 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- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: [RFC 2/2] [WIP] gpio: add driver for PCA95[357]x, PCA9698, TCA64xx, and MAX7310 SMBus I/O expanders
On Mon, Jun 16, 2014 at 12:00:13PM +0400, Antony Pavlov wrote: TODOs: * can we drop depricated device-tree properties? Yes please. No need to introduce such stuff in barebox. Otherwise the driver looks good. Sascha -- 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- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH] commands: ls: add ll as an alias for ls -l
On Wed, Jun 18, 2014 at 09:41:02PM +0200, Jan Luebbe wrote: This saves one second of user time on every interactive boot. Signed-off-by: Jan Luebbe j...@pengutronix.de Applied, thanks Sascha --- commands/ls.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/commands/ls.c b/commands/ls.c index 3440790..f8144ae 100644 --- a/commands/ls.c +++ b/commands/ls.c @@ -127,6 +127,9 @@ static int do_ls(int argc, char *argv[]) ulong flags = LS_COLUMN; struct string_list sl; + if (!strcmp(argv[0], ll)) + flags = ~LS_COLUMN; + while((opt = getopt(argc, argv, RCl)) 0) { switch(opt) { case 'R': @@ -219,3 +222,11 @@ BAREBOX_CMD_START(ls) BAREBOX_CMD_GROUP(CMD_GRP_FILE) BAREBOX_CMD_HELP(cmd_ls_help) BAREBOX_CMD_END + +BAREBOX_CMD_START(ll) + .cmd= do_ls, + BAREBOX_CMD_DESC(list a file or directory with details) + BAREBOX_CMD_OPTS([-lCR] [FILEDIR...]) + BAREBOX_CMD_GROUP(CMD_GRP_FILE) + BAREBOX_CMD_HELP(cmd_ls_help) +BAREBOX_CMD_END -- 1.9.1 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox -- 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- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 1/2] ARM: AM335x: beaglebone: remove obsolete config
On Wed, Jun 18, 2014 at 09:43:18PM +0200, Jan Luebbe wrote: The bootargs are now autogenerated by barebox and the hostname should not be preconfigured. Signed-off-by: Jan Luebbe j...@pengutronix.de Applied both, thanks Sascha --- .../boards/beaglebone/defaultenv-beaglebone/config| 19 --- 1 file changed, 19 deletions(-) delete mode 100644 arch/arm/boards/beaglebone/defaultenv-beaglebone/config diff --git a/arch/arm/boards/beaglebone/defaultenv-beaglebone/config b/arch/arm/boards/beaglebone/defaultenv-beaglebone/config deleted file mode 100644 index fbfa7d5..000 --- a/arch/arm/boards/beaglebone/defaultenv-beaglebone/config +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -# change network settings in /env/network/eth0 -# change mtd partition settings and automountpoints in /env/init/* - -# set to false if you do not want to have colors -global.allow_color=true - -# user (used for network filenames) -global.user=none - -# timeout in seconds before the default boot entry is started -global.autoboot_timeout=3 - -# default boot entry (one of /env/boot/*) -global.boot.default=sd - -# base bootargs -global.linux.bootargs.base=console=ttyO0,115200n8 -- 1.9.1 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox -- 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- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 0/4] ARM: versatile: switch to devicetree support
On Fri, Jun 20, 2014 at 01:28:36AM +0400, Antony Pavlov wrote: Antony Pavlov (4): ARM: versatile: drop redundant mach/gpio.h i2c: versatile: add devicetree support ARM: versatile: switch to devicetree support ARM: versatilepb_defconfig: enable devicetree support Applied, thanks Sascha arch/arm/boards/versatile/versatilepb.c | 10 -- arch/arm/configs/versatilepb_defconfig | 50 - arch/arm/dts/versatile-pb.dts | 10 ++ arch/arm/mach-versatile/core.c | 11 --- arch/arm/mach-versatile/include/mach/gpio.h | 1 - arch/arm/mach-versatile/include/mach/init.h | 2 -- drivers/i2c/busses/i2c-versatile.c | 7 7 files changed, 44 insertions(+), 47 deletions(-) create mode 100644 arch/arm/dts/versatile-pb.dts delete mode 100644 arch/arm/mach-versatile/include/mach/gpio.h -- 1.9.2 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox -- 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- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: [RFC 2/2] dns325: initial support for D-Link DNS-325
On Sun, Jun 22, 2014 at 11:50:56PM +0200, Sebastian Hesselbarth wrote: On 06/22/2014 10:34 PM, Alexander Aring wrote: This patch add a basic support for the D-Link DNS-325. Currently only booting via uart with kwboot is supported. The barebox kwboot utility doesn't work at the moment. Use kwboot utility from u-boot instead. Why does kwboot does not work? There is an issue with early Kirkwood's BootROM and UART boot mode. Just try over and over again. I also recall modifying the timeouts may help. Ok, I will dig into this issue next weekend. Signed-off-by: Alexander Aring alex.ar...@gmail.com --- [...] diff --git a/arch/arm/boards/dlink-dns325/dlink-dns325.dox b/arch/arm/boards/dlink-dns325/dlink-dns325.dox new file mode 100644 index 000..414b2e7 --- /dev/null +++ b/arch/arm/boards/dlink-dns325/dlink-dns325.dox @@ -0,0 +1,37 @@ +/** @page dlink-dns325 D-Link DNS-325 NAS + +The NAS has +@li Kirkwood 88F6281-A1 SoC +@li 256 MB SDRAM +@li 128 MB NAND type SAMSUNG 946 K9F1G08U0B PCB0 +@li 2 SATA interfaces +@li RS232 serial interface +@li 1 USB interface +@li 1 Gigabit Ethernet interface +@li 1 Temp Sensor G751-2f +@li 1 MCU Holtek HT48C06E for Power Managment +@li LEDs buttons + +The NAS doesn't support NAND right now. +Only boot via uart with kwboot is supported. Is it the NAS that doesn't support NAND or is it missing driver support for barebox instead? ehm yes, there is a missing driver in barebox. Thanks for pointing this out. Are there any suggestions to implement 8-bit NAND Flash Interface for the kirkwoods 88F6180/88F619x/88F6281? This platform is just for fun currently, not very useful without mtd support. :-) The free kirkwoods sheets are well documented, maybe I could try this. Or port some code from linux/u-boot. But first I will fix the kwboot issue, of course. +The kwboot utility of barebox doesn't work right now. +Instead use the u-boot kwboot utility: See above, we should fix kwboot instead. Ok. Thanks. - Alex ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: [RFC 1/2] kirkwood: add support for booting via oftree probe
On Sun, Jun 22, 2014 at 11:45:57PM +0200, Sebastian Hesselbarth wrote: On 06/22/2014 10:34 PM, Alexander Aring wrote: This patch initialize memory only if we boot a kirkwood arch with device-tree probing. Otherwise some devices like timer or uart will be probed twice. Signed-off-by: Alexander Aring alex.ar...@gmail.com --- I don't know if this is right. The guruplug is the other kirkwood platform but don't have devictree support. Alexander, I'd rather remove non-DT booting for kirkwood completely. I have patches ready somewhere. Let me sort them out tomorrow. Ok, I'll be waiting. Thanks. - Alex ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH] net: ifup: skip *-discover files for ifup -a
Signed-off-by: Sascha Hauer s.ha...@pengutronix.de --- net/ifup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/ifup.c b/net/ifup.c index 2e59025..de0c5f8 100644 --- a/net/ifup.c +++ b/net/ifup.c @@ -136,6 +136,8 @@ int ifup_all(unsigned flags) while ((d = readdir(dir))) { if (*d-d_name == '.') continue; + if (strstr(d-d_name, -discover)) + continue; ifup(d-d_name, flags); } -- 2.0.0 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH] remove unused boot-menu-add-entry
The boot-menu-add-entry script no longer exists. Remove it from boot scripts. Signed-off-by: Sascha Hauer s.ha...@pengutronix.de --- arch/arm/boards/archosg9/env/boot/sd-card-android| 5 - arch/arm/boards/archosg9/env/boot/sd-card-linux | 5 - arch/arm/boards/archosg9/env/boot/usb-android| 5 - arch/arm/boards/archosg9/env/boot/usb-linux | 5 - arch/arm/boards/at91sam9m10ihd/env/boot/android | 5 - arch/arm/boards/at91sam9m10ihd/env/boot/mmc | 5 - arch/arm/boards/at91sam9m10ihd/env/boot/net | 5 - arch/arm/boards/at91sam9m10ihd/env/boot/net-usb | 5 - arch/arm/boards/beagle/env/boot/mmc | 5 - arch/arm/boards/beagle/env/boot/nand-ubi | 5 - arch/arm/boards/beagle/env/boot/nand-ubi-dt | 5 - arch/arm/boards/beaglebone/defaultenv-beaglebone/boot/sd | 5 - arch/arm/boards/ccxmx51/env/boot/nand| 5 - arch/arm/boards/clep7212/env/boot/nor| 5 - arch/arm/boards/crystalfontz-cfa10036/env/boot/mmc-ext3 | 5 - arch/arm/boards/datamodul-edm-qmx6/env/boot/mmc | 5 - arch/arm/boards/delphi-poc20/env/boot/mmc| 5 - arch/arm/boards/efika-mx-smartbook/env/boot/hd-internal | 5 - arch/arm/boards/efika-mx-smartbook/env/boot/mmc-left | 5 - arch/arm/boards/friendlyarm-mini2440/env/boot/nand | 5 - arch/arm/boards/guf-vincell/env/boot/nand-ubi| 5 - arch/arm/boards/highbank/env/boot/ahci | 5 - arch/arm/boards/highbank/env/boot/ahci-boot | 5 - arch/arm/boards/highbank/env/boot/mmc| 5 - arch/arm/boards/highbank/env/boot/mmc-boot | 5 - arch/arm/boards/highbank/env/boot/net| 5 - arch/arm/boards/highbank/env/boot/net-eth1 | 5 - arch/arm/boards/karo-tx25/env/boot/nand-ubi | 5 - arch/arm/boards/mx31moboard/env/boot/nor | 5 - arch/arm/boards/mx31moboard/env/boot/sd | 5 - arch/arm/boards/mx31moboard/env/boot/usbmsd | 5 - arch/arm/boards/panda/env/boot/mmc | 5 - arch/arm/boards/phytec-phycard-imx6/env/boot/nand| 5 - arch/arm/boards/phytec-phycard-imx6/env/boot/sd-ext3 | 5 - .../boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/mmc | 5 - .../boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/nand | 5 - .../boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/spi | 5 - arch/arm/boards/phytec-phycore-imx27/env/boot/nand-ubi | 5 - arch/arm/boards/phytec-phycore-imx31/env/boot/nand-ubi | 5 - arch/arm/boards/phytec-phycore-imx35/env/boot/nand-ubi | 5 - arch/arm/boards/telit-evk-pro3/env/boot/nand-ubi | 5 - defaultenv/defaultenv-2-base/boot/net| 5 - defaultenv/defaultenv-2-base/data/boot-template | 5 - defaultenv/defaultenv-2-dfu/boot/dfu | 5 - 44 files changed, 220 deletions(-) diff --git a/arch/arm/boards/archosg9/env/boot/sd-card-android b/arch/arm/boards/archosg9/env/boot/sd-card-android index a10a763..bc2df69 100644 --- a/arch/arm/boards/archosg9/env/boot/sd-card-android +++ b/arch/arm/boards/archosg9/env/boot/sd-card-android @@ -1,10 +1,5 @@ #!/bin/sh -if [ $1 = menu ]; then - boot-menu-add-entry $0 Android from SD card - exit -fi - path=/mnt/sd global.bootm.image=${path}/android global.bootm.initrd=${path}/initramfs.cpio.lzo diff --git a/arch/arm/boards/archosg9/env/boot/sd-card-linux b/arch/arm/boards/archosg9/env/boot/sd-card-linux index 2ba9b9e..b3eaa24 100644 --- a/arch/arm/boards/archosg9/env/boot/sd-card-linux +++ b/arch/arm/boards/archosg9/env/boot/sd-card-linux @@ -1,10 +1,5 @@ #!/bin/sh -if [ $1 = menu ]; then - boot-menu-add-entry $0 Linux from SD card - exit -fi - path=/mnt/sd global.bootm.image=${path}/zImage initrd=${path}/initrd diff --git a/arch/arm/boards/archosg9/env/boot/usb-android b/arch/arm/boards/archosg9/env/boot/usb-android index a7ddabe..e97e0ad 100644 --- a/arch/arm/boards/archosg9/env/boot/usb-android +++ b/arch/arm/boards/archosg9/env/boot/usb-android @@ -1,10 +1,5 @@ #!/bin/sh -if [ $1 = menu ]; then - boot-menu-add-entry $0 Android over usb - exit -fi - path=/mnt/usb
Re: [PATCH] commands: ls: add ll as an alias for ls -l
Wouldn't it be better if barebox's shell gets the alias command? This would solve a problem like this, and we also could get rid of one of edit/sedit commands ... ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH] ARM: i.MX: remove console= from env files
For i.MX devicetree boards the console= parameter is automatically generated and can be dropped from the env files. If a file becomes empty then, remove it. Signed-off-by: Sascha Hauer s.ha...@pengutronix.de --- arch/arm/boards/boundarydevices-nitrogen6x/env/config-board | 6 -- arch/arm/boards/datamodul-edm-qmx6/env/config-board | 6 -- arch/arm/boards/efika-mx-smartbook/env/config-board | 8 arch/arm/boards/freescale-mx53-vmx53/env/config-board | 7 --- arch/arm/boards/karo-tx25/env/init/config-board | 7 --- arch/arm/boards/karo-tx53/env/config-board | 6 -- arch/arm/boards/tqma53/env/config-board | 6 -- arch/arm/boards/udoo/env/config-board | 6 -- 8 files changed, 52 deletions(-) delete mode 100644 arch/arm/boards/boundarydevices-nitrogen6x/env/config-board delete mode 100644 arch/arm/boards/datamodul-edm-qmx6/env/config-board delete mode 100644 arch/arm/boards/efika-mx-smartbook/env/config-board delete mode 100644 arch/arm/boards/freescale-mx53-vmx53/env/config-board delete mode 100644 arch/arm/boards/karo-tx25/env/init/config-board delete mode 100644 arch/arm/boards/karo-tx53/env/config-board delete mode 100644 arch/arm/boards/tqma53/env/config-board delete mode 100644 arch/arm/boards/udoo/env/config-board diff --git a/arch/arm/boards/boundarydevices-nitrogen6x/env/config-board b/arch/arm/boards/boundarydevices-nitrogen6x/env/config-board deleted file mode 100644 index 4cabac6..000 --- a/arch/arm/boards/boundarydevices-nitrogen6x/env/config-board +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -# board defaults, do not change in running system. Change /env/config -# instead - -global.linux.bootargs.base=console=ttymxc1,115200 diff --git a/arch/arm/boards/datamodul-edm-qmx6/env/config-board b/arch/arm/boards/datamodul-edm-qmx6/env/config-board deleted file mode 100644 index 4cabac6..000 --- a/arch/arm/boards/datamodul-edm-qmx6/env/config-board +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -# board defaults, do not change in running system. Change /env/config -# instead - -global.linux.bootargs.base=console=ttymxc1,115200 diff --git a/arch/arm/boards/efika-mx-smartbook/env/config-board b/arch/arm/boards/efika-mx-smartbook/env/config-board deleted file mode 100644 index bc8e9aa..000 --- a/arch/arm/boards/efika-mx-smartbook/env/config-board +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -# board defaults, do not change in running system. Change /env/config -# instead - -global.linux.bootargs.base=console=ttymxc0,115200 - -[ -f /env/config ] /env/config diff --git a/arch/arm/boards/freescale-mx53-vmx53/env/config-board b/arch/arm/boards/freescale-mx53-vmx53/env/config-board deleted file mode 100644 index e4d41e5..000 --- a/arch/arm/boards/freescale-mx53-vmx53/env/config-board +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -# board defaults, do not change in running system. Change /env/config -# instead - -global.hostname=vmx53 -global.linux.bootargs.base=console=ttymxc0,115200 diff --git a/arch/arm/boards/karo-tx25/env/init/config-board b/arch/arm/boards/karo-tx25/env/init/config-board deleted file mode 100644 index 943b002..000 --- a/arch/arm/boards/karo-tx25/env/init/config-board +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -# board defaults, do not change in running system. Change /env/config -# instead - -global.hostname=tx25 -global.linux.bootargs.base=console=ttymxc0,115200 diff --git a/arch/arm/boards/karo-tx53/env/config-board b/arch/arm/boards/karo-tx53/env/config-board deleted file mode 100644 index e8e8378..000 --- a/arch/arm/boards/karo-tx53/env/config-board +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -# board defaults, do not change in running system. Change /env/config -# instead - -global.linux.bootargs.base=console=ttymxc0,115200 diff --git a/arch/arm/boards/tqma53/env/config-board b/arch/arm/boards/tqma53/env/config-board deleted file mode 100644 index 4cabac6..000 --- a/arch/arm/boards/tqma53/env/config-board +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -# board defaults, do not change in running system. Change /env/config -# instead - -global.linux.bootargs.base=console=ttymxc1,115200 diff --git a/arch/arm/boards/udoo/env/config-board b/arch/arm/boards/udoo/env/config-board deleted file mode 100644 index 4cabac6..000 --- a/arch/arm/boards/udoo/env/config-board +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -# board defaults, do not change in running system. Change /env/config -# instead - -global.linux.bootargs.base=console=ttymxc1,115200 -- 2.0.0 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: i.MX6 frame buffer inside barebox?
Whaaa, it never occured to me that I have to enable the framebuffer as well... thanks, now it works. As for simplefb, I removed that. I thought that this sets up a framebuffer in the bootloader, which when Linux' framebuffer driver takes over, without reprogramm or screen flicker. However, it seems that this only works with specific framebuffer patterns, e.g. some 16 and 32 bit special rgb formats. I don't really get the need for that, because the bootloader already has programmed the graphics device correctly, the Linux driver could just re-use that information, so I don't really see a need why the framebuffer organization has to be present in the device tree in yet-another-format (tm). ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: i.MX6 frame buffer inside barebox?
On Mon, Jun 23, 2014 at 09:25:02AM +0200, Holger Schurig wrote: Whaaa, it never occured to me that I have to enable the framebuffer as well... thanks, now it works. barebox has nothing useful to show on the screen until some splash command has been executed, so it's better to leave the display diabled to avoid unnecessary flickering. As for simplefb, I removed that. I thought that this sets up a framebuffer in the bootloader, which when Linux' framebuffer driver takes over, without reprogramm or screen flicker. However, it seems that this only works with specific framebuffer patterns, e.g. some 16 and 32 bit special rgb formats. I don't really get the need for that, because the bootloader already has programmed the graphics device correctly, the Linux driver could just re-use that information, so I don't really see a need why the framebuffer organization has to be present in the device tree in yet-another-format (tm). The simplefb driver in the kernel is completely hardware agnostic. It's just a way for the firmware to give an already initialized framebuffer to Linux and to run Linux graphics without having a framebuffer driver under Linux. The IPU driver cannot take over an already initialized framebuffer, instead it will reset and reconfigure the IPU during initialization. I'm not sure which direction this passing-a-framebuffer-from-bootloader-to-linux will take, but the current situation is less than satisfying. My preferred solution is to be fast enough in the bootloader and show a splash screen under Linux only. Sascha -- 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- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH] commands: ls: add ll as an alias for ls -l
On Mon, Jun 23, 2014 at 09:20:40AM +0200, Holger Schurig wrote: Wouldn't it be better if barebox's shell gets the alias command? This would solve a problem like this, and we also could get rid of one of edit/sedit commands ... Why not? Send patches ;) Sascha -- 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- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH] common: resource: print conflicts as warning
Crazy things happen if there are resource conflicts and a device probe runs dev_request_mem_region. The dev_request_mem_region returns a start pointer which is zero. The probe function doesn't check on this and probing the device on zero base address. To debug this in debug log level there are many other outputs. This patch replace the debug print to a warning printout. A conflict should normally never happen. If there is a conflict it's much easier to see it with this patch. Signed-off-by: Alexander Aring alex.ar...@gmail.com --- common/resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/resource.c b/common/resource.c index fe4680e..1ea2a75 100644 --- a/common/resource.c +++ b/common/resource.c @@ -71,7 +71,7 @@ struct resource *__request_region(struct resource *parent, goto ok; if (start r-end) continue; - debug(%s: 0x%08llx:0x%08llx conflicts with 0x%08llx:0x%08llx\n, + pr_warn(%s: 0x%08llx:0x%08llx conflicts with 0x%08llx:0x%08llx\n, __func__, (unsigned long long)start, (unsigned long long)end, -- 2.0.0 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH] commands: ls: add ll as an alias for ls -l
On Mon, Jun 23, 2014 at 09:44:28AM +0200, Sascha Hauer wrote: On Mon, Jun 23, 2014 at 09:20:40AM +0200, Holger Schurig wrote: Wouldn't it be better if barebox's shell gets the alias command? This would solve a problem like this, and we also could get rid of one of edit/sedit commands ... Why not? Send patches ;) I had the same idea some time ago... nobody replies. I never implement anything. Sorry! :-) - Alex ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: i.MX6 frame buffer inside barebox?
My preferred solution is to be fast enough in the bootloader and show a splash screen under Linux only. Hmm, I'd like to not do that. Splash screen from Linux usually means that I need an initrd. And an initrd is seldom needed on an embedded device (i.e. no complicated RAID or DM setup). And it just slows down the overall boot ... But thanks for the info anyway. Oh, one more question: do you have any idea if a simplefb would be fast enought for X11 ? ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
SFI NOR sizes totally off ?!?
Seems like ls -l is right, but devinfo is wrong: barebox:/ ls -l /dev/m25p0 crw--- 67108864 /dev/m25p0 barebox:/ devinfo m25p0 Parameters: size: 5468012149590870304 erasesize: 4096 writesize: 1 oobsize: 0 barebox:/ of_dump /soc/aips-bus@0200/spba-bus@0200/ecspi@0201 ecspi@0201 { #address-cells = 0x1; #size-cells = 0x0; compatible = fsl,imx6q-ecspi, fsl,imx51-ecspi; reg = 0x201 0x4000; interrupts = 0x0 0x21 0x4; clocks = 0x2 0x72 0x2 0x72; clock-names = ipg, per; dmas = 0x4 0x7 0x7 0x1 0x4 0x8 0x7 0x2; dma-names = rx, tx; status = okay; pinctrl-names = default; pinctrl-0 = 0x5; fsl,spi-num-chipselects = 0x3; cs-gpios = 0x6 0x18 0x0 0x6 0x19 0x0 0x6 0x1a 0x0; spiflash@0 { #address-cells = 0x1; #size-cells = 0x1; compatible = n25q512ax3, m25p80; spi-max-frequency = 0x989680; reg = 0x0; }; }; ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: SFI NOR sizes totally off ?!?
On Mon, Jun 23, 2014 at 11:28:09AM +0200, Holger Schurig wrote: Seems like ls -l is right, but devinfo is wrong: barebox:/ ls -l /dev/m25p0 crw--- 67108864 /dev/m25p0 barebox:/ devinfo m25p0 Parameters: size: 5468012149590870304 erasesize: 4096 writesize: 1 oobsize: 0 This should be fixed with the following Commit. Grumpf. We really need some stable strategy. Sascha commit 3ee907d89eaeaee5f75bd73eb89d2b4b3d05f6d4 Author: Herve Codina herve.cod...@celad.com Date: Thu Jun 12 11:37:38 2014 +0200 mtd: use long long dev param for size Signed-off-by: Herve Codina herve.cod...@celad.com Signed-off-by: Sascha Hauer s.ha...@pengutronix.de diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c index d3e7763..82fb5f7 100644 --- a/drivers/mtd/core.c +++ b/drivers/mtd/core.c @@ -401,7 +401,7 @@ int add_mtd_device(struct mtd_info *mtd, char *devname, int device_id) mtd-cdev.mtd = mtd; if (IS_ENABLED(CONFIG_PARAMETER)) { - dev_add_param_int_ro(mtd-class_dev, size, mtd-size, %llu); + dev_add_param_llint_ro(mtd-class_dev, size, mtd-size, %llu); dev_add_param_int_ro(mtd-class_dev, erasesize, mtd-erasesize, %u); dev_add_param_int_ro(mtd-class_dev, writesize, mtd-writesize, %u); dev_add_param_int_ro(mtd-class_dev, oobsize, mtd-oobsize, %u); -- 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- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: i.MX6 frame buffer inside barebox?
On Mon, Jun 23, 2014 at 10:42:55AM +0200, Holger Schurig wrote: My preferred solution is to be fast enough in the bootloader and show a splash screen under Linux only. Hmm, I'd like to not do that. Splash screen from Linux usually means that I need an initrd. And an initrd is seldom needed on an embedded device (i.e. no complicated RAID or DM setup). And it just slows down the overall boot ... But thanks for the info anyway. Oh, one more question: do you have any idea if a simplefb would be fast enought for X11 ? Yes, I think so. The (mainline) IPU drivers alone wouldn't help you anyway. You'll need the FSL EXA drivers to get anything faster I guess. Sascha -- 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- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: i.MX6 frame buffer inside barebox?
On Mon, Jun 23, 2014 at 10:42:55AM +0200, Holger Schurig wrote: My preferred solution is to be fast enough in the bootloader and show a splash screen under Linux only. Hmm, I'd like to not do that. Splash screen from Linux usually means that I need an initrd. And an initrd is seldom needed on an embedded device (i.e. no complicated RAID or DM setup). And it just slows down the overall boot ... But thanks for the info anyway. Oh, one more question: do you have any idea if a simplefb would be fast enought for X11 ? The idea is to have the splash ready in 1 s after power-good, fully from userspace, and all that with systemd + wayland. We have some plans how to do that ... awaiting more customer projects that have splash screen needs. rsc -- 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- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 5/7] clk: mvebu: fix Armada 370 TCLK frequencies
This fixes Armada 370 TCLK frequencies that are off by a factor of 10. Signed-off-by: Sebastian Hesselbarth sebastian.hesselba...@gmail.com --- Cc: barebox@lists.infradead.org --- drivers/clk/mvebu/armada-370.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/mvebu/armada-370.c b/drivers/clk/mvebu/armada-370.c index d189c6ca5704..8d02ed93d905 100644 --- a/drivers/clk/mvebu/armada-370.c +++ b/drivers/clk/mvebu/armada-370.c @@ -37,8 +37,8 @@ static const struct coreclk_ratio a370_coreclk_ratios[] = { }; static const u32 a370_tclk_freqs[] = { - 1660, - 2000, + 16600, + 2, }; static u32 a370_get_tclk_freq(void __iomem *sar) -- 2.0.0 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 7/7] clocksource: mvebu: split initialization for Armada 370/XP
Timers found on Marvell Armada 370 and XP require different setup. While timer clock on Armada 370 can be derived from a divided reference clocks, Armada XP always uses a 25MHz reference. This also updates compatibles to destinguish timers for both SoCs and fixes some whitespace issues on defines. Signed-off-by: Sebastian Hesselbarth sebastian.hesselba...@gmail.com --- Cc: barebox@lists.infradead.org --- drivers/clocksource/mvebu.c | 65 - 1 file changed, 40 insertions(+), 25 deletions(-) diff --git a/drivers/clocksource/mvebu.c b/drivers/clocksource/mvebu.c index e0c85edaa6b2..e5cb921d922b 100644 --- a/drivers/clocksource/mvebu.c +++ b/drivers/clocksource/mvebu.c @@ -19,24 +19,27 @@ #include linux/clk.h #include io.h -#define TIMER_CTRL_OFF 0x -#define TIMER0_EN 0x0001 -#define TIMER0_RELOAD_EN0x0002 -#define TIMER0_25MHZ0x0800 -#define TIMER0_DIV(div) ((div) 19) -#define TIMER1_EN 0x0004 -#define TIMER1_RELOAD_EN0x0008 -#define TIMER1_25MHZ0x1000 -#define TIMER1_DIV(div) ((div) 22) -#define TIMER_EVENTS_STATUS 0x0004 -#define TIMER0_CLR_MASK (~0x1) -#define TIMER1_CLR_MASK (~0x100) -#define TIMER0_RELOAD_OFF 0x0010 -#define TIMER0_VAL_OFF 0x0014 -#define TIMER1_RELOAD_OFF 0x0018 -#define TIMER1_VAL_OFF 0x001c - -#define TIMER_DIVIDER_SHIFT 5 +#define TIMER_CTRL_OFF 0x +#define TIMER0_EN BIT(0) +#define TIMER0_RELOAD_EN BIT(1) +#define TIMER0_25MHZ BIT(11) +#define TIMER0_DIV(div) ((div) 19) +#define TIMER0_DIV_MASK TIMER0_DIV(0x7) +#define TIMER1_EN BIT(2) +#define TIMER1_RELOAD_EN BIT(3) +#define TIMER1_25MHZ BIT(12) +#define TIMER1_DIV(div) ((div) 22) +#define TIMER1_DIV_MASK TIMER1_DIV(0x7) +#define TIMER_EVENTS_STATUS0x0004 +#define TIMER0_CLR_MASK (~BIT(0)) +#define TIMER1_CLR_MASK (~BIT(9)) +#define TIMER0_RELOAD_OFF 0x0010 +#define TIMER0_VAL_OFF 0x0014 +#define TIMER1_RELOAD_OFF 0x0018 +#define TIMER1_VAL_OFF 0x001c + +#define TIMER_DIVIDER_SHIFT5 +#define TIMER_DIVIDER BIT(TIMER_DIVIDER_SHIFT) static __iomem void *timer_base; @@ -53,24 +56,35 @@ static struct clocksource cs = { static int mvebu_timer_probe(struct device_d *dev) { - struct clk *tclk; - u32 val; + struct clk *clk; + u32 rate, div, val; timer_base = dev_request_mem_region(dev, 0); - tclk = clk_get(dev, NULL); val = __raw_readl(timer_base + TIMER_CTRL_OFF); - val = ~TIMER0_25MHZ; + val = ~(TIMER0_25MHZ | TIMER0_DIV_MASK); + if (of_device_is_compatible(dev-device_node, + marvell,armada-370-timer)) { + clk = clk_get(dev, NULL); + div = TIMER_DIVIDER; + val |= TIMER0_DIV(TIMER_DIVIDER_SHIFT); + rate = clk_get_rate(clk) / TIMER_DIVIDER; + } else { + clk = clk_get(dev, fixed); + div = 1; + val |= TIMER0_25MHZ; + rate = clk_get_rate(clk); + } __raw_writel(val, timer_base + TIMER_CTRL_OFF); __raw_writel(0x, timer_base + TIMER0_VAL_OFF); __raw_writel(0x, timer_base + TIMER0_RELOAD_OFF); val = __raw_readl(timer_base + TIMER_CTRL_OFF); - val |= TIMER0_EN | TIMER0_RELOAD_EN | TIMER0_DIV(TIMER_DIVIDER_SHIFT); + val |= TIMER0_EN | TIMER0_RELOAD_EN; __raw_writel(val, timer_base + TIMER_CTRL_OFF); - cs.mult = clocksource_hz2mult(clk_get_rate(tclk), cs.shift); + cs.mult = clocksource_hz2mult(rate, cs.shift); init_clock(cs); @@ -78,7 +92,8 @@ static int mvebu_timer_probe(struct device_d *dev) } static struct of_device_id mvebu_timer_dt_ids[] = { - { .compatible = marvell,armada-370-xp-timer, }, + { .compatible = marvell,armada-370-timer, }, + { .compatible = marvell,armada-xp-timer, }, { } }; -- 2.0.0 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 00/11] Convert MVEBU SoCs to DT and PBL_MULTI_IMAGE
This patch set converts Kirkwood and Armada 370/XP to DT and provides PBL_MULTI_IMAGE support as we already have for Dove. Patch 1 resorts pbl entries in arch/arm/dts/Makefile back to alphabetical order. Patch 2 reworks mvebu pbl image Makefile to ease integration of other SoCs. Patches 3 and 4 convert Kirkwood and Armada 370/XP SoC init to DT probing. Patches 5-9 convert existing Kirkwood and Armada 370/XP boards to PBL_MULTI_IMAGES. Patch 10 then reworks MVEBU related Kconfig to allow multiple board selection per-SoC. Patch 11 removes now redundant dtb Makefile targets. The patches are based on today's next with previously sent cleanup patches applied. They have been tested on Guruplug (Kirkwood) and Mirabox (Armada 370). A branch based on *unstable* next with cleanup applied is available at: https://github.com/shesselba/barebox-dove.git mvebu/soc Sebastian Hesselbarth (11): ARM: dts: sort pbl entries by alphabet ARM: mvebu: sort pbl image target by board ARM: mvebu: convert Kirkwood devices to be probed from DT ARM: mvebu: convert Armada 370/XP devices to be probed from DT ARM: mvebu: convert Globalscale Guruplug to PBL_MULTI_IMAGES ARM: mvebu: convert USI Topkick to PBL_MULTI_IMAGES ARM: mvebu: convert Globalscale Mirabox to PBL_MULTI_IMAGES ARM: mvebu: convert Marvell Armada XP GP to PBL_MULTI_IMAGES ARM: mvebu: convert PlatHome Openblocks AX3-4 to PBL_MULTI_IMAGES ARM: mvebu: convert to multiple board selection ARM: mvebu: remove dtb Makefile entries arch/arm/Kconfig | 1 + arch/arm/Makefile | 6 -- arch/arm/boards/Makefile | 6 ++ arch/arm/boards/globalscale-guruplug/Makefile | 1 + arch/arm/boards/globalscale-guruplug/lowlevel.c| 35 +++ arch/arm/boards/globalscale-mirabox/Makefile | 1 + arch/arm/boards/globalscale-mirabox/kwbimage.cfg | 2 +- arch/arm/boards/globalscale-mirabox/lowlevel.c | 35 +++ arch/arm/boards/marvell-armada-xp-gp/Makefile | 1 + arch/arm/boards/marvell-armada-xp-gp/kwbimage.cfg | 2 +- arch/arm/boards/marvell-armada-xp-gp/lowlevel.c| 34 ++ arch/arm/boards/plathome-openblocks-ax3/Makefile | 1 + .../boards/plathome-openblocks-ax3/kwbimage.cfg| 2 +- arch/arm/boards/plathome-openblocks-ax3/lowlevel.c | 35 +++ arch/arm/boards/usi-topkick/Makefile | 1 + arch/arm/boards/usi-topkick/lowlevel.c | 34 ++ arch/arm/dts/Makefile | 32 +- arch/arm/dts/armada-370-mirabox-bb.dts | 25 arch/arm/dts/armada-xp-gp-bb.dts | 12 arch/arm/dts/armada-xp-openblocks-ax3-4-bb.dts | 26 arch/arm/dts/kirkwood-guruplug-server-plus-bb.dts | 14 + arch/arm/dts/kirkwood-topkick-bb.dts | 14 + arch/arm/mach-mvebu/Kconfig| 21 --- arch/arm/mach-mvebu/armada-370-xp.c| 66 +--- arch/arm/mach-mvebu/kirkwood.c | 46 -- images/Makefile.mvebu | 72 +++--- 26 files changed, 363 insertions(+), 162 deletions(-) create mode 100644 arch/arm/boards/globalscale-guruplug/lowlevel.c create mode 100644 arch/arm/boards/globalscale-mirabox/lowlevel.c create mode 100644 arch/arm/boards/marvell-armada-xp-gp/lowlevel.c create mode 100644 arch/arm/boards/plathome-openblocks-ax3/lowlevel.c create mode 100644 arch/arm/boards/usi-topkick/lowlevel.c create mode 100644 arch/arm/dts/armada-370-mirabox-bb.dts create mode 100644 arch/arm/dts/armada-xp-gp-bb.dts create mode 100644 arch/arm/dts/armada-xp-openblocks-ax3-4-bb.dts create mode 100644 arch/arm/dts/kirkwood-guruplug-server-plus-bb.dts create mode 100644 arch/arm/dts/kirkwood-topkick-bb.dts --- Cc: barebox@lists.infradead.org -- 2.0.0 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 05/11] ARM: mvebu: convert Globalscale Guruplug to PBL_MULTI_IMAGES
This converts Marvell Kirkwood based Globalscale Guruplug to PBL_MULTI_IMAGES. Signed-off-by: Sebastian Hesselbarth sebastian.hesselba...@gmail.com --- Cc: barebox@lists.infradead.org --- arch/arm/boards/globalscale-guruplug/Makefile | 1 + arch/arm/boards/globalscale-guruplug/lowlevel.c | 35 + arch/arm/dts/Makefile | 1 + images/Makefile.mvebu | 12 + 4 files changed, 49 insertions(+) create mode 100644 arch/arm/boards/globalscale-guruplug/lowlevel.c diff --git a/arch/arm/boards/globalscale-guruplug/Makefile b/arch/arm/boards/globalscale-guruplug/Makefile index dcfc2937d325..01c7a259e9a5 100644 --- a/arch/arm/boards/globalscale-guruplug/Makefile +++ b/arch/arm/boards/globalscale-guruplug/Makefile @@ -1 +1,2 @@ obj-y += board.o +lwl-y += lowlevel.o diff --git a/arch/arm/boards/globalscale-guruplug/lowlevel.c b/arch/arm/boards/globalscale-guruplug/lowlevel.c new file mode 100644 index ..508746a06f81 --- /dev/null +++ b/arch/arm/boards/globalscale-guruplug/lowlevel.c @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2014 + * Sebastian Hesselbarth sebastian.hesselba...@gmail.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include common.h +#include sizes.h +#include asm/barebox-arm.h +#include asm/barebox-arm-head.h +#include mach/lowlevel.h + +extern char __dtb_kirkwood_guruplug_server_plus_bb_start[]; + +ENTRY_FUNCTION(start_globalscale_guruplug, r0, r1, r2) +{ + void *fdt; + + arm_cpu_lowlevel_init(); + + fdt = __dtb_kirkwood_guruplug_server_plus_bb_start - + get_runtime_offset(); + + mvebu_barebox_entry(fdt); +} diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 4642f979f6d5..b747c59c460f 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -58,6 +58,7 @@ pbl-$(CONFIG_MACH_FREESCALE_MX51_PDK) += imx51-babbage.dtb.o pbl-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += imx53-qsb.dtb.o imx53-qsrb.dtb.o pbl-$(CONFIG_MACH_FREESCALE_MX53_VMX53) += imx53-voipac-bsb.dtb.o pbl-$(CONFIG_MACH_GK802) += imx6q-gk802.dtb.o +pbl-$(CONFIG_MACH_GLOBALSCALE_GURUPLUG) += kirkwood-guruplug-server-plus-bb.dtb.o pbl-$(CONFIG_MACH_GUF_SANTARO) += imx6q-guf-santaro.dtb.o pbl-$(CONFIG_MACH_NITROGEN6X) += imx6q-nitrogen6x.dtb.o imx6dl-nitrogen6x.dtb.o pbl-$(CONFIG_MACH_NVIDIA_BEAVER) += tegra30-beaver.dtb.o diff --git a/images/Makefile.mvebu b/images/Makefile.mvebu index 8559556e203c..c09a77d1473c 100644 --- a/images/Makefile.mvebu +++ b/images/Makefile.mvebu @@ -24,3 +24,15 @@ pblx-$(CONFIG_MACH_SOLIDRUN_CUBOX) += start_solidrun_cubox image-$(CONFIG_MACH_SOLIDRUN_CUBOX) += barebox-solidrun-cubox.img image-$(CONFIG_MACH_SOLIDRUN_CUBOX) += barebox-solidrun-cubox-uart.img image-$(CONFIG_MACH_SOLIDRUN_CUBOX) += barebox-solidrun-cubox-2nd.img + +# --- Kirkwood based boards --- +GLOBALSCALE_GURUPLUG_KWBOPTS = ${KWBOPTS} -i $(board)/globalscale-guruplug/kwbimage.cfg +OPTS_start_globalscale_guruplug.pblx.kwbimg = $(GLOBALSCALE_GURUPLUG_KWBOPTS) +OPTS_start_globalscale_guruplug.pblx.kwbuartimg = -m uart $(GLOBALSCALE_GURUPLUG_KWBOPTS) +FILE_barebox-globalscale-guruplug.img = start_globalscale_guruplug.pblx.kwbimg +FILE_barebox-globalscale-guruplug-uart.img = start_globalscale_guruplug.pblx.kwbuartimg +FILE_barebox-globalscale-guruplug-2nd.img = start_globalscale_guruplug.pblx +pblx-$(CONFIG_MACH_GLOBALSCALE_GURUPLUG) += start_globalscale_guruplug +image-$(CONFIG_MACH_GLOBALSCALE_GURUPLUG) += barebox-globalscale-guruplug.img +image-$(CONFIG_MACH_GLOBALSCALE_GURUPLUG) += barebox-globalscale-guruplug-uart.img +image-$(CONFIG_MACH_GLOBALSCALE_GURUPLUG) += barebox-globalscale-guruplug-2nd.img -- 2.0.0 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 01/11] ARM: dts: sort pbl entries by alphabet
Clean up pbl Makefile entries, that are out of alphabetical order. Signed-off-by: Sebastian Hesselbarth sebastian.hesselba...@gmail.com --- Cc: barebox@lists.infradead.org --- arch/arm/dts/Makefile | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 6bbb4dcbed05..a5e6fd29c39e 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -46,37 +46,37 @@ BUILTIN_DTB := $(patsubst %,%,$(CONFIG_BUILTIN_DTB_NAME)) obj-$(CONFIG_BUILTIN_DTB) += $(BUILTIN_DTB).dtb.o pbl-$(CONFIG_MACH_BEAGLEBONE) += am335x-bone.dtb.o am335x-boneblack.dtb.o am335x-bone-common.dtb.o +pbl-$(CONFIG_MACH_DFI_FS700_M60) += imx6q-dfi-fs700-m60-6q.dtb.o imx6dl-dfi-fs700-m60-6s.dtb.o pbl-$(CONFIG_MACH_EFIKA_MX_SMARTBOOK) += imx51-genesi-efika-sb.dtb.o pbl-$(CONFIG_MACH_EMBEST_RIOTBOARD) += imx6s-riotboard.dtb.o pbl-$(CONFIG_MACH_FREESCALE_MX51_PDK) += imx51-babbage.dtb.o pbl-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += imx53-qsb.dtb.o imx53-qsrb.dtb.o pbl-$(CONFIG_MACH_FREESCALE_MX53_VMX53) += imx53-voipac-bsb.dtb.o -pbl-$(CONFIG_MACH_DFI_FS700_M60) += imx6q-dfi-fs700-m60-6q.dtb.o imx6dl-dfi-fs700-m60-6s.dtb.o +pbl-$(CONFIG_MACH_GK802) += imx6q-gk802.dtb.o +pbl-$(CONFIG_MACH_GUF_SANTARO) += imx6q-guf-santaro.dtb.o +pbl-$(CONFIG_MACH_NITROGEN6X) += imx6q-nitrogen6x.dtb.o imx6dl-nitrogen6x.dtb.o pbl-$(CONFIG_MACH_NVIDIA_BEAVER) += tegra30-beaver.dtb.o pbl-$(CONFIG_MACH_NVIDIA_JETSON) += tegra124-jetson-tk1.dtb.o +pbl-$(CONFIG_MACH_PCA100) += imx27-phytec-phycard-s-rdk-bb.dtb.o +pbl-$(CONFIG_MACH_PCAAXL3) += imx6q-phytec-pbaa03.dtb.o +pbl-$(CONFIG_MACH_PCM038) += imx27-phytec-phycore-rdk.dtb.o pbl-$(CONFIG_MACH_PCM051) += am335x-phytec-phycore.dtb.o pbl-$(CONFIG_MACH_PHYTEC_PFLA02) += imx6s-phytec-pbab01.dtb.o imx6dl-phytec-pbab01.dtb.o imx6q-phytec-pbab01.dtb.o +pbl-$(CONFIG_MACH_RADXA_ROCK) += rk3188-radxarock.dtb.o pbl-$(CONFIG_MACH_REALQ7) += imx6q-dmo-edmqmx6.dtb.o +pbl-$(CONFIG_MACH_SABRELITE) += imx6q-sabrelite.dtb.o imx6dl-sabrelite.dtb.o +pbl-$(CONFIG_MACH_SABRESD) += imx6q-sabresd.dtb.o +pbl-$(CONFIG_MACH_SOCFPGA_EBV_SOCRATES) += socfpga_cyclone5_socrates.dtb.o +pbl-$(CONFIG_MACH_SOCFPGA_TERASIC_SOCKIT) += socfpga_cyclone5_sockit.dtb.o pbl-$(CONFIG_MACH_SOLIDRUN_CUBOX) += dove-cubox-bb.dtb.o -pbl-$(CONFIG_MACH_GK802) += imx6q-gk802.dtb.o -pbl-$(CONFIG_MACH_PCA100) += imx27-phytec-phycard-s-rdk-bb.dtb.o -pbl-$(CONFIG_MACH_PCM038) += imx27-phytec-phycore-rdk.dtb.o +pbl-$(CONFIG_MACH_SOLIDRUN_HUMMINGBOARD) += imx6dl-hummingboard.dtb.o pbl-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += tegra20-colibri-iris.dtb.o pbl-$(CONFIG_MACH_TOSHIBA_AC100) += tegra20-paz00.dtb.o pbl-$(CONFIG_MACH_TQMA53) += imx53-mba53.dtb.o pbl-$(CONFIG_MACH_TQMA6X) += imx6dl-mba6x.dtb.o imx6q-mba6x.dtb.o pbl-$(CONFIG_MACH_TX25) += imx25-karo-tx25.dtb.o -pbl-$(CONFIG_MACH_RADXA_ROCK) += rk3188-radxarock.dtb.o -pbl-$(CONFIG_MACH_SOCFPGA_EBV_SOCRATES) += socfpga_cyclone5_socrates.dtb.o -pbl-$(CONFIG_MACH_SOCFPGA_TERASIC_SOCKIT) += socfpga_cyclone5_sockit.dtb.o -pbl-$(CONFIG_MACH_SOLIDRUN_HUMMINGBOARD) += imx6dl-hummingboard.dtb.o -pbl-$(CONFIG_MACH_SABRELITE) += imx6q-sabrelite.dtb.o imx6dl-sabrelite.dtb.o -pbl-$(CONFIG_MACH_SABRESD) += imx6q-sabresd.dtb.o -pbl-$(CONFIG_MACH_GUF_SANTARO) += imx6q-guf-santaro.dtb.o -pbl-$(CONFIG_MACH_NITROGEN6X) += imx6q-nitrogen6x.dtb.o imx6dl-nitrogen6x.dtb.o pbl-$(CONFIG_MACH_UDOO) += imx6q-udoo.dtb.o pbl-$(CONFIG_MACH_VARISCITE_MX6) += imx6q-var-custom.dtb.o -pbl-$(CONFIG_MACH_PCAAXL3) += imx6q-phytec-pbaa03.dtb.o .SECONDARY: $(obj)/$(BUILTIN_DTB).dtb.S .SECONDARY: $(patsubst %,$(obj)/%.S,$(dtb-y)) -- 2.0.0 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 10/11] ARM: mvebu: convert to multiple board selection
With all SoCs converted to DT based probing, select PBL_MULTI_IMAGES support and get rid of SoCs Kconfig choice to allow multiple boards to be selected. Signed-off-by: Sebastian Hesselbarth sebastian.hesselba...@gmail.com --- Cc: barebox@lists.infradead.org --- arch/arm/Kconfig| 1 + arch/arm/Makefile | 6 -- arch/arm/boards/Makefile| 6 ++ arch/arm/mach-mvebu/Kconfig | 21 - 4 files changed, 7 insertions(+), 27 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 8674a2d17cf2..3b8a2a2207e4 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -92,6 +92,7 @@ config ARCH_MVEBU select CLKDEV_LOOKUP select GPIOLIB select HAS_DEBUG_LL + select HAVE_PBL_MULTI_IMAGES select MVEBU_MBUS select OFTREE diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 64db73c62e35..983f7f57cd26 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -86,17 +86,11 @@ machine-$(CONFIG_ARCH_ZYNQ) := zynq board-$(CONFIG_MACH_A9M2410) += a9m2410 board-$(CONFIG_MACH_A9M2440) += a9m2440 board-$(CONFIG_MACH_AT91RM9200EK) += at91rm9200ek -board-$(CONFIG_MACH_GLOBALSCALE_GURUPLUG) += globalscale-guruplug -board-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += globalscale-mirabox -board-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += marvell-armada-xp-gp board-$(CONFIG_MACH_MINI2440) += friendlyarm-mini2440 board-$(CONFIG_MACH_MINI6410) += friendlyarm-mini6410 board-$(CONFIG_MACH_PCM027)+= phytec-phycore-pxa270 -board-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_AX3) += plathome-openblocks-ax3/ -board-$(CONFIG_MACH_SOLIDRUN_CUBOX)+= solidrun-cubox board-$(CONFIG_MACH_TINY210) += friendlyarm-tiny210 board-$(CONFIG_MACH_TINY6410) += friendlyarm-tiny6410 -board-$(CONFIG_MACH_USI_TOPKICK) += usi-topkick machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y)) diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile index 4eccc92930ad..f85ddccc550a 100644 --- a/arch/arm/boards/Makefile +++ b/arch/arm/boards/Makefile @@ -41,6 +41,8 @@ obj-$(CONFIG_MACH_FREESCALE_MX53_SMD) += freescale-mx53-smd/ obj-$(CONFIG_MACH_FREESCALE_MX53_VMX53)+= freescale-mx53-vmx53/ obj-$(CONFIG_MACH_GE863) += telit-evk-pro3/ obj-$(CONFIG_MACH_GK802) += gk802/ +obj-$(CONFIG_MACH_GLOBALSCALE_GURUPLUG)+= globalscale-guruplug/ +obj-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += globalscale-mirabox/ obj-$(CONFIG_MACH_GUF_CUPID) += guf-cupid/ obj-$(CONFIG_MACH_GUF_SANTARO) += guf-santaro/ obj-$(CONFIG_MACH_GUF_VINCELL) += guf-vincell/ @@ -48,6 +50,7 @@ obj-$(CONFIG_MACH_HIGHBANK) += highbank/ obj-$(CONFIG_MACH_IMX21ADS)+= freescale-mx21-ads/ obj-$(CONFIG_MACH_IMX233_OLINUXINO)+= imx233-olinuxino/ obj-$(CONFIG_MACH_IMX27ADS)+= freescale-mx27-ads/ +obj-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP)+= marvell-armada-xp-gp/ obj-$(CONFIG_MACH_MB7707) += module-mb7707/ obj-$(CONFIG_MACH_MIOA701) += mioa701/ obj-$(CONFIG_MACH_MMCCPU) += mmccpu/ @@ -73,6 +76,7 @@ obj-$(CONFIG_MACH_PCM043) += phytec-phycore-imx35/ obj-$(CONFIG_MACH_PCM049) += phytec-phycore-omap4460/ obj-$(CONFIG_MACH_PCM051) += phytec-phycore-am335x/ obj-$(CONFIG_MACH_PHYTEC_PFLA02) += phytec-phyflex-imx6/ +obj-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_AX3) += plathome-openblocks-ax3/ obj-$(CONFIG_MACH_PM9261) += pm9261/ obj-$(CONFIG_MACH_PM9263) += pm9263/ obj-$(CONFIG_MACH_PM9G45) += pm9g45/ @@ -88,6 +92,7 @@ obj-$(CONFIG_MACH_SAMA5D3_XPLAINED) += sama5d3_xplained/ obj-$(CONFIG_MACH_SCB9328) += scb9328/ obj-$(CONFIG_MACH_SOCFPGA_EBV_SOCRATES)+= ebv-socrates/ obj-$(CONFIG_MACH_SOCFPGA_TERASIC_SOCKIT) += terasic-sockit/ +obj-$(CONFIG_MACH_SOLIDRUN_CUBOX) += solidrun-cubox/ obj-$(CONFIG_MACH_SOLIDRUN_HUMMINGBOARD) += solidrun-hummingboard/ obj-$(CONFIG_MACH_TNY_A9260) += tny-a926x/ obj-$(CONFIG_MACH_TNY_A9263) += tny-a926x/ @@ -104,6 +109,7 @@ obj-$(CONFIG_MACH_UDOO) += udoo/ obj-$(CONFIG_MACH_USB_A9260) += usb-a926x/ obj-$(CONFIG_MACH_USB_A9263) += usb-a926x/ obj-$(CONFIG_MACH_USB_A9G20) += usb-a926x/ +obj-$(CONFIG_MACH_USI_TOPKICK) += usi-topkick/ obj-$(CONFIG_MACH_VERSATILEPB) += versatile/ obj-$(CONFIG_MACH_VEXPRESS)+= vexpress/
[PATCH 2/7] ARM: mvebu: set default TEXT_BASE by SoC
All current boards use the same TEXT_BASE, therefore set the default TEXT_BASE by SoC instead of by board. Signed-off-by: Sebastian Hesselbarth sebastian.hesselba...@gmail.com --- Cc: barebox@lists.infradead.org --- arch/arm/mach-mvebu/Kconfig | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index 70c49ecc6a0a..80e8687916df 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -2,12 +2,10 @@ if ARCH_MVEBU config ARCH_TEXT_BASE hex - default 0x200 if MACH_PLATHOME_OPENBLOCKS_AX3 - default 0x200 if MACH_GLOBALSCALE_MIRABOX - default 0x200 if MACH_GLOBALSCALE_GURUPLUG - default 0x200 if MACH_USI_TOPKICK - default 0x200 if MACH_MARVELL_ARMADA_XP_GP - default 0x200 if MACH_SOLIDRUN_CUBOX + default 0x200 if ARCH_ARMADA_370 + default 0x200 if ARCH_ARMADA_XP + default 0x200 if ARCH_DOVE + default 0x200 if ARCH_KIRKWOOD choice prompt Marvell EBU Processor -- 2.0.0 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 08/11] ARM: mvebu: convert Marvell Armada XP GP to PBL_MULTI_IMAGES
This converts Marvell Armada XP based Marvell Armada XP GP to PBL_MULTI_IMAGES. A DT overlay is added to keep possible barebox-specific changes separated and added to lowlevel board init. Signed-off-by: Sebastian Hesselbarth sebastian.hesselba...@gmail.com --- Cc: barebox@lists.infradead.org --- arch/arm/boards/marvell-armada-xp-gp/Makefile | 1 + arch/arm/boards/marvell-armada-xp-gp/kwbimage.cfg | 2 +- arch/arm/boards/marvell-armada-xp-gp/lowlevel.c | 34 +++ arch/arm/dts/Makefile | 1 + arch/arm/dts/armada-xp-gp-bb.dts | 6 images/Makefile.mvebu | 12 6 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boards/marvell-armada-xp-gp/lowlevel.c diff --git a/arch/arm/boards/marvell-armada-xp-gp/Makefile b/arch/arm/boards/marvell-armada-xp-gp/Makefile index dcfc2937d325..01c7a259e9a5 100644 --- a/arch/arm/boards/marvell-armada-xp-gp/Makefile +++ b/arch/arm/boards/marvell-armada-xp-gp/Makefile @@ -1 +1,2 @@ obj-y += board.o +lwl-y += lowlevel.o diff --git a/arch/arm/boards/marvell-armada-xp-gp/kwbimage.cfg b/arch/arm/boards/marvell-armada-xp-gp/kwbimage.cfg index db75969fe0cb..3f66aa080edb 100644 --- a/arch/arm/boards/marvell-armada-xp-gp/kwbimage.cfg +++ b/arch/arm/boards/marvell-armada-xp-gp/kwbimage.cfg @@ -1,3 +1,3 @@ VERSION 1 BOOT_FROM spi -BINARY marvell-armada-xp-gp-binary.0 005b 0068 +BINARY arch/arm/boards/marvell-armada-xp-gp/binary.0 005b 0068 diff --git a/arch/arm/boards/marvell-armada-xp-gp/lowlevel.c b/arch/arm/boards/marvell-armada-xp-gp/lowlevel.c new file mode 100644 index ..046057f56ab1 --- /dev/null +++ b/arch/arm/boards/marvell-armada-xp-gp/lowlevel.c @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2014 + * Sebastian Hesselbarth sebastian.hesselba...@gmail.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include common.h +#include sizes.h +#include asm/barebox-arm.h +#include asm/barebox-arm-head.h +#include mach/lowlevel.h + +extern char __dtb_armada_xp_gp_bb_start[]; + +ENTRY_FUNCTION(start_marvell_armada_xp_gp, r0, r1, r2) +{ + void *fdt; + + arm_cpu_lowlevel_init(); + + fdt = __dtb_armada_xp_gp_bb_start - get_runtime_offset(); + + mvebu_barebox_entry(fdt); +} diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index c5a782befd07..a185afdfe881 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -61,6 +61,7 @@ pbl-$(CONFIG_MACH_GK802) += imx6q-gk802.dtb.o pbl-$(CONFIG_MACH_GLOBALSCALE_GURUPLUG) += kirkwood-guruplug-server-plus-bb.dtb.o pbl-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += armada-370-mirabox-bb.dtb.o pbl-$(CONFIG_MACH_GUF_SANTARO) += imx6q-guf-santaro.dtb.o +pbl-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += armada-xp-gp-bb.dtb.o pbl-$(CONFIG_MACH_NITROGEN6X) += imx6q-nitrogen6x.dtb.o imx6dl-nitrogen6x.dtb.o pbl-$(CONFIG_MACH_NVIDIA_BEAVER) += tegra30-beaver.dtb.o pbl-$(CONFIG_MACH_NVIDIA_JETSON) += tegra124-jetson-tk1.dtb.o diff --git a/arch/arm/dts/armada-xp-gp-bb.dts b/arch/arm/dts/armada-xp-gp-bb.dts index e27a9664451d..3836016425b9 100644 --- a/arch/arm/dts/armada-xp-gp-bb.dts +++ b/arch/arm/dts/armada-xp-gp-bb.dts @@ -4,3 +4,9 @@ */ #include arm/armada-xp-gp.dts + +/ { + chosen { + stdout-path = /soc/internal-regs/serial@12000; + }; +}; diff --git a/images/Makefile.mvebu b/images/Makefile.mvebu index 3b89f36fa610..faaf93f331ee 100644 --- a/images/Makefile.mvebu +++ b/images/Makefile.mvebu @@ -25,6 +25,18 @@ image-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += barebox-globalscale-mirabox.img image-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += barebox-globalscale-mirabox-uart.img image-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += barebox-globalscale-mirabox-2nd.img +# --- Armada XP based boards --- +MARVELL_ARMADA_XP_GP_KWBOPTS = ${KWBOPTS} -i $(board)/marvell-armada-xp-gp/kwbimage.cfg +OPTS_start_marvell_armada_xp_gp.pblx.kwbimg = $(MARVELL_ARMADA_XP_GP_KWBOPTS) +OPTS_start_marvell_armada_xp_gp.pblx.kwbuartimg = -m uart $(MARVELL_ARMADA_XP_GP_KWBOPTS) +FILE_barebox-marvell-armada-xp-gp.img = start_marvell_armada_xp_gp.pblx.kwbimg +FILE_barebox-marvell-armada-xp-gp-uart.img = start_marvell_armada_xp_gp.pblx.kwbuartimg +FILE_barebox-marvell-armada-xp-gp-2nd.img = start_marvell_armada_xp_gp.pblx +pblx-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += start_marvell_armada_xp_gp +image-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) +=
[PATCH 04/11] ARM: mvebu: convert Armada 370/XP devices to be probed from DT
With Armada 370/XP DT files available, convert Armada 370/XP SoC init to register basic devices from DT only. Makefile targets for dtbs will be removed again as soon as MULTI_PBL is available. Signed-off-by: Sebastian Hesselbarth sebastian.hesselba...@gmail.com --- Cc: barebox@lists.infradead.org --- arch/arm/dts/Makefile | 3 ++ arch/arm/dts/armada-370-mirabox-bb.dts | 18 +++ arch/arm/dts/armada-xp-gp-bb.dts | 6 +++ arch/arm/dts/armada-xp-openblocks-ax3-4-bb.dts | 18 +++ arch/arm/mach-mvebu/armada-370-xp.c| 66 +- 5 files changed, 46 insertions(+), 65 deletions(-) create mode 100644 arch/arm/dts/armada-370-mirabox-bb.dts create mode 100644 arch/arm/dts/armada-xp-gp-bb.dts create mode 100644 arch/arm/dts/armada-xp-openblocks-ax3-4-bb.dts diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 547dba4461f8..4642f979f6d5 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -33,6 +33,9 @@ dtb-$(CONFIG_ARCH_IMX6) += imx6q-gk802.dtb \ imx6s-riotboard.dtb \ imx6q-phytec-pbaa03.dtb dtb-$(CONFIG_ARCH_MVEBU) += dove-cubox-bb.dtb \ + armada-370-mirabox-bb.dtb \ + armada-xp-gp-bb.dtb \ + armada-xp-openblocks-ax3-4-bb.dtb \ kirkwood-guruplug-server-plus-bb.dtb \ kirkwood-topkick-bb.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3188-radxarock.dtb diff --git a/arch/arm/dts/armada-370-mirabox-bb.dts b/arch/arm/dts/armada-370-mirabox-bb.dts new file mode 100644 index ..22fec18aaf93 --- /dev/null +++ b/arch/arm/dts/armada-370-mirabox-bb.dts @@ -0,0 +1,18 @@ +/* + * Barebox specific DT overlay for Globalscale Mirabox + * Sebastian Hesselbarth sebastian.hesselba...@gmail.com + */ + +#include arm/armada-370-mirabox.dts + +/ { + soc { + internal-regs { + gpio_leds { + green_pwr_led { + barebox,default-trigger = heartbeat; + }; + }; + }; + }; +}; diff --git a/arch/arm/dts/armada-xp-gp-bb.dts b/arch/arm/dts/armada-xp-gp-bb.dts new file mode 100644 index ..e27a9664451d --- /dev/null +++ b/arch/arm/dts/armada-xp-gp-bb.dts @@ -0,0 +1,6 @@ +/* + * Barebox specific DT overlay for Marvell Armada XP DB-MV784MP-GP + * Sebastian Hesselbarth sebastian.hesselba...@gmail.com + */ + +#include arm/armada-xp-gp.dts diff --git a/arch/arm/dts/armada-xp-openblocks-ax3-4-bb.dts b/arch/arm/dts/armada-xp-openblocks-ax3-4-bb.dts new file mode 100644 index ..350aa1cb0a6d --- /dev/null +++ b/arch/arm/dts/armada-xp-openblocks-ax3-4-bb.dts @@ -0,0 +1,18 @@ +/* + * Barebox specific DT overlay for OpenBlocks AX3-4 board + * Sebastian Hesselbarth sebastian.hesselba...@gmail.com + */ + +#include arm/armada-xp-openblocks-ax3-4.dts + +/ { + soc { + internal-regs { + gpio_leds { + red_led { + barebox,default-trigger = heartbeat; + }; + }; + }; + }; +}; diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c index 051323eeb36c..e416a3876539 100644 --- a/arch/arm/mach-mvebu/armada-370-xp.c +++ b/arch/arm/mach-mvebu/armada-370-xp.c @@ -17,18 +17,9 @@ #include common.h #include init.h #include io.h -#include ns16550.h -#include linux/clk.h -#include linux/clkdev.h #include asm/memory.h #include mach/armada-370-xp-regs.h -#define CONSOLE_UART_BASE \ - ARMADA_370_XP_UARTn_BASE(CONFIG_MVEBU_CONSOLE_UART) - -static struct clk *tclk; -static struct clk *refclk; - static inline void armada_370_xp_memory_find(unsigned long *phys_base, unsigned long *phys_size) { @@ -52,53 +43,6 @@ static inline void armada_370_xp_memory_find(unsigned long *phys_base, } } -static struct NS16550_plat uart_plat = { - .shift = 2, -}; - -static int armada_370_xp_add_uart(void) -{ - uart_plat.clock = clk_get_rate(tclk); - if (!add_ns16550_device(DEVICE_ID_DYNAMIC, - (unsigned int)CONSOLE_UART_BASE, 32, - IORESOURCE_MEM | IORESOURCE_MEM_32BIT, - uart_plat)) - return -ENODEV; - return 0; -} - -#if defined(CONFIG_ARCH_ARMADA_370) -static int armada_370_init_clocks(void) -{ - u32 val = readl(ARMADA_370_XP_SAR_BASE + SAR_LOW); - unsigned int rate; - - /* -* On Armada 370, the TCLK frequency can be either -* 166 Mhz or 200 Mhz -*/ - if ((val SAR_TCLK_FREQ) == SAR_TCLK_FREQ) - rate = 2; - else - rate = 16600; - - tclk = clk_fixed(tclk, rate); - return clk_register_clkdev(tclk, NULL, mvebu-timer); -}
[PATCH 02/11] ARM: mvebu: sort pbl image target by board
This reorders images/Makefile.mvebu targets by board to ease integration of new boards. Signed-off-by: Sebastian Hesselbarth sebastian.hesselba...@gmail.com --- Cc: barebox@lists.infradead.org --- images/Makefile.mvebu | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/images/Makefile.mvebu b/images/Makefile.mvebu index fe92cc2f5839..8559556e203c 100644 --- a/images/Makefile.mvebu +++ b/images/Makefile.mvebu @@ -11,16 +11,16 @@ $(obj)/%.kwbuartimg: $(obj)/% FORCE board = $(srctree)/arch/$(ARCH)/boards +KWBOPTS = -c -d 0x100 -e 0x100 + # --- Dove 88AP510 based boards --- -SOLIDRUN_CUBOX_KWBOPTS = -c -i $(board)/solidrun-cubox/kwbimage.cfg -d 0x100 -e 0x100 -pblx-$(CONFIG_MACH_SOLIDRUN_CUBOX) += start_solidrun_cubox +SOLIDRUN_CUBOX_KWBOPTS = ${KWBOPTS} -i $(board)/solidrun-cubox/kwbimage.cfg OPTS_start_solidrun_cubox.pblx.kwbimg = $(SOLIDRUN_CUBOX_KWBOPTS) -FILE_barebox-solidrun-cubox.img = start_solidrun_cubox.pblx.kwbimg -image-$(CONFIG_MACH_SOLIDRUN_CUBOX) += barebox-solidrun-cubox.img - OPTS_start_solidrun_cubox.pblx.kwbuartimg = -m uart $(SOLIDRUN_CUBOX_KWBOPTS) +FILE_barebox-solidrun-cubox.img= start_solidrun_cubox.pblx.kwbimg FILE_barebox-solidrun-cubox-uart.img = start_solidrun_cubox.pblx.kwbuartimg -image-$(CONFIG_MACH_SOLIDRUN_CUBOX) += barebox-solidrun-cubox-uart.img - FILE_barebox-solidrun-cubox-2nd.img = start_solidrun_cubox.pblx +pblx-$(CONFIG_MACH_SOLIDRUN_CUBOX) += start_solidrun_cubox +image-$(CONFIG_MACH_SOLIDRUN_CUBOX) += barebox-solidrun-cubox.img +image-$(CONFIG_MACH_SOLIDRUN_CUBOX) += barebox-solidrun-cubox-uart.img image-$(CONFIG_MACH_SOLIDRUN_CUBOX) += barebox-solidrun-cubox-2nd.img -- 2.0.0 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 11/11] ARM: mvebu: remove dtb Makefile entries
MULTI_PBL images have a built-in dtb by default. With all MVEBU SoCs converted to MULTI_PBL images, get rid of the extra Makefile rules for appended dtbs. Signed-off-by: Sebastian Hesselbarth sebastian.hesselba...@gmail.com --- Cc: barebox@lists.infradead.org --- arch/arm/dts/Makefile | 6 -- 1 file changed, 6 deletions(-) diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index f35d9386d6e7..12915776e7cf 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -32,12 +32,6 @@ dtb-$(CONFIG_ARCH_IMX6) += imx6q-gk802.dtb \ imx6q-var-custom.dtb \ imx6s-riotboard.dtb \ imx6q-phytec-pbaa03.dtb -dtb-$(CONFIG_ARCH_MVEBU) += dove-cubox-bb.dtb \ - armada-370-mirabox-bb.dtb \ - armada-xp-gp-bb.dtb \ - armada-xp-openblocks-ax3-4-bb.dtb \ - kirkwood-guruplug-server-plus-bb.dtb \ - kirkwood-topkick-bb.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3188-radxarock.dtb dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_cyclone5_sockit.dtb \ socfpga_cyclone5_socrates.dtb -- 2.0.0 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 07/11] ARM: mvebu: convert Globalscale Mirabox to PBL_MULTI_IMAGES
This converts Marvell Armada 370 based Globalscale Mirabox to PBL_MULTI_IMAGES. A DT overlay is added to keep possible barebox-specific changes separated and added to lowlevel board init. Signed-off-by: Sebastian Hesselbarth sebastian.hesselba...@gmail.com --- Cc: barebox@lists.infradead.org --- arch/arm/boards/globalscale-mirabox/Makefile | 1 + arch/arm/boards/globalscale-mirabox/kwbimage.cfg | 2 +- arch/arm/boards/globalscale-mirabox/lowlevel.c | 35 arch/arm/dts/Makefile| 1 + arch/arm/dts/armada-370-mirabox-bb.dts | 7 + images/Makefile.mvebu| 12 6 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boards/globalscale-mirabox/lowlevel.c diff --git a/arch/arm/boards/globalscale-mirabox/Makefile b/arch/arm/boards/globalscale-mirabox/Makefile index dcfc2937d325..01c7a259e9a5 100644 --- a/arch/arm/boards/globalscale-mirabox/Makefile +++ b/arch/arm/boards/globalscale-mirabox/Makefile @@ -1 +1,2 @@ obj-y += board.o +lwl-y += lowlevel.o diff --git a/arch/arm/boards/globalscale-mirabox/kwbimage.cfg b/arch/arm/boards/globalscale-mirabox/kwbimage.cfg index 72283d9b69f2..16fb77c31f18 100644 --- a/arch/arm/boards/globalscale-mirabox/kwbimage.cfg +++ b/arch/arm/boards/globalscale-mirabox/kwbimage.cfg @@ -2,4 +2,4 @@ VERSION 1 BOOT_FROM nand NAND_BLKSZ 0002 NAND_BADBLK_LOCATION 01 -BINARY globalscale-mirabox-binary.0 005b 0068 +BINARY arch/arm/boards/globalscale-mirabox/binary.0 005b 0068 diff --git a/arch/arm/boards/globalscale-mirabox/lowlevel.c b/arch/arm/boards/globalscale-mirabox/lowlevel.c new file mode 100644 index ..92203b768ab6 --- /dev/null +++ b/arch/arm/boards/globalscale-mirabox/lowlevel.c @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2014 + * Sebastian Hesselbarth sebastian.hesselba...@gmail.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include common.h +#include sizes.h +#include asm/barebox-arm.h +#include asm/barebox-arm-head.h +#include mach/lowlevel.h + +extern char __dtb_armada_370_mirabox_bb_start[]; + +ENTRY_FUNCTION(start_globalscale_mirabox, r0, r1, r2) +{ + void *fdt; + + arm_cpu_lowlevel_init(); + + fdt = __dtb_armada_370_mirabox_bb_start - + get_runtime_offset(); + + mvebu_barebox_entry(fdt); +} diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 1b369100a537..c5a782befd07 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -59,6 +59,7 @@ pbl-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += imx53-qsb.dtb.o imx53-qsrb.dtb.o pbl-$(CONFIG_MACH_FREESCALE_MX53_VMX53) += imx53-voipac-bsb.dtb.o pbl-$(CONFIG_MACH_GK802) += imx6q-gk802.dtb.o pbl-$(CONFIG_MACH_GLOBALSCALE_GURUPLUG) += kirkwood-guruplug-server-plus-bb.dtb.o +pbl-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += armada-370-mirabox-bb.dtb.o pbl-$(CONFIG_MACH_GUF_SANTARO) += imx6q-guf-santaro.dtb.o pbl-$(CONFIG_MACH_NITROGEN6X) += imx6q-nitrogen6x.dtb.o imx6dl-nitrogen6x.dtb.o pbl-$(CONFIG_MACH_NVIDIA_BEAVER) += tegra30-beaver.dtb.o diff --git a/arch/arm/dts/armada-370-mirabox-bb.dts b/arch/arm/dts/armada-370-mirabox-bb.dts index 22fec18aaf93..de37a75bb960 100644 --- a/arch/arm/dts/armada-370-mirabox-bb.dts +++ b/arch/arm/dts/armada-370-mirabox-bb.dts @@ -6,7 +6,14 @@ #include arm/armada-370-mirabox.dts / { + chosen { + stdout-path = /soc/internal-regs/serial@12000; + }; + soc { + ranges = MBUS_ID(0xf0, 0x01) 0 0xf100 0x10 + MBUS_ID(0x01, 0xe0) 0 0xfff0 0x10; + internal-regs { gpio_leds { green_pwr_led { diff --git a/images/Makefile.mvebu b/images/Makefile.mvebu index fdc6822bd968..3b89f36fa610 100644 --- a/images/Makefile.mvebu +++ b/images/Makefile.mvebu @@ -13,6 +13,18 @@ board = $(srctree)/arch/$(ARCH)/boards KWBOPTS = -c -d 0x100 -e 0x100 +# --- Armada 370 based boards --- +GLOBALSCALE_MIRABOX_KWBOPTS = ${KWBOPTS} -i $(board)/globalscale-mirabox/kwbimage.cfg +OPTS_start_globalscale_mirabox.pblx.kwbimg = $(GLOBALSCALE_MIRABOX_KWBOPTS) +OPTS_start_globalscale_mirabox.pblx.kwbuartimg = -m uart $(GLOBALSCALE_MIRABOX_KWBOPTS) +FILE_barebox-globalscale-mirabox.img = start_globalscale_mirabox.pblx.kwbimg +FILE_barebox-globalscale-mirabox-uart.img = start_globalscale_mirabox.pblx.kwbuartimg
[PATCH 3/7] ARM: mvebu: delete unused mach/mvebu.h
This removes the stale mach/mvebu.h include as there is no user of it. Signed-off-by: Sebastian Hesselbarth sebastian.hesselba...@gmail.com --- Cc: barebox@lists.infradead.org --- arch/arm/mach-mvebu/include/mach/mvebu.h | 22 -- 1 file changed, 22 deletions(-) delete mode 100644 arch/arm/mach-mvebu/include/mach/mvebu.h diff --git a/arch/arm/mach-mvebu/include/mach/mvebu.h b/arch/arm/mach-mvebu/include/mach/mvebu.h deleted file mode 100644 index e13a446fca0e.. --- a/arch/arm/mach-mvebu/include/mach/mvebu.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2013 Thomas Petazzoni thomas.petazz...@free-electrons.com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#ifndef __MACH_MVEBU_H -#define __MACH_MVEBU_H - -int mvebu_add_uart0(void); -void __naked __noreturn mvebu_barebox_entry(void); - -#endif /* __MACH_MVEBU_H */ -- 2.0.0 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 5/7] i2c: i2c_gpio: add devicetree support
Signed-off-by: Antony Pavlov antonynpav...@gmail.com --- .../devicetree/bindings/gpio/gpio_i2c.txt | 32 + drivers/i2c/busses/i2c-gpio.c | 54 +++-- include/of_gpio.h | 55 ++ 3 files changed, 138 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/gpio/gpio_i2c.txt b/Documentation/devicetree/bindings/gpio/gpio_i2c.txt new file mode 100644 index 000..4f8ec94 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio_i2c.txt @@ -0,0 +1,32 @@ +Device-Tree bindings for i2c gpio driver + +Required properties: + - compatible = i2c-gpio; + - gpios: sda and scl gpio + + +Optional properties: + - i2c-gpio,sda-open-drain: sda as open drain + - i2c-gpio,scl-open-drain: scl as open drain + - i2c-gpio,scl-output-only: scl as output only + - i2c-gpio,delay-us: delay between GPIO operations (may depend on each platform) + - i2c-gpio,timeout-ms: timeout to get data + +Example nodes: + +i2c@0 { + compatible = i2c-gpio; + gpios = pioA 23 0 /* sda */ +pioA 24 0 /* scl */ + ; + i2c-gpio,sda-open-drain; + i2c-gpio,scl-open-drain; + i2c-gpio,delay-us = 2;/* ~100 kHz */ + #address-cells = 1; + #size-cells = 0; + + rv3029c2@56 { + compatible = rv3029c2; + reg = 0x56; + }; +}; diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c index 8b49c2c..29dc3d2 100644 --- a/drivers/i2c/busses/i2c-gpio.c +++ b/drivers/i2c/busses/i2c-gpio.c @@ -15,6 +15,7 @@ #include i2c/i2c-gpio.h #include init.h #include gpio.h +#include of_gpio.h struct i2c_gpio_private_data { struct i2c_adapter adap; @@ -83,6 +84,38 @@ static int i2c_gpio_getscl(void *data) return gpio_get_value(pdata-scl_pin); } +static int of_i2c_gpio_probe(struct device_node *np, +struct i2c_gpio_platform_data *pdata) +{ + u32 reg; + + if (of_gpio_count(np) 2) + return -ENODEV; + + pdata-sda_pin = of_get_gpio(np, 0); + pdata-scl_pin = of_get_gpio(np, 1); + + if (!gpio_is_valid(pdata-sda_pin) || !gpio_is_valid(pdata-scl_pin)) { + pr_err(%s: invalid GPIO pins, sda=%d/scl=%d\n, + np-full_name, pdata-sda_pin, pdata-scl_pin); + return -ENODEV; + } + + of_property_read_u32(np, i2c-gpio,delay-us, pdata-udelay); + + if (!of_property_read_u32(np, i2c-gpio,timeout-ms, reg)) + pdata-timeout_ms = reg; + + pdata-sda_is_open_drain = + of_property_read_bool(np, i2c-gpio,sda-open-drain); + pdata-scl_is_open_drain = + of_property_read_bool(np, i2c-gpio,scl-open-drain); + pdata-scl_is_output_only = + of_property_read_bool(np, i2c-gpio,scl-output-only); + + return 0; +} + static int i2c_gpio_probe(struct device_d *dev) { struct i2c_gpio_private_data *priv; @@ -97,9 +130,15 @@ static int i2c_gpio_probe(struct device_d *dev) bit_data = priv-bit_data; pdata = priv-pdata; - if (!dev-platform_data) - return -ENXIO; - memcpy(pdata, dev-platform_data, sizeof(*pdata)); + if (dev-device_node) { + ret = of_i2c_gpio_probe(dev-device_node, pdata); + if (ret) + return ret; + } else { + if (!dev-platform_data) + return -ENXIO; + memcpy(pdata, dev-platform_data, sizeof(*pdata)); + } ret = gpio_request(pdata-sda_pin, sda); if (ret) @@ -144,6 +183,7 @@ static int i2c_gpio_probe(struct device_d *dev) adap-algo_data = bit_data; adap-dev.parent = dev; + adap-dev.device_node = dev-device_node; adap-nr = dev-id; ret = i2c_bit_add_numbered_bus(adap); @@ -165,8 +205,16 @@ err_request_sda: return ret; } +#if defined(CONFIG_OFDEVICE) +static struct of_device_id i2c_gpio_dt_ids[] = { + { .compatible = i2c-gpio, }, + { /* sentinel */ } +}; +#endif + static struct driver_d i2c_gpio_driver = { .name = i2c-gpio, .probe = i2c_gpio_probe, + .of_compatible = DRV_OF_COMPAT(i2c_gpio_dt_ids), }; device_platform_driver(i2c_gpio_driver); diff --git a/include/of_gpio.h b/include/of_gpio.h index d42b18e..95a454c 100644 --- a/include/of_gpio.h +++ b/include/of_gpio.h @@ -35,10 +35,65 @@ static inline int of_get_named_gpio_flags(struct device_node *np, #endif /* CONFIG_OF_GPIO */ +/** + * of_gpio_named_count() - Count GPIOs for a device + * @np:device node to count GPIOs for + * @propname: property name containing gpio specifier(s) + * + * The function returns the count of GPIOs specified for a node. + * Note that the empty GPIO specifiers count too. Returns either + * Number
[PATCH 3/7] MIPS: malta: enable gpiolib
Signed-off-by: Antony Pavlov antonynpav...@gmail.com --- arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 9a240b7..f6b9765 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -44,6 +44,7 @@ config MACH_MIPS_MALTA select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_BIG_ENDIAN select HAS_DEBUG_LL + select GPIOLIB config MACH_MIPS_AR231X bool Atheros ar231x-based boards -- 1.9.2 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 0/7] MIPS: malta: enable gpio i2c stuff
Antony Pavlov (7): gpio: add Malta CBUS FPGA I2C driver MIPS: add asm/gpio.h header file MIPS: malta: enable gpiolib MIPS: dts: qemu-malta.dts: enable CBUS FPGA I2C gpio driver i2c: i2c_gpio: add devicetree support MIPS: dts: qemu-malta.dts: use i2c-gpio for accessing CBUS FPGA I2C bus MIPS: qemu-malta_defconfig: enable gpio i2c stuff .../devicetree/bindings/gpio/gpio_i2c.txt | 32 arch/mips/Kconfig | 1 + arch/mips/configs/qemu-malta_defconfig | 60 +++ arch/mips/dts/qemu-malta.dts | 23 +++ arch/mips/include/asm/gpio.h | 6 + drivers/gpio/Kconfig | 10 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-malta-fpga-i2c.c | 186 + drivers/i2c/busses/i2c-gpio.c | 54 +- include/of_gpio.h | 55 ++ 10 files changed, 397 insertions(+), 31 deletions(-) create mode 100644 Documentation/devicetree/bindings/gpio/gpio_i2c.txt create mode 100644 arch/mips/include/asm/gpio.h create mode 100644 drivers/gpio/gpio-malta-fpga-i2c.c -- 1.9.2 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 1/7] gpio: add Malta CBUS FPGA I2C driver
This driver provides common support for accessing the CBUS FPGA I2C lines through the gpio library. Additional i2c bitbang driver must be enabled in order to use the functionality of the i2c controller. Signed-off-by: Antony Pavlov antonynpav...@gmail.com --- drivers/gpio/Kconfig | 10 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-malta-fpga-i2c.c | 186 + 3 files changed, 197 insertions(+) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 7302955..45b8c53 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -37,6 +37,16 @@ config GPIO_GENERIC_PLATFORM config GPIO_IMX def_bool ARCH_IMX +config GPIO_MALTA_FPGA_I2C + bool Malta CBUS FPGA I2C GPIO + depends on MACH_MIPS_MALTA + help + Support access to the CBUS FPGA I2C lines through the gpio library. + + This driver provides common support for accessing the device, + additional drivers must be enabled in order to use the + functionality of the device. + config GPIO_OMAP def_bool ARCH_OMAP diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile index 68a76a3..add6ffc 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile @@ -5,6 +5,7 @@ obj-$(CONFIG_GPIO_DAVINCI) += gpio-davinci.o obj-$(CONFIG_GPIO_CLPS711X)+= gpio-clps711x.o obj-$(CONFIG_GPIO_GENERIC) += gpio-generic.o obj-$(CONFIG_GPIO_IMX) += gpio-imx.o +obj-$(CONFIG_GPIO_MALTA_FPGA_I2C) += gpio-malta-fpga-i2c.o obj-$(CONFIG_GPIO_ORION) += gpio-orion.o obj-$(CONFIG_GPIO_OMAP)+= gpio-omap.o obj-$(CONFIG_GPIO_PL061) += gpio-pl061.o diff --git a/drivers/gpio/gpio-malta-fpga-i2c.c b/drivers/gpio/gpio-malta-fpga-i2c.c new file mode 100644 index 000..d6995aa --- /dev/null +++ b/drivers/gpio/gpio-malta-fpga-i2c.c @@ -0,0 +1,186 @@ +/* + * Copyright (C) 2014 Antony Pavlov antonynpav...@gmail.com + * + * This file is part of barebox. + * See file CREDITS for list of people who contributed to this project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include common.h +#include init.h +#include io.h +#include gpio.h +#include linux/err.h +#include malloc.h + +struct malta_i2c_gpio { + void __iomem *base; + struct gpio_chip chip; +}; + +#define MALTA_I2CINP 0 +#define MALTA_I2COE 0x8 +#define MALTA_I2COUT 0x10 +#define MALTA_I2CSEL 0x18 + +static inline struct malta_i2c_gpio *chip_to_malta_i2c_gpio(struct gpio_chip *c) +{ + return container_of(c, struct malta_i2c_gpio, chip); +} + +static inline void malta_i2c_gpio_write(struct malta_i2c_gpio *sc, + u32 v, int reg) +{ + __raw_writel(v, sc-base + reg); +} + +static inline u32 malta_i2c_gpio_read(struct malta_i2c_gpio *sc, int reg) +{ + return __raw_readl(sc-base + reg); +} + +static inline int malta_i2c_gpio_get_bit(struct malta_i2c_gpio *sc, + int reg, int bit) +{ + return !!(malta_i2c_gpio_read(sc, reg) BIT(bit)); +} + +static inline void malta_i2c_gpio_set_bit(struct malta_i2c_gpio *sc, + int reg, int bit, int v) +{ + u32 t; + + t = malta_i2c_gpio_read(sc, reg); + if (v) + t |= BIT(bit); + else + t = ~BIT(bit); + + malta_i2c_gpio_write(sc, t, reg); +} + +static int malta_i2c_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) +{ + struct malta_i2c_gpio *sc = chip_to_malta_i2c_gpio(chip); + + malta_i2c_gpio_set_bit(sc, MALTA_I2COE, gpio, 0); + + return 0; +} + +static int malta_i2c_gpio_direction_output(struct gpio_chip *chip, + unsigned gpio, int v) +{ + struct malta_i2c_gpio *sc = chip_to_malta_i2c_gpio(chip); + + malta_i2c_gpio_set_bit(sc, MALTA_I2COUT, gpio, v); + malta_i2c_gpio_set_bit(sc, MALTA_I2COE, gpio, 1); + + return 0; +} + +static int malta_i2c_gpio_get_direction(struct gpio_chip *chip, unsigned gpio) +{ + struct malta_i2c_gpio *sc = chip_to_malta_i2c_gpio(chip); + + if (malta_i2c_gpio_get_bit(sc, MALTA_I2COE, gpio)) + return GPIOF_DIR_OUT; + + return GPIOF_DIR_IN; +} + +static int malta_i2c_gpio_get_value(struct gpio_chip *chip, unsigned gpio) +{ + struct malta_i2c_gpio *sc = chip_to_malta_i2c_gpio(chip); + int v; + + v = malta_i2c_gpio_get_bit(sc, MALTA_I2CINP, gpio); + +
[PATCH 2/7] MIPS: add asm/gpio.h header file
Signed-off-by: Antony Pavlov antonynpav...@gmail.com --- arch/mips/include/asm/gpio.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/mips/include/asm/gpio.h b/arch/mips/include/asm/gpio.h new file mode 100644 index 000..41a9589 --- /dev/null +++ b/arch/mips/include/asm/gpio.h @@ -0,0 +1,6 @@ +#ifndef _ARCH_MIPS_GPIO_H +#define _ARCH_MIPS_GPIO_H + +#include asm-generic/gpio.h + +#endif /* _ARCH_MIPS_GPIO_H */ -- 1.9.2 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 7/7] MIPS: qemu-malta_defconfig: enable gpio i2c stuff
Signed-off-by: Antony Pavlov antonynpav...@gmail.com --- arch/mips/configs/qemu-malta_defconfig | 60 ++ 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/arch/mips/configs/qemu-malta_defconfig b/arch/mips/configs/qemu-malta_defconfig index ba5fa96..78f175d 100644 --- a/arch/mips/configs/qemu-malta_defconfig +++ b/arch/mips/configs/qemu-malta_defconfig @@ -4,9 +4,7 @@ CONFIG_PBL_IMAGE=y CONFIG_STACK_SIZE=0x7000 CONFIG_BROKEN=y CONFIG_EXPERIMENTAL=y -CONFIG_LONGHELP=y CONFIG_HUSH_FANCY_PROMPT=y -CONFIG_CMD_GETOPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_MENU=y @@ -14,54 +12,60 @@ CONFIG_PARTITION=y # CONFIG_DEFAULT_ENVIRONMENT is not set CONFIG_POLLER=y CONFIG_DEBUG_INFO=y -CONFIG_CMD_EDIT=y -CONFIG_CMD_SLEEP=y -CONFIG_CMD_SAVEENV=y -CONFIG_CMD_LOADENV=y +CONFIG_LONGHELP=y +CONFIG_CMD_IOMEM=y +CONFIG_CMD_MEMINFO=y +CONFIG_CMD_BOOTM_SHOW_TYPE=y +CONFIG_CMD_GO=y +CONFIG_CMD_LOADB=y +CONFIG_CMD_LOADY=y +CONFIG_CMD_RESET=y +CONFIG_CMD_PARTITION=y CONFIG_CMD_EXPORT=y +CONFIG_CMD_LOADENV=y CONFIG_CMD_PRINTENV=y -CONFIG_CMD_READLINE=y +CONFIG_CMD_SAVEENV=y +CONFIG_CMD_MD5SUM=y +CONFIG_CMD_SHA1SUM=y +CONFIG_CMD_SHA256SUM=y +CONFIG_CMD_UNCOMPRESS=y +CONFIG_CMD_GETOPT=y +CONFIG_CMD_SLEEP=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_PING=y +CONFIG_CMD_TFTP=y +CONFIG_CMD_ECHO_E=y +CONFIG_CMD_EDIT=y CONFIG_CMD_MENU=y CONFIG_CMD_MENU_MANAGEMENT=y CONFIG_CMD_PASSWD=y -CONFIG_CMD_TIME=y -CONFIG_CMD_TFTP=y -CONFIG_CMD_ECHO_E=y -CONFIG_CMD_LOADB=y -CONFIG_CMD_LOADY=y -CONFIG_CMD_MEMINFO=y -CONFIG_CMD_IOMEM=y +CONFIG_CMD_READLINE=y +CONFIG_CMD_TIMEOUT=y CONFIG_CMD_CRC=y CONFIG_CMD_CRC_CMP=y -CONFIG_CMD_MD5SUM=y -CONFIG_CMD_SHA1SUM=y -CONFIG_CMD_SHA256SUM=y CONFIG_CMD_FLASH=y -CONFIG_CMD_BOOTM_SHOW_TYPE=y -CONFIG_CMD_RESET=y -CONFIG_CMD_GO=y -CONFIG_CMD_OFTREE=y -CONFIG_CMD_OF_PROPERTY=y +CONFIG_CMD_GPIO=y +CONFIG_CMD_I2C=y CONFIG_CMD_OF_NODE=y -CONFIG_CMD_MTEST=y -CONFIG_CMD_TIMEOUT=y -CONFIG_CMD_PARTITION=y -CONFIG_CMD_UNCOMPRESS=y +CONFIG_CMD_OF_PROPERTY=y +CONFIG_CMD_OFTREE=y +CONFIG_CMD_TIME=y CONFIG_NET=y -CONFIG_CMD_DHCP=y CONFIG_NET_NFS=y -CONFIG_CMD_PING=y CONFIG_NET_NETCONSOLE=y CONFIG_NET_RESOLV=y CONFIG_OFDEVICE=y CONFIG_OF_BAREBOX_DRIVERS=y # CONFIG_SPI is not set +CONFIG_I2C=y +CONFIG_I2C_GPIO=y CONFIG_MTD=y CONFIG_DRIVER_CFI=y # CONFIG_DRIVER_CFI_AMD is not set # CONFIG_DRIVER_CFI_BANK_WIDTH_1 is not set # CONFIG_DRIVER_CFI_BANK_WIDTH_2 is not set CONFIG_CFI_BUFFER_WRITE=y +CONFIG_GPIO_MALTA_FPGA_I2C=y CONFIG_FS_CRAMFS=y CONFIG_FS_TFTP=y CONFIG_FS_FAT=y -- 1.9.2 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox