Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 296647
b: refs/heads/master
c: 709baa6
h: refs/heads/master
i:
  296645: 681bba2
  296643: e048065
  296639: b43d424
v: v3
  • Loading branch information
Arnd Bergmann committed Mar 4, 2012
1 parent ae476cf commit f327e41
Show file tree
Hide file tree
Showing 104 changed files with 2,021 additions and 1,220 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8c690fdf465be9d97229f6bb0e6346624d6753a9
refs/heads/master: 709baa67c676a187a63c0f0f40efceb3fb1eef72
58 changes: 58 additions & 0 deletions trunk/Documentation/ABI/testing/sysfs-devices-soc
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
What: /sys/devices/socX
Date: January 2012
contact: Lee Jones <lee.jones@linaro.org>
Description:
The /sys/devices/ directory contains a sub-directory for each
System-on-Chip (SoC) device on a running platform. Information
regarding each SoC can be obtained by reading sysfs files. This
functionality is only available if implemented by the platform.

The directory created for each SoC will also house information
about devices which are commonly contained in /sys/devices/platform.
It has been agreed that if an SoC device exists, its supported
devices would be better suited to appear as children of that SoC.

What: /sys/devices/socX/machine
Date: January 2012
contact: Lee Jones <lee.jones@linaro.org>
Description:
Read-only attribute common to all SoCs. Contains the SoC machine
name (e.g. Ux500).

What: /sys/devices/socX/family
Date: January 2012
contact: Lee Jones <lee.jones@linaro.org>
Description:
Read-only attribute common to all SoCs. Contains SoC family name
(e.g. DB8500).

What: /sys/devices/socX/soc_id
Date: January 2012
contact: Lee Jones <lee.jones@linaro.org>
Description:
Read-only attribute supported by most SoCs. In the case of
ST-Ericsson's chips this contains the SoC serial number.

What: /sys/devices/socX/revision
Date: January 2012
contact: Lee Jones <lee.jones@linaro.org>
Description:
Read-only attribute supported by most SoCs. Contains the SoC's
manufacturing revision number.

What: /sys/devices/socX/process
Date: January 2012
contact: Lee Jones <lee.jones@linaro.org>
Description:
Read-only attribute supported ST-Ericsson's silicon. Contains the
the process by which the silicon chip was manufactured.

What: /sys/bus/soc
Date: January 2012
contact: Lee Jones <lee.jones@linaro.org>
Description:
The /sys/bus/soc/ directory contains the usual sub-folders
expected under most buses. /sys/bus/soc/devices is of particular
interest, as it contains a symlink for each SoC device found on
the system. Each symlink points back into the aforementioned
/sys/devices/socX devices.
30 changes: 12 additions & 18 deletions trunk/Documentation/dynamic-debug-howto.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dynamically enabled per-callsite.
Dynamic debug has even more useful features:

* Simple query language allows turning on and off debugging statements by
matching any combination of:
matching any combination of 0 or 1 of:

- source filename
- function name
Expand Down Expand Up @@ -79,31 +79,24 @@ Command Language Reference
==========================

At the lexical level, a command comprises a sequence of words separated
by whitespace characters. Note that newlines are treated as word
separators and do *not* end a command or allow multiple commands to
be done together. So these are all equivalent:
by spaces or tabs. So these are all equivalent:

nullarbor:~ # echo -c 'file svcsock.c line 1603 +p' >
<debugfs>/dynamic_debug/control
nullarbor:~ # echo -c ' file svcsock.c line 1603 +p ' >
<debugfs>/dynamic_debug/control
nullarbor:~ # echo -c 'file svcsock.c\nline 1603 +p' >
<debugfs>/dynamic_debug/control
nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' >
<debugfs>/dynamic_debug/control

Commands are bounded by a write() system call. If you want to do
multiple commands you need to do a separate "echo" for each, like:
Command submissions are bounded by a write() system call.
Multiple commands can be written together, separated by ';' or '\n'.

nullarbor:~ # echo 'file svcsock.c line 1603 +p' > /proc/dprintk ;\
> echo 'file svcsock.c line 1563 +p' > /proc/dprintk
~# echo "func pnpacpi_get_resources +p; func pnp_assign_mem +p" \
> <debugfs>/dynamic_debug/control

or even like:
If your query set is big, you can batch them too:

nullarbor:~ # (
> echo 'file svcsock.c line 1603 +p' ;\
> echo 'file svcsock.c line 1563 +p' ;\
> ) > /proc/dprintk
~# cat query-batch-file > <debugfs>/dynamic_debug/control

At the syntactical level, a command comprises a sequence of match
specifications, followed by a flags change specification.
Expand Down Expand Up @@ -144,11 +137,12 @@ func
func svc_tcp_accept

file
The given string is compared against either the full
pathname or the basename of the source file of each
callsite. Examples:
The given string is compared against either the full pathname, the
src-root relative pathname, or the basename of the source file of
each callsite. Examples:

file svcsock.c
file kernel/freezer.c
file /usr/src/packages/BUILD/sgi-enhancednfs-1.4/default/net/sunrpc/svcsock.c

module
Expand Down
5 changes: 4 additions & 1 deletion trunk/Documentation/filesystems/debugfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ Debugfs is typically mounted with a command like:

mount -t debugfs none /sys/kernel/debug

(Or an equivalent /etc/fstab line).
(Or an equivalent /etc/fstab line).
The debugfs root directory is accessible by anyone by default. To
restrict access to the tree the "uid", "gid" and "mode" mount
options can be used.

Note that the debugfs API is exported GPL-only to modules.

Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-ux500/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ config MACH_U8500
bool "U8500 Development platform"
depends on UX500_SOC_DB8500
select TPS6105X
select SOC_BUS
help
Include support for the mop500 development platform.

Expand Down
31 changes: 16 additions & 15 deletions trunk/arch/arm/mach-ux500/board-mop500-sdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static struct mmci_platform_data mop500_sdi0_data = {
#endif
};

static void sdi0_configure(void)
static void sdi0_configure(struct device *parent)
{
int ret;

Expand All @@ -123,15 +123,15 @@ static void sdi0_configure(void)
gpio_direction_output(sdi0_en, 1);

/* Add the device, force v2 to subrevision 1 */
db8500_add_sdi0(&mop500_sdi0_data, U8500_SDI_V2_PERIPHID);
db8500_add_sdi0(parent, &mop500_sdi0_data, U8500_SDI_V2_PERIPHID);
}

void mop500_sdi_tc35892_init(void)
void mop500_sdi_tc35892_init(struct device *parent)
{
mop500_sdi0_data.gpio_cd = GPIO_SDMMC_CD;
sdi0_en = GPIO_SDMMC_EN;
sdi0_vsel = GPIO_SDMMC_1V8_3V_SEL;
sdi0_configure();
sdi0_configure(parent);
}

/*
Expand Down Expand Up @@ -246,44 +246,45 @@ static struct mmci_platform_data mop500_sdi4_data = {
#endif
};

void __init mop500_sdi_init(void)
void __init mop500_sdi_init(struct device *parent)
{
/* PoP:ed eMMC */
db8500_add_sdi2(&mop500_sdi2_data, U8500_SDI_V2_PERIPHID);
db8500_add_sdi2(parent, &mop500_sdi2_data, U8500_SDI_V2_PERIPHID);
/* On-board eMMC */
db8500_add_sdi4(&mop500_sdi4_data, U8500_SDI_V2_PERIPHID);
db8500_add_sdi4(parent, &mop500_sdi4_data, U8500_SDI_V2_PERIPHID);

/*
* On boards with the TC35892 GPIO expander, sdi0 will finally
* be added when the TC35892 initializes and calls
* mop500_sdi_tc35892_init() above.
*/
}

void __init snowball_sdi_init(void)
void __init snowball_sdi_init(struct device *parent)
{
/* On Snowball MMC_CAP_SD_HIGHSPEED isn't supported (Hardware issue?) */
mop500_sdi0_data.capabilities &= ~MMC_CAP_SD_HIGHSPEED;
/* On-board eMMC */
db8500_add_sdi4(&mop500_sdi4_data, U8500_SDI_V2_PERIPHID);
db8500_add_sdi4(parent, &mop500_sdi4_data, U8500_SDI_V2_PERIPHID);
/* External Micro SD slot */
mop500_sdi0_data.gpio_cd = SNOWBALL_SDMMC_CD_GPIO;
mop500_sdi0_data.cd_invert = true;
sdi0_en = SNOWBALL_SDMMC_EN_GPIO;
sdi0_vsel = SNOWBALL_SDMMC_1V8_3V_GPIO;
sdi0_configure();
sdi0_configure(parent);
}

void __init hrefv60_sdi_init(void)
void __init hrefv60_sdi_init(struct device *parent)
{
/* PoP:ed eMMC */
db8500_add_sdi2(&mop500_sdi2_data, U8500_SDI_V2_PERIPHID);
db8500_add_sdi2(parent, &mop500_sdi2_data, U8500_SDI_V2_PERIPHID);
/* On-board eMMC */
db8500_add_sdi4(&mop500_sdi4_data, U8500_SDI_V2_PERIPHID);
db8500_add_sdi4(parent, &mop500_sdi4_data, U8500_SDI_V2_PERIPHID);
/* External Micro SD slot */
mop500_sdi0_data.gpio_cd = HREFV60_SDMMC_CD_GPIO;
sdi0_en = HREFV60_SDMMC_EN_GPIO;
sdi0_vsel = HREFV60_SDMMC_1V8_3V_GPIO;
sdi0_configure();
sdi0_configure(parent);
/* WLAN SDIO channel */
db8500_add_sdi1(&mop500_sdi1_data, U8500_SDI_V2_PERIPHID);
db8500_add_sdi1(parent, &mop500_sdi1_data, U8500_SDI_V2_PERIPHID);
}
74 changes: 47 additions & 27 deletions trunk/arch/arm/mach-ux500/board-mop500.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,12 @@ static struct tps6105x_platform_data mop500_tps61052_data = {

static void mop500_tc35892_init(struct tc3589x *tc3589x, unsigned int base)
{
mop500_sdi_tc35892_init();
struct device *parent = NULL;
#if 0
/* FIXME: Is the sdi actually part of tc3589x? */
parent = tc3589x->dev;
#endif
mop500_sdi_tc35892_init(parent);
}

static struct tc3589x_gpio_platform_data mop500_tc35892_gpio_data = {
Expand Down Expand Up @@ -353,12 +358,12 @@ U8500_I2C_CONTROLLER(1, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
U8500_I2C_CONTROLLER(2, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
U8500_I2C_CONTROLLER(3, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);

static void __init mop500_i2c_init(void)
static void __init mop500_i2c_init(struct device *parent)
{
db8500_add_i2c0(&u8500_i2c0_data);
db8500_add_i2c1(&u8500_i2c1_data);
db8500_add_i2c2(&u8500_i2c2_data);
db8500_add_i2c3(&u8500_i2c3_data);
db8500_add_i2c0(parent, &u8500_i2c0_data);
db8500_add_i2c1(parent, &u8500_i2c1_data);
db8500_add_i2c2(parent, &u8500_i2c2_data);
db8500_add_i2c3(parent, &u8500_i2c3_data);
}

static struct gpio_keys_button mop500_gpio_keys[] = {
Expand Down Expand Up @@ -451,9 +456,9 @@ static struct pl022_ssp_controller ssp0_platform_data = {
.num_chipselect = 5,
};

static void __init mop500_spi_init(void)
static void __init mop500_spi_init(struct device *parent)
{
db8500_add_ssp0(&ssp0_platform_data);
db8500_add_ssp0(parent, &ssp0_platform_data);
}

#ifdef CONFIG_STE_DMA40
Expand Down Expand Up @@ -587,11 +592,11 @@ static struct amba_pl011_data uart2_plat = {
#endif
};

static void __init mop500_uart_init(void)
static void __init mop500_uart_init(struct device *parent)
{
db8500_add_uart0(&uart0_plat);
db8500_add_uart1(&uart1_plat);
db8500_add_uart2(&uart2_plat);
db8500_add_uart0(parent, &uart0_plat);
db8500_add_uart1(parent, &uart1_plat);
db8500_add_uart2(parent, &uart2_plat);
}

static struct platform_device *snowball_platform_devs[] __initdata = {
Expand All @@ -603,21 +608,26 @@ static struct platform_device *snowball_platform_devs[] __initdata = {

static void __init mop500_init_machine(void)
{
struct device *parent = NULL;
int i2c0_devs;
int i;

mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;

u8500_init_devices();
parent = u8500_init_devices();

mop500_pins_init();

for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
mop500_platform_devs[i]->dev.parent = parent;

platform_add_devices(mop500_platform_devs,
ARRAY_SIZE(mop500_platform_devs));

mop500_i2c_init();
mop500_sdi_init();
mop500_spi_init();
mop500_uart_init();
mop500_i2c_init(parent);
mop500_sdi_init(parent);
mop500_spi_init(parent);
mop500_uart_init(parent);

i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);

Expand All @@ -631,19 +641,24 @@ static void __init mop500_init_machine(void)

static void __init snowball_init_machine(void)
{
struct device *parent = NULL;
int i2c0_devs;
int i;

u8500_init_devices();
parent = u8500_init_devices();

snowball_pins_init();

for (i = 0; i < ARRAY_SIZE(snowball_platform_devs); i++)
snowball_platform_devs[i]->dev.parent = parent;

platform_add_devices(snowball_platform_devs,
ARRAY_SIZE(snowball_platform_devs));

mop500_i2c_init();
snowball_sdi_init();
mop500_spi_init();
mop500_uart_init();
mop500_i2c_init(parent);
snowball_sdi_init(parent);
mop500_spi_init(parent);
mop500_uart_init(parent);

i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
Expand All @@ -656,7 +671,9 @@ static void __init snowball_init_machine(void)

static void __init hrefv60_init_machine(void)
{
struct device *parent = NULL;
int i2c0_devs;
int i;

/*
* The HREFv60 board removed a GPIO expander and routed
Expand All @@ -665,17 +682,20 @@ static void __init hrefv60_init_machine(void)
*/
mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;

u8500_init_devices();
parent = u8500_init_devices();

hrefv60_pins_init();

for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
mop500_platform_devs[i]->dev.parent = parent;

platform_add_devices(mop500_platform_devs,
ARRAY_SIZE(mop500_platform_devs));

mop500_i2c_init();
hrefv60_sdi_init();
mop500_spi_init();
mop500_uart_init();
mop500_i2c_init(parent);
hrefv60_sdi_init(parent);
mop500_spi_init(parent);
mop500_uart_init(parent);

i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);

Expand Down
Loading

0 comments on commit f327e41

Please sign in to comment.