Re: [U-Boot] [PATCH V5] ARM: mx6: Add support for Kosagi Novena
On 08/10/2014 05:55, Nikolay Dimitrov wrote: > Hi Marek, > > I'm marking only the critical issues that are left unfixed from > previous conversations, to speed-up the process a little bit. > I'll send later patches for the non-critical issues to spare you the > extra work (and I'm sure my constructive criticism is already boring > :D ). > > > On 10/06/2014 07:02 PM, Marek Vasut wrote: >> +#define NOVENA_USB_HUB_RESETIMX_GPIO_NR(7, 12) > ... >> +/* >> + * USB >> + */ >> +#ifdef CONFIG_USB_EHCI_MX6 >> +int board_ehci_hcd_init(int port) >> +{ >> +/* Reset USB hub */ >> +if (port == 1) { >> +gpio_set_value(NOVENA_USB_HUB_RESET, 0); >> +mdelay(2); >> +gpio_set_value(NOVENA_USB_HUB_RESET, 1); >> +} >> +return 0; >> +} >> +#endif > > As we previously discussed, this pin definition conflicts with > NOVENA_PCIE_POWER_ON_GPIO (GPIO7_IO12 is connected to PCIE_PWRON), so > by asserting it, you'll turn-off the wrong sub-system. > > Currently the USB hub is reset only by system reset (RESETBMCU > asserted by the PMIC). I don't see how the CPU can selectively reset > the USB hub via a GPIO, so it would be better to remove the reset code. > > @Sean - can you please confirm/reject this finding? > > >> +#define NOVENA_AUDIO_PWRONIMX_GPIO_NR(5, 17) > ... >> +/* >> + * Audio >> + */ >> +static iomux_v3_cfg_t audio_pads[] = { >> +/* AUD_PWRON */ >> +MX6_PAD_DISP0_DAT23__GPIO5_IO17 | MUX_PAD_CTRL(NO_PAD_CTRL), >> +}; > > The speaker amplifiers will still be disabled, as AUDIO_PWRON is not > connected to them (R30A is marked as DNP). You need to add one more > GPIO to enable the speaker amplifiers, here's the fix: > > #define NOVENA_AUDIO_PWRONIMX_GPIO_NR(5, 17) > #define NOVENA_AUDIO_SPK_AMP_ONIMX_GPIO_NR(4, 9) > > /* > * Audio > */ > static iomux_v3_cfg_t audio_pads[] = { > /* AUD_PWRON */ > MX6_PAD_KEY_ROW1__GPIO5_IO17 | MUX_PAD_CTRL(NO_PAD_CTRL), > > /* Speakers' amplifiers #SHDWN */ > MX6_PAD_KEY_ROW1__GPIO4_IO09 | MUX_PAD_CTRL(NO_PAD_CTRL), > }; > > static void novena_spl_setup_iomux_audio(void) > { > imx_iomux_v3_setup_multiple_pads(audio_pads, ARRAY_SIZE(audio_pads)); > > gpio_direction_output(NOVENA_AUDIO_PWRON, 1); > gpio_direction_output(NOVENA_AUDIO_SPK_AMP_ON, 1); > } > > > Side comment: If someone needs to talk to the Audio Codec via I2C3 in > U-Boot environment, don't be surprised if the codec doesn't respond to > any I2C requests at all (I've had such issues with SGTL5000). The most > probable reason is that the codec doesn't receive reference clock from > imx6 GPIO0. This is not a critical issues as later the kernel muxes > this GPIO0 properly, but keep this in mind if you want to hack the > audio-codec at low level. The audio codec ought to answer even when the reference clock isn't active. I actually can't recall, but I think the digital side still works. The audio codec needs to be turned on because otherwise it will pull the SCL and SCK lines low, blocking I2C3 from working at all. Actually, now that I'm looking at it, we just had to make an ECO to get rid of SPK_AMP_ON. It is now ganged to AUDIO_PWRON, because SPK_AMP_ON was accidentally dual-purposed as a GPIO for the front button on the desktop / laptop. This change was made very recently (last Friday I think), and we'll be switching resistors on the mainboard when they're built in order to make the change. That pin should still be muxed as a GPIO, it's just an input now rather than an output. Sean ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/4] Add snoop disable for slave port 0, port 1 and port 2
Hi, Albert, > On Mon, 29 Sep 2014 10:53:11 +0800, Alison Wang > wrote: > > > From: Jason Jin > > > > Disable the snoop for slave interface 0, 1 and 2 to avoid the > > interleaving on the CCI400 BUS. > > Please be more specific: this patch specifically targets arch ls102xa > and some associated boards, but the subject/commit summary (and commit > message) does not mention that, making it look like a very generic > patch. > [Alison Wang] Yes, I will change it in v2. Thanks. Best Regards, Alison Wang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [ANN] U-Boot v2014.10-rc3 released
Dear Tom, In message <20141007002839.GH25506@bill-the-cat> you wrote: > > I've pushed v2014.10-rc4 out to the repository and tarballs should exist > soon. THanks - tarball is out. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de "Those who will be able to conquer software will be able to conquer the world." - Tadahiro Sekimoto, president, NEC Corp. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Upstream uboot and Arndale 5250 support
I used the following values with 2014.10-rc2: kerneladdr=0x4400 ramdiskaddr=0x4500 fdtaddr=0x4c00 But I used a zImage. If you use a uImage, you need to modify the kernel load addr. Guillaume Le 07/10/2014 17:02, Paolo Pisati a écrit : those are the addresses suggested by u-boot and yes, i already tried moving stuff around but it didn't fix it: what's the working config with your board? u-boot version? On Tue, Oct 7, 2014 at 4:34 PM, Guillaume Gardet wrote: Hi, Le 07/10/2014 14:58, Paolo Pisati a écrit : Hi, i've been trying to update the u-boot on my board (sd booting), from the Linaro one (2012.10) to a v2014.X, but so far had no luck: make arndale_config export CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- make ... dd if=arndale-bl1.bin of=/dev/sdc bs=512 skip=1 dd if=arndale-spl.bin of=/dev/sdc bs=512 skip=17 dd if=./u-boot-dtb.bin of=/dev/sdc bs=512 skip=49 ... u-boot 3.10rc3 (same happens with v2014.07 or 2014.04): U-Boot 2014.10-rc3 (Oct 07 2014 - 13:26:48) for ARNDALE CPU:Exynos5250@1000MHz Board: Arndale I2C: i2c_init: failed to init bus 0 for speed = 10 ready DRAM: 2 GiB trace: copying 00086db4 bytes of early data from 5000 to beff trace: enabled WARNING: Caches not enabled MMC: EXYNOS DWMMC: 0, EXYNOS DWMMC: 1 dwmci_send_cmd: DATA ERROR! i2c_init: failed to init bus 0 for speed = 10 In:serial Out: serial Err: serial Net: Net Initialization Skipped No ethernet found. Hit any key to stop autoboot: 0 ARNDALE # printenv baudrate=115200 bootargs=console=ttySAC2,115200n8 root=/dev/mmcblk1p1 rw rootwait debug earlyprintk bootcmd=run bootcmd_ubuntu bootcmd_ubuntu=run loadk; run loadf; run loadr; bootm ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r} bootdelay=3 fdt_addr_r=0x4100 filesize=5b9902 kernel_addr_r=0x40007000 loadf=ext2load mmc 1:1 ${fdt_addr_r} /boot/exynos5250-arndale.dtb loadk=ext2load mmc 1:1 ${kernel_addr_r} /boot/uImage loadr=ext2load mmc 1:1 ${ramdisk_addr_r} /boot/uInitrd ramdisk_addr_r=0x4200 stderr=serial stdin=serial stdout=serial Environment size: 589/16380 bytes ARNDALE # run loadk 6002946 bytes read in 1117 ms (5.1 MiB/s) ARNDALE # bootm ${kernel_addr_r} ## Booting kernel from Legacy Image at 40007000 ... Image Name: kernel 3.16.0-20-generic Image Type: ARM Linux Kernel Image (uncompressed) Data Size:6002882 Bytes = 5.7 MiB Load Address: 40008000 Entry Point: 40008000 Verifying Checksum ... OK Loading Kernel Image ... OK Starting kernel ...(fake run for tracing) Starting kernel ... [stuck here] I faced this problem some times ago. Try to modify kernel, initrd and fdt addresses. Guillaume ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] mtd: denali: fix NAND_CMD_PARAM command
On Fri, 2014-10-03 at 20:03 +0900, Masahiro Yamada wrote: > NAND_CMD_PARAM (0xEC) command is not working on the Denali > NAND controller driver. > > Unlike NAND_CMD_READID (0x90), when the NAND_CMD_PARAM command > is followed by an address cycle, the target device goes busy. > (R/B# is deasserted) > Wait until the parameter data are ready. > > In addition, unnecessary clear_interrupts() should be removed. > > Signed-off-by: Masahiro Yamada > --- > > drivers/mtd/nand/denali.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c > index ba3de1a..d9abc7e 100644 > --- a/drivers/mtd/nand/denali.c > +++ b/drivers/mtd/nand/denali.c > @@ -1059,9 +1059,8 @@ static void denali_cmdfunc(struct mtd_info *mtd, > unsigned int cmd, int col, > addr = MODE_11 | BANK(denali->flash_bank); > index_addr(denali, addr | 0, cmd); > break; > - case NAND_CMD_PARAM: > - clear_interrupts(denali); > case NAND_CMD_READID: > + case NAND_CMD_PARAM: > reset_buf(denali); > /* sometimes ManufactureId read from register is not right >* e.g. some of Micron MT29F32G08QAA MLC NAND chips > @@ -1070,6 +1069,8 @@ static void denali_cmdfunc(struct mtd_info *mtd, > unsigned int cmd, int col, > addr = MODE_11 | BANK(denali->flash_bank); > index_addr(denali, addr | 0, cmd); > index_addr(denali, addr | 1, col & 0xFF); > + if (cmd == NAND_CMD_PARAM) > + udelay(50); > break; > case NAND_CMD_READ0: > case NAND_CMD_SEQIN: Acked-by: Chin Liang See ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] mtd: denali: support NAND_CMD_RNDOUT command
On Fri, 2014-10-03 at 20:03 +0900, Masahiro Yamada wrote: > The function nand_flash_detect_ext_param_page() requires > NAND_CMD_RNDOUT command supported. It is necessary to detect some > types of ONFi-compliant devices. Without it, the error message > "unsupported command received 0x5" is shown. > > Let's support this command on the Denali NAND controller driver. > > Signed-off-by: Masahiro Yamada > --- > > drivers/mtd/nand/denali.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c > index d9abc7e..308b784 100644 > --- a/drivers/mtd/nand/denali.c > +++ b/drivers/mtd/nand/denali.c > @@ -1072,6 +1072,13 @@ static void denali_cmdfunc(struct mtd_info *mtd, > unsigned int cmd, int col, > if (cmd == NAND_CMD_PARAM) > udelay(50); > break; > + case NAND_CMD_RNDOUT: > + addr = MODE_11 | BANK(denali->flash_bank); > + index_addr(denali, addr | 0, cmd); > + index_addr(denali, addr | 1, col & 0xFF); > + index_addr(denali, addr | 1, col >> 8); > + index_addr(denali, addr | 0, NAND_CMD_RNDOUTSTART); > + break; > case NAND_CMD_READ0: > case NAND_CMD_SEQIN: > denali->page = page; Acked-by: Chin Liang See ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PULL] Please pull u-boot-imx
Hi Albert, please pull from u-boot-imx, thanks ! cm_fx6 is still broken in u-boot-imx, but after merging with Tom's tree it is built correctly. The following changes since commit 2a8c9c86b92a9ccee3c27286de317e19bb0530b3: Merge branch 'u-boot-ti/master' into 'u-boot-arm/master' (2014-09-21 16:56:44 +0200) are available in the git repository at: git://www.denx.de/git/u-boot-imx.git master for you to fetch changes up to 5e3a388cddce1685ccd9bc1b58ddb89a191ed88f: nitrogen6x: config: enable EXT4 filesystem (2014-10-06 17:57:23 +0200) Andrew Ruder (2): arm: mx31: use common timer functions arm: mx35: use common timer functions Christian Gmeiner (1): imx6: add Bachmann OT1200 board Diego Rondini (1): nitrogen6x: config: allow boot to USB stick Eric Nelson (23): nitrogen6x: Update DDR timings for 2G memory arrangement nitrogen6x: implement board_cfb_skip() to disable text output nitrogen6x: configure SD2 pads for SDIO on USDHC2 nitrogen6x: power-down miscellanous peripherals nitrogen6x: staticize board file nitrogen6x: prevent warnings about board_ehci* callbacks nitrogen6x: display: add qvga panel nitrogen6x: display: add support for LG-9.7 LVDS display nitrogen6x: display: add LDB-WXGA-S for SPWG 1280x800 displays nitrogen6x: display: add support for fusion 7 display nitrogen6x: display: add svga display (800x600) nitrogen6x: display: add Ampire 1024x600 panel nitrogen6x: display: add wvga-lvds panel nitrogen6x: display use I2C detect for HDMI nitrogen6x: config: add USB Mass Storage (ums) support nitrogen6x: config: add initrd_high nitrogen6x: config: expose SATA, then MMC over USB nitrogen6x: config: enable USB keyboard support nitrogen6x: config: add CONFIG_CMD_MEMTEST nitrogen6x: config: enable "i2c edid" nitrogen6x: config: disable logo nitrogen6x: config: add gpio command nitrogen6x: config: enable Android fastboot Fabio Estevam (9): mx6sxsabresd: Staticize i2c_pad_info1 mx6qsabreauto: Staticize when possible cm_fx6: Remove CONFIG_NETMASK mx51evk: Fix CONFIG_SYS_FSL_ESDHC_ADDR mx51evk: Add generic board support mx25pdk: Fix CONFIG_SYS_FSL_ESDHC_ADDR mx25pdk: Add generic board support wandboard: Select CONFIG_CMD_FUSE mx6sxsabresd: Fix PCI reset and power GPIO assignments Guillaume GARDET (1): imx: nitrogen6x: Make use of both uSD and SD slots to load script or kernel on Sabrelite board Kevin Mihelich (2): nitrogen6x: config: use FS_GENERIC load command nitrogen6x: config: enable EXT4 filesystem Marek Vasut (11): usb: ehci: mxs: Add board-specific callbacks arm: mxs: Wait when disabling VDDMEM current limiter arm: mxs: Wait for DRAM to start arm: mxs: olinuxino: Enable USB only when needed arm: mxs: olinuxino: Fine-tune DRAM configuration arm: m28evk: Test if bootscript exists before loading it arm: m53evk: Test if bootscript exists before loading it arm: m28evk: Enable FS_GENERIC arm: m53evk: Enable FS_GENERIC arm: m28evk: Zap superfluous tab in env arm: m53evk: Zap superfluous tab in env Nitin Garg (3): imx: ddr: Move mx6q_4x_mt41j128.cfg to mx6sabresd board imx: Support i.MX6 High Assurance Boot authentication imx6sx: Fix i.MX6SX HAB api function table offset Peng Fan (3): imx:mx6sxsabresd: change CONFIG_SYS_FSL_ESDHC_ADDR imx:mx6qarm2: change CONFIG_SYS_FSL_ESDHC_ADDR imx:mx6slevk: change CONFIG_SYS_FSL_ESDHC_ADDR Robert Winkler (1): nitrogen6x: display: add support lvds jeida screen Stefan Agner (2): mtd: nand: add Freescale vf610_nfc driver arm: vf610: add NAND support for vf610twr Stefan Roese (1): ARM: mx6: gw_ventana: Remove superfluous memset of GD in board_init_f Stefano Babic (3): Merge branch 'master' of git://git.denx.de/u-boot-arm imx: Fix warning by building vf610twr_nand Merge branch 'master' of git://git.denx.de/u-boot-arm Troy Kisky (4): nitrogen6x: simplify board_mmc_getcd nitrogen6x: configure SGTL5000, CSI camera clock outputs nitrogen6x: phy: add 100 us delay after phy reset nitrogen6x: config: allow more bootargs parameters Ye.Li (6): imx: mx6qarm2: Add the kernel FDT Loading support imx: mx6qarm2: Change the mmcroot and mmcpart env value imx: mx6: Checking PLL2 PFD0 and PFD2 for periph_clk before PFD reset usb: ehci-mx6: Rename the USB register base address imx: mx6dlarm2: Add support for i.MX6DL arm2 DDR3 board imx: mx6dlarm2: Add support for i.MX6Q/DL arm2 LPDDR2 boards arch/arm/Kconfig | 4 + arch/arm/cpu/arm1136/mx31/timer.c | 104 +-- arch/arm/cpu/arm1136/mx35/timer.
Re: [U-Boot] [PATCH] cmd_sf: add handler for +len arg for all commands
On Sun, 2014-10-05 at 22:55 +0200, ma...@denx.de wrote: > On Sunday, October 05, 2014 at 10:35:06 PM, Maxime Hadjinlian wrote: > > On Sun, Oct 5, 2014 at 10:28 PM, Marek Vasut wrote: > > > On Sunday, October 05, 2014 at 09:51:27 PM, Maxime Hadjinlian wrote: > > >> On Sun, Oct 5, 2014 at 9:45 PM, Marek Vasut wrote: > > >> > On Sunday, October 05, 2014 at 09:27:00 PM, Maxime Hadjinlian wrote: > > >> >> On Sun, Oct 5, 2014 at 9:19 PM, wrote: > > >> >> >> On Sunday, October 05, 2014 at 08:40:26 PM, Maxime Hadjinlian > > >> >> >> wrote: > > >> >> >> > Hi Thomas, all, > > >> >> >> > > > >> >> >> > On Sun, Oct 5, 2014 at 7:43 PM, > > >> >> >> > wrote: > > >> >> >> > > Hello Maxime, > > >> >> >> > > > > >> >> >> > > can you explain the usecase? > > >> >> >> > > I think, only the erase is executed per sector, all other > > >> >> >> > > commands are working fine with a byte oriented length. > > >> >> >> > > > >> >> >> > I need to write a file that is downloaded through TFTP. So I can > > >> >> >> > get the filesize through the variable of the same name, but if > > >> >> >> > it's not rounded, the write command may fail. > > >> >> >> > I can save the filesize in another variable, but at next boot, > > >> >> >> > when I need to read this file, I can't read the file, since I > > >> >> >> > only know it's size in byte, I need to be able to round it > > >> >> >> > again. > > >> >> >> > > >> >> >> I wonder, do all SPI flashes need to do sector-aligned writes ? > > >> >> > > > >> >> > All the serial flashes I have seen so far do support reading and > > >> >> > writing with any length, independent from the erase size. > > >> >> > Otherwise the current implementation of env_sf.c would also not > > >> >> > work. > > >> >> > > >> >> Well the QSPI, I used, does not. Every read and write has to be > > >> >> aligned. That's why I needed that in the first place. > > >> > > > >> > Aligned how exactly? > > >> > > >> sector-aligned. > > >> If I write anything that is not sector aligned, the 'sf' command will > > >> fail. > > > > > > Is that really a property of the SPI flash or the SPI controller ? And if > > > the later, is it a property of a particular one or is that a common > > > thing ? > > > > I'll have to check but if I remember correctly, it's the SPI flash. > > It's a Micron Serial NOR flash (N25Q512A83G1240x). > > And the controller is the Cadence QSPI controller available on the SoC > > FPGA platform. > > Maybe what caused my issues was the driver after all ? > > +CC Altera guys, they might help too. Hmmm quite strange to write for sector aligned. Wonder the write related to filesystem access? Within Cadence QSPI controller, read and write access need to be done within a page. But that would be taken care by controller when the access beyond the next page. From software perspective, we just tell controller the numbers of bytes to be transfer (for indirect transfer setup). Chin Liang > > Best regards, > Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/6] Exynos5800: Introduce new proid for Exynos5800
This patch intends to add a new proid for Exynos5800 which is a variant of Exynos5420. Product id for Exynos5800 is 0x5422. Both Exynos5420 and Exynos5800 are pin to pin compitable. This gives us an advantage of reusing Exynos5420 clock, pinmux, memory and other settings. Signed-off-by: Akshay Saraswat --- arch/arm/cpu/armv7/exynos/clock.c | 19 ++- arch/arm/cpu/armv7/exynos/clock_init_exynos5.c | 2 +- arch/arm/cpu/armv7/exynos/pinmux.c | 2 +- arch/arm/include/asm/arch-exynos/cpu.h | 10 +- arch/arm/include/asm/arch-exynos/gpio.h| 4 ++-- drivers/gpio/s5p_gpio.c| 2 +- 6 files changed, 24 insertions(+), 15 deletions(-) diff --git a/arch/arm/cpu/armv7/exynos/clock.c b/arch/arm/cpu/armv7/exynos/clock.c index 7558eff..4ecce44 100644 --- a/arch/arm/cpu/armv7/exynos/clock.c +++ b/arch/arm/cpu/armv7/exynos/clock.c @@ -118,7 +118,8 @@ static int exynos_get_pll_clk(int pllreg, unsigned int r, unsigned int k) div = PLL_DIV_1024; else if (proid_is_exynos4412()) div = PLL_DIV_65535; - else if (proid_is_exynos5250() || proid_is_exynos5420()) + else if (proid_is_exynos5250() || proid_is_exynos5420() +|| proid_is_exynos5800()) div = PLL_DIV_65536; else return 0; @@ -1581,7 +1582,7 @@ static unsigned long exynos4_get_i2c_clk(void) unsigned long get_pll_clk(int pllreg) { if (cpu_is_exynos5()) { - if (proid_is_exynos5420()) + if (proid_is_exynos5420() || proid_is_exynos5800()) return exynos5420_get_pll_clk(pllreg); return exynos5_get_pll_clk(pllreg); } else { @@ -1617,7 +1618,7 @@ unsigned long get_i2c_clk(void) unsigned long get_pwm_clk(void) { if (cpu_is_exynos5()) { - if (proid_is_exynos5420()) + if (proid_is_exynos5420() || proid_is_exynos5800()) return exynos5420_get_pwm_clk(); return clock_get_periph_rate(PERIPH_ID_PWM0); } else { @@ -1630,7 +1631,7 @@ unsigned long get_pwm_clk(void) unsigned long get_uart_clk(int dev_index) { if (cpu_is_exynos5()) { - if (proid_is_exynos5420()) + if (proid_is_exynos5420() || proid_is_exynos5800()) return exynos5420_get_uart_clk(dev_index); return exynos5_get_uart_clk(dev_index); } else { @@ -1643,7 +1644,7 @@ unsigned long get_uart_clk(int dev_index) unsigned long get_mmc_clk(int dev_index) { if (cpu_is_exynos5()) { - if (proid_is_exynos5420()) + if (proid_is_exynos5420() || proid_is_exynos5800()) return exynos5420_get_mmc_clk(dev_index); return exynos5_get_mmc_clk(dev_index); } else { @@ -1654,7 +1655,7 @@ unsigned long get_mmc_clk(int dev_index) void set_mmc_clk(int dev_index, unsigned int div) { if (cpu_is_exynos5()) { - if (proid_is_exynos5420()) + if (proid_is_exynos5420() || proid_is_exynos5800()) exynos5420_set_mmc_clk(dev_index, div); else exynos5_set_mmc_clk(dev_index, div); @@ -1668,7 +1669,7 @@ unsigned long get_lcd_clk(void) if (cpu_is_exynos4()) return exynos4_get_lcd_clk(); else { - if (proid_is_exynos5420()) + if (proid_is_exynos5420() || proid_is_exynos5800()) return exynos5420_get_lcd_clk(); else return exynos5_get_lcd_clk(); @@ -1682,7 +1683,7 @@ void set_lcd_clk(void) else { if (proid_is_exynos5250()) exynos5_set_lcd_clk(); - else if (proid_is_exynos5420()) + else if (proid_is_exynos5420() || proid_is_exynos5800()) exynos5420_set_lcd_clk(); } } @@ -1696,7 +1697,7 @@ void set_mipi_clk(void) int set_spi_clk(int periph_id, unsigned int rate) { if (cpu_is_exynos5()) { - if (proid_is_exynos5420()) + if (proid_is_exynos5420() || proid_is_exynos5800()) return exynos5420_set_spi_clk(periph_id, rate); return exynos5_set_spi_clk(periph_id, rate); } else { diff --git a/arch/arm/cpu/armv7/exynos/clock_init_exynos5.c b/arch/arm/cpu/armv7/exynos/clock_init_exynos5.c index b6a9bc1..0aff3d0 100644 --- a/arch/arm/cpu/armv7/exynos/clock_init_exynos5.c +++ b/arch/arm/cpu/armv7/exynos/clock_init_exynos5.c @@ -971,7 +971,7 @@ static void exynos5420_system_clock_init(void) void system_clock_init(void) { - if (proid_is_exynos5420()) + if (proid_is_exynos5420() || proid_is_exynos5800()) exynos5420_system_clock_init(); els
[U-Boot] [PATCH 4/6] DMC: Exynos5: Enable update mode for DREX controller
From: Alim Akhtar As per Exynos5800 UM ver 0.00 section 17.13.2.1 CONCONTROL register bit 3 [update_mode], Exynos5800 does not support the PHY initiated update. And it is recommanded to set this field to 1'b1 during initialization. This patch sets this bit. Applying MC-initiated mode makes DDL tracking ON, that helps in compensate MIF voltage variation. Signed-off-by: Alim Akhtar Signed-off-by: Doug Anderson Signed-off-by: Akshay Saraswat --- arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c | 19 +++ arch/arm/include/asm/arch-exynos/dmc.h| 1 + 2 files changed, 20 insertions(+) diff --git a/arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c b/arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c index b86dd2d..4d73b45 100644 --- a/arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c +++ b/arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c @@ -832,6 +832,25 @@ int ddr3_mem_ctrl_init(struct mem_timings *mem, int reset) setbits_le32(&drex0->cgcontrol, DMC_INTERNAL_CG); setbits_le32(&drex1->cgcontrol, DMC_INTERNAL_CG); + /* +* As per Exynos5800 UM ver 0.00 section 17.13.2.1 +* CONCONTROL register bit 3 [update_mode], Exynos5800 does not +* support the PHY initiated update. And it is recommended to set +* this field to 1'b1 during initialization +* +* When we apply PHY-initiated mode, DLL lock value is determined +* once at DMC init time and not updated later when we change the MIF +* voltage based on ASV group in kernel. Applying MC-initiated mode +* makes sure that DLL tracing is ON so that silicon is able to +* compensate the voltage variation. +*/ + val = readl(&drex0->concontrol); + val |= CONCONTROL_UPDATE_MODE; + writel(val , &drex0->concontrol); + val = readl(&drex1->concontrol); + val |= CONCONTROL_UPDATE_MODE; + writel(val , &drex1->concontrol); + return 0; } #endif diff --git a/arch/arm/include/asm/arch-exynos/dmc.h b/arch/arm/include/asm/arch-exynos/dmc.h index ec3f9b6..4990a1a 100644 --- a/arch/arm/include/asm/arch-exynos/dmc.h +++ b/arch/arm/include/asm/arch-exynos/dmc.h @@ -450,6 +450,7 @@ enum mem_manuf { #define CONCONTROL_RD_FETCH_SHIFT 12 #define CONCONTROL_RD_FETCH_MASK (0x7 << CONCONTROL_RD_FETCH_SHIFT) #define CONCONTROL_AREF_EN_SHIFT 5 +#define CONCONTROL_UPDATE_MODE (1 << 3) /* PRECHCONFIG register field */ #define PRECHCONFIG_TP_CNT_SHIFT 24 -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/6] Exynos5800: Add DTS for new board Peach-Pi
We have a new board Peach-Pi similar to Peach-Pit. Peach-Pi differs from Peach-Pit in configuration factors like display resolution, memory size, SoC version etc. Signed-off-by: Akshay Saraswat --- arch/arm/dts/Makefile| 3 +- arch/arm/dts/exynos5800-peach-pi.dts | 157 +++ 2 files changed, 159 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/exynos5800-peach-pi.dts diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 1ccd827..36e68d7 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -8,7 +8,8 @@ dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ exynos5250-snow.dtb \ exynos5250-smdk5250.dtb \ exynos5420-smdk5420.dtb \ - exynos5420-peach-pit.dtb + exynos5420-peach-pit.dtb \ + exynos5800-peach-pi.dtb dtb-$(CONFIG_MX6) += imx6q-sabreauto.dtb dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \ tegra20-medcom-wide.dtb \ diff --git a/arch/arm/dts/exynos5800-peach-pi.dts b/arch/arm/dts/exynos5800-peach-pi.dts new file mode 100644 index 000..1c6aa8f --- /dev/null +++ b/arch/arm/dts/exynos5800-peach-pi.dts @@ -0,0 +1,157 @@ +/* + * SAMSUNG/GOOGLE Peach-Pit board device tree source + * + * Copyright (c) 2013 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +/dts-v1/; +/include/ "exynos54xx.dtsi" + +/ { + model = "Samsung/Google Peach Pi board based on Exynos5800"; + + compatible = "google,pit-rev#", "google,pit", + "google,peach", "samsung,exynos5800", "samsung,exynos5"; + + config { + google,bad-wake-gpios = <&gpio 0x56 0>; /* gpx0-6 */ + hwid = "PIT TEST A-A 7848"; + lazy-init = <1>; + }; + + aliases { + serial0 = "/serial@12C3"; + console = "/serial@12C3"; + pmic = "/i2c@12ca"; + }; + + dmc { + mem-manuf = "samsung"; + mem-type = "ddr3"; + clock-frequency = <8>; + arm-frequency = <17>; + }; + + tmu@1006 { + samsung,min-temp= <25>; + samsung,max-temp= <125>; + samsung,start-warning = <95>; + samsung,start-tripping = <105>; + samsung,hw-tripping = <110>; + samsung,efuse-min-value = <40>; + samsung,efuse-value = <55>; + samsung,efuse-max-value = <100>; + samsung,slope = <274761730>; + samsung,dc-value= <25>; + }; + + /* MAX77802 is on i2c bus 4 */ + i2c@12ca { + clock-frequency = <40>; + power-regulator@9 { + compatible = "maxim,max77802-pmic"; + reg = <0x9>; + }; + }; + + i2c@12cd { /* i2c7 */ + clock-frequency = <10>; + soundcodec@20 { + reg = <0x20>; + compatible = "maxim,max98090-codec"; + }; + + edp-lvds-bridge@48 { + compatible = "parade,ps8625"; + reg = <0x48>; + }; + }; + +sound@383 { +samsung,codec-type = "max98090"; +}; + + i2c@12e1 { /* i2c9 */ + clock-frequency = <40>; +tpm@20 { +compatible = "infineon,slb9645-tpm"; +reg = <0x20>; + }; + }; + + spi@12d3 { /* spi1 */ + spi-max-frequency = <5000>; + firmware_storage_spi: flash@0 { + reg = <0>; + + /* +* A region for the kernel to store a panic event +* which the firmware will add to the log. + */ + elog-panic-event-offset = <0x01e0 0x10>; + + elog-shrink-size = <0x400>; + elog-full-threshold = <0xc00>; + }; + }; + + spi@12d4 { /* spi2 */ + spi-max-frequency = <400>; + spi-deactivate-delay = <200>; + cros-ec@0 { + reg = <0>; + compatible = "google,cros-ec"; + spi-half-duplex; + spi-max-timeout-ms = <1100>; + spi-frame-header = <0xec>; + ec-interrupt = <&gpio 93 1>; /* GPX1_5 */ + + /* +* This describes the flash memory within the EC. Note +* that the STM32L flash erases to 0, not 0xff. +*/ + #address-cells = <1>; + #size-cells = <1>;
[U-Boot] [PATCH 1/2] WIP: Add support for pi
Signed-off-by: Akshay Saraswat --- arch/arm/cpu/armv7/exynos/Kconfig| 5 +- arch/arm/dts/Makefile| 3 +- arch/arm/dts/exynos5800-peach-pi.dts | 157 +++ board/samsung/smdk5420/Kconfig | 16 board/samsung/smdk5420/MAINTAINERS | 2 + configs/peach-pi_defconfig | 4 + include/configs/exynos5420.h | 2 +- include/configs/peach-pi.h | 35 8 files changed, 221 insertions(+), 3 deletions(-) create mode 100644 arch/arm/dts/exynos5800-peach-pi.dts create mode 100644 configs/peach-pi_defconfig create mode 100644 include/configs/peach-pi.h diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig index b6a558b..76c0faf 100644 --- a/arch/arm/cpu/armv7/exynos/Kconfig +++ b/arch/arm/cpu/armv7/exynos/Kconfig @@ -33,9 +33,12 @@ config TARGET_SNOW config TARGET_SMDK5420 bool "SMDK5420 board" -config TARGET_PEACH_PIT +config TARGET_PEACH_PI bool "Peach Pi board" +config TARGET_PEACH_PIT + bool "Peach Pit board" + endchoice config SYS_CPU diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 1ccd827..36e68d7 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -8,7 +8,8 @@ dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ exynos5250-snow.dtb \ exynos5250-smdk5250.dtb \ exynos5420-smdk5420.dtb \ - exynos5420-peach-pit.dtb + exynos5420-peach-pit.dtb \ + exynos5800-peach-pi.dtb dtb-$(CONFIG_MX6) += imx6q-sabreauto.dtb dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \ tegra20-medcom-wide.dtb \ diff --git a/arch/arm/dts/exynos5800-peach-pi.dts b/arch/arm/dts/exynos5800-peach-pi.dts new file mode 100644 index 000..1c6aa8f --- /dev/null +++ b/arch/arm/dts/exynos5800-peach-pi.dts @@ -0,0 +1,157 @@ +/* + * SAMSUNG/GOOGLE Peach-Pit board device tree source + * + * Copyright (c) 2013 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +/dts-v1/; +/include/ "exynos54xx.dtsi" + +/ { + model = "Samsung/Google Peach Pi board based on Exynos5800"; + + compatible = "google,pit-rev#", "google,pit", + "google,peach", "samsung,exynos5800", "samsung,exynos5"; + + config { + google,bad-wake-gpios = <&gpio 0x56 0>; /* gpx0-6 */ + hwid = "PIT TEST A-A 7848"; + lazy-init = <1>; + }; + + aliases { + serial0 = "/serial@12C3"; + console = "/serial@12C3"; + pmic = "/i2c@12ca"; + }; + + dmc { + mem-manuf = "samsung"; + mem-type = "ddr3"; + clock-frequency = <8>; + arm-frequency = <17>; + }; + + tmu@1006 { + samsung,min-temp= <25>; + samsung,max-temp= <125>; + samsung,start-warning = <95>; + samsung,start-tripping = <105>; + samsung,hw-tripping = <110>; + samsung,efuse-min-value = <40>; + samsung,efuse-value = <55>; + samsung,efuse-max-value = <100>; + samsung,slope = <274761730>; + samsung,dc-value= <25>; + }; + + /* MAX77802 is on i2c bus 4 */ + i2c@12ca { + clock-frequency = <40>; + power-regulator@9 { + compatible = "maxim,max77802-pmic"; + reg = <0x9>; + }; + }; + + i2c@12cd { /* i2c7 */ + clock-frequency = <10>; + soundcodec@20 { + reg = <0x20>; + compatible = "maxim,max98090-codec"; + }; + + edp-lvds-bridge@48 { + compatible = "parade,ps8625"; + reg = <0x48>; + }; + }; + +sound@383 { +samsung,codec-type = "max98090"; +}; + + i2c@12e1 { /* i2c9 */ + clock-frequency = <40>; +tpm@20 { +compatible = "infineon,slb9645-tpm"; +reg = <0x20>; + }; + }; + + spi@12d3 { /* spi1 */ + spi-max-frequency = <5000>; + firmware_storage_spi: flash@0 { + reg = <0>; + + /* +* A region for the kernel to store a panic event +* which the firmware will add to the log. + */ + elog-panic-event-offset = <0x01e0 0x10>; + + elog-shrink-size = <0x400>; + elog-full-threshold = <0xc00>; + }; + }; + + spi@12d4 { /* spi2 */ + spi-max-frequency = <40
[U-Boot] [PATCH 2/2] WIP2: Add support for pi
Signed-off-by: Akshay Saraswat --- arch/arm/cpu/armv7/exynos/clock.c | 20 +++- arch/arm/cpu/armv7/exynos/clock_init_exynos5.c | 2 +- arch/arm/cpu/armv7/exynos/pinmux.c | 2 +- arch/arm/include/asm/arch-exynos/cpu.h | 11 ++- arch/arm/include/asm/arch-exynos/gpio.h| 4 ++-- drivers/gpio/s5p_gpio.c| 2 +- 6 files changed, 26 insertions(+), 15 deletions(-) diff --git a/arch/arm/cpu/armv7/exynos/clock.c b/arch/arm/cpu/armv7/exynos/clock.c index 7558eff..9c0d507 100644 --- a/arch/arm/cpu/armv7/exynos/clock.c +++ b/arch/arm/cpu/armv7/exynos/clock.c @@ -118,7 +118,9 @@ static int exynos_get_pll_clk(int pllreg, unsigned int r, unsigned int k) div = PLL_DIV_1024; else if (proid_is_exynos4412()) div = PLL_DIV_65535; - else if (proid_is_exynos5250() || proid_is_exynos5420()) + else if (proid_is_exynos5250() +|| proid_is_exynos5420() +|| proid_is_exynos5800()) div = PLL_DIV_65536; else return 0; @@ -1581,7 +1583,7 @@ static unsigned long exynos4_get_i2c_clk(void) unsigned long get_pll_clk(int pllreg) { if (cpu_is_exynos5()) { - if (proid_is_exynos5420()) + if (proid_is_exynos5420() || proid_is_exynos5800()) return exynos5420_get_pll_clk(pllreg); return exynos5_get_pll_clk(pllreg); } else { @@ -1617,7 +1619,7 @@ unsigned long get_i2c_clk(void) unsigned long get_pwm_clk(void) { if (cpu_is_exynos5()) { - if (proid_is_exynos5420()) + if (proid_is_exynos5420() || proid_is_exynos5800()) return exynos5420_get_pwm_clk(); return clock_get_periph_rate(PERIPH_ID_PWM0); } else { @@ -1630,7 +1632,7 @@ unsigned long get_pwm_clk(void) unsigned long get_uart_clk(int dev_index) { if (cpu_is_exynos5()) { - if (proid_is_exynos5420()) + if (proid_is_exynos5420() || proid_is_exynos5800()) return exynos5420_get_uart_clk(dev_index); return exynos5_get_uart_clk(dev_index); } else { @@ -1643,7 +1645,7 @@ unsigned long get_uart_clk(int dev_index) unsigned long get_mmc_clk(int dev_index) { if (cpu_is_exynos5()) { - if (proid_is_exynos5420()) + if (proid_is_exynos5420() || proid_is_exynos5800()) return exynos5420_get_mmc_clk(dev_index); return exynos5_get_mmc_clk(dev_index); } else { @@ -1654,7 +1656,7 @@ unsigned long get_mmc_clk(int dev_index) void set_mmc_clk(int dev_index, unsigned int div) { if (cpu_is_exynos5()) { - if (proid_is_exynos5420()) + if (proid_is_exynos5420() || proid_is_exynos5800()) exynos5420_set_mmc_clk(dev_index, div); else exynos5_set_mmc_clk(dev_index, div); @@ -1668,7 +1670,7 @@ unsigned long get_lcd_clk(void) if (cpu_is_exynos4()) return exynos4_get_lcd_clk(); else { - if (proid_is_exynos5420()) + if (proid_is_exynos5420() || proid_is_exynos5800()) return exynos5420_get_lcd_clk(); else return exynos5_get_lcd_clk(); @@ -1682,7 +1684,7 @@ void set_lcd_clk(void) else { if (proid_is_exynos5250()) exynos5_set_lcd_clk(); - else if (proid_is_exynos5420()) + else if (proid_is_exynos5420() || proid_is_exynos5800()) exynos5420_set_lcd_clk(); } } @@ -1696,7 +1698,7 @@ void set_mipi_clk(void) int set_spi_clk(int periph_id, unsigned int rate) { if (cpu_is_exynos5()) { - if (proid_is_exynos5420()) + if (proid_is_exynos5420() || proid_is_exynos5800()) return exynos5420_set_spi_clk(periph_id, rate); return exynos5_set_spi_clk(periph_id, rate); } else { diff --git a/arch/arm/cpu/armv7/exynos/clock_init_exynos5.c b/arch/arm/cpu/armv7/exynos/clock_init_exynos5.c index b6a9bc1..0aff3d0 100644 --- a/arch/arm/cpu/armv7/exynos/clock_init_exynos5.c +++ b/arch/arm/cpu/armv7/exynos/clock_init_exynos5.c @@ -971,7 +971,7 @@ static void exynos5420_system_clock_init(void) void system_clock_init(void) { - if (proid_is_exynos5420()) + if (proid_is_exynos5420() || proid_is_exynos5800()) exynos5420_system_clock_init(); else exynos5250_system_clock_init(); diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c b/arch/arm/cpu/armv7/exynos/pinmux.c index b929486..17ae2e6 100644 --- a/arch/arm/cpu/armv7/exynos/pinmux.c +++ b/arch/arm/cpu/armv7/exynos/pinmux.c
[U-Boot] [PATCH 5/6] Config: Exynos5420: Refactor SDRAM Bank and Size
Since, not every board may have all memory channels configured and all available banks of DMC used, we wish to refactor configs for Memory Bank size and numbers as per board memory config. For Example, Peach-Pit has 2GB memory and will be using only 4 banks but Peach-Pi has 3.5GB memory and will be using all 7 available SDRAM banks. Signed-off-by: Akshay Saraswat --- include/configs/exynos5420.h | 4 include/configs/peach-pi.h | 4 include/configs/peach-pit.h | 4 include/configs/smdk5420.h | 4 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/configs/exynos5420.h b/include/configs/exynos5420.h index b3be3e7..0bd7446 100644 --- a/include/configs/exynos5420.h +++ b/include/configs/exynos5420.h @@ -46,8 +46,4 @@ */ #define CONFIG_SYS_INIT_SP_ADDR(CONFIG_IRAM_TOP - 0x800) -/* DRAM Memory Banks */ -#define CONFIG_NR_DRAM_BANKS 7 -#define SDRAM_BANK_SIZE(512UL << 20UL) /* 512 MB */ - #endif /* __CONFIG_EXYNOS5420_H */ diff --git a/include/configs/peach-pi.h b/include/configs/peach-pi.h index 4517e0a..829846e 100644 --- a/include/configs/peach-pi.h +++ b/include/configs/peach-pi.h @@ -32,4 +32,8 @@ #define LCD_BPPLCD_COLOR16 #endif +/* DRAM Memory Banks */ +#define CONFIG_NR_DRAM_BANKS 7 +#define SDRAM_BANK_SIZE(512UL << 20UL) /* 512 MB */ + #endif /* __CONFIG_PEACH_PI_H */ diff --git a/include/configs/peach-pit.h b/include/configs/peach-pit.h index 92edea2..35960d7 100644 --- a/include/configs/peach-pit.h +++ b/include/configs/peach-pit.h @@ -32,4 +32,8 @@ #define LCD_BPPLCD_COLOR16 #endif +/* DRAM Memory Banks */ +#define CONFIG_NR_DRAM_BANKS 4 +#define SDRAM_BANK_SIZE(512UL << 20UL) /* 512 MB */ + #endif /* __CONFIG_PEACH_PIT_H */ diff --git a/include/configs/smdk5420.h b/include/configs/smdk5420.h index 606739b..dfad24c 100644 --- a/include/configs/smdk5420.h +++ b/include/configs/smdk5420.h @@ -24,4 +24,8 @@ #define CONFIG_SYS_PROMPT "SMDK5420 # " #define CONFIG_IDENT_STRING" for SMDK5420" +/* DRAM Memory Banks */ +#define CONFIG_NR_DRAM_BANKS 7 +#define SDRAM_BANK_SIZE(512UL << 20UL) /* 512 MB */ + #endif /* __CONFIG_SMDK5420_H */ -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/6] Addition of new board Peach-Pi
Now we are adding a new Peach-Pi board which is a variant of Peach-Pit and is based on Exynos5800. Exynos5800 itself is a variant of Exynos5420, hence, most of the hardware config and settings are reused for this board. Akshay Saraswat (5): Exynos5800: Introduce new proid for Exynos5800 Exynos5800: Add DTS for new board Peach-Pi Config: Exynos5800: Enable build for Peach-Pi Config: Exynos5420: Refactor SDRAM Bank and Size Exynos5: ddr3: Choose between single or double channel config Alim Akhtar (1): DMC: Exynos5: Enable update mode for DREX controller arch/arm/cpu/armv7/exynos/Kconfig | 5 +- arch/arm/cpu/armv7/exynos/clock.c | 19 +-- arch/arm/cpu/armv7/exynos/clock_init_exynos5.c | 2 +- arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c | 29 + arch/arm/cpu/armv7/exynos/pinmux.c | 2 +- arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5800-peach-pi.dts | 157 + arch/arm/include/asm/arch-exynos/cpu.h | 10 +- arch/arm/include/asm/arch-exynos/dmc.h | 1 + arch/arm/include/asm/arch-exynos/gpio.h| 4 +- board/samsung/smdk5420/Kconfig | 16 +++ board/samsung/smdk5420/MAINTAINERS | 2 + configs/peach-pi_defconfig | 4 + drivers/gpio/s5p_gpio.c| 2 +- include/configs/exynos5420.h | 7 +- include/configs/peach-pi.h | 39 ++ include/configs/peach-pit.h| 8 +- include/configs/smdk5420.h | 4 + 18 files changed, 290 insertions(+), 24 deletions(-) create mode 100644 arch/arm/dts/exynos5800-peach-pi.dts create mode 100644 configs/peach-pi_defconfig create mode 100644 include/configs/peach-pi.h -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/6] Config: Exynos5800: Enable build for Peach-Pi
This adds following things : - New config and defconfig for Peach-Pi board. - Alterations in Kconfig and MAINTAINERS. - Addition of CONFIG_EXYNOS5800. - ADdition of exynos5800-peach-pi in dts list. Signed-off-by: Akshay Saraswat --- arch/arm/cpu/armv7/exynos/Kconfig | 5 - board/samsung/smdk5420/Kconfig | 16 board/samsung/smdk5420/MAINTAINERS | 2 ++ configs/peach-pi_defconfig | 4 include/configs/exynos5420.h | 3 ++- include/configs/peach-pi.h | 35 +++ include/configs/peach-pit.h| 4 ++-- 7 files changed, 65 insertions(+), 4 deletions(-) create mode 100644 configs/peach-pi_defconfig create mode 100644 include/configs/peach-pi.h diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig index b6a558b..76c0faf 100644 --- a/arch/arm/cpu/armv7/exynos/Kconfig +++ b/arch/arm/cpu/armv7/exynos/Kconfig @@ -33,9 +33,12 @@ config TARGET_SNOW config TARGET_SMDK5420 bool "SMDK5420 board" -config TARGET_PEACH_PIT +config TARGET_PEACH_PI bool "Peach Pi board" +config TARGET_PEACH_PIT + bool "Peach Pit board" + endchoice config SYS_CPU diff --git a/board/samsung/smdk5420/Kconfig b/board/samsung/smdk5420/Kconfig index fb9bedd..b88722f 100644 --- a/board/samsung/smdk5420/Kconfig +++ b/board/samsung/smdk5420/Kconfig @@ -1,3 +1,19 @@ +if TARGET_PEACH_PI + +config SYS_BOARD + string + default "smdk5420" + +config SYS_VENDOR + string + default "samsung" + +config SYS_CONFIG_NAME + string + default "peach-pi" + +endif + if TARGET_PEACH_PIT config SYS_BOARD diff --git a/board/samsung/smdk5420/MAINTAINERS b/board/samsung/smdk5420/MAINTAINERS index c8241a8..25813d5 100644 --- a/board/samsung/smdk5420/MAINTAINERS +++ b/board/samsung/smdk5420/MAINTAINERS @@ -2,7 +2,9 @@ SMDK5420 BOARD M: Akshay Saraswat S: Maintained F: board/samsung/smdk5420/ +F: include/configs/peach-pi.h F: include/configs/peach-pit.h +F: configs/peach-pi_defconfig F: configs/peach-pit_defconfig SMDK5420 BOARD diff --git a/configs/peach-pi_defconfig b/configs/peach-pi_defconfig new file mode 100644 index 000..8cb3946 --- /dev/null +++ b/configs/peach-pi_defconfig @@ -0,0 +1,4 @@ +CONFIG_SPL=y ++S:CONFIG_ARM=y ++S:CONFIG_ARCH_EXYNOS=y ++S:CONFIG_TARGET_PEACH_PI=y diff --git a/include/configs/exynos5420.h b/include/configs/exynos5420.h index d2a9556..b3be3e7 100644 --- a/include/configs/exynos5420.h +++ b/include/configs/exynos5420.h @@ -10,6 +10,7 @@ #define __CONFIG_EXYNOS5420_H #define CONFIG_EXYNOS5420 /* which is in a Exynos5 Family */ +#define CONFIG_EXYNOS5800 /* A variant of Exynos5420 (Exynos5 Family) */ #define MACH_TYPE_SMDK5420 8002 #define CONFIG_MACH_TYPE MACH_TYPE_SMDK5420 @@ -27,7 +28,7 @@ #define CONFIG_SPL_MAX_FOOTPRINT (30 * 1024) -#define CONFIG_DEVICE_TREE_LIST "exynos5420-peach-pit exynos5420-smdk5420" +#define CONFIG_DEVICE_TREE_LIST "exynos5800-peach-pi exynos5420-peach-pit exynos5420-smdk5420" #define CONFIG_MAX_I2C_NUM 11 diff --git a/include/configs/peach-pi.h b/include/configs/peach-pi.h new file mode 100644 index 000..4517e0a --- /dev/null +++ b/include/configs/peach-pi.h @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2014 Samsung Electronics + * + * Configuration settings for the SAMSUNG/GOOGLE PEACH-PI board. + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#ifndef __CONFIG_PEACH_PI_H +#define __CONFIG_PEACH_PI_H + +#include + +#include + +#undef CONFIG_DEFAULT_DEVICE_TREE +#define CONFIG_DEFAULT_DEVICE_TREE exynos5800-peach-pi + +/* select serial console configuration */ +#define CONFIG_SERIAL3 /* use SERIAL 3 */ + +#define CONFIG_SYS_PROMPT "Peach-Pi # " +#define CONFIG_IDENT_STRING" for Peach-Pi" + +#define CONFIG_VIDEO_PARADE + +/* Display */ +#define CONFIG_LCD +#ifdef CONFIG_LCD +#define CONFIG_EXYNOS_FB +#define CONFIG_EXYNOS_DP +#define LCD_BPPLCD_COLOR16 +#endif + +#endif /* __CONFIG_PEACH_PI_H */ diff --git a/include/configs/peach-pit.h b/include/configs/peach-pit.h index 88c093f..92edea2 100644 --- a/include/configs/peach-pit.h +++ b/include/configs/peach-pit.h @@ -19,8 +19,8 @@ /* select serial console configuration */ #define CONFIG_SERIAL3 /* use SERIAL 3 */ -#define CONFIG_SYS_PROMPT "Peach # " -#define CONFIG_IDENT_STRING" for Peach" +#define CONFIG_SYS_PROMPT "Peach-Pit # " +#define CONFIG_IDENT_STRING" for Peach-Pit" #define CONFIG_VIDEO_PARADE -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 6/6] Exynos5: ddr3: Choose between single or double channel config
Add a 4G configuration and choose it based on the number of banks declared in config file. A board with 4 SDRAM banks declared (as per CONFIG_NR_DRAM_BANKS) will end up with the 2G confiuration. Signed-off-by: Doug Anderson Signed-off-by: Akshay Saraswat --- arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c b/arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c index 4d73b45..7c0b12a 100644 --- a/arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c +++ b/arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c @@ -464,6 +464,16 @@ int ddr3_mem_ctrl_init(struct mem_timings *mem, int reset) + DMC_OFFSET); pmu = (struct exynos5_power *)EXYNOS5420_POWER_BASE; + if (CONFIG_NR_DRAM_BANKS > 4) { + /* Need both controllers. */ + mem->memcontrol |= DMC_MEMCONTROL_NUM_CHIP_2; + mem->chips_per_channel = 2; + mem->chips_to_configure = 2; + } else { + /* 2GB requires a single controller */ + mem->memcontrol |= DMC_MEMCONTROL_NUM_CHIP_1; + } + /* Enable PAUSE for DREX */ setbits_le32(&clk->pause, ENABLE_BIT); -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [SoCFPGA] next steps
Hi, On 10/07/2014 02:45 PM, Marek Vasut wrote: > Hey, > > given that we now have most of the u-boot socfpga stuff in mainline, I > decided > it would be a good idea to list what we're still missing and we should also > decide how to move on now. > > First thing I should probably clarify is the late acceptance of the socfpga > patches. This is certainly not something we do regularly and is one of the > worst possible practices to do, but this time it felt rather important to get > the platform in shape, so this exception happened. Furthermore, all of the > code > in u-boot-socfpga should be based on u-boot-arm and should be submitted > through > the u-boot-arm repository, not directly to u-boot . Platform was in this shape for a while that's why I can't see the reason why this happen. Tom: Does it mean that every platform which is not in good shape can go directly to the mainline in any time? It is definitely something which is good to know. Thanks, Michal -- Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] WIP2: Add support for pi
Please, ignore this patch. Pushed by mistake. >Signed-off-by: Akshay Saraswat >--- > arch/arm/cpu/armv7/exynos/clock.c | 20 +++- > arch/arm/cpu/armv7/exynos/clock_init_exynos5.c | 2 +- > arch/arm/cpu/armv7/exynos/pinmux.c | 2 +- > arch/arm/include/asm/arch-exynos/cpu.h | 11 ++- > arch/arm/include/asm/arch-exynos/gpio.h| 4 ++-- > drivers/gpio/s5p_gpio.c| 2 +- > 6 files changed, 26 insertions(+), 15 deletions(-) > >diff --git a/arch/arm/cpu/armv7/exynos/clock.c >b/arch/arm/cpu/armv7/exynos/clock.c >index 7558eff..9c0d507 100644 >--- a/arch/arm/cpu/armv7/exynos/clock.c >+++ b/arch/arm/cpu/armv7/exynos/clock.c >@@ -118,7 +118,9 @@ static int exynos_get_pll_clk(int pllreg, unsigned int r, >unsigned int k) > div = PLL_DIV_1024; > else if (proid_is_exynos4412()) > div = PLL_DIV_65535; >- else if (proid_is_exynos5250() || proid_is_exynos5420()) >+ else if (proid_is_exynos5250() >+ || proid_is_exynos5420() >+ || proid_is_exynos5800()) > div = PLL_DIV_65536; > else > return 0; >@@ -1581,7 +1583,7 @@ static unsigned long exynos4_get_i2c_clk(void) > unsigned long get_pll_clk(int pllreg) > { > if (cpu_is_exynos5()) { >- if (proid_is_exynos5420()) >+ if (proid_is_exynos5420() || proid_is_exynos5800()) > return exynos5420_get_pll_clk(pllreg); > return exynos5_get_pll_clk(pllreg); > } else { >@@ -1617,7 +1619,7 @@ unsigned long get_i2c_clk(void) > unsigned long get_pwm_clk(void) > { > if (cpu_is_exynos5()) { >- if (proid_is_exynos5420()) >+ if (proid_is_exynos5420() || proid_is_exynos5800()) > return exynos5420_get_pwm_clk(); > return clock_get_periph_rate(PERIPH_ID_PWM0); > } else { >@@ -1630,7 +1632,7 @@ unsigned long get_pwm_clk(void) > unsigned long get_uart_clk(int dev_index) > { > if (cpu_is_exynos5()) { >- if (proid_is_exynos5420()) >+ if (proid_is_exynos5420() || proid_is_exynos5800()) > return exynos5420_get_uart_clk(dev_index); > return exynos5_get_uart_clk(dev_index); > } else { >@@ -1643,7 +1645,7 @@ unsigned long get_uart_clk(int dev_index) > unsigned long get_mmc_clk(int dev_index) > { > if (cpu_is_exynos5()) { >- if (proid_is_exynos5420()) >+ if (proid_is_exynos5420() || proid_is_exynos5800()) > return exynos5420_get_mmc_clk(dev_index); > return exynos5_get_mmc_clk(dev_index); > } else { >@@ -1654,7 +1656,7 @@ unsigned long get_mmc_clk(int dev_index) > void set_mmc_clk(int dev_index, unsigned int div) > { > if (cpu_is_exynos5()) { >- if (proid_is_exynos5420()) >+ if (proid_is_exynos5420() || proid_is_exynos5800()) > exynos5420_set_mmc_clk(dev_index, div); > else > exynos5_set_mmc_clk(dev_index, div); >@@ -1668,7 +1670,7 @@ unsigned long get_lcd_clk(void) > if (cpu_is_exynos4()) > return exynos4_get_lcd_clk(); > else { >- if (proid_is_exynos5420()) >+ if (proid_is_exynos5420() || proid_is_exynos5800()) > return exynos5420_get_lcd_clk(); > else > return exynos5_get_lcd_clk(); >@@ -1682,7 +1684,7 @@ void set_lcd_clk(void) > else { > if (proid_is_exynos5250()) > exynos5_set_lcd_clk(); >- else if (proid_is_exynos5420()) >+ else if (proid_is_exynos5420() || proid_is_exynos5800()) > exynos5420_set_lcd_clk(); > } > } >@@ -1696,7 +1698,7 @@ void set_mipi_clk(void) > int set_spi_clk(int periph_id, unsigned int rate) > { > if (cpu_is_exynos5()) { >- if (proid_is_exynos5420()) >+ if (proid_is_exynos5420() || proid_is_exynos5800()) > return exynos5420_set_spi_clk(periph_id, rate); > return exynos5_set_spi_clk(periph_id, rate); > } else { >diff --git a/arch/arm/cpu/armv7/exynos/clock_init_exynos5.c >b/arch/arm/cpu/armv7/exynos/clock_init_exynos5.c >index b6a9bc1..0aff3d0 100644 >--- a/arch/arm/cpu/armv7/exynos/clock_init_exynos5.c >+++ b/arch/arm/cpu/armv7/exynos/clock_init_exynos5.c >@@ -971,7 +971,7 @@ static void exynos5420_system_clock_init(void) > > void system_clock_init(void) > { >- if (proid_is_exynos5420()) >+ if (proid_is_exynos5420() || proid_is_exynos5800()) > exynos5420_system_clock_init(); > else > exynos5250_system_clock_init(); >diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c >b/arch/arm/cpu/armv7/exynos/pinmux.c >index b929486.
Re: [U-Boot] [PATCH 1/2] WIP: Add support for pi
Please, ignore this patch. Pushed by mistake. > >Signed-off-by: Akshay Saraswat >--- >arch/arm/cpu/armv7/exynos/Kconfig| 5 +- >arch/arm/dts/Makefile| 3 +- >arch/arm/dts/exynos5800-peach-pi.dts | 157 +++ >board/samsung/smdk5420/Kconfig | 16 >board/samsung/smdk5420/MAINTAINERS | 2 + >configs/peach-pi_defconfig | 4 + >include/configs/exynos5420.h | 2 +- >include/configs/peach-pi.h | 35 >8 files changed, 221 insertions(+), 3 deletions(-) >create mode 100644 arch/arm/dts/exynos5800-peach-pi.dts >create mode 100644 configs/peach-pi_defconfig >create mode 100644 include/configs/peach-pi.h > >diff --git a/arch/arm/cpu/armv7/exynos/Kconfig >b/arch/arm/cpu/armv7/exynos/Kconfig >index b6a558b..76c0faf 100644 >--- a/arch/arm/cpu/armv7/exynos/Kconfig >+++ b/arch/arm/cpu/armv7/exynos/Kconfig >@@ -33,9 +33,12 @@ config TARGET_SNOW >config TARGET_SMDK5420 >bool "SMDK5420 board" > >-config TARGET_PEACH_PIT >+config TARGET_PEACH_PI >bool "Peach Pi board" > >+config TARGET_PEACH_PIT >+ bool "Peach Pit board" >+ >endchoice > >config SYS_CPU >diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile >index 1ccd827..36e68d7 100644 >--- a/arch/arm/dts/Makefile >+++ b/arch/arm/dts/Makefile >@@ -8,7 +8,8 @@ dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ >exynos5250-snow.dtb \ >exynos5250-smdk5250.dtb \ >exynos5420-smdk5420.dtb \ >- exynos5420-peach-pit.dtb >+ exynos5420-peach-pit.dtb \ >+ exynos5800-peach-pi.dtb >dtb-$(CONFIG_MX6) += imx6q-sabreauto.dtb >dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \ >tegra20-medcom-wide.dtb \ >diff --git a/arch/arm/dts/exynos5800-peach-pi.dts >b/arch/arm/dts/exynos5800-peach-pi.dts >new file mode 100644 >index 000..1c6aa8f >--- /dev/null >+++ b/arch/arm/dts/exynos5800-peach-pi.dts >@@ -0,0 +1,157 @@ >+/* >+ * SAMSUNG/GOOGLE Peach-Pit board device tree source >+ * >+ * Copyright (c) 2013 Samsung Electronics Co., Ltd. >+ * http://www.samsung.com >+ * >+ * SPDX-License-Identifier: GPL-2.0+ >+ */ >+ >+/dts-v1/; >+/include/ "exynos54xx.dtsi" >+ >+/ { >+ model = "Samsung/Google Peach Pi board based on Exynos5800"; >+ >+ compatible = "google,pit-rev#", "google,pit", >+ "google,peach", "samsung,exynos5800", "samsung,exynos5"; >+ >+ config { >+ google,bad-wake-gpios = <&gpio 0x56 0>; /* gpx0-6 */ >+ hwid = "PIT TEST A-A 7848"; >+ lazy-init = <1>; >+ }; >+ >+ aliases { >+ serial0 = "/serial@12C3"; >+ console = "/serial@12C3"; >+ pmic = "/i2c@12ca"; >+ }; >+ >+ dmc { >+ mem-manuf = "samsung"; >+ mem-type = "ddr3"; >+ clock-frequency = <8>; >+ arm-frequency = <17>; >+ }; >+ >+ tmu@1006 { >+ samsung,min-temp = <25>; >+ samsung,max-temp = <125>; >+ samsung,start-warning = <95>; >+ samsung,start-tripping = <105>; >+ samsung,hw-tripping = <110>; >+ samsung,efuse-min-value = <40>; >+ samsung,efuse-value = <55>; >+ samsung,efuse-max-value = <100>; >+ samsung,slope = <274761730>; >+ samsung,dc-value = <25>; >+ }; >+ >+ /* MAX77802 is on i2c bus 4 */ >+ i2c@12ca { >+ clock-frequency = <40>; >+ power-regulator@9 { >+ compatible = "maxim,max77802-pmic"; >+ reg = <0x9>; >+ }; >+ }; >+ >+ i2c@12cd { /* i2c7 */ >+ clock-frequency = <10>; >+soundcodec@20 { >+ reg = <0x20>; >+ compatible = "maxim,max98090-codec"; >+}; >+ >+ edp-lvds-bridge@48 { >+ compatible = "parade,ps8625"; >+ reg = <0x48>; >+ }; >+ }; >+ >+sound@383 { >+samsung,codec-type = "max98090"; >+}; >+ >+ i2c@12e1 { /* i2c9 */ >+ clock-frequency = <40>; >+tpm@20 { >+compatible = "infineon,slb9645-tpm"; >+reg = <0x20>; >+ }; >+ }; >+ >+ spi@12d3 { /* spi1 */ >+ spi-max-frequency = <5000>; >+ firmware_storage_spi: flash@0 { >+ reg = <0>; >+ >+ /* >+ * A region for the kernel to store a panic event >+ * which the firmware will add to the log. >+ */ >+ elog-panic-event-offset = <0x01e0 0x10>; >+ >+ elog-shrink-size = <0x400>; >+ elog-full-threshold = <0xc00>; >+ }; >+ }; >+ >+ spi@12d4 { /* spi2 */ >+ spi-max-frequency = <400>; >+ spi-deactivate-delay = <200>; >+ cros-ec@0 { >+ reg = <0>; >+ compatible = "google,cros-ec"; >+ spi-half-duplex; >+ spi-max-timeout-ms = <1100>; >+ spi-frame-header = <0xec>; >+ ec-interrupt = <&gpio 93 1>; /* GPX1_5 */ >+ >+ /* >+ * This describes the flash memory within the EC. Note >+ * that the STM32L flash erases to 0, not 0xff. >+ */ >+ #address-cells = <1>; >+ #size-cells = <1>; >+ flash@800 { >+ reg = <0x0800 0x2>; >+ erase-value = <0>; >+ }; >+ }; >+ }; >+ >+ xhci@1200 { >+ samsung,vbus-gpio = <&gpio 0x40 0>; /* H00 */ >+ }; >+ >+ xhci@1240 { >+ samsung,vbus-gpio = <&gpio 0x41 0>; /* H01 */ >+ }; >+ >+ fimd@1440 { >+ samsung,vl-freq = <60>; >+ samsung,vl-col = <1920>; >+ samsung,vl-row = <1080>; >+ samsung,vl-width =
Re: [U-Boot] [PATCH 6/7] arm: ls102xa: Add SD boot support for LS1021AQDS board
Hi, Albert, > On Thu, 25 Sep 2014 06:45:00 +, Huan Wang > wrote: > > > Hi, Albert, > > > > > On Mon, 22 Sep 2014 06:46:20 +, Huan Wang > > > wrote: > > > > > > > Hi, Albert, > > > > > > > > > > On Thu, 18 Sep 2014 13:47:18 +0800, Alison Wang > > > > > > > > > > > > wrote: > > > > > > > > > > > > > + > > > > > > > + . = ALIGN(4); > > > > > > > + .u_boot_list : { > > > > > > > + KEEP(*(SORT(.u_boot_list*_i2c_*))); > > > > > > > + } > > > > > > > > > > > > IS this required? And if it is, could it not be added to the > > > > > > arch/arm/cpu/u-boot-spl.lds file? This way you would not need > > > > > > an .lds file at all. > > > > > > > > > > > > [Alison Wang] Yes, it is required. > > > > > > > > > > Ok -- what for? :) > > > > [Alison Wang] In SPL part, DDR is initialized by reading SPD > > > > through > > > I2C interface. > > > > For I2C, ll_entry_count() is called, and it returns the number of > > > > elements of a linker-generated array placed into subsection of > > > > .u_boot_list section specified by _list argument. So I need to > add > > > this to make I2C work in SPL. > > > > > > Understood. So your SPL code uses I2C, and for I2C, you need a > > > linker list. But then: > > > > > > > > > I would like to add it in arch/arm/cpu/u-boot-spl.lds. I was > > > > > > not sure adding it in arch/arm/cpu/u-boot-spl.lds is > > > > > > acceptable or > > > not. > > > > > > > > > > (assuming the reason why it is needed is valid) If it causes no > > > > > change to boards which do not use it right now (and I mean 'no > > > > > change' ad 'binary identical') then this is acceptable. Make > > > > > sure you check the binary invariance and that you mention it in > > > > > the > > > commit. > > > > > > > > > [Alison Wang] It will cause the binary is not identical for other > > > board. > > > > > > Is this a prediction or an actual observation of compared builds > > > with and without the I2C linker liste addition to the generic > SPL .lds? > > > > [Alison Wang] I use mx31pdk as example. I compared the binaries with > > and Without the I2C linker list in arch/arm/cpu/u-boot-spl.lds. The > > binaries are not identical. > > I have just checked mx31pdk: the u-boot binaries (u-boot, u-boot.bin, > u-boot-with-spl.bin, u-boot.map, u-boot.srec) are indeed different, but > that's just normal considering the repository state and build date and > time are included in the binaries [1]. > > OTOH, I see that the u-boot-spl.bin files are identical. > > The only change I made between the two builds was inserting > > > . = ALIGN(4); > > + .u_boot_list : { > > + KEEP(*(SORT(.u_boot_list*_i2c_*))); > > + } > > in arch/arm/cpu/u-boot-spl.lds at line 34. > > Can you re-check? [Alison Wang] Yes, you are right. u-boot-spl.bin files are identical. The u-boot binaries (u-boot, u-boot.bin, u-boot-with-spl.bin, u-boot.map, u-boot.srec) are different only in build date and time. > > [1] BTW, how do you folks out here proceed when trying to compare u- > boot.bin files from different builds of the same target without the > repo state or build date and time affecting the comparison? I use a > patch to Makefile that fakes the commit and repo state, and I also use > fakelib to force timestamps, but there might be a simpler way. > [Alison Wang] Oh, your way is very good. I just used vimdiff. Best Regards, Alison Wang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Upstream uboot and Arndale 5250 support
that's weird, because i don't have bootz: U-Boot 2014.10-rc3 (Oct 08 2014 - 11:34:33) for ARNDALE CPU:Exynos5250@1000MHz Board: Arndale I2C: i2c_init: failed to init bus 0 for speed = 10 ready DRAM: 2 GiB trace: copying 00086db4 bytes of early data from 5000 to beff trace: enabled WARNING: Caches not enabled MMC: EXYNOS DWMMC: 0, EXYNOS DWMMC: 1 dwmci_send_cmd: DATA ERROR! i2c_init: failed to init bus 0 for speed = 10 In:serial Out: serial Err: serial Net: Net Initialization Skipped No ethernet found. Hit any key to stop autoboot: 0 ARNDALE # help bootz Unknown command 'bootz' - try 'help' without arguments for list of all known commands ARNDALE # are you using a patched u-boot? i'm using the default arndale_defconfig. anyhow, can i have your full working config? i'm starting to feel i'm chasing ghosts here. On Wed, Oct 8, 2014 at 10:00 AM, Guillaume Gardet wrote: > I used the following values with 2014.10-rc2: > kerneladdr=0x4400 > ramdiskaddr=0x4500 > fdtaddr=0x4c00 > > But I used a zImage. If you use a uImage, you need to modify the kernel load > addr. > > Guillaume > > > Le 07/10/2014 17:02, Paolo Pisati a écrit : > >> those are the addresses suggested by u-boot and yes, i already tried >> moving stuff around but it didn't fix it: what's the working config >> with your board? u-boot version? >> >> On Tue, Oct 7, 2014 at 4:34 PM, Guillaume Gardet >> wrote: >>> >>> Hi, >>> >>> Le 07/10/2014 14:58, Paolo Pisati a écrit : >>> Hi, i've been trying to update the u-boot on my board (sd booting), from the Linaro one (2012.10) to a v2014.X, but so far had no luck: make arndale_config export CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- make ... dd if=arndale-bl1.bin of=/dev/sdc bs=512 skip=1 dd if=arndale-spl.bin of=/dev/sdc bs=512 skip=17 dd if=./u-boot-dtb.bin of=/dev/sdc bs=512 skip=49 ... u-boot 3.10rc3 (same happens with v2014.07 or 2014.04): U-Boot 2014.10-rc3 (Oct 07 2014 - 13:26:48) for ARNDALE CPU:Exynos5250@1000MHz Board: Arndale I2C: i2c_init: failed to init bus 0 for speed = 10 ready DRAM: 2 GiB trace: copying 00086db4 bytes of early data from 5000 to beff trace: enabled WARNING: Caches not enabled MMC: EXYNOS DWMMC: 0, EXYNOS DWMMC: 1 dwmci_send_cmd: DATA ERROR! i2c_init: failed to init bus 0 for speed = 10 In:serial Out: serial Err: serial Net: Net Initialization Skipped No ethernet found. Hit any key to stop autoboot: 0 ARNDALE # printenv baudrate=115200 bootargs=console=ttySAC2,115200n8 root=/dev/mmcblk1p1 rw rootwait debug earlyprintk bootcmd=run bootcmd_ubuntu bootcmd_ubuntu=run loadk; run loadf; run loadr; bootm ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r} bootdelay=3 fdt_addr_r=0x4100 filesize=5b9902 kernel_addr_r=0x40007000 loadf=ext2load mmc 1:1 ${fdt_addr_r} /boot/exynos5250-arndale.dtb loadk=ext2load mmc 1:1 ${kernel_addr_r} /boot/uImage loadr=ext2load mmc 1:1 ${ramdisk_addr_r} /boot/uInitrd ramdisk_addr_r=0x4200 stderr=serial stdin=serial stdout=serial Environment size: 589/16380 bytes ARNDALE # run loadk 6002946 bytes read in 1117 ms (5.1 MiB/s) ARNDALE # bootm ${kernel_addr_r} ## Booting kernel from Legacy Image at 40007000 ... Image Name: kernel 3.16.0-20-generic Image Type: ARM Linux Kernel Image (uncompressed) Data Size:6002882 Bytes = 5.7 MiB Load Address: 40008000 Entry Point: 40008000 Verifying Checksum ... OK Loading Kernel Image ... OK Starting kernel ...(fake run for tracing) Starting kernel ... [stuck here] >>> >>> >>> I faced this problem some times ago. Try to modify kernel, initrd and fdt >>> addresses. >>> >>> >>> Guillaume >>> >> >> > -- bye, p. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 7/7] mips: enable CONFIG_USE_PRIVATE_LIBGCC by default
On 26.09.2014 12:23, Masahiro Yamada wrote: > Without the private libgcc, we need a full multilib toolchain with > different libgcc or multiple toolchains to build all BE/LE and > hard-float/soft-float variants of MIPS boards. That is not feasible. > > This commit allows us to build all the MIPS boards with a single > kernel.org toolchain: > > https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/ > x86_64-gcc-4.9.0-nolibc_mips-linux.tar.xz > > This change would be reasonable for most users. If necessary, > you can disable this option via "make menuconfig" or friends. > > Signed-off-by: Masahiro Yamada > Cc: Daniel Schwierzeck > --- > > arch/mips/Kconfig | 3 +++ > 1 file changed, 3 insertions(+) > Acked-by: Daniel Schwierzeck -- - Daniel ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH][v2] ls102x: configs - Add hash command in freescale LS1 platforms
Dear Ruchika Gupta, In message <141267-31325-1-git-send-email-ruchika.gu...@freescale.com> you wrote: > Hardware accelerated support for SHA-1 and SHA-256 has been added. > Hash command enabled along with hardware accelerated support for > SHA-1 and SHA-256 for platforms which have CAAM block. > #define CONFIG_SYS_FSL_ESDHC_ADDR(CONFIG_SYS_IMMR + 0x0056) > #define CONFIG_SYS_FSL_SCFG_ADDR (CONFIG_SYS_IMMR + 0x0057) > #define CONFIG_SYS_FSL_SERDES_ADDR (CONFIG_SYS_IMMR + 0x00ea) > +#define CONFIG_SYS_FSL_SEC_ADDR (CONFIG_SYS_IMMR + > 0x70) > +#define CONFIG_SYS_FSL_JR0_ADDR (CONFIG_SYS_IMMR + > 0x71) > #define CONFIG_SYS_FSL_GUTS_ADDR (CONFIG_SYS_IMMR + 0x00ee) > #define CONFIG_SYS_FSL_LS1_CLK_ADDR (CONFIG_SYS_IMMR + 0x00ee1000) > #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR + > 0x011c0500) Would it not make sense to keep this list sorted (by growing addresses)? > +int misc_init_r(void) > +{ > + if (sec_init() < 0) > + return -1; > + return 0; > +} Would return sec_init(); be equivalent? [If so,, then please fix globally.] Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de There's no future in time travel. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] HACK: arndale: deinit scsi before launching Linux
Dear Ian Campbell, In message <1412690200-6630-2-git-send-email-...@hellion.org.uk> you wrote: > From: Ian Campbell > > NOT TO BE APPLIED AS IS > > Without this Linux fails to correctly init the phy (or something) and cannot > detect the disk. > > Even with this we can fail to detect the disk outselves on some fraction of > boots, so something else is clearly up too. Why does the Subject: say "scsi" when you actually mean SATA? Note that this is a bug fix. U-Boot should _always_ shut down all peripherals it used before booting an OS, see [1] [1] http://www.denx.de/wiki/U-Boot/DesignPrinciples Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de If you want strict real-time behavior, run in the real time schedu- ling class. But there are no seatbelts or airbags; main(){for(;;);} can hard hang your system. -- Bart Smaalders ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [SoCFPGA] next steps
On Wednesday, October 08, 2014 at 10:58:24 AM, Michal Simek wrote: > Hi, > > On 10/07/2014 02:45 PM, Marek Vasut wrote: > > Hey, > > > > given that we now have most of the u-boot socfpga stuff in mainline, I > > decided it would be a good idea to list what we're still missing and we > > should also decide how to move on now. > > > > First thing I should probably clarify is the late acceptance of the > > socfpga patches. This is certainly not something we do regularly and is > > one of the worst possible practices to do, but this time it felt rather > > important to get the platform in shape, so this exception happened. > > Furthermore, all of the code in u-boot-socfpga should be based on > > u-boot-arm and should be submitted through the u-boot-arm repository, > > not directly to u-boot . > > Platform was in this shape for a while that's why I can't see the reason > why this happen. > > Tom: Does it mean that every platform which is not in good shape can go > directly to the mainline in any time? It is definitely something which is > good to know. I believe this was an exception here. Also, the socfpga patches were posted on the list for a while (beginning of september) and they were tested on multiple devices by multiple parties, so there is clearly interest to get the platform in shape. The initial patch was posted all the way back as "[RFC] mainline u-boot on socfpga" on Sept. 3rd 2014, which is in the middle of the release cycle and which still gave us enough time to clean the patches up still. Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 0/15] samsung: Use common config files with Samsung boards
On 08/10/14 13:01, Simon Glass wrote: > This series tries to unify the Samsung board configs into a few header > files for exynos5 and exynos4. > > The purpose is to make it easier to move to driver model. In that case > I would like things like the GPIO drivers and serial drivers to work in > a standard way, and not need to support device tree and platform data at > the same time. That would be quite painful. > > Another reason is that the Chrome OS EC drivers are currently included in > boards that don't have a Chrome OS EC. This concern was raised by the > Samsung maintainer (Minkyu) a while back. > > There are still a few boards that don't use CONFIG_OF_CONTROL so I have > updated these rudimentary of device tree files based on feedback. > > This series has the side-effect of getting the EC interface working > properly on Pit, so the keyboard works. It also provides access to the > TPS65090 PMIC, which means that the backlight is enabled. > > Changes in v6: > - Rebase on top of samsung/master and 'git pull upstream-arm master' > > Changes in v4: > - Address review nits from Minkyu > - Make this driver more like the one it came from > - Rebase on top of master (CONFIG_OF settings moved to Kconfig) > - Remove special FET_ERR_NOT_READY etc. as use standard errors > > Changes in v3: > - Adjust device tree file based on Robert Baldyga's example > > Changes in v2: > - Add new patch to enable keyboard on pit > - Add new patch to split out cros_ec drivers > - Add new patch to use 900MHz ARM frequeny in SPL for peach_pit > - Avoid using a common file, and just add a device tree > - Don't enable the cros_ec on smdk5420 > - Fix 'cashe' typo in commit subject > - Fix device tree base addresses > - Leave CONFIG_SERIAL3 in the individual board files > - Leave in a few configs which are not in fact common to all boards > - Reduce the number of common elements to avoid needing #undefs later > - Slightly reword the commit message > > Simon Glass (15): > Exynos: Use 900MHz ARM frequency in SPL for peach_pit > exynos5: Enable data cache > cros_ec: power: Add a tunnelled version of the tps65090 driver > cros_ec: exynos: Use the correct tps65090 driver in each case > dm: exynos: Split out the cros_ec drivers > exynos: dts: Add device tree node for cros_ec keyboard > exynos: Rename -dt config files to -common > exynos: Move common exynos settings into a common file > exynos: Move common smdk5420 things to common file > exynos: config: Move cros_ec and tps65090 out of smdk boards > config: Move arndale to use common exynos5250 file > config: Move smdkv310 to use common exynos4 file > samsung: Enable device tree for s5p_goni > samsung: Enable device tree for smdkc100 > exynos: Enable pre-relocation malloc() > > arch/arm/Kconfig | 13 +- > arch/arm/cpu/armv7/exynos/Kconfig | 1 + > arch/arm/cpu/armv7/s5pc1xx/Kconfig | 25 +++ > arch/arm/dts/Makefile | 3 + > arch/arm/dts/exynos4210-smdkv310.dts | 21 ++ > arch/arm/dts/exynos5420-peach-pit.dts | 57 +- > arch/arm/dts/s5pc1xx-goni.dts | 28 +++ > arch/arm/dts/s5pc1xx-smdkc100.dts | 29 +++ > arch/arm/include/asm/arch-s5pc1xx/periph.h | 61 ++ > arch/arm/include/asm/arch-s5pc1xx/pinmux.h | 50 + > configs/s5p_goni_defconfig | 2 + > configs/smdkc100_defconfig | 2 + > configs/smdkv310_defconfig | 1 + > drivers/mmc/s5p_sdhci.c| 2 - > drivers/power/pmic/Makefile| 3 +- > drivers/power/pmic/pmic_tps65090_ec.c | 218 > + > include/configs/arndale.h | 195 +- > include/configs/{exynos4-dt.h => exynos-common.h} | 110 +++ > include/configs/exynos4-common.h | 68 +++ > include/configs/{exynos5-dt.h => exynos5-common.h} | 126 ++-- > include/configs/exynos5-dt-common.h| 35 > .../{exynos5250-dt.h => exynos5250-common.h} | 7 +- > .../configs/{exynos5420.h => exynos5420-common.h} | 22 ++- > include/configs/odroid.h | 4 +- > include/configs/origen.h | 5 +- > include/configs/peach-pit.h| 16 +- > include/configs/s5p_goni.h | 9 +- > include/configs/s5pc210_universal.h| 5 +- > include/configs/smdk5250.h | 23 ++- > include/configs/smdk5420.h | 5 +- > include/configs/smdkc100.h | 6 + > include/configs/smdkv310.h | 61 +- > include/configs/snow.h | 25 ++- > include/configs/trats.h| 6 +-
Re: [U-Boot] [PATCH] armv7: s5pc1xx: improve cache handling
On 19/09/14 19:17, Robert Baldyga wrote: > Move cache handling code to C file, and add enable_caches() and > disable_caches() functions. > > Signed-off-by: Robert Baldyga > --- > arch/arm/cpu/armv7/s5pc1xx/cache.S | 30 > arch/arm/cpu/armv7/s5pc1xx/cache.c | 47 > ++ > 2 files changed, 47 insertions(+), 30 deletions(-) > delete mode 100644 arch/arm/cpu/armv7/s5pc1xx/cache.S > create mode 100644 arch/arm/cpu/armv7/s5pc1xx/cache.c > applied to u-boot-samsung. Thanks, Minkyu Kang. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] exynos: update maintainer of Snow and SMDK5420 board
On 26/09/14 18:54, Masahiro Yamada wrote: > The email address of Rajeshwari Shinde > is not working. > > This commit gives Akshay the maintainership of Snow and > SMDK5420 boards. > > Signed-off-by: Masahiro Yamada > Cc: Akshay Saraswat > Cc: Minkyu Kang > --- > > Changes in v2: > - Pass the maintainership of Snow to Akshay > based on his comment against v1. > > board/samsung/smdk5250/MAINTAINERS | 2 +- > board/samsung/smdk5420/MAINTAINERS | 4 > 2 files changed, 1 insertion(+), 5 deletions(-) > applied to u-boot-samsung. Thanks, Minkyu Kang. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] odroid: clock: set aclk_cores to 200MHz
On 23/09/14 19:46, Przemyslaw Marczak wrote: > This change fixes suspend/resume issue in the kernel caused > by the wrong 'aclk_cores' clock value expected by the kernel. > > Signed-off-by: Przemyslaw Marczak > Cc: Minkyu Kang > --- > board/samsung/odroid/odroid.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/board/samsung/odroid/odroid.c b/board/samsung/odroid/odroid.c > index ac19527..5edb250 100644 > --- a/board/samsung/odroid/odroid.c > +++ b/board/samsung/odroid/odroid.c > @@ -158,10 +158,10 @@ static void board_clock_init(void) >* For MOUThpm = 1000 MHz (MOUTapll) >* doutcopy = MOUThpm / (ratio + 1) = 200 (4) >* sclkhpm = doutcopy / (ratio + 1) = 200 (4) > - * cores_out = armclk / (ratio + 1) = 1000 (0) > + * cores_out = armclk / (ratio + 1) = 200 (4) >*/ > clr = COPY_RATIO(7) | HPM_RATIO(7) | CORES_RATIO(7); > - set = COPY_RATIO(4) | HPM_RATIO(4) | CORES_RATIO(0); > + set = COPY_RATIO(4) | HPM_RATIO(4) | CORES_RATIO(4); > > clrsetbits_le32(&clk->div_cpu1, clr, set); > > applied to u-boot-samsung Thanks, Minkyu Kang. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ORIGEN: Enhance origen config to be more flexible on boot.
Hi, On 29/09/14 15:35, Guillaume Gardet wrote: > Ping. > > Guillaume > > Le 19/09/2014 15:32, Guillaume GARDET a écrit : >> This patch enhances the boot of origen board by adding support to ext2, >> bootz, initrd, bootenv loading and boot script. >> It still keeps the previous mmc load command if boot script fails. >> >> Signed-off-by: Guillaume GARDET >> Cc: Minkyu Kang >> >> --- >> include/configs/origen.h | 35 ++- >> 1 file changed, 34 insertions(+), 1 deletion(-) >> Since Simon's patches are merged your patches are failed to apply. Please recheck this patch. Thanks, Minkyu Kang. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [SoCFPGA] next steps
On Wed 2014-10-08 10:58:24, Michal Simek wrote: > Hi, > > On 10/07/2014 02:45 PM, Marek Vasut wrote: > > Hey, > > > > given that we now have most of the u-boot socfpga stuff in mainline, I > > decided > > it would be a good idea to list what we're still missing and we should also > > decide how to move on now. > > > > First thing I should probably clarify is the late acceptance of the socfpga > > patches. This is certainly not something we do regularly and is one of the > > worst possible practices to do, but this time it felt rather important to > > get > > the platform in shape, so this exception happened. Furthermore, all of the > > code > > in u-boot-socfpga should be based on u-boot-arm and should be submitted > > through > > the u-boot-arm repository, not directly to u-boot . > > Platform was in this shape for a while that's why I can't see the reason why > this happen. > > Tom: Does it mean that every platform which is not in good shape can go > directly to the mainline > in any time? It is definitely something which is good to know. Well, the platform was in such a wrong shape that it would be hard to cause regressions, and code was self-contained enough that it would not break anything. I'm not a Tom, but it makes sense to me. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v8 08/12] dm: exynos: Move s5p_goni to generic board
Dear Robert Baldyga, On 29/09/14 15:06, Robert Baldyga wrote: > On 09/15/2014 12:29 AM, Simon Glass wrote: >> The generic board deadline is approaching, and we need this feature to >> enable driver model. Enable CONFIG_SYS_GENERIC_BOARD for s5p_goni. >> >> Signed-off-by: Simon Glass >> --- >> >> Changes in v8: >> - Add new patch to move s5p_goni to generic board >> >> Changes in v7: None >> Changes in v6: None >> Changes in v5: None >> Changes in v4: None >> >> include/configs/s5p_goni.h | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h >> index ec78b6e..b7d9cb7 100644 >> --- a/include/configs/s5p_goni.h >> +++ b/include/configs/s5p_goni.h >> @@ -289,4 +289,6 @@ >> #define CONFIG_OF_SEPARATE >> #define CONFIG_OF_LIBFDT >> >> +#define CONFIG_SYS_GENERIC_BOARD >> + >> #endif /* __CONFIG_H */ >> > > Acked-by: Robert Baldyga > Then how's your patch? http://patchwork.ozlabs.org/patch/390306/ Thanks, Minkyu Kang. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] please pull u-boot-samsung master
Dear Albert, The following changes since commit 6dd0e7c00bfa5ce861a72b8e4a3ef9e787306125: git-mailrc: add me as a maintainer of UniPhier platform (2014-10-05 14:10:09 +0900) are available in the git repository at: http://git.denx.de/u-boot-samsung for you to fetch changes up to b219773957d2ee8fedb56f0fcb19288eb72d4867: odroid: clock: set aclk_cores to 200MHz (2014-10-08 19:48:43 +0900) Masahiro Yamada (1): exynos: update maintainer of Snow and SMDK5420 board Minkyu Kang (3): Revert "odroid: set MPLL clock to 880MHz" Merge branch 'master' of http://git.denx.de/u-boot-samsung Merge branch 'uboot' Przemyslaw Marczak (1): odroid: clock: set aclk_cores to 200MHz Robert Baldyga (1): armv7: s5pc1xx: improve cache handling Simon Glass (15): Exynos: Use 900MHz ARM frequency in SPL for peach_pit exynos5: Enable data cache cros_ec: power: Add a tunnelled version of the tps65090 driver cros_ec: exynos: Use the correct tps65090 driver in each case dm: exynos: Split out the cros_ec drivers exynos: dts: Add device tree node for cros_ec keyboard exynos: Rename -dt config files to -common exynos: Move common exynos settings into a common file exynos: Move common smdk5420 things to common file exynos: config: Move cros_ec and tps65090 out of smdk boards config: Move arndale to use common exynos5250 file config: Move smdkv310 to use common exynos4 file samsung: Enable device tree for s5p_goni samsung: Enable device tree for smdkc100 exynos: Enable pre-relocation malloc() arch/arm/Kconfig | 13 +- arch/arm/cpu/armv7/exynos/Kconfig |1 + arch/arm/cpu/armv7/s5pc1xx/Kconfig | 25 +++ arch/arm/cpu/armv7/s5pc1xx/cache.S | 30 --- arch/arm/cpu/armv7/s5pc1xx/cache.c | 47 + arch/arm/dts/Makefile |3 + arch/arm/dts/exynos4210-smdkv310.dts | 21 ++ arch/arm/dts/exynos5420-peach-pit.dts | 57 - arch/arm/dts/s5pc1xx-goni.dts | 28 +++ arch/arm/dts/s5pc1xx-smdkc100.dts | 29 +++ arch/arm/include/asm/arch-s5pc1xx/periph.h | 61 ++ arch/arm/include/asm/arch-s5pc1xx/pinmux.h | 50 + board/samsung/odroid/odroid.c | 64 +++--- board/samsung/smdk5250/MAINTAINERS |2 +- board/samsung/smdk5420/MAINTAINERS |4 - configs/s5p_goni_defconfig |2 + configs/smdkc100_defconfig |2 + configs/smdkv310_defconfig |1 + drivers/mmc/s5p_sdhci.c|2 - drivers/power/pmic/Makefile|3 +- drivers/power/pmic/pmic_tps65090_ec.c | 218 include/configs/arndale.h | 195 + include/configs/{exynos4-dt.h => exynos-common.h} | 110 +++--- include/configs/exynos4-common.h | 68 ++ include/configs/{exynos5-dt.h => exynos5-common.h} | 126 ++- include/configs/exynos5-dt-common.h| 35 .../{exynos5250-dt.h => exynos5250-common.h} |7 +- .../configs/{exynos5420.h => exynos5420-common.h} | 22 +- include/configs/odroid.h |4 +- include/configs/origen.h |5 +- include/configs/peach-pit.h| 16 +- include/configs/s5p_goni.h |9 +- include/configs/s5pc210_universal.h|5 +- include/configs/smdk5250.h | 23 ++- include/configs/smdk5420.h |5 +- include/configs/smdkc100.h |6 + include/configs/smdkv310.h | 61 +- include/configs/snow.h | 25 ++- include/configs/trats.h|6 +- include/configs/trats2.h |6 +- 40 files changed, 840 insertions(+), 557 deletions(-) create mode 100644 arch/arm/cpu/armv7/s5pc1xx/Kconfig delete mode 100644 arch/arm/cpu/armv7/s5pc1xx/cache.S create mode 100644 arch/arm/cpu/armv7/s5pc1xx/cache.c create mode 100644 arch/arm/dts/exynos4210-smdkv310.dts create mode 100644 arch/arm/dts/s5pc1xx-goni.dts create mode 100644 arch/arm/dts/s5pc1xx-smdkc100.dts create mode 100644 arch/arm/include/asm/arch-s5pc1xx/periph.h create mode 100644 arch/arm/include/asm/arch-s5pc1xx/pinmux.h create mode 100644 drivers/power/pmic/pmic_tps65090_ec.c rename include/configs/{exynos4-dt.h => exynos-common.h} (51%) create mode 100644 include/configs/exynos4-common.h rename include/configs/{exynos5-dt.h => exynos5-common.h} (64%) create m
Re: [U-Boot] [PATCH] compulab: eeprom: add default eeprom bus
Gentle ping. On 18/09/14 23:35, Albert ARIBAUD wrote: Hi Nikita, On Thu, 18 Sep 2014 16:21:07 +0300, Nikita Kiryanov wrote: Hi ALbert, On 18/09/14 15:26, Albert ARIBAUD wrote: Hi Igor, On Wed, 17 Sep 2014 17:18:49 +0300, Igor Grinberg wrote: On 09/17/14 15:59, Nikita Kiryanov wrote: Add default eeprom bus setting. This addresses the trimslice compile error that was introduced with the addition of this setting. Cc: Albert ARIBAUD Cc: Igor Grinberg Signed-off-by: Nikita Kiryanov Acked-by: Igor Grinberg Albert, this should be a temporary fix to not break the trimslice support. We intend to rework this while switching Kconfig for all boards. Thanks! --- board/compulab/common/eeprom.c | 4 1 file changed, 4 insertions(+) diff --git a/board/compulab/common/eeprom.c b/board/compulab/common/eeprom.c index 85442cd..2df3ada 100644 --- a/board/compulab/common/eeprom.c +++ b/board/compulab/common/eeprom.c @@ -15,6 +15,10 @@ # define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 #endif +#ifndef CONFIG_SYS_I2C_EEPROM_BUS +#define CONFIG_SYS_I2C_EEPROM_BUS 0 +#endif + #define EEPROM_LAYOUT_VER_OFFSET 44 #define BOARD_SERIAL_OFFSET 20 #define BOARD_SERIAL_OFFSET_LEGACY 8 a 'git grep CONFIG_SYS_I2C_EEPROM_BUS' shows that all values for CONFIG_SYS_I2C_EEPROM_BUS are set in include/configs/*.h. Therefore I would prefer that the temporary fix be in include/configs/trimslice.h header file too. Given that trimslice does not use the eeprom code, I feel that it's cleaner to not populate its config file with irrelevant defines. It's also consistent with the way CONFIG_SYS_I2C_EEPROM_ADDR and CONFIG_SYS_I2C_EEPROM_ADDR_LEN are handled. Makes sense enough. Amicalement, -- Regards, Nikita Kiryanov ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v8 08/12] dm: exynos: Move s5p_goni to generic board
On 10/08/2014 01:36 PM, Minkyu Kang wrote: > Dear Robert Baldyga, > > On 29/09/14 15:06, Robert Baldyga wrote: >> On 09/15/2014 12:29 AM, Simon Glass wrote: >>> The generic board deadline is approaching, and we need this feature to >>> enable driver model. Enable CONFIG_SYS_GENERIC_BOARD for s5p_goni. >>> >>> Signed-off-by: Simon Glass >>> --- >>> >>> Changes in v8: >>> - Add new patch to move s5p_goni to generic board >>> >>> Changes in v7: None >>> Changes in v6: None >>> Changes in v5: None >>> Changes in v4: None >>> >>> include/configs/s5p_goni.h | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h >>> index ec78b6e..b7d9cb7 100644 >>> --- a/include/configs/s5p_goni.h >>> +++ b/include/configs/s5p_goni.h >>> @@ -289,4 +289,6 @@ >>> #define CONFIG_OF_SEPARATE >>> #define CONFIG_OF_LIBFDT >>> >>> +#define CONFIG_SYS_GENERIC_BOARD >>> + >>> #endif /* __CONFIG_H */ >>> >> >> Acked-by: Robert Baldyga >> > > Then how's your patch? > http://patchwork.ozlabs.org/patch/390306/ > > Thanks, > Minkyu Kang. > Please discard my patch. Simon's patch should be applied. Thanks, Robert Baldyga. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V2] ORIGEN: Enhance origen config to be more flexible on boot.
V2: rebased on latest GIT version V1: This patch enhances the boot of origen board by adding support to ext2, bootz, initrd, bootenv loading and boot script. It still keeps the previous mmc load command if boot script fails. Signed-off-by: Guillaume GARDET Cc: Minkyu Kang --- include/configs/origen.h | 35 ++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/include/configs/origen.h b/include/configs/origen.h index da9d6a1..8f1e256 100644 --- a/include/configs/origen.h +++ b/include/configs/origen.h @@ -56,6 +56,10 @@ #undef CONFIG_CMD_PING #define CONFIG_CMD_ELF #define CONFIG_CMD_DHCP +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_FS_GENERIC +#define CONFIG_CMD_BOOTZ +#define CONFIG_SUPPORT_RAW_INITRD #undef CONFIG_CMD_NET #undef CONFIG_CMD_NFS @@ -63,7 +67,36 @@ #define COPY_BL2_FNPTR_ADDR0x02020030 #define CONFIG_SPL_TEXT_BASE 0x02021410 -#define CONFIG_BOOTCOMMAND "fatload mmc 0 40007000 uImage; bootm 40007000" +#define CONFIG_EXTRA_ENV_SETTINGS \ + "loadaddr=0x40007000\0" \ + "rdaddr=0x4800\0" \ + "kerneladdr=0x40007000\0" \ + "ramdiskaddr=0x4800\0" \ + "console=ttySAC2,115200n8\0" \ + "mmcdev=0\0" \ + "bootenv=uEnv.txt\0" \ + "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ + "importbootenv=echo Importing environment from mmc ...; " \ + "env import -t $loadaddr $filesize\0" \ +"loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \ +"bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ +"source ${loadaddr}\0" +#define CONFIG_BOOTCOMMAND \ + "if mmc rescan; then " \ + "echo SD/MMC found on device ${mmcdev};" \ + "if run loadbootenv; then " \ + "echo Loaded environment from ${bootenv};" \ + "run importbootenv;" \ + "fi;" \ + "if test -n $uenvcmd; then " \ + "echo Running uenvcmd ...;" \ + "run uenvcmd;" \ + "fi;" \ + "if run loadbootscript; then " \ + "run bootscript; " \ + "fi; " \ + "fi;" \ + "load mmc ${mmcdev} ${loadaddr} uImage; bootm ${loadaddr} " #define CONFIG_IDENT_STRING" for ORIGEN" -- 1.8.4.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [FAT/EXT4/SANDBOX] files > 2GB
Hello, I recently saw a post about fat commands such as fatls returning -ve values under u-boot for files whose sizes are >=2GB. fatsize would also not set up filesize in this case. This also effects ext4/sandbox commands. I just looked at the ones which are handled by fs/fs.c I am thinking of cleaning this up a bit. My question is, is there some kind of preexisting automated test that I can build into u-boot which adds a command which does the test for me? For example, it could use the FS/read/write commands to create files with some pattern that it knows of, reads them for various sizes to check if they are correct etc. Same procedure for the [FS]size command as well. I do have made the changes to correct the behavior. The code change touches the [FS]read part of the code, hence, I want to test it extensively to assure me that I haven't broken anything else. I am nervous about the sandbox related code as I do not know how to even use them! Thanks for your help - Suriyan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Upstream uboot and Arndale 5250 support
Le 08/10/2014 12:16, Paolo Pisati a écrit : that's weird, because i don't have bootz: are you using a patched u-boot? i'm using the default arndale_defconfig. anyhow, can i have your full working config? i'm starting to feel i'm chasing ghosts here. I used this patch for -rc2 (which will not apply on -rc3 because of changes on arndale config between -rc2 and -rc3): https://patchwork.ozlabs.org/patch/391247/raw/ with arndale_defconfig. Then, I used a bootscript which defined and used the values I gave you: kerneladdr=0x4400 ramdiskaddr=0x4500 fdtaddr=0x4c00 But you can define those values manually, of courses. Hope it will help you. Guillaume ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [SoCFPGA] next steps
Hi Marek, On 10/7/14, 7:45 AM, Marek Vasut wrote: > Hey, > > given that we now have most of the u-boot socfpga stuff in mainline, I > decided > it would be a good idea to list what we're still missing and we should also > decide how to move on now. Thanks for all of your hard work on this! > > First thing I should probably clarify is the late acceptance of the socfpga > patches. This is certainly not something we do regularly and is one of the > worst possible practices to do, but this time it felt rather important to get > the platform in shape, so this exception happened. Furthermore, all of the > code > in u-boot-socfpga should be based on u-boot-arm and should be submitted > through > the u-boot-arm repository, not directly to u-boot . > > As you probably noticed, there is a lot of topic branches in the > u-boot-socfpga > [1] repository, each of them with a date tag. This decision came to be so that > rebasing of a branch can be avoided. I will most likely garbage-collect the > old > and useless topic branches at some point, when they become irrelevant due to > the > code being merged into u-boot-arm/master (and then to u-boot/master). > > I think that's about it for the organization part. Now for the remaining part, > we are still missing a few things. Some of them are ready, some of them, not > so > much: > > SPL: This is something we still miss from mainline. We will need to discuss >this thoroughly, but one thing is obvious already -- we need to figure >out how to interoperate with Quartus resp. the bsp-editor generated >header files to assemble the SPL properly. Have you or anyone else already started on this work? If not, then this is an area that I can start to work on. > USB: This is scheduled for the next merge window. The DWC2 driver is cleaned >up and seems to be in rather good state. The USB driver currently > resides >in [2] > EPCQ: This is something I prepared and tested real quick. The EPCS/EPCQ SPI > NOR >can be operated via the Altera SPI driver, which is currently unused at >all and thus suffering bitrot. The current cleanup is here [3] > NET: Does the SoCDK use EMAC0 or EMAC1 ? I believe we still have this issue >open, I recall Chin was complaining about this. The SoCDK is using EMAC1. BR, Dinh ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] U-Boot Mini Summit
Hi Alexey, > Hi Detlev, > > On Tue, 2014-10-07 at 11:38 +0200, Detlev Zundel wrote: >> Hello Masahiro-san, >> >> [...] >> >> > Perhaps, is it better to insert 5-minute break between talks? >> > Speakers might need to get something prepared. (connecting their >> > laptop to the beamer, etc.) >> >> Of course. I did not explicitely include this in the agenda, but such a >> 5 minute break is what I'll strive to maintain. > > I would even propose to have a backup setup for slides presentation. I fully agree and it is already in the works. > I remember I once tried to use a beamer attached to my Fedora-driven > laptop and didn't succeed with that. > > Moreover new gen laptops may only have like mini-DisplayPort output > instead of VGA so there's a probability some laptops won't have a chance > to be connected to existing (not that advanced/modern) beamer. Indeed. > So given you guys have all presentations beforehand (I believe in for of > PDFs) would be good to have an ability to display them if my laptop > refuses to work with beamer again. If one laptop fails then we still have enough redundancy to make it happen :) Cheers Detlev -- Once the implementation is up and running, it is still a trick to keep it running. In a normal, closed implementation, this is not a problem; in a system with metaobject protocols [..] there is the potential for spectacular failure modes if certain situations are not properly anticipated. -- The Art of the Metaobject Protocol -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] fix typo in error message
Fix confusing typo in error message. Signed-off-by: Pavel Machek diff --git a/scripts/multiconfig.sh b/scripts/multiconfig.sh index 4a8737f..811fa6e 100644 --- a/scripts/multiconfig.sh +++ b/scripts/multiconfig.sh @@ -120,7 +120,7 @@ do_board_defconfig () { if [ ! -r $defconfig_path ]; then echo >&2 "***" - echo >&2 "*** Can't find default configuration \"confis/$1\"!" + echo >&2 "*** Can't find default configuration \"configs/$1\"!" echo >&2 "***" exit 1 fi -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] fix typo in error message
Hello Pavel, On 08-10-14 15:47, Pavel Machek wrote: Fix confusing typo in error message. Signed-off-by: Pavel Machek diff --git a/scripts/multiconfig.sh b/scripts/multiconfig.sh index 4a8737f..811fa6e 100644 --- a/scripts/multiconfig.sh +++ b/scripts/multiconfig.sh @@ -120,7 +120,7 @@ do_board_defconfig () { if [ ! -r $defconfig_path ]; then echo >&2 "***" - echo >&2 "*** Can't find default configuration \"confis/$1\"!" + echo >&2 "*** Can't find default configuration \"configs/$1\"!" echo >&2 "***" exit 1 fi Already pending, see https://patchwork.ozlabs.org/patch/395589. Regards, Jeroen ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH][v3] ls102x: configs - Add hash command in freescale LS1 platforms
Hardware accelerated support for SHA-1 and SHA-256 has been added. Hash command enabled along with hardware accelerated support for SHA-1 and SHA-256 for platforms which have CAAM block. Signed-off-by: Ruchika Gupta --- Changed from v2: Incorporated Denx comments Rearranged config options in order sec_init call modified Changes from v1: Rebased to HEAD of uboot Compilation warning fixed in ls1021atwr build arch/arm/include/asm/arch-ls102xa/config.h | 8 board/freescale/ls1021aqds/ls1021aqds.c| 8 board/freescale/ls1021atwr/ls1021atwr.c| 8 include/configs/ls1021aqds.h | 6 ++ include/configs/ls1021atwr.h | 6 ++ 5 files changed, 36 insertions(+) diff --git a/arch/arm/include/asm/arch-ls102xa/config.h b/arch/arm/include/asm/arch-ls102xa/config.h index a500b5b..d12038f 100644 --- a/arch/arm/include/asm/arch-ls102xa/config.h +++ b/arch/arm/include/asm/arch-ls102xa/config.h @@ -19,6 +19,8 @@ #define CONFIG_SYS_IFC_ADDR(CONFIG_SYS_IMMR + 0x0053) #define CONFIG_SYS_FSL_ESDHC_ADDR (CONFIG_SYS_IMMR + 0x0056) #define CONFIG_SYS_FSL_SCFG_ADDR (CONFIG_SYS_IMMR + 0x0057) +#define CONFIG_SYS_FSL_SEC_ADDR(CONFIG_SYS_IMMR + 0x70) +#define CONFIG_SYS_FSL_JR0_ADDR(CONFIG_SYS_IMMR + 0x71) #define CONFIG_SYS_FSL_SERDES_ADDR (CONFIG_SYS_IMMR + 0x00ea) #define CONFIG_SYS_FSL_GUTS_ADDR (CONFIG_SYS_IMMR + 0x00ee) #define CONFIG_SYS_FSL_LS1_CLK_ADDR(CONFIG_SYS_IMMR + 0x00ee1000) @@ -66,6 +68,7 @@ #define CONFIG_SYS_FSL_DSPI_BE #define CONFIG_SYS_FSL_QSPI_BE #define CONFIG_SYS_FSL_DCU_BE +#define CONFIG_SYS_FSL_SEC_LE #define DCU_LAYER_MAX_NUM 16 @@ -76,8 +79,13 @@ #define CONFIG_SYS_FSL_IFC_BANK_COUNT 8 #define CONFIG_NUM_DDR_CONTROLLERS 1 #define CONFIG_SYS_FSL_DDR_VER FSL_DDR_VER_5_0 +#define CONFIG_SYS_FSL_SEC_COMPAT 5 #else #error SoC not defined #endif +#if CONFIG_SYS_FSL_SEC_COMPAT >= 4 +#define CONFIG_FSL_CAAM +#endif + #endif /* _ASM_ARMV7_LS102XA_CONFIG_ */ diff --git a/board/freescale/ls1021aqds/ls1021aqds.c b/board/freescale/ls1021aqds/ls1021aqds.c index 12e83f7..ea5f884 100644 --- a/board/freescale/ls1021aqds/ls1021aqds.c +++ b/board/freescale/ls1021aqds/ls1021aqds.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "../common/qixis.h" #include "ls1021aqds_qixis.h" @@ -213,6 +214,13 @@ int config_serdes_mux(void) return 0; } +#if defined(CONFIG_MISC_INIT_R) +int misc_init_r(void) +{ + return sec_init(); +} +#endif + int board_init(void) { struct ccsr_cci400 *cci = (struct ccsr_cci400 *)CONFIG_SYS_CCI400_ADDR; diff --git a/board/freescale/ls1021atwr/ls1021atwr.c b/board/freescale/ls1021atwr/ls1021atwr.c index b522ff2..6f841c4 100644 --- a/board/freescale/ls1021atwr/ls1021atwr.c +++ b/board/freescale/ls1021atwr/ls1021atwr.c @@ -16,6 +16,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -280,6 +281,13 @@ int board_init(void) return 0; } +#if defined(CONFIG_MISC_INIT_R) +int misc_init_r(void) +{ + return sec_init(); +} +#endif + void ft_board_setup(void *blob, bd_t *bd) { ft_cpu_setup(blob, bd); diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h index bb47813..e1ca78a 100644 --- a/include/configs/ls1021aqds.h +++ b/include/configs/ls1021aqds.h @@ -388,4 +388,10 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_OF_BOARD_SETUP #define CONFIG_CMD_BOOTZ +#define CONFIG_MISC_INIT_R + +/* Hash command with SHA acceleration supported in hardware */ +#define CONFIG_CMD_HASH +#define CONFIG_SHA_HW_ACCEL + #endif diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h index 45b2272..7199c92 100644 --- a/include/configs/ls1021atwr.h +++ b/include/configs/ls1021atwr.h @@ -288,4 +288,10 @@ #define CONFIG_OF_BOARD_SETUP #define CONFIG_CMD_BOOTZ +#define CONFIG_MISC_INIT_R + +/* Hash command with SHA acceleration supported in hardware */ +#define CONFIG_CMD_HASH +#define CONFIG_SHA_HW_ACCEL + #endif -- 1.8.1.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-boot] [Patch v2 0/4] keystone2: generalize navigator driver usage
On 09/05/2014 07:02 PM, Ivan Khoronzhuk wrote: This series generalize keystone_nav driver usage in order to add keystone2 K2E/K2L SoCs support. Based on u-boot-ti/master v2..v1: rebased on top of u-boot-ti/master, no functional changes Ivan Khoronzhuk (4): keystone2: keystone_nav: don't use hard addresses in qm_config keystone2: keystone_nav: don't use hard addresses in netcp_pktdma dma: keystone_nav: move keystone_nav driver to driver/dma/ dma: keystone_nav: generalize driver usage arch/arm/cpu/armv7/keystone/Makefile | 1 - arch/arm/include/asm/arch-keystone/hardware-k2hk.h | 13 ++ arch/arm/include/asm/arch-keystone/hardware.h | 13 +- .../{arch-keystone => ti-common}/keystone_nav.h| 16 +- drivers/dma/Makefile | 1 + .../armv7/keystone => drivers/dma}/keystone_nav.c | 196 - drivers/dma/keystone_nav_cfg.c | 27 +++ drivers/net/keystone_net.c | 15 +- include/configs/k2hk_evm.h | 2 + include/configs/ks2_evm.h | 29 +++ 10 files changed, 174 insertions(+), 139 deletions(-) rename arch/arm/include/asm/{arch-keystone => ti-common}/keystone_nav.h (91%) rename {arch/arm/cpu/armv7/keystone => drivers/dma}/keystone_nav.c (53%) create mode 100644 drivers/dma/keystone_nav_cfg.c Tom, Could you please pickup subj series? -- Regards, Ivan Khoronzhuk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-boot] [Patch v2 0/4] keystone2: generalize navigator driver usage
On Wed, Oct 08, 2014 at 05:37:10PM +0300, Ivan Khoronzhuk wrote: > On 09/05/2014 07:02 PM, Ivan Khoronzhuk wrote: > >This series generalize keystone_nav driver usage in order to > >add keystone2 K2E/K2L SoCs support. > > > >Based on u-boot-ti/master > > > >v2..v1: > > rebased on top of u-boot-ti/master, no functional changes > > > >Ivan Khoronzhuk (4): > > keystone2: keystone_nav: don't use hard addresses in qm_config > > keystone2: keystone_nav: don't use hard addresses in netcp_pktdma > > dma: keystone_nav: move keystone_nav driver to driver/dma/ > > dma: keystone_nav: generalize driver usage > > > > arch/arm/cpu/armv7/keystone/Makefile | 1 - > > arch/arm/include/asm/arch-keystone/hardware-k2hk.h | 13 ++ > > arch/arm/include/asm/arch-keystone/hardware.h | 13 +- > > .../{arch-keystone => ti-common}/keystone_nav.h| 16 +- > > drivers/dma/Makefile | 1 + > > .../armv7/keystone => drivers/dma}/keystone_nav.c | 196 > > - > > drivers/dma/keystone_nav_cfg.c | 27 +++ > > drivers/net/keystone_net.c | 15 +- > > include/configs/k2hk_evm.h | 2 + > > include/configs/ks2_evm.h | 29 +++ > > 10 files changed, 174 insertions(+), 139 deletions(-) > > rename arch/arm/include/asm/{arch-keystone => ti-common}/keystone_nav.h > > (91%) > > rename {arch/arm/cpu/armv7/keystone => drivers/dma}/keystone_nav.c (53%) > > create mode 100644 drivers/dma/keystone_nav_cfg.c > > > > Tom, > > Could you please pickup subj series? During the next merge window yes, I don't think this part was posted in time for this release. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V5] ARM: mx6: Add support for Kosagi Novena
Hi Sean, - Цитат от Sean Cross (x...@kosagi.com), на 08.10.2014 в 10:47 - > On 08/10/2014 05:55, Nikolay Dimitrov wrote: >> Hi Marek, >> >> I'm marking only the critical issues that are left unfixed from >> previous conversations, to speed-up the process a little bit. >> I'll send later patches for the non-critical issues to spare you the >> extra work (and I'm sure my constructive criticism is already boring >> :D ). >> >> >> On 10/06/2014 07:02 PM, Marek Vasut wrote: >>> +#define NOVENA_USB_HUB_RESETIMX_GPIO_NR(7, 12) >> ... >>> +/* >>> + * USB >>> + */ >>> +#ifdef CONFIG_USB_EHCI_MX6 >>> +int board_ehci_hcd_init(int port) >>> +{ >>> +/* Reset USB hub */ >>> +if (port == 1) { >>> +gpio_set_value(NOVENA_USB_HUB_RESET, 0); >>> +mdelay(2); >>> +gpio_set_value(NOVENA_USB_HUB_RESET, 1); >>> +} >>> +return 0; >>> +} >>> +#endif >> >> As we previously discussed, this pin definition conflicts with >> NOVENA_PCIE_POWER_ON_GPIO (GPIO7_IO12 is connected to PCIE_PWRON), so >> by asserting it, you'll turn-off the wrong sub-system. >> >> Currently the USB hub is reset only by system reset (RESETBMCU >> asserted by the PMIC). I don't see how the CPU can selectively reset >> the USB hub via a GPIO, so it would be better to remove the reset code. >> >> @Sean - can you please confirm/reject this finding? @Sean: Do you have any comments on USB hub reset stuff? Should we ditch entirely the reset code, or should we modify it somehow to work properly? >>> +#define NOVENA_AUDIO_PWRONIMX_GPIO_NR(5, 17) >> ... >>> +/* >>> + * Audio >>> + */ >>> +static iomux_v3_cfg_t audio_pads[] = { >>> +/* AUD_PWRON */ >>> +MX6_PAD_DISP0_DAT23__GPIO5_IO17 | MUX_PAD_CTRL(NO_PAD_CTRL), >>> +}; >> >> The speaker amplifiers will still be disabled, as AUDIO_PWRON is not >> connected to them (R30A is marked as DNP). You need to add one more >> GPIO to enable the speaker amplifiers, here's the fix: >> >> #define NOVENA_AUDIO_PWRONIMX_GPIO_NR(5, 17) >> #define NOVENA_AUDIO_SPK_AMP_ONIMX_GPIO_NR(4, 9) >> >> /* >> * Audio >> */ >> static iomux_v3_cfg_t audio_pads[] = { >> /* AUD_PWRON */ >> MX6_PAD_KEY_ROW1__GPIO5_IO17 | MUX_PAD_CTRL(NO_PAD_CTRL), >> >> /* Speakers' amplifiers #SHDWN */ >> MX6_PAD_KEY_ROW1__GPIO4_IO09 | MUX_PAD_CTRL(NO_PAD_CTRL), >> }; >> >> static void novena_spl_setup_iomux_audio(void) >> { >> imx_iomux_v3_setup_multiple_pads(audio_pads, ARRAY_SIZE(audio_pads)); >> >> gpio_direction_output(NOVENA_AUDIO_PWRON, 1); >> gpio_direction_output(NOVENA_AUDIO_SPK_AMP_ON, 1); >> } >> >> >> Side comment: If someone needs to talk to the Audio Codec via I2C3 in >> U-Boot environment, don't be surprised if the codec doesn't respond to >> any I2C requests at all (I've had such issues with SGTL5000). The most >> probable reason is that the codec doesn't receive reference clock from >> imx6 GPIO0. This is not a critical issues as later the kernel muxes >> this GPIO0 properly, but keep this in mind if you want to hack the >> audio-codec at low level. > > The audio codec ought to answer even when the reference clock isn't > active. I actually can't recall, but I think the digital side still > works. Well, that would be great if it works out this way. I just shared what happened with another audio codec, to spare some frustration to others. > The audio codec needs to be turned on because otherwise it will > pull the SCL and SCK lines low, blocking I2C3 from working at all. Agreed. > Actually, now that I'm looking at it, we just had to make an ECO to get > rid of SPK_AMP_ON. It is now ganged to AUDIO_PWRON, because SPK_AMP_ON > was accidentally dual-purposed as a GPIO for the front button on the > desktop / laptop. This change was made very recently (last Friday I > think), and we'll be switching resistors on the mainboard when they're > built in order to make the change. Well, all I have is the Novena schematic (http://bunniefoo.com/novena/pvt2_release/novena_pvt2.PDF) so all my analysis is based on this PDF. On page 14, R30A is DNP, and R28A is populated, this is why I suggested this modification to enable speaker amps. If there are schematic changes, please publish the new version so we can use the proper schematic and reduce spam. @Marek: According to this latest update, there's no need for my fix for NOVENA_AUDIO_SPK_AMP_ON, as your original code will work just fine with the planned schematic changes. Please disregard the fix. Kind regards, Nikolay ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request for u-boot-marvell.git
Hi Prafulla, On Mon, 6 Oct 2014 06:22:29 -0700, Prafulla Wadaskar wrote: > Hi Albert, > > Please pull > The following changes since commit be9f643ae6aa9044c60fe80e3a2c10be8371c692: > > Merge branch 'for-tom' of git://git.denx.de/u-boot-dm (2014-09-26 20:10:48 > -0400) > > are available in the git repository at: > > git://git.denx.de/u-boot-marvell.git master > > DrEagle (5): > ARM: sheevaplug: change env location > ARM: sheevaplug: add MVSATA driver > ARM: sheevaplug: add MTD defaults > ARM: sheevaplug: redefine MTDPARTS > ARM: sheevaplug: add HUSH parser > > Michael Walle (1): > lsxl: convert to generic board and fix typo > > include/configs/lsxl.h |4 ++- > include/configs/sheevaplug.h | 46 + > 2 files changed, 44 insertions(+), 6 deletions(-) > > Regards... > Prafulla . . . Applied to u-boot-arm/master, thanks! Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] please pull u-boot-samsung master
Hi Minkyu, On Wed, 08 Oct 2014 20:36:34 +0900, Minkyu Kang wrote: > Dear Albert, > > The following changes since commit 6dd0e7c00bfa5ce861a72b8e4a3ef9e787306125: > > git-mailrc: add me as a maintainer of UniPhier platform (2014-10-05 > 14:10:09 +0900) > > are available in the git repository at: > > http://git.denx.de/u-boot-samsung > > for you to fetch changes up to b219773957d2ee8fedb56f0fcb19288eb72d4867: > > odroid: clock: set aclk_cores to 200MHz (2014-10-08 19:48:43 +0900) Hmm, commit b219773957d2ee8fedb56f0fcb19288eb72d4867 does not seem to exist at all in current u-boot-samsung repo. Can you check this PR? Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/23] dm: Introduce driver model for sunxi
Hi, On 4 October 2014 11:29, Simon Glass wrote: > This series adds driver model support for serial and GPIO for sunxi. Since > I only have a sun7i board to test with, I have added a new config for the > pcDuino3, which uses device tree and driver model. This should make it > fairly easy to enable for the other boards at some point. > > Now that we have about 5 GPIO drivers it is clear that the request()/free() > logic should be in the uclass rather than the driver. So far drivers don't > have to do anything in those methods except adjust pin configuration. > Patches are included to make this change, including removing the redundant > code in the various GPIO drivers. The sunxi driver works the same way. > > So far at least GPIO drivers don't tend to have anything special to report > for the 'gpio status' command. Partly this is because we only support a > simple concept of GPIOs so far (no drive strength, function selection, > etc.) but even if this were to be supported it would be better to handle > it generically where possible. So the get_state() call can be replaced with > a generic one in the uclass. This can be implemented with the existing > uclass interface: get_function() to find out if the pin is set as an input, > output or not a GPIO, and get_value() to find its value. > > As a result, it is safe to remove the get_state() method, and this series > does that also. > > This series is available at u-boot-dm/sunix-working. > Any more comments on this series please? I have a few nits so could respin. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [SoCFPGA] next steps
On Wed, Oct 08, 2014 at 10:58:24AM +0200, Michal Simek wrote: > Hi, > > On 10/07/2014 02:45 PM, Marek Vasut wrote: > > Hey, > > > > given that we now have most of the u-boot socfpga stuff in mainline, I > > decided > > it would be a good idea to list what we're still missing and we should also > > decide how to move on now. > > > > First thing I should probably clarify is the late acceptance of the socfpga > > patches. This is certainly not something we do regularly and is one of the > > worst possible practices to do, but this time it felt rather important to > > get > > the platform in shape, so this exception happened. Furthermore, all of the > > code > > in u-boot-socfpga should be based on u-boot-arm and should be submitted > > through > > the u-boot-arm repository, not directly to u-boot . > > Platform was in this shape for a while that's why I can't see the > reason why this happen. > > Tom: Does it mean that every platform which is not in good shape can > go directly to the mainline in any time? It is definitely something > which is good to know. So, it's a long standing thing where for non-core changes, deferring to the relevant custodian about what's going to come in close to the release is what's done. So yes, I grilled Marek about what non-socfpga things would be impacted by the changes (RPi) and if he'd tested things there. It all had been through a few post/review cycles. There's an argument to be made that we shouldn't have let socfpga in, back in 2012 or should have pushed harder, sooner, to get more progress made on "real" platform support. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 0/29] Introduce driver model support for SPI, SPI flash, cros_ec
Hi, On 29 September 2014 13:34, Simon Glass wrote: > Up until now driver model has not been used for any type of bus. Buses > have some unique properties and needs, so we cannot claim that driver > model can cover all the common cases unless we have converted a bus over > to driver model. > > SPI is a reasonable choice for this next step. It has a fairly simple > API and not too many dependencies. The main one is SPI flash so we may > as well convert that also. Since the boards I test with have cros_ec I > have also included that, for SPI only. > > The technique used is make use of driver model's supported data structures > to hold information currently kept by each subsystem in a private data > structure. Since 'struct spi_slave' relates to the slave device on the bus > it is stored in the 'parent' data with each child device of the bus. > Since 'struct spi_flash' is a standard interface used for each SPI flash > driver, it is stored in the SPI FLash uclass's private data for each > device. > > New defines are created to enable driver model for each subsystem. These > are: > >CONFIG_DM_SPI >CONFIG_DM_SPI_FLASH >CONFIG_DM_CROS_EC > > This allows us to move some boards and drivers to driver model, while > leaving others behind. A 'big bang' conversion of everything to driver > model, even at a subsystem level, is never going to work. > > There is some cost in changing the uclass interface after it is created, > so if you have limited time, please spend it reviewing the uclass > interfaces in spi.h and spi_flash.h. These need to be supported by each > driver, so changing them later may involve changing multiple drivers. > > To assist with the conversion of other SPI drivers, a README file is > added to walk through the process. > > So far, sandbox, exynos and tegra drivers are converted over. > > As always, driver model patches are available at u-boot-dm.git branch > 'working'. There is a branch for just this series called 'spi-working'. I think this has had enough time out there. So I will push this to dm/next later this week. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 09/19] dm: pmic: new commands: pmic and regulator
This introduces new commands: - pmic (new) - CONFIG_DM_PMIC - regulator - CONFIG_DM_PMIC Both uses a common code and dm pmic api. To avoid code mess the old pmic command is kept without changes. Command pmic This is based on an old pmic command code - the new one uses driver model pmic api. The previous pmic I/O functionalities, stays unchanged. And now read/write is the main pmic command purpose. This command can use only UCLASS_PMIC devices, since this uclass is designed for pmic I/O operations only. Command options (pmic [option]): - list - list available PMICs - dev - set id to current pmic device - pmic dump- dump registers - pmic read - read register - pmic write - write register The user interface is similar to the 'mmc' command. Each pmic device driver should provide at least UCLASS_PMIC support, as a basic pmic device I/O interface. Command regulator The extension for 'pmic' command is 'regulator' command. This actually uses the same code, but provides an interface to pmic optional 'UCLASS_PMIC_REGULATOR' operations. If pmic device driver provides support to this another pmic uclass, then this command provides useful user interface. The regulator operations and required structures can be found in this header: 'include/power/regulator.h' This was designed to allow safe I/O access to pmic device without the pmic documentation. If driver provide each regulator - value and mode descriptor - then user can operate on it. Command options (regulator [option]): - list - list UCLASS regulator devices - dev [id] - show or set current regulator device - dump - dump registers of current regulator - [ldo/buck][N] [name/state/desc]- print regulator(s) info - [ldoN/buckN] [setval/setmode] [mV/modeN] [-f] - set val (mV) (forcibly) or mode - only if desc available Example of usage: regulator list - look after regulator 'Id' number regulator dev 'Id' - set current device regulator ldo state - list state of current device all ldo's regulator ldo desc - list ldo's descriptors regulator ldo1 setval 1000- set device ldo 1 voltage to 1000mV !!And the next one can be risky!! regulator ldo1 setval 1200 -f - if value exceeds limits - set force regulator ldo1 setmode 5 - set device ldo 1 mode to '5' (force no available) The same for 'buck' regulators. The regulator descriptor 'min' and 'max' limits prevents setting unsafe value. But sometimes it is useful to change the regulator value for some test - so the force option (-f) is available. This option is not available for change the mode, since this depends on pmic device design, but the required voltage value can change, e.g. if some hardware uses pins header. Signed-off-by: Przemyslaw Marczak --- drivers/power/Makefile | 1 + drivers/power/cmd_pmic.c | 845 +++ 2 files changed, 846 insertions(+) create mode 100644 drivers/power/cmd_pmic.c diff --git a/drivers/power/Makefile b/drivers/power/Makefile index 6a6333f..2af63f2 100644 --- a/drivers/power/Makefile +++ b/drivers/power/Makefile @@ -20,5 +20,6 @@ obj-$(CONFIG_POWER_I2C) += power_i2c.o obj-$(CONFIG_POWER_SPI) += power_spi.o obj-$(CONFIG_DM_PMIC_SPI) += pmic_spi.o obj-$(CONFIG_DM_PMIC_I2C) += pmic_i2c.o +obj-$(CONFIG_DM_PMIC) += cmd_pmic.o obj-$(CONFIG_DM_PMIC) += pmic-uclass.o obj-$(CONFIG_DM_REGULATOR) += regulator-uclass.o diff --git a/drivers/power/cmd_pmic.c b/drivers/power/cmd_pmic.c new file mode 100644 index 000..399fd85 --- /dev/null +++ b/drivers/power/cmd_pmic.c @@ -0,0 +1,845 @@ +/* + * Copyright (C) 2014 Samsung Electronics + * Przemyslaw Marczak + * + * Copyright (C) 2011 Samsung Electronics + * Lukasz Majewski + * + * (C) Copyright 2010 + * Stefano Babic, DENX Software Engineering, sba...@denx.de + * + * (C) Copyright 2008-2009 Freescale Semiconductor, Inc. + * SPDX-License-Identifier:GPL-2.0+ + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define LINE_BUF_LIMIT 80 +#define STR_BUF_LEN26 +#define ID_STR_LIMIT 4 +#define UC_STR_LIMIT 16 +#define DRV_STR_LIMIT 26 +#define IF_STR_LIMIT 12 + +DECLARE_GLOBAL_DATA_PTR; + +static struct udevice *pmic_curr; +static struct udevice *reg_curr; + +enum info_type { + INFO_NAME, + INFO_STATE, + INFO_DESC, + INFO_DESC_MODE, + INFO_DESC_VAL, +}; + +static char * const pmic_interfaces[] = { + "I2C", + "SPI", + "--", +}; + +const char *pmic_if_str(int interface) +{ + if (interface >= ARRAY_SIZE(pmic_interfaces)) + return NULL; + + return pmic_interfaces[interface]; +} + +char *desc_type_str(int desc_type) +{ + static char *type_name[] = {"LDO", "BUCK"}; + + switch (desc_type) { + case DESC_TYPE_LDO: + case DESC_TYPE_BUCK: + return type_name[desc_type]; + default: + return NULL;
[U-Boot] [PATCH 03/19] exynos: config-common: enable generic fs command
This command is required for trats2 and odroid environment, since those boards uses it. Signed-off-by: Przemyslaw Marczak --- include/configs/exynos-common.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/exynos-common.h b/include/configs/exynos-common.h index fa02cb2..3d30a25 100644 --- a/include/configs/exynos-common.h +++ b/include/configs/exynos-common.h @@ -80,6 +80,7 @@ #define CONFIG_EFI_PARTITION #define CONFIG_CMD_PART #define CONFIG_PARTITION_UUIDS +#define CONFIG_CMD_FS_GENERIC /* Miscellaneous configurable options */ #define CONFIG_SYS_LONGHELP/* undef to save memory */ -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 01/19] lib: errno: introduce errno_str(): returns errno related message
The functions error's numbers are standarized - but the error messages are not. The errors are often handled with unclear error messages, so why not use an errno standarized messages. Advantages: - This could decrease the binary size. - Appended with a detailed information, the error message will be clear. This commit introduces new function: - const char *errno_to_str(int errno) The functions returns a pointer to the errno corresponding text message: - if errno is null or positive number - a pointer to "Success" message - if errno is negative - a pointer to errno related message Signed-off-by: Przemyslaw Marczak --- include/errno.h | 3 ++ lib/Makefile| 1 + lib/errno_str.c | 147 3 files changed, 151 insertions(+) create mode 100644 lib/errno_str.c diff --git a/include/errno.h b/include/errno.h index e24a33b..14ac3cb 100644 --- a/include/errno.h +++ b/include/errno.h @@ -6,4 +6,7 @@ extern int errno; #define __set_errno(val) do { errno = val; } while (0) +#ifdef CONFIG_ERRNO_STR +const char *errno_str(int errno); +#endif #endif /* _ERRNO_H */ diff --git a/lib/Makefile b/lib/Makefile index 320197a..6bb2e9b 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -53,6 +53,7 @@ endif obj-$(CONFIG_ADDR_MAP) += addr_map.o obj-y += hashtable.o obj-y += errno.o +obj-$(CONFIG_ERRNO_STR) += errno_str.o obj-y += display_options.o obj-$(CONFIG_BCH) += bch.o obj-y += crc32.o diff --git a/lib/errno_str.c b/lib/errno_str.c new file mode 100644 index 000..0ba950e --- /dev/null +++ b/lib/errno_str.c @@ -0,0 +1,147 @@ +/* + * Copyright (C) 2014 Samsung Electronics + * Przemyslaw Marczak + * + * SDPX-License-Identifier:GPL-2.0+ + */ +#include +#include + +#define ERRNO_MSG(errno, msg) msg +#define SAME_AS(x) (const char *)&errno_message[x] + +static const char * const errno_message[] = { + ERRNO_MSG(0, "Success"), + ERRNO_MSG(EPERM, "Operation not permitted"), + ERRNO_MSG(ENOEN, "No such file or directory"), + ERRNO_MSG(ESRCH, "No such process"), + ERRNO_MSG(EINTR, "Interrupted system call"), + ERRNO_MSG(EIO, "I/O error"), + ERRNO_MSG(ENXIO, "No such device or address"), + ERRNO_MSG(E2BIG, "Argument list too long"), + ERRNO_MSG(ENOEXEC, "Exec format error"), + ERRNO_MSG(EBADF, "Bad file number"), + ERRNO_MSG(ECHILD, "No child processes"), + ERRNO_MSG(EAGAIN, "Try again"), + ERRNO_MSG(ENOMEM, "Out of memory"), + ERRNO_MSG(EACCES, "Permission denied"), + ERRNO_MSG(EFAULT, "Bad address"), + ERRNO_MSG(ENOTBL, "Block device required"), + ERRNO_MSG(EBUSY, "Device or resource busy"), + ERRNO_MSG(EEXIST, "File exists"), + ERRNO_MSG(EXDEV, "Cross-device link"), + ERRNO_MSG(ENODEV, "No such device"), + ERRNO_MSG(ENOTDIR, "Not a directory"), + ERRNO_MSG(EISDIR, "Is a directory"), + ERRNO_MSG(EINVAL, "Invalid argument"), + ERRNO_MSG(ENFILE, "File table overflow"), + ERRNO_MSG(EMFILE, "Too many open files"), + ERRNO_MSG(ENOTTY, "Not a typewriter"), + ERRNO_MSG(ETXTBSY, "Text file busy"), + ERRNO_MSG(EFBIG, "File too large"), + ERRNO_MSG(ENOSPC, "No space left on device"), + ERRNO_MSG(ESPIPE, "Illegal seek"), + ERRNO_MSG(EROFS, "Read-only file system"), + ERRNO_MSG(EMLINK, "Too many links"), + ERRNO_MSG(EPIPE, "Broken pipe"), + ERRNO_MSG(EDOM, "Math argument out of domain of func"), + ERRNO_MSG(ERANGE, "Math result not representable"), + ERRNO_MSG(EDEADLK, "Resource deadlock would occur"), + ERRNO_MSG(ENAMETOOLONG, "File name too long"), + ERRNO_MSG(ENOLCK, "No record locks available"), + ERRNO_MSG(ENOSYS, "Function not implemented"), + ERRNO_MSG(ENOTEMPTY, "Directory not empty"), + ERRNO_MSG(ELOOP, "Too many symbolic links encountered"), + ERRNO_MSG(EWOULDBLOCK, SAME_AS(EAGAIN)), + ERRNO_MSG(ENOMSG, "No message of desired type"), + ERRNO_MSG(EIDRM, "Identifier removed"), + ERRNO_MSG(ECHRNG, "Channel number out of range"), + ERRNO_MSG(EL2NSYNC, "Level 2 not synchronized"), + ERRNO_MSG(EL3HLT, "Level 3 halted"), + ERRNO_MSG(EL3RST, "Level 3 reset"), + ERRNO_MSG(ELNRNG, "Link number out of range"), + ERRNO_MSG(EUNATCH, "Protocol driver not attached"), + ERRNO_MSG(ENOCSI, "No CSI structure available"), + ERRNO_MSG(EL2HLT, "Level 2 halted"), + ERRNO_MSG(EBADE, "Invalid exchange"), + ERRNO_MSG(EBADR, "Invalid request descriptor"), + ERRNO_MSG(EXFULL, "Exchange full"), + ERRNO_MSG(ENOANO, "No anode"), + ERRNO_MSG(EBADRQC, "Invalid request code"), + ERRNO_MSG(EBADSLT, "Invalid slot"), + ERRNO_MSG(EDEADLOCK, SAME_AS(EDEADLK)), + ERRNO_MSG(EBFONT, "Bad font file format"), + ERRNO_MSG(ENOSTR, "Device not a stream"), + ERRNO_MSG(ENODATA, "No data available"), + ERRNO_MSG(ET
[U-Boot] [PATCH 05/19] dm: pmic: add implementation of driver model regulator uclass
This is the implementation of driver model regulator uclass api. To use it, the CONFIG_DM_PMIC is required with driver implementation, since it provides pmic devices I/O API. The regulator framework is based on a 'structure dm_regulator_ops', which provides all regulator functions call types. The optional and useful regulator features are two descriptor types: - struct regulator_desc - describes the regulator name and value limits should be set by device driver for each regulator number. - struct regulator_mode_desc - also should be defined as mode array for each regulator, since regulators supports few modes, at least: ON/OFF. The regulator driver operations are clear and described in file: include/power/regulator.h: Each regulator "struct driver.ops" should point to "struct dm_regulator_ops". If do, then the drivers can use the regulator api(if implemented): - pmic_ldo_cnt(...) - pmic_buck_cnt(...) - pmic_get_ldo_val(...) - pmic_set_ldo_val(...) - pmic_get_ldo_mode(...) - pmic_set_ldo_mode(...) - pmic_get_buck_val(...) - pmic_set_buck_val(...) - pmic_get_buck_mode(...) - pmic_set_buck_mode(...) To get the regulator device we can use two functions: - pmic_get_by_name(...) - pmic_get_by_interface(...) Main files: - drivers/power/regulator-uclass.c - provides regulator common functions api - include/power/regulator.h - define all structures required by the regulator Changes: - new uclass-id: UCLASS_PMIC_REGULATOR - new config: CONFIG_DM_REGULATOR Signed-off-by: Przemyslaw Marczak --- drivers/power/Makefile | 1 + drivers/power/regulator-uclass.c | 250 include/dm/uclass-id.h | 1 + include/power/pmic.h | 18 +++ include/power/regulator.h| 267 +++ 5 files changed, 537 insertions(+) create mode 100644 drivers/power/regulator-uclass.c create mode 100644 include/power/regulator.h diff --git a/drivers/power/Makefile b/drivers/power/Makefile index 8def501..9a0b8c4 100644 --- a/drivers/power/Makefile +++ b/drivers/power/Makefile @@ -22,3 +22,4 @@ obj-$(CONFIG_POWER_SPI) += power_spi.o obj-$(CONFIG_DM_PMIC_SPI) += pmic_spi.o obj-$(CONFIG_DM_PMIC_I2C) += pmic_i2c.o obj-$(CONFIG_DM_PMIC) += pmic-uclass.o +obj-$(CONFIG_DM_REGULATOR) += regulator-uclass.o diff --git a/drivers/power/regulator-uclass.c b/drivers/power/regulator-uclass.c new file mode 100644 index 000..4c9614e --- /dev/null +++ b/drivers/power/regulator-uclass.c @@ -0,0 +1,250 @@ +/* + * Copyright (C) 2014 Samsung Electronics + * Przemyslaw Marczak + * + * SPDX-License-Identifier:GPL-2.0+ + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +int pmic_ldo_cnt(struct udevice *dev) +{ + const struct dm_regulator_ops *ops; + + ops = pmic_get_uclass_ops(dev, UCLASS_PMIC_REGULATOR); + if (!ops) + return -ENODEV; + + if (!ops->get_ldo_cnt) + return -EPERM; + + return ops->get_ldo_cnt(dev); +} + +int pmic_buck_cnt(struct udevice *dev) +{ + const struct dm_regulator_ops *ops; + + ops = pmic_get_uclass_ops(dev, UCLASS_PMIC_REGULATOR); + if (!ops) + return -ENODEV; + + if (!ops->get_buck_cnt) + return -EPERM; + + return ops->get_buck_cnt(dev); +} + +struct regulator_desc *pmic_ldo_desc(struct udevice *dev, int ldo) +{ + const struct dm_regulator_ops *ops; + + ops = pmic_get_uclass_ops(dev, UCLASS_PMIC_REGULATOR); + if (!ops) + return NULL; + + if (!ops->get_val_desc) + return NULL; + + return ops->get_val_desc(dev, DESC_TYPE_LDO, ldo); +} + +struct regulator_desc *pmic_buck_desc(struct udevice *dev, int buck) +{ + const struct dm_regulator_ops *ops; + + ops = pmic_get_uclass_ops(dev, UCLASS_PMIC_REGULATOR); + if (!ops) + return NULL; + + if (!ops->get_val_desc) + return NULL; + + return ops->get_val_desc(dev, DESC_TYPE_BUCK, buck); +} + +struct regulator_mode_desc *pmic_ldo_mode_desc(struct udevice *dev, int ldo, + int *mode_cnt) +{ + const struct dm_regulator_ops *ops; + + ops = pmic_get_uclass_ops(dev, UCLASS_PMIC_REGULATOR); + if (!ops) + return NULL; + + if (!ops->get_mode_desc_array) + return NULL; + + return ops->get_mode_desc_array(dev, DESC_TYPE_LDO, ldo, mode_cnt); +} + +struct regulator_mode_desc *pmic_buck_mode_desc(struct udevice *dev, int buck, + int *mode_cnt) +{ + const struct dm_regulator_ops *ops; + + ops = pmic_get_uclass_ops(dev, UCLASS_PMIC_REGULATOR); + if (!ops) + return NULL; + + if (!ops->get_mode_desc_array) + return NULL; + + return ops->get_mode_desc_array(dev, D
[U-Boot] [PATCH 02/19] exynos: config-common: enable errno_str() function
Signed-off-by: Przemyslaw Marczak --- include/configs/exynos-common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/exynos-common.h b/include/configs/exynos-common.h index 6ba9bb7..fa02cb2 100644 --- a/include/configs/exynos-common.h +++ b/include/configs/exynos-common.h @@ -95,4 +95,6 @@ #define CONFIG_SYS_NO_FLASH #undef CONFIG_CMD_IMLS +#define CONFIG_ERRNO_STR + #endif /* __CONFIG_H */ -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 00/19] [RFC] Power(full) framework based on Driver Model
Hello, This piece of code was a base for prepare my presentation talk for the U-Boot Mini Summit, which taking place at ELCE2014 conference, 13-th October 2014 Dusseldorf, Germany. The tittle of talk: "Power(full) framework based on Driver Model" The presentation will be shared after the Summit. This patchset introduces the new one PMIC framework for the U-Boot. It is still under the construction, but the basic functionality was achieved and tested. Please feel free to comment and share the opinion. I think that each patch is described full enough, but for some more design details, please look into the documentation file. It includes some basic examples for the PMIC drivers. Quick summary of: Framework: - The new approach - UCLASS_PMIC - simple and designed for device I/O only - Add new uclass types: UCLASS_PMIC and UCLASS_PMIC_REGULATOR - Two uclass drivers for above types - A common regulator operations - will easy cover the real devices design Drivers: - Introduce new PMIC API for drivers - now everything base on "struct udevice" - Introduce Regulator Voltage descriptors and Operation Mode descriptors which are usually taken from the device tree (board dependent data) - Two uclass device drivers for MAX77686(PMIC+REGULATOR) User Interface: - command pmic, unchanged functionality and ported to the driver model - command regulator(NEW) for safe regulator setup from commandline, - now can check output Voltage and operation mode of the regulators, - also can check the board Voltage limits and driver available modes The future plans: - Wait for the I2c Driver Model implementation - Introduce a common way to bind pmic devices - now done by alias "pmic" - Add additional uclass types: MUIC, CHARGER, BATTERY, MFD and maybe more. - Introduce optimal operations for new uclasses - Port all U-Boot drivers to the new Framework - Remove the old drivers and the old PMIC Framework code The assumptions of this work is: - Add new code to independent files - Keep two Frameworks as independent and without conflicts - Don't mix OLD/NEW Framework code - for the readability - Port all drivers using new API - Remove the old Framework and the old drivers A disadvantage: - some parts of the present code is duplicated Need help: - After merge this, it is welcome to help with driver porting. - Everything should be tested The extra feature: The first commit introduces errno_str() function. It is a common function which I hope will be usefull for commands and not only. If any visible error says: -19 or some other magic number, then it means that this function should be used. U-Boot Mini Summit members: This code is maybe not as good as it could be, but the time was limited, and the conference is comming soon. I don't expects a code review of this now, but it would be nice if you take a look of this piece of code before our U-Boot Mini Summit. Of course it depends on you. Best Regards and see you in Dusseldorf! Przemyslaw Marczak Przemyslaw Marczak (19): lib: errno: introduce errno_str(): returns errno related message exynos: config-common: enable errno_str() function exynos: config-common: enable generic fs command dm: pmic: add implementation of driver model pmic uclass dm: pmic: add implementation of driver model regulator uclass dm: common: board_r: add call and weak of power_init_dm() dm: pmic: add max77686 pmic driver dm: regulator: add max77686 regulator driver dm: pmic: new commands: pmic and regulator dm: board:samsung: power_init_board: add requirement of CONFIG_DM_PMIC doc: driver-model: pmic and regulator uclass documentation samsung: board: lcd menu: check if any power framework is enabled samsung: misc: power_key_pressed: add support to dm pmic framework trats2: board: add support to dm pmic api trats2: dts: max77686: add pmic alias and names cleanup trats2: config: enable dm pmic, dm regulator api, dm max77686 odroid: board: add support to dm pmic api odroid: dts: add 'voltage-regulators' description to max77686 node odroid: config: enable dm pmic, dm regulator and max77686 driver Makefile | 1 + arch/arm/dts/exynos4412-odroid.dts | 250 +- arch/arm/dts/exynos4412-trats2.dts | 17 +- board/samsung/common/board.c | 5 +- board/samsung/common/misc.c| 21 +- board/samsung/odroid/odroid.c | 31 +- board/samsung/trats2/trats2.c | 208 ++-- common/board_r.c | 8 + doc/driver-model/dm-pmic-framework.txt | 450 ++ drivers/power/Makefile | 6 +- drivers/power/cmd_pmic.c | 845 + drivers/power/pmic-uclass.c| 255 ++ drivers/power/pmic/Makefile| 1 + drivers/power/pmic/max77686.c | 89 drivers/power/pmic_i2c.c | 136 ++ drivers/power/pmic_spi.c | 137 ++ drivers/power/regulator-uclass.c
[U-Boot] [PATCH 14/19] trats2: board: add support to dm pmic api
Changes required to support dm pmic and dm regulator api: - move call to board_init_i2c() into exynos_init() - earlier init the i2c - remove redundant ldo setup - default hardware configuration is proper - adjust pmic/regulator calls to new pmic api Signed-off-by: Przemyslaw Marczak --- board/samsung/trats2/trats2.c | 208 +++--- 1 file changed, 52 insertions(+), 156 deletions(-) diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c index a737749..b107ba5 100644 --- a/board/samsung/trats2/trats2.c +++ b/board/samsung/trats2/trats2.c @@ -23,6 +23,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -151,7 +152,9 @@ int exynos_early_init_f(void) return 0; } +#ifdef CONFIG_DM_PMIC static int pmic_init_max77686(void); +#endif int exynos_init(void) { @@ -171,71 +174,16 @@ int exynos_init(void) writel(0, &pwr->inform4); writel(0, &pwr->inform5); +#ifdef CONFIG_SYS_I2C_INIT_BOARD + board_init_i2c(); +#endif + return 0; } int exynos_power_init(void) { - int chrg; - struct power_battery *pb; - struct pmic *p_chrg, *p_muic, *p_fg, *p_bat; - -#ifdef CONFIG_SYS_I2C_INIT_BOARD - board_init_i2c(); -#endif - pmic_init(I2C_7); /* I2C adapter 7 - bus name s3c24x0_7 */ pmic_init_max77686(); - pmic_init_max77693(I2C_10); /* I2C adapter 10 - bus name soft1 */ - power_muic_init(I2C_10);/* I2C adapter 10 - bus name soft1 */ - power_fg_init(I2C_9); /* I2C adapter 9 - bus name soft0 */ - power_bat_init(0); - - p_chrg = pmic_get("MAX77693_PMIC"); - if (!p_chrg) { - puts("MAX77693_PMIC: Not found\n"); - return -ENODEV; - } - - p_muic = pmic_get("MAX77693_MUIC"); - if (!p_muic) { - puts("MAX77693_MUIC: Not found\n"); - return -ENODEV; - } - - p_fg = pmic_get("MAX77693_FG"); - if (!p_fg) { - puts("MAX17042_FG: Not found\n"); - return -ENODEV; - } - - if (p_chrg->chrg->chrg_bat_present(p_chrg) == 0) - puts("No battery detected\n"); - - p_bat = pmic_get("BAT_TRATS2"); - if (!p_bat) { - puts("BAT_TRATS2: Not found\n"); - return -ENODEV; - } - - p_fg->parent = p_bat; - p_chrg->parent = p_bat; - p_muic->parent = p_bat; - - p_bat->pbat->battery_init(p_bat, p_fg, p_chrg, p_muic); - - pb = p_bat->pbat; - chrg = p_muic->chrg->chrg_type(p_muic); - debug("CHARGER TYPE: %d\n", chrg); - - if (!p_chrg->chrg->chrg_bat_present(p_chrg)) { - puts("No battery detected\n"); - return 0; - } - - p_fg->fg->fg_battery_check(p_fg, p_bat); - - if (pb->bat->state == CHARGE && chrg == CHARGER_USB) - puts("CHARGE Battery !\n"); return 0; } @@ -244,62 +192,22 @@ int exynos_power_init(void) static int s5pc210_phy_control(int on) { int ret = 0; - unsigned int val; - struct pmic *p, *p_pmic, *p_muic; + struct udevice *pmic; - p_pmic = pmic_get("MAX77686_PMIC"); - if (!p_pmic) + pmic = pmic_get_by_name(UCLASS_PMIC_REGULATOR, "max77686"); + if (!pmic) return -ENODEV; - if (pmic_probe(p_pmic)) - return -1; - - p_muic = pmic_get("MAX77693_MUIC"); - if (!p_muic) - return -ENODEV; - - if (pmic_probe(p_muic)) - return -1; - if (on) { - ret = max77686_set_ldo_mode(p_pmic, 12, OPMODE_ON); - if (ret) - return -1; - - p = pmic_get("MAX77693_PMIC"); - if (!p) - return -ENODEV; - - if (pmic_probe(p)) - return -1; - - /* SAFEOUT */ - ret = pmic_reg_read(p, MAX77693_SAFEOUT, &val); - if (ret) - return -1; - - val |= MAX77693_ENSAFEOUT1; - ret = pmic_reg_write(p, MAX77693_SAFEOUT, val); + ret = pmic_set_ldo_mode(pmic, 12, OPMODE_ON); if (ret) - return -1; - - /* PATH: USB */ - ret = pmic_reg_write(p_muic, MAX77693_MUIC_CONTROL1, - MAX77693_MUIC_CTRL1_DN1DP2); - + return -EIO; } else { - ret = max77686_set_ldo_mode(p_pmic, 12, OPMODE_LPM); + ret = pmic_set_ldo_mode(pmic, 12, OPMODE_LPM); if (ret) - return -1; - - /* PATH: UART */ - ret = pmic_reg_write(p_muic, MAX77693_MUIC_CONTROL1, - MAX77693_MUIC_CTRL1_UT1UR2); + return -EIO; } - if (ret) - return -1; - ret
[U-Boot] [PATCH 07/19] dm: pmic: add max77686 pmic driver
This adds a simple implementation of driver model uclass pmic driver. This implementation includes two funcitons: - max77686_ofdata_to_platdada(...) - init I/O data from fdt - max77686_probe(...) - looks for max77686 regulator driver and bind it If there is no regulator driver, then pmic can still provide read/write operations, and can be accessed by 'pmic' commands. Signed-off-by: Przemyslaw Marczak --- drivers/power/pmic/Makefile | 1 + drivers/power/pmic/max77686.c | 89 +++ 2 files changed, 90 insertions(+) create mode 100644 drivers/power/pmic/max77686.c diff --git a/drivers/power/pmic/Makefile b/drivers/power/pmic/Makefile index e7b07eb..49beffb 100644 --- a/drivers/power/pmic/Makefile +++ b/drivers/power/pmic/Makefile @@ -10,6 +10,7 @@ obj-$(CONFIG_POWER_MAX8998) += pmic_max8998.o obj-$(CONFIG_POWER_MAX8997) += pmic_max8997.o obj-$(CONFIG_POWER_MUIC_MAX8997) += muic_max8997.o obj-$(CONFIG_POWER_MAX77686) += pmic_max77686.o +obj-$(CONFIG_DM_PMIC_MAX77686) += max77686.o obj-$(CONFIG_POWER_PFUZE100) += pmic_pfuze100.o obj-$(CONFIG_POWER_TPS65090_I2C) += pmic_tps65090.o obj-$(CONFIG_POWER_TPS65090_EC) += pmic_tps65090_ec.o diff --git a/drivers/power/pmic/max77686.c b/drivers/power/pmic/max77686.c new file mode 100644 index 000..74b10da --- /dev/null +++ b/drivers/power/pmic/max77686.c @@ -0,0 +1,89 @@ +/* + * Copyright (C) 2012 Samsung Electronics + * Rajeshwari Shinde + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +static int max77686_ofdata_to_platdata(struct udevice *dev) +{ + struct pmic_platdata *pl = dev->platdata; + const void *blob = gd->fdt_blob; + int node = dev->of_offset; + int parent; + + pl->interface = PMIC_I2C; + pl->regs_num = PMIC_NUM_OF_REGS; + + parent = fdt_parent_offset(blob, node); + + if (parent < 0) { + error("%s: Cannot find node parent", __func__); + return -EINVAL; + } + + pl->bus = i2c_get_bus_num_fdt(parent); + if (pl->bus < 0) { + debug("%s: Cannot find bus num\n", __func__); + return -EINVAL; + } + + pl->hw.i2c.addr = fdtdec_get_int(blob, node, "reg", MAX77686_I2C_ADDR); + pl->hw.i2c.tx_num = 1; + + return 0; +} + +static int max77686_probe(struct udevice *parent) +{ + struct udevice *reg_dev; + struct driver *reg_drv; + int ret; + + reg_drv = lists_driver_lookup_name("max77686 regulator"); + if (!reg_drv) { + error("%s regulator driver not found!\n", parent->name); + return 0; + } + + if (!parent->platdata) { + error("%s platdata not found!\n", parent->name); + return -EINVAL; + } + + ret = device_bind(parent, reg_drv, parent->name, parent->platdata, + parent->of_offset, ®_dev); + if (ret) + error("%s regulator bind failed", parent->name); + + /* Return error only if no parent platdata set */ + return 0; +} + +static const struct udevice_id max77686_ids[] = { + { .compatible = "maxim,max77686_pmic"}, + { } +}; + +U_BOOT_DRIVER(pmic_max77686) = { + .name = "max77686 pmic", + .id = UCLASS_PMIC, + .of_match = max77686_ids, + .probe = max77686_probe, + .ofdata_to_platdata = max77686_ofdata_to_platdata, + .platdata_auto_alloc_size = sizeof(struct pmic_platdata), +}; -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 04/19] dm: pmic: add implementation of driver model pmic uclass
This is an introduction to driver-model multi class PMIC support. It starts with UCLASS_PMIC - a common PMIC class type for I/O, which doesn't need to implement any specific operations and features beside the platform data, which is the 'struct pmic_platdata' defined in file: - 'include/power/pmic.h' New files: - pmic-uclass.c - provides a common code for UCLASS_PMIC drivers - pmic_i2c.c- provides dm interface for i2c pmic drivers - pmic_spi.c- provides dm interface for spi pmic drivers Those files are based on a current PMIC framework files and code. The new files are introduced to keep code readability and allow to make an easy drivers migration. The old pmic framework is still kept and full independent. Changes: - new uclass-id: UCLASS_PMIC, - new configs: CONFIG_DM_PMIC; CONFIG_DM_PMIC_SPI; CONFIG_DM_PMIC_I2C, New pmic api is documented in: doc/README.power-framework-dm Signed-off-by: Przemyslaw Marczak --- drivers/power/Makefile | 3 + drivers/power/pmic-uclass.c | 255 drivers/power/pmic_i2c.c| 136 +++ drivers/power/pmic_spi.c| 137 include/dm/uclass-id.h | 3 + include/power/pmic.h| 64 +++ 6 files changed, 598 insertions(+) create mode 100644 drivers/power/pmic-uclass.c create mode 100644 drivers/power/pmic_i2c.c create mode 100644 drivers/power/pmic_spi.c diff --git a/drivers/power/Makefile b/drivers/power/Makefile index dc64e4d..8def501 100644 --- a/drivers/power/Makefile +++ b/drivers/power/Makefile @@ -19,3 +19,6 @@ obj-$(CONFIG_DIALOG_POWER) += power_dialog.o obj-$(CONFIG_POWER_FSL) += power_fsl.o obj-$(CONFIG_POWER_I2C) += power_i2c.o obj-$(CONFIG_POWER_SPI) += power_spi.o +obj-$(CONFIG_DM_PMIC_SPI) += pmic_spi.o +obj-$(CONFIG_DM_PMIC_I2C) += pmic_i2c.o +obj-$(CONFIG_DM_PMIC) += pmic-uclass.o diff --git a/drivers/power/pmic-uclass.c b/drivers/power/pmic-uclass.c new file mode 100644 index 000..5e8494b --- /dev/null +++ b/drivers/power/pmic-uclass.c @@ -0,0 +1,255 @@ +/* + * Copyright (C) 2014 Samsung Electronics + * Przemyslaw Marczak + * + * SPDX-License-Identifier:GPL-2.0+ + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +int pmic_check_reg(struct pmic_platdata *p, unsigned reg) +{ + if (!p) + return -ENODEV; + + if (reg >= p->regs_num) { + error(" = %d is invalid. Should be less than %d", + reg, p->regs_num); + return -EINVAL; + } + + return 0; +} + +int pmic_reg_write(struct udevice *dev, unsigned reg, unsigned val) +{ + struct pmic_platdata *p; + + p = dev_get_platdata(dev); + if (!p) + return -EPERM; + + switch (p->interface) { + case PMIC_I2C: +#ifdef CONFIG_DM_PMIC_I2C + return pmic_i2c_reg_write(dev, reg, val); +#else + return -ENOSYS; +#endif + case PMIC_SPI: +#ifdef CONFIG_DM_PMIC_SPI + return pmic_spi_reg_write(dev, reg, val); +#else + return -ENOSYS; +#endif + default: + return -ENODEV; + } +} + +int pmic_reg_read(struct udevice *dev, unsigned reg, unsigned *val) +{ + struct pmic_platdata *p; + + p = dev_get_platdata(dev); + if (!p) + return -EPERM; + + switch (p->interface) { + case PMIC_I2C: +#ifdef CONFIG_DM_PMIC_I2C + return pmic_i2c_reg_read(dev, reg, val); +#else + return -ENOSYS; +#endif + case PMIC_SPI: +#ifdef CONFIG_DM_PMIC_SPI + return pmic_spi_reg_read(dev, reg, val); +#else + return -ENOSYS; +#endif + default: + return -ENODEV; + } +} + +int pmic_probe(struct udevice *dev, struct spi_slave *spi_slave) +{ + struct pmic_platdata *p; + + p = dev_get_platdata(dev); + if (!p) + return -EPERM; + + switch (p->interface) { + case PMIC_I2C: +#ifdef CONFIG_DM_PMIC_I2C + return pmic_i2c_probe(dev); +#else + return -ENOSYS; +#endif + case PMIC_SPI: + if (!spi_slave) + return -EINVAL; +#ifdef CONFIG_DM_PMIC_SPI + spi_slave = pmic_spi_probe(dev); + if (!spi_slave) + return -EIO; + + return 0; +#else + return -ENOSYS; +#endif + default: + return -ENODEV; + } +} + +struct udevice *pmic_get_by_interface(int uclass_id, int bus, int addr_cs) +{ + struct pmic_platdata *pl; + struct udevice *dev; + struct uclass *uc; + int ret; + + if (uclass_id < 0 || uclass_id >= UCLASS_COUNT) { + error("Bad uclass id.\n"); + return NULL; + } + + ret = uclass_get(uclass_id, &uc); + if (ret) { +
[U-Boot] [PATCH 17/19] odroid: board: add support to dm pmic api
Changes added to support new pmic api: - call board_init_i2c() in exynos_init(), do i2c init before pmic_init_dm() - change max77686 regulator calls to new pmic api calls Signed-off-by: Przemyslaw Marczak --- board/samsung/odroid/odroid.c | 31 +-- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/board/samsung/odroid/odroid.c b/board/samsung/odroid/odroid.c index fd5d2d2..eac578f 100644 --- a/board/samsung/odroid/odroid.c +++ b/board/samsung/odroid/odroid.c @@ -378,15 +378,19 @@ static void board_gpio_init(void) static int pmic_init_max77686(void) { - struct pmic *p = pmic_get("MAX77686_PMIC"); + struct udevice *p = pmic_get_by_name(UCLASS_PMIC_REGULATOR, "max77686"); - if (pmic_probe(p)) + if (pmic_probe(p, NULL)) return -ENODEV; /* Set LDO Voltage */ - max77686_set_ldo_voltage(p, 20, 180); /* LDO20 eMMC */ - max77686_set_ldo_voltage(p, 21, 280); /* LDO21 SD */ - max77686_set_ldo_voltage(p, 22, 280); /* LDO22 eMMC */ + pmic_set_ldo_val(p, 20, 180); /* LDO20 eMMC */ + pmic_set_ldo_val(p, 21, 280); /* LDO21 SD */ + pmic_set_ldo_val(p, 22, 280); /* LDO22 eMMC */ + + pmic_set_ldo_mode(p, 20, OPMODE_ON); + pmic_set_ldo_mode(p, 21, OPMODE_ON); + pmic_set_ldo_mode(p, 22, OPMODE_ON); return 0; } @@ -414,15 +418,14 @@ int exynos_init(void) gd->ram_size -= SZ_1M; gd->bd->bi_dram[CONFIG_NR_DRAM_BANKS - 1].size -= SZ_1M; +#ifdef CONFIG_SYS_I2C_INIT_BOARD + board_init_i2c(); +#endif return 0; } int exynos_power_init(void) { -#ifdef CONFIG_SYS_I2C_INIT_BOARD - board_init_i2c(); -#endif - pmic_init(I2C_0); pmic_init_max77686(); return 0; @@ -431,19 +434,19 @@ int exynos_power_init(void) #ifdef CONFIG_USB_GADGET static int s5pc210_phy_control(int on) { - struct pmic *p_pmic; + struct udevice *p_pmic; - p_pmic = pmic_get("MAX77686_PMIC"); + p_pmic = pmic_get_by_name(UCLASS_PMIC_REGULATOR, "max77686"); if (!p_pmic) return -ENODEV; - if (pmic_probe(p_pmic)) + if (pmic_probe(p_pmic, NULL)) return -1; if (on) - return max77686_set_ldo_mode(p_pmic, 12, OPMODE_ON); + return pmic_set_ldo_mode(p_pmic, 12, OPMODE_ON); else - return max77686_set_ldo_mode(p_pmic, 12, OPMODE_LPM); + return pmic_set_ldo_mode(p_pmic, 12, OPMODE_LPM); } struct s3c_plat_otg_data s5pc210_otg_data = { -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 18/19] odroid: dts: add 'voltage-regulators' description to max77686 node
Adding regulators subnode to fdt max77686 node allows properly init regulators descriptors from by the max77686 regulator driver. This enables the complete functionality of the regulator command. Signed-off-by: Przemyslaw Marczak --- arch/arm/dts/exynos4412-odroid.dts | 250 - 1 file changed, 249 insertions(+), 1 deletion(-) diff --git a/arch/arm/dts/exynos4412-odroid.dts b/arch/arm/dts/exynos4412-odroid.dts index 4c5e2b3..b6abd51 100644 --- a/arch/arm/dts/exynos4412-odroid.dts +++ b/arch/arm/dts/exynos4412-odroid.dts @@ -20,6 +20,7 @@ console = "/serial@1381"; mmc2 = "sdhci@1253"; mmc4 = "dwmmc@1255"; + pmic = &max77686; }; i2c@1386 { @@ -28,11 +29,258 @@ samsung,i2c-max-bus-freq = <10>; status = "okay"; - max77686_pmic@09 { + max77686: max77686@09 { compatible = "maxim,max77686_pmic"; interrupts = <7 0>; reg = <0x09 0 0>; #clock-cells = <1>; + + voltage-regulators { + ldo1_reg: ldo1 { + regulator-compatible = "LDO1"; + regulator-name = "VDD_ALIVE_1.0V"; + regulator-min-microvolt = <100>; + regulator-max-microvolt = <100>; + }; + + ldo2_reg: ldo2 { + regulator-compatible = "LDO2"; + regulator-name = "VDDQ_VM1M2_1.2V"; + regulator-min-microvolt = <120>; + regulator-max-microvolt = <120>; + }; + + ldo3_reg: ldo3 { + regulator-compatible = "LDO3"; + regulator-name = "VCC_1.8V_AP"; + regulator-min-microvolt = <180>; + regulator-max-microvolt = <180>; + }; + + ldo4_reg: ldo4 { + regulator-compatible = "LDO4"; + regulator-name = "VDDQ_MMC2_2.8V"; + regulator-min-microvolt = <280>; + regulator-max-microvolt = <280>; + }; + + ldo5_reg: ldo5 { + regulator-compatible = "LDO5"; + regulator-name = "VDDQ_MMC0/1/3_1.8V"; + regulator-min-microvolt = <180>; + regulator-max-microvolt = <180>; + }; + + ldo6_reg: ldo6 { + regulator-compatible = "LDO6"; + regulator-name = "VMPLL_1.0V"; + regulator-min-microvolt = <110>; + regulator-max-microvolt = <110>; + }; + + ldo7_reg: ldo7 { + regulator-compatible = "LDO7"; + regulator-name = "VPLL_1.1V"; + regulator-min-microvolt = <110>; + regulator-max-microvolt = <110>; + }; + + ldo8_reg: ldo8 { + regulator-compatible = "LDO8"; + regulator-name = "VDD_MIPI/HDMI_1.0V"; + regulator-min-microvolt = <100>; + regulator-max-microvolt = <100>; + }; + + ldo9_reg: ldo9 { + regulator-compatible = "LDO9"; + regulator-name = "nc"; + regulator-min-microvolt = <180>; + regulator-max-microvolt = <180>; + }; + + ldo10_reg: ldo10 { + regulator-compatible = "LDO10"; + regulator-name = "VDD_MIPI/HDMI_1.8V"; + regulator-min-microvolt = <180>; + regulator-max-micro
[U-Boot] [PATCH 11/19] doc: driver-model: pmic and regulator uclass documentation
Signed-off-by: Przemyslaw Marczak --- doc/driver-model/dm-pmic-framework.txt | 450 + 1 file changed, 450 insertions(+) create mode 100644 doc/driver-model/dm-pmic-framework.txt diff --git a/doc/driver-model/dm-pmic-framework.txt b/doc/driver-model/dm-pmic-framework.txt new file mode 100644 index 000..1b69eee --- /dev/null +++ b/doc/driver-model/dm-pmic-framework.txt @@ -0,0 +1,450 @@ +# +# (C) Copyright 2014 Samsung Electronics +# Przemyslaw Marczak +# +# SPDX-License-Identifier: GPL-2.0+ +# + +PMIC framework based on Driver Model + +TOC: +1. Introduction +2. How does it work +3. Driver API +4. Simple UCLASS_PMIC driver +5. Pmic command +6. Uclass UCLASS_PMIC_REGULATOR API +7. Simple UCLASS_PMIC_REGULATOR driver +8. Regulator command + +1. Introduction +=== +This is an introduction to driver-model multi class PMIC support. +It starts with UCLASS_PMIC - a common PMIC class type for I/O, which +doesn't need to implement any specific operations and features beside +the platform data, which is a 'struct pmic_platdata' defined in file: +- 'include/power/pmic.h' + +New files: +- pmic-uclass.c - provides a common code for UCLASS_PMIC drivers +- pmic_i2c.c- provides dm interface for i2c pmic drivers +- pmic_spi.c- provides dm interface for spi pmic drivers + +Those files are based on a current PMIC framework files and code. +And the new files are introduced to avoid code mess and allow to +make an easy drivers migration. The old pmic is still kept. + +Changes: +- add uclass-id: UCLASS_PMIC +- add new configs: + CONFIG_DM_PMIC - enables driver model pmic framework and requires one + or both of: + CONFIG_DM_PMIC_SPI - enables an interface to pmic SPI + CONFIG_DM_PMIC_I2C - enables an interface to pmic I2C + +The old pmic interface API worked very well so it is kept, but the framework +architecture is changed. + +2. How doees it work + +The framework init starts in file: drivers/power/pmic-uclass.c +The function pmic_init_dm() looks after the 'pmic' alias in the device-tree +and do the driver bind. +If board uses more than one PMIC device, then a few 'pmic' aliases should +be defined with numbers, e.g. pmic0, pmic1... + +Note: +The I2C doesn't use the driver model yet, so the drivers are bind thanks to the +'pmic' alias. + +3. PMIC drivers API +=== +The new API is as simple as previously: + +File: drivers/power/pmic-uclass.c: +- void power_init_dm(void) + The main init function, called after the i2c init and before power_init_board. + Bind the UCLASS_PMIC drivers. + +- struct udevice *pmic_get_by_name(int uclass_id, char *name) + This function provides similar function as old pmic_get(), but the returned + device pointer doesn't require any allocation. + The uclass_id argument if to chose proper device uclass, e.g. pmic or next + others, pmic related. + +- struct udevice *pmic_get_by_interface(int uclass_id, int bus, int addr_cs) + This is similar function as previous but is designed for boards with more + than one pmic device or the same device instances. In this case we can't + get the device by the name, so the best and accurate method is to get it by + known uclass, bus and address or cs(spi). This is new framework feature. + +- const char *pmic_if_str(int interface) + This function returns the interface name string for i2c or spi, and uses + pmic interface enum from: include/power/pmic.h + +- int pmic_check_reg(struct pmic_platdata *p, unsigned reg) + This function check if the given register number is valid for the given + pmic_platdata. + +- int pmic_reg_write(struct udevice *dev, unsigned reg, unsigned val) + The same functionality as in old framework but changed to driver-model. + +- int pmic_reg_read(struct udevice *dev, unsigned reg, unsigned *val) + The same functionality as in old framework but changed to driver-model. + +- int pmic_probe(struct udevice *dev, struct spi_slave *spi_slave) + The same functionality as in an old framework but changed to driver model, + and extended by support to both pmic interfaces. + +The below functions, are implemented with use of common calls, described above. + +File: drivers/power/pmic_i2c.c: +- int pmic_i2c_reg_write(struct udevice *dev, unsigned reg, unsigned val) +- int pmic_i2c_reg_read(struct udevice *dev, unsigned reg, unsigned *val) +- int pmic_i2c_probe(struct udevice *dev) + +File: drivers/power/pmic_spi.c: +- int pmic_spi_reg_write(struct udevice *dev, unsigned reg, unsigned val) +- int pmic_spi_reg_read(struct udevice *dev, unsigned reg, unsigned *val) +- struct spi_slave *pmic_spi_probe(struct udevice *dev) + +4. Simple UCLASS_PMIC driver + +At this stage the framework supports only drivers that have proper fdt alias. +The alias is "pmic" or "pmicN". + +The exaple of dts node(): + aliases { + ... + ... + pmic0 = &simple
[U-Boot] [PATCH 06/19] dm: common: board_r: add call and weak of power_init_dm()
This function call is required to init dm pmic framework and drivers before call to power_init_board(). Signed-off-by: Przemyslaw Marczak --- common/board_r.c | 8 1 file changed, 8 insertions(+) diff --git a/common/board_r.c b/common/board_r.c index cd92288..e574130 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -285,6 +285,11 @@ __weak int power_init_board(void) return 0; } +__weak int pmic_init_dm(void) +{ + return 0; +} + static int initr_announce(void) { debug("Now running in RAM - U-Boot at: %08lx\n", gd->relocaddr); @@ -775,6 +780,9 @@ init_fnc_t init_sequence_r[] = { #ifdef CONFIG_ARCH_EARLY_INIT_R arch_early_init_r, #endif +#ifdef CONFIG_DM_PMIC + pmic_init_dm, +#endif power_init_board, #ifndef CONFIG_SYS_NO_FLASH initr_flash, -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 19/19] odroid: config: enable dm pmic, dm regulator and max77686 driver
This change enables the configs required to init and setup max77686 regulator driver, using the new driver model pmic API. Enabled configs: - CONFIG_DM_PMIC - CONFIG_DM_PMIC_MAX77686 - CONFIG_DM_PMIC_I2C - CONFIG_DM_REGULATOR - CONFIG_DM_REGULATOR_MAX77686 Signed-off-by: Przemyslaw Marczak --- include/configs/odroid.h | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/configs/odroid.h b/include/configs/odroid.h index b928af8..ccc602d 100644 --- a/include/configs/odroid.h +++ b/include/configs/odroid.h @@ -185,9 +185,11 @@ #define CONFIG_SYS_I2C_INIT_BOARD /* POWER */ -#define CONFIG_POWER -#define CONFIG_POWER_I2C -#define CONFIG_POWER_MAX77686 +#define CONFIG_DM_PMIC +#define CONFIG_DM_PMIC_MAX77686 +#define CONFIG_DM_PMIC_I2C +#define CONFIG_DM_REGULATOR +#define CONFIG_DM_REGULATOR_MAX77686 /* GPT */ #define CONFIG_RANDOM_UUID -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 10/19] dm: board:samsung: power_init_board: add requirement of CONFIG_DM_PMIC
In the power_init_board function call, regulator driver init is called, so before compile, make sure that any power framework is defined. Signed-off-by: Przemyslaw Marczak --- board/samsung/common/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c index e1fc123..e4cddc2 100644 --- a/board/samsung/common/board.c +++ b/board/samsung/common/board.c @@ -166,7 +166,7 @@ int board_early_init_f(void) } #endif -#if defined(CONFIG_POWER) +#if defined(CONFIG_POWER) || defined(CONFIG_DM_PMIC) int power_init_board(void) { set_ps_hold_ctrl(); -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 15/19] trats2: dts: max77686: add pmic alias and names cleanup
Changes to support new pmic api: - add pmic alias - currently required for new pmic - remove i2c addr from max77686 node name - fix names of some regulators Signed-off-by: Przemyslaw Marczak --- arch/arm/dts/exynos4412-trats2.dts | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/arm/dts/exynos4412-trats2.dts b/arch/arm/dts/exynos4412-trats2.dts index 3b1e458..fac57d7 100644 --- a/arch/arm/dts/exynos4412-trats2.dts +++ b/arch/arm/dts/exynos4412-trats2.dts @@ -32,6 +32,7 @@ mmc0 = "sdhci@1251"; mmc2 = "sdhci@1253"; mmc4 = "dwmmc@1255"; + pmic0 = &max77686; }; i2c@138d { @@ -40,7 +41,7 @@ samsung,i2c-max-bus-freq = <10>; status = "okay"; - max77686_pmic@09 { + max77686: max77686 { compatible = "maxim,max77686_pmic"; interrupts = <7 0>; reg = <0x09 0 0>; @@ -112,7 +113,7 @@ ldo8_reg: ldo8 { regulator-compatible = "LDO8"; - regulator-name = "VMIPI_1.0V"; + regulator-name = "VMIPI_1.0V_AP"; regulator-min-microvolt = <100>; regulator-max-microvolt = <100>; regulator-mem-off; @@ -251,7 +252,7 @@ ldo25_reg: ldo25 { regulator-compatible = "LDO25"; - regulator-name = "LCD_VCC_3.3V"; + regulator-name = "LCD_VCC_2.8V"; regulator-min-microvolt = <280>; regulator-max-microvolt = <280>; regulator-mem-idle; @@ -267,7 +268,7 @@ buck1_reg: buck1 { regulator-compatible = "BUCK1"; - regulator-name = "vdd_mif"; + regulator-name = "VMIF_1.0V_AP"; regulator-min-microvolt = <85>; regulator-max-microvolt = <110>; regulator-always-on; @@ -277,7 +278,7 @@ buck2_reg: buck2 { regulator-compatible = "BUCK2"; - regulator-name = "vdd_arm"; + regulator-name = "VARM_1.0V_AP"; regulator-min-microvolt = <85>; regulator-max-microvolt = <150>; regulator-always-on; @@ -287,7 +288,7 @@ buck3_reg: buck3 { regulator-compatible = "BUCK3"; - regulator-name = "vdd_int"; + regulator-name = "VINT_1.1V_AP"; regulator-min-microvolt = <85>; regulator-max-microvolt = <115>; regulator-always-on; @@ -297,7 +298,7 @@ buck4_reg: buck4 { regulator-compatible = "BUCK4"; - regulator-name = "vdd_g3d"; + regulator-name = "VG3D_1.0V_AP"; regulator-min-microvolt = <85>; regulator-max-microvolt = <115>; regulator-boot-on; @@ -330,7 +331,7 @@ buck8_reg: buck8 { regulator-compatible = "BUCK8"; - regulator-name = "VMEM_VDDF_3.0V"; + regulator-name = "VMEM_VDDF_2.85V"; regulator-min-microvolt = <285>; regulator-max-microvolt = <285>; regulator-always-on; -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 12/19] samsung: board: lcd menu: check if any power framework is enabled
The lcd menu requires pmic framework to get the power key state. Now two pmic frameworks are available - the old one and the new one based on a driver-model. Signed-off-by: Przemyslaw Marczak --- board/samsung/common/board.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c index e4cddc2..450740a 100644 --- a/board/samsung/common/board.c +++ b/board/samsung/common/board.c @@ -348,7 +348,8 @@ int misc_init_r(void) #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG set_board_info(); #endif -#ifdef CONFIG_LCD_MENU +#if defined(CONFIG_LCD_MENU) && (defined(CONFIG_POWER) || \ +defined(CONFIG_DM_PMIC)) keys_init(); check_boot_mode(); #endif -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 13/19] samsung: misc: power_key_pressed: add support to dm pmic framework
In case of two pmic frameworks availability - enable support of both, since the new pmic framework is not fully finished and some boards still supports only the old framework. Signed-off-by: Przemyslaw Marczak --- board/samsung/common/misc.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c index 4538ac7..94308a9 100644 --- a/board/samsung/common/misc.c +++ b/board/samsung/common/misc.c @@ -93,12 +93,13 @@ void set_board_info(void) } #endif /* CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG */ -#ifdef CONFIG_LCD_MENU +#if defined(CONFIG_LCD_MENU) static int power_key_pressed(u32 reg) { + unsigned status; + unsigned mask; +#if defined(CONFIG_POWER) struct pmic *pmic; - u32 status; - u32 mask; pmic = pmic_get(KEY_PWR_PMIC_NAME); if (!pmic) { @@ -108,7 +109,21 @@ static int power_key_pressed(u32 reg) if (pmic_probe(pmic)) return 0; +#elif defined(CONFIG_DM_PMIC) + struct udevice *pmic; + pmic = pmic_get_by_name(UCLASS_PMIC, KEY_PWR_PMIC_NAME); + + if (!pmic) { + printf("%s: Not found\n", KEY_PWR_PMIC_NAME); + return 0; + } + + if (pmic_probe(pmic, NULL)) + return 0; +#else +#error one of: CONFIG_DM_PMIC or CONFIG_POWER must be defined! +#endif if (reg == KEY_PWR_STATUS_REG) mask = KEY_PWR_STATUS_MASK; else -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PULL] Please pull u-boot-imx
Hi Stefano, On Wed, 08 Oct 2014 10:17:49 +0200, Stefano Babic wrote: > Hi Albert, > > please pull from u-boot-imx, thanks ! > > cm_fx6 is still broken in u-boot-imx, but after merging with Tom's tree > it is built correctly. Ok -- it has been building correctly in u-boot-arm/master for some time already. > The following changes since commit 2a8c9c86b92a9ccee3c27286de317e19bb0530b3: > > Merge branch 'u-boot-ti/master' into 'u-boot-arm/master' (2014-09-21 > 16:56:44 +0200) > > are available in the git repository at: > > > git://www.denx.de/git/u-boot-imx.git master > > for you to fetch changes up to 5e3a388cddce1685ccd9bc1b58ddb89a191ed88f: > > nitrogen6x: config: enable EXT4 filesystem (2014-10-06 17:57:23 +0200) > > > Andrew Ruder (2): > arm: mx31: use common timer functions > arm: mx35: use common timer functions > > Christian Gmeiner (1): > imx6: add Bachmann OT1200 board > > Diego Rondini (1): > nitrogen6x: config: allow boot to USB stick > > Eric Nelson (23): > nitrogen6x: Update DDR timings for 2G memory arrangement > nitrogen6x: implement board_cfb_skip() to disable text output > nitrogen6x: configure SD2 pads for SDIO on USDHC2 > nitrogen6x: power-down miscellanous peripherals > nitrogen6x: staticize board file > nitrogen6x: prevent warnings about board_ehci* callbacks > nitrogen6x: display: add qvga panel > nitrogen6x: display: add support for LG-9.7 LVDS display > nitrogen6x: display: add LDB-WXGA-S for SPWG 1280x800 displays > nitrogen6x: display: add support for fusion 7 display > nitrogen6x: display: add svga display (800x600) > nitrogen6x: display: add Ampire 1024x600 panel > nitrogen6x: display: add wvga-lvds panel > nitrogen6x: display use I2C detect for HDMI > nitrogen6x: config: add USB Mass Storage (ums) support > nitrogen6x: config: add initrd_high > nitrogen6x: config: expose SATA, then MMC over USB > nitrogen6x: config: enable USB keyboard support > nitrogen6x: config: add CONFIG_CMD_MEMTEST > nitrogen6x: config: enable "i2c edid" > nitrogen6x: config: disable logo > nitrogen6x: config: add gpio command > nitrogen6x: config: enable Android fastboot > > Fabio Estevam (9): > mx6sxsabresd: Staticize i2c_pad_info1 > mx6qsabreauto: Staticize when possible > cm_fx6: Remove CONFIG_NETMASK > mx51evk: Fix CONFIG_SYS_FSL_ESDHC_ADDR > mx51evk: Add generic board support > mx25pdk: Fix CONFIG_SYS_FSL_ESDHC_ADDR > mx25pdk: Add generic board support > wandboard: Select CONFIG_CMD_FUSE > mx6sxsabresd: Fix PCI reset and power GPIO assignments > > Guillaume GARDET (1): > imx: nitrogen6x: Make use of both uSD and SD slots to load script > or kernel on Sabrelite board > > Kevin Mihelich (2): > nitrogen6x: config: use FS_GENERIC load command > nitrogen6x: config: enable EXT4 filesystem > > Marek Vasut (11): > usb: ehci: mxs: Add board-specific callbacks > arm: mxs: Wait when disabling VDDMEM current limiter > arm: mxs: Wait for DRAM to start > arm: mxs: olinuxino: Enable USB only when needed > arm: mxs: olinuxino: Fine-tune DRAM configuration > arm: m28evk: Test if bootscript exists before loading it > arm: m53evk: Test if bootscript exists before loading it > arm: m28evk: Enable FS_GENERIC > arm: m53evk: Enable FS_GENERIC > arm: m28evk: Zap superfluous tab in env > arm: m53evk: Zap superfluous tab in env > > Nitin Garg (3): > imx: ddr: Move mx6q_4x_mt41j128.cfg to mx6sabresd board > imx: Support i.MX6 High Assurance Boot authentication > imx6sx: Fix i.MX6SX HAB api function table offset > > Peng Fan (3): > imx:mx6sxsabresd: change CONFIG_SYS_FSL_ESDHC_ADDR > imx:mx6qarm2: change CONFIG_SYS_FSL_ESDHC_ADDR > imx:mx6slevk: change CONFIG_SYS_FSL_ESDHC_ADDR > > Robert Winkler (1): > nitrogen6x: display: add support lvds jeida screen > > Stefan Agner (2): > mtd: nand: add Freescale vf610_nfc driver > arm: vf610: add NAND support for vf610twr > > Stefan Roese (1): > ARM: mx6: gw_ventana: Remove superfluous memset of GD in board_init_f > > Stefano Babic (3): > Merge branch 'master' of git://git.denx.de/u-boot-arm > imx: Fix warning by building vf610twr_nand > Merge branch 'master' of git://git.denx.de/u-boot-arm > > Troy Kisky (4): > nitrogen6x: simplify board_mmc_getcd > nitrogen6x: configure SGTL5000, CSI camera clock outputs > nitrogen6x: phy: add 100 us delay after phy reset > nitrogen6x: config: allow more bootargs parameters > > Ye.Li (6): > imx: mx6qarm2: Add the kernel FDT Loading support > imx: mx6qarm2: Change the mmcroot and mmcpart env value > imx: mx6: Checking PLL2 PFD0 and PFD2 for periph
[U-Boot] [PATCH 16/19] trats2: config: enable dm pmic, dm regulator api, dm max77686
This change enables the configs required to init and setup max77686 regulator driver, using the new driver model pmic API. Enabled configs: - CONFIG_DM_PMIC - CONFIG_DM_PMIC_MAX77686 - CONFIG_DM_PMIC_I2C - CONFIG_DM_REGULATOR - CONFIG_DM_REGULATOR_MAX77686 Signed-off-by: Przemyslaw Marczak --- include/configs/trats2.h | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/include/configs/trats2.h b/include/configs/trats2.h index 42481ab..6d04498 100644 --- a/include/configs/trats2.h +++ b/include/configs/trats2.h @@ -185,13 +185,11 @@ int get_soft_i2c_sda_pin(void); #define CONFIG_SOFT_I2C_GPIO_SDA get_soft_i2c_sda_pin() /* POWER */ -#define CONFIG_POWER -#define CONFIG_POWER_I2C -#define CONFIG_POWER_MAX77686 -#define CONFIG_POWER_PMIC_MAX77693 -#define CONFIG_POWER_MUIC_MAX77693 -#define CONFIG_POWER_FG_MAX77693 -#define CONFIG_POWER_BATTERY_TRATS2 +#define CONFIG_DM_PMIC +#define CONFIG_DM_PMIC_MAX77686 +#define CONFIG_DM_PMIC_I2C +#define CONFIG_DM_REGULATOR +#define CONFIG_DM_REGULATOR_MAX77686 /* Security subsystem - enable hw_rand() */ #define CONFIG_EXYNOS_ACE_SHA @@ -210,7 +208,7 @@ int get_soft_i2c_sda_pin(void); #ifndef __ASSEMBLY__ #include -#define KEY_PWR_PMIC_NAME "MAX77686_PMIC" +#define KEY_PWR_PMIC_NAME "max77686" #define KEY_PWR_STATUS_REG MAX77686_REG_PMIC_STATUS1 #define KEY_PWR_STATUS_MASK(1 << 0) #define KEY_PWR_INTERRUPT_REG MAX77686_REG_PMIC_INT1 -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v1 1/1] fs: fat/ext4/sandbox: Deal with files > 2GB in ls and size commands
Hi Suriyan, On 8 October 2014 14:23, Suriyan Ramasami wrote: > The commands fatls/ext4ls give -ve values when dealing with files > 2GB. > The commands fatsize/ext4size do not update the variable filesize for > these files. > > To deal with this, the functions *_size have been modified to take a second > parameter of type "* off_t" which is then populated. The return value of the > *_size function is then only used to determine error conditions. That seems like a sensible idea to me. > > Signed-off-by: Suriyan Ramasami > --- > arch/sandbox/cpu/os.c| 14 +-- > arch/sandbox/cpu/state.c | 6 ++--- > common/board_f.c | 6 ++--- > fs/ext4/ext4_common.c| 13 +-- > fs/ext4/ext4fs.c | 21 ++--- > fs/fat/fat.c | 61 > > fs/fs.c | 15 ++-- > fs/sandbox/sandboxfs.c | 23 -- > include/ext4fs.h | 4 ++-- > include/fat.h| 2 +- > include/fs.h | 2 +- > include/os.h | 2 +- > include/sandboxfs.h | 2 +- > 13 files changed, 103 insertions(+), 68 deletions(-) Thanks for doing this. Do you think you could also add a test for this (perhaps in test/fs). It could create a temporary ext2 filesystem, put a large file in it and then check a few operations. > > diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c > index 1c4aa3f..9b052ee 100644 > --- a/arch/sandbox/cpu/os.c > +++ b/arch/sandbox/cpu/os.c > @@ -385,15 +385,15 @@ const char *os_dirent_get_typename(enum os_dirent_t > type) > return os_dirent_typename[OS_FILET_UNKNOWN]; > } > > -ssize_t os_get_filesize(const char *fname) > +int os_get_filesize(const char *fname, off_t *size) > { > struct stat buf; > int ret; > > ret = stat(fname, &buf); > - if (ret) > - return ret; > - return buf.st_size; > + if (ret == 0) > + *size = buf.st_size; > + return ret; > } > > void os_putc(int ch) > @@ -427,10 +427,10 @@ int os_read_ram_buf(const char *fname) > { > struct sandbox_state *state = state_get_current(); > int fd, ret; > - int size; > + off_t size; > > - size = os_get_filesize(fname); > - if (size < 0) > + ret = os_get_filesize(fname, &size); > + if (ret < 0) > return -ENOENT; Should you return ret instead here (and in other cases below)? > if (size != state->ram_size) > return -ENOSPC; > diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c > index 59adad6..e0d119a 100644 > --- a/arch/sandbox/cpu/state.c > +++ b/arch/sandbox/cpu/state.c > @@ -49,12 +49,12 @@ static int state_ensure_space(int extra_size) > > static int state_read_file(struct sandbox_state *state, const char *fname) > { > - int size; > + off_t size; > int ret; > int fd; > > - size = os_get_filesize(fname); > - if (size < 0) { > + ret = os_get_filesize(fname, &size); > + if (ret < 0) { > printf("Cannot find sandbox state file '%s'\n", fname); > return -ENOENT; > } > diff --git a/common/board_f.c b/common/board_f.c > index e6aa298..b8ec7ac 100644 > --- a/common/board_f.c > +++ b/common/board_f.c > @@ -291,7 +291,7 @@ static int read_fdt_from_file(void) > struct sandbox_state *state = state_get_current(); > const char *fname = state->fdt_fname; > void *blob; > - ssize_t size; > + off_t size; > int err; > int fd; > > @@ -304,8 +304,8 @@ static int read_fdt_from_file(void) > return -EINVAL; > } > > - size = os_get_filesize(fname); > - if (size < 0) { > + err = os_get_filesize(fname, &size); > + if (err < 0) { > printf("Failed to file FDT file '%s'\n", fname); > return -ENOENT; > } > diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c > index 33d69c9..fd9b611 100644 > --- a/fs/ext4/ext4_common.c > +++ b/fs/ext4/ext4_common.c > @@ -2003,9 +2003,9 @@ int ext4fs_iterate_dir(struct ext2fs_node *dir, char > *name, > printf("< ? > "); > break; > } > - printf("%10d %s\n", > - __le32_to_cpu(fdiro->inode.size), > - filename); > + printf("%10u %s\n", > + __le32_to_cpu(fdiro->inode.size), > + filename); > } > free(fdiro); > } > @@ -2169,11 +2169,10 @@ int ext4fs_find_file(const char *path, struct > ext2fs_node *rootnode, > return 1; > } > > -int ext4fs_open(const char *filename) > +int ext4fs_
[U-Boot] [PATCH v1 1/1] fs: fat/ext4/sandbox: Deal with files > 2GB in ls and size commands
The commands fatls/ext4ls give -ve values when dealing with files > 2GB. The commands fatsize/ext4size do not update the variable filesize for these files. To deal with this, the functions *_size have been modified to take a second parameter of type "* off_t" which is then populated. The return value of the *_size function is then only used to determine error conditions. Signed-off-by: Suriyan Ramasami --- arch/sandbox/cpu/os.c| 14 +-- arch/sandbox/cpu/state.c | 6 ++--- common/board_f.c | 6 ++--- fs/ext4/ext4_common.c| 13 +-- fs/ext4/ext4fs.c | 21 ++--- fs/fat/fat.c | 61 fs/fs.c | 15 ++-- fs/sandbox/sandboxfs.c | 23 -- include/ext4fs.h | 4 ++-- include/fat.h| 2 +- include/fs.h | 2 +- include/os.h | 2 +- include/sandboxfs.h | 2 +- 13 files changed, 103 insertions(+), 68 deletions(-) diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c index 1c4aa3f..9b052ee 100644 --- a/arch/sandbox/cpu/os.c +++ b/arch/sandbox/cpu/os.c @@ -385,15 +385,15 @@ const char *os_dirent_get_typename(enum os_dirent_t type) return os_dirent_typename[OS_FILET_UNKNOWN]; } -ssize_t os_get_filesize(const char *fname) +int os_get_filesize(const char *fname, off_t *size) { struct stat buf; int ret; ret = stat(fname, &buf); - if (ret) - return ret; - return buf.st_size; + if (ret == 0) + *size = buf.st_size; + return ret; } void os_putc(int ch) @@ -427,10 +427,10 @@ int os_read_ram_buf(const char *fname) { struct sandbox_state *state = state_get_current(); int fd, ret; - int size; + off_t size; - size = os_get_filesize(fname); - if (size < 0) + ret = os_get_filesize(fname, &size); + if (ret < 0) return -ENOENT; if (size != state->ram_size) return -ENOSPC; diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c index 59adad6..e0d119a 100644 --- a/arch/sandbox/cpu/state.c +++ b/arch/sandbox/cpu/state.c @@ -49,12 +49,12 @@ static int state_ensure_space(int extra_size) static int state_read_file(struct sandbox_state *state, const char *fname) { - int size; + off_t size; int ret; int fd; - size = os_get_filesize(fname); - if (size < 0) { + ret = os_get_filesize(fname, &size); + if (ret < 0) { printf("Cannot find sandbox state file '%s'\n", fname); return -ENOENT; } diff --git a/common/board_f.c b/common/board_f.c index e6aa298..b8ec7ac 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -291,7 +291,7 @@ static int read_fdt_from_file(void) struct sandbox_state *state = state_get_current(); const char *fname = state->fdt_fname; void *blob; - ssize_t size; + off_t size; int err; int fd; @@ -304,8 +304,8 @@ static int read_fdt_from_file(void) return -EINVAL; } - size = os_get_filesize(fname); - if (size < 0) { + err = os_get_filesize(fname, &size); + if (err < 0) { printf("Failed to file FDT file '%s'\n", fname); return -ENOENT; } diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c index 33d69c9..fd9b611 100644 --- a/fs/ext4/ext4_common.c +++ b/fs/ext4/ext4_common.c @@ -2003,9 +2003,9 @@ int ext4fs_iterate_dir(struct ext2fs_node *dir, char *name, printf("< ? > "); break; } - printf("%10d %s\n", - __le32_to_cpu(fdiro->inode.size), - filename); + printf("%10u %s\n", + __le32_to_cpu(fdiro->inode.size), + filename); } free(fdiro); } @@ -2169,11 +2169,10 @@ int ext4fs_find_file(const char *path, struct ext2fs_node *rootnode, return 1; } -int ext4fs_open(const char *filename) +int ext4fs_open(const char *filename, off_t *len) { struct ext2fs_node *fdiro = NULL; int status; - int len; if (ext4fs_root == NULL) return -1; @@ -2190,10 +2189,10 @@ int ext4fs_open(const char *filename) if (status == 0) goto fail; } - len = __le32_to_cpu(fdiro->inode.size); + *len = __le32_to_cpu(fdiro->inode.size); ext4fs_file = fdiro; - return len; + return 0; fail: ext4fs_free_node(fdiro, &ext4fs_root->diropen); diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c index cbdc2
[U-Boot] EXT4 slow boot problem
We have discovered a significant performance problem in U-Boot accessing an EXT4 file system.If a large image file happens to be created with more than 4 extents, file read time increases from a few seconds to several minutes. The root cause is the indexed extent block is being re-read tens of thousands of times from the underlying device. In our case, the image file is ~44MB and the underlying device is a MMC SD card.Software updates are performed in Linux, and depending on a particular instance of EXT4 block allocations, the image file is created with 3, 4 or 5 extents.With 3 or 4 extents (tree depth 0), file reads are fast because the extent records are located in the cached i-node and the entire file is read with 3 or 4 large MMC block reads. With 5 extents (tree depth 1), extent records are in a separate block referenced by an extent index node. The current U-Boot implementation makes no attempt to cache this block and is forced to re-read it for every block of file data (EXT4 block size 1KB). This results in excess of 43000 MMC read operations and boot times so long that the system appears to be hung. Blair Pendleton Fluke Networks R&D Colorado Springs, CO, USA ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 08/19] dm: regulator: add max77686 regulator driver
This commit adds support to max77686 regulator driver based on a uclass regulator driver-model api, which provides implementation of all uclass regulator api function calls. New file: drivers/power/regulator/max77686.c New config: CONFIG_DM_REGULATOR_MAX77686 Signed-off-by: Przemyslaw Marczak --- Makefile | 1 + drivers/power/Makefile | 1 - drivers/power/regulator/Makefile | 8 + drivers/power/regulator/max77686.c | 749 + include/power/max77686_pmic.h | 28 +- 5 files changed, 781 insertions(+), 6 deletions(-) create mode 100644 drivers/power/regulator/Makefile create mode 100644 drivers/power/regulator/max77686.c diff --git a/Makefile b/Makefile index 85b90b7..696b0c0 100644 --- a/Makefile +++ b/Makefile @@ -629,6 +629,7 @@ libs-y += drivers/power/ \ drivers/power/fuel_gauge/ \ drivers/power/mfd/ \ drivers/power/pmic/ \ + drivers/power/regulator/ \ drivers/power/battery/ libs-y += drivers/spi/ libs-$(CONFIG_FMAN_ENET) += drivers/net/fm/ diff --git a/drivers/power/Makefile b/drivers/power/Makefile index 9a0b8c4..6a6333f 100644 --- a/drivers/power/Makefile +++ b/drivers/power/Makefile @@ -13,7 +13,6 @@ obj-$(CONFIG_TPS6586X_POWER) += tps6586x.o obj-$(CONFIG_TWL4030_POWER)+= twl4030.o obj-$(CONFIG_TWL6030_POWER)+= twl6030.o obj-$(CONFIG_PALMAS_POWER) += palmas.o - obj-$(CONFIG_POWER) += power_core.o obj-$(CONFIG_DIALOG_POWER) += power_dialog.o obj-$(CONFIG_POWER_FSL) += power_fsl.o diff --git a/drivers/power/regulator/Makefile b/drivers/power/regulator/Makefile new file mode 100644 index 000..9d282e3 --- /dev/null +++ b/drivers/power/regulator/Makefile @@ -0,0 +1,8 @@ +# +# Copyright (C) 2014 Samsung Electronics +# Przemyslaw Marczak +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-$(CONFIG_DM_REGULATOR_MAX77686) += max77686.o diff --git a/drivers/power/regulator/max77686.c b/drivers/power/regulator/max77686.c new file mode 100644 index 000..d68785c --- /dev/null +++ b/drivers/power/regulator/max77686.c @@ -0,0 +1,749 @@ +/* + * Copyright (C) 2012 Samsung Electronics + * Rajeshwari Shinde + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +struct max77686_regulator_info { + int ldo_cnt; + int buck_cnt; + struct regulator_desc ldo_desc[MAX77686_LDO_NUM + 1]; + struct regulator_desc buck_desc[MAX77686_BUCK_NUM + 1]; +}; + +#define MODE(_mode, _val, _name) { \ + .mode = _mode, \ + .reg_val = _val, \ + .name = _name, \ +} + +/* LDO: 1,3,4,5,9,17,18,19,20,21,22,23,24,26,26,27 */ +static struct regulator_mode_desc max77686_ldo_mode_standby1[] = { + MODE(OPMODE_OFF, MAX77686_LDO_MODE_OFF, "OFF"), + MODE(OPMODE_LPM, MAX77686_LDO_MODE_LPM, "LPM"), + MODE(OPMODE_STANDBY_LPM, MAX77686_LDO_MODE_STANDBY_LPM, "ON/LPM"), + MODE(OPMODE_ON, MAX77686_LDO_MODE_ON, "ON"), +}; + +/* LDO: 2,6,7,8,10,11,12,14,15,16 */ +static struct regulator_mode_desc max77686_ldo_mode_standby2[] = { + MODE(OPMODE_OFF, MAX77686_LDO_MODE_OFF, "OFF"), + MODE(OPMODE_STANDBY, MAX77686_LDO_MODE_STANDBY, "ON/OFF"), + MODE(OPMODE_STANDBY_LPM, MAX77686_LDO_MODE_STANDBY_LPM, "ON/LPM"), + MODE(OPMODE_ON, MAX77686_LDO_MODE_ON, "ON"), +}; + +/* Buck: 1 */ +static struct regulator_mode_desc max77686_buck_mode_standby[] = { + MODE(OPMODE_OFF, MAX77686_BUCK_MODE_OFF, "OFF"), + MODE(OPMODE_STANDBY, MAX77686_BUCK_MODE_STANDBY, "ON/OFF"), + MODE(OPMODE_ON, MAX77686_BUCK_MODE_ON, "ON"), +}; + +/* Buck: 2,3,4 */ +static struct regulator_mode_desc max77686_buck_mode_lpm[] = { + MODE(OPMODE_OFF, MAX77686_BUCK_MODE_OFF, "OFF"), + MODE(OPMODE_STANDBY, MAX77686_BUCK_MODE_STANDBY, "ON/OFF"), + MODE(OPMODE_LPM, MAX77686_BUCK_MODE_LPM, "LPM"), + MODE(OPMODE_ON, MAX77686_BUCK_MODE_ON, "ON"), +}; + +/* Buck: 5,6,7,8,9 */ +static struct regulator_mode_desc max77686_buck_mode_onoff[] = { + MODE(OPMODE_OFF, MAX77686_BUCK_MODE_OFF, "OFF"), + MODE(OPMODE_ON, MAX77686_BUCK_MODE_ON, "ON"), +}; + +static const char max77686_buck_addr[] = { + 0xff, 0x10, 0x12, 0x1c, 0x26, 0x30, 0x32, 0x34, 0x36, 0x38 +}; + +static int max77686_buck_volt2hex(int buck, int uV) +{ + unsigned int hex = 0; + unsigned int hex_max = 0; + + switch (buck) { + case 2: + case 3: + case 4: + /* hex = (uV - 60) / 12500; */ + hex = (uV - MAX77686_BUCK_UV_LMIN) / MAX77686_BUCK_UV_LSTEP; + hex_max = MAX77686_BUCK234_VOLT_MAX_HEX; + /** +* This uses voltage scaller - temporary not implemented +* so return just 0 +*/ + return 0; + default: + /* hex = (uV - 75) / 5; */ + hex = (uV - MAX77686_BUCK_UV_
Re: [U-Boot] [PATCH v1 1/1] fs: fat/ext4/sandbox: Deal with files > 2GB in ls and size commands
On Wed 2014-10-08 13:23:48, Suriyan Ramasami wrote: > The commands fatls/ext4ls give -ve values when dealing with files > 2GB. > The commands fatsize/ext4size do not update the variable filesize for > these files. > > To deal with this, the functions *_size have been modified to take a second > parameter of type "* off_t" which is then populated. The return value of the > *_size function is then only used to determine error conditions. Would not it be better to simply change return type of affected functions to off_t? (If off_t is unsigned, invent signed off_t. It is still nicer than extra parameter.) > -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] ARM: mxs: tools: Add support for verbose and silent boot progress flags
mkimage -T mxs now support new flags in config file: NODISPLAYPROGRESS - makes boot silent VERBOSEPROGRESS - makes boot progress display more verbose Signed-off-by: Alexey Ignatov --- tools/mxsimage.c | 41 ++--- tools/mxsimage.h | 6 +- 2 files changed, 39 insertions(+), 8 deletions(-) diff --git a/tools/mxsimage.c b/tools/mxsimage.c index 045b35a..55c6691 100644 --- a/tools/mxsimage.c +++ b/tools/mxsimage.c @@ -124,7 +124,8 @@ struct sb_image_ctx { unsigned intin_section:1; unsigned intin_dcd:1; /* Image configuration */ - unsigned intverbose_boot:1; + unsigned intdisplay_progress:1; + unsigned intverbose_progress:1; unsigned intsilent_dump:1; char*input_filename; char*output_filename; @@ -1328,8 +1329,9 @@ static int sb_prefill_image_header(struct sb_image_ctx *ictx) sizeof(struct sb_sections_header) / SB_BLOCK_SIZE; hdr->timestamp_us = sb_get_timestamp() * 100; - /* FIXME -- add proper config option */ - hdr->flags = ictx->verbose_boot ? SB_IMAGE_FLAG_VERBOSE : 0, + hdr->flags = + ictx->display_progress ? SB_IMAGE_FLAG_DISPLAY_PROGRESS : 0 | + ictx->verbose_progress ? SB_IMAGE_FLAG_VERBOSE_PROGRESS : 0, /* FIXME -- We support only default key */ hdr->key_count = 1; @@ -1447,6 +1449,30 @@ static int sb_parse_line(struct sb_image_ctx *ictx, struct sb_cmd_list *cmd) } cmd->cmd = rptr; + + /* clear DISPLAY_PROGRESS flag */ + if (!strcmp(tok, "NODISPLAYPROGRESS")) { + if (ictx->verbose_progress) { + fprintf(stderr, + "#%i ERR: VERBOSEPROGRESS incompatible with NODISPLAYPROGRESS\n", + cmd->lineno); + return -EINVAL; + } + ictx->display_progress = 0; + return 0; + } + + /* set VERBOSE_PROGRESS flag */ + if (!strcmp(tok, "VERBOSEPROGRESS")) { + if (!ictx->display_progress) { + fprintf(stderr, + "#%i ERR: VERBOSEPROGRESS incompatible with NODISPLAYPROGRESS\n", + cmd->lineno); + return -EINVAL; + } + ictx->verbose_progress = 1; + return 0; + } /* DCD */ if (!strcmp(tok, "DCD")) { @@ -1701,10 +1727,11 @@ static int sb_verify_image_header(struct sb_image_ctx *ictx, ntohs(hdr->component_version.minor), ntohs(hdr->component_version.revision)); - if (hdr->flags & ~SB_IMAGE_FLAG_VERBOSE) + if (hdr->flags & ~SB_IMAGE_FLAGS_MASK) ret = -EINVAL; - soprintf(ictx, "%s Image flags: %s\n", stat[!!ret], -hdr->flags & SB_IMAGE_FLAG_VERBOSE ? "Verbose_boot" : ""); + soprintf(ictx, "%s Image flags: %s %s\n", stat[!!ret], +hdr->flags & SB_IMAGE_FLAG_DISPLAY_PROGRESS ? "Display_progress" : "", +hdr->flags & SB_IMAGE_FLAG_VERBOSE_PROGRESS ? "Verbose_progress" : ""); if (ret) return ret; @@ -2305,7 +2332,7 @@ static int mxsimage_generate(struct image_tool_params *params, ctx.cfg_filename = params->imagename; ctx.output_filename = params->imagefile; - ctx.verbose_boot = 1; + ctx.display_progress = 1; ret = sb_build_tree_from_cfg(&ctx); if (ret) diff --git a/tools/mxsimage.h b/tools/mxsimage.h index 6cd59d2..01624f7 100644 --- a/tools/mxsimage.h +++ b/tools/mxsimage.h @@ -82,7 +82,11 @@ struct sb_boot_image_header { #defineSB_VERSION_MINOR1 /* Enable to HTLLC verbose boot report. */ -#define SB_IMAGE_FLAG_VERBOSE (1 << 0) +#define SB_IMAGE_FLAG_DISPLAY_PROGRESS (1 << 0) +#define SB_IMAGE_FLAG_VERBOSE_PROGRESS (1 << 1) +#define SB_IMAGE_FLAGS_MASK \ + (SB_IMAGE_FLAG_DISPLAY_PROGRESS | \ +SB_IMAGE_FLAG_VERBOSE_PROGRESS) struct sb_key_dictionary_key { /* The CBC-MAC of image and sections header. */ -- 1.8.5.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 00/19] [RFC] Power(full) framework based on Driver Model
Hello all, On 10/08/2014 10:48 PM, Przemyslaw Marczak wrote: Hello, This piece of code was a base for prepare my presentation talk for the U-Boot Mini Summit, which taking place at ELCE2014 conference, 13-th October 2014 Dusseldorf, Germany. The tittle of talk: "Power(full) framework based on Driver Model" The presentation will be shared after the Summit. This patchset introduces the new one PMIC framework for the U-Boot. It is still under the construction, but the basic functionality was achieved and tested. Please feel free to comment and share the opinion. I think that each patch is described full enough, but for some more design details, please look into the documentation file. It includes some basic examples for the PMIC drivers. Quick summary of: Framework: - The new approach - UCLASS_PMIC - simple and designed for device I/O only - Add new uclass types: UCLASS_PMIC and UCLASS_PMIC_REGULATOR - Two uclass drivers for above types - A common regulator operations - will easy cover the real devices design Drivers: - Introduce new PMIC API for drivers - now everything base on "struct udevice" - Introduce Regulator Voltage descriptors and Operation Mode descriptors which are usually taken from the device tree (board dependent data) - Two uclass device drivers for MAX77686(PMIC+REGULATOR) User Interface: - command pmic, unchanged functionality and ported to the driver model - command regulator(NEW) for safe regulator setup from commandline, - now can check output Voltage and operation mode of the regulators, - also can check the board Voltage limits and driver available modes The future plans: - Wait for the I2c Driver Model implementation - Introduce a common way to bind pmic devices - now done by alias "pmic" - Add additional uclass types: MUIC, CHARGER, BATTERY, MFD and maybe more. - Introduce optimal operations for new uclasses - Port all U-Boot drivers to the new Framework - Remove the old drivers and the old PMIC Framework code The assumptions of this work is: - Add new code to independent files - Keep two Frameworks as independent and without conflicts - Don't mix OLD/NEW Framework code - for the readability - Port all drivers using new API - Remove the old Framework and the old drivers A disadvantage: - some parts of the present code is duplicated Need help: - After merge this, it is welcome to help with driver porting. - Everything should be tested The extra feature: The first commit introduces errno_str() function. It is a common function which I hope will be usefull for commands and not only. If any visible error says: -19 or some other magic number, then it means that this function should be used. U-Boot Mini Summit members: This code is maybe not as good as it could be, but the time was limited, and the conference is comming soon. I don't expects a code review of this now, but it would be nice if you take a look of this piece of code before our U-Boot Mini Summit. Of course it depends on you. Best Regards and see you in Dusseldorf! Przemyslaw Marczak Przemyslaw Marczak (19): lib: errno: introduce errno_str(): returns errno related message exynos: config-common: enable errno_str() function exynos: config-common: enable generic fs command dm: pmic: add implementation of driver model pmic uclass dm: pmic: add implementation of driver model regulator uclass dm: common: board_r: add call and weak of power_init_dm() dm: pmic: add max77686 pmic driver dm: regulator: add max77686 regulator driver dm: pmic: new commands: pmic and regulator dm: board:samsung: power_init_board: add requirement of CONFIG_DM_PMIC doc: driver-model: pmic and regulator uclass documentation samsung: board: lcd menu: check if any power framework is enabled samsung: misc: power_key_pressed: add support to dm pmic framework trats2: board: add support to dm pmic api trats2: dts: max77686: add pmic alias and names cleanup trats2: config: enable dm pmic, dm regulator api, dm max77686 odroid: board: add support to dm pmic api odroid: dts: add 'voltage-regulators' description to max77686 node odroid: config: enable dm pmic, dm regulator and max77686 driver Makefile | 1 + arch/arm/dts/exynos4412-odroid.dts | 250 +- arch/arm/dts/exynos4412-trats2.dts | 17 +- board/samsung/common/board.c | 5 +- board/samsung/common/misc.c| 21 +- board/samsung/odroid/odroid.c | 31 +- board/samsung/trats2/trats2.c | 208 ++-- common/board_r.c | 8 + doc/driver-model/dm-pmic-framework.txt | 450 ++ drivers/power/Makefile | 6 +- drivers/power/cmd_pmic.c | 845 + drivers/power/pmic-uclass.c| 255 ++ drivers/power/pmic/Makefile| 1 + drivers/power/pmic/max77686.c | 89 drivers/power/pmic_i2c.c |
[U-Boot] [PATCH 01/49] arm: board: use __weak
Signed-off-by: Jeroen Hofstee --- arch/arm/lib/board.c | 40 1 file changed, 12 insertions(+), 28 deletions(-) diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index 76adaf3..98782ca 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -63,25 +63,15 @@ extern void dataflash_print_info(void); * May be supplied by boards if desired */ -inline void __coloured_LED_init(void) {} -void coloured_LED_init(void) - __attribute__((weak, alias("__coloured_LED_init"))); -inline void __red_led_on(void) {} -void red_led_on(void) __attribute__((weak, alias("__red_led_on"))); -inline void __red_led_off(void) {} -void red_led_off(void) __attribute__((weak, alias("__red_led_off"))); -inline void __green_led_on(void) {} -void green_led_on(void) __attribute__((weak, alias("__green_led_on"))); -inline void __green_led_off(void) {} -void green_led_off(void) __attribute__((weak, alias("__green_led_off"))); -inline void __yellow_led_on(void) {} -void yellow_led_on(void) __attribute__((weak, alias("__yellow_led_on"))); -inline void __yellow_led_off(void) {} -void yellow_led_off(void) __attribute__((weak, alias("__yellow_led_off"))); -inline void __blue_led_on(void) {} -void blue_led_on(void) __attribute__((weak, alias("__blue_led_on"))); -inline void __blue_led_off(void) {} -void blue_led_off(void) __attribute__((weak, alias("__blue_led_off"))); +__weak void coloured_LED_init(void) {} +__weak void red_led_on(void) {} +__weak void red_led_off(void) {} +__weak void green_led_on(void) {} +__weak void green_led_off(void) {} +__weak void yellow_led_on(void) {} +__weak void yellow_led_off(void) {} +__weak void blue_led_on(void) {} +__weak void blue_led_off(void) {} /* @@ -198,27 +188,21 @@ static int arm_pci_init(void) */ typedef int (init_fnc_t) (void); -void __dram_init_banksize(void) +__weak void dram_init_banksize(void) { gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE; gd->bd->bi_dram[0].size = gd->ram_size; } -void dram_init_banksize(void) - __attribute__((weak, alias("__dram_init_banksize"))); -int __arch_cpu_init(void) +__weak int arch_cpu_init(void) { return 0; } -int arch_cpu_init(void) - __attribute__((weak, alias("__arch_cpu_init"))); -int __power_init_board(void) +__weak int power_init_board(void) { return 0; } -int power_init_board(void) - __attribute__((weak, alias("__power_init_board"))); /* Record the board_init_f() bootstage (after arch_cpu_init()) */ static int mark_bootstage(void) -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 03/49] cti_flash.c: use __weak when requested
For performance reason there seems to be a CONFIG_xyz. Introduce a __maybe_weak to allow using __weak directly instead of relying on aliases. Signed-off-by: Jeroen Hofstee --- drivers/mtd/cfi_flash.c | 50 - 1 file changed, 16 insertions(+), 34 deletions(-) diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 9b3175d..50983b8 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -63,6 +63,12 @@ flash_info_t flash_info[CFI_MAX_FLASH_BANKS];/* FLASH chips info */ #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_8BIT #endif +#ifdef CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS +#define __maybe_weak __weak +#else +#define __maybe_weak static +#endif + /* * 0x is an undefined value for the configuration register. When * this value is returned, the configuration register shall not be @@ -81,14 +87,12 @@ static u16 cfi_flash_config_reg(int i) int cfi_flash_num_flash_banks = CONFIG_SYS_MAX_FLASH_BANKS_DETECT; #endif -static phys_addr_t __cfi_flash_bank_addr(int i) +__weak phys_addr_t cfi_flash_bank_addr(int i) { return ((phys_addr_t [])CONFIG_SYS_FLASH_BANKS_LIST)[i]; } -phys_addr_t cfi_flash_bank_addr(int i) - __attribute__((weak, alias("__cfi_flash_bank_addr"))); -static unsigned long __cfi_flash_bank_size(int i) +__weak unsigned long cfi_flash_bank_size(int i) { #ifdef CONFIG_SYS_FLASH_BANKS_SIZES return ((unsigned long [])CONFIG_SYS_FLASH_BANKS_SIZES)[i]; @@ -96,71 +100,49 @@ static unsigned long __cfi_flash_bank_size(int i) return 0; #endif } -unsigned long cfi_flash_bank_size(int i) - __attribute__((weak, alias("__cfi_flash_bank_size"))); -static void __flash_write8(u8 value, void *addr) +__maybe_weak void flash_write8(u8 value, void *addr) { __raw_writeb(value, addr); } -static void __flash_write16(u16 value, void *addr) +__maybe_weak void flash_write16(u16 value, void *addr) { __raw_writew(value, addr); } -static void __flash_write32(u32 value, void *addr) +__maybe_weak void flash_write32(u32 value, void *addr) { __raw_writel(value, addr); } -static void __flash_write64(u64 value, void *addr) +__maybe_weak void flash_write64(u64 value, void *addr) { /* No architectures currently implement __raw_writeq() */ *(volatile u64 *)addr = value; } -static u8 __flash_read8(void *addr) +__maybe_weak u8 flash_read8(void *addr) { return __raw_readb(addr); } -static u16 __flash_read16(void *addr) +__maybe_weak u16 flash_read16(void *addr) { return __raw_readw(addr); } -static u32 __flash_read32(void *addr) +__maybe_weak u32 flash_read32(void *addr) { return __raw_readl(addr); } -static u64 __flash_read64(void *addr) +__maybe_weak u64 flash_read64(void *addr) { /* No architectures currently implement __raw_readq() */ return *(volatile u64 *)addr; } -#ifdef CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS -void flash_write8(u8 value, void *addr)__attribute__((weak, alias("__flash_write8"))); -void flash_write16(u16 value, void *addr)__attribute__((weak, alias("__flash_write16"))); -void flash_write32(u32 value, void *addr)__attribute__((weak, alias("__flash_write32"))); -void flash_write64(u64 value, void *addr)__attribute__((weak, alias("__flash_write64"))); -u8 flash_read8(void *addr)__attribute__((weak, alias("__flash_read8"))); -u16 flash_read16(void *addr)__attribute__((weak, alias("__flash_read16"))); -u32 flash_read32(void *addr)__attribute__((weak, alias("__flash_read32"))); -u64 flash_read64(void *addr)__attribute__((weak, alias("__flash_read64"))); -#else -#define flash_write8 __flash_write8 -#define flash_write16 __flash_write16 -#define flash_write32 __flash_write32 -#define flash_write64 __flash_write64 -#define flash_read8__flash_read8 -#define flash_read16 __flash_read16 -#define flash_read32 __flash_read32 -#define flash_read64 __flash_read64 -#endif - /*--- */ #if defined(CONFIG_ENV_IS_IN_FLASH) || defined(CONFIG_ENV_ADDR_REDUND) || (CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE) -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 05/49] misc: use __weak
Signed-off-by: Jeroen Hofstee --- common/menu.c | 5 + post/post.c | 9 ++--- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/common/menu.c b/common/menu.c index 94afeb2..e81c074 100644 --- a/common/menu.c +++ b/common/menu.c @@ -105,12 +105,9 @@ static inline void *menu_item_destroy(struct menu *m, return NULL; } -void __menu_display_statusline(struct menu *m) +__weak void menu_display_statusline(struct menu *m) { - return; } -void menu_display_statusline(struct menu *m) - __attribute__ ((weak, alias("__menu_display_statusline"))); /* * Display a menu so the user can make a choice of an item. First display its diff --git a/post/post.c b/post/post.c index 4af5355..4194edb 100644 --- a/post/post.c +++ b/post/post.c @@ -52,7 +52,7 @@ int post_init_f(void) * Boards with hotkey support can override this weak default function * by defining one in their board specific code. */ -int __post_hotkeys_pressed(void) +__weak int post_hotkeys_pressed(void) { #ifdef CONFIG_SYS_POST_HOTKEYS_GPIO int ret; @@ -73,9 +73,6 @@ int __post_hotkeys_pressed(void) return 0; /* No hotkeys supported */ } -int post_hotkeys_pressed(void) - __attribute__((weak, alias("__post_hotkeys_pressed"))); - void post_bootmode_init(void) { @@ -236,11 +233,9 @@ static void post_get_flags(int *test_flags) test_flags[j] |= POST_SLOWTEST; } -void __show_post_progress(unsigned int test_num, int before, int result) +__weak void show_post_progress(unsigned int test_num, int before, int result) { } -void show_post_progress(unsigned int, int, int) - __attribute__((weak, alias("__show_post_progress"))); static int post_run_single(struct post_test *test, int test_flags, int flags, unsigned int i) -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 00/49] reduce warnings with W=1
When compiling u-boot with W=1 there are numerous of warnings. This patchset attempts to reduce it a bit. One source of false warnings are the aliases missing a prototype, most of them are replaced with __weak functions. Others are cause by missing includes / local functions not be marked as such. At last some actual missing prototypes are added. These are (hopefully) just trivial patches, some less than trial is ahead of us. Jeroen Hofstee (49): arm: board: use __weak common: board: use __weak cti_flash.c: use __weak when requested i2c: use __weak misc: use __weak net: phy: fix warnings with W=1 pci: use __weak samsung: board: use __weak usb: use __weak video: use __weak common: cmd_elf: make do_bootelf_exec static common: board_r: make local functions static disk/part.c: make local function static ehci-hcd.c: make local functions static env_nand: make local functions static eth: make eth_address_set static gpio: make local functions static image-fit: make local function static lmb: make local functions static net: fec_mxc: make local functions static omap3: make local functions static omap_gpmc: fix warnigs with W=1 sdhci: make local functions static serial: make local functions static spi: make local functions static tegra: make local functions static video: ipu: prevent warnings with W=1 common:console: add missing include string.h: add missing prototypes arch-mx: add missing include common/cmd_elf.c: add missing include imx: add missing includes leds: missing include lib: bootm: add missing include mmc: bcm2835_sdhci: add missing include net: davince: add missing include omap3: board: add missing include and proto twister: add missing includes arm: vectors: provide protypes from vectors.S bootm: add prototype for arch_preboot_os elf: add prototype for valid_elf_image fdt_support: add prototypes for __weak functions gpio: add protype for name_to_gpio ide: add missing prototype mmc: add prototype for mmc_get_env_addr serial: add prototypes for init functions spl: add prototype for jump_to_image_no_args tegra: add proto for pin_mux_mmc i2c: designware: add an implement i2c protos arch/arm/cpu/arm926ejs/at91/led.c | 1 + arch/arm/cpu/arm926ejs/cache.c | 5 +- arch/arm/cpu/armv7/mx6/soc.c| 1 + arch/arm/cpu/armv7/omap3/board.c| 3 +- arch/arm/cpu/armv7/omap3/emif4.c| 2 +- arch/arm/cpu/armv7/omap3/sys_info.c | 4 +- arch/arm/cpu/armv7/tegra20/display.c| 3 +- arch/arm/cpu/tegra-common/sys_info.c| 2 +- arch/arm/imx-common/cpu.c | 2 + arch/arm/imx-common/misc.c | 1 + arch/arm/include/asm/arch-mxs/sys_proto.h | 2 + arch/arm/include/asm/arch-omap3/sys_proto.h | 1 + arch/arm/include/asm/arch-tegra/board.h | 11 +- arch/arm/include/asm/u-boot-arm.h | 15 +++ arch/arm/lib/board.c| 41 +++- arch/arm/lib/bootm.c| 1 + arch/arm/lib/interrupts.c | 1 + board/atmel/at91rm9200ek/led.c | 1 + board/atmel/at91sam9260ek/led.c | 1 + board/nvidia/common/board.c | 43 ++-- board/nvidia/common/emc.c | 1 + board/nvidia/seaboard/seaboard.c| 1 + board/samsung/common/board.c| 8 +- board/technexion/twister/twister.c | 2 + board/w7o/fsboot.c | 3 +- common/board_f.c| 10 +- common/board_r.c| 18 ++-- common/cmd_elf.c| 4 +- common/cmd_gpio.c | 2 +- common/console.c| 3 +- common/env_nand.c | 4 +- common/image-fit.c | 2 +- common/menu.c | 5 +- common/stdio.c | 14 +-- disk/part.c | 2 +- drivers/gpio/bcm2835_gpio.c | 2 +- drivers/gpio/kw_gpio.c | 4 +- drivers/i2c/designware_i2c.c| 17 ++-- drivers/i2c/i2c_core.c | 4 +- drivers/i2c/tegra_i2c.c | 7 +- drivers/input/tegra-kbc.c | 2 +- drivers/mmc/bcm2835_sdhci.c | 1 + drivers/mmc/sdhci.c | 6 +- drivers/mmc/tegra_mmc.c | 3 +- drivers/mtd/cfi_flash.c | 50 +++--- drivers/mtd/nand/omap_gpmc.c| 19 +--- drivers/net/davinci_emac.c | 1 + drivers/net/fec_mxc.c | 8 +- drivers/net/phy/phy.c | 7 +- drivers/pci/pci.c | 8 +- drivers/power/power_spi.c | 4 +- drivers/seri
[U-Boot] [PATCH 04/49] i2c: use __weak
Signed-off-by: Jeroen Hofstee --- arch/arm/cpu/arm926ejs/cache.c | 5 + drivers/i2c/i2c_core.c | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/cache.c b/arch/arm/cpu/arm926ejs/cache.c index e86c2ed..8d7873c 100644 --- a/arch/arm/cpu/arm926ejs/cache.c +++ b/arch/arm/cpu/arm926ejs/cache.c @@ -99,7 +99,4 @@ void flush_cache(unsigned long start, unsigned long size) /* * Stub implementations for l2 cache operations */ -void __l2_cache_disable(void) {} - -void l2_cache_disable(void) - __attribute__((weak, alias("__l2_cache_disable"))); +__weak void l2_cache_disable(void) {} diff --git a/drivers/i2c/i2c_core.c b/drivers/i2c/i2c_core.c index 18d6736..7f63987 100644 --- a/drivers/i2c/i2c_core.c +++ b/drivers/i2c/i2c_core.c @@ -395,9 +395,7 @@ void i2c_reg_write(uint8_t addr, uint8_t reg, uint8_t val) i2c_write(addr, reg, 1, &val, 1); } -void __i2c_init(int speed, int slaveaddr) +__weak void i2c_init(int speed, int slaveaddr) { i2c_init_bus(i2c_get_bus_num(), speed, slaveaddr); } -void i2c_init(int speed, int slaveaddr) - __attribute__((weak, alias("__i2c_init"))); -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 06/49] net: phy: fix warnings with W=1
get_phy_id is marked weak but has no protype nor a strong version, just make it static. Use __weak for board_phy_config. Signed-off-by: Jeroen Hofstee --- drivers/net/phy/phy.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 1d6c14f..f1ace3c 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -575,7 +575,7 @@ static struct phy_device *phy_device_create(struct mii_dev *bus, int addr, * Description: Reads the ID registers of the PHY at @addr on the * @bus, stores it in @phy_id and returns zero on success. */ -int __weak get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id) +static int get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id) { int phy_reg; @@ -785,16 +785,13 @@ int phy_startup(struct phy_device *phydev) return 0; } -static int __board_phy_config(struct phy_device *phydev) +__weak int board_phy_config(struct phy_device *phydev) { if (phydev->drv->config) return phydev->drv->config(phydev); return 0; } -int board_phy_config(struct phy_device *phydev) - __attribute__((weak, alias("__board_phy_config"))); - int phy_config(struct phy_device *phydev) { /* Invoke an optional board-specific helper */ -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 08/49] samsung: board: use __weak
Signed-off-by: Jeroen Hofstee --- board/samsung/common/board.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c index 5c3c5bb..758ce4f 100644 --- a/board/samsung/common/board.c +++ b/board/samsung/common/board.c @@ -28,19 +28,15 @@ DECLARE_GLOBAL_DATA_PTR; -int __exynos_early_init_f(void) +__weak int exynos_early_init_f(void) { return 0; } -int exynos_early_init_f(void) - __attribute__((weak, alias("__exynos_early_init_f"))); -int __exynos_power_init(void) +__weak int exynos_power_init(void) { return 0; } -int exynos_power_init(void) - __attribute__((weak, alias("__exynos_power_init"))); #if defined CONFIG_EXYNOS_TMU /* Boot Time Thermal Analysis for SoC temperature threshold breach */ -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 02/49] common: board: use __weak
Signed-off-by: Jeroen Hofstee --- common/board_f.c | 10 ++ common/board_r.c | 10 ++ 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index e6aa298..b5bebc9 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -128,14 +128,11 @@ int init_func_watchdog_reset(void) } #endif /* CONFIG_WATCHDOG */ -void __board_add_ram_info(int use_default) +__weak void board_add_ram_info(int use_default) { /* please define platform specific board_add_ram_info() */ } -void board_add_ram_info(int) - __attribute__ ((weak, alias("__board_add_ram_info"))); - static int init_baud_rate(void) { gd->baudrate = getenv_ulong("baudrate", 10, CONFIG_BAUDRATE); @@ -221,7 +218,7 @@ static int show_dram_config(void) return 0; } -void __dram_init_banksize(void) +__weak void dram_init_banksize(void) { #if defined(CONFIG_NR_DRAM_BANKS) && defined(CONFIG_SYS_SDRAM_BASE) gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE; @@ -229,9 +226,6 @@ void __dram_init_banksize(void) #endif } -void dram_init_banksize(void) - __attribute__((weak, alias("__dram_init_banksize"))); - #if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C) static int init_func_i2c(void) { diff --git a/common/board_r.c b/common/board_r.c index 231c6d6..40eae4e 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -60,7 +60,7 @@ DECLARE_GLOBAL_DATA_PTR; ulong monitor_flash_len; -int __board_flash_wp_on(void) +__weak int board_flash_wp_on(void) { /* * Most flashes can't be detected when write protection is enabled, @@ -70,16 +70,10 @@ int __board_flash_wp_on(void) return 0; } -int board_flash_wp_on(void) - __attribute__ ((weak, alias("__board_flash_wp_on"))); - -void __cpu_secondary_init_r(void) +__weak void cpu_secondary_init_r(void) { } -void cpu_secondary_init_r(void) - __attribute__ ((weak, alias("__cpu_secondary_init_r"))); - static int initr_secondary_cpu(void) { /* -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 07/49] pci: use __weak
Signed-off-by: Jeroen Hofstee --- drivers/pci/pci.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 28859f3..60c333e 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -572,7 +572,7 @@ const char * pci_class_str(u8 class) } #endif /* CONFIG_CMD_PCI || CONFIG_PCI_SCAN_SHOW */ -int __pci_skip_dev(struct pci_controller *hose, pci_dev_t dev) +__weak int pci_skip_dev(struct pci_controller *hose, pci_dev_t dev) { /* * Check if pci device should be skipped in configuration @@ -591,19 +591,15 @@ int __pci_skip_dev(struct pci_controller *hose, pci_dev_t dev) return 0; } -int pci_skip_dev(struct pci_controller *hose, pci_dev_t dev) - __attribute__((weak, alias("__pci_skip_dev"))); #ifdef CONFIG_PCI_SCAN_SHOW -int __pci_print_dev(struct pci_controller *hose, pci_dev_t dev) +__weak int pci_print_dev(struct pci_controller *hose, pci_dev_t dev) { if (dev == PCI_BDF(hose->first_busno, 0, 0)) return 0; return 1; } -int pci_print_dev(struct pci_controller *hose, pci_dev_t dev) - __attribute__((weak, alias("__pci_print_dev"))); #endif /* CONFIG_PCI_SCAN_SHOW */ int pci_hose_scan_bus(struct pci_controller *hose, int bus) -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 09/49] usb: use __weak
Signed-off-by: Jeroen Hofstee --- drivers/usb/host/ehci-hcd.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 6323c50..5e44ba1 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -119,15 +119,12 @@ static struct descriptor { #define ehci_is_TDI() (0) #endif -int __ehci_get_port_speed(struct ehci_hcor *hcor, uint32_t reg) +__weak int ehci_get_port_speed(struct ehci_hcor *hcor, uint32_t reg) { return PORTSC_PSPD(reg); } -int ehci_get_port_speed(struct ehci_hcor *hcor, uint32_t reg) - __attribute__((weak, alias("__ehci_get_port_speed"))); - -void __ehci_set_usbmode(int index) +__weak void ehci_set_usbmode(int index) { uint32_t tmp; uint32_t *reg_ptr; @@ -141,17 +138,11 @@ void __ehci_set_usbmode(int index) ehci_writel(reg_ptr, tmp); } -void ehci_set_usbmode(int index) - __attribute__((weak, alias("__ehci_set_usbmode"))); - -void __ehci_powerup_fixup(uint32_t *status_reg, uint32_t *reg) +__weak void ehci_powerup_fixup(uint32_t *status_reg, uint32_t *reg) { mdelay(50); } -void ehci_powerup_fixup(uint32_t *status_reg, uint32_t *reg) - __attribute__((weak, alias("__ehci_powerup_fixup"))); - static int handshake(uint32_t *ptr, uint32_t mask, uint32_t done, int usec) { uint32_t result; -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 10/49] video: use __weak
Signed-off-by: Jeroen Hofstee --- drivers/video/cfb_console.c | 10 ++ drivers/video/exynos_fb.c | 32 2 files changed, 10 insertions(+), 32 deletions(-) diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 9231927..8567231 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -1171,14 +1171,11 @@ void video_puts(struct stdio_dev *dev, const char *s) * video_set_lut() if they do not support 8 bpp format. * Implement weak default function instead. */ -void __video_set_lut(unsigned int index, unsigned char r, +__weak void video_set_lut(unsigned int index, unsigned char r, unsigned char g, unsigned char b) { } -void video_set_lut(unsigned int, unsigned char, unsigned char, unsigned char) - __attribute__ ((weak, alias("__video_set_lut"))); - #if defined(CONFIG_CMD_BMP) || defined(CONFIG_SPLASH_SCREEN) #define FILL_8BIT_332RGB(r,g,b){ \ @@ -2240,15 +2237,12 @@ static int video_init(void) * Implement a weak default function for boards that optionally * need to skip the video initialization. */ -int __board_video_skip(void) +__weak int board_video_skip(void) { /* As default, don't skip test */ return 0; } -int board_video_skip(void) - __attribute__ ((weak, alias("__board_video_skip"))); - int drv_video_init(void) { int skip_dev_init; diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c index 180a3b4..be35b98 100644 --- a/drivers/video/exynos_fb.c +++ b/drivers/video/exynos_fb.c @@ -58,54 +58,38 @@ static void exynos_lcd_init(vidinfo_t *vid) lcd_set_flush_dcache(1); } -void __exynos_cfg_lcd_gpio(void) +__weak void exynos_cfg_lcd_gpio(void) { } -void exynos_cfg_lcd_gpio(void) - __attribute__((weak, alias("__exynos_cfg_lcd_gpio"))); -void __exynos_backlight_on(unsigned int onoff) +__weak void exynos_backlight_on(unsigned int onoff) { } -void exynos_backlight_on(unsigned int onoff) - __attribute__((weak, alias("__exynos_cfg_lcd_gpio"))); -void __exynos_reset_lcd(void) +__weak void exynos_reset_lcd(void) { } -void exynos_reset_lcd(void) - __attribute__((weak, alias("__exynos_reset_lcd"))); -void __exynos_lcd_power_on(void) +__weak void exynos_lcd_power_on(void) { } -void exynos_lcd_power_on(void) - __attribute__((weak, alias("__exynos_lcd_power_on"))); -void __exynos_cfg_ldo(void) +__weak void exynos_cfg_ldo(void) { } -void exynos_cfg_ldo(void) - __attribute__((weak, alias("__exynos_cfg_ldo"))); -void __exynos_enable_ldo(unsigned int onoff) +__weak void exynos_enable_ldo(unsigned int onoff) { } -void exynos_enable_ldo(unsigned int onoff) - __attribute__((weak, alias("__exynos_enable_ldo"))); -void __exynos_backlight_reset(void) +__weak void exynos_backlight_reset(void) { } -void exynos_backlight_reset(void) - __attribute__((weak, alias("__exynos_backlight_reset"))); -int __exynos_lcd_misc_init(vidinfo_t *vid) +__weak int exynos_lcd_misc_init(vidinfo_t *vid) { return 0; } -int exynos_lcd_misc_init(vidinfo_t *vid) - __attribute__((weak, alias("__exynos_lcd_misc_init"))); static void lcd_panel_on(vidinfo_t *vid) { -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 11/49] common: cmd_elf: make do_bootelf_exec static
do_bootelf_exec was a weak function without a prototype nor and strong version. Just make it static. Signed-off-by: Jeroen Hofstee --- common/cmd_elf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/cmd_elf.c b/common/cmd_elf.c index ab9c7e3..2f229d7 100644 --- a/common/cmd_elf.c +++ b/common/cmd_elf.c @@ -28,8 +28,7 @@ static unsigned long load_elf_image_phdr(unsigned long addr); static unsigned long load_elf_image_shdr(unsigned long addr); /* Allow ports to override the default behavior */ -__attribute__((weak)) -unsigned long do_bootelf_exec(ulong (*entry)(int, char * const[]), +static unsigned long do_bootelf_exec(ulong (*entry)(int, char * const[]), int argc, char * const argv[]) { unsigned long ret; -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 12/49] common: board_r: make local functions static
Signed-off-by: Jeroen Hofstee --- common/board_r.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/board_r.c b/common/board_r.c index 40eae4e..54294d5 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -364,7 +364,7 @@ static int initr_spi(void) #ifdef CONFIG_CMD_NAND /* go init the NAND */ -int initr_nand(void) +static int initr_nand(void) { puts("NAND: "); nand_init(); @@ -374,7 +374,7 @@ int initr_nand(void) #if defined(CONFIG_CMD_ONENAND) /* go init the NAND */ -int initr_onenand(void) +static int initr_onenand(void) { puts("NAND: "); onenand_init(); @@ -383,7 +383,7 @@ int initr_onenand(void) #endif #ifdef CONFIG_GENERIC_MMC -int initr_mmc(void) +static int initr_mmc(void) { puts("MMC: "); mmc_initialize(gd->bd); @@ -392,7 +392,7 @@ int initr_mmc(void) #endif #ifdef CONFIG_HAS_DATAFLASH -int initr_dataflash(void) +static int initr_dataflash(void) { AT91F_DataflashInit(); dataflash_print_info(); -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 13/49] disk/part.c: make local function static
Signed-off-by: Jeroen Hofstee --- disk/part.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disk/part.c b/disk/part.c index cfd77b0..43485c9 100644 --- a/disk/part.c +++ b/disk/part.c @@ -57,7 +57,7 @@ static const struct block_drvr block_drvr[] = { DECLARE_GLOBAL_DATA_PTR; #ifdef HAVE_BLOCK_DEVICE -block_dev_desc_t *get_dev_hwpart(const char *ifname, int dev, int hwpart) +static block_dev_desc_t *get_dev_hwpart(const char *ifname, int dev, int hwpart) { const struct block_drvr *drvr = block_drvr; block_dev_desc_t* (*reloc_get_dev)(int dev); -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 15/49] env_nand: make local functions static
Signed-off-by: Jeroen Hofstee --- common/env_nand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/env_nand.c b/common/env_nand.c index 5a734a9..749605f 100644 --- a/common/env_nand.c +++ b/common/env_nand.c @@ -124,7 +124,7 @@ int env_init(void) * The legacy NAND code saved the environment in the first NAND device i.e., * nand_dev_desc + 0. This is also the behaviour using the new NAND code. */ -int writeenv(size_t offset, u_char *buf) +static int writeenv(size_t offset, u_char *buf) { size_t end = offset + CONFIG_ENV_RANGE; size_t amount_saved = 0; @@ -233,7 +233,7 @@ int saveenv(void) } #endif /* CMD_SAVEENV */ -int readenv(size_t offset, u_char *buf) +static int readenv(size_t offset, u_char *buf) { size_t end = offset + CONFIG_ENV_RANGE; size_t amount_loaded = 0; -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 16/49] eth: make eth_address_set static
Signed-off-by: Jeroen Hofstee --- net/eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/eth.c b/net/eth.c index 76ffa05..eac4f7b 100644 --- a/net/eth.c +++ b/net/eth.c @@ -153,7 +153,7 @@ static void eth_current_changed(void) setenv("ethact", NULL); } -int eth_address_set(unsigned char *addr) +static int eth_address_set(unsigned char *addr) { return memcmp(addr, "\0\0\0\0\0\0", 6); } -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 14/49] ehci-hcd.c: make local functions static
Signed-off-by: Jeroen Hofstee --- drivers/usb/host/ehci-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 5e44ba1..936d006 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -1314,7 +1314,7 @@ void *poll_int_queue(struct usb_device *dev, struct int_queue *queue) } /* Do not free buffers associated with QHs, they're owned by someone else */ -int +static int destroy_int_queue(struct usb_device *dev, struct int_queue *queue) { struct ehci_ctrl *ctrl = dev->controller; -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 17/49] gpio: make local functions static
Signed-off-by: Jeroen Hofstee --- drivers/gpio/bcm2835_gpio.c | 2 +- drivers/gpio/kw_gpio.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/bcm2835_gpio.c b/drivers/gpio/bcm2835_gpio.c index 97b5137..4a473d7 100644 --- a/drivers/gpio/bcm2835_gpio.c +++ b/drivers/gpio/bcm2835_gpio.c @@ -9,7 +9,7 @@ #include #include -inline int gpio_is_valid(unsigned gpio) +static inline int gpio_is_valid(unsigned gpio) { return (gpio < BCM2835_GPIO_COUNT); } diff --git a/drivers/gpio/kw_gpio.c b/drivers/gpio/kw_gpio.c index 0af75a8..d5a7e78 100644 --- a/drivers/gpio/kw_gpio.c +++ b/drivers/gpio/kw_gpio.c @@ -36,7 +36,7 @@ void __set_direction(unsigned pin, int input) u = readl(GPIO_IO_CONF(pin)); } -void __set_level(unsigned pin, int high) +static void __set_level(unsigned pin, int high) { u32 u; @@ -48,7 +48,7 @@ void __set_level(unsigned pin, int high) writel(u, GPIO_OUT(pin)); } -void __set_blinking(unsigned pin, int blink) +static void __set_blinking(unsigned pin, int blink) { u32 u; -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 18/49] image-fit: make local function static
Signed-off-by: Jeroen Hofstee --- common/image-fit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/image-fit.c b/common/image-fit.c index 255c4ca..8529cec 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -1434,7 +1434,7 @@ void fit_conf_print(const void *fit, int noffset, const char *p) printf("%s FDT: %s\n", p, uname); } -int fit_image_select(const void *fit, int rd_noffset, int verify) +static int fit_image_select(const void *fit, int rd_noffset, int verify) { fit_image_print(fit, rd_noffset, " "); -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 19/49] lmb: make local functions static
Signed-off-by: Jeroen Hofstee --- lib/lmb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lmb.c b/lib/lmb.c index 41a2be4..031f0e1 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -236,7 +236,7 @@ long lmb_reserve(struct lmb *lmb, phys_addr_t base, phys_size_t size) return lmb_add_region(_rgn, base, size); } -long lmb_overlaps_region(struct lmb_region *rgn, phys_addr_t base, +static long lmb_overlaps_region(struct lmb_region *rgn, phys_addr_t base, phys_size_t size) { unsigned long i; -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 20/49] net: fec_mxc: make local functions static
Signed-off-by: Jeroen Hofstee --- drivers/net/fec_mxc.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 549d648..b572470 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include "fec_mxc.h" @@ -179,13 +180,14 @@ static int fec_mdio_write(struct ethernet_regs *eth, uint8_t phyAddr, return 0; } -int fec_phy_read(struct mii_dev *bus, int phyAddr, int dev_addr, int regAddr) +static int fec_phy_read(struct mii_dev *bus, int phyAddr, int dev_addr, + int regAddr) { return fec_mdio_read(bus->priv, phyAddr, regAddr); } -int fec_phy_write(struct mii_dev *bus, int phyAddr, int dev_addr, int regAddr, - u16 data) +static int fec_phy_write(struct mii_dev *bus, int phyAddr, int dev_addr, +int regAddr, u16 data) { return fec_mdio_write(bus->priv, phyAddr, regAddr, data); } -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot