summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* doc: bootchooser: be more explicit what bootchooser.state_prefix is forEnrico Jorns2019-02-181-2/+3
| | | | | Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* doc: bootchooser: explicitly note configuration vs. storage backendEnrico Jorns2019-02-181-0/+5
| | | | | | | It is quite confusing for some users sometimes where to set what. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* doc: bootchooser: fix typos etc.Enrico Jorns2019-02-181-5/+5
| | | | | Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* kbuild: Add missing semicolonSascha Hauer2019-02-141-2/+2
| | | | | | | | | | | | | | | | | Fixes: 4fafb35d925e5 ("kbuild: cherry-pick changes from Linux v5.0-rc3") The change cherry-picked from the Kernel commit 7d0ea2524202 ("kbuild: use 'else ifeq' for checksrc to improve readability") also removed the trailing semicolons from the cmd_*checksrc lines. These were removed in kernel commit e5d289100d ("kbuild: remove trailing semicolon from cmd_* passed to if_changed_rule"), but seems the barebox Kbuild version is not yet ready for this change. Without the semicolons a make C=1 build fails with: No such file: echo Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
* Merge branch 'for-next/rpi'Sascha Hauer2019-02-139-84/+140
|\
| * ARM: rpi: complete new revision schemeMoritz Augsburger2019-02-052-24/+47
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * 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>
| * ARM: rpi: make locally used functions staticRoland Hieber2019-02-052-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These functions are not meant to be a public interface, so they can well be static. rpi_b_plus_init() was previously declared with a prototype, which is no longer needed. This fixes the following build warnings: .../arch/arm/boards/raspberry-pi/rpi-common.c:124:6: warning: no previous prototype for 'rpi_add_led' [-Wmissing-prototypes] void rpi_add_led(void) ^~~~~~~~~~~ .../arch/arm/boards/raspberry-pi/rpi-common.c:141:6: warning: no previous prototype for 'rpi_b_init' [-Wmissing-prototypes] void rpi_b_init(void) Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: rpi: use defines for uart basesRouven Czerwinski2019-02-051-3/+7
| | | | | | | | | | | | | | | | Previously the clkdev_add_phybase was called on magic register values, add defines which clarify the device for which the phybase clkdev is created. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * doc: bcm283x: remove miniuart overlay instructionRouven Czerwinski2019-02-051-1/+0
| | | | | | | | | | | | | | | | Since we now use the miniuart on the raspberry pi 3, the miniuart overlay is no longer needed. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: rpi: choose miniuart as stdoutRouven Czerwinski2019-02-051-6/+1
| | | | | | | | | | | | | | | | | | Since we now support the miniuart, enable it as the default stdout port. With this change the device tree overlay to switch the miniuart to bluetooth is no longer necessary. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: rpi: add NS16550 supportRouven Czerwinski2019-02-051-0/+1
| | | | | | | | | | | | | | | | Since the 16550 driver now supports the RPI3 miniuart, enable it in the default config. Signed-off-by: Rouven Czerwinski <r.czerwinski@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>
| * ARM: rpi: retrieve miniuart clock from firmwareRouven Czerwinski2019-02-051-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | The miniuart uses the core clock as the clock source. This clock is fixed by the firmware to 250Mhz if enable_uart=1 is set in the config.txt file. However a user could still choose to overclock the core frequency, which would result in wrong baudrates computed by barebox. Retrieve the core clock frequency from the firmware to allow all potential firmware configurations to work with barebox. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: rpi: move clks into board specific rpi-commonRouven Czerwinski2019-02-052-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | We don't know if the firmware running on the raspberry pi is the same firmware which is running on all bcm283x devices. Therefore move the console clock initialization into the rpi-common.c board file. A future commit will use this function to retrieve the miniuart clock from the raspberry pi firmware. No functional changes. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: rpi: fix typo in rpi-common.cRouven Czerwinski2019-02-051-2/+2
| | | | | | | | | | 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-137-125/+78
|\ \
| * | PCI: Consify pci_ops in struct pci_controllerAndrey Smirnov2019-01-164-5/+5
| | | | | | | | | | | | | | | | | | 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-163-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-162-8/+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-163-7/+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 "name" from struct pci_busAndrey Smirnov2019-01-161-2/+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 "resources" from struct pci_busAndrey Smirnov2019-01-162-2/+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-162-2/+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-162-2/+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/nfs'Sascha Hauer2019-02-131-58/+86
|\ \ \
| * | | fs/nfs: stop using a global variable for nfs packet payloadUwe Kleine-König2019-01-221-58/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The lifetime of the data provided by a global variable is hard to track. So move the data pointer into the nfs_priv structure and let rpc_req return the data to its callers which in turn are responsible to free it. The callers are changed to use a local variable accordingly. This makes it plausible that the previous commit catched all usages of the global data. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | fs/nfs: copy data from rpc replies to local storageUwe Kleine-König2019-01-221-5/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The nfs code uses data provided to the packet handler after net_poll() returned. But the life time of this data already ended when net_poll() returns. Most of the time it is possible to get away here but on i.MX28 the data is overwritten since commit 82ec28929cc9 ("net: fec_imx: Do not use DMA coherent memory for Rx buffers"). So the data from the packet is copied to a malloced buffer that needs free()ing when the data is not used any more. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | fs/nfs: don't try to set nfs error code from mount rpc callUwe Kleine-König2019-01-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A packet from a mount rpc call doesn't have an NFS error field, so don't try to access this. In the case of the MOUNT_UMOUNT procedure the reply package is short such that accessing the u32 after the rpc_reply structure is already after the end of the packet. Apart from the access to out-of-packet data there is no harm because the wrongly read value is unused. But make this more explicit by only using nfserr if the call was an NFS request. Fixes: 9ede56ad2476 ("fs: Add NFS support") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/mmc-esdhc'Sascha Hauer2019-02-1312-165/+190
|\ \ \ \
| * | | | 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-063-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-069-53/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1361-953/+425
|\ \ \ \
| * | | | 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>