aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/512x/mpc512x_shared.c
AgeCommit message (Collapse)Author
2013-05-02Merge branch 'next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc Pull powerpc update from Benjamin Herrenschmidt: "The main highlights this time around are: - A pile of addition POWER8 bits and nits, such as updated performance counter support (Michael Ellerman), new branch history buffer support (Anshuman Khandual), base support for the new PCI host bridge when not using the hypervisor (Gavin Shan) and other random related bits and fixes from various contributors. - Some rework of our page table format by Aneesh Kumar which fixes a thing or two and paves the way for THP support. THP itself will not make it this time around however. - More Freescale updates, including Altivec support on the new e6500 cores, new PCI controller support, and a pile of new boards support and updates. - The usual batch of trivial cleanups & fixes" * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (156 commits) powerpc: Fix build error for book3e powerpc: Context switch the new EBB SPRs powerpc: Turn on the EBB H/FSCR bits powerpc: Replace CPU_FTR_BCTAR with CPU_FTR_ARCH_207S powerpc: Setup BHRB instructions facility in HFSCR for POWER8 powerpc: Fix interrupt range check on debug exception powerpc: Update tlbie/tlbiel as per ISA doc powerpc: Print page size info during boot powerpc: print both base and actual page size on hash failure powerpc: Fix hpte_decode to use the correct decoding for page sizes powerpc: Decode the pte-lp-encoding bits correctly. powerpc: Use encode avpn where we need only avpn values powerpc: Reduce PTE table memory wastage powerpc: Move the pte free routines from common header powerpc: Reduce the PTE_INDEX_SIZE powerpc: Switch 16GB and 16MB explicit hugepages to a different page table format powerpc: New hugepage directory format powerpc: Don't truncate pgd_index wrongly powerpc: Don't hard code the size of pte page powerpc: Save DAR and DSISR in pt_regs on MCE ...
2013-04-29mm/ppc: use common help functions to free reserved pagesJiang Liu
Use common help functions to free reserved pages. Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Anatolij Gustschin <agust@denx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-10powerpc/mpc512x: add platform code for MPC5125.Matteo Facchinetti
Tested on MPC5125 Tower evaluation board with mpc512x_defconfig compile configuration. In detail, supports for: - PSC / UART - RTC - ETH - DIU - I2C Signed-off-by: Matteo Facchinetti <matteo.facchinetti@sirius-es.it> Signed-off-by: Anatolij Gustschin <agust@denx.de>
2013-04-01powerpc/mpc512x: create SoC devices for more nodesAnatolij Gustschin
Create devices for mbx, sram, pci and gpio-leds nodes and also move nfc compatible to of_bus_id list for automatic nfc device creation. Signed-off-by: Anatolij Gustschin <agust@denx.de>
2013-02-20Merge remote-tracking branch 'agust/next' into nextBenjamin Herrenschmidt
<< Please pull mpc5xxx patches for v3.9. The bestcomm driver is moved to drivers/dma (so it will be usable for ColdFire). mpc5121 now provides common dtsi file and existing mpc5121 device trees use it. There are some minor clock init and sparse fixes and updates for various 5200 device tree files from Grant. Some fixes for bugs in the mpc5121 DIU driver are also included here (Andrew Morton suggested to push them via my mpc5xxx tree). >>
2013-02-15powerpc/fsl: remove extraneous DIU platform functionsTimur Tabi
The Freescale DIU driver was recently updated to not require every DIU platform function, so now we can remove the unneeded functions from some boards. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2013-02-04powerpc/512x: add function for chip select parameter configurationAnatolij Gustschin
Add ability to configure chip select (CS) parameters for devices that need different CS parameters setup after their configuration. I.e. an FPGA device on LP bus can require different CS parameters for its bus interface after loading firmware into it. A driver can easily reconfigure the LPC CS parameters using this function. Acked-by: Timur Tabi <timur@tabi.org> Signed-off-by: Anatolij Gustschin <agust@denx.de>
2013-01-29powerpc/512x: initialize clocks before bus probingAnatolij Gustschin
Early driver probing can fail due to not available clocks (clk_get() fails) since the clk API init didn't take place yet. Move clocks init before bus probing. Signed-off-by: Anatolij Gustschin <agust@denx.de>
2012-12-03powerpc/512x: don't compile any platform DIU code if the DIU is not enabledTimur Tabi
If the DIU framebuffer driver is not enabled, then there's no point in compiling any platform DIU code, because it will never be used. Most of the platform code was protected in the appropriate #ifdef, but not all. This caused a break in some randconfig builds. This is only a problem on the 512x platforms. The P1022DS and MPC8610HPCD platforms are already correct. This patch reverts commit 12e36309f8774f4ccc769d5e3ff11ef092e524bc ("powerpc: Option FB_FSL_DIU is not really optional for mpc512x") and restores the ability to configure DIU support. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
2012-09-09powerpc: Option FB_FSL_DIU is not really optional for mpc512xPaul Gortmaker
In powerpc randconfig builds, this keeps showing up: CC arch/powerpc/platforms/512x/mpc512x_shared.o arch/powerpc/platforms/512x/mpc512x_shared.c:70:9: warning: 'enum fsl_diu_monitor_port' declared inside parameter list arch/powerpc/platforms/512x/mpc512x_shared.c:70:9: warning: its scope is only this definition or declaration, which is probably not what you want arch/powerpc/platforms/512x/mpc512x_shared.c:69:56: error: parameter 1 ('port') has incomplete type arch/powerpc/platforms/512x/mpc512x_shared.c:69:5: warning: function declaration isn't a prototype arch/powerpc/platforms/512x/mpc512x_shared.c:84:9: warning: 'enum fsl_diu_monitor_port' declared inside parameter list arch/powerpc/platforms/512x/mpc512x_shared.c:83:56: error: parameter 1 ('port') has incomplete type arch/powerpc/platforms/512x/mpc512x_shared.c:83:6: warning: function declaration isn't a prototype arch/powerpc/platforms/512x/mpc512x_shared.c:88:36: warning: 'enum fsl_diu_monitor_port' declared inside parameter list arch/powerpc/platforms/512x/mpc512x_shared.c:88:57: error: parameter 1 ('port') has incomplete type arch/powerpc/platforms/512x/mpc512x_shared.c:88:6: warning: function declaration isn't a prototype arch/powerpc/platforms/512x/mpc512x_shared.c:187:54: error: parameter 1 ('port') has incomplete type arch/powerpc/platforms/512x/mpc512x_shared.c:187:1: error: return type is an incomplete type arch/powerpc/platforms/512x/mpc512x_shared.c:187:1: warning: function declaration isn't a prototype arch/powerpc/platforms/512x/mpc512x_shared.c: In function 'mpc512x_valid_monitor_port': arch/powerpc/platforms/512x/mpc512x_shared.c:189:9: error: 'FSL_DIU_PORT_DVI' undeclared (first use in this function) arch/powerpc/platforms/512x/mpc512x_shared.c:189:9: note: each undeclared identifier is reported only once for each function it appears in arch/powerpc/platforms/512x/mpc512x_shared.c:189:2: warning: 'return' with a value, in function returning void make[2]: *** [arch/powerpc/platforms/512x/mpc512x_shared.o] Error 1 The reason is that mpc512x_shared.c has a couple token #ifdef on FB_FSL_DIU/FB_FSL_DIU_MODULE, but they don't come close to masking all the DIU dependencies, as the above fail shows. Rather than sprinkle more pointless #ifdef in this file, just remove the existing two, and make FB_FSL_DIU part of the dependency. The mpc512x_defconfig already has the line "CONFIG_FB_FSL_DIU=y" so this change should be zero impact on real world configs. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-10-05drivers/video: fsl-diu-fb: only DIU modes 0 and 1 are supportedTimur Tabi
The Freescale DIU video controller supports five video "modes", but only the first two are used by the driver. The other three are special modes that don't make sense for a framebuffer driver. Therefore, there's no point in keeping a global variable that indicates which mode we're supposed to use. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2011-07-13drivers/video: use strings to specify the Freescale DIU monitor portTimur Tabi
Instead of using ill-defined numbers (0, 1, and 2) for the monitor port, allow the user to specify the port by name ("dvi", "lvds", or "dlvds"). This works on the kernel command line, the module command-line, and the sysfs "monitor" device. Note that changing the monitor port does not currently work on the P1022DS, because the code that talks to the PIXIS FPGA is broken. Signed-off-by: Timur Tabi <timur@freescale.com> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-08-01powerpc/5121: shared DIU framebuffer supportAnatolij Gustschin
MPC5121 DIU configuration/setup as initialized by the boot loader currently will get lost while booting Linux. As a result displaying the boot splash is not possible through the boot process. To prevent this we reserve configured DIU frame buffer address range while booting and preserve AOI descriptor and gamma table so that DIU continues displaying through the whole boot process. On first open from user space DIU frame buffer driver releases the reserved frame buffer area and continues to operate as usual. Signed-off-by: John Rigby <jcrigby@gmail.com> Signed-off-by: Anatolij Gustschin <agust@denx.de> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-05-25powerpc/mpc5121: move PSC FIFO memory init to platform codeAnatolij Gustschin
Since PSC could also be used in other modes than UART mode we move PSC FIFO memory initialization from serial driver to common platform code. The initialized FIFO memory slices may not overlap, so the most easy way would be to configure them all at once at init time for all PSC devices. This is now done by this patch. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-02-16powerpc/mpc5121: create and register NFC deviceAnatolij Gustschin
Instantiate NAND Flash Controller device if it's description is found in the device tree. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-02-16powerpc/mpc5121: Add machine restart supportAnatolij Gustschin
Add reset module registers representation and machine restart callback for mpc5121 platform. Signed-off-by: Piotr Ziecik <kosmo@semihalf.com> Signed-off-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Anatolij Gustschin <agust@denx.de> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-02-16powerpc/mpc5121: avoid using arch_initcall for clock initAnatolij Gustschin
Move mpc5121_clk_init() call to platform init code so it won't get called on non-5121 platforms on a multiplatform kernel. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2009-06-17powerpc/5xxx: Add common mpc5xxx_get_bus_frequency() functionWolfgang Denk
So far, MPC512x used mpc512x_find_ips_freq() to get the bus frequency, while MPC52xx used mpc52xx_find_ipb_freq(). Despite the different clock names (IPS vs. IPB) the code was identical. Use common code for both processor families. Signed-off-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2008-07-12powerpc/mpc5121: Add generic board support for MPC5121 platformsJohn Rigby
Move shared code from mpc5121_ads.c to new file mpc512x_shared.c - mpc512x_find_ips_freq -> unchanged - contents of mpc5121_ads_init_IRQ -> mpc512x_init_IRQ - looking for fsl,mpc5121-ipic instead of fsl,ipic - mpc5121_ads_declare_of_platform_devices -> mpc5121_declare_of_platform_devices - and use compatible for lookup instead of node name Add new generic board setup mpc5121_generic.c Signed-off-by: John Rigby <jrigby@freescale.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>