git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
arch
/
arm
/
mach-imx
/
generic.c
diff --git
a/arch/arm/mach-imx/generic.c
b/arch/arm/mach-imx/generic.c
index
54377d0
..
37613ad
100644
(file)
--- a/
arch/arm/mach-imx/generic.c
+++ b/
arch/arm/mach-imx/generic.c
@@
-22,19
+22,23
@@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-#include <linux/device.h>
+#include <linux/
platform_
device.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/string.h>
+
+#include <asm/arch/imxfb.h>
#include <asm/hardware.h>
#include <asm/hardware.h>
+#include <asm/arch/imx-regs.h>
#include <asm/mach/map.h>
void imx_gpio_mode(int gpio_mode)
{
unsigned int pin = gpio_mode & GPIO_PIN_MASK;
#include <asm/mach/map.h>
void imx_gpio_mode(int gpio_mode)
{
unsigned int pin = gpio_mode & GPIO_PIN_MASK;
- unsigned int port = (gpio_mode & GPIO_PORT_MASK) >>
5
;
- unsigned int ocr = (gpio_mode & GPIO_OCR_MASK) >>
10
;
+ unsigned int port = (gpio_mode & GPIO_PORT_MASK) >>
GPIO_PORT_SHIFT
;
+ unsigned int ocr = (gpio_mode & GPIO_OCR_MASK) >>
GPIO_OCR_SHIFT
;
unsigned int tmp;
/* Pullup enable */
unsigned int tmp;
/* Pullup enable */
@@
-56,7
+60,7
@@
void imx_gpio_mode(int gpio_mode)
GPR(port) &= ~(1<<pin);
/* use as gpio? */
GPR(port) &= ~(1<<pin);
/* use as gpio? */
- if(
ocr == 3
)
+ if(
gpio_mode & GPIO_GIUS
)
GIUS(port) |= (1<<pin);
else
GIUS(port) &= ~(1<<pin);
GIUS(port) |= (1<<pin);
else
GIUS(port) &= ~(1<<pin);
@@
-71,20
+75,20
@@
void imx_gpio_mode(int gpio_mode)
tmp |= (ocr << (pin*2));
OCR1(port) = tmp;
tmp |= (ocr << (pin*2));
OCR1(port) = tmp;
- if( gpio_mode & GPIO_AOUT )
-
ICONFA1(port) &= ~( 3<<(pin*2)
);
- if( gpio_mode & GPIO_BOUT )
-
ICONFB1(port) &= ~( 3<<(pin*2)
);
+ ICONFA1(port) &= ~( 3<<(pin*2));
+
ICONFA1(port) |= ((gpio_mode >> GPIO_AOUT_SHIFT) & 3) << (pin * 2
);
+ ICONFB1(port) &= ~( 3<<(pin*2));
+
ICONFB1(port) |= ((gpio_mode >> GPIO_BOUT_SHIFT) & 3) << (pin * 2
);
} else {
tmp = OCR2(port);
tmp &= ~( 3<<((pin-16)*2));
tmp |= (ocr << ((pin-16)*2));
OCR2(port) = tmp;
} else {
tmp = OCR2(port);
tmp &= ~( 3<<((pin-16)*2));
tmp |= (ocr << ((pin-16)*2));
OCR2(port) = tmp;
- if( gpio_mode & GPIO_AOUT )
-
ICONFA2(port) &= ~( 3<<((pin-16)*2)
);
- if( gpio_mode & GPIO_BOUT )
-
ICONFB2(port) &= ~( 3<<((pin-16)*2)
);
+ ICONFA2(port) &= ~( 3<<((pin-16)*2));
+
ICONFA2(port) |= ((gpio_mode >> GPIO_AOUT_SHIFT) & 3) << ((pin-16) * 2
);
+ ICONFB2(port) &= ~( 3<<((pin-16)*2));
+
ICONFB2(port) |= ((gpio_mode >> GPIO_BOUT_SHIFT) & 3) << ((pin-16) * 2
);
}
}
}
}
@@
-228,6
+232,14
@@
static struct platform_device imx_uart2_device = {
.resource = imx_uart2_resources,
};
.resource = imx_uart2_resources,
};
+static struct imxfb_mach_info imx_fb_info;
+
+void __init set_imx_fb_info(struct imxfb_mach_info *hard_imx_fb_info)
+{
+ memcpy(&imx_fb_info,hard_imx_fb_info,sizeof(struct imxfb_mach_info));
+}
+EXPORT_SYMBOL(set_imx_fb_info);
+
static struct resource imxfb_resources[] = {
[0] = {
.start = 0x00205000,
static struct resource imxfb_resources[] = {
[0] = {
.start = 0x00205000,
@@
-241,9
+253,16
@@
static struct resource imxfb_resources[] = {
},
};
},
};
+static u64 fb_dma_mask = ~(u64)0;
+
static struct platform_device imxfb_device = {
.name = "imx-fb",
.id = 0,
static struct platform_device imxfb_device = {
.name = "imx-fb",
.id = 0,
+ .dev = {
+ .platform_data = &imx_fb_info,
+ .dma_mask = &fb_dma_mask,
+ .coherent_dma_mask = 0xffffffff,
+ },
.num_resources = ARRAY_SIZE(imxfb_resources),
.resource = imxfb_resources,
};
.num_resources = ARRAY_SIZE(imxfb_resources),
.resource = imxfb_resources,
};
@@
-256,8
+275,12
@@
static struct platform_device *devices[] __initdata = {
};
static struct map_desc imx_io_desc[] __initdata = {
};
static struct map_desc imx_io_desc[] __initdata = {
- /* virtual physical length type */
- {IMX_IO_BASE, IMX_IO_PHYS, IMX_IO_SIZE, MT_DEVICE},
+ {
+ .virtual = IMX_IO_BASE,
+ .pfn = __phys_to_pfn(IMX_IO_PHYS),
+ .length = IMX_IO_SIZE,
+ .type = MT_DEVICE
+ }
};
void __init
};
void __init