]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - include/fdtdec.h
sunxi: a10-LIME set the cpu clock at boot to 912MHz
[people/ms/u-boot.git] / include / fdtdec.h
index 8cf88dd10b2a9005aa6596eb6412b3ce16c3da26..11a7b86007e6613e61efff0d7cdef07be0aabe3e 100644 (file)
@@ -115,9 +115,6 @@ enum fdt_compat_id {
        COMPAT_NVIDIA_TEGRA20_USB,      /* Tegra20 USB port */
        COMPAT_NVIDIA_TEGRA30_USB,      /* Tegra30 USB port */
        COMPAT_NVIDIA_TEGRA114_USB,     /* Tegra114 USB port */
-       COMPAT_NVIDIA_TEGRA114_I2C,     /* Tegra114 I2C w/single clock source */
-       COMPAT_NVIDIA_TEGRA20_I2C,      /* Tegra20 i2c */
-       COMPAT_NVIDIA_TEGRA20_DVC,      /* Tegra20 dvc (really just i2c) */
        COMPAT_NVIDIA_TEGRA20_EMC,      /* Tegra20 memory controller */
        COMPAT_NVIDIA_TEGRA20_EMC_TABLE, /* Tegra20 memory timing table */
        COMPAT_NVIDIA_TEGRA20_KBC,      /* Tegra20 Keyboard */
@@ -127,9 +124,6 @@ enum fdt_compat_id {
        COMPAT_NVIDIA_TEGRA124_SDMMC,   /* Tegra124 SDMMC controller */
        COMPAT_NVIDIA_TEGRA30_SDMMC,    /* Tegra30 SDMMC controller */
        COMPAT_NVIDIA_TEGRA20_SDMMC,    /* Tegra20 SDMMC controller */
-       COMPAT_NVIDIA_TEGRA20_SFLASH,   /* Tegra 2 SPI flash controller */
-       COMPAT_NVIDIA_TEGRA20_SLINK,    /* Tegra 2 SPI SLINK controller */
-       COMPAT_NVIDIA_TEGRA114_SPI,     /* Tegra 114 SPI controller */
        COMPAT_NVIDIA_TEGRA124_PCIE,    /* Tegra 124 PCIe controller */
        COMPAT_NVIDIA_TEGRA30_PCIE,     /* Tegra 30 PCIe controller */
        COMPAT_NVIDIA_TEGRA20_PCIE,     /* Tegra 20 PCIe controller */
@@ -140,7 +134,6 @@ enum fdt_compat_id {
        COMPAT_SAMSUNG_S3C2440_I2C,     /* Exynos I2C Controller */
        COMPAT_SAMSUNG_EXYNOS5_SOUND,   /* Exynos Sound */
        COMPAT_WOLFSON_WM8994_CODEC,    /* Wolfson WM8994 Sound Codec */
-       COMPAT_SAMSUNG_EXYNOS_SPI,      /* Exynos SPI */
        COMPAT_GOOGLE_CROS_EC,          /* Google CROS_EC Protocol */
        COMPAT_GOOGLE_CROS_EC_KEYB,     /* Google CROS_EC Keyboard */
        COMPAT_SAMSUNG_EXYNOS_EHCI,     /* Exynos EHCI controller */
@@ -174,6 +167,8 @@ enum fdt_compat_id {
        COMPAT_INTEL_GMA,               /* Intel Graphics Media Accelerator */
        COMPAT_AMS_AS3722,              /* AMS AS3722 PMIC */
        COMPAT_INTEL_ICH_SPI,           /* Intel ICH7/9 SPI controller */
+       COMPAT_INTEL_QRK_MRC,           /* Intel Quark MRC */
+       COMPAT_SOCIONEXT_XHCI,          /* Socionext UniPhier xHCI */
 
        COMPAT_COUNT,
 };
@@ -231,39 +226,6 @@ int fdtdec_parse_phandle_with_args(const void *blob, int src_node,
                                   int cell_count, int index,
                                   struct fdtdec_phandle_args *out_args);
 
-/* GPIOs are numbered from 0 */
-enum {
-       FDT_GPIO_NONE = -1U,    /* an invalid GPIO used to end our list */
-
-       FDT_GPIO_ACTIVE_LOW = 1 << 0,   /* input is active low (else high) */
-};
-
-/* This is the state of a GPIO pin as defined by the fdt */
-struct fdt_gpio_state {
-       const char *name;       /* name of the fdt property defining this */
-       uint gpio;              /* GPIO number, or FDT_GPIO_NONE if none */
-       u8 flags;               /* FDT_GPIO_... flags */
-};
-
-/* This tells us whether a fdt_gpio_state record is valid or not */
-#define fdt_gpio_isvalid(x) ((x)->gpio != FDT_GPIO_NONE)
-
-/**
- * Read the GPIO taking into account the polarity of the pin.
- *
- * @param gpio         pointer to the decoded gpio
- * @return value of the gpio if successful, < 0 if unsuccessful
- */
-int fdtdec_get_gpio(struct fdt_gpio_state *gpio);
-
-/**
- * Write the GPIO taking into account the polarity of the pin.
- *
- * @param gpio         pointer to the decoded gpio
- * @return 0 if successful
- */
-int fdtdec_set_gpio(struct fdt_gpio_state *gpio, int val);
-
 /**
  * Find the next numbered alias for a peripheral. This is used to enumerate
  * all the peripherals of a certain type.
@@ -385,7 +347,10 @@ int fdtdec_get_pci_vendev(const void *blob, int node,
 
 /**
  * Look at the pci address of a device node that represents a PCI device
- * and parse the bus, device and function number from it.
+ * and parse the bus, device and function number from it. For some cases
+ * like the bus number encoded in reg property is not correct after pci
+ * enumeration, this function looks through the node's compatible strings
+ * to get these numbers extracted instead.
  *
  * @param blob         FDT blob
  * @param node         node to examine
@@ -644,50 +609,6 @@ const u32 *fdtdec_locate_array(const void *blob, int node,
  */
 int fdtdec_get_bool(const void *blob, int node, const char *prop_name);
 
-/**
- * Decode a single GPIOs from an FDT.
- *
- * If the property is not found, then the GPIO structure will still be
- * initialised, with gpio set to FDT_GPIO_NONE. This makes it easy to
- * provide optional GPIOs.
- *
- * @param blob         FDT blob to use
- * @param node         Node to look at
- * @param prop_name    Node property name
- * @param gpio         gpio elements to fill from FDT
- * @return 0 if ok, -FDT_ERR_NOTFOUND if the property is missing.
- */
-int fdtdec_decode_gpio(const void *blob, int node, const char *prop_name,
-               struct fdt_gpio_state *gpio);
-
-/**
- * Decode a list of GPIOs from an FDT. This creates a list of GPIOs with no
- * terminating item.
- *
- * @param blob         FDT blob to use
- * @param node         Node to look at
- * @param prop_name    Node property name
- * @param gpio         Array of gpio elements to fill from FDT. This will be
- *                     untouched if either 0 or an error is returned
- * @param max_count    Maximum number of elements allowed
- * @return number of GPIOs read if ok, -FDT_ERR_BADLAYOUT if max_count would
- * be exceeded, or -FDT_ERR_NOTFOUND if the property is missing.
- */
-int fdtdec_decode_gpios(const void *blob, int node, const char *prop_name,
-               struct fdt_gpio_state *gpio, int max_count);
-
-/**
- * Set up a GPIO pin according to the provided gpio information. At present this
- * just requests the GPIO.
- *
- * If the gpio is FDT_GPIO_NONE, no action is taken. This makes it easy to
- * deal with optional GPIOs.
- *
- * @param gpio         GPIO info to use for set up
- * @return 0 if all ok or gpio was FDT_GPIO_NONE; -1 on error
- */
-int fdtdec_setup_gpio(struct fdt_gpio_state *gpio);
-
 /**
  * Look in the FDT for a config item with the given name and return its value
  * as a 32-bit integer. The property must have at least 4 bytes of data. The