Commit 5ab3e84f authored by Paul Mackerras's avatar Paul Mackerras

Merge branch 'for-2.6.25' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx

parents 52b80482 256ae6a7
...@@ -57,6 +57,7 @@ Table of Contents ...@@ -57,6 +57,7 @@ Table of Contents
n) 4xx/Axon EMAC ethernet nodes n) 4xx/Axon EMAC ethernet nodes
o) Xilinx IP cores o) Xilinx IP cores
p) Freescale Synchronous Serial Interface p) Freescale Synchronous Serial Interface
q) USB EHCI controllers
VII - Specifying interrupt information for devices VII - Specifying interrupt information for devices
1) interrupts property 1) interrupts property
...@@ -2577,6 +2578,20 @@ platforms are moved over to use the flattened-device-tree model. ...@@ -2577,6 +2578,20 @@ platforms are moved over to use the flattened-device-tree model.
Requred properties: Requred properties:
- current-speed : Baud rate of uartlite - current-speed : Baud rate of uartlite
v) Xilinx hwicap
Xilinx hwicap devices provide access to the configuration logic
of the FPGA through the Internal Configuration Access Port
(ICAP). The ICAP enables partial reconfiguration of the FPGA,
readback of the configuration information, and some control over
'warm boots' of the FPGA fabric.
Required properties:
- xlnx,family : The family of the FPGA, necessary since the
capabilities of the underlying ICAP hardware
differ between different families. May be
'virtex2p', 'virtex4', or 'virtex5'.
p) Freescale Synchronous Serial Interface p) Freescale Synchronous Serial Interface
The SSI is a serial device that communicates with audio codecs. It can The SSI is a serial device that communicates with audio codecs. It can
...@@ -2775,6 +2790,33 @@ platforms are moved over to use the flattened-device-tree model. ...@@ -2775,6 +2790,33 @@ platforms are moved over to use the flattened-device-tree model.
interrupt-parent = < &ipic >; interrupt-parent = < &ipic >;
}; };
q) USB EHCI controllers
Required properties:
- compatible : should be "usb-ehci".
- reg : should contain at least address and length of the standard EHCI
register set for the device. Optional platform-dependent registers
(debug-port or other) can be also specified here, but only after
definition of standard EHCI registers.
- interrupts : one EHCI interrupt should be described here.
If device registers are implemented in big endian mode, the device
node should have "big-endian-regs" property.
If controller implementation operates with big endian descriptors,
"big-endian-desc" property should be specified.
If both big endian registers and descriptors are used by the controller
implementation, "big-endian" property can be specified instead of having
both "big-endian-regs" and "big-endian-desc".
Example (Sequoia 440EPx):
ehci@e0000300 {
compatible = "ibm,usb-ehci-440epx", "usb-ehci";
interrupt-parent = <&UIC0>;
interrupts = <1a 4>;
reg = <0 e0000300 90 0 e0000390 70>;
big-endian;
};
More devices will be defined as this spec matures. More devices will be defined as this spec matures.
VII - Specifying interrupt information for devices VII - Specifying interrupt information for devices
......
...@@ -138,6 +138,14 @@ USB1: usb@e0000400 { ...@@ -138,6 +138,14 @@ USB1: usb@e0000400 {
interrupts = <15 8>; interrupts = <15 8>;
}; };
USB0: ehci@e0000300 {
compatible = "ibm,usb-ehci-440epx", "usb-ehci";
interrupt-parent = <&UIC0>;
interrupts = <1a 4>;
reg = <0 e0000300 90 0 e0000390 70>;
big-endian;
};
POB0: opb { POB0: opb {
compatible = "ibm,opb-440epx", "ibm,opb"; compatible = "ibm,opb-440epx", "ibm,opb";
#address-cells = <1>; #address-cells = <1>;
......
...@@ -72,6 +72,7 @@ config WALNUT ...@@ -72,6 +72,7 @@ config WALNUT
default y default y
select 405GP select 405GP
select PCI select PCI
select OF_RTC
help help
This option enables support for the IBM PPC405GP evaluation board. This option enables support for the IBM PPC405GP evaluation board.
......
...@@ -37,7 +37,7 @@ static int __init virtex_probe(void) ...@@ -37,7 +37,7 @@ static int __init virtex_probe(void)
{ {
unsigned long root = of_get_flat_dt_root(); unsigned long root = of_get_flat_dt_root();
if (!of_flat_dt_is_compatible(root, "xilinx,virtex")) if (!of_flat_dt_is_compatible(root, "xlnx,virtex"))
return 0; return 0;
return 1; return 1;
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/rtc.h>
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/prom.h> #include <asm/prom.h>
......
...@@ -137,7 +137,7 @@ static int __init pika_dtm_start(void) ...@@ -137,7 +137,7 @@ static int __init pika_dtm_start(void)
} }
of_node_put(np); of_node_put(np);
fpga = ioremap(res.start + 0x20, 4); fpga = ioremap(res.start, 0x24);
if (fpga == NULL) if (fpga == NULL)
return -ENOENT; return -ENOENT;
......
...@@ -137,5 +137,6 @@ void dcr_unmap(dcr_host_t host, unsigned int dcr_c) ...@@ -137,5 +137,6 @@ void dcr_unmap(dcr_host_t host, unsigned int dcr_c)
h.token = NULL; h.token = NULL;
} }
EXPORT_SYMBOL_GPL(dcr_unmap); EXPORT_SYMBOL_GPL(dcr_unmap);
#else /* defined(CONFIG_PPC_DCR_NATIVE) */
DEFINE_SPINLOCK(dcr_ind_lock);
#endif /* !defined(CONFIG_PPC_DCR_NATIVE) */ #endif /* !defined(CONFIG_PPC_DCR_NATIVE) */
...@@ -1202,8 +1202,10 @@ static int __devexit ace_of_remove(struct of_device *op) ...@@ -1202,8 +1202,10 @@ static int __devexit ace_of_remove(struct of_device *op)
} }
/* Match table for of_platform binding */ /* Match table for of_platform binding */
static struct of_device_id __devinit ace_of_match[] = { static struct of_device_id ace_of_match[] __devinitdata = {
{ .compatible = "xilinx,xsysace", }, { .compatible = "xlnx,opb-sysace-1.00.b", },
{ .compatible = "xlnx,opb-sysace-1.00.c", },
{ .compatible = "xlnx,xps-sysace-1.00.a", },
{}, {},
}; };
MODULE_DEVICE_TABLE(of, ace_of_match); MODULE_DEVICE_TABLE(of, ace_of_match);
......
...@@ -841,6 +841,16 @@ config DTLK ...@@ -841,6 +841,16 @@ config DTLK
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called dtlk. module will be called dtlk.
config XILINX_HWICAP
tristate "Xilinx HWICAP Support"
depends on XILINX_VIRTEX
help
This option enables support for Xilinx Internal Configuration
Access Port (ICAP) driver. The ICAP is used on Xilinx Virtex
FPGA platforms to partially reconfigure the FPGA at runtime.
If unsure, say N.
config R3964 config R3964
tristate "Siemens R3964 line discipline" tristate "Siemens R3964 line discipline"
---help--- ---help---
......
...@@ -77,6 +77,7 @@ obj-$(CONFIG_EFI_RTC) += efirtc.o ...@@ -77,6 +77,7 @@ obj-$(CONFIG_EFI_RTC) += efirtc.o
obj-$(CONFIG_SGI_DS1286) += ds1286.o obj-$(CONFIG_SGI_DS1286) += ds1286.o
obj-$(CONFIG_SGI_IP27_RTC) += ip27-rtc.o obj-$(CONFIG_SGI_IP27_RTC) += ip27-rtc.o
obj-$(CONFIG_DS1302) += ds1302.o obj-$(CONFIG_DS1302) += ds1302.o
obj-$(CONFIG_XILINX_HWICAP) += xilinx_hwicap/
ifeq ($(CONFIG_GENERIC_NVRAM),y) ifeq ($(CONFIG_GENERIC_NVRAM),y)
obj-$(CONFIG_NVRAM) += generic_nvram.o obj-$(CONFIG_NVRAM) += generic_nvram.o
else else
......
#
# Makefile for the Xilinx OPB hwicap driver
#
obj-$(CONFIG_XILINX_HWICAP) += xilinx_hwicap_m.o
xilinx_hwicap_m-y := xilinx_hwicap.o fifo_icap.o buffer_icap.o
This diff is collapsed.
/*****************************************************************************
*
* Author: Xilinx, Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS"
* AS A COURTESY TO YOU, SOLELY FOR USE IN DEVELOPING PROGRAMS AND
* SOLUTIONS FOR XILINX DEVICES. BY PROVIDING THIS DESIGN, CODE,
* OR INFORMATION AS ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE,
* APPLICATION OR STANDARD, XILINX IS MAKING NO REPRESENTATION
* THAT THIS IMPLEMENTATION IS FREE FROM ANY CLAIMS OF INFRINGEMENT,
* AND YOU ARE RESPONSIBLE FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE
* FOR YOUR IMPLEMENTATION. XILINX EXPRESSLY DISCLAIMS ANY
* WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE
* IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR
* REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
* INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE.
*
* Xilinx products are not intended for use in life support appliances,
* devices, or systems. Use in such applications is expressly prohibited.
*
* (c) Copyright 2003-2008 Xilinx Inc.
* All rights reserved.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*
*****************************************************************************/
#ifndef XILINX_BUFFER_ICAP_H_ /* prevent circular inclusions */
#define XILINX_BUFFER_ICAP_H_ /* by using protection macros */
#include <linux/types.h>
#include <linux/cdev.h>
#include <linux/version.h>
#include <linux/platform_device.h>
#include <asm/io.h>
#include "xilinx_hwicap.h"
void buffer_icap_reset(struct hwicap_drvdata *drvdata);
/* Loads a partial bitstream from system memory. */
int buffer_icap_set_configuration(struct hwicap_drvdata *drvdata, u32 *data,
u32 Size);
/* Loads a partial bitstream from system memory. */
int buffer_icap_get_configuration(struct hwicap_drvdata *drvdata, u32 *data,
u32 Size);
#endif
This diff is collapsed.
/*****************************************************************************
*
* Author: Xilinx, Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS"
* AS A COURTESY TO YOU, SOLELY FOR USE IN DEVELOPING PROGRAMS AND
* SOLUTIONS FOR XILINX DEVICES. BY PROVIDING THIS DESIGN, CODE,
* OR INFORMATION AS ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE,
* APPLICATION OR STANDARD, XILINX IS MAKING NO REPRESENTATION
* THAT THIS IMPLEMENTATION IS FREE FROM ANY CLAIMS OF INFRINGEMENT,
* AND YOU ARE RESPONSIBLE FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE
* FOR YOUR IMPLEMENTATION. XILINX EXPRESSLY DISCLAIMS ANY
* WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE
* IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR
* REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
* INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE.
*
* Xilinx products are not intended for use in life support appliances,
* devices, or systems. Use in such applications is expressly prohibited.
*
* (c) Copyright 2007-2008 Xilinx Inc.
* All rights reserved.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*
*****************************************************************************/
#ifndef XILINX_FIFO_ICAP_H_ /* prevent circular inclusions */
#define XILINX_FIFO_ICAP_H_ /* by using protection macros */
#include <linux/types.h>
#include <linux/cdev.h>
#include <linux/version.h>
#include <linux/platform_device.h>
#include <asm/io.h>
#include "xilinx_hwicap.h"
/* Reads integers from the device into the storage buffer. */
int fifo_icap_get_configuration(
struct hwicap_drvdata *drvdata,
u32 *FrameBuffer,
u32 NumWords);
/* Writes integers to the device from the storage buffer. */
int fifo_icap_set_configuration(
struct hwicap_drvdata *drvdata,
u32 *FrameBuffer,
u32 NumWords);
void fifo_icap_reset(struct hwicap_drvdata *drvdata);
void fifo_icap_flush_fifo(struct hwicap_drvdata *drvdata);
#endif
This diff is collapsed.
/*****************************************************************************
*
* Author: Xilinx, Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS"
* AS A COURTESY TO YOU, SOLELY FOR USE IN DEVELOPING PROGRAMS AND
* SOLUTIONS FOR XILINX DEVICES. BY PROVIDING THIS DESIGN, CODE,
* OR INFORMATION AS ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE,
* APPLICATION OR STANDARD, XILINX IS MAKING NO REPRESENTATION
* THAT THIS IMPLEMENTATION IS FREE FROM ANY CLAIMS OF INFRINGEMENT,
* AND YOU ARE RESPONSIBLE FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE
* FOR YOUR IMPLEMENTATION. XILINX EXPRESSLY DISCLAIMS ANY
* WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE
* IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR
* REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
* INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE.
*
* Xilinx products are not intended for use in life support appliances,
* devices, or systems. Use in such applications is expressly prohibited.
*
* (c) Copyright 2003-2007 Xilinx Inc.
* All rights reserved.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*
*****************************************************************************/
#ifndef XILINX_HWICAP_H_ /* prevent circular inclusions */
#define XILINX_HWICAP_H_ /* by using protection macros */
#include <linux/types.h>
#include <linux/cdev.h>
#include <linux/version.h>
#include <linux/platform_device.h>
#include <asm/io.h>
struct hwicap_drvdata {
u32 write_buffer_in_use; /* Always in [0,3] */
u8 write_buffer[4];
u32 read_buffer_in_use; /* Always in [0,3] */
u8 read_buffer[4];
u32 mem_start; /* phys. address of the control registers */
u32 mem_end; /* phys. address of the control registers */
u32 mem_size;
void __iomem *base_address;/* virt. address of the control registers */
struct device *dev;
struct cdev cdev; /* Char device structure */
dev_t devt;
const struct hwicap_driver_config *config;
const struct config_registers *config_regs;
void *private_data;
bool is_open;
struct semaphore sem;
};
struct hwicap_driver_config {
int (*get_configuration)(struct hwicap_drvdata *drvdata, u32 *data,
u32 size);
int (*set_configuration)(struct hwicap_drvdata *drvdata, u32 *data,
u32 size);
void (*reset)(struct hwicap_drvdata *drvdata);
};
/* Number of times to poll the done regsiter */
#define XHI_MAX_RETRIES 10
/************ Constant Definitions *************/
#define XHI_PAD_FRAMES 0x1
/* Mask for calculating configuration packet headers */
#define XHI_WORD_COUNT_MASK_TYPE_1 0x7FFUL
#define XHI_WORD_COUNT_MASK_TYPE_2 0x1FFFFFUL
#define XHI_TYPE_MASK 0x7
#define XHI_REGISTER_MASK 0xF
#define XHI_OP_MASK 0x3
#define XHI_TYPE_SHIFT 29
#define XHI_REGISTER_SHIFT 13
#define XHI_OP_SHIFT 27
#define XHI_TYPE_1 1
#define XHI_TYPE_2 2
#define XHI_OP_WRITE 2
#define XHI_OP_READ 1
/* Address Block Types */
#define XHI_FAR_CLB_BLOCK 0
#define XHI_FAR_BRAM_BLOCK 1
#define XHI_FAR_BRAM_INT_BLOCK 2
struct config_registers {
u32 CRC;
u32 FAR;
u32 FDRI;
u32 FDRO;
u32 CMD;
u32 CTL;
u32 MASK;
u32 STAT;
u32 LOUT;
u32 COR;
u32 MFWR;
u32 FLR;
u32 KEY;
u32 CBC;
u32 IDCODE;
u32 AXSS;
u32 C0R_1;
u32 CSOB;
u32 WBSTAR;
u32 TIMER;
u32 BOOTSTS;
u32 CTL_1;
};
/* Configuration Commands */
#define XHI_CMD_NULL 0
#define XHI_CMD_WCFG 1
#define XHI_CMD_MFW 2
#define XHI_CMD_DGHIGH 3
#define XHI_CMD_RCFG 4
#define XHI_CMD_START 5
#define XHI_CMD_RCAP 6
#define XHI_CMD_RCRC 7
#define XHI_CMD_AGHIGH 8
#define XHI_CMD_SWITCH 9
#define XHI_CMD_GRESTORE 10
#define XHI_CMD_SHUTDOWN 11
#define XHI_CMD_GCAPTURE 12
#define XHI_CMD_DESYNCH 13
#define XHI_CMD_IPROG 15 /* Only in Virtex5 */
#define XHI_CMD_CRCC 16 /* Only in Virtex5 */
#define XHI_CMD_LTIMER 17 /* Only in Virtex5 */
/* Packet constants */
#define XHI_SYNC_PACKET 0xAA995566UL
#define XHI_DUMMY_PACKET 0xFFFFFFFFUL
#define XHI_NOOP_PACKET (XHI_TYPE_1 << XHI_TYPE_SHIFT)
#define XHI_TYPE_2_READ ((XHI_TYPE_2 << XHI_TYPE_SHIFT) | \
(XHI_OP_READ << XHI_OP_SHIFT))
#define XHI_TYPE_2_WRITE ((XHI_TYPE_2 << XHI_TYPE_SHIFT) | \
(XHI_OP_WRITE << XHI_OP_SHIFT))
#define XHI_TYPE2_CNT_MASK 0x07FFFFFF
#define XHI_TYPE_1_PACKET_MAX_WORDS 2047UL
#define XHI_TYPE_1_HEADER_BYTES 4
#define XHI_TYPE_2_HEADER_BYTES 8
/* Constant to use for CRC check when CRC has been disabled */
#define XHI_DISABLED_AUTO_CRC 0x0000DEFCUL
/**
* hwicap_type_1_read: Generates a Type 1 read packet header.
* @parameter: Register is the address of the register to be read back.
*
* Generates a Type 1 read packet header, which is used to indirectly
* read registers in the configuration logic. This packet must then
* be sent through the icap device, and a return packet received with
* the information.
**/
static inline u32 hwicap_type_1_read(u32 Register)
{
return (XHI_TYPE_1 << XHI_TYPE_SHIFT) |
(Register << XHI_REGISTER_SHIFT) |
(XHI_OP_READ << XHI_OP_SHIFT);
}
/**
* hwicap_type_1_write: Generates a Type 1 write packet header
* @parameter: Register is the address of the register to be read back.
**/
static inline u32 hwicap_type_1_write(u32 Register)
{
return (XHI_TYPE_1 << XHI_TYPE_SHIFT) |
(Register << XHI_REGISTER_SHIFT) |
(XHI_OP_WRITE << XHI_OP_SHIFT);
}
#endif
...@@ -17,10 +17,21 @@ ...@@ -17,10 +17,21 @@
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/init.h>
#include <asm/io.h> #include <asm/io.h>
#if defined(CONFIG_OF) #if defined(CONFIG_OF)
#include <linux/of.h>
#include <linux/of_device.h> #include <linux/of_device.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
/* Match table for of_platform binding */
static struct of_device_id ulite_of_match[] __devinitdata = {
{ .compatible = "xlnx,opb-uartlite-1.00.b", },
{ .compatible = "xlnx,xps-uartlite-1.00.a", },
{}
};
MODULE_DEVICE_TABLE(of, ulite_of_match);
#endif #endif
#define ULITE_NAME "ttyUL" #define ULITE_NAME "ttyUL"
...@@ -275,6 +286,9 @@ static void ulite_release_port(struct uart_port *port) ...@@ -275,6 +286,9 @@ static void ulite_release_port(struct uart_port *port)
static int ulite_request_port(struct uart_port *port) static int ulite_request_port(struct uart_port *port)
{ {
pr_debug("ulite console: port=%p; port->mapbase=%x\n",
port, port->mapbase);
if (!request_mem_region(port->mapbase, ULITE_REGION, "uartlite")) { if (!request_mem_region(port->mapbase, ULITE_REGION, "uartlite")) {
dev_err(port->dev, "Memory region busy\n"); dev_err(port->dev, "Memory region busy\n");
return -EBUSY; return -EBUSY;
...@@ -375,32 +389,6 @@ static void ulite_console_write(struct console *co, const char *s, ...@@ -375,32 +389,6 @@ static void ulite_console_write(struct console *co, const char *s,
spin_unlock_irqrestore(&port->lock, flags); spin_unlock_irqrestore(&port->lock, flags);
} }
#if defined(CONFIG_OF)
static inline void __init ulite_console_of_find_device(int id)
{
struct device_node *np;
struct resource res;
const unsigned int *of_id;
int rc;
for_each_compatible_node(np, NULL, "xilinx,uartlite") {
of_id = of_get_property(np, "port-number", NULL);
if ((!of_id) || (*of_id != id))
continue;
rc = of_address_to_resource(np, 0, &res);
if (rc)
continue;
ulite_ports[id].mapbase = res.start;
of_node_put(np);
return;
}
}
#else /* CONFIG_OF */
static inline void __init ulite_console_of_find_device(int id) { /* do nothing */ }
#endif /* CONFIG_OF */
static int __init ulite_console_setup(struct console *co, char *options) static int __init ulite_console_setup(struct console *co, char *options)
{ {
struct uart_port *port; struct uart_port *port;
...@@ -414,11 +402,7 @@ static int __init ulite_console_setup(struct console *co, char *options) ...@@ -414,11 +402,7 @@ static int __init ulite_console_setup(struct console *co, char *options)
port = &ulite_ports[co->index]; port = &ulite_ports[co->index];
/* Check if it is an OF device */ /* Has the device been initialized yet? */
if (!port->mapbase)
ulite_console_of_find_device(co->index);
/* Do we have a device now? */
if (!port->mapbase) { if (!port->mapbase) {
pr_debug("console on ttyUL%i not present\n", co->index); pr_debug("console on ttyUL%i not present\n", co->index);
return -ENODEV; return -ENODEV;
...@@ -617,13 +601,6 @@ static int __devexit ulite_of_remove(struct of_device *op) ...@@ -617,13 +601,6 @@ static int __devexit ulite_of_remove(struct of_device *op)
return ulite_release(&op->dev); return ulite_release(&op->dev);
} }
/* Match table for of_platform binding */
static struct of_device_id __devinit ulite_of_match[] = {
{ .type = "serial", .compatible = "xilinx,uartlite", },
{},
};
MODULE_DEVICE_TABLE(of, ulite_of_match);
static struct of_platform_driver ulite_of_driver = { static struct of_platform_driver ulite_of_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "uartlite", .name = "uartlite",
......
...@@ -459,8 +459,8 @@ static int __devexit xilinxfb_of_remove(struct of_device *op) ...@@ -459,8 +459,8 @@ static int __devexit xilinxfb_of_remove(struct of_device *op)
} }
/* Match table for of_platform binding */ /* Match table for of_platform binding */
static struct of_device_id __devinit xilinxfb_of_match[] = { static struct of_device_id xilinxfb_of_match[] __devinitdata = {
{ .compatible = "xilinx,ml300-fb", }, { .compatible = "xlnx,plb-tft-cntlr-ref-1.00.a", },
{}, {},
}; };
MODULE_DEVICE_TABLE(of, xilinxfb_of_match); MODULE_DEVICE_TABLE(of, xilinxfb_of_match);
......
...@@ -59,25 +59,36 @@ do { \ ...@@ -59,25 +59,36 @@ do { \
/* R/W of indirect DCRs make use of standard naming conventions for DCRs */ /* R/W of indirect DCRs make use of standard naming conventions for DCRs */
extern spinlock_t dcr_ind_lock; extern spinlock_t dcr_ind_lock;
#define mfdcri(base, reg) \ static inline unsigned __mfdcri(int base_addr, int base_data, int reg)
({ \ {
unsigned long flags; \ unsigned long flags;
unsigned int val; \ unsigned int val;
spin_lock_irqsave(&dcr_ind_lock, flags); \
mtdcr(DCRN_ ## base ## _CONFIG_ADDR, reg); \
val = mfdcr(DCRN_ ## base ## _CONFIG_DATA); \
spin_unlock_irqrestore(&dcr_ind_lock, flags); \
val; \
})
#define mtdcri(base, reg, data) \ spin_lock_irqsave(&dcr_ind_lock, flags);
do { \ __mtdcr(base_addr, reg);
unsigned long flags; \ val = __mfdcr(base_data);
spin_lock_irqsave(&dcr_ind_lock, flags); \ spin_unlock_irqrestore(&dcr_ind_lock, flags);
mtdcr(DCRN_ ## base ## _CONFIG_ADDR, reg); \ return val;
mtdcr(DCRN_ ## base ## _CONFIG_DATA, data); \ }
spin_unlock_irqrestore(&dcr_ind_lock, flags); \
} while (0) static inline void __mtdcri(int base_addr, int base_data, int reg,
unsigned val)
{
unsigned long flags;
spin_lock_irqsave(&dcr_ind_lock, flags);
__mtdcr(base_addr, reg);
__mtdcr(base_data, val);
spin_unlock_irqrestore(&dcr_ind_lock, flags);
}
#define mfdcri(base, reg) __mfdcri(DCRN_ ## base ## _CONFIG_ADDR, \
DCRN_ ## base ## _CONFIG_DATA, \
reg)
#define mtdcri(base, reg, data) __mtdcri(DCRN_ ## base ## _CONFIG_ADDR, \
DCRN_ ## base ## _CONFIG_DATA, \
reg, data)
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
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