Skip to content
Snippets Groups Projects
  1. Oct 03, 2017
    • Paul Burton's avatar
      Provide a generic io.h & address mapping functions · d4150ca6
      Paul Burton authored
      
      Most architectures currently supported by U-Boot use trivial
      implementations of map_to_physmem & virt_to_phys which simply cast a
      physical address to a pointer for use a virtual address & vice-versa.
      This results in a lot of duplicate implementations of these mapping
      functions.
      
      The set of functions provided by different architectures also differs,
      with some having implementations of phys_to_virt & others not. A later
      patch will make use of phys_to_virt in architecture-neutral code, and so
      requires that it be provided for all architectures.
      
      This patch introduces an asm-generic/io.h which provides generic
      implementations of address mapping functions, allowing the duplication
      of them between architectures to be removed. Once architectures are
      converted to make use of this generic header it will also ensure that
      all of phys_to_virt, virt_to_phys, map_physmem & unmap_physmem are
      provided. The 2 families of functions differ in that map_physmem may
      create dynamic mappings whilst phys_to_virt may not & therefore is more
      limited in scope but doesn't require information such as a length &
      flags.
      
      This patch doesn't convert any architectures to make use of this generic
      header - later patches in the series will do so.
      
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Alexey Brodkin <alexey.brodkin@synopsys.com>
      Cc: Angelo Dureghello <angelo@sysam.it>
      Cc: Bin Meng <bmeng.cn@gmail.com>
      Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
      Cc: Macpaul Lin <macpaul@andestech.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
      Cc: Thomas Chou <thomas@wytron.com.tw>
      Cc: Wolfgang Denk <wd@denx.de>
      Acked-by: default avatarAngelo Dureghello <angelo@sysam.it>
      Tested-by: default avatarAngelo Dureghello <angelo@sysam.it>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
      d4150ca6
    • Marek Behún's avatar
      fs: btrfs: Add U-Boot fs handlers. · 0c936ee3
      Marek Behún authored
      
      Signed-off-by: default avatarMarek Behun <marek.behun@nic.cz>
      
       create mode 100644 fs/btrfs/Kconfig
       create mode 100644 fs/btrfs/Makefile
       create mode 100644 fs/btrfs/btrfs.c
       create mode 100644 include/btrfs.h
      0c936ee3
    • Marek Behún's avatar
      include: Add a variadic macro to call a callback for all arguments · 59981e6a
      Marek Behún authored
      
      Add a header variadic-macro.h which defines the CALL_MACRO_FOR_EACH marco.
      
      This macro can be used as follows:
        #define TEST(x)
        CALL_MACRO_FOR_EACH(TEST, a, b, c, d)
      
      This will expand to
        TEST(a) TEST(b) TEST(c) TEST(d)
      
      The nice thing is that CALL_MACRO_FOR_EACH is a variadic macro, thus the
      number of arguments can vary (although it has an upper limit - in this
      implementation 32 arguments).
      
      Signed-off-by: default avatarMarek Behun <marek.behun@nic.cz>
      
       create mode 100644 include/u-boot/variadic-macro.h
      59981e6a
    • Marek Behún's avatar
      fs: Create a common fs_devread for ext4/reiserfs/zfs · 5994e8b6
      Marek Behún authored
      
      The ext4, reiserfs and zfs filesystems all have their own implementation
      of the same function, *_devread. Generalize this function into fs_devread
      and put the code into fs/fs_internal.c.
      
      Signed-off-by: default avatarMarek Behun <marek.behun@nic.cz>
      [trini: Move fs/fs_internal.o hunk to the end of fs/Makefile as all
      cases need it]
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      5994e8b6
    • Marek Behún's avatar
      lib: Add CRC32-C · 85d8bf57
      Marek Behún authored
      
      This is needed for BTRFS.
      
      Signed-off-by: default avatarMarek Behun <marek.behun@nic.cz>
      
       create mode 100644 lib/crc32c.c
      85d8bf57
  2. Oct 01, 2017
    • Bin Meng's avatar
      usb: xhci: Honor endpoint's interval · f51966bf
      Bin Meng authored
      
      USB endpoint reports the period between consecutive requests to send
      or receive data as bInverval in its endpoint descriptor. So far this
      is ignored by xHCI driver and the 'Interval' field in xHC's endpoint
      context is always programmed to zero which means 1ms for low speed
      or full speed , or 125us for high speed or super speed. We should
      honor the interval by getting it from endpoint descriptor.
      
      Signed-off-by: default avatarBin Meng <bmeng.cn@gmail.com>
      f51966bf
    • Bin Meng's avatar
      dm: usb: emul: Drop usb_emul_reset() · ad56e4b6
      Bin Meng authored
      
      With the root hub unbinding in usb_stop(), there is no need to do
      a Sandbox-specific reset operation. usb_emul_reset() is no longer
      used anywhere, drop it.
      
      Signed-off-by: default avatarBin Meng <bmeng.cn@gmail.com>
      ad56e4b6
    • Bin Meng's avatar
      usb: emul: Expose find_descriptor() as a public API · 848436a4
      Bin Meng authored
      
      This can be useful outside of the sandbox usb emulation uclass
      driver. Expose it as a public API with a proper prefix (usb_emul_).
      
      Signed-off-by: default avatarBin Meng <bmeng.cn@gmail.com>
      848436a4
    • Bin Meng's avatar
      usb: sandbox: Fix emulator device select logic in usb_emul_find_devnum() · 84aa8536
      Bin Meng authored
      
      Current emulator select logic in usb_emul_find_devnum() is to test
      the USB address. The USB address of the device being enumerated is
      initialized to zero at the beginning of the enumeration process in
      usb_setup_device(). At this point, the saved USB address in the
      platform data has not been assigned to any valid USB address either.
      This means: the logic will select an emulator device according to
      its sequence of declaring order in the device tree. Take test.dts
      for example, flash-stick@0 will be selected before flash-stick@1.
      But unfortunately such logic is wrong.
      
      In fact USB devices show up in a random order during the enumeration
      which means usb_emul_find_devnum() may be called on port 3 for keyb@3
      before on port 0 for flash-stick@0.
      
      To fix this, we introduce a new emulator uclass specific platdata
      to store the USB device's port number on its parent hub, and update
      the logic to test the port number instead.
      
      Signed-off-by: default avatarBin Meng <bmeng.cn@gmail.com>
      84aa8536
    • Bin Meng's avatar
      usb: Fix comments of usb_emul_find_for_dev() · 8d36c687
      Bin Meng authored
      
      There is no such a parameter called 'bus'.
      
      Signed-off-by: default avatarBin Meng <bmeng.cn@gmail.com>
      8d36c687
    • Bin Meng's avatar
      usb: emul: Remove maxpacketsize in usb_emul_setup_device() · 98b639fc
      Bin Meng authored
      
      This parameter is never used.
      
      Signed-off-by: default avatarBin Meng <bmeng.cn@gmail.com>
      98b639fc
  3. Sep 30, 2017
  4. Sep 29, 2017
    • Sam Protsenko's avatar
      env: ti: boot: Show boot status information · 6ca43a58
      Sam Protsenko authored
      
      Add tracing printings to Linux/Android boot commands, so that we can see
      what's going on. Helps to trace possible bugs on early stages and
      improves the output for user (which is especially useful, because we
      have a bunch of boot commands executing one by one).
      
      Signed-off-by: default avatarSam Protsenko <semen.protsenko@linaro.org>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      6ca43a58
    • Sam Protsenko's avatar
      env: ti: boot: Extract command for eMMC Linux boot · 2717c084
      Sam Protsenko authored
      
      Extract commands for booting Linux from eMMC to separate command. It
      seems more logical that way, and allows us to run the whole command set
      from U-Boot shell with only one command.
      
      Signed-off-by: default avatarSam Protsenko <semen.protsenko@linaro.org>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      2717c084
    • Sam Protsenko's avatar
      arm: dra7xx: Fix Linux boot from eMMC · a0b0ff0a
      Sam Protsenko authored
      
      Right now on OMAP5-based boards we have only one partition defined for
      Linux boot, which is rootfs. That doesn't work with bootpart=1:2 (that
      is defined in include/environment/ti/boot.h). To fix Linux boot we may
      either:
      
       1. Change bootpart to be 1:1
       2. Or add preceding partition, so that rootfs is actually 1:2
      
      Second choice seems more reasonable, as DFU is already using similar
      partition table and can rely on bootpart to be 1:2.
      
      This patch adds "bootloader" partition. So now eMMC layout for Linux
      boot looks like this:
      
      offset               content                 size          partition
      (KiB)                                        (KiB)
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      
      =======================================================================
      
      0       +--------------------------------+
              | MBR/GPT header                 |   128           -
      128     +--------------------------------+
              | MLO                            |   256           -
      384     +--------------------------------+
              | u-boot.img                     |   1792          bootloader
      2176    +--------------------------------+
              | //////////// hole //////////// |   256           -
      2432    +--------------------------------+
              | U-Boot environment             |   128           -
      2560    +--------------------------------+
              | U-Boot environment (redundant) |   128           -
      2688    +--------------------------------+
              | rootfs                         |   remaining     rootfs
      end     +--------------------------------+
      
      =======================================================================
      
      Guard hole appears because U-Boot environment offset was calculated for
      Android partition table, which has two additional partitions in place of
      that hole ("environment" and "misc" partitions).
      
      This patch also changes rootfs offset from 2 MiB further to 2688 KiB,
      so that there won't be any collisions with U-Boot environment when we
      flash rootfs.
      
      Signed-off-by: default avatarSam Protsenko <semen.protsenko@linaro.org>
      a0b0ff0a
    • Sam Protsenko's avatar
      arm: am57xx: Fix Linux boot from eMMC · f6d245b8
      Sam Protsenko authored
      
      Right now on OMAP5-based boards we have only one partition defined for
      Linux boot, which is rootfs. That doesn't work with bootpart=1:2 (that
      is defined in include/environment/ti/boot.h). To fix Linux boot we may
      either:
      
       1. Change bootpart to be 1:1
       2. Or add preceding partition, so that rootfs is actually 1:2
      
      Second choice seems more reasonable, as DFU is already using similar
      partition table and can rely on bootpart to be 1:2.
      
      This patch adds "bootloader" partition. So now eMMC layout for Linux
      boot looks like this:
      
      offset               content                 size          partition
      (KiB)                                        (KiB)
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      
      =======================================================================
      
      0       +--------------------------------+
              | MBR/GPT header                 |   128           -
      128     +--------------------------------+
              | MLO                            |   256           -
      384     +--------------------------------+
              | u-boot.img                     |   1792          bootloader
      2176    +--------------------------------+
              | //////////// hole //////////// |   256           -
      2432    +--------------------------------+
              | U-Boot environment             |   128           -
      2560    +--------------------------------+
              | U-Boot environment (redundant) |   128           -
      2688    +--------------------------------+
              | rootfs                         |   remaining     rootfs
      end     +--------------------------------+
      
      =======================================================================
      
      Guard hole appears because U-Boot environment offset was calculated for
      Android partition table, which has two additional partitions in place of
      that hole ("environment" and "misc" partitions).
      
      This patch also changes rootfs offset from 2 MiB further to 2688 KiB,
      so that there won't be any collisions with U-Boot environment when we
      flash rootfs.
      
      Signed-off-by: default avatarSam Protsenko <semen.protsenko@linaro.org>
      f6d245b8
    • Lokesh Vutla's avatar
      configs: keystone2: env: Fix burn_uboot_spi command · ba7f58b1
      Lokesh Vutla authored
      
      Now the u-boot spi image is greater than 0x80000, increase the same
      in env during spi erase.
      
      Reported-by: default avatarYan Liu <yan-liu@ti.com>
      Signed-off-by: default avatarLokesh Vutla <lokeshvutla@ti.com>
      ba7f58b1
    • Andrew F. Davis's avatar
      configs: k2g_evm: Make findfdt command populate fdtfile variable · f8e714eb
      Andrew F. Davis authored
      
      On all other platforms the command 'findfdt' populates the variable
      'fdtfile', but on K2G we only populate 'name_fdt'. The generic boot
      and automation scripts fail when 'findfdt' is not populated, fix
      this for K2G.
      
      Signed-off-by: default avatarAndrew F. Davis <afd@ti.com>
      f8e714eb
    • Andrew F. Davis's avatar
      configs: am43xx_evm: Avoid relocation onto firewall at the end of DRAM · 373358f2
      Andrew F. Davis authored
      
      On secure devices the initial secure software may install a firewall at
      the end of DRAM, define protected RAM to avoid space.
      
      Signed-off-by: default avatarAndrew F. Davis <afd@ti.com>
      373358f2
    • Adam Ford's avatar
      ARM: omap3: am3517-evm: Add device tree and DM support · b85781c2
      Adam Ford authored
      
      With the device tree ported from Linux 4.13, this enables
      Driver Model and Device Tree support for the am3517-evm
      
      Signed-off-by: default avatarAdam Ford <aford173@gmail.com>
      Tested-by: default avatarDerald D. Woods <woods.technical@gmail.com>
      b85781c2
    • Adam Ford's avatar
      ARM: da850-evm: Enable DM_I2C · c774207f
      Adam Ford authored
      
      With DM now enabled with the device tree pulled from Linux, we can
      enable DM_I2C in U-Boot.
      
      Reviewed-by: default avatarJagan Teki <jagan@openedev.com>
      Signed-off-by: default avatarAdam Ford <aford173@gmail.com>
      [trini: Add DM_I2C_COMPAT to da850_am18xxevm to fix warning]
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      c774207f
    • Adam Ford's avatar
      arm: da850-evm: Enable MTD Parts in SPI Flash · f4fad716
      Adam Ford authored
      
      There is a discrepency between U-Boot and Linux on the partition map.
      This enabes the MTD parts to pass MTD partition information from U-Boot to
      Linux.  Linux already has a pending patch to enable MTD PARTS in
      davinci_all_defconfig
      
      Reviewed-by: default avatarJagan Teki <jagan@openedev.com>
      Signed-off-by: default avatarAdam Ford <aford173@gmail.com>
      f4fad716
    • Adam Ford's avatar
      arm: da850-evm: Enable DM and device tree support for da850-evm · a4670f8e
      Adam Ford authored
      
      With the device tree ported and DM compatible drivers, enable:
      OF_CONTROL, DM_SPI, DM_SPI_FLASH and DM_SERIAL
      
      Note: DM_SERIAL is not enabled for da850evm_direct_nor_defconfig
      yet.
      
      Reviewed-by: default avatarJagan Teki <jagan@openedev.com>
      Signed-off-by: default avatarAdam Ford <aford173@gmail.com>
      a4670f8e
  5. Sep 27, 2017
  6. Sep 26, 2017
  7. Sep 23, 2017
  8. Sep 22, 2017
Loading