archosg9: add support for tablet, third round
Subsystems (8)
cover archosg9: add support for tablet, third round
Hello,
here is the third round of patches including most of the modifications suggested by your comments, which are greatly appreciated. one of the modifications not done is the move of the usb-booting infrastructure into a driver. Jean, can you please add more information about this? Thanks.
scripts/checkpatch.pl returns two errors: "Macros with complex values should be enclosed in parenthesis", but in this case parenthesis can't be added, any suggestion?
This new round of patches applies against 026e6aeb8206accdbef88408ae8c6c8bffcdc212 which includes a lots of changes.
The change 29e4031b460d1c84c1a8fc276199d40680b354d4 "ARM OMAP: switch to gpiolib support" breaks support for the tablet and it's reverted here only to make this patch-list feature-complete. Can somebody check if gpiolib works for other OMAP4460-based boards?
About the default serial speed: it's set to 1Mbaud to match the rate of the factory bootloader, this way we can see all the messages printed. Before it was set to 57600 because it was the highest speed that worked with linux because of serial port auto-suspend. It was nothing to do with barebox.
The patch-list adds a regression fix added at faf7b7af6e51a33b88453821d792c89a84f72b1d "ARM: give boards control of the reset entry point"
Regards,
Vicente.
vj (11):
regression: reset can not return
twl6030: add debug info
omap4: add/rename definitions to match datasheet
ARM: ensure irqs are disabled
omap: revert gpiolib
omap4: add support for booting an omap4 from usb.
omap4: add serial communications over usb boot
omap4: add filesystem support over usb boot
omap4: add support for loading second stage from usb
mach-types: add ID for Archos G9 tablet
Add support for Archos G9 tablet
Documentation/oamp4_usb_booting.txt | 27 ++ arch/arm/Kconfig | 1 - arch/arm/Makefile | 1 + arch/arm/boards/archosg9/Makefile | 3 + arch/arm/boards/archosg9/board.c | 65 ++++ arch/arm/boards/archosg9/config.h | 1 + arch/arm/boards/archosg9/env/config | 3 + arch/arm/boards/archosg9/env/init/usbboot | 4 + arch/arm/boards/archosg9/lowlevel.c | 79 ++++ arch/arm/boards/archosg9/mux.c | 459 ++++++++++++++++++++++++ arch/arm/boards/archosg9/mux.h | 6 + arch/arm/boards/friendlyarm-tiny210/lowlevel.c | 2 +- arch/arm/boards/panda/lowlevel.c | 2 +- arch/arm/boards/panda/mux.c | 52 +-- arch/arm/boards/pcm049/lowlevel.c | 2 +- arch/arm/boards/pcm049/mux.c | 44 +-- arch/arm/boards/phycard-a-xl2/lowlevel.c | 2 +- arch/arm/boards/phycard-a-xl2/mux.c | 46 +-- arch/arm/configs/archosg9_defconfig | 70 ++++ arch/arm/configs/archosg9_xload_defconfig | 24 ++ arch/arm/cpu/cpu.c | 6 + arch/arm/mach-omap/Kconfig | 18 + arch/arm/mach-omap/Makefile | 1 + arch/arm/mach-omap/gpio.c | 170 +++++---- arch/arm/mach-omap/include/mach/omap4-mux.h | 80 +++-- arch/arm/mach-omap/include/mach/omap4-silicon.h | 13 + arch/arm/mach-omap/include/mach/omap4_rom_usb.h | 142 ++++++++ arch/arm/mach-omap/include/mach/xload.h | 1 + arch/arm/mach-omap/omap3_generic.c | 19 - arch/arm/mach-omap/omap4_generic.c | 38 +- arch/arm/mach-omap/omap4_rom_usb.c | 186 ++++++++++ arch/arm/mach-omap/xload.c | 26 ++ arch/arm/tools/mach-types | 1 + drivers/mfd/twl6030.c | 20 ++ drivers/serial/Kconfig | 7 + drivers/serial/Makefile | 1 + drivers/serial/serial_omap4_usbboot.c | 83 +++++ fs/Kconfig | 5 + fs/Makefile | 1 + fs/omap4_usbbootfs.c | 219 +++++++++++ include/mfd/twl6030.h | 8 + scripts/.gitignore | 1 + scripts/Makefile | 4 + scripts/omap4_usbboot.c | 412 +++++++++++++++++++++ scripts/usb.h | 61 ++++ scripts/usb_linux.c | 397 ++++++++++++++++++++ 46 files changed, 2594 insertions(+), 219 deletions(-) create mode 100644 Documentation/oamp4_usb_booting.txt create mode 100644 arch/arm/boards/archosg9/Makefile create mode 100644 arch/arm/boards/archosg9/board.c create mode 100644 arch/arm/boards/archosg9/config.h create mode 100644 arch/arm/boards/archosg9/env/config create mode 100644 arch/arm/boards/archosg9/env/init/usbboot create mode 100644 arch/arm/boards/archosg9/lowlevel.c create mode 100644 arch/arm/boards/archosg9/mux.c create mode 100644 arch/arm/boards/archosg9/mux.h create mode 100644 arch/arm/configs/archosg9_defconfig create mode 100644 arch/arm/configs/archosg9_xload_defconfig create mode 100644 arch/arm/mach-omap/include/mach/omap4_rom_usb.h create mode 100644 arch/arm/mach-omap/omap4_rom_usb.c create mode 100644 drivers/serial/serial_omap4_usbboot.c create mode 100644 fs/omap4_usbbootfs.c create mode 100644 scripts/omap4_usbboot.c create mode 100644 scripts/usb.h create mode 100644 scripts/usb_linux.c
Signature · 7 lines
1.7.12.2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 1/11 regression: reset can not return
--- arch/arm/boards/friendlyarm-tiny210/lowlevel.c | 2 +- arch/arm/boards/panda/lowlevel.c | 2 +- arch/arm/boards/pcm049/lowlevel.c | 2 +- arch/arm/boards/phycard-a-xl2/lowlevel.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/boards/friendlyarm-tiny210/lowlevel.c +1 -1
@@ -61,7 +61,7 @@ void __bare_init reset(void)#endif if (get_pc () <0xD0000000 )/* Are we running from iRAM? */ -return ;/* No, we don't. */ +board_init_lowlevel_return ();/* No, we don't. */ s5p_init_dram_bank_ddr2 (S5P_DMC0_BASE ,0x20E00323 ,0 ,0 );
arch/arm/boards/panda/lowlevel.c +1 -1
@@ -81,7 +81,7 @@ void reset(void)common_reset ();if (get_pc () >0x80000000 ) -return ; +board_init_lowlevel_return (); r =0x4030d000 ; __asm__ __volatile__("mov sp, %0" : :"r" (r));
arch/arm/boards/pcm049/lowlevel.c +1 -1
@@ -91,7 +91,7 @@ void reset(void)common_reset ();if (get_pc () >0x80000000 ) -return ; +board_init_lowlevel_return (); r =0x4030d000 ; __asm__ __volatile__("mov sp, %0" : :"r" (r));
arch/arm/boards/phycard-a-xl2/lowlevel.c +1 -1
@@ -91,7 +91,7 @@ void reset(void)common_reset ();if (get_pc () >0x80000000 ) -return ; +board_init_lowlevel_return (); r =0x4030d000 ; __asm__ __volatile__("mov sp, %0" : :"r" (r));
Signature · 7 lines
1.7.12.2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/11 twl6030: add debug info
In reply to vj--- drivers/mfd/twl6030.c | 20 ++++++++++++++++++++ include/mfd/twl6030.h | 8 ++++++++ 2 files changed, 28 insertions(+)
drivers/mfd/twl6030.c +20 -0
@@ -39,6 +39,26 @@ static int twl_probe(struct device_d *dev)devfs_create (&(twl_dev->core.cdev)); +if (IS_ENABLED (DEBUG )) { +u8 i, jtag_rev, eprom_rev; +int r; +u64 dieid; + r =twl6030_reg_read (twl_dev,TWL6030_JTAG_JTAGVERNUM , + &jtag_rev); + r |=twl6030_reg_read (twl_dev,TWL6030_JTAG_EPROM_REV , + &eprom_rev); +for (i =0 ; i <8 ; i++) + r |=twl6030_reg_read (twl_dev,TWL6030_DIEID_0 +i, + ((u8 *)(&dieid))+i); +if (r) +dev_dbg (dev,"TWL6030 Error reading ID\n" ); +else +dev_dbg (dev,"TWL6030 JTAG REV: 0x%02X, " +"EPROM REV: 0x%02X, " +"DIE ID: 0x%016llX\n" , + (unsigned )jtag_rev, (unsigned )eprom_rev, dieid); + } +return 0 ; }
include/mfd/twl6030.h +8 -0
@@ -371,6 +371,14 @@ enum twl6030_reg {/* JTAG */ TWL6030_JTAG_JTAGVERNUM =0x0287 ,TWL6030_JTAG_EPROM_REV =0x02DF , +TWL6030_DIEID_0 =0x02C0 , +TWL6030_DIEID_1 =0x02C1 , +TWL6030_DIEID_2 =0x02C2 , +TWL6030_DIEID_3 =0x02C3 , +TWL6030_DIEID_4 =0x02C4 , +TWL6030_DIEID_5 =0x02C5 , +TWL6030_DIEID_6 =0x02C6 , +TWL6030_DIEID_7 =0x02C7 ,/* GPADC Trimming */ TWL6030_GPADC_TRIM1 =0x02CD , TWL6030_GPADC_TRIM2 = 0x02CE,
Signature · 7 lines
1.7.12.2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 4/11 ARM: ensure irqs are disabled
In reply to vj--- arch/arm/cpu/cpu.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/cpu/cpu.c +6 -0
@@ -85,6 +85,12 @@ void arch_shutdown(void) : "r0", "r1", "r2", "r3", "r6", "r10", "r12", "lr", "cc", "memory" );#endif +/* +* barebox normally does not use interrupts, but some functionalities +* (eg. OMAP4_USBBOOT) require them enabled. So be sure interrupts are +* disabled before exiting. +*/ + __asm__ __volatile__ ("cpsid i\n" ); }#ifdef CONFIG_THUMB2_BAREBOX
Signature · 7 lines
1.7.12.2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 3/11 omap4: add/rename definitions to match datasheet
In reply to vj--- arch/arm/boards/panda/mux.c | 52 ++++++++-------- arch/arm/boards/pcm049/mux.c | 44 +++++++------- arch/arm/boards/phycard-a-xl2/mux.c | 46 +++++++------- arch/arm/mach-omap/include/mach/omap4-mux.h | 80 ++++++++++++++++--------- arch/arm/mach-omap/include/mach/omap4-silicon.h | 13 ++++ arch/arm/mach-omap/include/mach/xload.h | 1 + arch/arm/mach-omap/omap4_generic.c | 2 + 7 files changed, 139 insertions(+), 99 deletions(-)
arch/arm/boards/panda/mux.c +26 -26
@@ -212,31 +212,31 @@ static const struct pad_conf_entry core_padconf_array[] = { };static const struct pad_conf_entry wkup_padconf_array[] = { - {PAD0_SIM_IO ,IEN |M0 /* sim_io */ }, - {PAD1_SIM_CLK ,M0 /* sim_clk */ }, - {PAD0_SIM_RESET ,M0 /* sim_reset */ }, - {PAD1_SIM_CD ,PTU |IEN |M0 /* sim_cd */ }, - {PAD0_SIM_PWRCTRL ,M0 /* sim_pwrctrl */ }, - {PAD1_SR_SCL ,PTU |IEN |M0 /* sr_scl */ }, - {PAD0_SR_SDA ,PTU |IEN |M0 /* sr_sda */ }, - {PAD1_FREF_XTAL_IN ,M0 /* # */ }, - {PAD0_FREF_SLICER_IN ,M0 /* fref_slicer_in */ }, - {PAD1_FREF_CLK_IOREQ ,M0 /* fref_clk_ioreq */ }, - {PAD0_FREF_CLK0_OUT ,M2 /* sys_drm_msecure */ }, - {PAD1_FREF_CLK3_REQ ,PTU |IEN |M0 /* # */ }, - {PAD0_FREF_CLK3_OUT ,M0 /* fref_clk3_out */ }, - {PAD1_FREF_CLK4_REQ ,PTU |IEN |M0 /* # */ }, - {PAD0_FREF_CLK4_OUT ,M0 /* # */ }, - {PAD1_SYS_32K ,IEN |M0 /* sys_32k */ }, - {PAD0_SYS_NRESPWRON ,M0 /* sys_nrespwron */ }, - {PAD1_SYS_NRESWARM ,M0 /* sys_nreswarm */ }, - {PAD0_SYS_PWR_REQ ,PTU |M0 /* sys_pwr_req */ }, - {PAD1_SYS_PWRON_RESET ,M3 /* gpio_wk29 */ }, - {PAD0_SYS_BOOT6 ,IEN |M3 /* gpio_wk9 */ }, - {PAD1_SYS_BOOT7 ,IEN |M3 /* gpio_wk10 */ }, - {PAD1_FREF_CLK3_REQ ,M3 /* gpio_wk30 */ }, - {PAD1_FREF_CLK4_REQ ,M3 /* gpio_wk7 */ }, - {PAD0_FREF_CLK4_OUT ,M3 /* gpio_wk8 */ }, + {GPIO_WK0 ,IEN |M0 /* sim_io */ }, + {GPIO_WK1 ,M0 /* sim_clk */ }, + {GPIO_WK2 ,M0 /* sim_reset */ }, + {GPIO_WK3 ,PTU |IEN |M0 /* sim_cd */ }, + {GPIO_WK4 ,M0 /* sim_pwrctrl */ }, + {SR_SCL ,PTU |IEN |M0 /* sr_scl */ }, + {SR_SDA ,PTU |IEN |M0 /* sr_sda */ }, + {FREF_XTAL_IN ,M0 /* # */ }, + {FREF_SLICER_IN ,M0 /* fref_slicer_in */ }, + {FREF_CLK_IOREQ ,M0 /* fref_clk_ioreq */ }, + {FREF_CLK0_OUT ,M2 /* sys_drm_msecure */ }, + {FREF_CLK3_REQ ,PTU |IEN |M0 /* # */ }, + {FREF_CLK3_OUT ,M0 /* fref_clk3_out */ }, + {FREF_CLK4_REQ ,PTU |IEN |M0 /* # */ }, + {FREF_CLK4_OUT ,M0 /* # */ }, + {SYS_32K ,IEN |M0 /* sys_32k */ }, + {SYS_NRESPWRON ,M0 /* sys_nrespwron */ }, + {SYS_NRESWARM ,M0 /* sys_nreswarm */ }, + {SYS_PWR_REQ ,PTU |M0 /* sys_pwr_req */ }, + {SYS_PWRON_RESET_OUT ,M3 /* gpio_wk29 */ }, + {SYS_BOOT6 ,IEN |M3 /* gpio_wk9 */ }, + {SYS_BOOT7 ,IEN |M3 /* gpio_wk10 */ }, + {FREF_CLK3_REQ ,M3 /* gpio_wk30 */ }, + {FREF_CLK4_REQ ,M3 /* gpio_wk7 */ }, + {FREF_CLK4_OUT ,M3 /* gpio_wk8 */ }, };void set_muxconf_regs (void )
@@ -249,7 +249,7 @@ void set_muxconf_regs(void)/* gpio_wk7 is used for controlling TPS on 4460 */ if (omap4_revision () >=OMAP4460_ES1_0 ) { -writew (M3 ,OMAP44XX_CONTROL_PADCONF_WKUP +PAD1_FREF_CLK4_REQ ); +writew (M3 ,OMAP44XX_CONTROL_PADCONF_WKUP +FREF_CLK4_REQ );/* Enable GPIO-1 clocks before TPS initialization */ omap4_enable_gpio1_wup_clocks (); }
arch/arm/boards/pcm049/mux.c +22 -22
50 lines not on this page · raw message
arch/arm/boards/phycard-a-xl2/mux.c +23 -23
58 lines not on this page · raw message
arch/arm/mach-omap/include/mach/omap4-mux.h +52 -28
129 lines not on this page · raw message
arch/arm/mach-omap/include/mach/omap4-silicon.h +13 -0
@@ -72,6 +72,12 @@#define OMAP44XX_UART2_BASE (OMAP44XX_L4_PER_BASE + 0x6c000)#define OMAP44XX_UART3_BASE (OMAP44XX_L4_PER_BASE + 0x20000) +/* I2C */ +#define OMAP44XX_I2C1_BASE (OMAP44XX_L4_PER_BASE + 0x070000) +#define OMAP44XX_I2C2_BASE (OMAP44XX_L4_PER_BASE + 0x072000) +#define OMAP44XX_I2C3_BASE (OMAP44XX_L4_PER_BASE + 0x060000) +#define OMAP44XX_I2C4_BASE (OMAP44XX_L4_PER_BASE + 0x350000) +/* General Purpose Timers */ #define OMAP44XX_GPT1_BASE (OMAP44XX_L4_WKUP_BASE + 0x18000)#define OMAP44XX_GPT2_BASE (OMAP44XX_L4_PER_BASE + 0x32000)
@@ -88,6 +94,13 @@/* 32KTIMER */ #define OMAP_32KTIMER_BASE (OMAP44XX_L4_WKUP_BASE + 0x4000) +/* MMC */ +#define OMAP44XX_MMC1_BASE (OMAP44XX_L4_PER_BASE + 0x09C100) +#define OMAP44XX_MMC2_BASE (OMAP44XX_L4_PER_BASE + 0x0B4100) +#define OMAP44XX_MMC3_BASE (OMAP44XX_L4_PER_BASE + 0x0AD100) +#define OMAP44XX_MMC4_BASE (OMAP44XX_L4_PER_BASE + 0x0D1100) +#define OMAP44XX_MMC5_BASE (OMAP44XX_L4_PER_BASE + 0x0D5100) +/* GPMC */ #define OMAP_GPMC_BASE 0x50000000
arch/arm/mach-omap/include/mach/xload.h +1 -0
@@ -6,6 +6,7 @@ enum omap_boot_src {OMAP_BOOTSRC_MMC1 ,OMAP_BOOTSRC_NAND ,OMAP_BOOTSRC_SPI1 , + OMAP_BOOTSRC_USB1, };enum omap_boot_src omap3_bootsrc (void );
arch/arm/mach-omap/omap4_generic.c +2 -0
@@ -481,6 +481,8 @@ enum omap_boot_src omap4_bootsrc(void)return OMAP_BOOTSRC_MMC1 ;if (bootsrc & (1 <<3 ))return OMAP_BOOTSRC_NAND ; +if (bootsrc & (1 <<20 )) +return OMAP_BOOTSRC_USB1 ;return OMAP_BOOTSRC_UNKNOWN ; }
Signature · 7 lines
1.7.12.2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 5/11 omap: revert gpiolib
In reply to vjThis patch reverts 29e4031b460d1c84c1a8fc276199d40680b354d4. This is not meant to revert the gpiolib, this is only a temporal workaround because it breaks support for ArchosG9 tablet. Please, can anybody check if using gpiolib works for other omap4460 based boards?
--- arch/arm/Kconfig | 1 - arch/arm/mach-omap/gpio.c | 170 ++++++++++++++++++++----------------- arch/arm/mach-omap/omap3_generic.c | 19 ----- arch/arm/mach-omap/omap4_generic.c | 19 ----- 4 files changed, 93 insertions(+), 116 deletions(-)
arch/arm/Kconfig +0 -1
@@ -60,7 +60,6 @@ config ARCH_NOMADIK config ARCH_OMAP bool "TI OMAP" select HAS_DEBUG_LL - select GPIOLIB config ARCH_PXA bool "Intel/Marvell PXA based"
arch/arm/mach-omap/gpio.c +93 -77
217 lines not on this page · raw message
arch/arm/mach-omap/omap3_generic.c +0 -19
@@ -511,22 +511,3 @@ const struct gpmc_config omap3_nand_cfg = { .base = 0x28000000, .size = GPMC_SIZE_16M, }; - -static int omap3_gpio_init (void ) -{ -add_generic_device ("omap-gpio" ,0 ,NULL ,0x48310000 , -0x100 ,IORESOURCE_MEM ,NULL ); -add_generic_device ("omap-gpio" ,1 ,NULL ,0x49050000 , -0x100 ,IORESOURCE_MEM ,NULL ); -add_generic_device ("omap-gpio" ,2 ,NULL ,0x49052000 , -0x100 ,IORESOURCE_MEM ,NULL ); -add_generic_device ("omap-gpio" ,3 ,NULL ,0x49054000 , -0x100 ,IORESOURCE_MEM ,NULL ); -add_generic_device ("omap-gpio" ,4 ,NULL ,0x49056000 , -0x100 ,IORESOURCE_MEM ,NULL ); -add_generic_device ("omap-gpio" ,5 ,NULL ,0x49058000 , -0x100 ,IORESOURCE_MEM ,NULL ); - -return 0 ; -} -coredevice_initcall (omap3_gpio_init);
arch/arm/mach-omap/omap4_generic.c +0 -19
@@ -574,22 +574,3 @@ const struct gpmc_config omap4_nand_cfg = { .base = 0x28000000, .size = GPMC_SIZE_16M, }; - -static int omap4_gpio_init (void ) -{ -add_generic_device ("omap-gpio" ,0 ,NULL ,0x4a310100 , -0x1000 ,IORESOURCE_MEM ,NULL ); -add_generic_device ("omap-gpio" ,1 ,NULL ,0x48055100 , -0x1000 ,IORESOURCE_MEM ,NULL ); -add_generic_device ("omap-gpio" ,2 ,NULL ,0x48057100 , -0x1000 ,IORESOURCE_MEM ,NULL ); -add_generic_device ("omap-gpio" ,3 ,NULL ,0x48059100 , -0x1000 ,IORESOURCE_MEM ,NULL ); -add_generic_device ("omap-gpio" ,4 ,NULL ,0x4805b100 , -0x1000 ,IORESOURCE_MEM ,NULL ); -add_generic_device ("omap-gpio" ,5 ,NULL ,0x4805d100 , -0x1000 ,IORESOURCE_MEM ,NULL ); - -return 0 ; -} -coredevice_initcall (omap4_gpio_init);
Signature · 7 lines
1.7.12.2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 7/11 omap4: add serial communications over usb boot
In reply to vj--- drivers/serial/Kconfig | 7 +++ drivers/serial/Makefile | 1 + drivers/serial/serial_omap4_usbboot.c | 83 +++++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+) create mode 100644 drivers/serial/serial_omap4_usbboot.c
drivers/serial/Kconfig +7 -0
@@ -100,4 +100,11 @@ config DRIVER_SERIAL_PXA bool "PXA serial driver" depends on ARCH_PXA +config DRIVER_SERIAL_OMAP4_USBBOOT + bool "serial driver over omap4 usb" + default n + depends on OMAP4_USBBOOT + help + Enable this to get console support over the usb bus used to boot an OMAP4 + endmenu
drivers/serial/Makefile +1 -0
@@ -19,3 +19,4 @@ obj-$(CONFIG_DRIVER_SERIAL_S3C) += serial_s3c.o obj-$(CONFIG_DRIVER_SERIAL_ALTERA) += serial_altera.o obj-$(CONFIG_DRIVER_SERIAL_ALTERA_JTAG) += serial_altera_jtag.o obj-$(CONFIG_DRIVER_SERIAL_PXA) += serial_pxa.o +obj-$(CONFIG_DRIVER_SERIAL_OMAP4_USBBOOT) += serial_omap4_usbboot.o
drivers/serial/serial_omap4_usbboot.c new file +83 -0
83 lines not on this page · raw message
Signature · 7 lines
1.7.12.2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 6/11 omap4: add support for booting an omap4 from usb.
In reply to vj--- Documentation/oamp4_usb_booting.txt | 27 ++ arch/arm/mach-omap/Kconfig | 9 + arch/arm/mach-omap/Makefile | 1 + arch/arm/mach-omap/include/mach/omap4_rom_usb.h | 142 ++++++++ arch/arm/mach-omap/omap4_generic.c | 17 + arch/arm/mach-omap/omap4_rom_usb.c | 186 +++++++++++ scripts/.gitignore | 1 + scripts/Makefile | 4 + scripts/omap4_usbboot.c | 412 ++++++++++++++++++++++++ scripts/usb.h | 61 ++++ scripts/usb_linux.c | 397 +++++++++++++++++++++++ 11 files changed, 1257 insertions(+) create mode 100644 Documentation/oamp4_usb_booting.txt create mode 100644 arch/arm/mach-omap/include/mach/omap4_rom_usb.h create mode 100644 arch/arm/mach-omap/omap4_rom_usb.c create mode 100644 scripts/omap4_usbboot.c create mode 100644 scripts/usb.h create mode 100644 scripts/usb_linux.c
Documentation/oamp4_usb_booting.txt new file +27 -0
@@ -0,0 +1,27 @@ +-------------- omap4_usb_booting -------------- + +omap4 processors have support for booting from the usb port. To be able to fully +use this feature you will need to enable the following: + OMAP4_USBBOOT + This CONFIG_ option adds the required infrastructure. + DRIVER_SERIAL_OMAP4_USBBOOT + This adds console support over the same usb port used for booting. + FS_OMAP4_USBBOOT + This adds filesystem support over the same usb port used for booting. + +To send the bootloader to the processor, execute the utility omap4_usbboot which +can be found in the scripts subdirectory. +omap4_usbboot takes two parameters: + the bootloader image + a directory name which will be the root for the guest system +Once omap4_usbboot is running it will wait for enumeration of the omap4 cpu on +the host usb subsystem. Then power on or reset the cpu with the correct sys_boot +or SAR memory configuration. + +If everything works, barebox's first stage will boot and afterwards it will load +the second stage found at "/barebox.bin". +Barebox's second stage will still have access to the usb filesystem, so an +initrd and a zImage can be loaded. + +Overall this procedure frees the developer of continously be changing the SD +card or other boot media from host to target.
arch/arm/mach-omap/Kconfig +9 -0
@@ -82,6 +82,15 @@ config ARCH_TEXT_BASE default 0x80e80000 if MACH_OMAP343xSDP default 0x80e80000 if MACH_BEAGLE +config OMAP4_USBBOOT + bool "enable booting from USB" + default n + depends on ARCH_OMAP4 && !MMU + help + Say Y here if you want to be able to boot an OMAP4 cpu from USB. + You need the utility program omap4_usbboot to boot from USB. + Please read oamp4_usb_booting.txt for more information. + config BOARDINFO default "Texas Instrument's SDP343x" if MACH_OMAP343xSDP default "Texas Instrument's Beagle" if MACH_BEAGLE
arch/arm/mach-omap/Makefile +1 -0
@@ -26,4 +26,5 @@ obj-$(CONFIG_OMAP3_CLOCK_CONFIG) += omap3_clock.o obj-$(CONFIG_OMAP_GPMC) += gpmc.o devices-gpmc-nand.o obj-$(CONFIG_SHELL_NONE) += xload.o obj-$(CONFIG_I2C_TWL6030) += omap4_twl6030_mmc.o +obj-$(CONFIG_OMAP4_USBBOOT) += omap4_rom_usb.o obj-y += gpio.o
arch/arm/mach-omap/include/mach/omap4_rom_usb.h new file +142 -0
142 lines not on this page · raw message
arch/arm/mach-omap/omap4_generic.c +17 -0
@@ -8,6 +8,7 @@#include <mach/xload.h> #include <mach/gpmc.h> #include <mach/gpio.h> +#include <mach/omap4_rom_usb.h> /* * The following several lines are taken from U-Boot to support
@@ -457,6 +458,21 @@ static int watchdog_init(void) }late_initcall (watchdog_init); +#ifdef CONFIG_OMAP4_USBBOOT +static int omap4_usbboot_init (void ) +{ +omap4_usbboot_open (); +omap4_usbboot_puts ("USB communications initialized\n" ); +return 0 ; +} +core_initcall (omap4_usbboot_init); +#else +/* +* omap4 usbboot interfaces with the omap4 ROM to reuse the USB port +* used for booting. +* The ROM code uses interrupts for the transfers, so do not modify the +* interrupt vectors. +*/ static int omap_vector_init (void ) { __asm__ __volatile__ (
@@ -470,6 +486,7 @@ static int omap_vector_init(void) return 0; }core_initcall (omap_vector_init); +#endif #define OMAP4_TRACING_VECTOR3 0x4030d048
arch/arm/mach-omap/omap4_rom_usb.c new file +186 -0
186 lines not on this page · raw message
scripts/.gitignore +1 -0
@@ -6,3 +6,4 @@ mk-am35xx-spi-image mkimage mkublheader omap_signGP +omap4_usbboot
scripts/Makefile +4 -0
@@ -13,6 +13,10 @@ hostprogs-$(CONFIG_ARCH_OMAP) += omap_signGP mk-am35xx-spi-image hostprogs-$(CONFIG_ARCH_S5PCxx) += s5p_cksum hostprogs-$(CONFIG_ARCH_DAVINCI) += mkublheader +HOSTLOADLIBES_omap4_usbboot = -lpthread +omap4_usbboot-objs := usb_linux.o omap4_usbboot.o +hostprogs-$(CONFIG_OMAP4_USBBOOT)+= omap4_usbboot + always := $(hostprogs-y) $(hostprogs-m) subdir-y += mod
scripts/omap4_usbboot.c new file +412 -0
412 lines not on this page · raw message
scripts/usb.h new file +61 -0
61 lines not on this page · raw message
scripts/usb_linux.c new file +397 -0
397 lines not on this page · raw message
Signature · 7 lines
1.7.12.2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 8/11 omap4: add filesystem support over usb boot
In reply to vj--- fs/Kconfig | 5 ++ fs/Makefile | 1 + fs/omap4_usbbootfs.c | 219 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 225 insertions(+) create mode 100644 fs/omap4_usbbootfs.c
fs/Kconfig +5 -0
@@ -29,6 +29,11 @@ config FS_TFTP prompt "tftp support" depends on NET +config FS_OMAP4_USBBOOT + bool + prompt "Filesystem over usb boot" + depends on OMAP4_USBBOOT + config FS_NFS depends on NET bool
fs/Makefile +1 -0
@@ -5,4 +5,5 @@ obj-$(CONFIG_FS_DEVFS) += devfs.o obj-$(CONFIG_FS_FAT) += fat/ obj-y += fs.o obj-$(CONFIG_FS_TFTP) += tftp.o +obj-$(CONFIG_FS_OMAP4_USBBOOT) += omap4_usbbootfs.o obj-$(CONFIG_FS_NFS) += nfs.o
fs/omap4_usbbootfs.c new file +219 -0
219 lines not on this page · raw message
Signature · 7 lines
1.7.12.2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 9/11 omap4: add support for loading second stage from usb
In reply to vj--- arch/arm/mach-omap/xload.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
arch/arm/mach-omap/xload.c +26 -0
@@ -139,6 +139,24 @@ static void *omap_xload_boot_spi(int offset)return to; } +static void *omap4_xload_boot_usb (void ){ +int ret; +void *buf; +int len; + + ret =mount ("omap4_usbboot" ,"omap4_usbbootfs" ,"/" ); +if (ret) { +printf ("Unable to mount omap4_usbbootfs (%d)\n" , ret); +return NULL ; + } + + buf =read_file ("/barebox.bin" , &len); +if (!buf) +printf ("could not read barebox.bin from omap4_usbbootfs\n" ); + +return buf; +} +enum omap_boot_src omap_bootsrc (void ) {#if defined(CONFIG_ARCH_OMAP3 )
@@ -161,6 +179,14 @@ int run_shell(void)printf ("booting from MMC1\n" ); func =omap_xload_boot_mmc ();break ; +case OMAP_BOOTSRC_USB1 : +if (IS_ENABLED (CONFIG_FS_OMAP4_USBBOOT )) { +printf ("booting from USB1\n" ); + func =omap4_xload_boot_usb (); +break ; + }else { +printf ("booting from usb1 not enabled\n" ); + }case OMAP_BOOTSRC_UNKNOWN :printf ("unknown boot source. Fall back to nand\n" );case OMAP_BOOTSRC_NAND :
Signature · 7 lines
1.7.12.2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 10/11 mach-types: add ID for Archos G9 tablet
In reply to vj--- arch/arm/tools/mach-types | 1 + 1 file changed, 1 insertion(+)
arch/arm/tools/mach-types +1 -0
@@ -4148,3 +4148,4 @@ msm8625_evt MACH_MSM8625_EVT MSM8625_EVT 4193 mx53_sellwood MACH_MX53_SELLWOOD MX53_SELLWOOD 4194 somiq_am35 MACH_SOMIQ_AM35 SOMIQ_AM35 4195 somiq_am37 MACH_SOMIQ_AM37 SOMIQ_AM37 4196 +omap4_archosg9 MACH_OMAP4_ARCHOSG9 OMAP4_ARCHOSG9 5032
Signature · 7 lines
1.7.12.2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 11/11 Add support for Archos G9 tablet
In reply to vj--- arch/arm/Makefile | 1 + arch/arm/boards/archosg9/Makefile | 3 + arch/arm/boards/archosg9/board.c | 65 +++++ arch/arm/boards/archosg9/config.h | 1 + arch/arm/boards/archosg9/env/config | 3 + arch/arm/boards/archosg9/env/init/usbboot | 4 + arch/arm/boards/archosg9/lowlevel.c | 79 +++++ arch/arm/boards/archosg9/mux.c | 459 ++++++++++++++++++++++++++++++ arch/arm/boards/archosg9/mux.h | 6 + arch/arm/configs/archosg9_defconfig | 70 +++++ arch/arm/configs/archosg9_xload_defconfig | 24 ++ arch/arm/mach-omap/Kconfig | 9 + 12 files changed, 724 insertions(+) create mode 100644 arch/arm/boards/archosg9/Makefile create mode 100644 arch/arm/boards/archosg9/board.c create mode 100644 arch/arm/boards/archosg9/config.h create mode 100644 arch/arm/boards/archosg9/env/config create mode 100644 arch/arm/boards/archosg9/env/init/usbboot create mode 100644 arch/arm/boards/archosg9/lowlevel.c create mode 100644 arch/arm/boards/archosg9/mux.c create mode 100644 arch/arm/boards/archosg9/mux.h create mode 100644 arch/arm/configs/archosg9_defconfig create mode 100644 arch/arm/configs/archosg9_xload_defconfig
arch/arm/Makefile +1 -0
@@ -101,6 +101,7 @@ board-$(CONFIG_MACH_OMAP343xSDP) := omap343xdsp board-$(CONFIG_MACH_BEAGLE) := beagle board-$(CONFIG_MACH_OMAP3EVM) := omap3evm board-$(CONFIG_MACH_PANDA) := panda +board-$(CONFIG_MACH_ARCHOSG9) := archosg9 board-$(CONFIG_MACH_PCM049) := pcm049 board-$(CONFIG_MACH_PCA100) := phycard-i.MX27 board-$(CONFIG_MACH_PCAAL1) := phycard-a-l1
arch/arm/boards/archosg9/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +obj-y += board.o +obj-$(CONFIG_MACH_DO_LOWLEVEL_INIT) += lowlevel.o mux.o +pbl-$(CONFIG_MACH_DO_LOWLEVEL_INIT) += lowlevel.o mux.o
arch/arm/boards/archosg9/board.c new file +65 -0
65 lines not on this page · raw message
arch/arm/boards/archosg9/config.h new file +1 -0
@@ -0,0 +1 @@ +/* nothing */
arch/arm/boards/archosg9/env/config new file +3 -0
@@ -0,0 +1,3 @@ +autoboot_timeout=2 +#global.linux.bootargs.base="earlyprintk=serial console=ttyO1,1000000n8 keep_bootcon pm_disable initcall_debug ignore_loglevel no_console_suspend=1" +global.linux.bootargs.base="earlyprintk=serial console=ttyO1,1000000n8 keep_bootcon pm_disable ignore_loglevel no_console_suspend=1 root=/dev/ram0 init=/linuxrc"
arch/arm/boards/archosg9/env/init/usbboot new file +4 -0
@@ -0,0 +1,4 @@ +. /env/config +mkdir /usb +mount -t omap4_usbbootfs omap4_usbboot /usb +bootm -r /usb/boot/initrd /usb/boot/zImage
arch/arm/boards/archosg9/lowlevel.c new file +79 -0
79 lines not on this page · raw message
arch/arm/boards/archosg9/mux.c new file +459 -0
459 lines not on this page · raw message
arch/arm/boards/archosg9/mux.h new file +6 -0
@@ -0,0 +1,6 @@ +#ifndef _MUX_H +#define _MUX_H + +void set_muxconf_regs (void ); + +#endif /* _MUX_H */
arch/arm/configs/archosg9_defconfig new file +70 -0
70 lines not on this page · raw message
arch/arm/configs/archosg9_xload_defconfig new file +24 -0
@@ -0,0 +1,24 @@ +CONFIG_MACH_ARCHOSG9=y +CONFIG_ARCH_OMAP=y +CONFIG_ARCH_OMAP4=y +# CONFIG_OMAP_GPMC is not set +CONFIG_OMAP_BUILD_IFT=y +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xC000 +CONFIG_AEABI=y +CONFIG_OMAP4_USBBOOT=y +# CONFIG_CMD_ARM_CPUINFO is not set +CONFIG_TEXT_BASE=0x40300000 +CONFIG_MEMORY_LAYOUT_FIXED=y +CONFIG_STACK_BASE=0x8f000000 +CONFIG_MALLOC_BASE=0x84000000 +CONFIG_MALLOC_SIZE=0x2000000 +CONFIG_SHELL_NONE=y +# CONFIG_ERRNO_MESSAGES is not set +# CONFIG_TIMESTAMP is not set +# CONFIG_CONSOLE_FULL is not set +# CONFIG_DEFAULT_ENVIRONMENT is not set +CONFIG_DRIVER_SERIAL_OMAP4_USBBOOT=y +# CONFIG_SPI is not set +# CONFIG_FS_RAMFS is not set +# CONFIG_FS_DEVFS is not set +CONFIG_FS_OMAP4_USBBOOT=y
arch/arm/mach-omap/Kconfig +9 -0
@@ -92,6 +92,7 @@ config OMAP4_USBBOOT Please read oamp4_usb_booting.txt for more information. config BOARDINFO + default "Archos G9" if MACH_ARCHOSG9 default "Texas Instrument's SDP343x" if MACH_OMAP343xSDP default "Texas Instrument's Beagle" if MACH_BEAGLE default "Texas Instrument's OMAP3EVM" if MACH_OMAP3EVM
@@ -131,6 +132,14 @@ config MACH_PANDA help Say Y here if you are using OMAP4 Panda board +config MACH_ARCHOSG9 + bool "Archos G9 tablets" + select HAVE_NOSHELL + select MACH_HAS_LOWLEVEL_INIT + depends on ARCH_OMAP4 + help + Say Y here if you are using OMAP4-based Archos G9 tablet + config MACH_PCM049 bool "Phytec phyCORE pcm049" select HAVE_NOSHELL
Signature · 7 lines
1.7.12.2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 02/11] twl6030: add debug info
In reply to vjQuoted 12 lines · vj
Signed-off-by vj <[email protected]>--- drivers/mfd/twl6030.c | 20 ++++++++++++++++++++ include/mfd/twl6030.h | 8 ++++++++ 2 files changed, 28 insertions(+)drivers/mfd/twl6030.c +0
-0
drivers/mfd/twl6030.c static int twl_probe(struct device_d *dev) · line 42
Quoted 4 lines
drivers/mfd/twl6030.c +1
-0@@ -39,6 +39,26 @@ static int twl_probe(struct device_d *dev)devfs_create (&(twl_dev->core.cdev)); +if (IS_ENABLED (DEBUG )) {
CONFIG_DEBUG instead?
drivers/mfd/twl6030.c static int twl_probe(struct device_d *dev) · line 45
Quoted 3 lines
drivers/mfd/twl6030.c +3
-0+u8 i, jtag_rev, eprom_rev; +int r; +u64 dieid;
add one empty line
Quoted 46 lines
drivers/mfd/twl6030.c +16
-0+ r =twl6030_reg_read (twl_dev,TWL6030_JTAG_JTAGVERNUM , + &jtag_rev); + r |=twl6030_reg_read (twl_dev,TWL6030_JTAG_EPROM_REV , + &eprom_rev); +for (i =0 ; i <8 ; i++) + r |=twl6030_reg_read (twl_dev,TWL6030_DIEID_0 +i, + ((u8 *)(&dieid))+i); +if (r) +dev_dbg (dev,"TWL6030 Error reading ID\n" ); +else +dev_dbg (dev,"TWL6030 JTAG REV: 0x%02X, " +"EPROM REV: 0x%02X, " +"DIE ID: 0x%016llX\n" , + (unsigned )jtag_rev, (unsigned )eprom_rev, dieid); + } +return 0 ; }include/mfd/twl6030.h +8
-0@@ -371,6 +371,14 @@ enum twl6030_reg {/* JTAG */ TWL6030_JTAG_JTAGVERNUM =0x0287 ,TWL6030_JTAG_EPROM_REV =0x02DF , +TWL6030_DIEID_0 =0x02C0 , +TWL6030_DIEID_1 =0x02C1 , +TWL6030_DIEID_2 =0x02C2 , +TWL6030_DIEID_3 =0x02C3 , +TWL6030_DIEID_4 =0x02C4 , +TWL6030_DIEID_5 =0x02C5 , +TWL6030_DIEID_6 =0x02C6 , +TWL6030_DIEID_7 =0x02C7 ,/* GPADC Trimming */ TWL6030_GPADC_TRIM1 =0x02CD , TWL6030_GPADC_TRIM2 = 0x02CE,Signature · 7 lines
1.7.12.2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedRe: [PATCH 01/11] regression: reset can not return
In reply to vjQuoted 2 lines · vj
Signed-off-by vj <[email protected]>
Applied to master.
Thanks
Sascha
Quoted 68 lines
--- arch/arm/boards/friendlyarm-tiny210/lowlevel.c | 2 +- arch/arm/boards/panda/lowlevel.c | 2 +- arch/arm/boards/pcm049/lowlevel.c | 2 +- arch/arm/boards/phycard-a-xl2/lowlevel.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)arch/arm/boards/friendlyarm-tiny210/lowlevel.c +1
-1@@ -61,7 +61,7 @@ void __bare_init reset(void)#endif if (get_pc () <0xD0000000 )/* Are we running from iRAM? */ -return ;/* No, we don't. */ +board_init_lowlevel_return ();/* No, we don't. */ s5p_init_dram_bank_ddr2 (S5P_DMC0_BASE ,0x20E00323 ,0 ,0 );arch/arm/boards/panda/lowlevel.c +1
-1@@ -81,7 +81,7 @@ void reset(void)common_reset ();if (get_pc () >0x80000000 ) -return ; +board_init_lowlevel_return (); r =0x4030d000 ; __asm__ __volatile__("mov sp, %0" : :"r" (r));arch/arm/boards/pcm049/lowlevel.c +1
-1@@ -91,7 +91,7 @@ void reset(void)common_reset ();if (get_pc () >0x80000000 ) -return ; +board_init_lowlevel_return (); r =0x4030d000 ; __asm__ __volatile__("mov sp, %0" : :"r" (r));arch/arm/boards/phycard-a-xl2/lowlevel.c +1
-1@@ -91,7 +91,7 @@ void reset(void)common_reset ();if (get_pc () >0x80000000 ) -return ; +board_init_lowlevel_return (); r =0x4030d000 ; __asm__ __volatile__("mov sp, %0" : :"r" (r));Signature · 7 lines
1.7.12.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
Re: [PATCH 04/11] ARM: ensure irqs are disabled
In reply to vjQuoted 11 lines · vj
Signed-off-by vj <[email protected]>--- arch/arm/cpu/cpu.c | 6 ++++++ 1 file changed, 6 insertions(+)arch/arm/cpu/cpu.c +0
-0
arch/arm/cpu/cpu.c void arch_shutdown(void) · line 93
Quoted 9 lines
arch/arm/cpu/cpu.c +6
-0@@ -85,6 +85,12 @@ void arch_shutdown(void) : "r0", "r1", "r2", "r3", "r6", "r10", "r12", "lr", "cc", "memory" );#endif +/* +* barebox normally does not use interrupts, but some functionalities +* (eg. OMAP4_USBBOOT) require them enabled. So be sure interrupts are +* disabled before exiting. +*/ + __asm__ __volatile__ ("cpsid i\n" );
This cannot be applied since on ARMv5 we have to do something different, see the disable_irq macro:
#if __LINUX_ARM_ARCH__ >= 6
.macro disable_irq
cpsid i
.endm
.macro enable_irq
cpsie i
.endm
#else
.macro disable_irq
msr cpsr_c, #PSR_I_BIT | SVC_MODE
.endm
.macro enable_irq
msr cpsr_c, #SVC_MODE
.endm
#endif
Note, for now it's ok to have this a compile time decision, but this should become a runtime decision over time.
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
Re: [PATCH 05/11] omap: revert gpiolib
In reply to vjQuoted 5 lines · vj
This patch reverts
29e4031b460d1c84c1a8fc276199d40680b354d4. This is not meant to revert the gpiolib, this is only a temporal workaround because it breaks support for ArchosG9 tablet. Please, can anybody check if using gpiolib works for other omap4460 based boards?
Teresa, have you tested this on OMAP4?
I can't find anything obviously wrong int this patch.
arch/arm/mach-omap/gpio.c line 136
Quoted 10 lines
arch/arm/mach-omap/gpio.c +1
-7-static int omap_gpio_probe (struct device_d *dev) -{ -struct omap_gpio_chip *omapgpio; +gpio_set_value (gpio, value); - omapgpio =xzalloc (sizeof (*omapgpio)); - omapgpio->base =dev_request_mem_region (dev,0 ); - omapgpio->chip.ops = &omap_gpio_ops; - omapgpio->chip.base =-1 ;
base should be calculated as dev->id * 32. Otherwise the gpio numbering gets depended on the probe order.
Quoted 13 lines
arch/arm/mach-omap/gpio.c +4
-5- omapgpio->chip.ngpio =32 ; - omapgpio->chip.dev = dev; -gpiochip_add (&omapgpio->chip); + reg +=OMAP_GPIO_OE ; -dev_dbg (dev,"probed gpiochip%d with base %d\n" , - dev->id, omapgpio->chip.base); + val =__raw_readl (reg); + val &= ~(1 <<get_gpio_index (gpio)); +__raw_writel (val, reg);return 0 ; }
[...]
Quoted 7 lines
arch/arm/mach-omap/omap3_generic.c +0
-1-coredevice_initcall (omap3_gpio_init);arch/arm/mach-omap/omap4_generic.c +0
-0
arch/arm/mach-omap/omap4_generic.c const struct gpmc_config omap4_nand_cfg = { · line 581
Quoted 8 lines
arch/arm/mach-omap/omap4_generic.c +0
-5@@ -574,22 +574,3 @@ const struct gpmc_config omap4_nand_cfg = { .base = 0x28000000, .size = GPMC_SIZE_16M, }; - -static int omap4_gpio_init (void ) -{ -add_generic_device ("omap-gpio" ,0 ,NULL ,0x4a310100 , -0x1000 ,IORESOURCE_MEM ,NULL );
It seems on OMAP4 the register addresses are at an additional 0x100 offset compared to OMAP3. This little trick here to compensate that will lead to problems should we add devicetree support for omap. For now it's ok, but the region size should be reduced to 0x0f00 so that there's no risk that it overlaps with the next region.
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
Re: [PATCH 06/11] omap4: add support for booting an omap4 from usb.
In reply to vjQuoted 2 lines · vj
Signed-off-by vj <[email protected]>
[...]
Quoted 6 lines
/*
* The following several lines are taken from U-Boot to supportarch/arm/mach-omap/omap4_generic.c +0
-0@@ -457,6 +458,21 @@ static int watchdog_init(void) }late_initcall (watchdog_init);
arch/arm/mach-omap/omap4_generic.c static int watchdog_init(void) · line 469
Quoted 10 lines
arch/arm/mach-omap/omap4_generic.c +9
-0+#ifdef CONFIG_OMAP4_USBBOOT +static int omap4_usbboot_init (void ) +{ +omap4_usbboot_open (); +omap4_usbboot_puts ("USB communications initialized\n" ); +return 0 ; +} +core_initcall (omap4_usbboot_init); +#else
I remember a hunk in a previous patch which detects whether we actually are booting from USB. We could protect the code above with a if (booting_from_usb) instead of deciding it at compile time.
arch/arm/mach-omap/omap4_generic.c static int watchdog_init(void) · line 477
Quoted 8 lines
arch/arm/mach-omap/omap4_generic.c +6
-0+/* +* omap4 usbboot interfaces with the omap4 ROM to reuse the USB port +* used for booting. +* The ROM code uses interrupts for the transfers, so do not modify the +* interrupt vectors. +*/ static int omap_vector_init (void ) {
same here.
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
Re: [PATCH 10/11] mach-types: add ID for Archos G9 tablet
In reply to vjQuoted 11 lines · vj
Signed-off-by vj <[email protected]>--- arch/arm/tools/mach-types | 1 + 1 file changed, 1 insertion(+)arch/arm/tools/mach-types +0
-0
arch/arm/tools/mach-types msm8625_evt MACH_MSM8625_EVT MSM8625_EVT 4193 · line 4151
Quoted 4 lines
arch/arm/tools/mach-types +1
-0@@ -4148,3 +4148,4 @@ msm8625_evt MACH_MSM8625_EVT MSM8625_EVT 4193 mx53_sellwood MACH_MX53_SELLWOOD MX53_SELLWOOD 4194 somiq_am35 MACH_SOMIQ_AM35 SOMIQ_AM35 4195 somiq_am37 MACH_SOMIQ_AM37 SOMIQ_AM37 4196 +omap4_archosg9 MACH_OMAP4_ARCHOSG9 OMAP4_ARCHOSG9 5032
Please no manual updates to this file, they will be overwritten once the next update from:
http://www.arm.linux.org.uk/developer/machines/download.php
comes in. I see that the Archos G9 does not have a machine id registered. You can register one yourself at:
http://www.arm.linux.org.uk/developer/machines/
btw is 5032 the id Archos uses or did you think it up yourself?
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
Hi vj,
Quoted 10 lines · vj
Hello,
here is the third round of patches including most of the modifications suggested by your comments, which are greatly appreciated. one of the modifications not done is the move of the usb-booting infrastructure into a driver. Jean, can you please add more information about this? Thanks.
scripts/checkpatch.plreturns two errors: "Macros with complex values should be enclosed in parenthesis", but in this case parenthesis can't be added, any suggestion?
Could you post the macros which give this error?
Overall apart from the little comments I made the series looks quite good now. Thanks, nice work ;)
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
Re: [PATCH 10/11] mach-types: add ID for Archos G9 tablet
In reply to Sascha HauerQuoted 34 lines · Sascha Hauer
arch/arm/tools/mach-types msm8625_evt MACH_MSM8625_EVT
Quoted 11 lines · vj
Signed-off-by vj <[email protected]>--- arch/arm/tools/mach-types | 1 + 1 file changed, 1 insertion(+)arch/arm/tools/mach-types +0
-0@@ -4148,3 +4148,4 @@ msm8625_evt MACH_MSM8625_EVT
MSM8625_EVT4193arch/arm/tools/mach-types msm8625_evt MACH_MSM8625_EVT · line 4148
Quoted 1 line
arch/arm/tools/mach-types +0
-0mx53_sellwood MACH_MX53_SELLWOOD MX53_SELLWOOD4194arch/arm/tools/mach-types msm8625_evt MACH_MSM8625_EVT · line 4149
Quoted 1 line
arch/arm/tools/mach-types +0
-0somiq_am35 MACH_SOMIQ_AM35 SOMIQ_AM354195
arch/arm/tools/mach-types msm8625_evt MACH_MSM8625_EVT · line 4150
Quoted 1 line
arch/arm/tools/mach-types +0
-0somiq_am37 MACH_SOMIQ_AM37 SOMIQ_AM374196
arch/arm/tools/mach-types msm8625_evt MACH_MSM8625_EVT · line 4151
Quoted 1 line
arch/arm/tools/mach-types +1
-0+omap4_archosg9 MACH_OMAP4_ARCHOSG9 OMAP4_ARCHOSG95032Please no manual updates to this file, they will be overwritten once the next update from:
http://www.arm.linux.org.uk/developer/machines/download.php
comes in. I see that the Archos G9 does not have a machine id registered. You can register one yourself at:
http://www.arm.linux.org.uk/developer/machines/
btw is 5032 the id Archos uses or did you think it up yourself?
Quoted 8 lines
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-5555 |
5032 is chosen by Archos in it's Android kernel:
http://gitorious.org/archos/archos-gpl-gen9-kernel-ics/blobs/master/arch/arm/tools/mach-types
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Quoted 20 lines · Sascha Hauer
Hi vj,
Quoted 10 lines · vj
Hello,
here is the third round of patches including most of the modifications suggested by your comments, which are greatly appreciated. one of the modifications not done is the move of the usb-booting infrastructure into a driver. Jean, can you please add more information about this? Thanks.
scripts/checkpatch.plreturns two errors: "Macros with complex values should be enclosed in parenthesis", but in this case parenthesis can't be added, any suggestion?Could you post the macros which give this error?
Overall apart from the little comments I made the series looks quite good now. Thanks, nice work ;)
Quoted 7 lines
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-5555 |
The macros are:
#define TARGET_FORMAT 0x1B, BRIGHT, RED+30, BLACK+40
#define HOST_FORMAT 0x1B, RESET, WHITE+30, BLACK+40
which are used in this way:
#define FORMAT "%c[%d;%d;%dm"
#define host_print(fmt, arg...) printf(FORMAT fmt FORMAT"\n",HOST_FORMAT, ##arg, TARGET_FORMAT)printf(FORMAT, TARGET_FORMAT);
The reason is that scripts/omap4_usbboot has to print two types of messages, the ones comming from the OMAP4 and the ones coming from the PC. This is the way chosen to differentiate them.
Regards,
Vicente.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 10/11] mach-types: add ID for Archos G9 tablet
In reply to vjQuoted 23 lines · vj
Quoted 12 lines · Sascha Hauer
Please no manual updates to this file, they will be overwritten once the next update from:
http://www.arm.linux.org.uk/developer/machines/download.php
comes in. I see that the Archos G9 does not have a machine id registered. You can register one yourself at:
http://www.arm.linux.org.uk/developer/machines/
btw is 5032 the id Archos uses or did you think it up yourself?
Quoted 8 lines
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-5555 |
Quoted 2 lines
5032 is chosen by Archos in it's Android kernel:
http://gitorious.org/archos/archos-gpl-gen9-kernel-ics/blobs/master/arch/arm/tools/mach-types
Appearently the Archos guys can't read :(
In this case I suggest that you just hardcode this number in your board file and add a big fat warning comment that you only did that to make the Archos kernel bootable.
Another, maybe better solution would be to:
- register a proper id for the G9
- use it as default in barebox
- Add some template in the environment to overwrite it to make the Archos provided Kernel boot.
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
Quoted 40 lines · vj
Quoted 20 lines · Sascha Hauer
Hi vj,
Quoted 10 lines · vj
Hello,
here is the third round of patches including most of the modifications suggested by your comments, which are greatly appreciated. one of the modifications not done is the move of the usb-booting infrastructure into a driver. Jean, can you please add more information about this? Thanks.
scripts/checkpatch.plreturns two errors: "Macros with complex values should be enclosed in parenthesis", but in this case parenthesis can't be added, any suggestion?Could you post the macros which give this error?
Overall apart from the little comments I made the series looks quite good now. Thanks, nice work ;)
Quoted 7 lines
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-5555 |The macros are:
#defineTARGET_FORMAT0x1B, BRIGHT, RED+30, BLACK+40
#defineHOST_FORMAT0x1B, RESET, WHITE+30, BLACK+40which are used in this way:
#define FORMAT "%c[%d;%d;%dm"
#definehost_print(fmt, arg...)printf(FORMAT fmt FORMAT"\n",HOST_FORMAT, ##arg,TARGET_FORMAT)printf(FORMAT, TARGET_FORMAT);
Quoted 3 lines
The reason is that
scripts/omap4_usbboothas to print two types of messages, the ones comming from the OMAP4 and the ones coming from the PC. This is the way chosen to differentiate them.
Let's ignore the warnings. In the end they are just warnings. The 'use checkpath' answer is just a simple way for reviewers to say that the patch has coding style issues without having to go into details.
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
Re: [PATCH 10/11] mach-types: add ID for Archos G9 tablet
In reply to Sascha HauerQuoted 39 lines · Sascha Hauer
Quoted 23 lines · vj
Quoted 12 lines · Sascha Hauer
Please no manual updates to this file, they will be overwritten once the next update from:
http://www.arm.linux.org.uk/developer/machines/download.php
comes in. I see that the Archos G9 does not have a machine id registered. You can register one yourself at:
http://www.arm.linux.org.uk/developer/machines/
btw is 5032 the id Archos uses or did you think it up yourself?
Quoted 8 lines
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-5555 |Quoted 2 lines
5032 is chosen by Archos in it's Android kernel:
http://gitorious.org/archos/archos-gpl-gen9-kernel-ics/blobs/master/arch/arm/tools/mach-typesAppearently the Archos guys can't read :(
In this case I suggest that you just hardcode this number in your board file and add a big fat warning comment that you only did that to make the Archos kernel bootable.
Another, maybe better solution would be to:- register a proper id for the G9
- use it as default in barebox
- Add some template in the environment to overwrite it to make the Archos provided Kernel boot.
Quoted 7 lines
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-5555 |
Well, booting the factory provided kernel would be great and that would be a reason to preserve the 5032.
But the fact is that's not possible for now. Archos has added some tweaks to their bootloader and kernel so they write board specific information in the boot sector and the bootloader passes it to the kernel.
To be able to boot their kernel this "feature_tags" should be implemented in barebox.
For more information see:
http://gitorious.org/archos/archos-gpl-gen9-kernel-ics/blobs/master/arch/arm/include/asm/feature_list.h
Regards,
Vicente.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 10/11] mach-types: add ID for Archos G9 tablet
In reply to Sascha HauerQuoted 34 lines · Sascha Hauer
Quoted 23 lines · vj
Quoted 12 lines · Sascha Hauer
Please no manual updates to this file, they will be overwritten once the next update from:
http://www.arm.linux.org.uk/developer/machines/download.php
comes in. I see that the Archos G9 does not have a machine id registered. You can register one yourself at:
http://www.arm.linux.org.uk/developer/machines/
btw is 5032 the id Archos uses or did you think it up yourself?
Quoted 8 lines
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-5555 |Quoted 2 lines
5032 is chosen by Archos in it's Android kernel:
http://gitorious.org/archos/archos-gpl-gen9-kernel-ics/blobs/master/arch/arm/tools/mach-typesAppearently the Archos guys can't read :(
In this case I suggest that you just hardcode this number in your board file and add a big fat warning comment that you only did that to make the Archos kernel bootable.
Another, maybe better solution would be to:
Quoted 4 lines
- register a proper id for the G9
- use it as default in barebox
- Add some template in the environment to overwrite it to make the Archos provided Kernel boot.
in the past I use devio to add the 2 asm intruction to change the machine before the zImage
with machine id 1509 05e5
(
devio 'wl 0xe3a01c05,4' 'wl 0xe38110e5,4'
cat zImage
) zImage.1509
Best Regards,
J.
Quoted 13 lines
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
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 10/11] mach-types: add ID for Archos G9 tablet
In reply to vjQuoted 48 lines · vj
Quoted 39 lines · Sascha Hauer
Quoted 23 lines · vj
Quoted 12 lines · Sascha Hauer
Please no manual updates to this file, they will be overwritten once the next update from:
http://www.arm.linux.org.uk/developer/machines/download.php
comes in. I see that the Archos G9 does not have a machine id registered. You can register one yourself at:
http://www.arm.linux.org.uk/developer/machines/
btw is 5032 the id Archos uses or did you think it up yourself?
Quoted 8 lines
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-5555 |Quoted 2 lines
5032 is chosen by Archos in it's Android kernel:
http://gitorious.org/archos/archos-gpl-gen9-kernel-ics/blobs/master/arch/arm/tools/mach-typesAppearently the Archos guys can't read :(
In this case I suggest that you just hardcode this number in your board file and add a big fat warning comment that you only did that to make the Archos kernel bootable.
Another, maybe better solution would be to:- register a proper id for the G9
- use it as default in barebox
- Add some template in the environment to overwrite it to make the Archos provided Kernel boot.Quoted 7 lines
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-5555 |
Quoted 10 lines
Well, booting the factory provided kernel would be great and that would be a reason to preserve the 5032.
But the fact is that's not possible for now. Archos has added some tweaks to their bootloader and kernel so they write board specific information in the boot sector and the bootloader passes it to the kernel.
To be able to boot their kernel this "feature_tags" should be implemented in barebox.
For more information see:
http://gitorious.org/archos/archos-gpl-gen9-kernel-ics/blobs/master/arch/arm/include/asm/feature_list.h
an other example for shit stuff in bootloader
hopefully the DT will fix this
this "feature_tags" need to be used in a way that we do not touch the generic code
Maybe via a custon bootm
Best Regards,
J.
Quoted 8 lines
Regards,
Vicente._______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 05/11] omap: revert gpiolib
In reply to Sascha HauerHello Sascha,
Am 07.10.2012 12:11, schrieb Sascha Hauer:
Quoted 7 lines · vj
Quoted 5 lines
This patch reverts
29e4031b460d1c84c1a8fc276199d40680b354d4. This is not meant to revert the gpiolib, this is only a temporal workaround because it breaks support for ArchosG9 tablet. Please, can anybody check if using gpiolib works for other omap4460 based boards?Teresa, have you tested this on OMAP4?
Yes, but I have only tested it with OMAP4430.
Now checking it with 4460, I see that it does not work here, too.
Problem is in the omap4_scale_vcores function called by *_init_lowlevel().
It already uses the gpio_direction_output() function on an OMAP4460 and crashes there. Should I do the gpio setup
just "manually" here?
But I wonder anyway why It is crashing at all. I would expect the condition if (!chip) to be true in the function gpio_direction_output (drivers/gpio/gpio.c) and to return at this point. But it doesn't.
Quoted 9 lines
I can't find anything obviously wrong int this patch.
Quoted 6 lines
arch/arm/mach-omap/gpio.c +1
-3-static int omap_gpio_probe (struct device_d *dev) -{ -struct omap_gpio_chip *omapgpio; +gpio_set_value (gpio, value);
Quoted 6 lines
arch/arm/mach-omap/gpio.c line 136
Quoted 4 lines
arch/arm/mach-omap/gpio.c +0
-4- omapgpio =xzalloc (sizeof (*omapgpio)); - omapgpio->base =dev_request_mem_region (dev,0 ); - omapgpio->chip.ops = &omap_gpio_ops; - omapgpio->chip.base =-1 ;base should be calculated as
dev->id* 32. Otherwise the gpio numbering gets depended on the probe order.
I will fix this.
Quoted 28 lines
Quoted 14 lines
arch/arm/mach-omap/gpio.c +4
-5- omapgpio->chip.ngpio =32 ; - omapgpio->chip.dev = dev; -gpiochip_add (&omapgpio->chip); + reg +=OMAP_GPIO_OE ; -dev_dbg (dev,"probed gpiochip%d with base %d\n" , - dev->id, omapgpio->chip.base); + val =__raw_readl (reg); + val &= ~(1 <<get_gpio_index (gpio)); +__raw_writel (val, reg);return 0 ; }[...]
Quoted 12 lines
arch/arm/mach-omap/omap3_generic.c +0
-1-coredevice_initcall (omap3_gpio_init);arch/arm/mach-omap/omap4_generic.c +0
-2@@ -574,22 +574,3 @@ const struct gpmc_config omap4_nand_cfg = { .base = 0x28000000, .size = GPMC_SIZE_16M, }; - -static int omap4_gpio_init (void )
Quoted 8 lines
arch/arm/mach-omap/omap4_generic.c const struct gpmc_config omap4_nand_cfg = { · line 581
Quoted 3 lines
arch/arm/mach-omap/omap4_generic.c +0
-3-{ -add_generic_device ("omap-gpio" ,0 ,NULL ,0x4a310100 , -0x1000 ,IORESOURCE_MEM ,NULL );It seems on OMAP4 the register addresses are at an additional
0x100offset compared to OMAP3. This little trick here to compensate that will lead to problems should we add devicetree support for omap. For now it's ok, but the region size should be reduced to0x0f00so that there's no risk that it overlaps with the next region.
What about moving the gpio offsets to the *-silicon.h? So we may have different values for OMAP3 and OMAP4.
Teresa
Quoted 3 lines
Sascha
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 05/11] omap: revert gpiolib
Hi Teresa,
Quoted 9 lines · Teresa Gamez
Hello Sascha,
Am 07.10.2012 12:11, schrieb Sascha Hauer:
Quoted 6 lines · vj
Quoted 5 lines
This patch reverts
29e4031b460d1c84c1a8fc276199d40680b354d4. This is not meant to revert the gpiolib, this is only a temporal workaround because it breaks support for ArchosG9 tablet. Please, can anybody check if using gpiolib works for other omap4460 based boards?
Quoted 8 lines
Quoted 1 line
Teresa, have you tested this on OMAP4?
Yes, but I have only tested it with OMAP4430.
Now checking it with 4460, I see that it does not work here, too. Problem is in theomap4_scale_vcoresfunction called by*_init_lowlevel(). It already uses thegpio_direction_output()function on an OMAP4460 and crashes there. Should I do the gpio setup
just "manually" here?
I think you have to. Otherwise we would pull the whole gpio/driver stack into the pbl should we want to build omap as a compressed image.
Quoted 4 lines
But I wonder anyway why It is crashing at all. I would expect the condition if (!chip) to be true in the function
gpio_direction_output(drivers/gpio/gpio.c) and to return at this point. But it doesn't.
The bss is not yet cleared which means that all unitialized variables contain random garbage.
Quoted 10 lines
Quoted 8 lines
arch/arm/mach-omap/gpio.c line 136
Quoted 6 lines
arch/arm/mach-omap/gpio.c +1
-5-struct omap_gpio_chip *omapgpio; +gpio_set_value (gpio, value); - omapgpio =xzalloc (sizeof (*omapgpio)); - omapgpio->base =dev_request_mem_region (dev,0 ); - omapgpio->chip.ops = &omap_gpio_ops; - omapgpio->chip.base =-1 ;base should be calculated as
dev->id* 32. Otherwise the gpio numbering gets depended on the probe order.I will fix this.
Thanks.
Quoted 9 lines
Quoted 6 lines
Review
Quoted 1 line
(quoted diff) +0
-1- 0x1000, IORESOURCE_MEM, NULL);It seems on OMAP4 the register addresses are at an additional
0x100offset compared to OMAP3. This little trick here to compensate that will lead to problems should we add devicetree support for omap. For now it's ok, but the region size should be reduced to0x0f00so that there's no risk that it overlaps with the next region.What about moving the gpio offsets to the *-silicon.h? So we may have different values for OMAP3 and OMAP4.
No. That would mean conflicting defines in the header files. These are a pain I'm currently trying to get rid of at i.MX. The correct way would be to use the device_id mechanism to abstract between SoC differences.
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