|
@@ -97,7 +97,8 @@ static u8 spu_read_register_value(struct sys_device *sysdev, union spe_reg __iom
|
|
return value.spe[spu->spe_id];
|
|
return value.spe[spu->spe_id];
|
|
}
|
|
}
|
|
|
|
|
|
-static ssize_t spu_show_temp(struct sys_device *sysdev, char *buf)
|
|
|
|
|
|
+static ssize_t spu_show_temp(struct sys_device *sysdev, struct sysdev_attribute *attr,
|
|
|
|
+ char *buf)
|
|
{
|
|
{
|
|
u8 value;
|
|
u8 value;
|
|
struct cbe_pmd_regs __iomem *pmd_regs;
|
|
struct cbe_pmd_regs __iomem *pmd_regs;
|
|
@@ -146,32 +147,38 @@ static ssize_t store_throttle(struct cbe_pmd_regs __iomem *pmd_regs, const char
|
|
return size;
|
|
return size;
|
|
}
|
|
}
|
|
|
|
|
|
-static ssize_t spu_show_throttle_end(struct sys_device *sysdev, char *buf)
|
|
|
|
|
|
+static ssize_t spu_show_throttle_end(struct sys_device *sysdev,
|
|
|
|
+ struct sysdev_attribute *attr, char *buf)
|
|
{
|
|
{
|
|
return show_throttle(get_pmd_regs(sysdev), buf, 0);
|
|
return show_throttle(get_pmd_regs(sysdev), buf, 0);
|
|
}
|
|
}
|
|
|
|
|
|
-static ssize_t spu_show_throttle_begin(struct sys_device *sysdev, char *buf)
|
|
|
|
|
|
+static ssize_t spu_show_throttle_begin(struct sys_device *sysdev,
|
|
|
|
+ struct sysdev_attribute *attr, char *buf)
|
|
{
|
|
{
|
|
return show_throttle(get_pmd_regs(sysdev), buf, 8);
|
|
return show_throttle(get_pmd_regs(sysdev), buf, 8);
|
|
}
|
|
}
|
|
|
|
|
|
-static ssize_t spu_show_throttle_full_stop(struct sys_device *sysdev, char *buf)
|
|
|
|
|
|
+static ssize_t spu_show_throttle_full_stop(struct sys_device *sysdev,
|
|
|
|
+ struct sysdev_attribute *attr, char *buf)
|
|
{
|
|
{
|
|
return show_throttle(get_pmd_regs(sysdev), buf, 16);
|
|
return show_throttle(get_pmd_regs(sysdev), buf, 16);
|
|
}
|
|
}
|
|
|
|
|
|
-static ssize_t spu_store_throttle_end(struct sys_device *sysdev, const char *buf, size_t size)
|
|
|
|
|
|
+static ssize_t spu_store_throttle_end(struct sys_device *sysdev,
|
|
|
|
+ struct sysdev_attribute *attr, const char *buf, size_t size)
|
|
{
|
|
{
|
|
return store_throttle(get_pmd_regs(sysdev), buf, size, 0);
|
|
return store_throttle(get_pmd_regs(sysdev), buf, size, 0);
|
|
}
|
|
}
|
|
|
|
|
|
-static ssize_t spu_store_throttle_begin(struct sys_device *sysdev, const char *buf, size_t size)
|
|
|
|
|
|
+static ssize_t spu_store_throttle_begin(struct sys_device *sysdev,
|
|
|
|
+ struct sysdev_attribute *attr, const char *buf, size_t size)
|
|
{
|
|
{
|
|
return store_throttle(get_pmd_regs(sysdev), buf, size, 8);
|
|
return store_throttle(get_pmd_regs(sysdev), buf, size, 8);
|
|
}
|
|
}
|
|
|
|
|
|
-static ssize_t spu_store_throttle_full_stop(struct sys_device *sysdev, const char *buf, size_t size)
|
|
|
|
|
|
+static ssize_t spu_store_throttle_full_stop(struct sys_device *sysdev,
|
|
|
|
+ struct sysdev_attribute *attr, const char *buf, size_t size)
|
|
{
|
|
{
|
|
return store_throttle(get_pmd_regs(sysdev), buf, size, 16);
|
|
return store_throttle(get_pmd_regs(sysdev), buf, size, 16);
|
|
}
|
|
}
|
|
@@ -192,43 +199,51 @@ static ssize_t ppe_show_temp(struct sys_device *sysdev, char *buf, int pos)
|
|
|
|
|
|
/* shows the temperature of the DTS on the PPE,
|
|
/* shows the temperature of the DTS on the PPE,
|
|
* located near the linear thermal sensor */
|
|
* located near the linear thermal sensor */
|
|
-static ssize_t ppe_show_temp0(struct sys_device *sysdev, char *buf)
|
|
|
|
|
|
+static ssize_t ppe_show_temp0(struct sys_device *sysdev,
|
|
|
|
+ struct sysdev_attribute *attr, char *buf)
|
|
{
|
|
{
|
|
return ppe_show_temp(sysdev, buf, 32);
|
|
return ppe_show_temp(sysdev, buf, 32);
|
|
}
|
|
}
|
|
|
|
|
|
/* shows the temperature of the second DTS on the PPE */
|
|
/* shows the temperature of the second DTS on the PPE */
|
|
-static ssize_t ppe_show_temp1(struct sys_device *sysdev, char *buf)
|
|
|
|
|
|
+static ssize_t ppe_show_temp1(struct sys_device *sysdev,
|
|
|
|
+ struct sysdev_attribute *attr, char *buf)
|
|
{
|
|
{
|
|
return ppe_show_temp(sysdev, buf, 0);
|
|
return ppe_show_temp(sysdev, buf, 0);
|
|
}
|
|
}
|
|
|
|
|
|
-static ssize_t ppe_show_throttle_end(struct sys_device *sysdev, char *buf)
|
|
|
|
|
|
+static ssize_t ppe_show_throttle_end(struct sys_device *sysdev,
|
|
|
|
+ struct sysdev_attribute *attr, char *buf)
|
|
{
|
|
{
|
|
return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 32);
|
|
return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 32);
|
|
}
|
|
}
|
|
|
|
|
|
-static ssize_t ppe_show_throttle_begin(struct sys_device *sysdev, char *buf)
|
|
|
|
|
|
+static ssize_t ppe_show_throttle_begin(struct sys_device *sysdev,
|
|
|
|
+ struct sysdev_attribute *attr, char *buf)
|
|
{
|
|
{
|
|
return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 40);
|
|
return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 40);
|
|
}
|
|
}
|
|
|
|
|
|
-static ssize_t ppe_show_throttle_full_stop(struct sys_device *sysdev, char *buf)
|
|
|
|
|
|
+static ssize_t ppe_show_throttle_full_stop(struct sys_device *sysdev,
|
|
|
|
+ struct sysdev_attribute *attr, char *buf)
|
|
{
|
|
{
|
|
return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 48);
|
|
return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 48);
|
|
}
|
|
}
|
|
|
|
|
|
-static ssize_t ppe_store_throttle_end(struct sys_device *sysdev, const char *buf, size_t size)
|
|
|
|
|
|
+static ssize_t ppe_store_throttle_end(struct sys_device *sysdev,
|
|
|
|
+ struct sysdev_attribute *attr, const char *buf, size_t size)
|
|
{
|
|
{
|
|
return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 32);
|
|
return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 32);
|
|
}
|
|
}
|
|
|
|
|
|
-static ssize_t ppe_store_throttle_begin(struct sys_device *sysdev, const char *buf, size_t size)
|
|
|
|
|
|
+static ssize_t ppe_store_throttle_begin(struct sys_device *sysdev,
|
|
|
|
+ struct sysdev_attribute *attr, const char *buf, size_t size)
|
|
{
|
|
{
|
|
return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 40);
|
|
return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 40);
|
|
}
|
|
}
|
|
|
|
|
|
-static ssize_t ppe_store_throttle_full_stop(struct sys_device *sysdev, const char *buf, size_t size)
|
|
|
|
|
|
+static ssize_t ppe_store_throttle_full_stop(struct sys_device *sysdev,
|
|
|
|
+ struct sysdev_attribute *attr, const char *buf, size_t size)
|
|
{
|
|
{
|
|
return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 48);
|
|
return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 48);
|
|
}
|
|
}
|