summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/warnings'Sascha Hauer2019-04-09106-284/+140
|\
| * fs: squashfs: Remove unused functionSascha Hauer2019-03-181-108/+0
| | | | | | | | | | | | squashfs_lookup_next() isn't used in the tree. Remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mfd: twl-core: Add missing prototype for twlcore_get()Sascha Hauer2019-03-181-3/+4
| | | | | | | | | | | | twlcore_get() has no prototype provided in header file. Add it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * bus: mvebu-mbus: Add missing whitespaceSascha Hauer2019-03-181-1/+1
| | | | | | | | | | | | orion5x_2win_mbus_data__maybe_unused should be two words. Fix it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: PXA: Provide prototype for pxa_clear_reset_source()Sascha Hauer2019-03-182-2/+4
| | | | | | | | | | | | | | Move pxa_clear_reset_source() declaration to a header file where the file implementing it can see it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: sha256: Remove unused header fileSascha Hauer2019-03-181-23/+0
| | | | | | | | | | | | sha256_glue.h is not being unsed in the tree. Remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: sha256: Remove unused functionsSascha Hauer2019-03-181-18/+0
| | | | | | | | | | | | sha256_export and sha256_import are not used in the tree. remove them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: boards: Harmonize barebox_arm_reset_vector() prototypeSascha Hauer2019-03-1861-67/+68
| | | | | | | | | | | | | | | | | | | | | | | | barebox_arm_reset_vector() is a global function but we never provided a prototype anywhere. The prototypes differ for the different boards, so to provide a common prototype we must harmonize them. void barebox_arm_reset_vector(uint32_t r0, uint32_t r1, uint32_t r2) Should be suitable for all boards. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: i.MX: external-nand-boot: remove unused i.MX21 entrySascha Hauer2019-03-181-3/+0
| | | | | | | | | | | | | | external nand boot on i.MX21 depends on broken for a long time no. As noone cared we remove it now. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * treewide: Add missing includesSascha Hauer2019-03-1816-0/+19
| | | | | | | | | | | | | | | | | | Many files in the tree implement functions, but do not include the header files which provide the prototypes for these functions. This means conflicting prototypes remain undetected. Add the missing includes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * treewide: Make locally used functions staticSascha Hauer2019-03-1826-58/+43
| | | | | | | | | | | | | | Many functions are only used locally but still are globally visible. Make these function static. Avoids warnings generated with -Wmissing-prototypes Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: semihosting: Fix function prototypeSascha Hauer2019-03-181-1/+1
| | | | | | | | | | | | lsee takes a loff_t pos argument and not a off_t argument. Fix. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/usb-storage'Sascha Hauer2019-04-099-376/+265
|\ \
| * | usb: storage: Inline usb_limit_blk_cnt()Andrey Smirnov2019-03-111-11/+7
| | | | | | | | | | | | | | | | | | | | | Usb_limit_blk_cnt() has only one user so we may as well inline it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: storage: Drop unnecessary assignmentAndrey Smirnov2019-03-111-3/+1
| | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: storage: Simplify I/O loop in usb_stor_blk_io()Andrey Smirnov2019-03-111-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | Simplify I/O loop a bit, by re-arranging things and dropping "sectors_done", "result" and "data" local variables. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: storage: Use simple boolean to speficy read vs. write operationAndrey Smirnov2019-03-111-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | Use simple boolean to speficy read vs. write operation usb_stor_blk_io() instead of having a custom anonymous enum. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: storage: Drop needless macroAndrey Smirnov2019-03-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | There's only user of the to_usb_mass_storage() so we may as well inline it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: storage: Drop unnecessary check in usb_stor_blk_io()Andrey Smirnov2019-03-111-27/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Checking that sector_count is zero, shouldn't be necessary since block layer won't call this function if there's no data to be read. Drop it. Checking that blockbits is eqal to SECTOR_SHIFT isn't necessary, since that field is filled by the driver and is not changed outsied of it. We know it is going to be SECTOR_SHIFT. Drop it. Checking sector_start > (ulong)-1 doesn't make sense at all since sector start is 'int' and it can't possibly be greater that ULONG_MAX. Drop it. Checking for sector_start >= pblk_dev->blk.num_blocks isn't necessary either, since we shouldn't receive request for invalid read from block layer. Drop it. Ditto for sector_count > INT_MAX and sector_start + sector_count > pblk_dev->blk.num_blocks. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: Drop usb_disable_asynch()Andrey Smirnov2019-03-113-34/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are no users of usb_control_msg() in the codebase that pass timeout of 0, so it doesn't look like usb_disable_asynch() has any effect on USB operation. Drop that function and remove all of its uses to simplify things. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: storage: Use put_unaligned_be* helpersAndrey Smirnov2019-03-111-11/+7
| | | | | | | | | | | | | | | | | | | | | Replace explicit endianness casts with put_unaligned_be* helpers. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: storage: Introduce usb_stor_transport()Andrey Smirnov2019-03-111-96/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move retry logic found in all of the low-level usb_stor_* functions into a standalone subroutine and convert the rest of the code to use it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: storage: Drop unused us_blkdev_listAndrey Smirnov2019-03-111-3/+0
| | | | | | | | | | | | | | | | | | | | | There are no users of us_blkdev_list in the file. Drop it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: storage: Drop unused fields in struct us_dataAndrey Smirnov2019-03-112-16/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only bulk-only transport is supported by the currennt codebase, so ep_bInterval and recv_intr_ep are not really used. Remove them and all related code. While at it remove flags and subclass as well since they are not really used anywhere in the codebase. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ata: ahci: Do not include <scsi.h>Andrey Smirnov2019-03-111-1/+0
| | | | | | | | | | | | | | | | | | | | | No symbols found in <scsi.h> are used in this file. Drop it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: hub: Do not include <scsi.h>Andrey Smirnov2019-03-111-1/+0
| | | | | | | | | | | | | | | | | | | | | No symbols found in <scsi.h> are used in this file. Drop it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: storage: Drop struct SCSI_cmd_blockAndrey Smirnov2019-03-115-97/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All the info we need to pass to transport function can be captured in a struct us_blk_dev and two byte arrays, so having a dedicated struct with many unused fields doesn't really buy us anything. Drop the struct and convert the rest of the code to pass needed data explicitly. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: storage: Remove unused variablesAndrey Smirnov2019-03-111-8/+0
| | | | | | | | | | | | | | | | | | | | | Drop a number of variables no longer used in the code. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: storage: Make usb_stor_request_sense() a standalone functionAndrey Smirnov2019-03-111-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | Don't try to re-use caller's "ccb" and instead convert usb_stor_request_sense() to use its own for clarity and to allow futher code improvements. No functional change intended. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: storage: Share code for READ(10) and WRITE(10)Andrey Smirnov2019-03-111-51/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Both usb_stor_read_10() and usb_stor_write_10() do almost exactly the same thing, so merge them into a signle routine and adjust all of the users accordingly. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: storage: Drop extra call to transport in usb_stor_write_10()Andrey Smirnov2019-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | There doesn't seem to be a particularly good reason to call ->trasport() one last time after 2 failures. Drop the call so allow sharing this code with usb_stor_read_10() in the following commit. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: storage: Make usb_stor_write_10() a standalone functionAndrey Smirnov2019-03-111-18/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move special preparation steps done before the call to usb_stor_write_10() inside the function itself for clarity and to allow futher code improvements. No functional change intended. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: storage: Make usb_stor_read_10() a standalone functionAndrey Smirnov2019-03-111-16/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move special preparation steps done before the call to usb_stor_read_10() inside the function itself for clarity and to allow futher code improvements. No functional change intended. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: storage: Make usb_stor_test_unit_ready() a standalone functionAndrey Smirnov2019-03-111-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move special preparation steps done before the call to usb_stor_test_unit_ready() inside the function itself for clarity and to allow futher code improvements. No functional change intended. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: storage: Make usb_stor_inquiry() a standalone functionAndrey Smirnov2019-03-111-22/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move special preparation steps done before and after call to usb_stor_inquiry() inside the function itself for clarity and to allow futher code improvements. No functional change intended. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: storage: Make usb_stor_read_capacity() a standalone functionAndrey Smirnov2019-03-111-22/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move special preparation steps done before and after call to usb_stor_read_capacity() inside the function itself for clarity and to allow futher code improvements. No functional change intended. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: storage: Don't use "unsigned long" for 32-bit valuesAndrey Smirnov2019-03-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unsignled long will expand to 64-bit unsigned integer on 64-bit CPUs. This will break current code using it to read out two 32-bit values returned by READ_CAPACITY. Fix the proble by using "u32" explicitly. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: storage: Replace custom debug tracing with dev_dbgAndrey Smirnov2019-03-113-90/+94
| | | | | | | | | | | | | | | | | | | | | | | | Replace custom debug tracing macros with a call to dev_dbg to simplify code and add device info into degug output. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: storage: Simplify memory allocation in usb_stor_probe()Andrey Smirnov2019-03-111-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | Replace explicit malloc() + OOM check and memset() with a single call to xzalloc(). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/stm32'Sascha Hauer2019-04-0949-133/+2765
|\ \ \
| * | | ARM: i.MX8MQ: Don't use cpu_is_mx8mq() at core_initcall levelAndrey Smirnov2019-03-186-25/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since __imx_cpu_type won't be initialized until imx_init()@postcore_initcall is executed cpu_is_mx8mq() will only work correctly at core_initcall level so long as imx_cpu_type does not resolve into __imx_cpu_type. This is currently the case and imx8mq_init_syscnt_frequency() works as expected, but it probably won't be in the future. To avoid this problem introduce imx8mq_cpu_lowlevel_init() and do system counter frequency initialization there. Also convert all of the i.MX8MQ boards to use this new function. Fixes: 5691aed9a ("ARM: i.MX8MQ: Check CPU type in imx8mq_init_syscnt_frequency()") Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: i.MX7: Make sure CNTFRQ is initialized early enoughAndrey Smirnov2019-03-183-35/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to make sure that CNTFRQ is initialized before corresponding clocksource driver tries to use it, otherwise we'll end up crashing due to division by zero. We can't convert imx7_timer_init() to be an initcall since it is an i.MX7 specific task, but CPU type information won't be availible until after imx_init() gets executed at postcore_initcall() level. To solve this move all of the necessary code to be a part of imx7_cpu_lowlevel_init(). Note, that original code both hardcoded frequency value to 8MHz as well as tried to write it to the first element of the frequency mode table which appears to be read-only on i.MX7. So while we are at it, simplify the code by adding set_cntfrq() implementation for ARMv7 and copy the code we already using for i.MX8MQ. Fixes: dece70752 ("clocksource: Enable architected timer support for CPU_V7") Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: Add initial STM32MP1 supportSascha Hauer2019-03-1317-0/+316
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds initial STMicroelectronics MP1 support along with support for the DK2 devel board. Only very basic support: - UART - SDRAM memory base/size - No 1st stage support Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | clocksource: Enable architected timer support for CPU_V7Sascha Hauer2019-03-113-1/+21
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: stm32mp1: Add serial driverSascha Hauer2019-03-114-0/+299
| | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | ARM: stm32mp1: Add clk driverSascha Hauer2019-03-112-0/+1989
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Taken from Linux v5.0-rc2. Mostly as-is, only adopted to the differences between the Linux and barebox clk API. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | clk: mux: Support CLK_SET_RATE_NO_REPARENT flagSascha Hauer2019-03-113-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since barebox doesn't do reparenting on rate changes we only have to define the flag. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | clk: mux: Support CLK_MUX_READ_ONLY flagSascha Hauer2019-03-112-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | Support readonly dividers using the CLK_MUX_READ_ONLY flag. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | clk: mux: Support mux specific flagsSascha Hauer2019-03-117-30/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We'll need mux specific flags in the future, so add a parameter to the mux initialization functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | clk: divider: Support CLK_DIVIDER_READ_ONLY flagSascha Hauer2019-03-114-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | To support a readonly divider add the CLK_DIVIDER_READ_ONLY flag. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>