Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
64abf64d
Commit
64abf64d
authored
Sep 14, 2005
by
Pete Popov
Committed by
Ralf Baechle
Oct 29, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Misc au1200 updates.
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
4f94afa2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
160 additions
and
32 deletions
+160
-32
arch/mips/au1000/common/platform.c
arch/mips/au1000/common/platform.c
+118
-0
arch/mips/au1000/pb1200/board_setup.c
arch/mips/au1000/pb1200/board_setup.c
+42
-32
No files found.
arch/mips/au1000/common/platform.c
View file @
64abf64d
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
#include <asm/mach-au1x00/au1000.h>
#include <asm/mach-au1x00/au1000.h>
/* OHCI (USB full speed host controller) */
static
struct
resource
au1xxx_usb_ohci_resources
[]
=
{
static
struct
resource
au1xxx_usb_ohci_resources
[]
=
{
[
0
]
=
{
[
0
]
=
{
.
start
=
USB_OHCI_BASE
,
.
start
=
USB_OHCI_BASE
,
...
@@ -71,12 +72,129 @@ static struct platform_device au1100_lcd_device = {
...
@@ -71,12 +72,129 @@ static struct platform_device au1100_lcd_device = {
};
};
#endif
#endif
#ifdef CONFIG_SOC_AU1200
/* EHCI (USB high speed host controller) */
static
struct
resource
au1xxx_usb_ehci_resources
[]
=
{
[
0
]
=
{
.
start
=
USB_EHCI_BASE
,
.
end
=
USB_EHCI_BASE
+
USB_EHCI_LEN
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
[
1
]
=
{
.
start
=
AU1000_USB_HOST_INT
,
.
end
=
AU1000_USB_HOST_INT
,
.
flags
=
IORESOURCE_IRQ
,
},
};
static
u64
ehci_dmamask
=
~
(
u32
)
0
;
static
struct
platform_device
au1xxx_usb_ehci_device
=
{
.
name
=
"au1xxx-ehci"
,
.
id
=
0
,
.
dev
=
{
.
dma_mask
=
&
ehci_dmamask
,
.
coherent_dma_mask
=
0xffffffff
,
},
.
num_resources
=
ARRAY_SIZE
(
au1xxx_usb_ehci_resources
),
.
resource
=
au1xxx_usb_ehci_resources
,
};
/* Au1200 UDC (USB gadget controller) */
static
struct
resource
au1xxx_usb_gdt_resources
[]
=
{
[
0
]
=
{
.
start
=
USB_UDC_BASE
,
.
end
=
USB_UDC_BASE
+
USB_UDC_LEN
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
[
1
]
=
{
.
start
=
AU1200_USB_INT
,
.
end
=
AU1200_USB_INT
,
.
flags
=
IORESOURCE_IRQ
,
},
};
static
u64
udc_dmamask
=
~
(
u32
)
0
;
static
struct
platform_device
au1xxx_usb_gdt_device
=
{
.
name
=
"au1xxx-udc"
,
.
id
=
0
,
.
dev
=
{
.
dma_mask
=
&
udc_dmamask
,
.
coherent_dma_mask
=
0xffffffff
,
},
.
num_resources
=
ARRAY_SIZE
(
au1xxx_usb_gdt_resources
),
.
resource
=
au1xxx_usb_gdt_resources
,
};
/* Au1200 UOC (USB OTG controller) */
static
struct
resource
au1xxx_usb_otg_resources
[]
=
{
[
0
]
=
{
.
start
=
USB_UOC_BASE
,
.
end
=
USB_UOC_BASE
+
USB_UOC_LEN
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
[
1
]
=
{
.
start
=
AU1200_USB_INT
,
.
end
=
AU1200_USB_INT
,
.
flags
=
IORESOURCE_IRQ
,
},
};
static
u64
uoc_dmamask
=
~
(
u32
)
0
;
static
struct
platform_device
au1xxx_usb_otg_device
=
{
.
name
=
"au1xxx-uoc"
,
.
id
=
0
,
.
dev
=
{
.
dma_mask
=
&
uoc_dmamask
,
.
coherent_dma_mask
=
0xffffffff
,
},
.
num_resources
=
ARRAY_SIZE
(
au1xxx_usb_otg_resources
),
.
resource
=
au1xxx_usb_otg_resources
,
};
/*** AU1200 LCD controller ***/
static
struct
resource
au1200_lcd_resources
[]
=
{
[
0
]
=
{
.
start
=
LCD_PHYS_ADDR
,
.
end
=
LCD_PHYS_ADDR
+
0x800
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
[
1
]
=
{
.
start
=
AU1200_LCD_INT
,
.
end
=
AU1200_LCD_INT
,
.
flags
=
IORESOURCE_IRQ
,
}
};
static
u64
au1200_lcd_dmamask
=
~
(
u32
)
0
;
static
struct
platform_device
au1200_lcd_device
=
{
.
name
=
"au1200-lcd"
,
.
id
=
0
,
.
dev
=
{
.
dma_mask
=
&
au1200_lcd_dmamask
,
.
coherent_dma_mask
=
0xffffffff
,
},
.
num_resources
=
ARRAY_SIZE
(
au1200_lcd_resources
),
.
resource
=
au1200_lcd_resources
,
};
#endif
static
struct
platform_device
*
au1xxx_platform_devices
[]
__initdata
=
{
static
struct
platform_device
*
au1xxx_platform_devices
[]
__initdata
=
{
&
au1xxx_usb_ohci_device
,
&
au1xxx_usb_ohci_device
,
#ifdef CONFIG_FB_AU1100
#ifdef CONFIG_FB_AU1100
&
au1100_lcd_device
,
&
au1100_lcd_device
,
#endif
#endif
#ifdef CONFIG_SOC_AU1200
#if 0 /* fixme */
&au1xxx_usb_ehci_device,
#endif
&
au1xxx_usb_gdt_device
,
&
au1xxx_usb_otg_device
,
&
au1200_lcd_device
,
#endif
};
};
int
au1xxx_platform_init
(
void
)
int
au1xxx_platform_init
(
void
)
...
...
arch/mips/au1000/pb1200/board_setup.c
View file @
64abf64d
...
@@ -58,22 +58,10 @@
...
@@ -58,22 +58,10 @@
extern
void
_board_init_irq
(
void
);
extern
void
_board_init_irq
(
void
);
extern
void
(
*
board_init_irq
)(
void
);
extern
void
(
*
board_init_irq
)(
void
);
#ifdef CONFIG_BLK_DEV_IDE_AU1XXX
extern
u32
au1xxx_ide_virtbase
;
extern
u64
au1xxx_ide_physbase
;
extern
int
au1xxx_ide_irq
;
u32
led_base_addr
;
/* Ddma */
chan_tab_t
*
ide_read_ch
,
*
ide_write_ch
;
u32
au1xxx_ide_ddma_enable
=
0
,
switch4ddma
=
1
;
// PIO+ddma
dbdev_tab_t
new_dbdev_tab_element
=
{
DSCR_CMD0_THROTTLE
,
DEV_FLAGS_ANYUSE
,
0
,
0
,
0x00000000
,
0
,
0
};
#endif
/* end CONFIG_BLK_DEV_IDE_AU1XXX */
void
board_reset
(
void
)
void
board_reset
(
void
)
{
{
bcsr
->
resets
=
0
;
bcsr
->
resets
=
0
;
bcsr
->
system
=
0
;
}
}
void
__init
board_setup
(
void
)
void
__init
board_setup
(
void
)
...
@@ -94,7 +82,7 @@ void __init board_setup(void)
...
@@ -94,7 +82,7 @@ void __init board_setup(void)
au_sync();
au_sync();
#endif
#endif
#if defined(
CONFIG_I2C_ALGO_AU1550
)
#if defined(
CONFIG_I2C_AU1550
)
{
{
u32
freq0
,
clksrc
;
u32
freq0
,
clksrc
;
...
@@ -134,35 +122,24 @@ void __init board_setup(void)
...
@@ -134,35 +122,24 @@ void __init board_setup(void)
#ifdef CONFIG_FB_AU1200
#ifdef CONFIG_FB_AU1200
argptr
=
prom_getcmdline
();
argptr
=
prom_getcmdline
();
#ifdef CONFIG_MIPS_PB1200
#ifdef CONFIG_MIPS_PB1200
strcat
(
argptr
,
" video=au1200fb:panel:
s11
"
);
strcat
(
argptr
,
" video=au1200fb:panel:
bs
"
);
#endif
#endif
#ifdef CONFIG_MIPS_DB1200
#ifdef CONFIG_MIPS_DB1200
strcat
(
argptr
,
" video=au1200fb:panel:
s7
"
);
strcat
(
argptr
,
" video=au1200fb:panel:
bs
"
);
#endif
#endif
#endif
#endif
#if defined(CONFIG_BLK_DEV_IDE_AU1XXX)
/*
* Iniz IDE parameters
*/
au1xxx_ide_irq
=
PB1200_IDE_INT
;
au1xxx_ide_physbase
=
AU1XXX_ATA_PHYS_ADDR
;
au1xxx_ide_virtbase
=
KSEG1ADDR
(
AU1XXX_ATA_PHYS_ADDR
);
/*
* change PIO or PIO+Ddma
* check the GPIO-5 pin condition. pb1200:s18_dot */
switch4ddma
=
(
au_readl
(
SYS_PINSTATERD
)
&
(
1
<<
5
))
?
1
:
0
;
#endif
/* The Pb1200 development board uses external MUX for PSC0 to
/* The Pb1200 development board uses external MUX for PSC0 to
support SMB/SPI. bcsr->resets bit 12: 0=SMB 1=SPI
support SMB/SPI. bcsr->resets bit 12: 0=SMB 1=SPI
*/
*/
#if defined(CONFIG_AU1
550_PSC_SPI) && defined(CONFIG_I2C_ALGO
_AU1550)
#if defined(CONFIG_AU1
XXX_PSC_SPI) && defined(CONFIG_I2C
_AU1550)
#error I2C and SPI are mutually exclusive. Both are physically connected to PSC0.\
#error I2C and SPI are mutually exclusive. Both are physically connected to PSC0.\
Refer to Pb1200/Db1200 documentation.
Refer to Pb1200/Db1200 documentation.
#elif defined( CONFIG_AU1
550
_PSC_SPI )
#elif defined( CONFIG_AU1
XXX
_PSC_SPI )
bcsr
->
resets
|=
BCSR_RESETS_PCS0MUX
;
bcsr
->
resets
|=
BCSR_RESETS_PCS0MUX
;
#elif defined( CONFIG_I2C_ALGO_AU1550 )
/*Hard Coding Value to enable Temp Sensors [bit 14] Value for SOC Au1200. Pls refer documentation*/
bcsr
->
resets
=
0x900f
;
#elif defined( CONFIG_I2C_AU1550 )
bcsr
->
resets
&=
(
~
BCSR_RESETS_PCS0MUX
);
bcsr
->
resets
&=
(
~
BCSR_RESETS_PCS0MUX
);
#endif
#endif
au_sync
();
au_sync
();
...
@@ -181,3 +158,36 @@ void __init board_setup(void)
...
@@ -181,3 +158,36 @@ void __init board_setup(void)
board_init_irq
=
_board_init_irq
;
board_init_irq
=
_board_init_irq
;
}
}
}
}
int
board_au1200fb_panel
(
void
)
{
BCSR
*
bcsr
=
(
BCSR
*
)
BCSR_KSEG1_ADDR
;
int
p
;
p
=
bcsr
->
switches
;
p
>>=
8
;
p
&=
0x0F
;
return
p
;
}
int
board_au1200fb_panel_init
(
void
)
{
/* Apply power */
BCSR
*
bcsr
=
(
BCSR
*
)
BCSR_KSEG1_ADDR
;
bcsr
->
board
|=
(
BCSR_BOARD_LCDVEE
|
BCSR_BOARD_LCDVDD
|
BCSR_BOARD_LCDBL
);
/*printk("board_au1200fb_panel_init()\n"); */
return
0
;
}
int
board_au1200fb_panel_shutdown
(
void
)
{
/* Remove power */
BCSR
*
bcsr
=
(
BCSR
*
)
BCSR_KSEG1_ADDR
;
bcsr
->
board
&=
~
(
BCSR_BOARD_LCDVEE
|
BCSR_BOARD_LCDVDD
|
BCSR_BOARD_LCDBL
);
/*printk("board_au1200fb_panel_shutdown()\n"); */
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment