summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* i.MX habv3: add missing includes and make locally used function staticMichael Olbrich2019-03-041-1/+3
| | | | | | | | | | | | | | | Without this building fails with: drivers/hab/habv3.c:80:12: error: static declaration of 'imx25_hab_get_status' follows non-static declaration In file included from drivers/hab/habv3.c:14: include/hab.h:39:5: note: previous declaration of 'imx25_hab_get_status' was here drivers/hab/habv3.c:87:1: warning: data definition has no type or storage class drivers/hab/habv3.c:87:1: warning: type defaults to 'int' in declaration of 'postmmu_initcall' [-Wimplicit-int] drivers/hab/habv3.c:87:1: warning: parameter names (without types) in function declaration drivers/hab/habv3.c:80:12: warning: 'imx25_hab_get_status' defined but not used [-Wunused-function] Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/at91-pmc-clk'Sascha Hauer2019-02-2724-971/+3143
|\
| * clk: at91: update to PMC bindingsSam Ravnborg2019-02-2516-970/+567
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on kernel 5.0-rc6 update at91 clk support to match the new PMC bindings. Manually added all changes done in the kernel from 4.9-rc3 to 5.0-rc6. New drivers required was added as seperate commits. This includes dt-compat code required to support at91sam5d3, as this is not yet ported to use the new PMC bindings. clk-programmable saw some extra changes - it had never been bulit. It is used only by at91sama5d2 - and barebox has no board support for this cpu (yet). The CONFIG_SOC symbols is used to select the relevant drivers. CONFIG_SOC_SAM9 selects several drivers, and in the future this can be split to keep the image size down. In the kernel CLK_OF_DECLARE_DRIVER() can be used for a two step init. In barebox this is a simple one step init. It was added to have less differences between the kernel and the barebox versions of the drivers. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Tested-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * clk: at91: add dt-compat to PMC bindingsAhmad Fatoum2019-02-251-0/+961
| | | | | | | | | | | | | | | | | | | | | | As the sama5d3 based microchip-ksz9477-evb board still uses the old bindings, the dt-compat.c code is ported as well. This can be removed when all in-kernel at91 boards have been ported to the new bindings. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Tested-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * clk: at91: add sama5d4Sam Ravnborg2019-02-251-0/+270
| | | | | | | | | | | | | | | | | | | | | | | | Add sama5d4 as part of supporting the PMC bindings for ARM at91. The file will be wired into the build in a follow-up patch. The file is a copy from kernel 5.0-rc6 modified to build with barebox. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Tested-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * clk: at91: add sama5d2Sam Ravnborg2019-02-251-0/+342
| | | | | | | | | | | | | | | | | | | | | | | | Add sama5d2 as part of supporting the PMC bindings for ARM at91. The file will be wired into the build in a follow-up patch. The file is a copy from kernel 5.0-rc6 modified to build with barebox. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Tested-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * clk: at91: add at91sam9x5Sam Ravnborg2019-02-251-0/+315
| | | | | | | | | | | | | | | | | | | | | | | | Add at91sam9x5 as part of supporting the PMC bindings for ARM at91. The file will be wired into the build in a follow-up patch. The file is a copy from kernel 5.0-rc6 modified to build with barebox. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Tested-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * clk: at91: add at91sam9rlSam Ravnborg2019-02-251-0/+177
| | | | | | | | | | | | | | | | | | | | | | | | Add at91sam9rl as part of supporting the PMC bindings for ARM at91. The file will be wired into the build in a follow-up patch. The file is a copy from kernel 5.0-rc6 modified to build with barebox. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Tested-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * clk: at91: add at91sam9260Sam Ravnborg2019-02-251-0/+497
| | | | | | | | | | | | | | | | | | | | | | | | Add at91sam9260 as part of supporting the PMC bindings for ARM at91. The file will be wired into the build in a follow-up patch. The file is a copy from kernel 5.0-rc6 modified to build with barebox. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Tested-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * clocksource: Do not mix depends and select for ATMEL_PITSam Ravnborg2019-02-251-1/+0
| | | | | | | | | | | | | | | | | | | | CLOCKSOURCE_ATMEL_PIT was both set to yes using depends on and using select. Use only select to set this non-visible symbol to 'y' Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Tested-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * regmap: Implement syscon_regmap_lookup_by_compatible()Ahmad Fatoum2019-02-251-0/+14
| | | | | | | | | | | | | | | | | | Implement syscon_regmap_lookup_by_compatible() to simplify porting kernel code. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Tested-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | usb: imx: Do not disable VBUS on ehci_register()'s successAndrey Smirnov2019-02-271-3/+3
|/ | | | | | | | | | | | | Original code was written to exit early on ehci_register()'s success. As a part of e3eb0c729b, however, it was modified to to early exit on failure instead. This resulted in VBUS being erroneously disabled after EHCI controller was added, thus breaking USB on some i.MX boards (confirmed on ZII's RDU2). Fixes: e3eb0c729b ("usb: host: ehci: add ehci_unregister()") Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Cc: Vivien Didelot <vivien.didelot@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/rpi'Sascha Hauer2019-02-132-28/+56
|\
| * mci: bcm2835: make locally used functions staticRoland Hieber2019-02-051-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mci-bcm2835 driver registers itself as an MCI driver on probing, and is thereby used through the MCI interface, so these functions are not meant to act as a public interface and only used internally in this compilation unit. This fixes the following build warnings: .../drivers/mci/mci-bcm2835.c:56:6: warning: no previous prototype for 'bcm2835_mci_write' [-Wmissing-prototypes] void bcm2835_mci_write(struct bcm2835_mci_host *host, u32 reg, u32 val) ^~~~~~~~~~~~~~~~~ .../drivers/mci/mci-bcm2835.c:74:5: warning: no previous prototype for 'bcm2835_mci_read' [-Wmissing-prototypes] u32 bcm2835_mci_read(struct bcm2835_mci_host *host, u32 reg) ^~~~~~~~~~~~~~~~ .../drivers/mci/mci-bcm2835.c:83:6: warning: no previous prototype for 'bcm2835_mci_write_data' [-Wmissing-prototypes] void bcm2835_mci_write_data(struct bcm2835_mci_host *host, u32 *p) ^~~~~~~~~~~~~~~~~~~~~~ .../drivers/mci/mci-bcm2835.c:89:6: warning: no previous prototype for 'bcm2835_mci_read_data' [-Wmissing-prototypes] void bcm2835_mci_read_data(struct bcm2835_mci_host *host, u32 *p) ^~~~~~~~~~~~~~~~~~~~~ CC common/date.o .../drivers/mci/mci-bcm2835.c:419:5: warning: no previous prototype for 'bcm2835_mci_reset' [-Wmissing-prototypes] int bcm2835_mci_reset(struct mci_host *mci, struct device_d *mci_dev) Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * serial_ns16550: add raspberry pi compatible and initRouven Czerwinski2019-02-051-0/+28
| | | | | | | | | | | | | | | | Add the compatible for the Raspberry Pi AUX UART and an init function which enables it via the aux register and configures the correct shift value. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * serial_ns16550: handle default reg-io-widthRouven Czerwinski2019-02-051-23/+23
| | | | | | | | | | | | | | | | | | | | According to the device tree bindings for 8250, width is an optional property. Default to 1 which is the same default value as used by the kernel. Before this change the driver would not work for device trees which do not include the optional binding. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/pci'Sascha Hauer2019-02-135-114/+74
|\ \
| * | PCI: Consify pci_ops in struct pci_controllerAndrey Smirnov2019-01-163-4/+4
| | | | | | | | | | | | | | | | | | Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PCI: Convert ->res_start() to return resource_size_tAndrey Smirnov2019-01-161-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On 64-bit machines int doesn't cover full address space, so convert .res_start to both accept resource_size_t as a parameter and return it as result. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PCI: Assume 1:1 mapping if .res_start callback is NULLAndrey Smirnov2019-01-163-13/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Save a bit of no-op boilerplate by converting pci_iomap() to treat absense of .res_start callback as an indicator that 1:1 mapping is being used. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PCI: Simplify alloc_pci_dev()Andrey Smirnov2019-01-161-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | Use xzalloc() to allocate PCI device and drop OOM checking code. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PCI: Drop "rom_address" from struct pci_devAndrey Smirnov2019-01-161-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | This field is not being used in Barebox. Drop it. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PCI: Drop "ops" from struct pci_busAndrey Smirnov2019-01-162-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Drop "ops" from struct pci_bus, since the same struct can be accessed via host->pci_ops. No functional change intended. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PCI: Drop "resources" from struct pci_busAndrey Smirnov2019-01-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This field is not used by Barebox. Remove it. No functional change intended. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PCI: Drop "slots" from struct pci_busAndrey Smirnov2019-01-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This field is not used by Barebox. Remove it. No functional change intended. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PCI: Make pci_scan_bus staticAndrey Smirnov2019-01-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Pci_scan_bus is not used anyhwere outside pci.c. Mark in static to reflect that. No functional change intended. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PCI: Remove unused variables/codeAndrey Smirnov2019-01-161-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Both host_head and host_tail are not used anywhere in the codebase and look like a leftover. Remove them. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PCI: Store and reuse BAR offsetsAndrey Smirnov2019-01-161-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Save and reuse BAR offsets in dedicated constants instead of repeating the same expression multiple times. No functional change intended. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PCI: Simplify resource setup code in setup_device()Andrey Smirnov2019-01-161-57/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify resource setup code in setup_device() by factoring out all of the common code and moving it outside the if main if statement. No functional change intended. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PCI: Remove superfluous parens in setup_device()Andrey Smirnov2019-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove superfluous parens in setup_device(). No functional change intended. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PCI: Replace magic number in setup_device()Andrey Smirnov2019-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | User PCI_BASE_ADDRESS_SPACE_IO instead of explicit magic number. No functional change intended. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PCI: Switch to using %pa to print memory addressesAndrey Smirnov2019-01-161-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Switch to using %pa to print memory addresses in order to be able to support both 64 and 32 bit builds. Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mmc-esdhc'Sascha Hauer2019-02-133-125/+164
|\ \ \
| * | | mci: imx-esdhc: Add layerscape supportSascha Hauer2019-02-122-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the esdhc controller found on Layerscape SoCs. This means adding the compatible and a driver data to access the controller in bigendian mode. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc: Add bigendian register access supportSascha Hauer2019-02-071-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | Layerscape will need bigendian io accessors. Add support for them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc: implement static inline io wrappersSascha Hauer2019-02-072-64/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Layerscape will need accesses in big endian mode. To make this possible create static inline wrappers for the io accessors. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc: remove unnecessary includeSascha Hauer2019-02-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Drop inclusion of unnecessary include from mach-imx/include/mach. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc: make clkidx configurableSascha Hauer2019-02-061-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Other architectures using this driver may need a different clk_id to find its clock. Make this configurable as a preparation for layerscape support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc: move platform_dataSascha Hauer2019-02-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | move platform_data from mach-imx/include/mach/ to include/platform_data where it's available for other architectures aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc: use dev_idSascha Hauer2019-02-061-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid using cpu_is_* macros and use a dev_id instead. This will make it easier to integrate the driver into another architecture. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mci: imx-esdhc: Do not reset twiceSascha Hauer2019-02-061-47/+34
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | The esdhc controller is resetted once during probe by calling esdhc_reset() and once open coded in esdhc_init(). Resetting it once is enough, so drop the open coded reset from esdhc_init() and call esdhc_reset() there. With this we can remove the call to esdhc_reset() during probe. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2019-02-139-18/+109
|\ \ \
| * | | nvmem: eeprom_93xx46: fix whitespacesAntony Pavlov2019-02-121-4/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: phy: micrel: backport ksz9031 125MHz ref-clk workaroundMarco Felsch2019-02-121-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch backports linux commit e1b505a60366 ("net: phy: micrel: add 125MHz reference clock workaround"). 8<--------------------- The original commit message ------------------- net: phy: micrel: add 125MHz reference clock workaround The micrel KSZ9031 phy has a optional clock pin (CLK125_NDO) which can be used as reference clock for the MAC unit. The clock signal must meet the RGMII requirements to ensure the correct data transmission between the MAC and the PHY. The KSZ9031 phy does not fulfill the duty cycle requirement if the phy is configured as slave. For a complete describtion look at the errata sheets: DS80000691D or DS80000692D. The errata sheet recommends to force the phy into master mode whenever there is a 1000Base-T link-up as work around. Only set the "micrel,force-master" property if you use the phy reference clock provided by CLK125_NDO pin as MAC reference clock in your application. Attenation, this workaround is only usable if the link partner can be configured to slave mode for 1000Base-T. Signed-off-by: Markus Niebel <Markus.Niebel@tqs.de> [m.felsch@pengutronix.de: fix dt-binding documentation] [m.felsch@pengutronix.de: use already existing result var for read/write] [m.felsch@pengutronix.de: add error handling] [m.felsch@pengutronix.de: add more comments] Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net> 8<--------------------------------------------------------------------- Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: Phy: Update phy interface modes from LinuxSascha Hauer2019-02-061-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This syncs the phy interface modes with Linux and adds names that were previously missing. With this we no longer have holes in the phy mode name arrays and thus of_get_phy_mode no longer derefences NULL pointers when it finds such a hole. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: designware: drop bad RX framesIan Abbott2019-02-051-9/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In dwc_ether_rx(), check the RX descriptor status for various error conditions. On error, issue a warning with the error status bits and drop the received frame. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: peb: Add function to skip bad blocksSascha Hauer2019-01-281-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a function that given a pointer to a PEB number increases the number until the corresponding PEB is good. It also checks for the PEB number being inside the mtd device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ubi: prevent null pointer referenceRoland Hieber2019-01-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After flashing a bogus UBI image, e.g. when the UBI is bigger than the available flash size, it can happen that barebox hangs itself with a stacktrace when the board code or the environment does a ubi_attach() on boot: ERROR: ubi0 error: init_volumes: not enough PEBs, required 7478, available 4024 unable to handle NULL pointer dereference at address 0x00000204 pc : [<1fd1eaf2>] lr : [<1fd15aad>] sp : 1feefd30 ip : 0000000a fp : 1fd5d1d7 r10: 00001d34 r9 : 00000000 r8 : 1fd5d540 r7 : 14983148 r6 : 00000006 r5 : ffffffe4 r4 : 14983004 r3 : 1fd82bfc r2 : 021f0000 r1 : 0000000a r0 : 00000000 Flags: nzcv IRQs off FIQs off Mode SVC_32 [<1fd1eaf2>] (ubi_fastmap_destroy_checkmap+0x8/0xa) from [<1fd15aad>] (ubi_read_volume_table+0x4d9/0x71c) [<1fd15aad>] (ubi_read_volume_table+0x4d9/0x71c) from [<1fd1cbf7>] (ubi_attach+0x157/0x1f8) [<1fd1cbf7>] (ubi_attach+0x157/0x1f8) from [<1fd16ec3>] (ubi_attach_mtd_dev+0x4a3/0x954) [...] After this change, barebox at least boots to a prompt where the faulty flash can be repaired: ERROR: ubi0 error: init_volumes: not enough PEBs, required 7478, available 4024 ERROR: ubi0 error: ubi_attach_mtd_dev: failed to attach mtd0, error -28 [...] running /env/bin/init... barebox@boardname:/ Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | treewide: Remove trailing whitespaces and tabsAlexander Shiyan2019-01-213-3/+3
| | |/ | |/| | | | | | | | | | | | | | | | Just a cleanup over barebox tree Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/lseek'Sascha Hauer2019-02-1326-29/+82
|\ \ \