powerpc/8xx: move CPM1 related files from sysdev/ to platforms/8xx
Only 8xx selects CPM1 and related CONFIG options are already in platforms/8xx/Kconfig Move the related C files to platforms/8xx/. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> [mpe: Minor formatting fixes] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
22e9c88d48
commit
4128a89ac8
|
@ -3,6 +3,8 @@
|
|||
# Makefile for the PowerPC 8xx linux kernel.
|
||||
#
|
||||
obj-y += m8xx_setup.o machine_check.o pic.o
|
||||
obj-$(CONFIG_CPM1) += cpm1.o
|
||||
obj-$(CONFIG_UCODE_PATCH) += micropatch.o
|
||||
obj-$(CONFIG_MPC885ADS) += mpc885ads_setup.o
|
||||
obj-$(CONFIG_MPC86XADS) += mpc86xads_setup.o
|
||||
obj-$(CONFIG_PPC_EP88XC) += ep88xc.o
|
||||
|
|
|
@ -88,7 +88,8 @@ int cpm_get_irq(void)
|
|||
{
|
||||
int cpm_vec;
|
||||
|
||||
/* Get the vector by setting the ACK bit and then reading
|
||||
/*
|
||||
* Get the vector by setting the ACK bit and then reading
|
||||
* the register.
|
||||
*/
|
||||
out_be16(&cpic_reg->cpic_civr, 1);
|
||||
|
@ -108,7 +109,8 @@ static int cpm_pic_host_map(struct irq_domain *h, unsigned int virq,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* The CPM can generate the error interrupt when there is a race condition
|
||||
/*
|
||||
* The CPM can generate the error interrupt when there is a race condition
|
||||
* between generating and masking interrupts. All we have to do is ACK it
|
||||
* and return. This is a no-op function so we don't need any special
|
||||
* tests in the interrupt handler.
|
||||
|
@ -208,12 +210,10 @@ void __init cpm_reset(void)
|
|||
cpmp = &mpc8xx_immr->im_cpm;
|
||||
|
||||
#ifndef CONFIG_PPC_EARLY_DEBUG_CPM
|
||||
/* Perform a reset.
|
||||
*/
|
||||
/* Perform a reset. */
|
||||
out_be16(&cpmp->cp_cpcr, CPM_CR_RST | CPM_CR_FLG);
|
||||
|
||||
/* Wait for it.
|
||||
*/
|
||||
/* Wait for it. */
|
||||
while (in_be16(&cpmp->cp_cpcr) & CPM_CR_FLG);
|
||||
#endif
|
||||
|
||||
|
@ -221,7 +221,8 @@ void __init cpm_reset(void)
|
|||
cpm_load_patch(cpmp);
|
||||
#endif
|
||||
|
||||
/* Set SDMA Bus Request priority 5.
|
||||
/*
|
||||
* Set SDMA Bus Request priority 5.
|
||||
* On 860T, this also enables FEC priority 6. I am not sure
|
||||
* this is what we really want for some applications, but the
|
||||
* manual recommends it.
|
||||
|
@ -263,7 +264,8 @@ out:
|
|||
}
|
||||
EXPORT_SYMBOL(cpm_command);
|
||||
|
||||
/* Set a baud rate generator. This needs lots of work. There are
|
||||
/*
|
||||
* Set a baud rate generator. This needs lots of work. There are
|
||||
* four BRGs, any of which can be wired to any channel.
|
||||
* The internal baud rate clock is the system clock divided by 16.
|
||||
* This assumes the baudrate is 16x oversampled by the uart.
|
||||
|
@ -277,11 +279,11 @@ cpm_setbrg(uint brg, uint rate)
|
|||
{
|
||||
u32 __iomem *bp;
|
||||
|
||||
/* This is good enough to get SMCs running.....
|
||||
*/
|
||||
/* This is good enough to get SMCs running..... */
|
||||
bp = &cpmp->cp_brgc1;
|
||||
bp += brg;
|
||||
/* The BRG has a 12-bit counter. For really slow baud rates (or
|
||||
/*
|
||||
* The BRG has a 12-bit counter. For really slow baud rates (or
|
||||
* really fast processors), we may have to further divide by 16.
|
||||
*/
|
||||
if (((BRG_UART_CLK / rate) - 1) < 4096)
|
|
@ -1,6 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
/* Microcode patches for the CPM as supplied by Motorola.
|
||||
/*
|
||||
* Microcode patches for the CPM as supplied by Motorola.
|
||||
* This is the one for IIC/SPI. There is a newer one that
|
||||
* also relocates SMC2, but this would require additional changes
|
||||
* to uart.c, so I am holding off on that for a moment.
|
|
@ -37,12 +37,10 @@ obj-$(CONFIG_XILINX_PCI) += xilinx_pci.o
|
|||
obj-$(CONFIG_OF_RTC) += of_rtc.o
|
||||
|
||||
obj-$(CONFIG_CPM) += cpm_common.o
|
||||
obj-$(CONFIG_CPM1) += cpm1.o
|
||||
obj-$(CONFIG_CPM2) += cpm2.o cpm2_pic.o cpm_gpio.o
|
||||
obj-$(CONFIG_8xx_GPIO) += cpm_gpio.o
|
||||
obj-$(CONFIG_QUICC_ENGINE) += cpm_common.o
|
||||
obj-$(CONFIG_PPC_DCR) += dcr.o
|
||||
obj-$(CONFIG_UCODE_PATCH) += micropatch.o
|
||||
|
||||
obj-$(CONFIG_PPC_MPC512x) += mpc5xxx_clocks.o
|
||||
obj-$(CONFIG_PPC_MPC52xx) += mpc5xxx_clocks.o
|
||||
|
|
Loading…
Reference in New Issue