ARM: versatile: switch to devicetree support
Subsystems (5)
cover ARM: versatile: switch to devicetree support
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
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
Signature · 7 lines
1.9.2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 1/4 ARM: versatile: drop redundant <mach/gpio.h>
The arch/arm/include/asm/gpio.h header file contains
#ifndef CONFIG_GPIOLIB #include <mach/gpio.h> #else #include <asm-generic/gpio.h> #endif
We use CONFIG_GPIOLIB=y for the only mach-versatile Versatile/PB board so there is no need of <mach/gpio.h>.
--- arch/arm/mach-versatile/include/mach/gpio.h | 1 - 1 file changed, 1 deletion(-)
arch/arm/mach-versatile/include/mach/gpio.h deleted +0 -1
@@ -1 +0,0 @@ -#include <asm-generic/gpio.h>
Signature · 7 lines
1.9.2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/4 i2c: versatile: add devicetree support
In reply to Antony Pavlov--- drivers/i2c/busses/i2c-versatile.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/i2c/busses/i2c-versatile.c +7 -0
@@ -84,6 +84,7 @@ static int i2c_versatile_probe(struct device_d *dev) i2c->adap.algo_data = &i2c->algo; i2c->adap.dev.parent = dev; + i2c->adap.dev.device_node = dev->device_node; i2c->algo = i2c_versatile_algo; i2c->algo.data = i2c;
@@ -99,8 +100,14 @@ static int i2c_versatile_probe(struct device_d *dev)return ret; } +static struct of_device_id i2c_versatile_match[] = { + { .compatible ="arm,versatile-i2c" , }, + {}, +}; +static struct driver_d i2c_versatile_driver = { .name ="versatile-i2c" , .probe = i2c_versatile_probe, + .of_compatible =DRV_OF_COMPAT (i2c_versatile_match), };device_platform_driver (i2c_versatile_driver);
Signature · 7 lines
1.9.2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 3/4 ARM: versatile: switch to devicetree support
In reply to Antony Pavlov--- arch/arm/boards/versatile/versatilepb.c | 10 ---------- arch/arm/dts/versatile-pb.dts | 10 ++++++++++ arch/arm/mach-versatile/core.c | 11 ----------- arch/arm/mach-versatile/include/mach/init.h | 2 -- 4 files changed, 10 insertions(+), 23 deletions(-)
arch/arm/boards/versatile/versatilepb.c +0 -10
@@ -32,7 +32,6 @@static int vpb_console_init (void ) { -barebox_set_model ("ARM Versatile/PB (ARM926EJ-S)" );barebox_set_hostname ("versatilepb" );versatile_register_uart (0 );
@@ -40,14 +39,6 @@ static int vpb_console_init(void) }console_initcall (vpb_console_init); -static int vpb_mem_init (void ) -{ -versatile_add_sdram (64 *1024 *1024 ); - -return 0 ; -} -mem_initcall (vpb_mem_init); -static struct smc91c111_pdata net_pdata = { .qemu_fixup =1 , };
@@ -55,7 +46,6 @@ static struct smc91c111_pdata net_pdata = {static int vpb_devices_init (void ) {add_cfi_flash_device (DEVICE_ID_DYNAMIC ,VERSATILE_FLASH_BASE ,VERSATILE_FLASH_SIZE ,0 ); -versatile_register_i2c ();devfs_add_partition ("nor0" ,0x00000 ,0x40000 ,DEVFS_PARTITION_FIXED ,"self" );devfs_add_partition ("nor0" ,0x40000 ,0x20000 ,DEVFS_PARTITION_FIXED ,"env0" );
arch/arm/dts/versatile-pb.dts new file +10 -0
@@ -0,0 +1,10 @@ +#include <arm/versatile-ab.dts> + +/ { + model = "ARM Versatile PB"; + compatible = "arm,versatile-pb"; + + memory { + reg = <0x0 0x04000000>; + }; +};
arch/arm/mach-versatile/core.c +0 -11
@@ -40,11 +40,6 @@#include <mach/platform.h> #include <mach/init.h> -void versatile_add_sdram (u32 size) -{ -arm_add_mem_device ("ram0" ,0x00000000 , size); -} -struct clk {unsigned long rate; };
@@ -183,12 +178,6 @@ void versatile_register_uart(unsigned id)amba_apb_device_add (NULL ,"uart-pl011" , id, start,4096 ,NULL ,0 ); } -void versatile_register_i2c (void ) -{ -add_generic_device ("versatile-i2c" ,DEVICE_ID_DYNAMIC ,NULL , -VERSATILE_I2C_BASE ,SZ_4K ,IORESOURCE_MEM ,NULL ); -} -void __noreturn reset_cpu (unsigned long ignored) {u32 val;
arch/arm/mach-versatile/include/mach/init.h +0 -2
@@ -2,8 +2,6 @@#ifndef __VERSATILE_INIT_H__#define __VERSATILE_INIT_H__ -void versatile_add_sdram (u32 size);void versatile_register_uart (unsigned id); -void versatile_register_i2c (void );#endif
Signature · 7 lines
1.9.2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 4/4 ARM: versatilepb_defconfig: enable devicetree support
In reply to Antony Pavlov--- arch/arm/configs/versatilepb_defconfig | 50 ++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 23 deletions(-)
arch/arm/configs/versatilepb_defconfig +27 -23
@@ -1,7 +1,8 @@ +CONFIG_BUILTIN_DTB=y +CONFIG_BUILTIN_DTB_NAME="versatile-pb" CONFIG_ARCH_VERSATILE=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y CONFIG_PROMPT="versatilepb> " -CONFIG_LONGHELP=y CONFIG_GLOB=y CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y
@@ -10,44 +11,47 @@ CONFIG_MENU=y CONFIG_PARTITION=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/versatile/env" -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_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_UNCOMPRESS=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_ECHO_E=y -CONFIG_CMD_LOADB=y -CONFIG_CMD_MEMINFO=y -CONFIG_CMD_MTEST=y -CONFIG_CMD_MTEST_ALTERNATIVE=y -CONFIG_CMD_BOOTM_ZLIB=y -CONFIG_CMD_BOOTM_BZLIB=y -CONFIG_CMD_BOOTM_SHOW_TYPE=y -CONFIG_CMD_RESET=y -CONFIG_CMD_GO=y +CONFIG_CMD_READLINE=y CONFIG_CMD_TIMEOUT=y -CONFIG_CMD_PARTITION=y CONFIG_CMD_GPIO=y -CONFIG_CMD_UNCOMPRESS=y CONFIG_CMD_I2C=y +CONFIG_CMD_OF_NODE=y +CONFIG_CMD_OF_PROPERTY=y +CONFIG_CMD_OFTREE=y CONFIG_NET=y -CONFIG_CMD_DHCP=y CONFIG_NET_NFS=y -CONFIG_CMD_PING=y -CONFIG_CMD_TFTP=y -CONFIG_FS_TFTP=y CONFIG_NET_NETCONSOLE=y CONFIG_NET_RESOLV=y +CONFIG_OFDEVICE=y +CONFIG_OF_BAREBOX_DRIVERS=y CONFIG_SERIAL_AMBA_PL011=y CONFIG_DRIVER_NET_SMC91111=y -CONFIG_GPIO_PL061=y CONFIG_I2C=y CONFIG_I2C_VERSATILE=y +CONFIG_GPIO_PL061=y CONFIG_FS_CRAMFS=y +CONFIG_FS_TFTP=y CONFIG_SHA1=y CONFIG_SHA256=y
Signature · 7 lines
1.9.2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedQuoted 5 lines · Antony Pavlov
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
Quoted 21 lines
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.hSignature · 7 lines
1.9.2 _______________________________________________ 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