aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-02-19ARM: davinci: cp-intc: use readl/writel_relaxed()Bartosz Golaszewski1-2/+2
Replace all calls to __raw_readl() & __raw_writel() with readl_relaxed() and writel_relaxed() respectively. It's safe to do as there's no endianness conversion being done in the code. Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: cp-intc: unify error handlingBartosz Golaszewski1-4/+7
Instead of dumping stack traces, just print a specific error message in aintc driver. Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: cp-intc: improve coding styleBartosz Golaszewski1-6/+7
Drop tabs from variable initialization. Arrange variables in reverse christmas-tree order. Add a newline before a return. Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: cp-intc: request the memory region before remapping itBartosz Golaszewski1-0/+9
Add a missing call to request_mem_region() before calling ioremap() to make sure it's not been requested by another user. Reviewed-by: David Lechner <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: cp-intc: use the new-style config structureBartosz Golaszewski5-56/+50
Modify the cp-intc driver to take all its configuration from the new config structure. Stop referencing davinci_soc_info in any way. Move the declaration for davinci_cp_intc_init() to irq-davinci-cp-intc.h and make it take the new config structure as parameter. Convert all users to the new version. Also: since the two da8xx SoCs default all irq priorities to 7, just drop the priority configuration at all and hardcode the channels to 7. It will simplify the driver code and make our lives easier when it comes to device-tree support. Reviewed-by: David Lechner <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: cp-intc: convert all hex numbers to lowercaseBartosz Golaszewski1-4/+4
Use lowercase letters in hexadecimal numbers in the cp-intc driver as is done in most of the kernel code base. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: David Lechner <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: cp-intc: use a common prefix for all symbolsBartosz Golaszewski4-73/+77
In preparation for moving the driver to drivers/irqchip do some cleanup: use a common prefix for all symbols. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: David Lechner <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: cp-intc: add the new config structures for da8xx SoCsBartosz Golaszewski2-0/+20
Add the new-style config structures for da8xx SoCs. They will be used once we make the cp-intc driver stop using davinci_soc_info. Reviewed-by: David Lechner <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19irqchip: davinci-cp-intc: add a new config structureBartosz Golaszewski1-0/+23
Add a config structure that will be used by cp-intc-based platforms. It contains the register range resource and the number of interrupts. Acked-by: Marc Zyngier <[email protected]> Reviewed-by: David Lechner <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: cp-intc: add a wrapper around cp_intc_init()Bartosz Golaszewski7-4/+16
We're going to extend the cp_intc_init() function with a config structure so we can drop the intc-related fields from davinci_soc_info. Once we do it, we won't be able to use this routine directly as the init_irq callback. Wrap the calls in additional helpers that don't take parameters and can be assigned to init_irq. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: David Lechner <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: cp-intc: remove cp_intc.hBartosz Golaszewski7-63/+19
There's no need to have a local header for cp-intc. Move the only declaration for a public function to common.h. Move all register offsets into the driver source file and drop all unused defines. Make cp_intc_of_init() static. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: David Lechner <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19irqchip: davinci-aintc: move the driver to drivers/irqchipBartosz Golaszewski5-8/+10
The aintc driver has now been cleaned up. Move it to drivers/irqchip where it belongs. There's no device-tree support for any dm* board so there's no IRQCHIP_OF_DECLARE() - there's only the exported init function called from machine code. Acked-by: Marc Zyngier <[email protected]> Reviewed-by: David Lechner <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: aintc: remove unnecessary includesBartosz Golaszewski1-4/+0
These includes are no longer required. Remove them. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: David Lechner <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: aintc: remove the timer-specific irq_set_handler()Bartosz Golaszewski1-3/+0
I've been unable to figure out exactly why, but the IRQ_TINT1_TINT34 interrupt is being handled as level irq and it's configured in the irq chip driver instead of set by the irq_set_type() callback. Since this is probably some legacy hack for out-of-tree code - remove it. Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: aintc: request memory region before remapping itBartosz Golaszewski1-0/+9
Add a missing call to request_mem_region() before calling ioremap() to make sure the region is not being used by anyone else. Reviewed-by: David Lechner <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: aintc: unify error handlingBartosz Golaszewski1-4/+14
Instead of dumping stack traces, just print a specific error message in aintc driver. Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: aintc: use the new config structureBartosz Golaszewski7-25/+26
Modify the aintc driver to take all its configuration from the new config structure. Stop referencing davinci_soc_info in any way. Move the declaration for davinci_aintc_init() to irq-davinci-aintc.h and make it take the new config structure as parameter. Convert all users to the new version. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: David Lechner <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: aintc: use the new irqchip config structure in dm* SoCsBartosz Golaszewski4-0/+44
Add the new-style config structures for dm* SoCs. They will be used once we make the aintc driver stop using davinci_soc_info. Reviewed-by: David Lechner <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19irqchip: davinci-aintc: add a new config structureBartosz Golaszewski1-0/+25
Add a config structure that will be used by aintc-based platforms. It contains the register range resource, number of interrupts and a list of priorities. Acked-by: Marc Zyngier <[email protected]> Reviewed-by: David Lechner <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: aintc: use writel_relaxed()Bartosz Golaszewski1-1/+1
Raplace all calls to __raw_writel() with writel_relaxed(). It's safe to do as there's no endianness conversion being done in the code. Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: aintc: drop the 00 prefix from register offsetsBartosz Golaszewski1-11/+11
Since no offset goes past 0xff - let's drop the 00 prefix for better readability. While we're at it: convert all hex numbers to lower-case. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: David Lechner <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: aintc: use a common prefix for symbols in the driverBartosz Golaszewski6-57/+60
In preparation for moving the driver to drivers/irqchip do some cleanup: use a common prefix for all symbols. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: David Lechner <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: aintc: wrap davinci_irq_init() with a helperBartosz Golaszewski12-8/+32
We're going to extend the davinci_irq_init() function with a config structure so we can drop the intc-related fields from davinci_soc_info. Once we do it, we won't be able to use this routine directly as the init_irq callback. Wrap the calls in additional helpers that don't take parameters and can be assigned to init_irq. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: David Lechner <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: aintc: drop GPL license boilerplateBartosz Golaszewski1-20/+6
Replace the GPLv2 or later license boilerplate with an SPDX identifier. Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: make irqs.h a local headerBartosz Golaszewski16-26/+30
The existence of irqs.h in mach-davinci/include/mach only makes sense without SPARSE_IRQ as it's then expected to define NR_IRQS and is included from asm/irq.h. As we now support SPARSE_IRQ, this header can be moved to mach-davinci and used as the source of HW interrupt numbers. While updating the includes in various files - also rearrange the headers by directory (linux/asm/mach). Reviewed-by: David Lechner <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: select SPARSE_IRQBartosz Golaszewski8-2/+9
Everything is in place now for SPARSE_IRQ. Select it and set DAVINCI_INTC_START to NR_IRQS. We now need to include mach/irqs.h in a couple places as it is no longer indirectly included after selecting SPARSE_IRQ. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: David Lechner <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: wrap HW interrupt numbers with a macroBartosz Golaszewski13-239/+246
Once we select SPARSE_IRQ, the interrupt numbers defined in mach/irqs.h will only signify the hardware interrupt offsets, not the interrupt numbers seen by linux. Introduce a wrapper macro that translates the hwirq number to virtual numbers. For now it's just a dummy. Use that macro when specifying the interrupts in resources for platform devices. Reviewed-by: David Lechner <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: pull davinci_intc_base into the respective intc driversBartosz Golaszewski4-3/+3
davinci_intc_base is defined globally in common.c. Define separate local variables for the aintc and cp-intc drivers and remove the global one. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: David Lechner <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: remove davinci_intc_typeBartosz Golaszewski11-14/+0
We now use the generic ARM irq handler on davinci. There are no more users that check davinci_intc_type. Remove the variable and all its references. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: David Lechner <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: select GENERIC_IRQ_MULTI_HANDLERBartosz Golaszewski4-39/+52
In order to support SPARSE_IRQ we first need to make davinci use the generic irq handler for ARM. Translate the legacy assembly to C and put the irq handlers into their respective drivers (aintc and cp-intc). Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: aintc: use irq domainBartosz Golaszewski1-8/+27
We need to create an irq domain if we want to select SPARSE_IRQ. The cp-intc driver already supports it, but aintc doesn't. Use the helpers provided by the generic irq chip abstraction. Reviewed-by: David Lechner <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19ARM: davinci: remove intc_host_map from davinci_soc_info structBartosz Golaszewski2-6/+0
The intc_host_map field in struct davinci_soc_info is not used by any board. Remove it as part of the interrupt support cleanup. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: David Lechner <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-19input: davinci_keyscan: remove unnecessary includesBartosz Golaszewski1-4/+0
The mach/ and asm/ includes are not needed in davinci_keyscan, but they will cause build problems once we make mach/irqs.h a private header for mach-davinci. Remove all unused header includes. Acked-by: Dmitry Torokhov <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-12usb: ohci-da8xx: remove unused callbacks from platform dataBartosz Golaszewski1-14/+0
There are no more users of the platform_data callbacks in ohci-da8xx. Remove them. Signed-off-by: Bartosz Golaszewski <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-12ARM: davinci: da830-evm: remove legacy usb helpersBartosz Golaszewski1-67/+0
The logic implemented by these routines now lives in the da8xx-ohci driver. Remove dead code. Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-12ARM: davinci: omapl138-hawk: remove legacy usb helpersBartosz Golaszewski1-74/+1
The logic implemented by these routines now lives in the da8xx-ohci driver. Remove dead code. Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-12usb: ohci-da8xx: add vbus and overcurrent gpiosBartosz Golaszewski1-49/+50
There are two users upstream which register external callbacks for switching the port power on/off and overcurrent protection. Both users only use two GPIOs for that. Instead of having that functionality in the board files, move the logic into the OHCI driver - including the interrupt handler for overcurrent detection. Signed-off-by: Bartosz Golaszewski <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-12ARM: davinci: da830-evm: use gpio lookup entries for usb gpiosBartosz Golaszewski1-0/+10
Add lookup entries for vbus and overcurrent gpios for da830-evm. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-12ARM: davinci: omapl138-hawk: use gpio lookup entries for usb gpiosBartosz Golaszewski1-0/+10
Add lookup entries for the vbus and overcurrent gpios for omapl138-hawk. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-12usb: ohci-da8xx: add a helper pointer to &pdev->devBartosz Golaszewski1-9/+9
Add a helper pointer to &pdev->dev. This improves readability by removing all the &pdev->dev dereferencing. Signed-off-by: Bartosz Golaszewski <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-12usb: ohci-da8xx: add a new line after local variablesBartosz Golaszewski1-0/+1
Add a new line after local variables. This improves the coding style. Signed-off-by: Bartosz Golaszewski <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-02-08ARM: davinci: da850-evm: use GPIO hogs instead of the legacy APIBartosz Golaszewski1-8/+14
In order to drop the hard-coded GPIO base values from the davinci GPIO driver's platform data, we first need to get rid of all calls to the legacy GPIO functions. Convert the mdio configuration to hogging the relevant GPIO line in the da850-evm board file. Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-01-10ARM: davinci: mityomapl138: use device properties for at24 eepromBartosz Golaszewski1-6/+6
We want to work towards phasing out the at24_platform_data structure. There are few users and its contents can be represented using generic device properties. Using device properties only will allow us to significantly simplify the at24 configuration code. Remove the at24_platform_data structure and replace it with an array of property entries. Drop the byte_len/size property, as the model name already implies the EEPROM's size. Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-01-10ARM: davinci: mityomapl138: use nvmem notifiersBartosz Golaszewski1-3/+15
Stop using the at24_platform_data setup callback in favor of nvmem notifiers. Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-01-10ARM: davinci: remove dead code related to MAC address readingBartosz Golaszewski2-16/+0
There are no more users of davinci_get_mac_addr(). Remove it. Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-01-10ARM: davinci: sffsdr: use device properties for at24 eepromBartosz Golaszewski1-6/+5
We want to work towards phasing out the at24_platform_data structure. There are few users and its contents can be represented using generic device properties. Using device properties only will allow us to significantly simplify the at24 configuration code. Remove the at24_platform_data structure and replace it with an array of property entries. Drop the byte_len/size property, as the model name already implies the EEPROM's size. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-01-10ARM: davinci: sffsdr: fix the at24 eeprom device nameBartosz Golaszewski1-1/+1
The currently used 24lc64 i2c device name doesn't match against any of the devices supported by the at24 driver. Change it to the closest compatible chip. Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-01-10ARM: davinci: dm646x-evm: use device properties for at24 eepromBartosz Golaszewski1-8/+5
We want to work towards phasing out the at24_platform_data structure. There are few users and its contents can be represented using generic device properties. Using device properties only will allow us to significantly simplify the at24 configuration code. Remove the at24_platform_data structure and replace it with an array of property entries. Drop the byte_len/size property, as the model name already implies the EEPROM's size. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-01-10ARM: davinci: dm644x-evm: use device properties for at24 eepromBartosz Golaszewski1-8/+5
We want to work towards phasing out the at24_platform_data structure. There are few users and its contents can be represented using generic device properties. Using device properties only will allow us to significantly simplify the at24 configuration code. Remove the at24_platform_data structure and replace it with an array of property entries. Drop the byte_len/size property, as the model name already implies the EEPROM's size. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>
2019-01-10ARM: davinci: da830-evm: use device properties for at24 eepromBartosz Golaszewski1-8/+5
We want to work towards phasing out the at24_platform_data structure. There are few users and its contents can be represented using generic device properties. Using device properties only will allow us to significantly simplify the at24 configuration code. Remove the at24_platform_data structure and replace it with an array of property entries. Drop the byte_len/size property, as the model name already implies the EEPROM's size. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Sekhar Nori <[email protected]>