]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-powerpc/smu.h
[PATCH] fix rmmod problems with elevator attributes, clean them up
[linux-2.6-omap-h63xx.git] / include / asm-powerpc / smu.h
index 7fae3ce9a8c1f47b03b2d6da72528a2c9171714a..2dc93632f210c94d2fdd18b47dc44ea6d0014bd1 100644 (file)
@@ -22,7 +22,7 @@
 /*
  * Partition info commands
  *
- * These commands are used to retreive the sdb-partition-XX datas from
+ * These commands are used to retrieve the sdb-partition-XX datas from
  * the SMU. The lenght is always 2. First byte is the subcommand code
  * and second byte is the partition ID.
  *
  *
  * SMU_CMD_MISC_ee_GET_DATABLOCK_REC is used, among others, to
  * transfer blocks of data from the SMU. So far, I've decrypted it's
- * usage to retreive partition data. In order to do that, you have to
+ * usage to retrieve partition data. In order to do that, you have to
  * break your transfer in "chunks" since that command cannot transfer
  * more than a chunk at a time. The chunk size used by OF is 0xe bytes,
  * but it seems that the darwin driver will let you do 0x1e bytes if
@@ -358,6 +358,9 @@ extern unsigned long smu_cmdbuf_abs;
  * Kenrel asynchronous i2c interface
  */
 
+#define SMU_I2C_READ_MAX       0x1d
+#define SMU_I2C_WRITE_MAX      0x15
+
 /* SMU i2c header, exactly matches i2c header on wire */
 struct smu_i2c_param
 {
@@ -368,12 +371,9 @@ struct smu_i2c_param
        u8      subaddr[3];     /* subaddress */
        u8      caddr;          /* combined address, filled by SMU driver */
        u8      datalen;        /* length of transfer */
-       u8      data[7];        /* data */
+       u8      data[SMU_I2C_READ_MAX]; /* data */
 };
 
-#define SMU_I2C_READ_MAX       0x0d
-#define SMU_I2C_WRITE_MAX      0x05
-
 struct smu_i2c_cmd
 {
        /* public */
@@ -387,7 +387,7 @@ struct smu_i2c_cmd
        int                     read;
        int                     stage;
        int                     retries;
-       u8                      pdata[0x10];
+       u8                      pdata[32];
        struct list_head        link;
 };
 
@@ -519,7 +519,12 @@ struct smu_sdbp_cpupiddata {
  * if not found. The data format is described below
  */
 extern struct smu_sdbp_header *smu_get_sdb_partition(int id,
-                                                    unsigned int *size);
+                                       unsigned int *size);
+
+/* Get "sdb" partition data from an SMU satellite */
+extern struct smu_sdbp_header *smu_sat_get_sdb_partition(unsigned int sat_id,
+                                       int id, unsigned int *size);
+
 
 #endif /* __KERNEL__ */
 
@@ -556,7 +561,7 @@ struct smu_user_cmd_hdr
        __u32           cmdtype;
 #define SMU_CMDTYPE_SMU                        0       /* SMU command */
 #define SMU_CMDTYPE_WANTS_EVENTS       1       /* switch fd to events mode */
-#define SMU_CMDTYPE_GET_PARTITION      2       /* retreive an sdb partition */
+#define SMU_CMDTYPE_GET_PARTITION      2       /* retrieve an sdb partition */
 
        __u8            cmd;                    /* SMU command byte */
        __u8            pad[3];                 /* padding */