Commit graph

23 commits

Author SHA1 Message Date
Max Filippov 644b213ccc xtensa: configure shared DMA pool reservation in kc705 DTS
Add example 64MByte long reservation in the first 512MBytes of physical
memory used as shared DMA pool.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2016-12-15 10:41:50 -08:00
Max Filippov 205ad548a7 xtensa: rearrange CCOUNT calibration
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-20 18:52:59 -07:00
Max Filippov 58c3e3ac7a xtensa: xtfpga: use clock provider, don't update DT
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-20 18:52:51 -07:00
Scott Telford bebbc4bcf3 xtensa: Tweak xuartps UART driver Rx watermark for Cadence CSP config.
Add module parameter xilinx_uartps.rx_trigger_level=32 to command line
options for CSP to set Rx watermark for xuartps driver lower than the
default value, to avoid UART overruns at 115200 bps.

Signed-off-by: Scott Telford <stelford@cadence.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2016-09-19 11:51:32 -07:00
Scott Telford 23c2b9321b xtensa: Added Cadence CSP kernel configuration for Xtensa
Added defconfig, device tree and Xtensa variant header files for the
Cadence Configurable System Platform "xt_lnx" processor configuration.

Signed-off-by: Scott Telford <stelford@cadence.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2016-09-09 18:39:09 -07:00
Max Filippov 56b9f9d672 xtensa: xtfpga: fix earlycon endianness
Serial port is attached to XTFPGA boards as native endian device, now
that earlycon parameter parser understands mmio32native put it into
earlycon kernel parameter. This makes early console functional on both
little- and big-endian CPUs with identical kernel command lines.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2016-03-11 08:53:32 +00:00
Max Filippov bce299ca54 xtensa: xtfpga: fix i2c controller register width and endianness
I2C controller is attached to XTFPGA boards as native endian device, mark
it as such in DTS.
Set register width in DTS to 4, this way it works both for little- and
big-endian CPUs.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2016-03-11 08:53:32 +00:00
Max Filippov d99434e176 xtensa: xtfpga: fix ethernet controller endianness
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-11 08:53:31 +00:00
Max Filippov abfbd89595 xtensa: xtfpga: fix serial port register width and endianness
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>
2016-03-11 08:53:31 +00:00
Linus Torvalds 3510ca19a8 Xtensa patchset for 4.4
- fix remaining issues with noMMU cores;
 - fix build for cores w/o cache or zero overhead loop options;
 - fix boot of secondary cores in SMP configuration;
 - add support for DMA to high memory pages;
 - add dma_to_phys and phys_to_dma functions.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWQBeJAAoJEI9vqH3mFV2sOHQP/Rdx8pOmGWrVuRFJWA4D4teM
 q6kQb+slf7UTLCYFIpFfnzf3dOtYpo0rioJcScj9hE+r/UW5ytbzouId/cEDVTrL
 s/SujGVkMa85vCNI7StseRB3MvlhF0dXbXBfIaPEAJ+OSTy8u17jXKrkcE4L17rV
 q/opv4bx8eY2LURITQPvZbYsGcb7+spdAZYfEcacnB0AB7FeCTNdWy6evRNivLvX
 5z4a3yq549UiU/F+2Q7Ofrx+ZZ9etL2D31FYD6naztwU0zfUPFxm3b58P7MZwveZ
 beBMuvlzRE7qccZn9SGUAp5kDgoCpWRz3zFob9vwLFuuBioYocvXnVMUYRbTpqM9
 5KUaxjV8K2pb8nvutYQFtqG6KvrY8Bjb+yepfOOR5B8483RIJh2H/dqSIRHtR0Eb
 NJL1Wog3n8bvxtOrymvg4B1L1PHmIV/v0iz6qaGW8DKA8AAdOG3u/a7NZ2v4q8ct
 DHVewduftUOgqWoponFIiwGLzVFwaDhEUsBCM4M4PVpgqZbBou7yyMenl7aMcZla
 HUMWeFlOQ0qUEvpINN07DzfDKL5gcfAz6OHOmKtoPxC8P5GlM1F8X5IaDAPEkqoj
 AnjNuVjCLTheQHaEUxzt6RMfdNSvV9g0muTRrMnqkQFUXVICoBBMsKWsNkwcv7JN
 oZaNJZhbc1enAniTUGVZ
 =iNoG
 -----END PGP SIGNATURE-----

Merge tag 'xtensa-20151108' of git://github.com/czankel/xtensa-linux

Pull xtensa updates from Chris Zankel:

 - fix remaining issues with noMMU cores
 - fix build for cores w/o cache or zero overhead loop options
 - fix boot of secondary cores in SMP configuration
 - add support for DMA to high memory pages
 - add dma_to_phys and phys_to_dma functions.

* tag 'xtensa-20151108' of git://github.com/czankel/xtensa-linux:
  xtensa: implement dma_to_phys and phys_to_dma
  xtensa: support DMA to high memory
  Revert "xtensa: cache inquiry and unaligned cache handling functions"
  xtensa: drop unused sections and remapped reset handlers
  xtensa: fix secondary core boot in SMP
  xtensa: add FORCE_MAX_ZONEORDER to Kconfig
  xtensa: nommu: provide defconfig for de212 on kc705
  xtensa: nommu: xtfpga: add kc705 DTS
  xtensa: add de212 core variant
  xtensa: nommu: select HAVE_FUTEX_CMPXCHG
  xtensa: nommu: fix default memory start address
  xtensa: nommu: provide correct KIO addresses
  xtensa: nommu: fix USER_RING definition
  xtensa: xtfpga: fix integer overflow in TASK_SIZE
  xtensa: fix build for configs without cache options
  xtensa: fixes for configs without loop option
2015-11-09 16:32:13 -08:00
Max Filippov adbd75edee xtensa: nommu: xtfpga: add kc705 DTS
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2015-11-02 18:03:11 +03:00
Rob Herring 990857042f xtensa: enable building of all dtbs
Enable building all dtb files when CONFIG_OF_ALL_DTBS is enabled. The dtbs
are not really dependent on a platform being enabled or any other kernel
config, so for testing coverage it is convenient to build all of the dtbs.
This builds all dts files in the tree, not just targets listed.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: linux-xtensa@linux-xtensa.org
2015-10-27 16:12:16 -05:00
Max Filippov c2c62e61fb xtensa: xtfpga: add audio card to xtfpga DTS
This includes OpenCores I2C host controller, TI CDCE706 clock generator,
xtfpga I2S master controller, xtfpga SPI master controller, TI TLV320AIC23
audio codec and a simple audio card.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2015-02-07 11:21:39 +03:00
Max Filippov 3ce2ce1c0d xtensa: xtfpga: add lx200 SMP DTS and defconfig
This config allows running SMP-enabled bitstream on LX200 board.
NFS or FLASH rootfs, minimal debug, up to 4 cores.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-10-21 13:28:43 +04:00
Max Filippov b82837c772 xtensa: configure kc705 for highmem
Enable all memory available on KC705 (1G - 128M) by default. Update memory
node in DTS and also limit usable memory in bootargs in case memmap is
passed from the bootloader.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-08-14 11:59:25 +04:00
Max Filippov 9c602629e3 xtensa: add support for KC705
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-04-06 21:32:02 +04:00
Max Filippov 08a7bbf624 xtensa: xtfpga: introduce SoC I/O bus
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-04-06 21:32:02 +04:00
Max Filippov 2bc2fde638 xtensa: xtfpga: set ethoc clock frequency
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-21 21:33:44 +04:00
Max Filippov cdc9af7ccf xtensa: xtfpga: use common clock framework
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-02-21 21:33:43 +04:00
Baruch Siach 42beb7628e xtensa: standardize devicetree cpu compatible strings
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-15 00:21:25 +04:00
Max Filippov cbd1de2e8e xtensa: move built-in PIC to drivers/irqchip
Extract xtensa built-in interrupt controller implementation from
xtensa/kernel/irq.c and move it to other irqchips, providing way to
instantiate it from the device tree.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
2014-01-14 10:19:56 -08:00
Stephen Warren 2a02bc166d xtensa: use new common dtc rule
The current rules have the .dtb files build in a different directory
from the .dts files. This patch changes xtensa to use the generic dtb
rule which builds .dtb files in the same directory as the source .dts.

This requires moving parts of arch/xtensa/boot/Makefile into newly
created arch/xtensa/boot/dts/Makefile, and updating arch/xtensa/Makefile
to call the new Makefile.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
2013-02-23 19:12:52 -08:00
Max Filippov 5584b4da78 xtensa: add XTFPGA DTS
Add common XTFPGA parts as *.dtsi (base board, flash) and DTS for LX60
and for ML605.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
2012-12-18 21:10:24 -08:00