Commit fe76bc84 authored by Steven Seeger's avatar Steven Seeger
Browse files

update drivers for ipipe

parent 568123f8
......@@ -3,6 +3,7 @@ menu "CPU Idle"
config CPU_IDLE
bool "CPU idle PM support"
default y if ACPI || PPC_PSERIES
depends on !(ARCH_OMAP4 && IPIPE)
select CPU_IDLE_GOV_LADDER if (!NO_HZ && !NO_HZ_IDLE)
select CPU_IDLE_GOV_MENU if (NO_HZ || NO_HZ_IDLE)
help
......
......@@ -20,6 +20,7 @@
#include <linux/of_platform.h>
#include <linux/slab.h>
#include <linux/irq.h>
#include <linux/ipipe.h>
#include <linux/gpio/driver.h>
#define MPC8XXX_GPIO_PINS 32
......@@ -104,8 +105,8 @@ static void mpc8xxx_gpio_irq_cascade(struct irq_desc *desc)
mask = gc->read_reg(mpc8xxx_gc->regs + GPIO_IER)
& gc->read_reg(mpc8xxx_gc->regs + GPIO_IMR);
if (mask)
generic_handle_irq(irq_linear_revmap(mpc8xxx_gc->irq,
32 - ffs(mask)));
ipipe_handle_demuxed_irq(irq_linear_revmap(mpc8xxx_gc->irq,
32 - ffs(mask)));
if (chip->irq_eoi)
chip->irq_eoi(&desc->irq_data);
}
......
......@@ -158,7 +158,7 @@ void panic_if_irq_remap(const char *msg)
void ir_ack_apic_edge(struct irq_data *data)
{
ack_APIC_irq();
__ack_APIC_irq();
}
/**
......
......@@ -628,6 +628,9 @@ static void mpc52xx_fec_hw_init(struct net_device *dev)
* this can't be done in phy driver, since it needs to be called
* before fec stuff (even on resume) */
out_be32(&fec->mii_speed, priv->mdio_speed);
/* Clear any outstanding interrupt. */
out_be32(&fec->ievent, 0xffffffff);
}
/**
......@@ -675,9 +678,6 @@ static void mpc52xx_fec_start(struct net_device *dev)
out_be32(&fec->r_cntrl, rcntrl);
out_be32(&fec->x_cntrl, tcntrl);
/* Clear any outstanding interrupt. */
out_be32(&fec->ievent, 0xffffffff);
/* Enable interrupts we wish to service. */
out_be32(&fec->imask, FEC_IMASK_ENABLE);
......@@ -701,6 +701,9 @@ static void mpc52xx_fec_stop(struct net_device *dev)
/* disable all interrupts */
out_be32(&fec->imask, 0);
/* Clear any outstanding interrupt. */
out_be32(&fec->ievent, 0xffffffff);
/* Disable the rx task. */
bcom_disable(priv->rx_dmatsk);
......
......@@ -32,7 +32,7 @@
#include "qe_ic.h"
static DEFINE_RAW_SPINLOCK(qe_ic_lock);
static IPIPE_DEFINE_RAW_SPINLOCK(qe_ic_lock);
static struct qe_ic_info qe_ic_info[] = {
[1] = {
......
......@@ -633,7 +633,7 @@ static void univ8250_console_write_raw(struct console *co, const char *s,
raw_write_char(up, '\r');
raw_write_char(up, *s++);
}
serial_out(up, UART_IER, ier);
}
......
......@@ -237,7 +237,7 @@ static int mpc52xx_psc_tx_rdy(struct uart_port *port)
& MPC52xx_PSC_IMR_TXRDY;
}
static int mpc52xx_psc_tx_empty(struct uart_port *port)
static notrace int mpc52xx_psc_tx_empty(struct uart_port *port)
{
u16 sts = in_be16(&PSC(port)->mpc52xx_psc_status);
......@@ -270,7 +270,7 @@ static void mpc52xx_psc_tx_clr_irq(struct uart_port *port)
{
}
static void mpc52xx_psc_write_char(struct uart_port *port, unsigned char c)
static notrace void mpc52xx_psc_write_char(struct uart_port *port, unsigned char c)
{
out_8(&PSC(port)->mpc52xx_psc_buffer_8, c);
}
......@@ -467,7 +467,7 @@ static int mpc512x_psc_tx_rdy(struct uart_port *port)
& MPC512x_PSC_FIFO_ALARM;
}
static int mpc512x_psc_tx_empty(struct uart_port *port)
static notrace int mpc512x_psc_tx_empty(struct uart_port *port)
{
return in_be32(&FIFO_512x(port)->txsr)
& MPC512x_PSC_FIFO_EMPTY;
......@@ -510,7 +510,7 @@ static void mpc512x_psc_tx_clr_irq(struct uart_port *port)
out_be32(&FIFO_512x(port)->txisr, in_be32(&FIFO_512x(port)->txisr));
}
static void mpc512x_psc_write_char(struct uart_port *port, unsigned char c)
static notrace void mpc512x_psc_write_char(struct uart_port *port, unsigned char c)
{
out_8(&FIFO_512x(port)->txdata_8, c);
}
......@@ -809,7 +809,7 @@ static int mpc5125_psc_tx_rdy(struct uart_port *port)
in_be32(&FIFO_5125(port)->tximr) & MPC512x_PSC_FIFO_ALARM;
}
static int mpc5125_psc_tx_empty(struct uart_port *port)
static notrace int mpc5125_psc_tx_empty(struct uart_port *port)
{
return in_be32(&FIFO_5125(port)->txsr) & MPC512x_PSC_FIFO_EMPTY;
}
......@@ -851,7 +851,7 @@ static void mpc5125_psc_tx_clr_irq(struct uart_port *port)
out_be32(&FIFO_5125(port)->txisr, in_be32(&FIFO_5125(port)->txisr));
}
static void mpc5125_psc_write_char(struct uart_port *port, unsigned char c)
static notrace void mpc5125_psc_write_char(struct uart_port *port, unsigned char c)
{
out_8(&FIFO_5125(port)->txdata_8, c);
}
......@@ -1047,7 +1047,7 @@ static const struct psc_ops *psc_ops;
/* UART operations */
/* ======================================================================== */
static unsigned int
static notrace unsigned int
mpc52xx_uart_tx_empty(struct uart_port *port)
{
return psc_ops->tx_empty(port) ? TIOCSER_TEMT : 0;
......@@ -1606,6 +1606,19 @@ mpc52xx_console_write(struct console *co, const char *s, unsigned int count)
psc_ops->cw_restore_ints(port);
}
#ifdef CONFIG_RAW_PRINTK
static void mpc52xx_console_write_raw(struct console *co,
const char *s, unsigned int count)
{
struct uart_port *port = &mpc52xx_uart_ports[co->index];
while (count-- > 0) {
if (*s == '\n')
psc_ops->write_char(port, '\r');
psc_ops->write_char(port, *s++);
}
}
#endif
static int __init
mpc52xx_console_setup(struct console *co, char *options)
......@@ -1686,7 +1699,12 @@ static struct console mpc52xx_console = {
.write = mpc52xx_console_write,
.device = uart_console_device,
.setup = mpc52xx_console_setup,
#ifdef CONFIG_RAW_PRINTK
.write_raw = mpc52xx_console_write_raw,
.flags = CON_PRINTBUFFER | CON_RAW,
#else
.flags = CON_PRINTBUFFER,
#endif
.index = -1, /* Specified on the cmdline (e.g. console=ttyPSC0) */
.data = &mpc52xx_uart_driver,
};
......
......@@ -12,6 +12,7 @@
#include <linux/param.h>
#include <linux/spinlock.h>
#include <linux/timex.h>
#include <linux/ipipe_lock.h>
/* i8253A PIT registers */
#define PIT_MODE 0x43
......
......@@ -16,6 +16,7 @@
#define _ASM_POWERPC_QE_IC_H
#include <linux/irq.h>
#include <linux/ipipe.h>
struct device_node;
struct qe_ic;
......@@ -84,7 +85,7 @@ static inline void qe_ic_cascade_low_ipic(struct irq_desc *desc)
unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic);
if (cascade_irq != NO_IRQ)
generic_handle_irq(cascade_irq);
ipipe_handle_demuxed_irq(cascade_irq);
}
static inline void qe_ic_cascade_high_ipic(struct irq_desc *desc)
......@@ -93,7 +94,7 @@ static inline void qe_ic_cascade_high_ipic(struct irq_desc *desc)
unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic);
if (cascade_irq != NO_IRQ)
generic_handle_irq(cascade_irq);
ipipe_handle_demuxed_irq(cascade_irq);
}
static inline void qe_ic_cascade_low_mpic(struct irq_desc *desc)
......@@ -103,7 +104,7 @@ static inline void qe_ic_cascade_low_mpic(struct irq_desc *desc)
struct irq_chip *chip = irq_desc_get_chip(desc);
if (cascade_irq != NO_IRQ)
generic_handle_irq(cascade_irq);
ipipe_handle_demuxed_irq(cascade_irq);
chip->irq_eoi(&desc->irq_data);
}
......@@ -115,7 +116,7 @@ static inline void qe_ic_cascade_high_mpic(struct irq_desc *desc)
struct irq_chip *chip = irq_desc_get_chip(desc);
if (cascade_irq != NO_IRQ)
generic_handle_irq(cascade_irq);
ipipe_handle_demuxed_irq(cascade_irq);
chip->irq_eoi(&desc->irq_data);
}
......@@ -131,7 +132,7 @@ static inline void qe_ic_cascade_muxed_mpic(struct irq_desc *desc)
cascade_irq = qe_ic_get_low_irq(qe_ic);
if (cascade_irq != NO_IRQ)
generic_handle_irq(cascade_irq);
ipipe_handle_demuxed_irq(cascade_irq);
chip->irq_eoi(&desc->irq_data);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment