summaryrefslogtreecommitdiffstats
path: root/include/linux
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/pstore'Sascha Hauer2016-01-114-0/+289
|\
| * fs: Add pstore filesystemMarkus Pargmann2015-12-102-0/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pstore is a persistent storage filesystem used for RAMOOPS. It is used to store console logs, panics, ftrace and other information in case of a crash/panic/oops/reboot. pstore is implemented for barebox as a read-only filesystem at the moment. It may be extended later on. The idea is to provide a way to extract essential data from the last running kernel. Most of the code is copied from the kernel. However this is only a lightweight implementation without real write support yet. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * lib: Import reed solomon code from kernelMarkus Pargmann2015-12-101-0/+103
| | | | | | | | | | | | | | | | reed solomon code is used by RAMOOPS to check and fix data stored in volatile memory. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * log2: Add missing __rounddown_pow_of_two()Markus Pargmann2015-12-101-0/+9
| | | | | | | | | | Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mtd'Sascha Hauer2016-01-111-0/+5
|\ \
| * | mtd: nand: Add erased page bitflip check helper functionsMarkus Pargmann2016-01-041-0/+5
| |/ | | | | | | | | | | | | | | | | | | This adds the bitflip check helper functions from the kernel. They are used to check for bitflips in erased pages and correct them in the buffer so that UBI can work with it. Unfortunately most nand controllers do not have ECC for erased pages and don't do this on their own. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / linux/barebox-wrapper: Silence gcc5 warningSascha Hauer2015-12-101-2/+2
|/ | | | | | | | | | | gcc5 warns about using flags uninitialized in spin_lock_irqsave, although it could look into the static inline spin_lock_irqsave implementation and see it's not used at all. An empty define instead of the static inline wrapper would lead to a "unused variable" warning. Let's create a macro and fake some usage of the flags variable. This probably helps until gcc6 is out. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/reset'Sascha Hauer2015-12-081-18/+4
|\
| * reset: Add gpio reset supportSascha Hauer2015-11-231-0/+8
| | | | | | | | | | | | | | | | | | If a device has the reset-gpios property we can support this through the reset controller API, so drivers do not have to open code the support for this property each time themselves as done a few dozen times in the kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * reset: Remove unused *_optional functionsSascha Hauer2015-11-231-22/+0
| | | | | | | | | | | | | | | | Since we now have dummy reset controllers we no longer need the *_optional functions. These have been unused anyway, so just remove them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | font: fbconsole: add custom font supportsDu Huanpeng2015-11-231-0/+8
| | | | | | | | | | Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fbconsole: register fonts dynamicallySascha Hauer2015-11-131-4/+3
|/ | | | | | | | | | | | | | | Instead of having a fixed array of fonts register the fonts dynamically. This allows easier adding of fonts to the tree since only one file per font has to be added and no other files modified. Currently we have to register the fonts very early before the first framebuffer is registered. This is because of our limited dev_add_param_enum() which wants to know the number of elements when called, so we can't add elements once after we've called dev_add_param_enum(). Maybe a dev_add_param_array() has to be created whithout this limitation, but that's left for a future exercise. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/usb'Sascha Hauer2015-10-072-92/+168
|\
| * endian: sync {big,little}_endian.h with linux-4.2Antony Pavlov2015-09-102-80/+156
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * endian: Always evaluate argumentsDavid S. Miller2015-09-022-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is based on commit 3d6f4a20cc287a8980c6186624834cf10a70752b Author: David Miller <davem@davemloft.net> Date: Thu Jul 24 23:38:31 2008 -0700 endian: Always evaluate arguments. In barebox.git/drivers/usb/core/usb.c, function usb_parse_config() we have had le16_to_cpus(&(dev->config.wTotalLength)); which evaluates to "do { } while (0)" on little endian, so struct usb_configuration field misuse will never be discovered on little endian. Therefore, always evaluate the arguments to nop endian transformation operations. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mtd nand: added 'bits_per_cell' propertyEnrico Jorns2015-09-231-0/+12
|/ | | | | | | This one is available in the kernel and used by the denali driver Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: m25p80: make it possible to use large blocks if desiredSascha Hauer2015-08-261-1/+3
| | | | | | | | | | Some SPI NOR flashes support 4K erase blocks. 4K erase blocks do not work with UBIFS which needs a minimum erase block size of 15360 bytes. Also bigger sectors are faster to erase. This patch adds a device tree option to use the bigger blocks instead of the default 4K blocks. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* Merge branch 'for-next/net'Sascha Hauer2015-08-061-0/+1
|\
| * net: phy: at803x: Use genphy_config_initSascha Hauer2015-07-291-0/+1
| | | | | | | | | | | | | | | | Based on the Linux commit: 6ff01db net: phy: at803x: use genphy_config_init() Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2015-08-066-131/+314
|\ \
| * | build: update compiler*.h to newest versionsAlexey Galakhov2015-07-066-131/+314
| |/ | | | | | | | | | | | | This adds the support for gcc 5.x and clang. Signed-off-by: Alexey Galakhov <agalakhov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fonts: Add 7x14 fontSascha Hauer2015-07-201-0/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | lib/fonts: add "MINI4x6" fontAntony Pavlov2015-07-161-1/+2
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | import lib/fonts framework from linux kernelAntony Pavlov2015-07-161-0/+33
|/ | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/blspec'Sascha Hauer2015-07-061-0/+1
|\
| * fs: ubifs: Implement Linux rootargSascha Hauer2015-06-181-0/+1
| | | | | | | | | | | | | | | | Add the parameter to boot from ubifs fileystems. This assumes that there will be only one UBI device registered in the kernel, otherwise there is no way to predict the ubi number. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2015-07-032-3/+3
|\ \
| * | treewide: replace __inline__ with inlineSascha Hauer2015-07-021-2/+2
| | | | | | | | | | | | | | | | | | inline is preferred over __inline__ Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: Make devname argument to add_mtd_device constSascha Hauer2015-06-291-1/+1
| |/ | | | | | | | | | | | | add_mtd_device duplicates the string where necessary, so make it const. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / mtd: Add mtd concat supportSascha Hauer2015-06-231-0/+34
|/ | | | | | | | The mtd concat layer supports concatenating several MTD devices into a single one. This is nearly as-is from the corresponding Kernel code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clk: of: fix clk_of_table generationSascha Hauer2015-06-111-1/+1
| | | | | | | | | | | | | | 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/spi-nor'Sascha Hauer2015-06-092-0/+211
|\
| * 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-091-1/+7
|\ \ | |/ |/|
| * 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>
| * 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 '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-061-1/+1
|\ \
| * | of: use 'const void *' for struct of_device_id.dataAntony Pavlov2015-04-301-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-061-0/+2
|\ \
| * | 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>
* | 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>
* | 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/pci'Sascha Hauer2015-04-131-0/+769
|\
| * pci: pci_regs.h: Sync with LinuxSascha Hauer2015-03-171-0/+769
| | | | | | | | | | | | | | Sync the pci register definitions with Linux 4.0-rc1. Some are needed for the upcoming designware pcie driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | pci: make sure to activate devices on the root busLucas Stach2015-04-131-0/+1
|/ | | | | | | | | | | | Commit b8a1bb1dd215 (pci: defer device registration until after bridge setup) changed the activation order of devices, so that bridges above the devices could be configured properly before activating the devices below. This commit failed to acknowledge that there may be devices located directly on the root bus without any bridge in between and so those devices would never get enabled. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
* lib: Add hex2bin and bin2hex implementationsSascha Hauer2015-03-131-0/+4
| | | | | | | Taken from the Kernel, put into the same place as in the kernel, although the hexdump.c does not actually contain hexdum functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/rockchip'Sascha Hauer2015-03-094-0/+42
|\ | | | | | | | | Conflicts: arch/arm/Kconfig
| * CLK: Add helper defines to barebox-wrapper.h for easier porting of drivers ↵Andrey Panov2015-03-051-0/+6
| | | | | | | | | | | | | | from Linux kernel Signed-off-by: Andrey Panov <rockford@yandex.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>