aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/platforms/xtfpga (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-06-05xtensa: don't use linux IRQ #0Max Filippov2-7/+9
Linux IRQ #0 is reserved for error reporting and may not be used. Increase NR_IRQS for one additional slot and increase irq_domain_add_legacy parameter first_irq value to 1, so that linux IRQ #0 is not associated with hardware IRQ #0 in legacy IRQ domains. Introduce macro XTENSA_PIC_LINUX_IRQ for static translation of xtensa PIC hardware IRQ # to linux IRQ #. Use this macro in XTFPGA platform data definitions. This fixes inability to use hardware IRQ #0 in configurations that don't use device tree and allows for non-identity mapping between linux IRQ # and hardware IRQ #. Cc: stable@vger.kernel.org Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2016-09-20xtensa: xtfpga: group platform_* functions togetherMax Filippov1-24/+22
Group platform_* functions together and turn two separate #ifdef/#ifndef blocks into single #ifdef/#else. No functional changes. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2016-09-20xtensa: rearrange CCOUNT calibrationMax Filippov1-38/+1
DT-enabled kernel should have a CPU node connected to a clock. This clock is the CCOUNT clock. Use old platform_calibrate_ccount call as a fallback when CPU node cannot be found or has no clock and in non-DT-enabled configurations. Drop no longer needed code that updates CPU clock-frequency property in the DT; drop DT-related code from the platform_calibrate_ccount too. Move of_clk_init to the top of time_init, so that clocks are initialized before CCOUNT calibration is attempted. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2016-09-20xtensa: xtfpga: use clock provider, don't update DTMax Filippov1-4/+29
Instead of querying hardcoded FPGA frequency register and then updating clock-frequency property in specificly named DT nodes in machine setup code register a clock provider that returns fixed-rate clock, configured by register specified in DT. This way we have less magic/hardcoded names and use more existing common clock framework code. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Tested-by: Guenter Roeck <linux@roeck-us.net>
2016-09-11xtensa: extract common CPU reset code into separate functionMax Filippov1-21/+1
platform_restart implementatations do the same thing to reset CPU. Don't duplicate that code, move it to a function and call it from platform_restart. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2016-03-11xtensa: xtfpga: fix ethernet controller endiannessMax Filippov1-0/+1
Ethernet controller is attached to XTFPGA boards as native endian device, mark it as such in DTS and pass correct endianness in platform data. This makes network functional on big-endian CPUs. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2016-03-11xtensa: xtfpga: fix serial port register width and endiannessMax Filippov1-1/+1
Serial port is attached to XTFPGA boards as native endian device, mark it as such in DTS and pass correct endianness in platform data. Set register width in DTS to 4, this way it matches the platform data and works correctly on big-endian CPUs. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2015-11-02xtensa: xtfpga: fix integer overflow in TASK_SIZEMax Filippov1-2/+4
This fixes the following warning when default memory region crosses 0x80000000: arch/xtensa/include/asm/processor.h:40:47: warning: integer overflow in expression [-Woverflow] #define TASK_SIZE (PLATFORM_DEFAULT_MEM_START + PLATFORM_DEFAULT_MEM_SIZE) ^ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2015-11-02xtensa: fixes for configs without loop optionMax Filippov1-0/+2
Build-time fixes: - make lbeg/lend/lcount save/restore conditional on kernel entry; - don't clear lcount in platform_restart functions unconditionally. Run-time fixes: - use correct end of range register in __endla paired with __loopt, not the unused temporary register. This fixes .bss zero-initialization. Update comments in asmmacro.h; - don't clobber a10 in the usercopy that leads to access to unmapped memory. Cc: <stable@vger.kernel.org> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2015-04-14Merge tag 'xtensa-for-next-20150413' of git://github.com/jcmvbkbc/linux-xtensa into for_nextChris Zankel2-0/+37
Xtensa improvements for 4.1: - fix locking issues in ISS network driver; - document PIC and MX interrupt distributor device tree bindings; - add CY7C67300 USB controller support to XTFPGA. Signed-off-by: Chris Zankel <chris@zankel.net>
2015-04-13xtensa: xtfpga: add CY7C67300 USB controller supportMax Filippov2-0/+37
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2015-02-27xtensa: xtfpga: fix hardware lockup caused by LCD driverMax Filippov4-25/+51
LCD driver is always built for the XTFPGA platform, but its base address is not configurable, and is wrong for ML605/KC705. Its initialization locks up KC705 board hardware. Make the whole driver optional, and its base address and bus width configurable. Implement 4-bit bus access method. Cc: stable@vger.kernel.org Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-10-21xtensa: make PLATFORM_DEFAULT_MEM parameters configurableMax Filippov1-2/+2
This allows using xtfpga platform with both MMU and noMMU cores. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-02-21xtensa: xtfpga: set ethoc clock frequencyMax Filippov1-0/+1
Connect xtfpga board ethernet MAC to the clock in the DTS. Set up MAC base frequency in the platform data in case of build w/o CONFIG_OF. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-02-21xtensa: xtfpga: use common clock frameworkMax Filippov1-3/+3
With this change the board needs to set up single clock object, users of this clock will get correct frequency automatically. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-01-15xtensa: xtfpga: fix definitions of platform devicesMax Filippov1-6/+6
Remove __initdata attribute, as the devices may be used after init sections are freed. Cc: stable@vger.kernel.org Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-01-15xtensa: standardize devicetree cpu compatible stringsBaruch Siach1-1/+1
The recommended compatible string format, according to the ePAPR v1.1 standard, is "manufacturer,model". Change the xtensa cpu compatible strings to "cdns,xtensa-cpu". Also, change the boards compatible strings in a similar way. The pic compatible string will be dealt with in a separate patch. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-01-14xtensa: add SMP supportMax Filippov1-1/+1
This is largely based on SMP code from the xtensa-2.6.29-smp tree by Piet Delaney, Marc Gauthier, Joe Taylor, Christian Zankel (and possibly other Tensilica folks). Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2014-01-14xtensa: remove NO_IRQ definitionsMax Filippov1-4/+0
These definitions (-1) were correct when used as a hardware IRQ number, but are incorrect as a mapped IRQ number. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2013-07-08xtensa: cleanup ccount frequency trackingBaruch Siach1-2/+1
Remove unused nsec_per_ccount, and rename ccount_per_jiffy to ccount_preq. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Chris Zankel <chris@zankel.net>
2013-06-05xtensa: xtfpga: fix section mismatchBaruch Siach1-1/+1
platform_calibrate_ccount() calls update_clock_frequency() which is in .init section. However, platform_calibrate_ccount() itself is only called from .init (i.e., time_init()). Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2013-05-09xtensa: fix ibreakenable register updateMax Filippov1-0/+2
Only set the register when there is at least one ibreak register, otherwise the build fails: arch/xtensa/kernel/head.S:105: Error: invalid register 'ibreakenable' for 'wsr' instruction arch/xtensa/platforms/iss/setup.c:67: Error: invalid register 'ibreakenable' for 'wsr' instruction Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2013-02-23xtensa: rename prom_update_property to of_update_propertyMax Filippov1-2/+2
This rename happened in 79d1c71 powerpc+of: Rename the drivers/of prom_* functions to of_*. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2012-12-18xtensa: set the correct ethernet address for xtfpgaChris Zankel1-2/+34
The last byte of the mac address is determined by a DIP switch, so update the OF property with that address. Signed-off-by: Chris Zankel <chris@zankel.net>
2012-12-18Use for_each_compatible_node() macro.Wei Yongjun1-2/+2
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
2012-12-18xtensa: add support for the XTFPGA boardsMax Filippov6-0/+461
The Avnet LX60/LX110/LX200 board is an FPGA board that can be configured with an Xtensa processor and an OpenCores Ethernet device. Signed-off-by: Chris Zankel <chris@zankel.net> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>