summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* clk: of: fix clk_of_table generationSascha Hauer2015-06-112-2/+3
| | | | | | | | | | | | | | We used to collect all sections beginning with __clk_of_table_ in a single section in the linker using KEEP(*(.__clk_of_table_*)). That the sentinel entry ended up as the last entry was pure luck, but not always the case. Instead of putting all entries in different sections we now put all entries in the same section. Only the sentinel entry gets its own section and is collected by the linker separately. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reported-by: Andreas Willig <andreas.willig@rafi.de> Tested-by: Andreas Willig <andreas.willig@rafi.de>
* Merge branch 'for-next/state'Sascha Hauer2015-06-093-5/+7
|\
| * habv4: habv4_get_status(): fix warning with no-op static inline functionMarc Kleine-Budde2015-05-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following warning: CC arch/arm/boards/foo/board.o In file included from arch/arm/boards/foo/board.c:22:0: include/habv4.h:24:19: warning: function declaration isn't a prototype [-Wstrict-prototypes] static inline int habv4_get_status() ^ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: add a function to remove an of_fixupUwe Kleine-König2015-05-181-0/+1
| | | | | | | | | | | | | | | | | | This function is needed when a device that already registered a fixup in the probe routine fails later to probe completely. Without unregistering the fixup the function might later be called with invalid data. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * state: backend: support phandle and of_path referencesMarc Kleine-Budde2015-05-151-3/+4
| | | | | | | | | | | | | | | | | | | | | | This patch improves the backend property, it can be either a phandle or a of_path. During probe() of the state driver the backend property is dereferenced and the resulting of_path is saved in the state context. In a later patch it will be used to generate a phandle reference to the backend during DT fixup. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * state: make state_release() non staticMarc Kleine-Budde2015-05-151-0/+1
| | | | | | | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * state: state_new_from_fdt(): remove unused functionMarc Kleine-Budde2015-05-151-1/+0
| | | | | | | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/spi-nor'Sascha Hauer2015-06-093-0/+220
|\ \
| * | mtd: spi-nor: add cadence quadspi driverSteffen Trumtrar2015-05-291-0/+9
| | | | | | | | | | | | | | | Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: spi-nor: add SPI-NOR frameworkSteffen Trumtrar2015-05-292-0/+211
| | | | | | | | | | | | | | | | | | | | | | | | Import the SPI-NOR framework from linux kernel v3.19. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/posix_types'Sascha Hauer2015-06-094-24/+98
|\ \ \
| * | | remove unused nlink_tSascha Hauer2015-06-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The nlink_t type is unused in barebox, so drop it. This prevents compile failures when architectures use the generic posix_types.h which no longer has __kernel_nlink_t defined. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | introduce generic posix_types.hSascha Hauer2015-06-031-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most types defined in posix_types.h are architecture independent, so instead of repeating this for each architecture add a generic file that can be used by architecture code. To use it an architecture must define BITS_PER_LONG properly in asm/bitsperlong.h. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | drop __BITS_PER_LONGSascha Hauer2015-05-222-23/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kernel has __BITS_PER_LONG and BITS_PER_LONG. The formaer is needed for architectures which support 32bit userspace on a 64bit kernel. This is not relevant for barebox, so drop __BITS_PER_LONG and use BITS_PER_LONG only. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | dma: Use generic place for dma_addr_t typedefSascha Hauer2015-05-221-0/+7
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Instead of letting all architectures define their own dma_addr_t use a common place in include/linux/types.h and use a Kconfig symbol that architectures can select to define the width of dma_addr_t. The same is done in the Kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2015-06-096-15/+28
|\ \ \
| * | | crc16: Make buffer argument constSascha Hauer2015-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The buffer is not modified by crc16, so make the argument const. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | crypto: digest: mark signature argument as constMarc Kleine-Budde2015-05-261-5/+5
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Abolish cpu_read* and cpu_write* accessorsMasahiro Yamada2015-05-201-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 2e6a88f2101d (add cpu native ordered io accessors) introduced these macros and then commit be57f20cdd7d (Fix big endian MMIO primitives) figured out they are equivalent to __raw_{read,write}*. They turned out unnecessary after all. Anyway, most source files use __raw_read* and __raw_write*. Let's replace a few remaining references and abolish them. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | startup: introduce postenvironment_initcallSascha Hauer2015-05-152-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To allow init code that depends on the environment being loaded. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | watchdog: add static inline no-ops if WD is disabledMarc Kleine-Budde2015-05-151-0/+17
| |/ / | | | | | | | | | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mem64'Sascha Hauer2015-06-091-1/+2
|\ \ \
| * | | fs: Add O_RWSIZE_8Sascha Hauer2015-05-281-1/+2
| | |/ | |/| | | | | | | | | | | | | To support native 64bit accesses in memcpy_sz. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/imx'Sascha Hauer2015-06-091-0/+128
|\ \ \
| * | | i.MX: serial: Add baud rate calculation convenience functionsAndrey Smirnov2015-05-071-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add two functions to calculate values for UBMR and UBIR registers. This way both early serial initalization code and serial_imx.c can use them and not duplicate the code. Singed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | i.MX: serial: Add constants for UART clock divisorAndrey Smirnov2015-05-071-0/+7
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | i.MX: Move UART definitions into a separate fileAndrey Smirnov2015-05-071-0/+112
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Move UART definitions into a separate file to avoid redefinition in <mach/debug_ll.h> and magical constants in low level UART initialization code. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/console'Sascha Hauer2015-06-091-0/+8
|\ \ \
| * | | console: Add console_get_by_nameSascha Hauer2015-06-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commands like loadx/loady wish to find a console device by its name. Add a function for this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | console: Add functions to get/set baudrateSascha Hauer2015-06-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | So C code can call a function rather than fiddling with device parameters. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | console: Add functions to get/set active state of consoleSascha Hauer2015-06-091-0/+4
| | |/ | |/| | | | | | | | | | | | | | | | | | | Currently code needs to fiddle with the active parameter of a console device directly to enable/disable consoles. Add console_set_active() to set the status and console_get_active() to get the current status. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/am33xx'Sascha Hauer2015-06-092-0/+26
|\ \ \ | |/ / |/| |
| * | net: dhcp: Split dhcp funcionality & add dhcp commandWadim Egorov2015-06-051-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dhcp/bootp was bound to the command functionality. This patch splits the dhcp command. We are now able to use bootp without a shell. This patch adds also a check for environment variables and globalvar. So only when ENVIRONMENT_VARIABLES and GLOBALVAR is set, all received dhcp data will be stored. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | bootsource: Add NET bootsourceWadim Egorov2015-05-271-0/+1
| |/ | | | | | | | | Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'pu/am335x'Sascha Hauer2015-05-281-0/+1
|\ \ | |/ |/|
| * net: phy: Add missing phy_unregister_deviceSascha Hauer2015-04-281-0/+1
| | | | | | | | | | | | The counterpart of phy_register_device is missing. Add it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/of-device-id'Sascha Hauer2015-05-063-3/+3
|\ \
| * | of: use 'const void *' for struct of_device_id.dataAntony Pavlov2015-04-303-3/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 2011 barebox' of_device_id struct uses unsigned long type for data field: struct of_device_id { char *compatible; unsigned long data; }; Almost always struct of_device_id.data field are used as pointer and need 'unsigned long' casting. E.g. see 'git grep -A 4 of_device_id drivers/' output: drivers/ata/sata-imx.c:static __maybe_unused struct of_device_id imx_sata_dt_ids[] = { drivers/ata/sata-imx.c- { drivers/ata/sata-imx.c- .compatible = "fsl,imx6q-ahci", drivers/ata/sata-imx.c- .data = (unsigned long)&data_imx6, drivers/ata/sata-imx.c- }, { Here is of_device_id struct in linux kernel v4.0: struct of_device_id { char name[32]; char type[32]; char compatible[128]; const void *data; }; Changing of_device_id.data type to 'const void *data' will increase barebox' linux kernel compatibility and decrease number of 'unsigned long' casts. Part of the patch was done using the 'coccinelle' tool with the following semantic patch: @rule1@ identifier dev; identifier type; identifier func; @@ func(...) { <... - dev_get_drvdata(dev, (unsigned long *)&type) + dev_get_drvdata(dev, (const void **)&type) ...> } @rule2@ identifier dev; identifier type; identifier func; identifier data; @@ func(...) { <... - dev_get_drvdata(dev, (unsigned long *)&type->data) + dev_get_drvdata(dev, (const void **)&type->data) ...> } Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mvebu'Sascha Hauer2015-05-062-0/+38
|\ \
| * | bus: mvebu-mbus: Convert mbus platform driver to direct driverSebastian Hesselbarth2015-04-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Registering mbus driver as platform driver is a little late for some register accesses to work. We have to make sure boot-up mbus windows are disabled early, so call mbus driver directly from SoC init. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | spi: Add SPI GPIO bitbang driverSebastian Hesselbarth2015-04-271-0/+36
| | | | | | | | | | | | | | | | | | | | | This adds a driver for SPI master by GPIO pins. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2015-05-068-8/+24
|\ \ \
| * | | usb: increase USB_CNTL_TIMEOUT to match linuxSteffen Trumtrar2015-05-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | USB requests should be processed within a timeframe of 5s. The linux kernel also uses this timeout value for the control packets. For the musb the increase in timeout helps successfully probing USB devices (at least on one test hardware), but on the other hand doesn't slow down the system, if there are no devices, i.e. the timeout never hits. That means, that the USB core correctly aborts instead of timing out. Why and how the 100ms was chosen in the first place, can not be deduced from the git history, just that it seems to work fine for most boards. Change USB_CNTL_TIMEOUT to 5000ms and replace all occurences of `USB_CNTL_TIMEOUT * x` with just `USB_CNTL_TIMEOUT`, as the timeout is now large enough without it. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | linux/amba/bus.h: drop unusable amba_{g,s}et_drvdata macrosAntony Pavlov2015-04-281-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | amba_{g,s}et_drvdata macros from linux kernel use dev_{g,s}et_drvdata functions. But in linux dev_get_drvdata() takes only one argument while in barebox dev_get_drvdata() takes two arguments. There is no dev_set_drvdata() in barebox at all. So amba_{g,s}et_drvdata macros from linux are unusable for barebox. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | of_path: of_find_path(): add possibility to return .bb deviceMarc Kleine-Budde2015-04-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a flags argument to the of_find_path() function. The only flag defined for now is OF_FIND_PATH_FLAGS_BB. When used on NAND devices, the function returns the bad block aware device (the ".bb" device). Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | timeout: factor out wait-for-key-press loop into separate fileMarc Kleine-Budde2015-04-231-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch factors out the wait-for-key-press loop from the shell command "timeout" into a sparate file, so that it can be used from C, too. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | include: add includes includes to make fdt.h, of.h and state.h self containedMarc Kleine-Budde2015-04-173-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise compilation may fail with: include/fdt.h:11:15: error: unknown type name 'uint64_t' static inline uint64_t fdt64_to_cpu(uint64_t x) include/of.h:22:19: error: field 'list' has incomplete type struct list_head list; Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | drivers/base: Mark (of|platform)_device_id data as constantUwe Kleine-König2015-04-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There should be no reason to ever change the data pointed to by id_table or of_compatible. So make this offical by adding some 'const's. In Linux the corresponding pointers are marked as const, too. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | pci: Do not abuse dev->priv for storing dataSascha Hauer2015-04-171-0/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | dev->priv is for private use of the device driver, so do not use it in the pci core. Instead, introduce a id field in struct pci_device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
* | | Merge branch 'for-next/imx'Sascha Hauer2015-05-061-0/+30
|\ \ \ | |_|/ |/| |