Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

dwc_otg_attr.c File Reference

The diagnostic interface will provide access to the controller for bringing up the hardware and testing. More...

#include "dwc_otg_os_dep.h"
#include "dwc_os.h"
#include "dwc_otg_driver.h"
#include "dwc_otg_attr.h"
#include "dwc_otg_core_if.h"
#include "dwc_otg_pcd_if.h"
#include "dwc_otg_hcd_if.h"

Go to the source code of this file.

Functions for Show/Store of Attributes

#define RW_REG_COUNT   10000000
 Displays the time required to read the GNPTXFSIZ register many times (the output shows the number of times the register is read).
#define MSEC_PER_JIFFIE   1000/HZ
ssize_t regoffset_show (struct device *_dev, struct device_attribute *attr, char *buf)
 Show the register offset of the Register Access.
ssize_t regoffset_store (struct device *_dev, struct device_attribute *attr, const char *buf, size_t count)
 Set the register offset for the next Register Access Read/Write.
ssize_t regvalue_show (struct device *_dev, struct device_attribute *attr, char *buf)
 Show the value of the register at the offset in the reg_offset attribute.
ssize_t regvalue_store (struct device *_dev, struct device_attribute *attr, const char *buf, size_t count)
 Store the value in the register at the offset in the reg_offset attribute.
 DWC_OTG_DEVICE_ATTR_BITFIELD_SHOW (mode,"Mode")
ssize_t hnp_store (struct device *_dev, struct device_attribute *attr, const char *buf, size_t count)
 Set the HNP Request bit.
ssize_t srp_show (struct device *_dev, struct device_attribute *attr, char *buf)
 Show the SRP status bit.
ssize_t srp_store (struct device *_dev, struct device_attribute *attr, const char *buf, size_t count)
 Set the SRP Request bit.
ssize_t buspower_show (struct device *_dev, struct device_attribute *attr, char *buf)
 Show the Bus Power status.
ssize_t buspower_store (struct device *_dev, struct device_attribute *attr, const char *buf, size_t count)
 Set the Bus Power status.
ssize_t bussuspend_show (struct device *_dev, struct device_attribute *attr, char *buf)
 Show the Bus Suspend status.
ssize_t bussuspend_store (struct device *_dev, struct device_attribute *attr, const char *buf, size_t count)
 Set the Bus Suspend status.
ssize_t mode_ch_tim_en_show (struct device *_dev, struct device_attribute *attr, char *buf)
 Show the Mode Change Ready Timer status.
ssize_t mode_ch_tim_en_store (struct device *_dev, struct device_attribute *attr, const char *buf, size_t count)
 Set the Mode Change Ready Timer status.
ssize_t fr_interval_show (struct device *_dev, struct device_attribute *attr, char *buf)
 Show the value of HFIR Frame Interval bitfield.
ssize_t fr_interval_store (struct device *_dev, struct device_attribute *attr, const char *buf, size_t count)
 Set the HFIR Frame Interval value.
ssize_t remote_wakeup_show (struct device *_dev, struct device_attribute *attr, char *buf)
 Show the status of Remote Wakeup.
ssize_t remote_wakeup_store (struct device *_dev, struct device_attribute *attr, const char *buf, size_t count)
 Initiate a remote wakeup of the host.
ssize_t rem_wakeup_pwrdn_show (struct device *_dev, struct device_attribute *attr, char *buf)
 Show the whether core is hibernated or not.
int dwc_otg_device_hibernation_restore (dwc_otg_core_if_t *core_if, int rem_wakeup, int reset)
ssize_t rem_wakeup_pwrdn_store (struct device *_dev, struct device_attribute *attr, const char *buf, size_t count)
 Initiate a remote wakeup of the device to exit from hibernation.
ssize_t disconnect_us (struct device *_dev, struct device_attribute *attr, const char *buf, size_t count)
ssize_t regdump_show (struct device *_dev, struct device_attribute *attr, char *buf)
 Dump global registers and either host or device registers (depending on the current mode of the core).
ssize_t spramdump_show (struct device *_dev, struct device_attribute *attr, char *buf)
 Dump global registers and either host or device registers (depending on the current mode of the core).
ssize_t hcddump_show (struct device *_dev, struct device_attribute *attr, char *buf)
 Dump the current hcd state.
ssize_t hcd_frrem_show (struct device *_dev, struct device_attribute *attr, char *buf)
 Dump the average frame remaining at SOF.
ssize_t rd_reg_test_show (struct device *_dev, struct device_attribute *attr, char *buf)
ssize_t wr_reg_test_show (struct device *_dev, struct device_attribute *attr, char *buf)
 Displays the time required to write the GNPTXFSIZ register many times (the output shows the number of times the register is written).
 regoffset
S_IRUGO S_IWUSR
S_IRUGO regoffset_show
S_IRUGO regoffset_store
 regvalue
S_IRUGO regvalue_show
S_IRUGO regvalue_store
 hnp
 hnp_show
 hnp_store
 srp
 srp_show
 srp_store
 buspower
 buspower_show
 buspower_store
 bussuspend
 bussuspend_show
 bussuspend_store
 mode_ch_tim_en
 mode_ch_tim_en_show
 mode_ch_tim_en_store
 fr_interval
 fr_interval_show
 fr_interval_store
 remote_wakeup
S_IRUGO remote_wakeup_show
S_IRUGO remote_wakeup_store
 rem_wakeup_pwrdn
S_IRUGO rem_wakeup_pwrdn_show
S_IRUGO rem_wakeup_pwrdn_store
 disconnect_us
 regdump
S_IRUGO regdump_show
 spramdump
S_IRUGO spramdump_show
 hcddump
S_IRUGO hcddump_show
 hcd_frrem
S_IRUGO hcd_frrem_show
 rd_reg_test
S_IRUGO rd_reg_test_show
 wr_reg_test
S_IRUGO wr_reg_test_show

Defines

#define DWC_OTG_DEVICE_ATTR_BITFIELD_RW(_otg_attr_name_, _string_)
#define DWC_OTG_DEVICE_ATTR_BITFIELD_RO(_otg_attr_name_, _string_)
#define DWC_OTG_DEVICE_ATTR_REG32_RW(_otg_attr_name_, _addr_, _string_)
#define DWC_OTG_DEVICE_ATTR_REG32_RO(_otg_attr_name_, _addr_, _string_)

Functions

void dwc_otg_attr_create ()
 Create the device files.
void dwc_otg_attr_remove ()
 Remove the device files.


Detailed Description

The diagnostic interface will provide access to the controller for bringing up the hardware and testing.

The Linux driver attributes feature will be used to provide the Linux Diagnostic Interface. These attributes are accessed through sysfs.

Definition in file dwc_otg_attr.c.


Define Documentation

#define DWC_OTG_DEVICE_ATTR_BITFIELD_RW _otg_attr_name_,
_string_   ) 
 

Value:

DWC_OTG_DEVICE_ATTR_BITFIELD_SHOW(_otg_attr_name_,_string_) \
DWC_OTG_DEVICE_ATTR_BITFIELD_STORE(_otg_attr_name_,_string_) \
DEVICE_ATTR(_otg_attr_name_,0644,_otg_attr_name_##_show,_otg_attr_name_##_store);

Definition at line 410 of file dwc_otg_attr.c.

#define DWC_OTG_DEVICE_ATTR_BITFIELD_RO _otg_attr_name_,
_string_   ) 
 

Value:

DWC_OTG_DEVICE_ATTR_BITFIELD_SHOW(_otg_attr_name_,_string_) \
DEVICE_ATTR(_otg_attr_name_,0444,_otg_attr_name_##_show,NULL);

Definition at line 415 of file dwc_otg_attr.c.

#define DWC_OTG_DEVICE_ATTR_REG32_RW _otg_attr_name_,
_addr_,
_string_   ) 
 

Value:

DWC_OTG_DEVICE_ATTR_REG_SHOW(_otg_attr_name_,_string_) \
DWC_OTG_DEVICE_ATTR_REG_STORE(_otg_attr_name_,_string_) \
DEVICE_ATTR(_otg_attr_name_,0644,_otg_attr_name_##_show,_otg_attr_name_##_store);

Definition at line 419 of file dwc_otg_attr.c.

#define DWC_OTG_DEVICE_ATTR_REG32_RO _otg_attr_name_,
_addr_,
_string_   ) 
 

Value:

DWC_OTG_DEVICE_ATTR_REG_SHOW(_otg_attr_name_,_string_) \
DEVICE_ATTR(_otg_attr_name_,0444,_otg_attr_name_##_show,NULL);

Definition at line 424 of file dwc_otg_attr.c.


Function Documentation

ssize_t remote_wakeup_store struct device *  _dev,
struct device_attribute *  attr,
const char *  buf,
size_t  count
[static]
 

Initiate a remote wakeup of the host.

The Device control register Remote Wakeup Signal bit is written if the PCD Remote wakeup enable flag is set.

Definition at line 854 of file dwc_otg_attr.c.

ssize_t rem_wakeup_pwrdn_show struct device *  _dev,
struct device_attribute *  attr,
char *  buf
[static]
 

Show the whether core is hibernated or not.

Definition at line 883 of file dwc_otg_attr.c.

ssize_t hcd_frrem_show struct device *  _dev,
struct device_attribute *  attr,
char *  buf
[static]
 

Dump the average frame remaining at SOF.

This can be used to determine average interrupt latency. Frame remaining is also shown for start transfer and two additional sample points.

Definition at line 1023 of file dwc_otg_attr.c.


Generated on Thu Oct 27 03:56:38 2011 for DesignWare USB 2.0 OTG Controller (DWC_otg) Device Driver by  doxygen 1.3.9.1