diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/of.h | 16 | ||||
| -rw-r--r-- | include/linux/of_mtd.h | 19 | ||||
| -rw-r--r-- | include/linux/platform_data/atmel.h | 27 | ||||
| -rw-r--r-- | include/linux/spi/orion_spi.h | 1 |
4 files changed, 62 insertions, 1 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index d46a18ffbebb..ba5d8494f2e1 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
| @@ -361,6 +361,22 @@ static inline int of_machine_is_compatible(const char *compat) | |||
| 361 | #define of_match_node(_matches, _node) NULL | 361 | #define of_match_node(_matches, _node) NULL |
| 362 | #endif /* CONFIG_OF */ | 362 | #endif /* CONFIG_OF */ |
| 363 | 363 | ||
| 364 | /** | ||
| 365 | * of_property_read_bool - Findfrom a property | ||
| 366 | * @np: device node from which the property value is to be read. | ||
| 367 | * @propname: name of the property to be searched. | ||
| 368 | * | ||
| 369 | * Search for a property in a device node. | ||
| 370 | * Returns true if the property exist false otherwise. | ||
| 371 | */ | ||
| 372 | static inline bool of_property_read_bool(const struct device_node *np, | ||
| 373 | const char *propname) | ||
| 374 | { | ||
| 375 | struct property *prop = of_find_property(np, propname, NULL); | ||
| 376 | |||
| 377 | return prop ? true : false; | ||
| 378 | } | ||
| 379 | |||
| 364 | static inline int of_property_read_u32(const struct device_node *np, | 380 | static inline int of_property_read_u32(const struct device_node *np, |
| 365 | const char *propname, | 381 | const char *propname, |
| 366 | u32 *out_value) | 382 | u32 *out_value) |
diff --git a/include/linux/of_mtd.h b/include/linux/of_mtd.h new file mode 100644 index 000000000000..bae1b6094c63 --- /dev/null +++ b/include/linux/of_mtd.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
| 3 | * | ||
| 4 | * OF helpers for mtd. | ||
| 5 | * | ||
| 6 | * This file is released under the GPLv2 | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef __LINUX_OF_MTD_H | ||
| 10 | #define __LINUX_OF_NET_H | ||
| 11 | |||
| 12 | #ifdef CONFIG_OF_MTD | ||
| 13 | #include <linux/of.h> | ||
| 14 | extern const int of_get_nand_ecc_mode(struct device_node *np); | ||
| 15 | int of_get_nand_bus_width(struct device_node *np); | ||
| 16 | bool of_get_nand_on_flash_bbt(struct device_node *np); | ||
| 17 | #endif | ||
| 18 | |||
| 19 | #endif /* __LINUX_OF_MTD_H */ | ||
diff --git a/include/linux/platform_data/atmel.h b/include/linux/platform_data/atmel.h new file mode 100644 index 000000000000..d056263545b1 --- /dev/null +++ b/include/linux/platform_data/atmel.h | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | /* | ||
| 2 | * atmel platform data | ||
| 3 | * | ||
| 4 | * GPL v2 Only | ||
| 5 | */ | ||
| 6 | |||
| 7 | #ifndef __ATMEL_NAND_H__ | ||
| 8 | #define __ATMEL_NAND_H__ | ||
| 9 | |||
| 10 | #include <linux/mtd/nand.h> | ||
| 11 | |||
| 12 | /* NAND / SmartMedia */ | ||
| 13 | struct atmel_nand_data { | ||
| 14 | int enable_pin; /* chip enable */ | ||
| 15 | int det_pin; /* card detect */ | ||
| 16 | int rdy_pin; /* ready/busy */ | ||
| 17 | u8 rdy_pin_active_low; /* rdy_pin value is inverted */ | ||
| 18 | u8 ale; /* address line number connected to ALE */ | ||
| 19 | u8 cle; /* address line number connected to CLE */ | ||
| 20 | u8 bus_width_16; /* buswidth is 16 bit */ | ||
| 21 | u8 ecc_mode; /* ecc mode */ | ||
| 22 | u8 on_flash_bbt; /* bbt on flash */ | ||
| 23 | struct mtd_partition *parts; | ||
| 24 | unsigned int num_parts; | ||
| 25 | }; | ||
| 26 | |||
| 27 | #endif /* __ATMEL_NAND_H__ */ | ||
diff --git a/include/linux/spi/orion_spi.h b/include/linux/spi/orion_spi.h index decf6d8c77b7..b4d9fa6f797c 100644 --- a/include/linux/spi/orion_spi.h +++ b/include/linux/spi/orion_spi.h | |||
| @@ -11,7 +11,6 @@ | |||
| 11 | 11 | ||
| 12 | struct orion_spi_info { | 12 | struct orion_spi_info { |
| 13 | u32 tclk; /* no <linux/clk.h> support yet */ | 13 | u32 tclk; /* no <linux/clk.h> support yet */ |
| 14 | u32 enable_clock_fix; | ||
| 15 | }; | 14 | }; |
| 16 | 15 | ||
| 17 | 16 | ||
