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
01b2d84d
Commit
01b2d84d
authored
Jan 19, 2009
by
Kevin Hilman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
davinci: cleanup: remove platform-specific tags
Signed-off-by:
Kevin Hilman
<
khilman@deeprootsystems.com
>
parent
f9719b2d
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
17 additions
and
294 deletions
+17
-294
arch/arm/include/asm/setup.h
arch/arm/include/asm/setup.h
+0
-9
arch/arm/mach-davinci/Kconfig
arch/arm/mach-davinci/Kconfig
+0
-17
arch/arm/mach-davinci/Makefile
arch/arm/mach-davinci/Makefile
+1
-1
arch/arm/mach-davinci/board-dm355-evm.c
arch/arm/mach-davinci/board-dm355-evm.c
+2
-8
arch/arm/mach-davinci/board-dm644x-evm.c
arch/arm/mach-davinci/board-dm644x-evm.c
+2
-8
arch/arm/mach-davinci/board-dm646x-evm.c
arch/arm/mach-davinci/board-dm646x-evm.c
+2
-8
arch/arm/mach-davinci/board-sffsdr.c
arch/arm/mach-davinci/board-sffsdr.c
+2
-8
arch/arm/mach-davinci/common.c
arch/arm/mach-davinci/common.c
+0
-187
arch/arm/mach-davinci/include/mach/board.h
arch/arm/mach-davinci/include/mach/board.h
+0
-37
arch/arm/mach-davinci/include/mach/serial.h
arch/arm/mach-davinci/include/mach/serial.h
+6
-1
arch/arm/mach-davinci/serial.c
arch/arm/mach-davinci/serial.c
+2
-10
No files found.
arch/arm/include/asm/setup.h
View file @
01b2d84d
...
...
@@ -143,10 +143,6 @@ struct tag_omap {
u8
data
[
0
];
};
struct
tag_davinci
{
u8
data
[
0
];
};
/* footbridge memory clock, see arch/arm/mach-footbridge/arch.c */
#define ATAG_MEMCLK 0x41000402
...
...
@@ -177,11 +173,6 @@ struct tag {
*/
struct
tag_omap
omap
;
/*
* DaVinci specific
*/
struct
tag_davinci
davinci
;
/*
* DC21285 specific
*/
...
...
arch/arm/mach-davinci/Kconfig
View file @
01b2d84d
...
...
@@ -87,23 +87,6 @@ config DAVINCI_RESET_CLOCKS
probably do not want this option enabled until your
device drivers work properly.
config DAVINCI_BOOT_TAG
bool "DaVinci bootloader information passing"
depends on ARCH_DAVINCI_DM644x
default n
help
Say Y, if you have a bootloader which passes information
about your board and its peripheral configuration.
comment "DaVinci Options"
config DAVINCI_BLK_DEV_CF
bool "TI DaVinci CF Card Support"
default Y
depends on BLK_DEV_DAVINCI
help
Configure this option to enable CF Card support.
endmenu
endif
arch/arm/mach-davinci/Makefile
View file @
01b2d84d
...
...
@@ -5,7 +5,7 @@
# Common objects
obj-y
:=
time.o irq.o clock.o serial.o io.o id.o psc.o
\
gpio.o devices.o usb.o dma.o
common.o
iram.o
gpio.o devices.o usb.o dma.o iram.o
obj-$(CONFIG_DAVINCI_MUX)
+=
mux.o mux_cfg.o
...
...
arch/arm/mach-davinci/board-dm355-evm.c
View file @
01b2d84d
...
...
@@ -166,14 +166,10 @@ static struct platform_device *davinci_evm_devices[] __initdata = {
&
davinci_nand_device
,
};
static
struct
davinci_uart_config
davinci_evm_
uart_config
__initdata
=
{
static
struct
davinci_uart_config
uart_config
__initdata
=
{
.
enabled_uarts
=
(
1
<<
0
),
};
static
struct
davinci_board_config_kernel
davinci_evm_config
[]
__initdata
=
{
{
DAVINCI_TAG_UART
,
&
davinci_evm_uart_config
},
};
static
void
__init
dm355_evm_map_io
(
void
)
{
davinci_map_common_io
();
...
...
@@ -223,9 +219,7 @@ static __init void dm355_evm_init(void)
platform_add_devices
(
davinci_evm_devices
,
ARRAY_SIZE
(
davinci_evm_devices
));
evm_init_i2c
();
davinci_board_config
=
davinci_evm_config
;
davinci_board_config_size
=
ARRAY_SIZE
(
davinci_evm_config
);
davinci_serial_init
();
davinci_serial_init
(
&
uart_config
);
gpio_request
(
2
,
"usb_id_toggle"
);
gpio_direction_output
(
2
,
USB_ID_VALUE
);
...
...
arch/arm/mach-davinci/board-dm644x-evm.c
View file @
01b2d84d
...
...
@@ -582,14 +582,10 @@ static struct platform_device *davinci_evm_devices[] __initdata = {
&
ide_dev
,
};
static
struct
davinci_uart_config
davinci_evm_
uart_config
__initdata
=
{
static
struct
davinci_uart_config
uart_config
__initdata
=
{
.
enabled_uarts
=
(
1
<<
0
),
};
static
struct
davinci_board_config_kernel
davinci_evm_config
[]
__initdata
=
{
{
DAVINCI_TAG_UART
,
&
davinci_evm_uart_config
},
};
static
void
__init
davinci_evm_map_io
(
void
)
{
...
...
@@ -628,9 +624,7 @@ static __init void davinci_evm_init(void)
davinci_setup_mmc
(
0
,
&
dm6446evm_mmc_config
);
davinci_board_config
=
davinci_evm_config
;
davinci_board_config_size
=
ARRAY_SIZE
(
davinci_evm_config
);
davinci_serial_init
();
davinci_serial_init
(
&
uart_config
);
/* Register the fixup for PHY on DaVinci */
phy_register_fixup_for_uid
(
LXT971_PHY_ID
,
LXT971_PHY_MASK
,
...
...
arch/arm/mach-davinci/board-dm646x-evm.c
View file @
01b2d84d
...
...
@@ -46,14 +46,10 @@
#include <linux/etherdevice.h>
#include <mach/emac.h>
static
struct
davinci_uart_config
davinci_evm_
uart_config
__initdata
=
{
static
struct
davinci_uart_config
uart_config
__initdata
=
{
.
enabled_uarts
=
(
1
<<
0
),
};
static
struct
davinci_board_config_kernel
davinci_evm_config
[]
__initdata
=
{
{
DAVINCI_TAG_UART
,
&
davinci_evm_uart_config
},
};
/* Most of this EEPROM is unused, but U-Boot uses some data:
* - 0x7f00, 6 bytes Ethernet Address
* - ... newer boards may have more
...
...
@@ -126,9 +122,7 @@ static __init void evm_init(void)
{
davinci_psc_init
();
evm_init_i2c
();
davinci_board_config
=
davinci_evm_config
;
davinci_board_config_size
=
ARRAY_SIZE
(
davinci_evm_config
);
davinci_serial_init
();
davinci_serial_init
(
&
uart_config
);
}
static
__init
void
davinci_dm646x_evm_irq_init
(
void
)
...
...
arch/arm/mach-davinci/board-sffsdr.c
View file @
01b2d84d
...
...
@@ -141,14 +141,10 @@ static struct platform_device *davinci_sffsdr_devices[] __initdata = {
&
davinci_sffsdr_nandflash_device
,
};
static
struct
davinci_uart_config
davinci_sffsdr_
uart_config
__initdata
=
{
static
struct
davinci_uart_config
uart_config
__initdata
=
{
.
enabled_uarts
=
(
1
<<
0
),
};
static
struct
davinci_board_config_kernel
davinci_sffsdr_config
[]
__initdata
=
{
{
DAVINCI_TAG_UART
,
&
davinci_sffsdr_uart_config
},
};
static
void
__init
davinci_sffsdr_map_io
(
void
)
{
davinci_map_common_io
();
...
...
@@ -160,9 +156,7 @@ static __init void davinci_sffsdr_init(void)
platform_add_devices
(
davinci_sffsdr_devices
,
ARRAY_SIZE
(
davinci_sffsdr_devices
));
sffsdr_init_i2c
();
davinci_board_config
=
davinci_sffsdr_config
;
davinci_board_config_size
=
ARRAY_SIZE
(
davinci_sffsdr_config
);
davinci_serial_init
();
davinci_serial_init
(
&
uart_config
);
davinci_init_emac
(
davinci_sffsdr_mac_addr
);
setup_usb
(
0
,
0
);
/* We support only peripheral mode. */
}
...
...
arch/arm/mach-davinci/common.c
deleted
100644 → 0
View file @
f9719b2d
/*
* linux/arch/arm/mach-davinci/common.c
*
* Code common to all DaVinci machines.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/console.h>
#include <linux/serial.h>
#include <linux/tty.h>
#include <linux/serial_8250.h>
#include <linux/serial_reg.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <asm/system.h>
#include <asm/pgtable.h>
#include <asm/mach/map.h>
#include <asm/setup.h>
#include <mach/hardware.h>
#include <mach/board.h>
#include <mach/serial.h>
#include <mach/mux.h>
#include <mach/clock.h>
#define NO_LENGTH_CHECK 0xffffffff
unsigned
char
davinci_bootloader_tag
[
1024
];
int
davinci_bootloader_tag_len
;
struct
davinci_board_config_kernel
*
davinci_board_config
;
int
davinci_board_config_size
;
#ifdef CONFIG_DAVINCI_BOOT_TAG
static
int
__init
parse_tag_davinci
(
const
struct
tag
*
tag
)
{
u32
size
=
tag
->
hdr
.
size
-
(
sizeof
(
tag
->
hdr
)
>>
2
);
size
<<=
2
;
if
(
size
>
sizeof
(
davinci_bootloader_tag
))
return
-
1
;
memcpy
(
davinci_bootloader_tag
,
tag
->
u
.
davinci
.
data
,
size
);
davinci_bootloader_tag_len
=
size
;
return
0
;
}
__tagtable
(
ATAG_BOARD
,
parse_tag_davinci
);
#endif
static
const
void
*
get_config
(
u16
tag
,
size_t
len
,
int
skip
,
size_t
*
len_out
)
{
struct
davinci_board_config_kernel
*
kinfo
=
NULL
;
int
i
;
#ifdef CONFIG_DAVINCI_BOOT_TAG
struct
davinci_board_config_entry
*
info
=
NULL
;
if
(
davinci_bootloader_tag_len
>
4
)
info
=
(
struct
davinci_board_config_entry
*
)
davinci_bootloader_tag
;
while
(
info
!=
NULL
)
{
u8
*
next
;
if
(
info
->
tag
==
tag
)
{
if
(
skip
==
0
)
break
;
skip
--
;
}
if
((
info
->
len
&
0x03
)
!=
0
)
{
/* We bail out to avoid an alignment fault */
printk
(
KERN_ERR
"DAVINCI peripheral config: Length (%d)"
"not word-aligned (tag %04x)
\n
"
,
info
->
len
,
info
->
tag
);
return
NULL
;
}
next
=
(
u8
*
)
info
+
sizeof
(
*
info
)
+
info
->
len
;
if
(
next
>=
davinci_bootloader_tag
+
davinci_bootloader_tag_len
)
info
=
NULL
;
else
info
=
(
struct
davinci_board_config_entry
*
)
next
;
}
if
(
info
!=
NULL
)
{
/* Check the length as a lame attempt to check for
* binary inconsistency. */
if
(
len
!=
NO_LENGTH_CHECK
)
{
/* Word-align len */
if
(
len
&
0x03
)
len
=
(
len
+
3
)
&
~
0x03
;
if
(
info
->
len
!=
len
)
{
printk
(
KERN_ERR
"DaVinci peripheral config: "
"Length mismatch with tag %x"
" (want %d, got %d)
\n
"
,
tag
,
len
,
info
->
len
);
return
NULL
;
}
}
if
(
len_out
!=
NULL
)
*
len_out
=
info
->
len
;
return
info
->
data
;
}
#endif
/* Try to find the config from the board-specific structures
* in the kernel. */
for
(
i
=
0
;
i
<
davinci_board_config_size
;
i
++
)
{
if
(
davinci_board_config
[
i
].
tag
==
tag
)
{
if
(
skip
==
0
)
{
kinfo
=
&
davinci_board_config
[
i
];
break
;
}
else
{
skip
--
;
}
}
}
if
(
kinfo
==
NULL
)
return
NULL
;
return
kinfo
->
data
;
}
const
void
*
__davinci_get_config
(
u16
tag
,
size_t
len
,
int
nr
)
{
return
get_config
(
tag
,
len
,
nr
,
NULL
);
}
EXPORT_SYMBOL
(
__davinci_get_config
);
const
void
*
davinci_get_var_config
(
u16
tag
,
size_t
*
len
)
{
return
get_config
(
tag
,
NO_LENGTH_CHECK
,
0
,
len
);
}
EXPORT_SYMBOL
(
davinci_get_var_config
);
static
int
__init
davinci_add_serial_console
(
void
)
{
const
struct
davinci_serial_console_config
*
con_info
;
const
struct
davinci_uart_config
*
uart_info
;
static
char
speed
[
11
],
*
opt
;
int
line
,
i
,
uart_idx
;
uart_info
=
davinci_get_config
(
DAVINCI_TAG_UART
,
struct
davinci_uart_config
);
con_info
=
davinci_get_config
(
DAVINCI_TAG_SERIAL_CONSOLE
,
struct
davinci_serial_console_config
);
if
(
uart_info
==
NULL
||
con_info
==
NULL
)
return
0
;
if
(
con_info
->
console_uart
==
0
)
return
0
;
if
(
con_info
->
console_speed
)
{
snprintf
(
speed
,
sizeof
(
speed
),
"%u"
,
con_info
->
console_speed
);
opt
=
speed
;
}
uart_idx
=
con_info
->
console_uart
-
1
;
if
(
uart_idx
>=
DAVINCI_MAX_NR_UARTS
)
{
printk
(
KERN_INFO
"Console: external UART#%d. "
"Not adding it as console this time.
\n
"
,
uart_idx
+
1
);
return
0
;
}
if
(
!
(
uart_info
->
enabled_uarts
&
(
1
<<
uart_idx
)))
{
printk
(
KERN_ERR
"Console: Selected UART#%d is "
"not enabled for this platform
\n
"
,
uart_idx
+
1
);
return
-
1
;
}
line
=
0
;
for
(
i
=
0
;
i
<
uart_idx
;
i
++
)
{
if
(
uart_info
->
enabled_uarts
&
(
1
<<
i
))
line
++
;
}
return
add_preferred_console
(
"ttyS"
,
line
,
opt
);
}
console_initcall
(
davinci_add_serial_console
);
arch/arm/mach-davinci/include/mach/board.h
View file @
01b2d84d
...
...
@@ -11,20 +11,6 @@
#include <linux/types.h>
/* Different peripheral ids */
#define DAVINCI_TAG_UART 0x4f01
#define DAVINCI_TAG_SERIAL_CONSOLE 0x4f02
struct
davinci_serial_console_config
{
u8
console_uart
;
u32
console_speed
;
};
struct
davinci_uart_config
{
/* Bit field of UARTs present; bit 0 --> UART1 */
unsigned
int
enabled_uarts
;
};
struct
davinci_mmc_config
{
/* get_cd()/get_wp() may sleep */
int
(
*
get_cd
)(
int
module
);
...
...
@@ -34,27 +20,4 @@ struct davinci_mmc_config {
};
void
davinci_setup_mmc
(
int
module
,
struct
davinci_mmc_config
*
config
);
struct
davinci_board_config_entry
{
u16
tag
;
u16
len
;
u8
data
[
0
];
};
struct
davinci_board_config_kernel
{
u16
tag
;
const
void
*
data
;
};
extern
const
void
*
__davinci_get_config
(
u16
tag
,
size_t
len
,
int
nr
);
#define davinci_get_config(tag, type) \
((const type *) __davinci_get_config((tag), sizeof(type), 0))
#define davinci_get_nr_config(tag, type, nr) \
((const type *) __davinci_get_config((tag), sizeof(type), (nr)))
extern
const
void
*
davinci_get_var_config
(
u16
tag
,
size_t
*
len
);
extern
struct
davinci_board_config_kernel
*
davinci_board_config
;
extern
int
davinci_board_config_size
;
#endif
arch/arm/mach-davinci/include/mach/serial.h
View file @
01b2d84d
...
...
@@ -25,6 +25,11 @@
#define UART_DM646X_SCR 0x10
#define UART_DM646X_SCR_TX_WATERMARK 0x08
extern
void
davinci_serial_init
(
void
);
struct
davinci_uart_config
{
/* Bit field of UARTs present; bit 0 --> UART1 */
unsigned
int
enabled_uarts
;
};
extern
void
davinci_serial_init
(
struct
davinci_uart_config
*
);
#endif
/* __ASM_ARCH_SERIAL_H */
arch/arm/mach-davinci/serial.c
View file @
01b2d84d
...
...
@@ -110,10 +110,9 @@ static void __init davinci_serial_reset(struct plat_serial8250_port *p)
UART_DM646X_SCR_TX_WATERMARK
);
}
void
__init
davinci_serial_init
(
void
)
void
__init
davinci_serial_init
(
struct
davinci_uart_config
*
info
)
{
int
i
;
const
struct
davinci_uart_config
*
info
;
char
name
[
16
];
struct
clk
*
uart_clk
;
struct
device
*
dev
=
&
serial_device
.
dev
;
...
...
@@ -123,12 +122,6 @@ void __init davinci_serial_init(void)
* You have to mux them off in device drivers later on
* if not needed.
*/
info
=
davinci_get_config
(
DAVINCI_TAG_UART
,
struct
davinci_uart_config
);
if
(
info
==
NULL
)
return
;
for
(
i
=
0
;
i
<
DAVINCI_MAX_NR_UARTS
;
i
++
)
{
struct
plat_serial8250_port
*
p
=
serial_platform_data
+
i
;
...
...
@@ -148,8 +141,7 @@ void __init davinci_serial_init(void)
}
if
(
!
(
info
->
enabled_uarts
&
(
1
<<
i
)))
{
p
->
membase
=
0
;
p
->
mapbase
=
0
;
p
->
flags
=
0
;
continue
;
}
...
...
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