Re: [PATCH 5/5] at91sam9m10g45ek: add lcdc support
On Sat, Sep 22, 2012 at 08:26:48PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD > Acked-by: Nicolas Ferre > --- > .../arm/boards/at91sam9m10g45ek/env/bin/boot_board |7 + > arch/arm/boards/at91sam9m10g45ek/env/splash.png| Bin 0 -> 22747 bytes > arch/arm/boards/at91sam9m10g45ek/init.c| 33 > > arch/arm/configs/at91sam9m10g45ek_defconfig| 11 +-- > 4 files changed, 48 insertions(+), 3 deletions(-) > create mode 100644 arch/arm/boards/at91sam9m10g45ek/env/splash.png > > diff --git a/arch/arm/boards/at91sam9m10g45ek/env/bin/boot_board > b/arch/arm/boards/at91sam9m10g45ek/env/bin/boot_board > index 3d7426f..eeb7a76 100644 > --- a/arch/arm/boards/at91sam9m10g45ek/env/bin/boot_board > +++ b/arch/arm/boards/at91sam9m10g45ek/env/bin/boot_board > @@ -5,6 +5,13 @@ export PATH > > . /env/config > > +splash=/env/splash.png > + > +if [ -f ${splash} ]; then > + splash ${splash} > + fb0.enable=1 > +fi > + > menu -r -m boot > menu -a -m boot -d "\e[1;36mWelcome on Barebox Boot Sequence\e[0m" > menu -e -a -m boot -c 'menu_boot'-d "boot (default) >" > diff --git a/arch/arm/boards/at91sam9m10g45ek/env/splash.png > b/arch/arm/boards/at91sam9m10g45ek/env/splash.png I understand your desire to show a logo on the screen, but we really need a storage outside the main repository for this. I'm perfectly fine with showing full HD 3d pictures on the screen if your hardware can do so, but we should not put this into the repository. We should solve this right now, then we are free to add huge logos, add different logo for each board, update logos for christmas, summer, Helloween... How about adding some wget mechanism which: - Only downloads the logos if allowed in the config - Does not download logos if a logo directory already exists I'm sure we could create some storage here. 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 1/1] sandbox: add sdl video support
On Wed, Sep 12, 2012 at 03:38:42PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > This will allow speed up the dev on framebuffer. > > By default the resolution is VGA but this can be changed via cmdline. > > We use a pthread to Flip the screen every 100ms as we can not detect when > barebox update it as barebox simpliy write in a buffer. > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Applied, thanks Sascha > --- > arch/sandbox/Kconfig |3 + > arch/sandbox/Makefile |6 +- > arch/sandbox/board/board.c | 21 + > arch/sandbox/mach-sandbox/include/mach/linux.h | 13 +++ > arch/sandbox/os/Makefile |2 + > arch/sandbox/os/common.c | 25 +- > arch/sandbox/os/sdl.c | 108 > > drivers/video/Kconfig |4 + > drivers/video/Makefile |1 + > drivers/video/sdl.c| 101 ++ > 10 files changed, 279 insertions(+), 5 deletions(-) > create mode 100644 arch/sandbox/os/sdl.c > create mode 100644 drivers/video/sdl.c > > diff --git a/arch/sandbox/Kconfig b/arch/sandbox/Kconfig > index 10e6829..84fadda 100644 > --- a/arch/sandbox/Kconfig > +++ b/arch/sandbox/Kconfig > @@ -1,3 +1,6 @@ > +config SANDBOX > + bool > + default y > > config ARCH_TEXT_BASE > hex > diff --git a/arch/sandbox/Makefile b/arch/sandbox/Makefile > index 9fd18a2..c0aa8c6 100644 > --- a/arch/sandbox/Makefile > +++ b/arch/sandbox/Makefile > @@ -9,8 +9,7 @@ lds-y := $(BOARD)/barebox.lds > > > TEXT_BASE = $(CONFIG_TEXT_BASE) > - > -CFLAGS += -Dmalloc=barebox_malloc \ > +CFLAGS += -Dmalloc=barebox_malloc -Dcalloc=barebox_calloc \ > -Dfree=barebox_free -Drealloc=barebox_realloc \ > -Dread=barebox_read -Dwrite=barebox_write \ > -Dopen=barebox_open -Dclose=barebox_close \ > @@ -40,9 +39,10 @@ archprepare: maketools > > PHONY += maketools > > +SDL_LIBS-$(CONFIG_DRIVER_VIDEO_SDL) := $(shell pkg-config sdl --libs) > cmd_barebox__ = $(CC) -o $@ -Wl,-T,$(barebox-lds) \ > -Wl,--start-group $(barebox-common) -Wl,--end-group \ > - -lrt -lpthread > + -lrt -lpthread $(SDL_LIBS-y) > > common-y += $(BOARD) arch/sandbox/os/ > > diff --git a/arch/sandbox/board/board.c b/arch/sandbox/board/board.c > index 6bccd2c..71efcc4 100644 > --- a/arch/sandbox/board/board.c > +++ b/arch/sandbox/board/board.c > @@ -26,16 +26,37 @@ > #include > #include > #include > +#include > + > +struct fb_videomode mode = { > + .name = "sdl", /* optional */ > + .xres = 640, > + .yres = 480, > +}; > > static struct device_d tap_device = { > .id = DEVICE_ID_DYNAMIC, > .name = "tap", > }; > > +static struct device_d sdl_device = { > + .id = DEVICE_ID_DYNAMIC, > + .name = "sdlfb", > + .platform_data = &mode, > +}; > + > static int devices_init(void) > { > register_device(&tap_device); > > + if (sdl_xres) > + mode.xres = sdl_xres; > + > + if (sdl_yres) > + mode.yres = sdl_yres; > + > + register_device(&sdl_device); > + > return 0; > } > > diff --git a/arch/sandbox/mach-sandbox/include/mach/linux.h > b/arch/sandbox/mach-sandbox/include/mach/linux.h > index 5917fe9..81f4946 100644 > --- a/arch/sandbox/mach-sandbox/include/mach/linux.h > +++ b/arch/sandbox/mach-sandbox/include/mach/linux.h > @@ -1,6 +1,8 @@ > #ifndef __ASM_ARCH_LINUX_H > #define __ASM_ARCH_LINUX_H > > +struct fb_bitfield; > + > int linux_register_device(const char *name, void *start, void *end); > int tap_alloc(char *dev); > uint64_t linux_get_time(void); > @@ -20,4 +22,15 @@ struct linux_console_data { > unsigned int flags; > }; > > +extern int sdl_xres; > +extern int sdl_yres; > +int sdl_init(void); > +void sdl_close(void); > +int sdl_open(int xres, int yres, int bpp, void* buf); > +void sdl_stop_timer(void); > +void sdl_start_timer(void); > +void sdl_get_bitfield_rgba(struct fb_bitfield *r, struct fb_bitfield *g, > + struct fb_bitfield *b, struct fb_bitfield *a); > +void sdl_setpixel(int x, int y, uint8_t r, uint8_t g, uint8_t b, uint8_t a); > + > #endif /* __ASM_ARCH_LINUX_H */ > diff --git a/arch/sandbox/os/Makefile b/arch/sandbox/os/Makefile > index dc211d9..2e65be5 100644 > --- a/arch/sandbox/os/Makefile > +++ b/arch/sandbox/os/Makefile > @@ -13,3 +13,5 @@ NOSTDINC_FLAGS := > > obj-y = common.o tap.o > > +CFLAGS_sdl.o = $(shell pkg-config sdl --cflags) > +obj-$(CONFIG_DRIVER_VIDEO_SDL) += sdl.o > diff --git a/arch/sandbox/os/common.c b/arch/sandbox/os/common.c > index e296574..15c9945 100644 > --- a/arch/sandbox/os/common.c > +++ b/arch/sandbox/os/common.c > @@ -52,6 +52,9 @@ > #include > #include > > +int sdl_xres; > +int sdl_yres; > + > static struct termios term_orig
Re: [PATCH 5/5] at91sam9m10g45ek: add lcdc support
On 10:09 Tue 25 Sep , Sascha Hauer wrote: > On Sat, Sep 22, 2012 at 08:26:48PM +0200, Jean-Christophe PLAGNIOL-VILLARD > wrote: > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD > > Acked-by: Nicolas Ferre > > --- > > .../arm/boards/at91sam9m10g45ek/env/bin/boot_board |7 + > > arch/arm/boards/at91sam9m10g45ek/env/splash.png| Bin 0 -> 22747 bytes > > arch/arm/boards/at91sam9m10g45ek/init.c| 33 > > > > arch/arm/configs/at91sam9m10g45ek_defconfig| 11 +-- > > 4 files changed, 48 insertions(+), 3 deletions(-) > > create mode 100644 arch/arm/boards/at91sam9m10g45ek/env/splash.png > > > > diff --git a/arch/arm/boards/at91sam9m10g45ek/env/bin/boot_board > > b/arch/arm/boards/at91sam9m10g45ek/env/bin/boot_board > > index 3d7426f..eeb7a76 100644 > > --- a/arch/arm/boards/at91sam9m10g45ek/env/bin/boot_board > > +++ b/arch/arm/boards/at91sam9m10g45ek/env/bin/boot_board > > @@ -5,6 +5,13 @@ export PATH > > > > . /env/config > > > > +splash=/env/splash.png > > + > > +if [ -f ${splash} ]; then > > + splash ${splash} > > + fb0.enable=1 > > +fi > > + > > menu -r -m boot > > menu -a -m boot -d "\e[1;36mWelcome on Barebox Boot Sequence\e[0m" > > menu -e -a -m boot -c 'menu_boot' -d "boot (default) > >" > > diff --git a/arch/arm/boards/at91sam9m10g45ek/env/splash.png > > b/arch/arm/boards/at91sam9m10g45ek/env/splash.png > > I understand your desire to show a logo on the screen, but we really > need a storage outside the main repository for this. I'm perfectly fine > with showing full HD 3d pictures on the screen if your hardware can do > so, but we should not put this into the repository. > > We should solve this right now, then we are free to add huge logos, add > different logo for each board, update logos for christmas, summer, > Helloween... > > How about adding some wget mechanism which: > > - Only downloads the logos if allowed in the config > - Does not download logos if a logo directory already exists > > I'm sure we could create some storage here. I nack the wget not the idea how about a git submodule as I must have the offline build support Best Regards, J. ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 5/5] at91sam9m10g45ek: add lcdc support
On Tue, Sep 25, 2012 at 12:19:05PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > On 10:09 Tue 25 Sep , Sascha Hauer wrote: > > > diff --git a/arch/arm/boards/at91sam9m10g45ek/env/splash.png > > > b/arch/arm/boards/at91sam9m10g45ek/env/splash.png > > > > I understand your desire to show a logo on the screen, but we really > > need a storage outside the main repository for this. I'm perfectly fine > > with showing full HD 3d pictures on the screen if your hardware can do > > so, but we should not put this into the repository. > > > > We should solve this right now, then we are free to add huge logos, add > > different logo for each board, update logos for christmas, summer, > > Helloween... > > > > How about adding some wget mechanism which: > > > > - Only downloads the logos if allowed in the config > > - Does not download logos if a logo directory already exists > > > > I'm sure we could create some storage here. > I nack the wget not the idea > > how about a git submodule > > as I must have the offline build support That was the "Does not download logos if a logo directory already exists" part above. Anyway, a submoule is fine with me. I don't care, as long as it's not in the main repository. 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 4/4] ARM: give boards control of the reset entry point
Hi Jan, Could you redo this based on the next-stable tag I created? There are two additional boards to handle now. Sascha On Mon, Sep 24, 2012 at 10:18:34AM +0200, Jan Luebbe wrote: > On some SoCs (for example AM35xx), the ROM bootloader passes useful > information in r0 when jumping to barebox. > > To avoid overwriting this in the generic reset code, we introduce > common_reset as a C function and as an assembler macro. This is then > called form the reset entry point (either in common or in board code). > > This patch is based on code by Sascha Hauer . > > Signed-off-by: Jan Luebbe > --- > arch/arm/boards/a9m2410/lowlevel_init.S| 17 +++-- > arch/arm/boards/a9m2440/lowlevel_init.S| 15 ++--- > arch/arm/boards/at91sam9260ek/lowlevel_init.S |9 ++- > arch/arm/boards/eukrea_cpuimx25/lowlevel.c |5 +- > arch/arm/boards/eukrea_cpuimx27/lowlevel_init.S| 11 ++-- > arch/arm/boards/eukrea_cpuimx35/lowlevel.c |5 +- > .../boards/freescale-mx25-3-stack/lowlevel_init.S | 11 ++-- > .../boards/freescale-mx35-3-stack/lowlevel_init.S | 12 ++-- > .../boards/friendlyarm-mini2440/lowlevel_init.S| 18 +++--- > arch/arm/boards/friendlyarm-tiny210/lowlevel.c |5 +- > arch/arm/boards/guf-cupid/lowlevel.c |7 +- > arch/arm/boards/guf-neso/lowlevel.c|6 +- > arch/arm/boards/imx21ads/lowlevel_init.S | 12 ++-- > arch/arm/boards/imx27ads/lowlevel_init.S | 11 ++-- > arch/arm/boards/karo-tx25/lowlevel.c |5 +- > arch/arm/boards/netx/platform.S|9 ++- > arch/arm/boards/panda/lowlevel.c |7 +- > arch/arm/boards/pcm027/lowlevel_init.S | 10 ++- > arch/arm/boards/pcm037/lowlevel_init.S | 12 ++-- > arch/arm/boards/pcm038/lowlevel.c |5 +- > arch/arm/boards/pcm043/lowlevel.c |5 +- > arch/arm/boards/pcm049/lowlevel.c |5 +- > arch/arm/boards/phycard-a-xl2/lowlevel.c |5 +- > arch/arm/boards/phycard-i.MX27/lowlevel_init.S | 12 ++-- > arch/arm/boards/scb9328/lowlevel_init.S| 11 ++-- > arch/arm/cpu/Makefile |4 +- > arch/arm/cpu/start-pbl.c | 12 > arch/arm/cpu/start-reset.c | 63 -- > arch/arm/cpu/start.c | 12 > arch/arm/include/asm/barebox-arm-head.h| 68 > > arch/arm/include/asm/system.h |4 ++ > arch/arm/mach-at91/at91rm9200_lowlevel_init.c |5 +- > arch/arm/mach-at91/at91sam926x_lowlevel_init.c |5 +- > arch/arm/mach-ep93xx/lowlevel_init.S | 15 ++--- > arch/arm/mach-omap/Kconfig |5 +- > arch/arm/mach-omap/omap3_core.S|9 ++- > 36 files changed, 257 insertions(+), 175 deletions(-) > delete mode 100644 arch/arm/cpu/start-reset.c > > diff --git a/arch/arm/boards/a9m2410/lowlevel_init.S > b/arch/arm/boards/a9m2410/lowlevel_init.S > index 0463b26..502ecdd 100644 > --- a/arch/arm/boards/a9m2410/lowlevel_init.S > +++ b/arch/arm/boards/a9m2410/lowlevel_init.S > @@ -4,13 +4,14 @@ > > #include > #include > +#include > > - .section ".text_bare_init.board_init_lowlevel","ax" > + .section ".text_bare_init.reset","ax" > > -.globl board_init_lowlevel > -board_init_lowlevel: > +.globl reset > +reset: > > - mov r10, lr /* save the link register */ > + common_reset r0 > > bl s3c24x0_disable_wd > > @@ -20,7 +21,7 @@ board_init_lowlevel: > cmp pc, #S3C_SDRAM_END > bhs 1f > > - mov pc, r10 > + b board_init_lowlevel_return > > /* we are running from NOR or NAND/SRAM memory. Do further initialisation */ > 1: > @@ -29,9 +30,7 @@ board_init_lowlevel: > bl s3c24x0_sdram_init > > #ifdef CONFIG_S3C_NAND_BOOT > - mov lr, r10 /* restore the link register */ > /* up to here we are running from the internal SRAM area */ > - b s3c24x0_nand_boot /* does return directly to our caller into > SDRAM */ > -#else > - mov pc, r10 > + bl s3c24x0_nand_boot > #endif > + b board_init_lowlevel_return > diff --git a/arch/arm/boards/a9m2440/lowlevel_init.S > b/arch/arm/boards/a9m2440/lowlevel_init.S > index 305014c..da29efd 100644 > --- a/arch/arm/boards/a9m2440/lowlevel_init.S > +++ b/arch/arm/boards/a9m2440/lowlevel_init.S > @@ -5,8 +5,9 @@ > #include > #include > #include > +#include > > - .section ".text_bare_init.board_init_lowlevel","ax" > + .section ".text_bare_init.reset","ax" > > /* > * To be able to setup the SDRAM interface correctly, we need some > @@ -211,10 +212,10 @@ SDRAMDATA: > > /* > */ > > -.globl board_i
[PATCHv2 0/2] Add ARCH for AM33xx and phyCORE-AM335x support
This series is based on next-stable tag and tested with Jan Lübbes patch: Makefile: add target to produce a SPL compatible uImage v2: - added generated defconfig - removed global.boot.default and added boot.d/01 symlink - created dmtimer0 header - removed unnecessary cleanup - use gpiolib Teresa Gámez (2): ARM OMAP AM33XX: create new ARCH for AM33xx pcm051: Add inital support arch/arm/Makefile|1 + arch/arm/boards/pcm051/Makefile |1 + arch/arm/boards/pcm051/board.c | 72 ++ arch/arm/boards/pcm051/config.h | 21 ++ arch/arm/boards/pcm051/env/boot.d/01 |1 + arch/arm/boards/pcm051/env/boot/disk | 10 +++ arch/arm/boards/pcm051/env/init/automount| 32 ++ arch/arm/boards/pcm051/env/init/bootargs-base|9 +++ arch/arm/boards/pcm051/env/init/general | 12 arch/arm/boards/pcm051/env/init/hostname |8 +++ arch/arm/boards/pcm051/env/network/eth0 | 15 + arch/arm/configs/pcm051_defconfig| 56 + arch/arm/mach-omap/Kconfig | 21 ++ arch/arm/mach-omap/Makefile |2 + arch/arm/mach-omap/am33xx_generic.c | 47 ++ arch/arm/mach-omap/dmtimer0.c| 70 + arch/arm/mach-omap/include/mach/am33xx-clock.h | 26 arch/arm/mach-omap/include/mach/am33xx-silicon.h | 51 +++ arch/arm/mach-omap/include/mach/clocks.h |3 + arch/arm/mach-omap/include/mach/dmtimer0.h | 36 +++ arch/arm/mach-omap/include/mach/silicon.h|3 + arch/arm/mach-omap/include/mach/timers.h |1 - drivers/mci/Kconfig |2 +- 23 files changed, 498 insertions(+), 2 deletions(-) create mode 100644 arch/arm/boards/pcm051/Makefile create mode 100644 arch/arm/boards/pcm051/board.c create mode 100644 arch/arm/boards/pcm051/config.h create mode 12 arch/arm/boards/pcm051/env/boot.d/01 create mode 100644 arch/arm/boards/pcm051/env/boot/disk create mode 100644 arch/arm/boards/pcm051/env/init/automount create mode 100644 arch/arm/boards/pcm051/env/init/bootargs-base create mode 100644 arch/arm/boards/pcm051/env/init/general create mode 100644 arch/arm/boards/pcm051/env/init/hostname create mode 100644 arch/arm/boards/pcm051/env/network/eth0 create mode 100644 arch/arm/configs/pcm051_defconfig create mode 100644 arch/arm/mach-omap/am33xx_generic.c create mode 100644 arch/arm/mach-omap/dmtimer0.c create mode 100644 arch/arm/mach-omap/include/mach/am33xx-clock.h create mode 100644 arch/arm/mach-omap/include/mach/am33xx-silicon.h create mode 100644 arch/arm/mach-omap/include/mach/dmtimer0.h ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCHv2 1/2] ARM OMAP AM33XX: create new ARCH for AM33xx
Created ARCH for AM33xx boards as second stage bootloader. This includes: - Added dmtimer0 - Created basic header files - Added MMC support for ARCH_AM33XX - Added reset function Signed-off-by: Teresa Gámez --- arch/arm/mach-omap/Kconfig | 11 arch/arm/mach-omap/Makefile |2 + arch/arm/mach-omap/am33xx_generic.c | 47 +++ arch/arm/mach-omap/dmtimer0.c| 70 ++ arch/arm/mach-omap/include/mach/am33xx-clock.h | 26 arch/arm/mach-omap/include/mach/am33xx-silicon.h | 51 arch/arm/mach-omap/include/mach/clocks.h |3 + arch/arm/mach-omap/include/mach/dmtimer0.h | 36 +++ arch/arm/mach-omap/include/mach/silicon.h|3 + arch/arm/mach-omap/include/mach/timers.h |1 - drivers/mci/Kconfig |2 +- 11 files changed, 250 insertions(+), 2 deletions(-) create mode 100644 arch/arm/mach-omap/am33xx_generic.c create mode 100644 arch/arm/mach-omap/dmtimer0.c create mode 100644 arch/arm/mach-omap/include/mach/am33xx-clock.h create mode 100644 arch/arm/mach-omap/include/mach/am33xx-silicon.h create mode 100644 arch/arm/mach-omap/include/mach/dmtimer0.h diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig index f69a35d..4f5c905 100644 --- a/arch/arm/mach-omap/Kconfig +++ b/arch/arm/mach-omap/Kconfig @@ -45,12 +45,23 @@ config ARCH_OMAP4 help Say Y here if you are using Texas Instrument's OMAP4 based platform +config ARCH_AM33XX + bool "AM33xx" + select CPU_V7 + select GENERIC_GPIO + select OMAP_CLOCK_SOURCE_DMTIMER0 + help + Say Y here if you are using Texas Instrument's AM33xx based platform + endchoice # Blind enable all possible clocks.. think twice before you do this. config OMAP_CLOCK_SOURCE_S32K bool +config OMAP_CLOCK_SOURCE_DMTIMER0 + bool + config OMAP3_CLOCK_CONFIG prompt "Clock Configuration" bool diff --git a/arch/arm/mach-omap/Makefile b/arch/arm/mach-omap/Makefile index f752bc7..882c7fc 100644 --- a/arch/arm/mach-omap/Makefile +++ b/arch/arm/mach-omap/Makefile @@ -18,10 +18,12 @@ obj-$(CONFIG_ARCH_OMAP) += syslib.o pbl-$(CONFIG_ARCH_OMAP) += syslib.o obj-$(CONFIG_OMAP_CLOCK_SOURCE_S32K) += s32k_clksource.o +obj-$(CONFIG_OMAP_CLOCK_SOURCE_DMTIMER0) += dmtimer0.o obj-$(CONFIG_ARCH_OMAP3) += omap3_core.o omap3_generic.o auxcr.o pbl-$(CONFIG_ARCH_OMAP3) += omap3_core.o omap3_generic.o auxcr.o obj-$(CONFIG_ARCH_OMAP4) += omap4_generic.o omap4_clock.o pbl-$(CONFIG_ARCH_OMAP4) += omap4_generic.o omap4_clock.o +obj-$(CONFIG_ARCH_AM33XX) += am33xx_generic.o obj-$(CONFIG_OMAP3_CLOCK_CONFIG) += omap3_clock.o obj-$(CONFIG_OMAP_GPMC) += gpmc.o devices-gpmc-nand.o obj-$(CONFIG_SHELL_NONE) += xload.o diff --git a/arch/arm/mach-omap/am33xx_generic.c b/arch/arm/mach-omap/am33xx_generic.c new file mode 100644 index 000..12295f5 --- /dev/null +++ b/arch/arm/mach-omap/am33xx_generic.c @@ -0,0 +1,47 @@ +/* + * (C) Copyright 2012 Teresa Gámez, Phytec Messtechnik GmbH + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include +#include + +void __noreturn reset_cpu(unsigned long addr) +{ + writel(PRM_RSTCTRL_RESET, PRM_REG(RSTCTRL)); + + while (1); +} + +static int am33xx_gpio_init(void) +{ + add_generic_device("omap-gpio", 0, NULL, 0x44e07100, + 0x1000, IORESOURCE_MEM, NULL); + add_generic_device("omap-gpio", 1, NULL, 0x4804c100, + 0x1000, IORESOURCE_MEM, NULL); + add_generic_device("omap-gpio", 2, NULL, 0x481ac100, + 0x1000, IORESOURCE_MEM, NULL); + add_generic_device("omap-gpio", 3, NULL, 0x481ae100, + 0x1000, IORESOURCE_MEM, NULL); + + return 0; +} +coredevice_initcall(am33xx_gpio_init); diff --git a/arch/arm/mach-omap/dmtimer0.c b/arch/arm/mach-omap/dmtimer0.c new file mode 100644 index 000..d768552 --- /dev/null +++ b/arch/arm/mach-omap/dmtimer0.c @@ -0,0 +1,70 @@ +/** + * @file + * @brief Support DMTimer0 counter + * + * FileName: arch/arm/mach-omap/dmtimer0.c + */ +/* + * This File
[PATCHv2 2/2] pcm051: Add inital support
Added initial support for Phytec phyCORE-AM335x. Signed-off-by: Teresa Gámez --- arch/arm/Makefile |1 + arch/arm/boards/pcm051/Makefile |1 + arch/arm/boards/pcm051/board.c| 72 + arch/arm/boards/pcm051/config.h | 21 +++ arch/arm/boards/pcm051/env/boot.d/01 |1 + arch/arm/boards/pcm051/env/boot/disk | 10 arch/arm/boards/pcm051/env/init/automount | 32 +++ arch/arm/boards/pcm051/env/init/bootargs-base |9 +++ arch/arm/boards/pcm051/env/init/general | 12 arch/arm/boards/pcm051/env/init/hostname |8 +++ arch/arm/boards/pcm051/env/network/eth0 | 15 + arch/arm/configs/pcm051_defconfig | 56 +++ arch/arm/mach-omap/Kconfig| 10 13 files changed, 248 insertions(+), 0 deletions(-) create mode 100644 arch/arm/boards/pcm051/Makefile create mode 100644 arch/arm/boards/pcm051/board.c create mode 100644 arch/arm/boards/pcm051/config.h create mode 12 arch/arm/boards/pcm051/env/boot.d/01 create mode 100644 arch/arm/boards/pcm051/env/boot/disk create mode 100644 arch/arm/boards/pcm051/env/init/automount create mode 100644 arch/arm/boards/pcm051/env/init/bootargs-base create mode 100644 arch/arm/boards/pcm051/env/init/general create mode 100644 arch/arm/boards/pcm051/env/init/hostname create mode 100644 arch/arm/boards/pcm051/env/network/eth0 create mode 100644 arch/arm/configs/pcm051_defconfig diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 208f0f4..821405f 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -109,6 +109,7 @@ board-$(CONFIG_MACH_PCM027) := pcm027 board-$(CONFIG_MACH_PCM037):= pcm037 board-$(CONFIG_MACH_PCM038):= pcm038 board-$(CONFIG_MACH_PCM043):= pcm043 +board-$(CONFIG_MACH_PCM051):= pcm051 board-$(CONFIG_MACH_PM9261):= pm9261 board-$(CONFIG_MACH_PM9263):= pm9263 board-$(CONFIG_MACH_PM9G45):= pm9g45 diff --git a/arch/arm/boards/pcm051/Makefile b/arch/arm/boards/pcm051/Makefile new file mode 100644 index 000..dcfc293 --- /dev/null +++ b/arch/arm/boards/pcm051/Makefile @@ -0,0 +1 @@ +obj-y += board.o diff --git a/arch/arm/boards/pcm051/board.c b/arch/arm/boards/pcm051/board.c new file mode 100644 index 000..7cb85f1 --- /dev/null +++ b/arch/arm/boards/pcm051/board.c @@ -0,0 +1,72 @@ +/* + * pcm051 - phyCORE-AM335x Board Initalization Code + * + * Copyright (C) 2012 Teresa Gámez, Phytec Messtechnik GmbH + * + * Based on arch/arm/boards/omap/board-beagle.c + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include +#include +#include + +static struct NS16550_plat serial_plat = { + .clock = 4800, /* 48MHz (APLL96/2) */ + .shift = 2, +}; + +/** + * @brief UART serial port initialization + * arch + * + * @return result of device registration + */ +static int pcm051_console_init(void) +{ + /* Register the serial port */ + add_ns16550_device(DEVICE_ID_DYNAMIC, AM33XX_UART0_BASE, 1024, + IORESOURCE_MEM_8BIT, &serial_plat); + + return 0; +} +console_initcall(pcm051_console_init); + +static int pcm051_mem_init(void) +{ + arm_add_mem_device("ram0", AM33XX_DRAM_ADDR_SPACE_START, SZ_512M); + + return 0; +} +mem_initcall(pcm051_mem_init); + +static int pcm051_devices_init(void) +{ + add_generic_device("omap-hsmmc", DEVICE_ID_DYNAMIC, NULL, + (AM33XX_MMCHS0_BASE + 0x100), SZ_4K, + IORESOURCE_MEM, NULL); + + armlinux_set_bootparams((void *)(AM33XX_DRAM_ADDR_SPACE_START + 0x100)); + armlinux_set_architecture(MACH_TYPE_PCM051); + + return 0; +} +device_initcall(pcm051_devices_init); diff --git a/arch/arm/boards/pcm051/config.h b/arch/arm/boards/pcm051/config.h new file mode 100644 index 000..8b2b876 --- /dev/null +++ b/arch/arm/boards/pcm051/config.h @@ -0,0 +1,21 @@ +/** + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Pu
Re: [PATCH] Makefile: add target to produce a SPL compatible uImage
On Thu, 2012-09-20 at 21:13 +0200, Jan Luebbe wrote: > This is mostly useful during the initial port of barebox to a new > board which is supported by u-boot. It also allows starting barebox > from a SRAM-based u-boot SPL. > > A different load address can be set like this: > make barebox.uimage UIMAGE_BASE=0x8000 > > Also add barebox.ubl to CLEAN_FILES. > > Signed-off-by: Jan Luebbe > --- > I've carried this patch for some time and adjusted it to support > PBL (compressed image), but have not had an opportunity to verify > it again. > > Teresa, if you have some time to try it out, that would be very > much appreciated. :) Sascha: As Teresa has tested this, could you apply it? Regards, Jan -- 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] Makefile: add target to produce a SPL compatible uImage
Am 24.09.2012 14:49, schrieb Jan Lübbe: On Mon, 2012-09-24 at 14:37 +0200, Teresa Gamez wrote: I have tested it with my am335x patches. And it worked so far. But I have not done anything with the pbl image, yet. Could you explain me what it's actually for? And how I can test it? Thanks! PBL stands for Pre-Bootloader Image, which is used to have a compressed barebox binary. You can enable it in "General Settings -> memory layout -> Pre-Bootloader image". Do I understand this correctly that this is suppose to be used to decrease the size of first stage bootloader binaries like the MLO on ti boards? Regards, Teresa Regards, Jan ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH] Makefile: add target to produce a SPL compatible uImage
On Tue, 2012-09-25 at 14:29 +0200, Teresa Gamez wrote: > Am 24.09.2012 14:49, schrieb Jan Lübbe: > > On Mon, 2012-09-24 at 14:37 +0200, Teresa Gamez wrote: > >> I have tested it with my am335x patches. And it worked so far. > >> But I have not done anything with the pbl image, yet. > >> Could you explain me what it's actually for? And how I can test it? > > Thanks! > > > > PBL stands for Pre-Bootloader Image, which is used to have a compressed > > barebox binary. You can enable it in "General Settings -> memory layout > > -> Pre-Bootloader image". > > Do I understand this correctly that this is suppose to be used to decrease > the size of first stage bootloader binaries like the MLO on ti boards? I don't think it is useful in the current form for the MLO case. The problem there is that the SRAM would be too small to contain the decompressed image (in addition to the compressed one). It saves some time when loading from slower flash and is useful when the space for barebox in flash is limited some how (but you have enough RAM). For the MLO case we would need to have the DRAM setup in the Pre-Bootloader and then decompress to DRAM. That should be possible, but I'm not sure how much we'd gain (the compressed image would still be limited by SRAM size). Regards, Jan -- 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: [PATCHv2 2/2] pcm051: Add inital support
On 14:18 Tue 25 Sep , Teresa Gámez wrote: > Added initial support for Phytec phyCORE-AM335x. > > Signed-off-by: Teresa Gámez > --- > arch/arm/Makefile |1 + > arch/arm/boards/pcm051/Makefile |1 + > arch/arm/boards/pcm051/board.c| 72 > + > arch/arm/boards/pcm051/config.h | 21 +++ > arch/arm/boards/pcm051/env/boot.d/01 |1 + > arch/arm/boards/pcm051/env/boot/disk | 10 > arch/arm/boards/pcm051/env/init/automount | 32 +++ > arch/arm/boards/pcm051/env/init/bootargs-base |9 +++ > arch/arm/boards/pcm051/env/init/general | 12 > arch/arm/boards/pcm051/env/init/hostname |8 +++ > arch/arm/boards/pcm051/env/network/eth0 | 15 + > arch/arm/configs/pcm051_defconfig | 56 +++ > arch/arm/mach-omap/Kconfig| 10 > 13 files changed, 248 insertions(+), 0 deletions(-) > create mode 100644 arch/arm/boards/pcm051/Makefile > create mode 100644 arch/arm/boards/pcm051/board.c > create mode 100644 arch/arm/boards/pcm051/config.h > create mode 12 arch/arm/boards/pcm051/env/boot.d/01 > create mode 100644 arch/arm/boards/pcm051/env/boot/disk > create mode 100644 arch/arm/boards/pcm051/env/init/automount > create mode 100644 arch/arm/boards/pcm051/env/init/bootargs-base > create mode 100644 arch/arm/boards/pcm051/env/init/general > create mode 100644 arch/arm/boards/pcm051/env/init/hostname > create mode 100644 arch/arm/boards/pcm051/env/network/eth0 > create mode 100644 arch/arm/configs/pcm051_defconfig > > diff --git a/arch/arm/Makefile b/arch/arm/Makefile > index 208f0f4..821405f 100644 > --- a/arch/arm/Makefile > +++ b/arch/arm/Makefile > @@ -109,6 +109,7 @@ board-$(CONFIG_MACH_PCM027) := > pcm027 > board-$(CONFIG_MACH_PCM037) := pcm037 > board-$(CONFIG_MACH_PCM038) := pcm038 > board-$(CONFIG_MACH_PCM043) := pcm043 > +board-$(CONFIG_MACH_PCM051) := pcm051 > board-$(CONFIG_MACH_PM9261) := pm9261 > board-$(CONFIG_MACH_PM9263) := pm9263 > board-$(CONFIG_MACH_PM9G45) := pm9g45 > diff --git a/arch/arm/boards/pcm051/Makefile b/arch/arm/boards/pcm051/Makefile > new file mode 100644 > index 000..dcfc293 > --- /dev/null > +++ b/arch/arm/boards/pcm051/Makefile > @@ -0,0 +1 @@ > +obj-y += board.o > diff --git a/arch/arm/boards/pcm051/board.c b/arch/arm/boards/pcm051/board.c > new file mode 100644 > index 000..7cb85f1 > --- /dev/null > +++ b/arch/arm/boards/pcm051/board.c > @@ -0,0 +1,72 @@ > +/* > + * pcm051 - phyCORE-AM335x Board Initalization Code > + * > + * Copyright (C) 2012 Teresa Gámez, Phytec Messtechnik GmbH > + * > + * Based on arch/arm/boards/omap/board-beagle.c > + * > + * 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. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program; if not, write to the Free Software > + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, > + * MA 02111-1307 USA > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +static struct NS16550_plat serial_plat = { > + .clock = 4800, /* 48MHz (APLL96/2) */ > + .shift = 2, > +}; > + > +/** > + * @brief UART serial port initialization > + * arch > + * > + * @return result of device registration > + */ > +static int pcm051_console_init(void) > +{ > + /* Register the serial port */ > + add_ns16550_device(DEVICE_ID_DYNAMIC, AM33XX_UART0_BASE, 1024, > + IORESOURCE_MEM_8BIT, &serial_plat); can you create inline function as done on imx or at91 to add devices so do not dupliacte this across boards > + > + return 0; > +} > +console_initcall(pcm051_console_init); > + > +static int pcm051_mem_init(void) > +{ > + arm_add_mem_device("ram0", AM33XX_DRAM_ADDR_SPACE_START, SZ_512M); ditto and can we detect the size fo the sdram? > + > + return 0; > +} > +mem_initcall(pcm051_mem_init); > + > +static int pcm051_devices_init(void) > +{ > + add_generic_device("omap-hsmmc", DEVICE_ID_DYNAMIC, NULL, > + (AM33XX_MMCHS0_BASE + 0x100), SZ_4K, > + IORESOURCE_MEM, NULL); ditto > + > + armlinux_set_bootparams((void *)(AM33XX_DRAM_ADDR_SPACE_START + 0x100)); > +
Re: [PATCHv2 1/2] ARM OMAP AM33XX: create new ARCH for AM33xx
On 14:18 Tue 25 Sep , Teresa Gámez wrote: > Created ARCH for AM33xx boards as second stage bootloader. > This includes: > - Added dmtimer0 > - Created basic header files > - Added MMC support for ARCH_AM33XX > - Added reset function > > Signed-off-by: Teresa Gámez this on e looks good but please add the inline function to add the devices as done on at91 or imx Best Regards, J. ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 0/3] final bus cleanup
HI, The following changes since commit 05b9f24e3ea4071f76ffc4157526946a1c2b1b96: Merge branch 'for-next/sandbox' into next (2012-09-25 10:20:03 +0200) are available in the git repository at: git://git.jcrosoft.org/barebox.git tags/bus for you to fetch changes up to c69f204ed9872d0d05e13ca34d1893181e787374: devinfo: display device bus name (2012-09-25 20:56:14 +0800) Bus finall cleanup this second patch serie will finally switch all platform_bus device/driver registering to platform_driver/device_register now register_driver and register_device are for bus only usage. if no bus specify with register_device this will allow to register a pure device such as net or global. Bus should also register their own device and then attached their child but this could be done in a second step Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Jean-Christophe PLAGNIOL-VILLARD (3): fb: move add param to bus probe switch all platform_bus device/driver registering to platform_driver/device_register devinfo: display device bus name Documentation/porting.txt |2 +- arch/arm/boards/nhk8815/setup.c|2 +- arch/arm/boards/pcm038/pcm970.c|2 +- arch/arm/mach-imx/clocksource.c|2 +- arch/arm/mach-imx/gpio.c |2 +- arch/arm/mach-imx/iim.c|2 +- arch/arm/mach-imx/include/mach/devices-imx51.h |2 +- arch/arm/mach-imx/include/mach/devices-imx53.h |2 +- arch/arm/mach-mxs/ocotp.c |2 +- arch/arm/mach-omap/arch-omap.dox |2 +- arch/arm/mach-omap/gpio.c |3 +-- arch/nios2/boards/generic/generic.c|2 +- arch/sandbox/board/board.c |4 ++-- arch/sandbox/board/devices.c |2 +- arch/sandbox/board/hostfile.c |2 +- commands/mem.c |2 +- common/console.c |2 +- drivers/ata/disk_bios_drive.c |2 +- drivers/ata/intf_platform_ide.c|2 +- drivers/base/driver.c | 31 ++- drivers/base/platform.c| 26 ++ drivers/base/resource.c|2 +- drivers/gpio/gpio-stmpe.c |2 +- drivers/i2c/busses/i2c-imx.c |2 +- drivers/i2c/busses/i2c-omap.c |2 +- drivers/input/gpio_keys.c |2 +- drivers/input/imx_keypad.c |2 +- drivers/mci/atmel_mci.c|2 +- drivers/mci/imx-esdhc.c|2 +- drivers/mci/imx.c |2 +- drivers/mci/mci-core.c |4 ++-- drivers/mci/mxs.c |2 +- drivers/mci/omap_hsmmc.c |2 +- drivers/mci/pxamci.c |2 +- drivers/mci/s3c.c |2 +- drivers/misc/jtag.c|2 +- drivers/mtd/core.c |2 +- drivers/mtd/devices/docg3.c|2 +- drivers/mtd/nand/atmel_nand.c |2 +- drivers/mtd/nand/nand_imx.c|2 +- drivers/mtd/nand/nand_mxs.c|2 +- drivers/mtd/nand/nand_omap_gpmc.c |2 +- drivers/mtd/nand/nand_s3c24xx.c|2 +- drivers/mtd/nand/nomadik_nand.c|2 +- drivers/net/altera_tse.c |2 +- drivers/net/at91_ether.c |2 +- drivers/net/cs8900.c |2 +- drivers/net/davinci_emac.c |2 +- drivers/net/designware.c |2 +- drivers/net/dm9k.c |2 +- drivers/net/ep93xx.c |2 +- drivers/net/fec_imx.c |4 ++-- drivers/net/fec_mpc5200.c |2 +- drivers/net/gianfar.c |2 +- drivers/net/ks8851_mll.c |2 +- drivers/net/macb.c |2 +- drivers/net/netx_eth.c |2 +- drivers/net/smc9.c |2 +- drivers/net/smc911x.c |2 +- drivers/net/tap.c |2 +- drivers/nor/cfi_flash.c|2 +- drivers/of/base.c |2 +- drivers/pwm/pxa_pwm.c |2 +- drivers/serial/arm_dcc.c |4 ++-- drivers/serial/atmel.c
[PATCH 1/3] fb: move add param to bus probe
so the param add added only of the device successed to register. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- drivers/video/fb.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/video/fb.c b/drivers/video/fb.c index ae6ff74..ee53272 100644 --- a/drivers/video/fb.c +++ b/drivers/video/fb.c @@ -127,16 +127,6 @@ int register_framebuffer(struct fb_info *info) info->dev.bus = &fb_bus; register_device(&info->dev); - dev_add_param(dev, "enable", fb_enable_set, NULL, 0); - dev_set_param(dev, "enable", "0"); - - if (info->num_modes && (info->mode_list != NULL) && - (info->fbops->fb_activate_var != NULL)) { - dev_add_param(dev, "mode_name", fb_setup_mode, NULL, 0); - dev_set_param(dev, "mode_name", info->mode_list[0].name); - } - - devfs_create(&info->cdev); return 0; } @@ -173,7 +163,18 @@ static int fb_match(struct device_d *dev, struct driver_d *drv) static int fb_probe(struct device_d *dev) { - return 0; + struct fb_info *info = dev->priv; + + dev_add_param(dev, "enable", fb_enable_set, NULL, 0); + dev_set_param(dev, "enable", "0"); + + if (info->num_modes && (info->mode_list != NULL) && + (info->fbops->fb_activate_var != NULL)) { + dev_add_param(dev, "mode_name", fb_setup_mode, NULL, 0); + dev_set_param(dev, "mode_name", info->mode_list[0].name); + } + + return devfs_create(&info->cdev); } static void fb_remove(struct device_d *dev) -- 1.7.10.4 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 3/3] devinfo: display device bus name
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- drivers/base/driver.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/base/driver.c b/drivers/base/driver.c index a81a9ba..6c8fd05 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c @@ -423,9 +423,12 @@ static int do_devinfo(int argc, char *argv[]) res->start, resource_size(res)); } - printf("driver: %s\n\n", dev->driver ? + printf("driver: %s\n", dev->driver ? dev->driver->name : "none"); + printf("bus: %s\n\n", dev->bus ? + dev->bus->name : "none"); + if (dev->driver) dev->driver->info(dev); -- 1.7.10.4 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 2/3] switch all platform_bus device/driver registering to platform_driver/device_register
now register_driver and register_device are for bus only usage. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- Documentation/porting.txt |2 +- arch/arm/boards/nhk8815/setup.c|2 +- arch/arm/boards/pcm038/pcm970.c|2 +- arch/arm/mach-imx/clocksource.c|2 +- arch/arm/mach-imx/gpio.c |2 +- arch/arm/mach-imx/iim.c|2 +- arch/arm/mach-imx/include/mach/devices-imx51.h |2 +- arch/arm/mach-imx/include/mach/devices-imx53.h |2 +- arch/arm/mach-mxs/ocotp.c |2 +- arch/arm/mach-omap/arch-omap.dox |2 +- arch/arm/mach-omap/gpio.c |3 +-- arch/nios2/boards/generic/generic.c|2 +- arch/sandbox/board/board.c |4 ++-- arch/sandbox/board/devices.c |2 +- arch/sandbox/board/hostfile.c |2 +- commands/mem.c |2 +- common/console.c |2 +- drivers/ata/disk_bios_drive.c |2 +- drivers/ata/intf_platform_ide.c|2 +- drivers/base/driver.c | 26 ++-- drivers/base/platform.c| 26 drivers/base/resource.c|2 +- drivers/gpio/gpio-stmpe.c |2 +- drivers/i2c/busses/i2c-imx.c |2 +- drivers/i2c/busses/i2c-omap.c |2 +- drivers/input/gpio_keys.c |2 +- drivers/input/imx_keypad.c |2 +- drivers/mci/atmel_mci.c|2 +- drivers/mci/imx-esdhc.c|2 +- drivers/mci/imx.c |2 +- drivers/mci/mci-core.c |4 ++-- drivers/mci/mxs.c |2 +- drivers/mci/omap_hsmmc.c |2 +- drivers/mci/pxamci.c |2 +- drivers/mci/s3c.c |2 +- drivers/misc/jtag.c|2 +- drivers/mtd/core.c |2 +- drivers/mtd/devices/docg3.c|2 +- drivers/mtd/nand/atmel_nand.c |2 +- drivers/mtd/nand/nand_imx.c|2 +- drivers/mtd/nand/nand_mxs.c|2 +- drivers/mtd/nand/nand_omap_gpmc.c |2 +- drivers/mtd/nand/nand_s3c24xx.c|2 +- drivers/mtd/nand/nomadik_nand.c|2 +- drivers/net/altera_tse.c |2 +- drivers/net/at91_ether.c |2 +- drivers/net/cs8900.c |2 +- drivers/net/davinci_emac.c |2 +- drivers/net/designware.c |2 +- drivers/net/dm9k.c |2 +- drivers/net/ep93xx.c |2 +- drivers/net/fec_imx.c |4 ++-- drivers/net/fec_mpc5200.c |2 +- drivers/net/gianfar.c |2 +- drivers/net/ks8851_mll.c |2 +- drivers/net/macb.c |2 +- drivers/net/netx_eth.c |2 +- drivers/net/smc9.c |2 +- drivers/net/smc911x.c |2 +- drivers/net/tap.c |2 +- drivers/nor/cfi_flash.c|2 +- drivers/of/base.c |2 +- drivers/pwm/pxa_pwm.c |2 +- drivers/serial/arm_dcc.c |4 ++-- drivers/serial/atmel.c |2 +- drivers/serial/linux_console.c |2 +- drivers/serial/serial_altera.c |2 +- drivers/serial/serial_altera_jtag.c|2 +- drivers/serial/serial_blackfin.c |2 +- drivers/serial/serial_imx.c|2 +- drivers/serial/serial_mpc5xxx.c|2 +- drivers/serial/serial_netx.c |2 +- drivers/serial/serial_ns16550.c|4 ++-- drivers/serial/serial_pl010.c |2 +- drivers/serial/serial_pxa.c|2 +- drivers/serial/serial_s3c.c|2 +- drivers/serial/stm-serial.c|2 +- drivers/spi/altera_spi.c |2 +- drivers/spi/atmel_spi.c|2 +- drivers/spi/imx_spi.c |2 +- drivers/spi/omap3_spi.c|2 +- drivers/usb/gadget/at91_udc.c |2 +- drivers/usb/gadget/fsl_udc.c |2 +- drivers/usb
Re: [PATCH 0/1 v7] net: introduce phylib
On Mon, 2012-09-24 at 11:31 +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > include/linux/phy.h | 266 > ++ > include/miidev.h| 51 + We now have a "struct mii_bus" in include/linux/phy.h and include/miidev.h. Is this intentional? Regards, Jan -- 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/1 v7] net: introduce phylib
On 19:26 Tue 25 Sep , Jan Lübbe wrote: > On Mon, 2012-09-24 at 11:31 +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > > include/linux/phy.h | 266 > > ++ > > include/miidev.h| 51 + > > We now have a "struct mii_bus" in include/linux/phy.h and > include/miidev.h. Is this intentional? miidev is dropped Best Regards, J. ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 0/7] [RFC][PATCH] archosg9: add support for tablet
Hello, A this is my first contribution, so I'm basically requesting for comments. The attached patch adds support for Archos G9 tablet wich uses an OMAP4460 cpu. The tablet by default only boots from internal flash, so to test barebox on it a hardware tweak is required: change the sys_boot configuration. Once done the tablet can be booted with the following command: A sudo scripts/usbboot The patch contains A 1.- specific changes for OMAP4460 A 2.- support for usb-booting A 3.- support for console on usb A 4.- support for file transfer through usb A 5.- some minor bug fixes A 6.- adds support for archosg9 board A question I have is what does omap_vector_init do? It breaks usb-booting. An improvement to be done would be to split the file "scripts/usbboot.c" into a header and two c files, but the Makefile framework seemed to me to do not allow that. In any case the patch should be tested with other boards to check it does not breaks something. vj (7): Improved an error message and solved a minor bug added debug info for twl6030 OMAP specific changes Add USB booting capabilities to OMAP add console support over the same USB used for booting add filesystem support over the same USB used for booting Add support for Archos G9 tablet arch/arm/Makefile | 1 + arch/arm/boards/archosg9/Makefile | 1 + arch/arm/boards/archosg9/board.c| 58 ++ arch/arm/boards/archosg9/env/bin/init | 18 + arch/arm/boards/archosg9/env/config | 2 + arch/arm/boards/archosg9/lowlevel.c | 126 arch/arm/boards/archosg9/mux.c | 226 +++ arch/arm/configs/archosg9_defconfig | 70 +++ arch/arm/configs/archosg9_xload_defconfig | 25 + arch/arm/cpu/cpu.c | 1 + arch/arm/lib/armlinux.c | 2 +- arch/arm/lib/barebox.lds.S | 10 + arch/arm/mach-omap/Kconfig | 30 + arch/arm/mach-omap/Makefile | 1 + 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 | 146 + arch/arm/mach-omap/include/mach/xload.h | 1 + arch/arm/mach-omap/omap4_generic.c | 6 + arch/arm/mach-omap/omap4_rom_usb.c | 189 ++ arch/arm/mach-omap/xload.c | 26 + arch/arm/tools/mach-types | 1 + drivers/mci/omap_hsmmc.c| 2 +- drivers/mfd/twl6030.c | 13 + drivers/serial/Kconfig | 7 + drivers/serial/Makefile | 1 + drivers/serial/serial_usb.c | 64 ++ fs/Kconfig | 5 + fs/Makefile | 1 + fs/usbbootfs.c | 195 ++ include/mfd/twl6030.h | 8 + scripts/.gitignore | 1 + scripts/Makefile| 3 + scripts/usbboot.c | 797 34 files changed, 2100 insertions(+), 30 deletions(-) create mode 100644 arch/arm/boards/archosg9/Makefile create mode 100644 arch/arm/boards/archosg9/board.c create mode 100644 arch/arm/boards/archosg9/env/bin/init create mode 100644 arch/arm/boards/archosg9/env/config create mode 100644 arch/arm/boards/archosg9/lowlevel.c create mode 100644 arch/arm/boards/archosg9/mux.c 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_usb.c create mode 100644 fs/usbbootfs.c create mode 100644 scripts/usbboot.c -- 1.7.12.1 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 1/7] Improved an error message and solved a minor bug
--- arch/arm/lib/armlinux.c | 2 +- drivers/mci/omap_hsmmc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/lib/armlinux.c b/arch/arm/lib/armlinux.c index 191274e..74d59a9 100644 --- a/arch/arm/lib/armlinux.c +++ b/arch/arm/lib/armlinux.c @@ -80,7 +80,7 @@ void armlinux_set_revision(unsigned int rev) #ifdef CONFIG_ENVIRONMENT_VARIABLES export_env_ull("armlinux_system_rev", rev); #else - return armlinux_system_rev; + armlinux_system_rev = rev; #endif } diff --git a/drivers/mci/omap_hsmmc.c b/drivers/mci/omap_hsmmc.c index e0b245b..e6f4e47 100644 --- a/drivers/mci/omap_hsmmc.c +++ b/drivers/mci/omap_hsmmc.c @@ -238,7 +238,7 @@ static int mmc_init_setup(struct mci_host *mci, struct device_d *dev) start = get_time_ns(); while ((readl(&mmc_base->sysstatus) & RESETDONE) == 0) { if (is_timeout(start, SECOND)) { - dev_dbg(hsmmc->dev, "timedout waiting for cc2!\n"); + dev_dbg(hsmmc->dev, "timeout waiting for reset done\n"); return -ETIMEDOUT; } } -- 1.7.12.1 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 2/7] added debug info for twl6030
--- drivers/mfd/twl6030.c | 13 + include/mfd/twl6030.h | 8 2 files changed, 21 insertions(+) diff --git a/drivers/mfd/twl6030.c b/drivers/mfd/twl6030.c index 7ecfed8..a2d16a1 100644 --- a/drivers/mfd/twl6030.c +++ b/drivers/mfd/twl6030.c @@ -39,6 +39,19 @@ static int twl_probe(struct device_d *dev) devfs_create(&(twl_dev->core.cdev)); +#ifdef 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) debug("TWL6030 Error reading ID\n"); +else debug("TWL6030 JTAG REV: 0x%02X, EPROM REV: 0x%02X DIE ID: 0x%016llX\n", (unsigned)jtag_rev, (unsigned)eprom_rev, dieid); +} +#endif + return 0; } diff --git a/include/mfd/twl6030.h b/include/mfd/twl6030.h index f1278d4..bb4f773 100644 --- a/include/mfd/twl6030.h +++ b/include/mfd/twl6030.h @@ -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, -- 1.7.12.1 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 3/7] OMAP specific changes
mux: added definitions with the same names as in the datasheet added two new definitions changed PAD definitions to have the same names in the datasheet changed value for jtag_tck to match the one on the datasheet added base addresses and usb bootsrc --- 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 | 4 ++ 4 files changed, 70 insertions(+), 28 deletions(-) diff --git a/arch/arm/mach-omap/include/mach/omap4-mux.h b/arch/arm/mach-omap/include/mach/omap4-mux.h index d06beaa..4938f1b 100644 --- a/arch/arm/mach-omap/include/mach/omap4-mux.h +++ b/arch/arm/mach-omap/include/mach/omap4-mux.h @@ -36,6 +36,7 @@ struct pad_conf_entry { } __attribute__ ((packed)); +#define WAKEUP_EN (1 << 14) #ifdef CONFIG_OFF_PADCONF #define OFF_PD (1 << 12) #define OFF_PU (3 << 12) @@ -127,14 +128,23 @@ struct pad_conf_entry { #define GPMC_WAIT0 0x008A #define GPMC_WAIT1 0x008C #define C2C_DATA11 0x008E +#define GPMC_WAIT2 0x008E #define C2C_DATA12 0x0090 +#define GPMC_NCS4 0x0090 #define C2C_DATA13 0x0092 +#define GPMC_NCS5 0x0092 #define C2C_DATA14 0x0094 +#define GPMC_NCS6 0x0094 #define C2C_DATA15 0x0096 +#define GPMC_NCS7 0x0096 #define HDMI_HPD 0x0098 +#define GPIO63 0x0098 #define HDMI_CEC 0x009A +#define GPIO64 0x009A #define HDMI_DDC_SCL 0x009C +#define GPIO65 0x009C #define HDMI_DDC_SDA 0x009E +#define GPIO66 0x009E #define CSI21_DX0 0x00A0 #define CSI21_DY0 0x00A2 #define CSI21_DX1 0x00A4 @@ -246,17 +256,29 @@ struct pad_conf_entry { #define USBB2_HSIC_DATA0x0178 #define USBB2_HSIC_STROBE 0x017A #define UNIPRO_TX0 0x017C +#define KPD_COL3 0x017C #define UNIPRO_TY0 0x017E +#define KPD_COL4 0x017E #define UNIPRO_TX1 0x0180 +#define KPD_COL5 0x0180 #define UNIPRO_TY1 0x0182 +#define KPD_COL0 0x0182 #define UNIPRO_TX2 0x0184 +#define KPD_COL1 0x0184 #define UNIPRO_TY2 0x0186 +#define KPD_COL2 0x0186 #define UNIPRO_RX0 0x0188 +#define KPD_ROW3 0x0188 #define UNIPRO_RY0 0x018A +#define KPD_ROW4 0x018A #define UNIPRO_RX1 0x018C +#define KPD_ROW5 0x018C #define UNIPRO_RY1 0x018E +#define KPD_ROW0 0x018E #define UNIPRO_RX2 0x0190 +#define KPD_ROW1 0x0190 #define UNIPRO_RY2 0x0192 +#define KPD_ROW2 0x0192 #define USBA0_OTG_CE 0x0194 #define USBA0_OTG_DP 0x0196 #define USBA0_OTG_DM 0x0198 @@ -290,6 +312,8 @@ struct pad_conf_entry { #define DPM_EMU17 0x01D0 #define DPM_EMU18 0x01D2 #define DPM_EMU19 0x01D4 +#define CSI22_DX2 0x01D6 +#define CSI22_DY2 0x01F4 #define WAKEUPEVENT_0 0x01D8 #define WAKEUPEVENT_1 0x01DC #define WAKEUPEVENT_2 0x01E0 @@ -301,34 +325,34 @@ struct pad_conf_entry { #define WKUP_REVISION 0x #define WKUP_HWINFO0x0004 #define WKUP_SYSCONFIG 0x0010 -#define PAD0_SIM_IO0x0040 -#define PAD1_SIM_CLK 0x0042 -#define PAD0_SIM_RESET 0x0044 -#define PAD1_SIM_CD0x0046 -#define PAD0_SIM_PWRCTRL 0x0048 -#define PAD1_SR_SCL0x004A -#define PAD0_SR_SDA0x004C -#define PAD1_FREF_XTAL_IN 0x004E -#define PAD0_FREF_SLICER_IN0x0050 -#define PAD1_FREF_CLK_IOREQ0x0052 -#define PAD0_FREF_CLK0_OUT 0x0054 -#define PAD1_FREF_CLK3_REQ 0x0056 -#define PAD0_FREF_CLK3_OUT 0x0058 -#define PAD1_FREF_CLK4_REQ 0x005A -#define PAD0_FREF_CLK4_OUT 0x005C -#define PAD1_SYS_32K 0x005E -#define PAD0_SYS_NRESPWRON 0x0060 -#define PAD1_SYS_NRESWARM 0x0062 -#define PAD0_SYS_PWR_REQ 0x0064 -#define PAD1_SYS_PWRON_RESET 0x0066 -#define PAD0_SYS_BOOT6 0x0068 -#define PAD1_SYS_BOOT7 0x006A -#define PAD0_JTAG_NTRST0x006C -#define PAD1_JTAG_TCK 0x006D -#define PAD0_JTAG_RTCK 0x0070 -#define PAD1_JTAG_TMS_TMSC 0x0072 -#define PAD0_JTAG_TDI 0x0074 -#define PAD1_JTAG_TDO 0x0076 +#define GPIO_WK0 0x0040 +#define GPIO_WK1 0x0042 +#define GPIO_WK2 0x0044 +#define GPIO_WK3 0x0046
[PATCH 5/7] add console support over the same USB used for booting
--- drivers/serial/Kconfig | 7 + drivers/serial/Makefile | 1 + drivers/serial/serial_usb.c | 64 + 3 files changed, 72 insertions(+) create mode 100644 drivers/serial/serial_usb.c diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 7eb96ed..4e85e1f 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -100,4 +100,11 @@ config DRIVER_SERIAL_PXA bool "PXA serial driver" depends on ARCH_PXA +config DRIVER_SERIAL_USB + bool "serial driver over omap4 usb" + default n + depends on USB_BOOT + help + Enable this to get console support over the usb bus used to boot an OMAP4 + endmenu diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile index e2d56b9..a89bb44 100644 --- a/drivers/serial/Makefile +++ b/drivers/serial/Makefile @@ -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_USB)+= serial_usb.o diff --git a/drivers/serial/serial_usb.c b/drivers/serial/serial_usb.c new file mode 100644 index 000..25391db --- /dev/null +++ b/drivers/serial/serial_usb.c @@ -0,0 +1,64 @@ +/* + * Use of usb-port as a serial communications port +*/ + +#include +#include +#include +#include +#include + +struct serial_usb_priv { + struct console_device cdev; + int val; +}; + +static void serial_usb_putc(struct console_device *cdev, char c){ + unsigned b = c; + usb_write(&b, 4); +} + +static int serial_usb_tstc(struct console_device *cdev){ + struct serial_usb_priv *priv = container_of(cdev, struct serial_usb_priv, cdev); + if(pusb->dread.status == -1 || pusb->dread.status == STATUS_WAITING) + return 0; + else if(pusb->dread.status != STATUS_OKAY) + usb_queue_read(&priv->val, 4); + return pusb->dread.status == STATUS_OKAY; +} + +static int serial_usb_getc(struct console_device *cdev){ + struct serial_usb_priv *priv = container_of(cdev, struct serial_usb_priv, cdev); + if(pusb->dread.status == -1 || pusb->dread.status == STATUS_WAITING) + ; + else if(pusb->dread.status != STATUS_OKAY) + usb_queue_read(&priv->val, 4); + usb_wait_read(); + pusb->dread.status = -2; + return priv->val; +} + +static int serial_usb_probe(struct device_d *dev){ + struct serial_usb_priv *priv; + priv = xzalloc(sizeof(*priv)); + pusb->dread.status=-2; + + priv->cdev.dev = dev; + priv->cdev.f_caps = CONSOLE_STDIN | CONSOLE_STDOUT | CONSOLE_STDERR; + priv->cdev.tstc = serial_usb_tstc; + priv->cdev.putc = serial_usb_putc; + priv->cdev.getc = serial_usb_getc; + priv->cdev.setbrg = NULL; + + return console_register(&priv->cdev); +} + +static struct driver_d serial_usb_driver = { + .name = "serial_usb", + .probe = serial_usb_probe, +}; + +static int serial_usb_init(void){ + return register_driver(&serial_usb_driver); +} +console_initcall(serial_usb_init); -- 1.7.12.1 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 6/7] add filesystem support over the same USB used for booting
--- fs/Kconfig | 5 ++ fs/Makefile| 1 + fs/usbbootfs.c | 195 + 3 files changed, 201 insertions(+) create mode 100644 fs/usbbootfs.c diff --git a/fs/Kconfig b/fs/Kconfig index 4c66543..1b89aec 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -29,6 +29,11 @@ config FS_TFTP prompt "tftp support" depends on NET +config FS_USBBOOT + bool + prompt "Filesystem over usb boot" + depends on USB_BOOT + config FS_NFS depends on NET bool diff --git a/fs/Makefile b/fs/Makefile index 1b52bee..d4f9a59 100644 --- a/fs/Makefile +++ b/fs/Makefile @@ -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_USBBOOT) += usbbootfs.o obj-$(CONFIG_FS_NFS) += nfs.o diff --git a/fs/usbbootfs.c b/fs/usbbootfs.c new file mode 100644 index 000..a40abbf --- /dev/null +++ b/fs/usbbootfs.c @@ -0,0 +1,195 @@ +/* + * usbbootfs.c + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 + * as published by the Free Software Foundation. + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include +#include +#include +#include +#include +#include +#include + +#define USBBOOT_FS_MAGIC 0x5562464D +#define USBBOOT_FS_CMD_OPEN 0x4653 +#define USBBOOT_FS_CMD_CLOSE 0x46530001 +#define USBBOOT_FS_CMD_READ 0x46530002 +#define USBBOOT_FS_CMD_END 0x4653 + +struct file_priv { +s32 id; +u32 size; +}; +/* +static int usbbootfs_create(struct device_d *dev, const char *pathname, mode_t mode){ +return -ENOSYS; +} + +static int usbbootfs_unlink(struct device_d *dev, const char *pathname){ +return -ENOSYS; +} + +static int usbbootfs_mkdir(struct device_d *dev, const char *pathname){ +return -ENOSYS; +} + +static int usbbootfs_rmdir(struct device_d *dev, const char *pathname){ +return -ENOSYS; +} + +static int usbbootfs_write(struct device_d *_dev, FILE *f, const void *inbuf, size_t size){ +return -ENOSYS; +} + +static int usbbootfs_truncate(struct device_d *dev, FILE *f, ulong size){ +return -ENOSYS; +} +*/ + +static struct file_priv *usbbootfs_do_open(struct device_d *dev, int accmode, const char *filename){ +struct file_priv *priv; +u32 data; + +if(accmode & O_ACCMODE) +return ERR_PTR(-ENOSYS); + +priv = xzalloc(sizeof(*priv)); +if(!priv) +return ERR_PTR(-ENOMEM); + +data = USBBOOT_FS_MAGIC ; usb_write(&data, 4); +data = USBBOOT_FS_CMD_OPEN; usb_write(&data, 4); +usb_puts(filename); +data = USBBOOT_FS_CMD_END ; usb_write(&data, 4); + +if(usb_read(&priv->id, 4) || usb_read(&priv->size, 4)){ +free(priv); +return ERR_PTR(-EIO); +} +if(priv->id<0){ +free(priv); +return ERR_PTR(-ENOENT); +} + +return priv; +} + +static int usbbootfs_open(struct device_d *dev, FILE *file, const char *filename){ +struct file_priv *priv; + +priv = usbbootfs_do_open(dev, file->flags, filename); +if (IS_ERR(priv)) +return PTR_ERR(priv); + +file->inode = priv; +file->size = priv->size; + +return 0; +} + +static int usbbootfs_do_close(struct file_priv *priv){ +u32 data; +data = USBBOOT_FS_MAGIC; usb_write(&data, 4); +data = USBBOOT_FS_CMD_CLOSE; usb_write(&data, 4); +usb_write(&priv->id, 4); +data = USBBOOT_FS_CMD_END ; usb_write(&data, 4); +free(priv); +return 0; +} + +static int usbbootfs_close(struct device_d *dev, FILE *f){ +struct file_priv *priv = f->inode; +return usbbootfs_do_close(priv); +} + +static int usbbootfs_read(struct device_d *dev, FILE *f, void *buf, size_t size){ +struct file_priv *priv = f->inode; +u32 data; + +if( size > priv->size - f->pos) +size = priv->size - f->pos; +if(!size) +return 0; + +data = USBBOOT_FS_MAGIC ; usb_write(&data, 4); +data = USBBOOT_FS_CMD_READ; usb_write(&data, 4); +usb_write(&priv->id, 4); +usb_write(&f->pos, 4); +usb_write(&size, 4); +data = USBBOOT_FS_CMD_END ; usb_write(&data, 4); + +if(usb_read(buf, size)) +return -EIO; + +return size; +} + +static loff_t usbbootfs_lseek(struct device_d *dev, FILE *f, loff_t pos){ +f->pos = pos; +return pos; +} + +static DIR* usbbootfs_opendir(struct device_d *dev, const char *pathname){ +return NULL; +} + +static int usbbootfs_stat(struct device
[PATCH 7/7] Add support for Archos G9 tablet
--- arch/arm/Makefile | 1 + arch/arm/boards/archosg9/Makefile | 1 + arch/arm/boards/archosg9/board.c | 58 arch/arm/boards/archosg9/env/bin/init | 18 +++ arch/arm/boards/archosg9/env/config | 2 + arch/arm/boards/archosg9/lowlevel.c | 126 + arch/arm/boards/archosg9/mux.c| 226 ++ arch/arm/configs/archosg9_defconfig | 70 + arch/arm/configs/archosg9_xload_defconfig | 25 arch/arm/mach-omap/Kconfig| 9 ++ arch/arm/tools/mach-types | 1 + 11 files changed, 537 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/env/bin/init create mode 100644 arch/arm/boards/archosg9/env/config create mode 100644 arch/arm/boards/archosg9/lowlevel.c create mode 100644 arch/arm/boards/archosg9/mux.c create mode 100644 arch/arm/configs/archosg9_defconfig create mode 100644 arch/arm/configs/archosg9_xload_defconfig diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 8e660be..8598005 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -100,6 +100,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 diff --git a/arch/arm/boards/archosg9/Makefile b/arch/arm/boards/archosg9/Makefile new file mode 100644 index 000..c55e26e --- /dev/null +++ b/arch/arm/boards/archosg9/Makefile @@ -0,0 +1 @@ +obj-y += board.o lowlevel.o mux.o diff --git a/arch/arm/boards/archosg9/board.c b/arch/arm/boards/archosg9/board.c new file mode 100644 index 000..5ddb953 --- /dev/null +++ b/arch/arm/boards/archosg9/board.c @@ -0,0 +1,58 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef CONFIG_USB_BOOT +#include +#endif + +#ifdef CONFIG_DRIVER_SERIAL_NS16550 +static struct NS16550_plat serial_plat = { + .clock = 4800, /* 48MHz (APLL96/2) */ + .shift = 2, +}; +#endif +static int archosg9_console_init(void){ +#ifdef CONFIG_USB_BOOT +usb_open(); +usb_puts("USB communications initialized\n"); +# ifdef CONFIG_DRIVER_SERIAL_USB +add_generic_device("serial_usb", DEVICE_ID_DYNAMIC, NULL, 0, 0, 0, NULL); +# endif +#endif +#if defined (CONFIG_DRIVER_SERIAL_NS16550) && ( !defined (CONFIG_OMAP_BUILD_IFT) || !defined (CONFIG_DRIVER_SERIAL_USB) ) +gpio_direction_output( 41, 0); // gps_disable +gpio_direction_output( 34, 1); // 1v8_pwron +add_ns16550_device(DEVICE_ID_DYNAMIC, OMAP44XX_UART1_BASE, 1024, IORESOURCE_MEM_8BIT, &serial_plat); +#endif +return 0; +} +console_initcall(archosg9_console_init); + +static int archosg9_mem_init(void){ + arm_add_mem_device("ram0", 0x8000, SZ_1G); + return 0; +} +mem_initcall(archosg9_mem_init); + +static struct i2c_board_info i2c_devices[] = { + { I2C_BOARD_INFO("twl6030", 0x48), }, +}; + +static int archosg9_devices_init(void){ +i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices)); +add_generic_device("i2c-omap" , DEVICE_ID_DYNAMIC, NULL, OMAP44XX_I2C1_BASE, 0x100, IORESOURCE_MEM, NULL); +add_generic_device("omap-hsmmc", DEVICE_ID_DYNAMIC, NULL, OMAP44XX_MMC1_BASE, SZ_4K, IORESOURCE_MEM, NULL); + /* add_generic_device("omap-hsmmc", DEVICE_ID_DYNAMIC, NULL, OMAP44XX_MMC2_BASE, SZ_4K, IORESOURCE_MEM, NULL); */ + + armlinux_set_bootparams((void *)0x8100); + armlinux_set_architecture(MACH_TYPE_OMAP4_ARCHOSG9); + + return 0; +} +device_initcall(archosg9_devices_init); diff --git a/arch/arm/boards/archosg9/env/bin/init b/arch/arm/boards/archosg9/env/bin/init new file mode 100644 index 000..4c0f244 --- /dev/null +++ b/arch/arm/boards/archosg9/env/bin/init @@ -0,0 +1,18 @@ +#!/bin/sh + +PATH=/env/bin +export PATH + +. /env/config + +if [ -n $autoboot_timeout ]; then + echo + echo -n "Hit any key to stop autoboot: " + timeout -a $autoboot_timeout + if [ $? != 0 ]; then + exit + fi +fi +mkdir /usb +mount -t usbbootfs usbboot /usb +bootm /usb/boot/zImage diff --git a/arch/arm/boards/archosg9/env/config b/arch/arm/boards/archosg9/env/config new file mode 100644 index 000..9e8c1db --- /dev/null +++ b/arch/arm/boards/archosg9/env/config @@ -0,0 +1,2 @@ +autoboot_timeout=3 +bootargs="earlyprintk=serial console=ttyO1,57600n8" diff --git a/arch/arm/boards/archosg9/lowlevel.c b/arch/arm/boards/archosg9/lowlevel.c new file mode 100644 index 000..312edd5 --- /dev/null +++ b/ar
[PATCH 4/7] Add USB booting capabilities to OMAP
--- arch/arm/cpu/cpu.c | 1 + arch/arm/lib/barebox.lds.S | 10 + arch/arm/mach-omap/Kconfig | 21 + arch/arm/mach-omap/Makefile | 1 + arch/arm/mach-omap/include/mach/omap4_rom_usb.h | 146 + arch/arm/mach-omap/omap4_generic.c | 2 + arch/arm/mach-omap/omap4_rom_usb.c | 189 ++ arch/arm/mach-omap/xload.c | 26 + scripts/.gitignore | 1 + scripts/Makefile| 3 + scripts/usbboot.c | 797 11 files changed, 1197 insertions(+) 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/usbboot.c diff --git a/arch/arm/cpu/cpu.c b/arch/arm/cpu/cpu.c index 71ef8c0..05343de 100644 --- a/arch/arm/cpu/cpu.c +++ b/arch/arm/cpu/cpu.c @@ -89,6 +89,7 @@ void arch_shutdown(void) : "r0", "r1", "r2", "r3", "r6", "r10", "r12", "lr", "cc", "memory" ); #endif + __asm__ __volatile__ ("cpsid i\n"); } #ifdef CONFIG_THUMB2_BAREBOX diff --git a/arch/arm/lib/barebox.lds.S b/arch/arm/lib/barebox.lds.S index a69013f..ff7b63d 100644 --- a/arch/arm/lib/barebox.lds.S +++ b/arch/arm/lib/barebox.lds.S @@ -97,6 +97,16 @@ SECTIONS __bss_start = .; .bss : { *(.bss*) } __bss_stop = .; +#ifdef CONFIG_SHARE_USB_HANDLE +/* + * Reserve space for the USB handle + */ + . = CONFIG_USB_HANDLE_HANDOVER; + . = ALIGN(4); + __usb_handle = .; + /* . += sizeof(struct usb); */ + . += 84; +#endif _end = .; _barebox_image_size = __bss_start - TEXT_BASE; } diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig index d735284..8e0a0b3 100644 --- a/arch/arm/mach-omap/Kconfig +++ b/arch/arm/mach-omap/Kconfig @@ -96,6 +96,27 @@ config ARCH_TEXT_BASE default 0x80e8 if MACH_OMAP343xSDP default 0x80e8 if MACH_BEAGLE +config USB_BOOT + bool "enable booting from USB" + default n + depends on ARCH_OMAP4 + help + Enable this to have USB booting + +config SHARE_USB_HANDLE + bool "share the usb handle" + default n + depends on USB_BOOT + help + Enable this to share the usb handle between the xloader and the second stage bootloader. + +config USB_HANDLE_HANDOVER + hex "address where to put the usb handle" + default 0x4030BFAC + depends on SHARE_USB_HANDLE + help + The Address where barebox will put the usb handle to be used in the second stage. + config BOARDINFO default "Texas Instrument's SDP343x" if MACH_OMAP343xSDP default "Texas Instrument's Beagle" if MACH_BEAGLE diff --git a/arch/arm/mach-omap/Makefile b/arch/arm/mach-omap/Makefile index f087f4b..8b35333 100644 --- a/arch/arm/mach-omap/Makefile +++ b/arch/arm/mach-omap/Makefile @@ -30,4 +30,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_USB_BOOT) += omap4_rom_usb.o obj-y += gpio.o diff --git a/arch/arm/mach-omap/include/mach/omap4_rom_usb.h b/arch/arm/mach-omap/include/mach/omap4_rom_usb.h new file mode 100644 index 000..5866a21 --- /dev/null +++ b/arch/arm/mach-omap/include/mach/omap4_rom_usb.h @@ -0,0 +1,146 @@ +/* + * This code is based on: + * git://github.com/swetland/omap4boot.git + */ + +/* + * Copyright (C) 2010 The Android Open Source Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in + *the documentation and/or other materials provided with the + *distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS
Re: [PATCH 0/7] [RFC][PATCH] archosg9: add support for tablet
Hi! You have did a good job! But please check your patch series with the scripts/checkpatch.pl script before submiting it to the maillist. On 26 September 2012 02:59, vj wrote: > Hello, > A this is my first contribution, so I'm basically requesting for comments. > > The attached patch adds support for Archos G9 tablet wich uses an OMAP4460 > cpu. > The tablet by default only boots from internal flash, so to test barebox on > it a hardware tweak is required: change the sys_boot configuration. > Once done the tablet can be booted with the following command: > A sudo scripts/usbboot > > The patch contains > A 1.- specific changes for OMAP4460 > A 2.- support for usb-booting > A 3.- support for console on usb > A 4.- support for file transfer through usb > A 5.- some minor bug fixes > A 6.- adds support for archosg9 board > > A question I have is what does omap_vector_init do? > It breaks usb-booting. > An improvement to be done would be to split the file "scripts/usbboot.c" into > a header and two c files, but the Makefile framework seemed to me to do not > allow that. > > In any case the patch should be tested with other boards to check it does not > breaks something. > > vj (7): > Improved an error message and solved a minor bug > added debug info for twl6030 > OMAP specific changes > Add USB booting capabilities to OMAP > add console support over the same USB used for booting > add filesystem support over the same USB used for booting > Add support for Archos G9 tablet > > arch/arm/Makefile | 1 + > arch/arm/boards/archosg9/Makefile | 1 + > arch/arm/boards/archosg9/board.c| 58 ++ > arch/arm/boards/archosg9/env/bin/init | 18 + > arch/arm/boards/archosg9/env/config | 2 + > arch/arm/boards/archosg9/lowlevel.c | 126 > arch/arm/boards/archosg9/mux.c | 226 +++ > arch/arm/configs/archosg9_defconfig | 70 +++ > arch/arm/configs/archosg9_xload_defconfig | 25 + > arch/arm/cpu/cpu.c | 1 + > arch/arm/lib/armlinux.c | 2 +- > arch/arm/lib/barebox.lds.S | 10 + > arch/arm/mach-omap/Kconfig | 30 + > arch/arm/mach-omap/Makefile | 1 + > 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 | 146 + > arch/arm/mach-omap/include/mach/xload.h | 1 + > arch/arm/mach-omap/omap4_generic.c | 6 + > arch/arm/mach-omap/omap4_rom_usb.c | 189 ++ > arch/arm/mach-omap/xload.c | 26 + > arch/arm/tools/mach-types | 1 + > drivers/mci/omap_hsmmc.c| 2 +- > drivers/mfd/twl6030.c | 13 + > drivers/serial/Kconfig | 7 + > drivers/serial/Makefile | 1 + > drivers/serial/serial_usb.c | 64 ++ > fs/Kconfig | 5 + > fs/Makefile | 1 + > fs/usbbootfs.c | 195 ++ > include/mfd/twl6030.h | 8 + > scripts/.gitignore | 1 + > scripts/Makefile| 3 + > scripts/usbboot.c | 797 > > 34 files changed, 2100 insertions(+), 30 deletions(-) > create mode 100644 arch/arm/boards/archosg9/Makefile > create mode 100644 arch/arm/boards/archosg9/board.c > create mode 100644 arch/arm/boards/archosg9/env/bin/init > create mode 100644 arch/arm/boards/archosg9/env/config > create mode 100644 arch/arm/boards/archosg9/lowlevel.c > create mode 100644 arch/arm/boards/archosg9/mux.c > 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_usb.c > create mode 100644 fs/usbbootfs.c > create mode 100644 scripts/usbboot.c > > -- > 1.7.12.1 > > > ___ > barebox mailing list > barebox@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/barebox -- Best regards, Antony Pavlov ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox