jino.cho [Tue, 19 Apr 2016 03:05:22 +0000 (12:05 +0900)]
artik: configs: increase size of malloc() pool
This patch increase size of malloc() pool for Thor downloader.
When downloading image of the platform, "Thor failed" error occurs due to the
small size of malloc() pool.
Change-Id: I69154640c0e4f587645d7cb97b2d04929959e0cc
Signed-off-by: jino.cho <jino.cho@samsung.com>
jino.cho [Mon, 18 Apr 2016 02:04:07 +0000 (11:04 +0900)]
artik10: usb: gadget: add g_dnl_bind_fixup() function
This patch replaces VID & PID information of the THOR downloader by
adding g_gnl_bind_fixup() function.
Change-Id: I15fe00747ff980f1969018af05bddbefa8936bef
Signed-off-by: jino.cho <jino.cho@samsung.com>
jino.cho [Mon, 18 Apr 2016 01:50:55 +0000 (10:50 +0900)]
artik10: usb: dwc3: change base address of the USB Global Register
This patch changes base address of the USB Global Register. Because
ARTIK10 uses USB channel 0.
- USB Ch0 Base Address: 0x1200_0000
- USB Ch1 Base Address: 0x1240_0000
Change-Id: I41f96247248f16c76894a10daa4b11cbac69d5df
Signed-off-by: jino.cho <jino.cho@samsung.com>
jino.cho [Thu, 14 Apr 2016 07:55:59 +0000 (16:55 +0900)]
artik5: config: enable usb dfu/thor gadget
This patch enables dfu/thor gadget to support Thor downloader
for the ARTIK5 device.
Change-Id: I780aa55b3fe499b4c0ccce84a9e517ec40b6800a
Signed-off-by: jino.cho <jino.cho@samsung.com>
jino.cho [Thu, 14 Apr 2016 07:33:56 +0000 (16:33 +0900)]
artik5: gadget: add usb initialization functions
This patch adds usb initialization functions for the artik5 board to support
thor downloader.
Change-Id: Ie0a96da2f8d2b852db4aadfae6c4c4f21b612a2b
Signed-off-by: jino.cho <jino.cho@samsung.com>
jino.cho [Thu, 14 Apr 2016 07:10:23 +0000 (16:10 +0900)]
artik: dfu: add DFU functions
This patch adds DFU functions and DFU informations for the ARTIK devices.
set_dfu_alt_info
- setting dfu information for the ARTIK devices.
get_dfu_alt_system
- getting system partition information.
get_dfu_alt_boot
- getting predefined boot partition information.
Change-Id: I4361f75ba6889b86d6c6bb4501c38545c742442a
Signed-off-by: jino.cho <jino.cho@samsung.com>
jino.cho [Thu, 14 Apr 2016 06:36:28 +0000 (15:36 +0900)]
artik5: fix the build error
This patch fixs the build error on ARTIK5.
Change-Id: I69728bc8ed5952bae44a4409c921ee5328f86a8b
Signed-off-by: jino.cho <jino.cho@samsung.com>
jino.cho [Thu, 14 Apr 2016 06:33:10 +0000 (15:33 +0900)]
artik: remove CONFIG_USB_OHCI to secure the image capacity
This commit remove CONFIG_USB_OHCI to secure the image capacity.
Change-Id: I851454580ba5ff62a89f529cbefbb9b35d9e83cb
Signed-off-by: jino.cho <jino.cho@samsung.com>
jino.cho [Thu, 14 Apr 2016 06:08:50 +0000 (15:08 +0900)]
thor: cmd: remove duplicated label 'bad_args'
This commit fixs build error.
Change-Id: If5c6ffd0ca0230316c50b56dbc37a29fd32198f7
Signed-off-by: jino.cho <jino.cho@samsung.com>
Chanho Park [Mon, 11 Apr 2016 03:59:26 +0000 (12:59 +0900)]
artik: configs: enable usb dfu/thor gadget
This patch enables dfu/thor usb gadget to support
tizen image download.
Change-Id: I66bab8d8bb5722ec6c46341f70010952b2d3a0c1
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Mon, 11 Apr 2016 01:10:39 +0000 (10:10 +0900)]
board: samsung: artik10: support dwc3 gadget initialization
This patch supports dwc3 usb gadge3 for artik10/smdk5422 board.
Change-Id: I17d5072f99c276aa20daee28a0ba9d78ea09d32f
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Thu, 10 Mar 2016 12:51:03 +0000 (21:51 +0900)]
usb: echi: use _min3 instead of min3
Change-Id: I0c84580022b8a8d4bd406f3a24cbc2062b90bd28
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Przemyslaw Marczak [Thu, 12 Jun 2014 08:20:59 +0000 (10:20 +0200)]
thor:cmd: get the default command arguments from environment
This change adds support to getting the default DFU cmd line
arguments from the environment.
DFU and THOR uses the same command line arguments,
so the DFU command environment setup can be used also with THOR.
Change-Id: I2e0984c909147c13191f6d6646d094c9f02c392a
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Chanho Park [Thu, 10 Mar 2016 08:09:08 +0000 (17:09 +0900)]
exynos: define XHCI/USB3 address for other soc
Change-Id: Id2eaa48b96d52edbf988ebfd969844618e090d28
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Thu, 10 Mar 2016 08:08:09 +0000 (17:08 +0900)]
usb: dwc3: uses #if defined instead of IS_ENABLED
This patch uses #if defined macro instead of IS_ENABLED
because it's not supported in this u-boot.
Change-Id: Ia351ebbb5213b94efaa421711555168ac462b860
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Thu, 10 Mar 2016 08:07:08 +0000 (17:07 +0900)]
usb: dwc3: correct source name
This patch removes dwc.o because it's not used anywhere.
Change-Id: Iedddeaa6202300c71a348566091936442a70887c
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Masahiro Yamada [Thu, 6 Nov 2014 18:03:29 +0000 (03:03 +0900)]
linux/kernel.h: import more macros
These macros seem to be useful for U-Boot too (or at least
harmless). Imported from Linux 3.18-rc2.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Masahiro Yamada [Thu, 6 Nov 2014 18:03:28 +0000 (03:03 +0900)]
include: move various macros to include/linux/kernel.h
U-Boot has imported various utility macros from Linux
scattering them to various places without consistency.
In include/common.h are min, max, min3, max3, ARRAY_SIZE, ALIGN,
container_of, DIV_ROUND_UP, etc.
In include/linux/compat.h are min_t, max_t, round_up, round_down,
etc.
We also have duplicated defines of min_t in some *.c files.
Moreover, we are suffering from too cluttered include/common.h.
This commit moves various macros that originate in
include/linux/kernel.h of Linux to their original position.
Note:
This commit simply moves the macros; the macros roundup,
min, max, min2, max3, ARRAY_SIZE are different
from those of Linux at this point.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Conflicts:
arch/arm/cpu/armv7/bcm281xx/clk-core.h
include/common.h
lib/vsprintf.c
Change-Id: I9823611a421022aa9440d15751253697fcbc92fd
Rajeshwari Birje [Thu, 26 Dec 2013 04:14:19 +0000 (09:44 +0530)]
EXYNOS5420: Add power register structure.
Add structure for power register for Exynos5420
Signed-off-by: Rajeshwari S Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Conflicts:
arch/arm/include/asm/arch-exynos/power.h
Change-Id: Ic1c32edee03bb4bf6d0d000d98e54f1007089a04
Minkyu Kang [Mon, 15 Oct 2012 03:06:32 +0000 (03:06 +0000)]
ARCH: EXYNOS: add support to match product id
Based upon single SoC there can be multiple variants.
This patch add support to match the complete product ID.
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Conflicts:
arch/arm/include/asm/arch-exynos/cpu.h
Change-Id: I91ba4b23035a1fb8212d80afbaf3eb048476e255
Lukasz Majewski [Fri, 22 May 2015 16:14:23 +0000 (18:14 +0200)]
samsung: usb: phy: Support for DWC3 PHY
New files, namely samsung_usb_phy.c and samsung-usb-phy-uboot.h have
been added to u-boot to provide proper PHY handling at Exynos5 SoCs.
This code is used thereafter in the board_usb_init() call.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Conflicts:
drivers/usb/dwc3/Makefile
Change-Id: I5bed7e2cb3fd8033b7907cbca64ef6dcd6117a69
Joonyoung Shim [Wed, 21 Jan 2015 04:51:32 +0000 (13:51 +0900)]
EXYNOS5: Add function to enable exynos5420 usbdev phy ctrl
Exynos5420 has different registers with other exynos5 SoCs to control
usb device phy, so need separated function to enable exynos5420 usb
device phy.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Suriyan Ramasami [Wed, 29 Oct 2014 16:22:42 +0000 (09:22 -0700)]
arm: odroid: enable/disable usb host phy for exynos4412
Enable/disable the usb host phy on the odroid U/X2 boards which are based
on the Exynos4412 SOC.
Signed-off-by: Suriyan Ramasami <suriyan.r@gmail.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Przemyslaw Marczak [Mon, 1 Sep 2014 11:50:44 +0000 (13:50 +0200)]
arch:exynos: boot mode: add get_boot_mode(), code cleanup
This patch introduces code clean-up for exynos boot mode check.
It includes:
- removal of typedef: boot_mode
- move the boot mode enum to arch-exynos/power.h
- add bootmode for sequence: eMMC 4.4 ch4 / SD ch2
- add new function: get_boot_mode() for OM[5:1] pin check
- update spl boot code
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Changes v5:
- exynos: boot mode: add missing bootmode (1st:EMMC 4.4 / 2nd:SD ch2)
Changes v6:
- none
changes v7:
- change boot mode name: BOOT_MODE_MMC to BOOT_MODE_SD
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Conflicts:
arch/arm/cpu/armv7/exynos/spl_boot.c
arch/arm/include/asm/arch-exynos/spl.h
Change-Id: Ia91a5e251c476ee97bdd4921f602a5d737b6db10
Vivek Gautam [Sat, 14 Sep 2013 08:32:47 +0000 (14:02 +0530)]
arm: exynos: Add methods to control power to USB 3.0 PHY
Adding methods to turn on/off power to USB3.0 type PHY
as and when required by the controller.
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Cc: Julius Werner <jwerner@chromium.org>
Cc: Simon Glass <sjg@chromium.org>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Dan Murphy <dmurphy@ti.com>
Cc: Marek Vasut <marex@denx.de>
Rajeshwari Shinde [Thu, 4 Jul 2013 06:59:14 +0000 (12:29 +0530)]
EXYNOS: Add API for power reset and exit wakeup
This patch adds APIs to get power reset status and exit the wakeup condition for
both exynos5 and exynos4
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Naveen Krishna Chatradhi [Fri, 5 Apr 2013 22:21:39 +0000 (15:21 -0700)]
power: exynos-tmu: use the mux_addr bit fields in tmu_control register
This patch implements the mux_addr bit fields defined in tmu_control
register (used for debugging purpose)
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-by: Vadim Bendebury <vbendeb@google.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Naveen Krishna Chatradhi [Fri, 5 Apr 2013 22:21:38 +0000 (15:21 -0700)]
power: exynos-tmu: fix warnings and clean up code
This patch does the folowing
1. change the data types for unsigned int variable to unsigned
2. change the tmu_base type to struct exynos5_tmu_reg *
3. Add timer functionality for get_cur_temp()
4. error handling in the get_tmu_fdt_values()
5. Add check for curr_temp reading
6. some cosmotic changes.
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-by: Vadim Bendebury <vbendeb@google.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Akshay Saraswat [Mon, 25 Feb 2013 01:13:06 +0000 (01:13 +0000)]
Exynos5: TMU: Add hardware tripping
This adds hardware tripping at 110 degrees celsius which must enable
forced system shutdown in case TMU fails to power off.
Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Akshay Saraswat [Mon, 25 Feb 2013 01:13:00 +0000 (01:13 +0000)]
Exynos5: TMU: Add driver for Thermal Management Unit
Adding Exynos Thermal Management Unit driver to monitor SOC
temperature and take actions corresponding to states of TMU.
Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Rajeshwari Shinde [Thu, 14 Feb 2013 19:46:11 +0000 (19:46 +0000)]
EXYNOS5: Add function to enable XXTI clock source
This patch adds funtion to enable XXTI clock source
required by MAX98095 codec.
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Rajeshwari Shinde [Tue, 12 Feb 2013 20:40:01 +0000 (20:40 +0000)]
EXYNOS5: Add function to setup set ps hold
This patch adds a function to set ps_hold data driving value high.
This enables the machine to stay powered on even after the initial
power-on condition goes away(e.g. power button).
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Donghwa Lee [Mon, 2 Jul 2012 01:15:56 +0000 (01:15 +0000)]
EXYNOS5: support display port phy control function
This patch support display port phy control function.
Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Vivek Gautam [Sat, 14 Sep 2013 08:32:46 +0000 (14:02 +0530)]
USB: XHCI: Add xHCI host controller support for Exynos5
This adds driver layer for xHCI controller in Samsung's
exynos5 soc. This interacts with xHCI host controller stack.
Signed-off-by: Vikas C Sajjan <vikas.sajjan@samsung.com>
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Cc: Julius Werner <jwerner@chromium.org>
Cc: Simon Glass <sjg@chromium.org>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Dan Murphy <dmurphy@ti.com>
Cc: Marek Vasut <marex@denx.de>
Conflicts:
arch/arm/include/asm/arch-exynos/cpu.h
Change-Id: I4f0cf794ff8a43ad89d687f398de3115d7b58aa9
Przemyslaw Marczak [Thu, 12 Jun 2014 08:20:59 +0000 (10:20 +0200)]
thor:cmd: get the default command arguments from environment
This change adds support to getting the default DFU cmd line
arguments from the environment.
DFU and THOR uses the same command line arguments,
so the DFU command environment setup can be used also with THOR.
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Conflicts:
common/cmd_thordown.c
[jino.cho: Fixed conflicts from original commit of tizen.org]
Signed-off-by: jino.cho <jino.cho@samsung.com>
Change-Id: I167927ff47f7c105fd1794da21c6742a10c7593a
Lukasz Majewski [Mon, 23 Jun 2014 07:39:16 +0000 (09:39 +0200)]
thor: defer parsing of device string to IO backend
Commit
d4f5ef59cc7 "dfu: defer parsing of device string to IO backend" changed
the function signature of dfu_init_env_entities(). Adjust cmd_thordown.c
to match that change.
Also, apply the same change as commit
d6d37d737b58e "dfu: free entities
when parsing fails" to cmd_thordown.c.
Fixes: d4f5ef59cc7 ("dfu: defer parsing of device string to IO backend")
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Conflicts:
common/cmd_thordown.c
[jino.cho: Fixed conflicts from original commit of tizen.org]
Signed-off-by: jino.cho <jino.cho@samsung.com>
Change-Id: I8478952aaa6968b2684d06e1a6ca7f082771db33
jino.cho [Tue, 29 Mar 2016 00:33:38 +0000 (09:33 +0900)]
usb: s3c-otg: Add Clock control for EXYNOS3250
In EXYNOS3250, reset value of the phy_fsel is 0x7(50MHz). So, We have to clean
the bits before setting to 0x5(24MHz).
Change-Id: I173ab48dcc8190ecaf959ea253f938946f31ee0b
Signed-off-by: jino.cho <jino.cho@samsung.com>
Lukasz Majewski [Wed, 5 Feb 2014 09:10:43 +0000 (10:10 +0100)]
usb:udc:samsung: Allow burst transfers for non EP0 endpints
This patch removed obscure restriction on the HW setting of DMA transfers.
Before this change each transaction sent up to 512 bytes (with packet count
equal to 1) for non EP0 transfer.
Now it is possible to setup DMA transaction up to DMA_BUFFER_SIZE.
Test condition
- test HW + measurement: Trats - Exynos4210 rev.1
- test HW Trats2 - Exynos4412 rev.1
400 MiB compressed rootfs image download with `thor 0 mmc 0`
Measurement:
Transmission speed: 20.74 MiB/s
Change-Id: I4b70ba0c607e125f851bfec9965c77e8e6cd000f
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
Lukasz Majewski [Wed, 5 Feb 2014 09:10:42 +0000 (10:10 +0100)]
usb:udc:samsung: Remove redundant cache operation from Samsung UDC driver
A set of cache operations (both invalidation and flush) were redundant
in the S3C HS OTG Samsung driver:
1. s3c_udc_ep0_zlp - to transmit EP0's ZLP packets one don't need to flush
the cache (since it is the zero length transmission)
2. s3c_udc_pre_setup and s3c_ep0_complete_out - cache invalidation is not
needed when the buffer for OUT EP0 transmission is setup, since no data
has yet arrived.
Cache cleanups presented above don't contribute much to transmission speed
up, hence shall be regarded as cosmetic changes.
3. setdma_rx - here the s3c UDC driver's internal buffers were invalidated.
This call is not needed anymore since we reuse the buffers passed from
gadgets. This is a key contribution to transmission speed improvement.
Test condition
- test HW + measurement: Trats - Exynos4210 rev.1
- test HW Trats2 - Exynos4412 rev.1
400 MiB compressed rootfs image download with `thor 0 mmc 0`
Measurements:
Base values (without improvement):
Transmission speed: 9.51 MiB/s
After the change:
Transmission speed: 10.15 MiB/s
Change-Id: Ie3222fb1a1170b47218442f5763a082aa2fac403
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
Lukasz Majewski [Tue, 8 Oct 2013 12:30:37 +0000 (14:30 +0200)]
usb:udc:s3c: Reduce dcache invalidate range for UDC receive buffer
The s3c udc driver sends data in a max packet size. Therefore the dcache
invalidate range shall be equal to max packet, not the entire
DMA_BUFFER_SIZE.
Change-Id: I60a08c3365cf5f43ad3dcef3baed940337d250ef
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
jino.cho [Tue, 22 Mar 2016 06:16:58 +0000 (15:16 +0900)]
packaging: Add generating params.bin
This patch generates params.bin file
Change-Id: I0377190ed4b85e4afe0197e0a817de14d07d09b3
Signed-off-by: jino.cho <jino.cho@samsung.com>
Stanislaw Wadas [Fri, 18 Mar 2016 10:51:05 +0000 (11:51 +0100)]
Fix .spec name for proper obs build
Change-Id: I96784cb62cb882e1b4fd704de6e3df3446908989
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
jino.cho [Wed, 16 Mar 2016 08:26:04 +0000 (17:26 +0900)]
packaging: Add ARTIK-5/10 spec files for GBS build
This patch adds the .spec files to make possible gbs build.
Change-Id: I8e48e93d730ce3e409725b9eead28008695fd616
Signed-off-by: jino.cho <jino.cho@samsung.com>
Chanho Park [Fri, 19 Feb 2016 08:26:54 +0000 (17:26 +0900)]
artik: configs: add factory_set_ethaddr environment
This patch adds factory_set_ethaddr env to help easy generation
of the mac address and store it into factory information.
Change-Id: I6d0e97add46c1f9a369629917acf5c7d5b22960e
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Fri, 19 Feb 2016 08:25:56 +0000 (17:25 +0900)]
common: introduce gen_eth_addr command
This patch adds gen_eth_addr command to generate a random
ethernet mac address and set the address into ethaddr env.
Change-Id: I5823d9ddc380569ee0f3853996f5d1cea641f880
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
sowon.na [Tue, 16 Feb 2016 12:59:31 +0000 (21:59 +0900)]
board:samsung:remove routine to fastboot/recovery
This patch removes special routine to fastboot or recovery mode while booting.
Before this patch, u-boot goes to fastboot mode with Pin 13
grounded on J27 or Pin 7 grounded on J26 of artik5 while booting.
We remove this routine for preventing unintended booting error.
Change-Id: I2459d518bbf23fe78ea885390f8140856d6f9fb4
Signed-off-by: sowon.na <sowon.na@samsung.com>
Jim Lin [Fri, 17 May 2013 09:41:03 +0000 (17:41 +0800)]
NET: Fix system hanging if NET device is not installed
If we try to boot from NET device, NetInitLoop in net.c will be invoked.
If NET device is not installed, eth_get_dev() function will return
eth_current value, which is NULL.
When NetInitLoop is called, "eth_get_dev->enetaddr" will access
restricted memory area and therefore cause hanging.
This issue is found on Tegra30 Cardhu platform after adding
CONFIG_CMD_NET and CONFIG_CMD_DHCP in config header file.
Change-Id: I8bf18901842043f33a06c96ab5201c406fe0f605
Signed-off-by: Jim Lin <jilin@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Jae-young Hwang <j-zero.hwang@samsung.com>
Jeroen Hofstee [Thu, 26 Jun 2014 18:18:31 +0000 (20:18 +0200)]
common: main.c: make show_boot_progress __weak
This not only looks a bit better it also prevents a
warning with W=1 (no previous prototype).
Change-Id: I76061ab498572895bf3b864add2c18c4bcd9585c
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jae-young Hwang <j-zero.hwang@samsung.com>
Jeroen Hofstee [Mon, 23 Jun 2014 21:20:19 +0000 (23:20 +0200)]
common: board_f: cosmetic use __weak for leds
First of all this looks a lot better, but it also
prevents a gcc warning (W=1), that the weak function
has no previous prototype.
Change-Id: Icaabc39bf74587659b1070374b61e4022419a01a
cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jae-young Hwang <j-zero.hwang@samsung.com>
Jeroen Hofstee [Sun, 22 Jun 2014 21:10:39 +0000 (23:10 +0200)]
ARM:asm:io.h use static inline
When compiling u-boot with W=1 the extern inline void for
read* is likely causing the most noise. gcc / clang will
warn there is never a actual declaration for these functions.
Instead of declaring these extern make them static inline so
it is actually declared.
Change-Id: Ic42b514a030de64b3f12a4ed427f3ffc71f60ef8
cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Signed-off-by: Jae-young Hwang <j-zero.hwang@samsung.com>
Hans de Goede [Sat, 7 Feb 2015 21:52:40 +0000 (22:52 +0100)]
Add linux/compiler-gcc5.h to fix builds with gcc5
Add linux/compiler-gcc5/h from the kernel sources at:
commit
5631b8fba640a4ab2f8a954f63a603fa34eda96b
Author: Steven Noonan <steven@uplinklabs.net>
Date: Sat Oct 25 15:09:42 2014 -0700
compiler/gcc4+: Remove inaccurate comment about 'asm goto' miscompiles
Change-Id: I8c22aebe7c2e39059b05b3a19ae4dc3f69e10d1a
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jae-young Hwang <j-zero.hwang@samsung.com>
Chanho Park [Tue, 8 Dec 2015 01:26:14 +0000 (10:26 +0900)]
artik5: configs: enable ax88796c spi ethernet
This patch enables ax88796c spi ethernet driver. It supports
to load a kernel image from tftp server.
Change-Id: Ie3b53ff66433a278474047a5e407cfd99a051015
Signed-off-by: Jaeyong Lee <jaeyong2.lee@samsung.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Tue, 8 Dec 2015 01:15:11 +0000 (10:15 +0900)]
board: artik5: initialize ax88796c spi ethernet
This patsh supports initialization of ax88796c spi ethernet
driver for artik5. It requires to control a cs gpio pin according
to cs activation/deactivation.
Change-Id: I6ac0dbcad20ae46ee1f217e47e31252d176a0b4b
Signed-off-by: Jaeyong Lee <jaeyong2.lee@samsung.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Tue, 8 Dec 2015 01:13:30 +0000 (10:13 +0900)]
arm: exynos4: support spi pinmux configuration
This patch supports spi pinmux configuration for exynos4 and
exynos3.
Change-Id: If526783f161e2c1863b5bec110940b5aeb2c6c1d
Signed-off-by: Jaeyong Lee <jaeyong2.lee@samsung.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Tue, 8 Dec 2015 01:11:22 +0000 (10:11 +0900)]
arm: exynos: support spi clock setting for exynos4
This patch supports spi clock setting of exynos4. The exynos3250
also uses same setting with exynos4.
Change-Id: Ibfb255f9c6dcac5b35732d9387e39a90af2545f9
Signed-off-by: Jaeyong Lee <jaeyong2.lee@samsung.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Mon, 7 Dec 2015 05:39:57 +0000 (14:39 +0900)]
net: ax88796c_spi: fix timeout unit
This patch fixes timeout unit of ax88796c_spi driver because
get_timer function returns HZ unit thus we should convert the
unit according to HZ.
Change-Id: I2ab5fa138a714ede7862abe7ef0b5b16c2c4a558
Signed-off-by: Jaeyong Lee <jaeyong2.lee@samsung.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Mon, 7 Dec 2015 05:34:33 +0000 (14:34 +0900)]
net: ax88796c_spi: support old miiphy.h definitions
This patch supports old style miiphy.h definitions because the
ax88796c_spi driver only supports old version u-boot. To match
the code style, just copied the definitions from previous u-boot.
Change-Id: I6c1b108a229f5aed7de031cdb31d341192c5cad6
Signed-off-by: Jaeyong Lee <jaeyong2.lee@samsung.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Mon, 7 Dec 2015 05:27:23 +0000 (14:27 +0900)]
drivers: net: introduce ax88796c spi ethernet driver
This patch adds an new ax88796c spi ethernet driver. This codes
were imported from asix homepage without any changes. However,
we need some patches to apply them into this u-boot version.
Change-Id: I3042c5eb1a1012c95ae8f1b4b6eb662384c8dc26
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Mon, 7 Dec 2015 04:58:37 +0000 (13:58 +0900)]
board: samsung: artik5: initialize spi
This patch calls an initialization routine of spi for exynos3250.
Change-Id: I0f323f4bf051e06505bea13e64bd9e2140dd937f
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Rajeshwari Shinde [Fri, 2 Nov 2012 01:15:36 +0000 (01:15 +0000)]
SPI: Add SPI Driver for EXYNOS.
This patch adds SPI driver for EXYNOS.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Gabe Black <gabeblack@google.com>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: jy0922.shim@samsung.com
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Hatim RV [Fri, 2 Nov 2012 01:15:35 +0000 (01:15 +0000)]
EXYNOS5: Add base address for SPI
Add base address definition for SPI device on Exynos.
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Conflicts:
arch/arm/include/asm/arch-exynos/cpu.h
Change-Id: I749b88d32490d28d386dead9b637184f90dc2d0a
Hatim RV [Fri, 2 Nov 2012 01:15:34 +0000 (01:15 +0000)]
EXYNOS: Add clock for SPI
Add api to calculate and set the clock for SPI channels
Signed-off-by: James Miller <jamesmiller@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Conflicts:
arch/arm/cpu/armv7/exynos/clock.c
arch/arm/include/asm/arch-exynos/clk.h
Change-Id: Ie772ece94f18e66a5e0836b833a6cdf3c3562811
Rajeshwari Shinde [Sun, 28 Oct 2012 19:32:54 +0000 (19:32 +0000)]
EXYNOS5: Add pinmux support for SPI
This patch adds pinmux support for SPI channels
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Chanho Park [Wed, 2 Dec 2015 05:19:09 +0000 (14:19 +0900)]
board: samsung: configure emmc_dev environment rework
This patch is enhanced and fixed version of previous(
895ce33)
patch. Previous patch was reverted due to panic issue because
setenv was failed during board_mmc_init. Thus, I move the
OmPin check and setenv to board_late_init function.
Change-Id: I4194a5669ae53f302229f820dac8159c06de52b3
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Wed, 2 Dec 2015 05:02:21 +0000 (14:02 +0900)]
Revert "board: samsung: configure emmc_dev environment"
This reverts commit
895ce33b05292ee7309c7cd75f2b22eaa554ab22.
When board is initialized, setenv will cause "Signal #8".
Change-Id: Icddfd03e5b0a84bf7d73da65275245033a23b51b
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Wed, 2 Dec 2015 04:33:27 +0000 (13:33 +0900)]
arm: exynos: fix gpio map of exynos3
The gpio part2 map of exynos3 was incorrect. The gpio part2 is
started from 0x11000000 and the register map of gpk0 is
0x11000040. Thus, two gpio pads should be before gpk0.
The gpx0 is started from 0x11000c00 so we should fix the count
of res5 pad from 0x4a to 0x48.
Change-Id: I8ceae5009227daf0e4cff4d3d73aeb2318c640de
Reported-by: Jaeyoung Lee <jaeyoung2.lee@samsung.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Tue, 1 Dec 2015 12:21:19 +0000 (21:21 +0900)]
artik: common: enable factory_info command
This patch enables the factory_info command which is to
retrieve some factory information such as board S/N.
The default location to store the data is early offset of eMMC
because we don't use the location for any other purpose.
"run factory_load" command will load the information from eMMC
and configure them into environment variables.
"ethaddr" is ethernet mac address and it will be passed to kernel.
"bd_addr" is bluetooth address and it also be passed to kernel.
Change-Id: Ifa5660c3e765be84d00732593ca2005a5fc9f749
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Tue, 1 Dec 2015 12:18:17 +0000 (21:18 +0900)]
board: samsung: configure emmc_dev environment
This patch enable to set the emmc_dev number because it's
varied by boot order. If the board is booted from sdcard,
the emmc device number will be 1 not default 0. Thus, I
set a "emmc_dev" environment to retrieve the number anywhere.
Change-Id: I9324f855151bcfee85e351749ae91cab51ec4a22
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Tue, 1 Dec 2015 10:39:02 +0000 (19:39 +0900)]
common: introduce factory_info command
This patch introduces factory_info command to save/load
the factory information such as s/n, mac address.
The command supports mmc interface to save/load data into
mmc device. Please refer below command usage.
"Factory Information commands",
"list - List factory information\n"
"factory_info load <interface> <device> <offset> <cnt>\n"
" - Load factory information from the interface\n"
"factory_info save <interface> <device> <offset> <cnt>\n"
" - Save factory information to the interface\n"
"factory_info read <entity name> - Read a value of entity name\n"
"factory_info write <entity name> <val> - Write a value of entity name\n"
"factory_info clean - Clean factioy information\n"
Change-Id: Ia1f4cebf264f6f573000d001fe24a6cc88c5a8e8
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Thu, 26 Nov 2015 04:28:32 +0000 (13:28 +0900)]
common: movi: remove unnecessary partition
This patch removes unnecessary emmc boot partition because they
are not used anymore.
Change-Id: I4f15db025d2756007aa89d5ec3c15142df2b7ce5
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Thu, 19 Nov 2015 06:43:53 +0000 (15:43 +0900)]
artik: configs: support tizen partition tables
This patch supports tizen partition tables. The partition tables
of the tizen are consisted three partition, such as rootfs,
system-data and user partition.
Change-Id: I66ce9678405b97cb57adf049256d1832bc812aae
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Thu, 22 Oct 2015 07:02:14 +0000 (16:02 +0900)]
artik: configs: support modules partition
This patch adds a modules partition which contains kernel modules.
The size of partition is 32MB and located in second partition.
Change-Id: Id4178f90f769b8f1ab1dfe135669f911f24a4a99
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Thu, 22 Oct 2015 07:00:35 +0000 (16:00 +0900)]
cmd: fastboot: support module flashing
This patch supports flashing of modules partition which contains
kernel modules. The partition is second partion of total partitions.
Change-Id: I16f3f1848d630e8dcb2f66d98d1b23a4c9157640
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Mon, 19 Oct 2015 00:55:41 +0000 (09:55 +0900)]
artik: configs: set ramfsboot to default boot method
This patch changes the default boot method from mmcboot to
ramfsboot which is booted from initrd.
Change-Id: I01cfc644dc059c01fd873f48f2c529f99d64d6e0
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Wed, 16 Sep 2015 10:38:38 +0000 (19:38 +0900)]
board: artik5: change pmic wrstbi pin to GPE2_0
This patch changes the wrstbi pin of pmic from GPE1_2 to GPE2_0.
The pin was changed since artik5 board ver3.0.
Change-Id: I6a56c31995bdffa04bfeb7e6396112cd707a5e9b
Signed-off-by: nermy <nermy@insignal.co.kr>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Wed, 2 Sep 2015 02:48:06 +0000 (11:48 +0900)]
common: fastboot: support fatfs for sdfuse
This patch allows fat file system for sd_fuse. When ext4 is not
available of the partition, sdfuse will fall back to fat file system.
For example, fatfs is in the first partition:
sdfuse flash 1 kernel zImage
sdfuse flash 1 dtb exynos5422-artik10.dtb
Change-Id: If66e64ab3b7529469dc2902b90470a6a575ececb
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Thu, 20 Aug 2015 05:53:38 +0000 (14:53 +0900)]
artik: config: support android partition and booting
This patch supports android partition tables and booting to android. The
system partition is 1GB and cache partiton is 128MB and userdata
partition is remained size.
1. Generate uInitrd from ramdisk.img
mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d ramdisk.img uInitrd
2. Create a android partition from the u-boot shell
run android_format
3. flash android images
fastboot flash ramdisk uInitrd
fastboot flash system system.img
fastboot flash cache cache.img
fastboot flash userdata userdata.img
4. Build android kernel and flash the kernel
ARCH=arm ./scripts/kconfig/merge_config.sh \
arch/arm/configs/artik10_defconfig android/configs/android-base.cfg \
android/configs/android-recommended.cfg \
android/configs/artik10-android-graphic.cfg
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- exynos5422-artik10.dtb
fastboot flash kernel arch/arm/boot/zImage
fastboot flash dtb arch/arm/boot/dts/exynos5422-artik10.dtb
5. Set up androidboot.hardware from the u-boot shell
setenv opts loglevel=4 androidboot.hardware=odroidxu3
saveenv
run android_boot
Change-Id: Ic55fa4925b5ae9586bc2c9733e2f1f36df5d04d1
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Thu, 20 Aug 2015 04:30:33 +0000 (13:30 +0900)]
commmon: fastboot: cast 64bit when converting sectors to bytes
This patch fixes a cast error when converting sectors to bytes. The
start and size types of the disk_partition_t are 32bit until the
SYS_64BIT_LBA is defined. To prevent the converting error, we should
cast the value to 64bit values.
Change-Id: Ibc71207642aba2d78091123f311b8a30f33e78c7
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Wed, 12 Aug 2015 09:26:56 +0000 (18:26 +0900)]
usb: gadget: fastboot: ignore call if not fastboot mode
This patch adds return code if it is not in the fastboot mode.
On sdfuse recovery mode which is using fastboot function, it doesn't
need to reply a message through usb interface.
Change-Id: I3007c3f12579dc95a5e108e5a6afa1563638dd20
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Maxime Ripard [Thu, 8 Jan 2015 11:26:44 +0000 (12:26 +0100)]
gpt: Fix the protective MBR partition size
According to the UEFI Spec (Table 16, section 5.2.3 of the version 2.4 Errata
B), the protective MBR partition record size must be set to the size of the
disk minus one, in LBAs.
However, the current code was setting the size as the total number of LBAs on
the disk, resulting in an off-by-one error.
This confused the AM335x ROM code, and will probably confuse other tools as
well.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Steve Rae [Mon, 26 May 2014 18:52:24 +0000 (11:52 -0700)]
disk: part_efi: add get_partition_info_efi_by_name()
Add function to find a GPT table entry by name.
Tested on little endian ARMv7 and ARMv8 configurations
Signed-off-by: Steve Rae <srae@broadcom.com>
Steve Rae [Mon, 26 May 2014 18:52:23 +0000 (11:52 -0700)]
disk: part_efi: clarify lbaint_t usage
- update the comments regarding lbaint_t usage
- cleanup casting of values related to the lbaint_t type
- cleanup of a type that requires a u64
Tested on little endian ARMv7 and ARMv8 configurations
Signed-off-by: Steve Rae <srae@broadcom.com>
Steve Rae [Mon, 26 May 2014 18:52:22 +0000 (11:52 -0700)]
disk: part_efi: resolve endianness issues
Tested on little endian ARMv7 and ARMv8 configurations
Signed-off-by: Steve Rae <srae@broadcom.com>
Steve Rae [Mon, 5 May 2014 20:00:08 +0000 (13:00 -0700)]
disk: part_efi: add support for the Backup GPT
Check the Backup GPT table if the Primary GPT table is invalid.
Renamed "Secondary GPT" to "Backup GPT" as per:
UEFI Specification (Version 2.3.1, Errata A)
Signed-off-by: Steve Rae <srae@broadcom.com>
Hector Palacios [Thu, 13 Feb 2014 08:48:24 +0000 (09:48 +0100)]
part_efi: fix protective mbr struct allocation
The calloc() call was allocating space for the sizeof the struct
pointer rather than for the struct contents.
Besides, since this buffer is passed to mmc for writing and some
platforms may use cache, the legacy_mbr struct should be cache-aligned.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
Chanho Park [Tue, 11 Aug 2015 11:57:07 +0000 (20:57 +0900)]
artik: configs: disable data partition
Until we support a data partition for rw, the partition is disabled.
Change-Id: I68673de0ff7dcf6c1a90131ab1451b9a74e0be04
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Tue, 11 Aug 2015 09:45:56 +0000 (18:45 +0900)]
artik: config: do not specify initrd addr for mmcboot
This patch prevents loading initrd addr in case of mmc booting. When
warm resetting, the initrd address is filled invalid data until power
off. Thus, we should not pass the initrd address if mmc_boot.
Change-Id: I2fee8c6ac7df28a9aa83b6bd69aff27ce2522100
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Tue, 11 Aug 2015 05:48:29 +0000 (14:48 +0900)]
artik: config: enable sdfuse recovery
This patch enables sdfuse recovery which is recovered the bootloader and
boot partition from sdcard. The action of sd_recovery will do
repartitioning rootfs and fuse binaries from second ext4 partition.
Change-Id: I1320401709abe1843ee793f685aa89b8cc1f2646
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Tue, 11 Aug 2015 05:45:36 +0000 (14:45 +0900)]
common: fastboot: force to use emmc device
This patch forces to use emmc device for fastboot and sdfuse command.
The fastboot command is for writing a data to emmc device through
external device like usb or sdcard. Thus, we should use eMMC device even
the board is booted from sdcard.
Change-Id: Ib91a9f6c1bde2e140f5b336bbe26ee5fd7e3f330
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Fri, 7 Aug 2015 07:38:38 +0000 (16:38 +0900)]
artik: configs: split initrd boot command
This patch splits initrd boot command from normal command to avoid
loading ramdisk during mmc booting.
Change-Id: Ie6cba2008dec9b6c4e9953b171468c810fbe684a
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Stephen Warren [Wed, 11 Jun 2014 18:47:26 +0000 (12:47 -0600)]
fs: implement size/fatsize/ext4size
These commands may be used to determine the size of a file without
actually reading the whole file content into memory. This may be used
to determine if the file will fit into the memory buffer that will
contain it. In particular, the DFU code will use it for this purpose
in the next commit.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Conflicts:
common/cmd_fs.c
Change-Id: I2dc81095d94901aa604f970a5578b342b0009390
Stephen Warren [Mon, 3 Feb 2014 20:21:07 +0000 (13:21 -0700)]
sandbox: implement exists() function
This hooks into the generic "file exists" support added in an earlier
patch, and provides an implementation for the sandbox test environment.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Chanho Park [Thu, 6 Aug 2015 11:04:02 +0000 (20:04 +0900)]
artik: config: use uInitrd instead of initrd
This patch changes the default initrd file to uInitrd. The uInitrd is
the default initrd format of u-boot. It don't need to pass initrd size
because the size is calculated during making the uInitrd.
Change-Id: I11743df10f12ebf7ad9f662174290ca4c57c7bfa
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Chanho Park [Thu, 6 Aug 2015 06:47:32 +0000 (15:47 +0900)]
common: fastboot: support sdfuse command
This patch implements sdfuse command which is a variant version of
fastboot to use sdcard images. The sdfuse command consists of three simple
commands.
flashall: flash whole image files from the first ext4 partition of
sdcards
flash: flash a image file which is specified from command line
format: format eMMC partition to gpt partition
All commands use facilities of fastboot commands to implement easily.
Change-Id: I5eb316ee0f852fe7e74dacb7ff8c17eec7dd83ca
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Egbert Eich [Tue, 9 Apr 2013 21:11:56 +0000 (21:11 +0000)]
part/dev_desc: Add log2 of blocksize to block_dev_desc data struct
log2 of the device block size serves as the shift value used to calculate
the block number to read in file systems when implementing avaiable block
sizes.
It is needed quite often in file systems thus it is pre-calculated and
stored in the block device descriptor.
Signed-off-by: Egbert Eich <eich@suse.com>
Egbert Eich [Tue, 9 Apr 2013 06:03:36 +0000 (06:03 +0000)]
disk/gpt: Fix GPT partition handling for blocksize != 512
Disks beyond 2T in size use blocksizes of 4096 bytes. However a lot of
code in u-boot still assumes a 512 byte blocksize.
This patch fixes the handling of GPTs.
Signed-off-by: Egbert Eich <eich@suse.com>
Wu, Josh [Wed, 4 Jun 2014 03:01:24 +0000 (11:01 +0800)]
fs: fatwrite: use map_sysmem before use file_fat_write
When the map_sysmem, then the fatwrite command can support sandbox.
Following command will show how to use it:
=> sb bind 0 sd.img
=> fatls host 0
=> fatwrite host 0 $memaddr filename $filesize
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Simon Glass <sjg@chromium.org>
Wu, Josh [Thu, 8 May 2014 08:14:07 +0000 (16:14 +0800)]
fs/fat: correct FAT16/12 file finding in root dir
When write a file into FAT file system, it will search a match file in
root dir. So the find_directory_entry() will get the first cluster of
root dir content and search the directory item one by one. If the file
is not found, we will call get_fatent_value() to get next cluster of root
dir via lookup the FAT table and continue the search.
The issue is in FAT16/12 system, we cannot get root dir's next clust
from FAT table. The FAT table only be use to find the clust of data
aera in FAT16/12.
In FAT16/12 if the clust is in root dir, the clust number is a negative
number or 0, 1. Since root dir is located in front of the data area.
Data area start clust #2. So the root dir clust number should < 2.
This patch will check above situation before call get_fatenv_value().
If curclust is < 2, include minus number, we just increase one on the
curclust since root dir is in continous cluster.
The patch also add a sanity check for entry in get_fatenv_value().
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Wu, Josh [Thu, 8 May 2014 08:14:06 +0000 (16:14 +0800)]
fs: fat_write: fix the incorrect last cluster checking
In fat_write.c, the last clust condition check is incorrect:
if ((curclust >= 0xffffff8) || (curclust >= 0xfff8)) {
... ...
}
For example, in FAT32 if curclust is 0x11000. It is a valid clust.
But on above condition check, it will be think as a last clust.
So the correct last clust check should be:
in fat32, curclust >= 0xffffff8
in fat16, curclust >= 0xfff8
in fat12, curclust >= 0xff8
This patch correct the last clust check.
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Nobuhiro Iwamatsu [Tue, 8 Apr 2014 02:12:46 +0000 (11:12 +0900)]
fs: fat: Fix cache align error message in fatwrite
Use of malloc of do_fat_write() causes cache error on ARM v7 platforms.
Perhaps, the same problem will occur at any other CPUs.
This replaces malloc with memalign to fix cache buffer alignment.
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Yoshiyuki Ito <yoshiyuki.ito.ub@renesas.com>
Tested-by: Hector Palacios <hector.palacios@digi.com>