From 90454a28d2e825e13f4a0334e017a438e4ccfc8a Mon Sep 17 00:00:00 2001 From: Bruce Beare Date: Fri, 20 Nov 2009 15:46:09 -0800 Subject: [PATCH 001/367] Staging: comedi: pcmad: Cleanup: code indent warning messages use tabs instead of leading spaces Signed-off-by: Bruce Beare Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcmad.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcmad.c b/drivers/staging/comedi/drivers/pcmad.c index acac67090810..202bfd482992 100644 --- a/drivers/staging/comedi/drivers/pcmad.c +++ b/drivers/staging/comedi/drivers/pcmad.c @@ -34,11 +34,11 @@ Configuration options: [0] - I/O port base [1] - unused [2] - Analog input reference - 0 = single ended - 1 = differential + 0 = single ended + 1 = differential [3] - Analog input encoding (must match jumpers) - 0 = straight binary - 1 = two's complement + 0 = straight binary + 1 = two's complement */ #include From 71a74bd951dd292dcda623539fa7b45005d72436 Mon Sep 17 00:00:00 2001 From: Bruce Beare Date: Fri, 20 Nov 2009 15:46:10 -0800 Subject: [PATCH 002/367] Staging: comedi: pcmad: Cleanup: Remove unneeded braces Signed-off-by: Bruce Beare Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcmad.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcmad.c b/drivers/staging/comedi/drivers/pcmad.c index 202bfd482992..787aea28afb8 100644 --- a/drivers/staging/comedi/drivers/pcmad.c +++ b/drivers/staging/comedi/drivers/pcmad.c @@ -113,9 +113,8 @@ static int pcmad_ai_insn_read(struct comedi_device *dev, data[n] = inb(dev->iobase + PCMAD_LSB); data[n] |= (inb(dev->iobase + PCMAD_MSB) << 8); - if (devpriv->twos_comp) { + if (devpriv->twos_comp) data[n] ^= (1 << (this_board->n_ai_bits - 1)); - } } return n; @@ -168,9 +167,8 @@ static int pcmad_detach(struct comedi_device *dev) { printk("comedi%d: pcmad: remove\n", dev->minor); - if (dev->irq) { + if (dev->irq) free_irq(dev->irq, dev); - } if (dev->iobase) release_region(dev->iobase, PCMAD_SIZE); From fcc55b309fc0d037b5d435712cf70589c6a0c7be Mon Sep 17 00:00:00 2001 From: Bruce Beare Date: Fri, 20 Nov 2009 15:46:11 -0800 Subject: [PATCH 003/367] Staging: comedi: pcmad: [PATCH 3/3] cleanup printk() warnings cleanup printk() warnings for including the facility level. cleanup add a printk("\n") to terminate the print for the non-error case. Signed-off-by: Bruce Beare Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcmad.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcmad.c b/drivers/staging/comedi/drivers/pcmad.c index 787aea28afb8..44ed777599c4 100644 --- a/drivers/staging/comedi/drivers/pcmad.c +++ b/drivers/staging/comedi/drivers/pcmad.c @@ -134,11 +134,12 @@ static int pcmad_attach(struct comedi_device *dev, struct comedi_devconfig *it) unsigned long iobase; iobase = it->options[0]; - printk("comedi%d: pcmad: 0x%04lx ", dev->minor, iobase); + printk(KERN_NOTICE "comedi%d: pcmad: 0x%04lx ", dev->minor, iobase); if (!request_region(iobase, PCMAD_SIZE, "pcmad")) { - printk("I/O port conflict\n"); + printk(KERN_CONT "I/O port conflict\n"); return -EIO; } + printk(KERN_CONT "\n"); dev->iobase = iobase; ret = alloc_subdevices(dev, 1); @@ -165,7 +166,7 @@ static int pcmad_attach(struct comedi_device *dev, struct comedi_devconfig *it) static int pcmad_detach(struct comedi_device *dev) { - printk("comedi%d: pcmad: remove\n", dev->minor); + printk(KERN_NOTICE "comedi%d: pcmad: remove\n", dev->minor); if (dev->irq) free_irq(dev->irq, dev); From e79753edf88d858a3783c946c12cc4726f6590f6 Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Sat, 21 Nov 2009 09:16:12 +0100 Subject: [PATCH 004/367] Staging: dream: add missing include files Add missing files/includes neccessary for Dream compilation. Mark flash support as broken -- it is not present on released Dream, anyway. Signed-off-by: Pavel Machek Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dream/camera/Kconfig | 2 +- drivers/staging/dream/camera/Makefile | 1 + .../dream/include/linux/android_pmem.h | 80 ++ .../staging/dream/include/linux/gpio_event.h | 154 +++ .../staging/dream/include/linux/msm_adsp.h | 84 ++ .../staging/dream/include/linux/msm_audio.h | 115 +++ .../dream/include/linux/msm_rpcrouter.h | 47 + .../staging/dream/include/linux/wakelock.h | 91 ++ drivers/staging/dream/include/mach/camera.h | 279 ++++++ drivers/staging/dream/include/mach/msm_adsp.h | 112 +++ .../dream/include/mach/msm_rpcrouter.h | 179 ++++ drivers/staging/dream/include/mach/msm_smd.h | 107 ++ .../include/mach/qdsp5/qdsp5audplaycmdi.h | 94 ++ .../include/mach/qdsp5/qdsp5audplaymsg.h | 70 ++ .../dream/include/mach/qdsp5/qdsp5audppcmdi.h | 914 ++++++++++++++++++ .../dream/include/mach/qdsp5/qdsp5audppmsg.h | 318 ++++++ .../include/mach/qdsp5/qdsp5audpreproccmdi.h | 256 +++++ .../include/mach/qdsp5/qdsp5audpreprocmsg.h | 85 ++ .../include/mach/qdsp5/qdsp5audreccmdi.h | 176 ++++ .../dream/include/mach/qdsp5/qdsp5audrecmsg.h | 127 +++ .../dream/include/mach/qdsp5/qdsp5jpegcmdi.h | 376 +++++++ .../dream/include/mach/qdsp5/qdsp5jpegmsg.h | 177 ++++ .../dream/include/mach/qdsp5/qdsp5lpmcmdi.h | 82 ++ .../dream/include/mach/qdsp5/qdsp5lpmmsg.h | 80 ++ .../dream/include/mach/qdsp5/qdsp5vdeccmdi.h | 235 +++++ .../dream/include/mach/qdsp5/qdsp5vdecmsg.h | 107 ++ .../dream/include/mach/qdsp5/qdsp5venccmdi.h | 212 ++++ .../dream/include/mach/qdsp5/qdsp5vfecmdi.h | 910 +++++++++++++++++ .../dream/include/mach/qdsp5/qdsp5vfemsg.h | 290 ++++++ .../staging/dream/include/media/msm_camera.h | 388 ++++++++ drivers/staging/dream/qdsp5/Makefile | 1 + drivers/staging/dream/smd/Makefile | 1 + 32 files changed, 6149 insertions(+), 1 deletion(-) create mode 100644 drivers/staging/dream/include/linux/android_pmem.h create mode 100644 drivers/staging/dream/include/linux/gpio_event.h create mode 100644 drivers/staging/dream/include/linux/msm_adsp.h create mode 100644 drivers/staging/dream/include/linux/msm_audio.h create mode 100644 drivers/staging/dream/include/linux/msm_rpcrouter.h create mode 100644 drivers/staging/dream/include/linux/wakelock.h create mode 100644 drivers/staging/dream/include/mach/camera.h create mode 100644 drivers/staging/dream/include/mach/msm_adsp.h create mode 100644 drivers/staging/dream/include/mach/msm_rpcrouter.h create mode 100644 drivers/staging/dream/include/mach/msm_smd.h create mode 100644 drivers/staging/dream/include/mach/qdsp5/qdsp5audplaycmdi.h create mode 100644 drivers/staging/dream/include/mach/qdsp5/qdsp5audplaymsg.h create mode 100644 drivers/staging/dream/include/mach/qdsp5/qdsp5audppcmdi.h create mode 100644 drivers/staging/dream/include/mach/qdsp5/qdsp5audppmsg.h create mode 100644 drivers/staging/dream/include/mach/qdsp5/qdsp5audpreproccmdi.h create mode 100644 drivers/staging/dream/include/mach/qdsp5/qdsp5audpreprocmsg.h create mode 100644 drivers/staging/dream/include/mach/qdsp5/qdsp5audreccmdi.h create mode 100644 drivers/staging/dream/include/mach/qdsp5/qdsp5audrecmsg.h create mode 100644 drivers/staging/dream/include/mach/qdsp5/qdsp5jpegcmdi.h create mode 100644 drivers/staging/dream/include/mach/qdsp5/qdsp5jpegmsg.h create mode 100644 drivers/staging/dream/include/mach/qdsp5/qdsp5lpmcmdi.h create mode 100644 drivers/staging/dream/include/mach/qdsp5/qdsp5lpmmsg.h create mode 100644 drivers/staging/dream/include/mach/qdsp5/qdsp5vdeccmdi.h create mode 100644 drivers/staging/dream/include/mach/qdsp5/qdsp5vdecmsg.h create mode 100644 drivers/staging/dream/include/mach/qdsp5/qdsp5venccmdi.h create mode 100644 drivers/staging/dream/include/mach/qdsp5/qdsp5vfecmdi.h create mode 100644 drivers/staging/dream/include/mach/qdsp5/qdsp5vfemsg.h create mode 100644 drivers/staging/dream/include/media/msm_camera.h diff --git a/drivers/staging/dream/camera/Kconfig b/drivers/staging/dream/camera/Kconfig index 0a3e903b3363..bfb6d241d807 100644 --- a/drivers/staging/dream/camera/Kconfig +++ b/drivers/staging/dream/camera/Kconfig @@ -15,7 +15,7 @@ config MSM_CAMERA_DEBUG config MSM_CAMERA_FLASH bool "Qualcomm MSM camera flash support" - depends on MSM_CAMERA + depends on MSM_CAMERA && BROKEN ---help--- Enable support for LED flash for msm camera diff --git a/drivers/staging/dream/camera/Makefile b/drivers/staging/dream/camera/Makefile index 4429ae5fcafd..db228d7d1136 100644 --- a/drivers/staging/dream/camera/Makefile +++ b/drivers/staging/dream/camera/Makefile @@ -1,3 +1,4 @@ +EXTRA_CFLAGS=-Idrivers/staging/dream/include obj-$(CONFIG_MT9T013) += mt9t013.o mt9t013_reg.o obj-$(CONFIG_MT9D112) += mt9d112.o mt9d112_reg.o obj-$(CONFIG_MT9P012) += mt9p012_fox.o mt9p012_reg.o diff --git a/drivers/staging/dream/include/linux/android_pmem.h b/drivers/staging/dream/include/linux/android_pmem.h new file mode 100644 index 000000000000..2fc05d7d335b --- /dev/null +++ b/drivers/staging/dream/include/linux/android_pmem.h @@ -0,0 +1,80 @@ +/* drivers/staging/dream/include/linux/android_pmem.h + * + * Copyright (C) 2007 Google, Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#ifndef _ANDROID_PMEM_H_ +#define _ANDROID_PMEM_H_ + +#define PMEM_IOCTL_MAGIC 'p' +#define PMEM_GET_PHYS _IOW(PMEM_IOCTL_MAGIC, 1, unsigned int) +#define PMEM_MAP _IOW(PMEM_IOCTL_MAGIC, 2, unsigned int) +#define PMEM_GET_SIZE _IOW(PMEM_IOCTL_MAGIC, 3, unsigned int) +#define PMEM_UNMAP _IOW(PMEM_IOCTL_MAGIC, 4, unsigned int) +/* This ioctl will allocate pmem space, backing the file, it will fail + * if the file already has an allocation, pass it the len as the argument + * to the ioctl */ +#define PMEM_ALLOCATE _IOW(PMEM_IOCTL_MAGIC, 5, unsigned int) +/* This will connect a one pmem file to another, pass the file that is already + * backed in memory as the argument to the ioctl + */ +#define PMEM_CONNECT _IOW(PMEM_IOCTL_MAGIC, 6, unsigned int) +/* Returns the total size of the pmem region it is sent to as a pmem_region + * struct (with offset set to 0). + */ +#define PMEM_GET_TOTAL_SIZE _IOW(PMEM_IOCTL_MAGIC, 7, unsigned int) +/* Revokes gpu registers and resets the gpu. Pass a pointer to the + * start of the mapped gpu regs (the vaddr returned by mmap) as the argument. + */ +#define HW3D_REVOKE_GPU _IOW(PMEM_IOCTL_MAGIC, 8, unsigned int) +#define HW3D_GRANT_GPU _IOW(PMEM_IOCTL_MAGIC, 9, unsigned int) +#define HW3D_WAIT_FOR_INTERRUPT _IOW(PMEM_IOCTL_MAGIC, 10, unsigned int) + +int get_pmem_file(int fd, unsigned long *start, unsigned long *vstart, + unsigned long *end, struct file **filp); +int get_pmem_user_addr(struct file *file, unsigned long *start, + unsigned long *end); +void put_pmem_file(struct file* file); +void flush_pmem_file(struct file *file, unsigned long start, unsigned long len); + +struct android_pmem_platform_data +{ + const char* name; + /* starting physical address of memory region */ + unsigned long start; + /* size of memory region */ + unsigned long size; + /* set to indicate the region should not be managed with an allocator */ + unsigned no_allocator; + /* set to indicate maps of this region should be cached, if a mix of + * cached and uncached is desired, set this and open the device with + * O_SYNC to get an uncached region */ + unsigned cached; + /* The MSM7k has bits to enable a write buffer in the bus controller*/ + unsigned buffered; +}; + +struct pmem_region { + unsigned long offset; + unsigned long len; +}; + +int pmem_setup(struct android_pmem_platform_data *pdata, + long (*ioctl)(struct file *, unsigned int, unsigned long), + int (*release)(struct inode *, struct file *)); + +int pmem_remap(struct pmem_region *region, struct file *file, + unsigned operation); + +#endif //_ANDROID_PPP_H_ + diff --git a/drivers/staging/dream/include/linux/gpio_event.h b/drivers/staging/dream/include/linux/gpio_event.h new file mode 100644 index 000000000000..ffc5da392ad7 --- /dev/null +++ b/drivers/staging/dream/include/linux/gpio_event.h @@ -0,0 +1,154 @@ +/* drivers/staging/dream/include/linux/gpio_event.h + * + * Copyright (C) 2007 Google, Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#ifndef _LINUX_GPIO_EVENT_H +#define _LINUX_GPIO_EVENT_H + +#include + +enum { + GPIO_EVENT_FUNC_UNINIT = 0x0, + GPIO_EVENT_FUNC_INIT = 0x1, + GPIO_EVENT_FUNC_SUSPEND = 0x2, + GPIO_EVENT_FUNC_RESUME = 0x3, +}; +struct gpio_event_info { + int (*func)(struct input_dev *input_dev, + struct gpio_event_info *info, + void **data, int func); + int (*event)(struct input_dev *input_dev, + struct gpio_event_info *info, + void **data, unsigned int type, + unsigned int code, int value); /* out events */ +}; + +struct gpio_event_platform_data { + const char *name; + struct gpio_event_info **info; + size_t info_count; + int (*power)(const struct gpio_event_platform_data *pdata, bool on); +}; + +#define GPIO_EVENT_DEV_NAME "gpio-event" + +/* Key matrix */ + +enum gpio_event_matrix_flags { + /* unset: drive active output low, set: drive active output high */ + GPIOKPF_ACTIVE_HIGH = 1U << 0, + GPIOKPF_DEBOUNCE = 1U << 1, + GPIOKPF_REMOVE_SOME_PHANTOM_KEYS = 1U << 2, + GPIOKPF_REMOVE_PHANTOM_KEYS = GPIOKPF_REMOVE_SOME_PHANTOM_KEYS | + GPIOKPF_DEBOUNCE, + GPIOKPF_DRIVE_INACTIVE = 1U << 3, + GPIOKPF_LEVEL_TRIGGERED_IRQ = 1U << 4, + GPIOKPF_PRINT_UNMAPPED_KEYS = 1U << 16, + GPIOKPF_PRINT_MAPPED_KEYS = 1U << 17, + GPIOKPF_PRINT_PHANTOM_KEYS = 1U << 18, +}; + +extern int gpio_event_matrix_func(struct input_dev *input_dev, + struct gpio_event_info *info, void **data, int func); +struct gpio_event_matrix_info { + /* initialize to gpio_event_matrix_func */ + struct gpio_event_info info; + /* size must be ninputs * noutputs */ + const unsigned short *keymap; + unsigned int *input_gpios; + unsigned int *output_gpios; + unsigned int ninputs; + unsigned int noutputs; + /* time to wait before reading inputs after driving each output */ + ktime_t settle_time; + /* time to wait before scanning the keypad a second time */ + ktime_t debounce_delay; + ktime_t poll_time; + unsigned flags; +}; + +/* Directly connected inputs and outputs */ + +enum gpio_event_direct_flags { + GPIOEDF_ACTIVE_HIGH = 1U << 0, +/* GPIOEDF_USE_DOWN_IRQ = 1U << 1, */ +/* GPIOEDF_USE_IRQ = (1U << 2) | GPIOIDF_USE_DOWN_IRQ, */ + GPIOEDF_PRINT_KEYS = 1U << 8, + GPIOEDF_PRINT_KEY_DEBOUNCE = 1U << 9, +}; + +struct gpio_event_direct_entry { + uint32_t gpio:23; + uint32_t code:9; +}; + +/* inputs */ +extern int gpio_event_input_func(struct input_dev *input_dev, + struct gpio_event_info *info, void **data, int func); +struct gpio_event_input_info { + /* initialize to gpio_event_input_func */ + struct gpio_event_info info; + ktime_t debounce_time; + ktime_t poll_time; + uint16_t flags; + uint16_t type; + const struct gpio_event_direct_entry *keymap; + size_t keymap_size; +}; + +/* outputs */ +extern int gpio_event_output_func(struct input_dev *input_dev, + struct gpio_event_info *info, void **data, int func); +extern int gpio_event_output_event(struct input_dev *input_dev, + struct gpio_event_info *info, void **data, + unsigned int type, unsigned int code, int value); +struct gpio_event_output_info { + /* initialize to gpio_event_output_func and gpio_event_output_event */ + struct gpio_event_info info; + uint16_t flags; + uint16_t type; + const struct gpio_event_direct_entry *keymap; + size_t keymap_size; +}; + + +/* axes */ + +enum gpio_event_axis_flags { + GPIOEAF_PRINT_UNKNOWN_DIRECTION = 1U << 16, + GPIOEAF_PRINT_RAW = 1U << 17, + GPIOEAF_PRINT_EVENT = 1U << 18, +}; + +extern int gpio_event_axis_func(struct input_dev *input_dev, + struct gpio_event_info *info, void **data, int func); +struct gpio_event_axis_info { + /* initialize to gpio_event_axis_func */ + struct gpio_event_info info; + uint8_t count; + uint8_t type; /* EV_REL or EV_ABS */ + uint16_t code; + uint16_t decoded_size; + uint16_t (*map)(struct gpio_event_axis_info *info, uint16_t in); + uint32_t *gpio; + uint32_t flags; +}; +#define gpio_axis_2bit_gray_map gpio_axis_4bit_gray_map +#define gpio_axis_3bit_gray_map gpio_axis_4bit_gray_map +uint16_t gpio_axis_4bit_gray_map( + struct gpio_event_axis_info *info, uint16_t in); +uint16_t gpio_axis_5bit_singletrack_map( + struct gpio_event_axis_info *info, uint16_t in); + +#endif diff --git a/drivers/staging/dream/include/linux/msm_adsp.h b/drivers/staging/dream/include/linux/msm_adsp.h new file mode 100644 index 000000000000..e775f3e94f1d --- /dev/null +++ b/drivers/staging/dream/include/linux/msm_adsp.h @@ -0,0 +1,84 @@ +/* drivers/staging/dream/include/linux/msm_adsp.h + * + * Copyright (c) QUALCOMM Incorporated + * Copyright (C) 2007 Google, Inc. + * Author: Iliyan Malchev + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ +#ifndef __LINUX_MSM_ADSP_H +#define __LINUX_MSM_ADSP_H + +#include +#include + +#define ADSP_IOCTL_MAGIC 'q' + +/* ADSP_IOCTL_WRITE_COMMAND */ +struct adsp_command_t { + uint16_t queue; + uint32_t len; /* bytes */ + uint8_t *data; +}; + +/* ADSP_IOCTL_GET_EVENT */ +struct adsp_event_t { + uint16_t type; /* 1 == event (RPC), 0 == message (adsp) */ + uint32_t timeout_ms; /* -1 for infinite, 0 for immediate return */ + uint16_t msg_id; + uint16_t flags; /* 1 == 16--bit event, 0 == 32-bit event */ + uint32_t len; /* size in, number of bytes out */ + uint8_t *data; +}; + +#define ADSP_IOCTL_ENABLE \ + _IOR(ADSP_IOCTL_MAGIC, 1, unsigned) + +#define ADSP_IOCTL_DISABLE \ + _IOR(ADSP_IOCTL_MAGIC, 2, unsigned) + +#define ADSP_IOCTL_DISABLE_ACK \ + _IOR(ADSP_IOCTL_MAGIC, 3, unsigned) + +#define ADSP_IOCTL_WRITE_COMMAND \ + _IOR(ADSP_IOCTL_MAGIC, 4, struct adsp_command_t *) + +#define ADSP_IOCTL_GET_EVENT \ + _IOWR(ADSP_IOCTL_MAGIC, 5, struct adsp_event_data_t *) + +#define ADSP_IOCTL_SET_CLKRATE \ + _IOR(ADSP_IOCTL_MAGIC, 6, unsigned) + +#define ADSP_IOCTL_DISABLE_EVENT_RSP \ + _IOR(ADSP_IOCTL_MAGIC, 10, unsigned) + +struct adsp_pmem_info { + int fd; + void *vaddr; +}; + +#define ADSP_IOCTL_REGISTER_PMEM \ + _IOW(ADSP_IOCTL_MAGIC, 13, unsigned) + +#define ADSP_IOCTL_UNREGISTER_PMEM \ + _IOW(ADSP_IOCTL_MAGIC, 14, unsigned) + +/* Cause any further GET_EVENT ioctls to fail (-ENODEV) + * until the device is closed and reopened. Useful for + * terminating event dispatch threads + */ +#define ADSP_IOCTL_ABORT_EVENT_READ \ + _IOW(ADSP_IOCTL_MAGIC, 15, unsigned) + +#define ADSP_IOCTL_LINK_TASK \ + _IOW(ADSP_IOCTL_MAGIC, 16, unsigned) + +#endif diff --git a/drivers/staging/dream/include/linux/msm_audio.h b/drivers/staging/dream/include/linux/msm_audio.h new file mode 100644 index 000000000000..cfbdaa0d98b2 --- /dev/null +++ b/drivers/staging/dream/include/linux/msm_audio.h @@ -0,0 +1,115 @@ +/* drivers/staging/dream/include/linux/msm_audio.h + * + * Copyright (C) 2008 Google, Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#ifndef __LINUX_MSM_AUDIO_H +#define __LINUX_MSM_AUDIO_H + +#include +#include +#include + +/* PCM Audio */ + +#define AUDIO_IOCTL_MAGIC 'a' + +#define AUDIO_START _IOW(AUDIO_IOCTL_MAGIC, 0, unsigned) +#define AUDIO_STOP _IOW(AUDIO_IOCTL_MAGIC, 1, unsigned) +#define AUDIO_FLUSH _IOW(AUDIO_IOCTL_MAGIC, 2, unsigned) +#define AUDIO_GET_CONFIG _IOR(AUDIO_IOCTL_MAGIC, 3, unsigned) +#define AUDIO_SET_CONFIG _IOW(AUDIO_IOCTL_MAGIC, 4, unsigned) +#define AUDIO_GET_STATS _IOR(AUDIO_IOCTL_MAGIC, 5, unsigned) +#define AUDIO_ENABLE_AUDPP _IOW(AUDIO_IOCTL_MAGIC, 6, unsigned) +#define AUDIO_SET_ADRC _IOW(AUDIO_IOCTL_MAGIC, 7, unsigned) +#define AUDIO_SET_EQ _IOW(AUDIO_IOCTL_MAGIC, 8, unsigned) +#define AUDIO_SET_RX_IIR _IOW(AUDIO_IOCTL_MAGIC, 9, unsigned) +#define AUDIO_SET_VOLUME _IOW(AUDIO_IOCTL_MAGIC, 10, unsigned) +#define AUDIO_ENABLE_AUDPRE _IOW(AUDIO_IOCTL_MAGIC, 11, unsigned) +#define AUDIO_SET_AGC _IOW(AUDIO_IOCTL_MAGIC, 12, unsigned) +#define AUDIO_SET_NS _IOW(AUDIO_IOCTL_MAGIC, 13, unsigned) +#define AUDIO_SET_TX_IIR _IOW(AUDIO_IOCTL_MAGIC, 14, unsigned) +#define AUDIO_PAUSE _IOW(AUDIO_IOCTL_MAGIC, 15, unsigned) +#define AUDIO_GET_PCM_CONFIG _IOR(AUDIO_IOCTL_MAGIC, 30, unsigned) +#define AUDIO_SET_PCM_CONFIG _IOW(AUDIO_IOCTL_MAGIC, 31, unsigned) +#define AUDIO_SWITCH_DEVICE _IOW(AUDIO_IOCTL_MAGIC, 32, unsigned) + +#define AUDIO_MAX_COMMON_IOCTL_NUM 100 + +#define AUDIO_MAX_COMMON_IOCTL_NUM 100 + +struct msm_audio_config { + uint32_t buffer_size; + uint32_t buffer_count; + uint32_t channel_count; + uint32_t sample_rate; + uint32_t type; + uint32_t unused[3]; +}; + +struct msm_audio_stats { + uint32_t byte_count; + uint32_t sample_count; + uint32_t unused[2]; +}; + +/* Audio routing */ + +#define SND_IOCTL_MAGIC 's' + +#define SND_MUTE_UNMUTED 0 +#define SND_MUTE_MUTED 1 + +struct msm_snd_device_config { + uint32_t device; + uint32_t ear_mute; + uint32_t mic_mute; +}; + +#define SND_SET_DEVICE _IOW(SND_IOCTL_MAGIC, 2, struct msm_device_config *) + +#define SND_METHOD_VOICE 0 + +struct msm_snd_volume_config { + uint32_t device; + uint32_t method; + uint32_t volume; +}; + +#define SND_SET_VOLUME _IOW(SND_IOCTL_MAGIC, 3, struct msm_snd_volume_config *) + +/* Returns the number of SND endpoints supported. */ + +#define SND_GET_NUM_ENDPOINTS _IOR(SND_IOCTL_MAGIC, 4, unsigned *) + +struct msm_snd_endpoint { + int id; /* input and output */ + char name[64]; /* output only */ +}; + +/* Takes an index between 0 and one less than the number returned by + * SND_GET_NUM_ENDPOINTS, and returns the SND index and name of a + * SND endpoint. On input, the .id field contains the number of the + * endpoint, and on exit it contains the SND index, while .name contains + * the description of the endpoint. + */ + +#define SND_GET_ENDPOINT _IOWR(SND_IOCTL_MAGIC, 5, struct msm_snd_endpoint *) + +struct msm_audio_pcm_config { + uint32_t pcm_feedback; /* 0 - disable > 0 - enable */ + uint32_t buffer_count; /* Number of buffers to allocate */ + uint32_t buffer_size; /* Size of buffer for capturing of + PCM samples */ +}; +#endif diff --git a/drivers/staging/dream/include/linux/msm_rpcrouter.h b/drivers/staging/dream/include/linux/msm_rpcrouter.h new file mode 100644 index 000000000000..64845fb481f1 --- /dev/null +++ b/drivers/staging/dream/include/linux/msm_rpcrouter.h @@ -0,0 +1,47 @@ +/* drivers/staging/dream/include/linux/msm_rpcrouter.h + * + * Copyright (c) QUALCOMM Incorporated + * Copyright (C) 2007 Google, Inc. + * Author: San Mehat + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ +#ifndef __LINUX_MSM_RPCROUTER_H +#define __LINUX_MSM_RPCROUTER_H + +#include +#include + +#define RPC_ROUTER_VERSION_V1 0x00010000 + +struct rpcrouter_ioctl_server_args { + uint32_t prog; + uint32_t vers; +}; + +#define RPC_ROUTER_IOCTL_MAGIC (0xC1) + +#define RPC_ROUTER_IOCTL_GET_VERSION \ + _IOR(RPC_ROUTER_IOCTL_MAGIC, 0, unsigned int) + +#define RPC_ROUTER_IOCTL_GET_MTU \ + _IOR(RPC_ROUTER_IOCTL_MAGIC, 1, unsigned int) + +#define RPC_ROUTER_IOCTL_REGISTER_SERVER \ + _IOWR(RPC_ROUTER_IOCTL_MAGIC, 2, unsigned int) + +#define RPC_ROUTER_IOCTL_UNREGISTER_SERVER \ + _IOWR(RPC_ROUTER_IOCTL_MAGIC, 3, unsigned int) + +#define RPC_ROUTER_IOCTL_GET_MINOR_VERSION \ + _IOW(RPC_ROUTER_IOCTL_MAGIC, 4, unsigned int) + +#endif diff --git a/drivers/staging/dream/include/linux/wakelock.h b/drivers/staging/dream/include/linux/wakelock.h new file mode 100644 index 000000000000..93c31a4d1ca7 --- /dev/null +++ b/drivers/staging/dream/include/linux/wakelock.h @@ -0,0 +1,91 @@ +/* drivers/staging/dream/include/linux/wakelock.h + * + * Copyright (C) 2007-2008 Google, Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#ifndef _LINUX_WAKELOCK_H +#define _LINUX_WAKELOCK_H + +#include +#include + +/* A wake_lock prevents the system from entering suspend or other low power + * states when active. If the type is set to WAKE_LOCK_SUSPEND, the wake_lock + * prevents a full system suspend. If the type is WAKE_LOCK_IDLE, low power + * states that cause large interrupt latencies or that disable a set of + * interrupts will not entered from idle until the wake_locks are released. + */ + +enum { + WAKE_LOCK_SUSPEND, /* Prevent suspend */ + WAKE_LOCK_IDLE, /* Prevent low power idle */ + WAKE_LOCK_TYPE_COUNT +}; + +struct wake_lock { +#ifdef CONFIG_HAS_WAKELOCK + struct list_head link; + int flags; + const char *name; + unsigned long expires; +#ifdef CONFIG_WAKELOCK_STAT + struct { + int count; + int expire_count; + int wakeup_count; + ktime_t total_time; + ktime_t prevent_suspend_time; + ktime_t max_time; + ktime_t last_time; + } stat; +#endif +#endif +}; + +#ifdef CONFIG_HAS_WAKELOCK + +void wake_lock_init(struct wake_lock *lock, int type, const char *name); +void wake_lock_destroy(struct wake_lock *lock); +void wake_lock(struct wake_lock *lock); +void wake_lock_timeout(struct wake_lock *lock, long timeout); +void wake_unlock(struct wake_lock *lock); + +/* wake_lock_active returns a non-zero value if the wake_lock is currently + * locked. If the wake_lock has a timeout, it does not check the timeout + * but if the timeout had aready been checked it will return 0. + */ +int wake_lock_active(struct wake_lock *lock); + +/* has_wake_lock returns 0 if no wake locks of the specified type are active, + * and non-zero if one or more wake locks are held. Specifically it returns + * -1 if one or more wake locks with no timeout are active or the + * number of jiffies until all active wake locks time out. + */ +long has_wake_lock(int type); + +#else + +static inline void wake_lock_init(struct wake_lock *lock, int type, + const char *name) {} +static inline void wake_lock_destroy(struct wake_lock *lock) {} +static inline void wake_lock(struct wake_lock *lock) {} +static inline void wake_lock_timeout(struct wake_lock *lock, long timeout) {} +static inline void wake_unlock(struct wake_lock *lock) {} + +static inline int wake_lock_active(struct wake_lock *lock) { return 0; } +static inline long has_wake_lock(int type) { return 0; } + +#endif + +#endif + diff --git a/drivers/staging/dream/include/mach/camera.h b/drivers/staging/dream/include/mach/camera.h new file mode 100644 index 000000000000..c20f0423abd4 --- /dev/null +++ b/drivers/staging/dream/include/mach/camera.h @@ -0,0 +1,279 @@ +/* + * Copyright (C) 2008-2009 QUALCOMM Incorporated. + */ + +#ifndef __ASM__ARCH_CAMERA_H +#define __ASM__ARCH_CAMERA_H + +#include +#include +#include +#include +#include "linux/types.h" + +#include +#include + +#ifdef CONFIG_MSM_CAMERA_DEBUG +#define CDBG(fmt, args...) printk(KERN_INFO "msm_camera: " fmt, ##args) +#else +#define CDBG(fmt, args...) do { } while (0) +#endif + +#define MSM_CAMERA_MSG 0 +#define MSM_CAMERA_EVT 1 +#define NUM_WB_EXP_NEUTRAL_REGION_LINES 4 +#define NUM_WB_EXP_STAT_OUTPUT_BUFFERS 3 +#define NUM_AUTOFOCUS_MULTI_WINDOW_GRIDS 16 +#define NUM_AF_STAT_OUTPUT_BUFFERS 3 + +enum msm_queue { + MSM_CAM_Q_CTRL, /* control command or control command status */ + MSM_CAM_Q_VFE_EVT, /* adsp event */ + MSM_CAM_Q_VFE_MSG, /* adsp message */ + MSM_CAM_Q_V4L2_REQ, /* v4l2 request */ +}; + +enum vfe_resp_msg { + VFE_EVENT, + VFE_MSG_GENERAL, + VFE_MSG_SNAPSHOT, + VFE_MSG_OUTPUT1, + VFE_MSG_OUTPUT2, + VFE_MSG_STATS_AF, + VFE_MSG_STATS_WE, +}; + +struct msm_vfe_phy_info { + uint32_t sbuf_phy; + uint32_t y_phy; + uint32_t cbcr_phy; +}; + +struct msm_vfe_resp { + enum vfe_resp_msg type; + struct msm_vfe_evt_msg evt_msg; + struct msm_vfe_phy_info phy; + void *extdata; + int32_t extlen; +}; + +struct msm_vfe_callback { + void (*vfe_resp)(struct msm_vfe_resp *, + enum msm_queue, void *syncdata); + void* (*vfe_alloc)(int, void *syncdata); +}; + +struct msm_camvfe_fn { + int (*vfe_init)(struct msm_vfe_callback *, struct platform_device *); + int (*vfe_enable)(struct camera_enable_cmd *); + int (*vfe_config)(struct msm_vfe_cfg_cmd *, void *); + int (*vfe_disable)(struct camera_enable_cmd *, + struct platform_device *dev); + void (*vfe_release)(struct platform_device *); +}; + +struct msm_sensor_ctrl { + int (*s_init)(const struct msm_camera_sensor_info *); + int (*s_release)(void); + int (*s_config)(void __user *); +}; + +struct msm_sync { + /* These two queues are accessed from a process context only. */ + struct hlist_head frame; /* most-frequently accessed */ + struct hlist_head stats; + + /* The message queue is used by the control thread to send commands + * to the config thread, and also by the DSP to send messages to the + * config thread. Thus it is the only queue that is accessed from + * both interrupt and process context. + */ + spinlock_t msg_event_q_lock; + struct list_head msg_event_q; + wait_queue_head_t msg_event_wait; + + /* This queue contains preview frames. It is accessed by the DSP (in + * in interrupt context, and by the frame thread. + */ + spinlock_t prev_frame_q_lock; + struct list_head prev_frame_q; + wait_queue_head_t prev_frame_wait; + int unblock_poll_frame; + + /* This queue contains snapshot frames. It is accessed by the DSP (in + * interrupt context, and by the control thread. + */ + spinlock_t pict_frame_q_lock; + struct list_head pict_frame_q; + wait_queue_head_t pict_frame_wait; + + struct msm_camera_sensor_info *sdata; + struct msm_camvfe_fn vfefn; + struct msm_sensor_ctrl sctrl; + struct platform_device *pdev; + uint8_t opencnt; + void *cropinfo; + int croplen; + unsigned pict_pp; + + const char *apps_id; + + struct mutex lock; + struct list_head list; +}; + +#define MSM_APPS_ID_V4L2 "msm_v4l2" +#define MSM_APPS_ID_PROP "msm_qct" + +struct msm_device { + struct msm_sync *sync; /* most-frequently accessed */ + struct device *device; + struct cdev cdev; + /* opened is meaningful only for the config and frame nodes, + * which may be opened only once. + */ + atomic_t opened; +}; + +struct msm_control_device_queue { + spinlock_t ctrl_status_q_lock; + struct list_head ctrl_status_q; + wait_queue_head_t ctrl_status_wait; +}; + +struct msm_control_device { + struct msm_device *pmsm; + + /* This queue used by the config thread to send responses back to the + * control thread. It is accessed only from a process context. + */ + struct msm_control_device_queue ctrl_q; +}; + +/* this structure is used in kernel */ +struct msm_queue_cmd { + struct list_head list; + enum msm_queue type; + void *command; +}; + +struct register_address_value_pair { + uint16_t register_address; + uint16_t register_value; +}; + +struct msm_pmem_region { + struct hlist_node list; + int type; + void *vaddr; + unsigned long paddr; + unsigned long len; + struct file *file; + uint32_t y_off; + uint32_t cbcr_off; + int fd; + uint8_t active; +}; + +struct axidata { + uint32_t bufnum1; + uint32_t bufnum2; + struct msm_pmem_region *region; +}; + +#ifdef CONFIG_MSM_CAMERA_FLASH +int msm_camera_flash_set_led_state(unsigned led_state); +#else +static inline int msm_camera_flash_set_led_state(unsigned led_state) +{ + return -ENOTSUPP; +} +#endif + +/* Below functions are added for V4L2 kernel APIs */ +struct msm_v4l2_driver { + struct msm_sync *sync; + int (*open)(struct msm_sync *, const char *apps_id); + int (*release)(struct msm_sync *); + int (*ctrl)(struct msm_sync *, struct msm_ctrl_cmd *); + int (*reg_pmem)(struct msm_sync *, struct msm_pmem_info *); + int (*get_frame) (struct msm_sync *, struct msm_frame *); + int (*put_frame) (struct msm_sync *, struct msm_frame *); + int (*get_pict) (struct msm_sync *, struct msm_ctrl_cmd *); + unsigned int (*drv_poll) (struct msm_sync *, struct file *, + struct poll_table_struct *); +}; + +int msm_v4l2_register(struct msm_v4l2_driver *); +int msm_v4l2_unregister(struct msm_v4l2_driver *); + +void msm_camvfe_init(void); +int msm_camvfe_check(void *); +void msm_camvfe_fn_init(struct msm_camvfe_fn *, void *); +int msm_camera_drv_start(struct platform_device *dev, + int (*sensor_probe)(const struct msm_camera_sensor_info *, + struct msm_sensor_ctrl *)); + +enum msm_camio_clk_type { + CAMIO_VFE_MDC_CLK, + CAMIO_MDC_CLK, + CAMIO_VFE_CLK, + CAMIO_VFE_AXI_CLK, + + CAMIO_MAX_CLK +}; + +enum msm_camio_clk_src_type { + MSM_CAMIO_CLK_SRC_INTERNAL, + MSM_CAMIO_CLK_SRC_EXTERNAL, + MSM_CAMIO_CLK_SRC_MAX +}; + +enum msm_s_test_mode { + S_TEST_OFF, + S_TEST_1, + S_TEST_2, + S_TEST_3 +}; + +enum msm_s_resolution { + S_QTR_SIZE, + S_FULL_SIZE, + S_INVALID_SIZE +}; + +enum msm_s_reg_update { + /* Sensor egisters that need to be updated during initialization */ + S_REG_INIT, + /* Sensor egisters that needs periodic I2C writes */ + S_UPDATE_PERIODIC, + /* All the sensor Registers will be updated */ + S_UPDATE_ALL, + /* Not valid update */ + S_UPDATE_INVALID +}; + +enum msm_s_setting { + S_RES_PREVIEW, + S_RES_CAPTURE +}; + +int msm_camio_enable(struct platform_device *dev); + +int msm_camio_clk_enable(enum msm_camio_clk_type clk); +int msm_camio_clk_disable(enum msm_camio_clk_type clk); +int msm_camio_clk_config(uint32_t freq); +void msm_camio_clk_rate_set(int rate); +void msm_camio_clk_axi_rate_set(int rate); + +void msm_camio_camif_pad_reg_reset(void); +void msm_camio_camif_pad_reg_reset_2(void); + +void msm_camio_vfe_blk_reset(void); + +void msm_camio_clk_sel(enum msm_camio_clk_src_type); +void msm_camio_disable(struct platform_device *); +int msm_camio_probe_on(struct platform_device *); +int msm_camio_probe_off(struct platform_device *); +#endif diff --git a/drivers/staging/dream/include/mach/msm_adsp.h b/drivers/staging/dream/include/mach/msm_adsp.h new file mode 100644 index 000000000000..a081683328a3 --- /dev/null +++ b/drivers/staging/dream/include/mach/msm_adsp.h @@ -0,0 +1,112 @@ +/* include/asm-arm/arch-msm/msm_adsp.h + * + * Copyright (C) 2008 Google, Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#ifndef __ASM__ARCH_MSM_ADSP_H +#define __ASM__ARCH_MSM_ADSP_H + +struct msm_adsp_module; + +struct msm_adsp_ops { + /* event is called from interrupt context when a message + * arrives from the DSP. Use the provided function pointer + * to copy the message into a local buffer. Do NOT call + * it multiple times. + */ + void (*event)(void *driver_data, unsigned id, size_t len, + void (*getevent)(void *ptr, size_t len)); +}; + +/* Get, Put, Enable, and Disable are synchronous and must only + * be called from thread context. Enable and Disable will block + * up to one second in the event of a fatal DSP error but are + * much faster otherwise. + */ +int msm_adsp_get(const char *name, struct msm_adsp_module **module, + struct msm_adsp_ops *ops, void *driver_data); +void msm_adsp_put(struct msm_adsp_module *module); +int msm_adsp_enable(struct msm_adsp_module *module); +int msm_adsp_disable(struct msm_adsp_module *module); +int adsp_set_clkrate(struct msm_adsp_module *module, unsigned long clk_rate); + +/* Write is safe to call from interrupt context. + */ +int msm_adsp_write(struct msm_adsp_module *module, + unsigned queue_id, + void *data, size_t len); + +#if CONFIG_MSM_AMSS_VERSION >= 6350 +/* Command Queue Indexes */ +#define QDSP_lpmCommandQueue 0 +#define QDSP_mpuAfeQueue 1 +#define QDSP_mpuGraphicsCmdQueue 2 +#define QDSP_mpuModmathCmdQueue 3 +#define QDSP_mpuVDecCmdQueue 4 +#define QDSP_mpuVDecPktQueue 5 +#define QDSP_mpuVEncCmdQueue 6 +#define QDSP_rxMpuDecCmdQueue 7 +#define QDSP_rxMpuDecPktQueue 8 +#define QDSP_txMpuEncQueue 9 +#define QDSP_uPAudPPCmd1Queue 10 +#define QDSP_uPAudPPCmd2Queue 11 +#define QDSP_uPAudPPCmd3Queue 12 +#define QDSP_uPAudPlay0BitStreamCtrlQueue 13 +#define QDSP_uPAudPlay1BitStreamCtrlQueue 14 +#define QDSP_uPAudPlay2BitStreamCtrlQueue 15 +#define QDSP_uPAudPlay3BitStreamCtrlQueue 16 +#define QDSP_uPAudPlay4BitStreamCtrlQueue 17 +#define QDSP_uPAudPreProcCmdQueue 18 +#define QDSP_uPAudRecBitStreamQueue 19 +#define QDSP_uPAudRecCmdQueue 20 +#define QDSP_uPDiagQueue 21 +#define QDSP_uPJpegActionCmdQueue 22 +#define QDSP_uPJpegCfgCmdQueue 23 +#define QDSP_uPVocProcQueue 24 +#define QDSP_vfeCommandQueue 25 +#define QDSP_vfeCommandScaleQueue 26 +#define QDSP_vfeCommandTableQueue 27 +#define QDSP_MAX_NUM_QUEUES 28 +#else +/* Command Queue Indexes */ +#define QDSP_lpmCommandQueue 0 +#define QDSP_mpuAfeQueue 1 +#define QDSP_mpuGraphicsCmdQueue 2 +#define QDSP_mpuModmathCmdQueue 3 +#define QDSP_mpuVDecCmdQueue 4 +#define QDSP_mpuVDecPktQueue 5 +#define QDSP_mpuVEncCmdQueue 6 +#define QDSP_rxMpuDecCmdQueue 7 +#define QDSP_rxMpuDecPktQueue 8 +#define QDSP_txMpuEncQueue 9 +#define QDSP_uPAudPPCmd1Queue 10 +#define QDSP_uPAudPPCmd2Queue 11 +#define QDSP_uPAudPPCmd3Queue 12 +#define QDSP_uPAudPlay0BitStreamCtrlQueue 13 +#define QDSP_uPAudPlay1BitStreamCtrlQueue 14 +#define QDSP_uPAudPlay2BitStreamCtrlQueue 15 +#define QDSP_uPAudPlay3BitStreamCtrlQueue 16 +#define QDSP_uPAudPlay4BitStreamCtrlQueue 17 +#define QDSP_uPAudPreProcCmdQueue 18 +#define QDSP_uPAudRecBitStreamQueue 19 +#define QDSP_uPAudRecCmdQueue 20 +#define QDSP_uPJpegActionCmdQueue 21 +#define QDSP_uPJpegCfgCmdQueue 22 +#define QDSP_uPVocProcQueue 23 +#define QDSP_vfeCommandQueue 24 +#define QDSP_vfeCommandScaleQueue 25 +#define QDSP_vfeCommandTableQueue 26 +#define QDSP_QUEUE_MAX 26 +#endif + +#endif diff --git a/drivers/staging/dream/include/mach/msm_rpcrouter.h b/drivers/staging/dream/include/mach/msm_rpcrouter.h new file mode 100644 index 000000000000..9724ece1c97c --- /dev/null +++ b/drivers/staging/dream/include/mach/msm_rpcrouter.h @@ -0,0 +1,179 @@ +/** include/asm-arm/arch-msm/msm_rpcrouter.h + * + * Copyright (C) 2007 Google, Inc. + * Copyright (c) 2007-2009 QUALCOMM Incorporated + * Author: San Mehat + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#ifndef __ASM__ARCH_MSM_RPCROUTER_H +#define __ASM__ARCH_MSM_RPCROUTER_H + +#include +#include +#include + +#if CONFIG_MSM_AMSS_VERSION >= 6350 +/* RPC API version structure + * Version bit 31 : 1->hashkey versioning, + * 0->major-minor (backward compatible) versioning + * hashkey versioning: + * Version bits 31-0 hashkey + * major-minor (backward compatible) versioning + * Version bits 30-28 reserved (no match) + * Version bits 27-16 major (must match) + * Version bits 15-0 minor (greater or equal) + */ +#define RPC_VERSION_MODE_MASK 0x80000000 +#define RPC_VERSION_MAJOR_MASK 0x0fff0000 +#define RPC_VERSION_MAJOR_OFFSET 16 +#define RPC_VERSION_MINOR_MASK 0x0000ffff + +#define MSM_RPC_VERS(major, minor) \ + ((uint32_t)((((major) << RPC_VERSION_MAJOR_OFFSET) & \ + RPC_VERSION_MAJOR_MASK) | \ + ((minor) & RPC_VERSION_MINOR_MASK))) +#define MSM_RPC_GET_MAJOR(vers) (((vers) & RPC_VERSION_MAJOR_MASK) >> \ + RPC_VERSION_MAJOR_OFFSET) +#define MSM_RPC_GET_MINOR(vers) ((vers) & RPC_VERSION_MINOR_MASK) +#else +#define MSM_RPC_VERS(major, minor) (major) +#define MSM_RPC_GET_MAJOR(vers) (vers) +#define MSM_RPC_GET_MINOR(vers) 0 +#endif + +struct msm_rpc_endpoint; + +struct rpcsvr_platform_device +{ + struct platform_device base; + uint32_t prog; + uint32_t vers; +}; + +#define RPC_DATA_IN 0 +/* + * Structures for sending / receiving direct RPC requests + * XXX: Any cred/verif lengths > 0 not supported + */ + +struct rpc_request_hdr +{ + uint32_t xid; + uint32_t type; /* 0 */ + uint32_t rpc_vers; /* 2 */ + uint32_t prog; + uint32_t vers; + uint32_t procedure; + uint32_t cred_flavor; + uint32_t cred_length; + uint32_t verf_flavor; + uint32_t verf_length; +}; + +typedef struct +{ + uint32_t low; + uint32_t high; +} rpc_reply_progmismatch_data; + +typedef struct +{ +} rpc_denied_reply_hdr; + +typedef struct +{ + uint32_t verf_flavor; + uint32_t verf_length; + uint32_t accept_stat; +#define RPC_ACCEPTSTAT_SUCCESS 0 +#define RPC_ACCEPTSTAT_PROG_UNAVAIL 1 +#define RPC_ACCEPTSTAT_PROG_MISMATCH 2 +#define RPC_ACCEPTSTAT_PROC_UNAVAIL 3 +#define RPC_ACCEPTSTAT_GARBAGE_ARGS 4 +#define RPC_ACCEPTSTAT_SYSTEM_ERR 5 +#define RPC_ACCEPTSTAT_PROG_LOCKED 6 + /* + * Following data is dependant on accept_stat + * If ACCEPTSTAT == PROG_MISMATCH then there is a + * 'rpc_reply_progmismatch_data' structure following the header. + * Otherwise the data is procedure specific + */ +} rpc_accepted_reply_hdr; + +struct rpc_reply_hdr +{ + uint32_t xid; + uint32_t type; + uint32_t reply_stat; +#define RPCMSG_REPLYSTAT_ACCEPTED 0 +#define RPCMSG_REPLYSTAT_DENIED 1 + union { + rpc_accepted_reply_hdr acc_hdr; + rpc_denied_reply_hdr dny_hdr; + } data; +}; + +/* flags for msm_rpc_connect() */ +#define MSM_RPC_UNINTERRUPTIBLE 0x0001 + +/* use IS_ERR() to check for failure */ +struct msm_rpc_endpoint *msm_rpc_open(void); +/* Connect with the specified server version */ +struct msm_rpc_endpoint *msm_rpc_connect(uint32_t prog, uint32_t vers, unsigned flags); +uint32_t msm_rpc_get_vers(struct msm_rpc_endpoint *ept); +/* check if server version can handle client requested version */ +int msm_rpc_is_compatible_version(uint32_t server_version, + uint32_t client_version); + +int msm_rpc_close(struct msm_rpc_endpoint *ept); +int msm_rpc_write(struct msm_rpc_endpoint *ept, + void *data, int len); +int msm_rpc_read(struct msm_rpc_endpoint *ept, + void **data, unsigned len, long timeout); +void msm_rpc_setup_req(struct rpc_request_hdr *hdr, + uint32_t prog, uint32_t vers, uint32_t proc); +int msm_rpc_register_server(struct msm_rpc_endpoint *ept, + uint32_t prog, uint32_t vers); +int msm_rpc_unregister_server(struct msm_rpc_endpoint *ept, + uint32_t prog, uint32_t vers); + +/* simple blocking rpc call + * + * request is mandatory and must have a rpc_request_hdr + * at the start. The header will be filled out for you. + * + * reply provides a buffer for replies of reply_max_size + */ +int msm_rpc_call_reply(struct msm_rpc_endpoint *ept, uint32_t proc, + void *request, int request_size, + void *reply, int reply_max_size, + long timeout); +int msm_rpc_call(struct msm_rpc_endpoint *ept, uint32_t proc, + void *request, int request_size, + long timeout); + +struct msm_rpc_server +{ + struct list_head list; + uint32_t flags; + + uint32_t prog; + uint32_t vers; + + int (*rpc_call)(struct msm_rpc_server *server, + struct rpc_request_hdr *req, unsigned len); +}; + +int msm_rpc_create_server(struct msm_rpc_server *server); + +#endif diff --git a/drivers/staging/dream/include/mach/msm_smd.h b/drivers/staging/dream/include/mach/msm_smd.h new file mode 100644 index 000000000000..bdf7731ab680 --- /dev/null +++ b/drivers/staging/dream/include/mach/msm_smd.h @@ -0,0 +1,107 @@ +/* linux/include/asm-arm/arch-msm/msm_smd.h + * + * Copyright (C) 2007 Google, Inc. + * Author: Brian Swetland + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#ifndef __ASM_ARCH_MSM_SMD_H +#define __ASM_ARCH_MSM_SMD_H + +typedef struct smd_channel smd_channel_t; + +/* warning: notify() may be called before open returns */ +int smd_open(const char *name, smd_channel_t **ch, void *priv, + void (*notify)(void *priv, unsigned event)); + +#define SMD_EVENT_DATA 1 +#define SMD_EVENT_OPEN 2 +#define SMD_EVENT_CLOSE 3 + +int smd_close(smd_channel_t *ch); + +/* passing a null pointer for data reads and discards */ +int smd_read(smd_channel_t *ch, void *data, int len); + +/* Write to stream channels may do a partial write and return +** the length actually written. +** Write to packet channels will never do a partial write -- +** it will return the requested length written or an error. +*/ +int smd_write(smd_channel_t *ch, const void *data, int len); + +int smd_write_avail(smd_channel_t *ch); +int smd_read_avail(smd_channel_t *ch); + +/* Returns the total size of the current packet being read. +** Returns 0 if no packets available or a stream channel. +*/ +int smd_cur_packet_size(smd_channel_t *ch); + +/* used for tty unthrottling and the like -- causes the notify() +** callback to be called from the same lock context as is used +** when it is called from channel updates +*/ +void smd_kick(smd_channel_t *ch); + + +#if 0 +/* these are interruptable waits which will block you until the specified +** number of bytes are readable or writable. +*/ +int smd_wait_until_readable(smd_channel_t *ch, int bytes); +int smd_wait_until_writable(smd_channel_t *ch, int bytes); +#endif + +typedef enum +{ + SMD_PORT_DS = 0, + SMD_PORT_DIAG, + SMD_PORT_RPC_CALL, + SMD_PORT_RPC_REPLY, + SMD_PORT_BT, + SMD_PORT_CONTROL, + SMD_PORT_MEMCPY_SPARE1, + SMD_PORT_DATA1, + SMD_PORT_DATA2, + SMD_PORT_DATA3, + SMD_PORT_DATA4, + SMD_PORT_DATA5, + SMD_PORT_DATA6, + SMD_PORT_DATA7, + SMD_PORT_DATA8, + SMD_PORT_DATA9, + SMD_PORT_DATA10, + SMD_PORT_DATA11, + SMD_PORT_DATA12, + SMD_PORT_DATA13, + SMD_PORT_DATA14, + SMD_PORT_DATA15, + SMD_PORT_DATA16, + SMD_PORT_DATA17, + SMD_PORT_DATA18, + SMD_PORT_DATA19, + SMD_PORT_DATA20, + SMD_PORT_GPS_NMEA, + SMD_PORT_BRIDGE_1, + SMD_PORT_BRIDGE_2, + SMD_PORT_BRIDGE_3, + SMD_PORT_BRIDGE_4, + SMD_PORT_BRIDGE_5, + SMD_PORT_LOOPBACK, + SMD_PORT_CS_APPS_MODEM, + SMD_PORT_CS_APPS_DSP, + SMD_PORT_CS_MODEM_DSP, + SMD_NUM_PORTS, +} smd_port_id_type; + +#endif diff --git a/drivers/staging/dream/include/mach/qdsp5/qdsp5audplaycmdi.h b/drivers/staging/dream/include/mach/qdsp5/qdsp5audplaycmdi.h new file mode 100644 index 000000000000..0b6a31259bb0 --- /dev/null +++ b/drivers/staging/dream/include/mach/qdsp5/qdsp5audplaycmdi.h @@ -0,0 +1,94 @@ +#ifndef QDSP5AUDPLAYCMDI_H +#define QDSP5AUDPLAYCMDI_H + +/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* + + Q D S P 5 A U D I O P L A Y T A S K C O M M A N D S + +GENERAL DESCRIPTION + Command Interface for AUDPLAYTASK on QDSP5 + +REFERENCES + None + +EXTERNALIZED FUNCTIONS + + audplay_cmd_dec_data_avail + Send buffer to AUDPLAY task + + +Copyright(c) 1992 - 2009 by QUALCOMM, Incorporated. + +This software is licensed under the terms of the GNU General Public +License version 2, as published by the Free Software Foundation, and +may be copied, distributed, and modified under those terms. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/ +/*=========================================================================== + + EDIT HISTORY FOR FILE + +This section contains comments describing changes made to this file. +Notice that changes are listed in reverse chronological order. + +$Header: //source/qcom/qct/multimedia2/Audio/drivers/QDSP5Driver/QDSP5Interface/main/latest/qdsp5audplaycmdi.h#2 $ + +===========================================================================*/ + +#define AUDPLAY_CMD_BITSTREAM_DATA_AVAIL 0x0000 +#define AUDPLAY_CMD_BITSTREAM_DATA_AVAIL_LEN \ + sizeof(audplay_cmd_bitstream_data_avail) + +/* Type specification of dec_data_avail message sent to AUDPLAYTASK +*/ +typedef struct { + /*command ID*/ + unsigned int cmd_id; + + /* Decoder ID for which message is being sent */ + unsigned int decoder_id; + + /* Start address of data in ARM global memory */ + unsigned int buf_ptr; + + /* Number of 16-bit words of bit-stream data contiguously available at the + * above-mentioned address. */ + unsigned int buf_size; + + /* Partition number used by audPlayTask to communicate with DSP's RTOS + * kernel */ + unsigned int partition_number; +} __attribute__((packed)) audplay_cmd_bitstream_data_avail; + +#define AUDPLAY_CMD_HPCM_BUF_CFG 0x0003 +#define AUDPLAY_CMD_HPCM_BUF_CFG_LEN \ + sizeof(struct audplay_cmd_hpcm_buf_cfg) + +struct audplay_cmd_hpcm_buf_cfg { + unsigned int cmd_id; + unsigned int hostpcm_config; + unsigned int feedback_frequency; + unsigned int byte_swap; + unsigned int max_buffers; + unsigned int partition_number; +} __attribute__((packed)); + +#define AUDPLAY_CMD_BUFFER_REFRESH 0x0004 +#define AUDPLAY_CMD_BUFFER_REFRESH_LEN \ + sizeof(struct audplay_cmd_buffer_update) + +struct audplay_cmd_buffer_refresh { + unsigned int cmd_id; + unsigned int num_buffers; + unsigned int buf_read_count; + unsigned int buf0_address; + unsigned int buf0_length; + unsigned int buf1_address; + unsigned int buf1_length; +} __attribute__((packed)); +#endif /* QDSP5AUDPLAYCMD_H */ diff --git a/drivers/staging/dream/include/mach/qdsp5/qdsp5audplaymsg.h b/drivers/staging/dream/include/mach/qdsp5/qdsp5audplaymsg.h new file mode 100644 index 000000000000..c63034b8bf13 --- /dev/null +++ b/drivers/staging/dream/include/mach/qdsp5/qdsp5audplaymsg.h @@ -0,0 +1,70 @@ +#ifndef QDSP5AUDPLAYMSG_H +#define QDSP5AUDPLAYMSG_H + +/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* + + Q D S P 5 A U D I O P L A Y T A S K M S G + +GENERAL DESCRIPTION + Message sent by AUDPLAY task + +REFERENCES + None + + +Copyright(c) 1992 - 2009 by QUALCOMM, Incorporated. + +This software is licensed under the terms of the GNU General Public +License version 2, as published by the Free Software Foundation, and +may be copied, distributed, and modified under those terms. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/ +/*=========================================================================== + + EDIT HISTORY FOR FILE + +This section contains comments describing changes made to this file. +Notice that changes are listed in reverse chronological order. + +$Header: //source/qcom/qct/multimedia2/Audio/drivers/QDSP5Driver/QDSP5Interface/main/latest/qdsp5audplaymsg.h#3 $ + +===========================================================================*/ +#define AUDPLAY_MSG_DEC_NEEDS_DATA 0x0001 +#define AUDPLAY_MSG_DEC_NEEDS_DATA_MSG_LEN \ + sizeof(audplay_msg_dec_needs_data) + +typedef struct{ + /* reserved*/ + unsigned int dec_id; + + /* The read pointer offset of external memory until which the + * bitstream has been DMAed in. */ + unsigned int adecDataReadPtrOffset; + + /* The buffer size of external memory. */ + unsigned int adecDataBufSize; + + unsigned int bitstream_free_len; + unsigned int bitstream_write_ptr; + unsigned int bitstarem_buf_start; + unsigned int bitstream_buf_len; +} __attribute__((packed)) audplay_msg_dec_needs_data; + +#define AUDPLAY_MSG_BUFFER_UPDATE 0x0004 +#define AUDPLAY_MSG_BUFFER_UPDATE_LEN \ + sizeof(struct audplay_msg_buffer_update) + +struct audplay_msg_buffer_update { + unsigned int buffer_write_count; + unsigned int num_of_buffer; + unsigned int buf0_address; + unsigned int buf0_length; + unsigned int buf1_address; + unsigned int buf1_length; +} __attribute__((packed)); +#endif /* QDSP5AUDPLAYMSG_H */ diff --git a/drivers/staging/dream/include/mach/qdsp5/qdsp5audppcmdi.h b/drivers/staging/dream/include/mach/qdsp5/qdsp5audppcmdi.h new file mode 100644 index 000000000000..8bee9c62980b --- /dev/null +++ b/drivers/staging/dream/include/mach/qdsp5/qdsp5audppcmdi.h @@ -0,0 +1,914 @@ +#ifndef QDSP5AUDPPCMDI_H +#define QDSP5AUDPPCMDI_H + +/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* + + A U D I O P O S T P R O C E S S I N G I N T E R N A L C O M M A N D S + +GENERAL DESCRIPTION + This file contains defintions of format blocks of commands + that are accepted by AUDPP Task + +REFERENCES + None + +EXTERNALIZED FUNCTIONS + None + +Copyright(c) 1992 - 2008 by QUALCOMM, Incorporated. + +This software is licensed under the terms of the GNU General Public +License version 2, as published by the Free Software Foundation, and +may be copied, distributed, and modified under those terms. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/ +/*=========================================================================== + + EDIT HISTORY FOR FILE + +This section contains comments describing changes made to this file. +Notice that changes are listed in reverse chronological order. + +$Header: //source/qcom/qct/multimedia2/Audio/drivers/QDSP5Driver/QDSP5Interface/main/latest/qdsp5audppcmdi.h#2 $ + +===========================================================================*/ + +/* + * ARM to AUDPPTASK Commands + * + * ARM uses three command queues to communicate with AUDPPTASK + * 1)uPAudPPCmd1Queue : Used for more frequent and shorter length commands + * Location : MEMA + * Buffer Size : 6 words + * No of buffers in a queue : 20 for gaming audio and 5 for other images + * 2)uPAudPPCmd2Queue : Used for commands which are not much lengthier + * Location : MEMA + * Buffer Size : 23 + * No of buffers in a queue : 2 + * 3)uPAudOOCmd3Queue : Used for lengthier and more frequent commands + * Location : MEMA + * Buffer Size : 145 + * No of buffers in a queue : 3 + */ + +/* + * Commands Related to uPAudPPCmd1Queue + */ + +/* + * Command Structure to enable or disable the active decoders + */ + +#define AUDPP_CMD_CFG_DEC_TYPE 0x0001 +#define AUDPP_CMD_CFG_DEC_TYPE_LEN sizeof(audpp_cmd_cfg_dec_type) + +/* Enable the decoder */ +#define AUDPP_CMD_DEC_TYPE_M 0x000F + +#define AUDPP_CMD_ENA_DEC_V 0x4000 +#define AUDPP_CMD_DIS_DEC_V 0x0000 +#define AUDPP_CMD_DEC_STATE_M 0x4000 + +#define AUDPP_CMD_UPDATDE_CFG_DEC 0x8000 +#define AUDPP_CMD_DONT_UPDATE_CFG_DEC 0x0000 + + +/* Type specification of cmd_cfg_dec */ + +typedef struct { + unsigned short cmd_id; + unsigned short dec0_cfg; + unsigned short dec1_cfg; + unsigned short dec2_cfg; + unsigned short dec3_cfg; + unsigned short dec4_cfg; +} __attribute__((packed)) audpp_cmd_cfg_dec_type; + +/* + * Command Structure to Pause , Resume and flushes the selected audio decoders + */ + +#define AUDPP_CMD_DEC_CTRL 0x0002 +#define AUDPP_CMD_DEC_CTRL_LEN sizeof(audpp_cmd_dec_ctrl) + +/* Decoder control commands for pause, resume and flush */ +#define AUDPP_CMD_FLUSH_V 0x2000 + +#define AUDPP_CMD_PAUSE_V 0x4000 +#define AUDPP_CMD_RESUME_V 0x0000 + +#define AUDPP_CMD_UPDATE_V 0x8000 +#define AUDPP_CMD_IGNORE_V 0x0000 + + +/* Type Spec for decoder control command*/ + +typedef struct { + unsigned short cmd_id; + unsigned short dec0_ctrl; + unsigned short dec1_ctrl; + unsigned short dec2_ctrl; + unsigned short dec3_ctrl; + unsigned short dec4_ctrl; +} __attribute__((packed)) audpp_cmd_dec_ctrl; + +/* + * Command Structure to Configure the AVSync FeedBack Mechanism + */ + +#define AUDPP_CMD_AVSYNC 0x0003 +#define AUDPP_CMD_AVSYNC_LEN sizeof(audpp_cmd_avsync) + +typedef struct { + unsigned short cmd_id; + unsigned short object_number; + unsigned short interrupt_interval_lsw; + unsigned short interrupt_interval_msw; +} __attribute__((packed)) audpp_cmd_avsync; + +/* + * Command Structure to enable or disable(sleep) the AUDPPTASK + */ + +#define AUDPP_CMD_CFG 0x0004 +#define AUDPP_CMD_CFG_LEN sizeof(audpp_cmd_cfg) + +#define AUDPP_CMD_CFG_SLEEP 0x0000 +#define AUDPP_CMD_CFG_ENABLE 0xFFFF + +typedef struct { + unsigned short cmd_id; + unsigned short cfg; +} __attribute__((packed)) audpp_cmd_cfg; + +/* + * Command Structure to Inject or drop the specified no of samples + */ + +#define AUDPP_CMD_ADJUST_SAMP 0x0005 +#define AUDPP_CMD_ADJUST_SAMP_LEN sizeof(audpp_cmd_adjust_samp) + +#define AUDPP_CMD_SAMP_DROP -1 +#define AUDPP_CMD_SAMP_INSERT 0x0001 + +#define AUDPP_CMD_NUM_SAMPLES 0x0001 + +typedef struct { + unsigned short cmd_id; + unsigned short object_no; + signed short sample_insert_or_drop; + unsigned short num_samples; +} __attribute__((packed)) audpp_cmd_adjust_samp; + +/* + * Command Structure to Configure AVSync Feedback Mechanism + */ + +#define AUDPP_CMD_AVSYNC_CMD_2 0x0006 +#define AUDPP_CMD_AVSYNC_CMD_2_LEN sizeof(audpp_cmd_avsync_cmd_2) + +typedef struct { + unsigned short cmd_id; + unsigned short object_number; + unsigned short interrupt_interval_lsw; + unsigned short interrupt_interval_msw; + unsigned short sample_counter_dlsw; + unsigned short sample_counter_dmsw; + unsigned short sample_counter_msw; + unsigned short byte_counter_dlsw; + unsigned short byte_counter_dmsw; + unsigned short byte_counter_msw; +} __attribute__((packed)) audpp_cmd_avsync_cmd_2; + +/* + * Command Structure to Configure AVSync Feedback Mechanism + */ + +#define AUDPP_CMD_AVSYNC_CMD_3 0x0007 +#define AUDPP_CMD_AVSYNC_CMD_3_LEN sizeof(audpp_cmd_avsync_cmd_3) + +typedef struct { + unsigned short cmd_id; + unsigned short object_number; + unsigned short interrupt_interval_lsw; + unsigned short interrupt_interval_msw; + unsigned short sample_counter_dlsw; + unsigned short sample_counter_dmsw; + unsigned short sample_counter_msw; + unsigned short byte_counter_dlsw; + unsigned short byte_counter_dmsw; + unsigned short byte_counter_msw; +} __attribute__((packed)) audpp_cmd_avsync_cmd_3; + +#define AUDPP_CMD_ROUTING_MODE 0x0008 +#define AUDPP_CMD_ROUTING_MODE_LEN \ +sizeof(struct audpp_cmd_routing_mode) + +struct audpp_cmd_routing_mode { + unsigned short cmd_id; + unsigned short object_number; + unsigned short routing_mode; +} __attribute__((packed)); + +/* + * Commands Related to uPAudPPCmd2Queue + */ + +/* + * Command Structure to configure Per decoder Parameters (Common) + */ + +#define AUDPP_CMD_CFG_ADEC_PARAMS 0x0000 +#define AUDPP_CMD_CFG_ADEC_PARAMS_COMMON_LEN \ + sizeof(audpp_cmd_cfg_adec_params_common) + +#define AUDPP_CMD_STATUS_MSG_FLAG_ENA_FCM 0x4000 +#define AUDPP_CMD_STATUS_MSG_FLAG_DIS_FCM 0x0000 + +#define AUDPP_CMD_STATUS_MSG_FLAG_ENA_DCM 0x8000 +#define AUDPP_CMD_STATUS_MSG_FLAG_DIS_DCM 0x0000 + +/* Sampling frequency*/ +#define AUDPP_CMD_SAMP_RATE_96000 0x0000 +#define AUDPP_CMD_SAMP_RATE_88200 0x0001 +#define AUDPP_CMD_SAMP_RATE_64000 0x0002 +#define AUDPP_CMD_SAMP_RATE_48000 0x0003 +#define AUDPP_CMD_SAMP_RATE_44100 0x0004 +#define AUDPP_CMD_SAMP_RATE_32000 0x0005 +#define AUDPP_CMD_SAMP_RATE_24000 0x0006 +#define AUDPP_CMD_SAMP_RATE_22050 0x0007 +#define AUDPP_CMD_SAMP_RATE_16000 0x0008 +#define AUDPP_CMD_SAMP_RATE_12000 0x0009 +#define AUDPP_CMD_SAMP_RATE_11025 0x000A +#define AUDPP_CMD_SAMP_RATE_8000 0x000B + + +/* + * Type specification of cmd_adec_cfg sent to all decoder + */ + +typedef struct { + unsigned short cmd_id; + unsigned short length; + unsigned short dec_id; + unsigned short status_msg_flag; + unsigned short decoder_frame_counter_msg_period; + unsigned short input_sampling_frequency; +} __attribute__((packed)) audpp_cmd_cfg_adec_params_common; + +/* + * Command Structure to configure Per decoder Parameters (Wav) + */ + +#define AUDPP_CMD_CFG_ADEC_PARAMS_WAV_LEN \ + sizeof(audpp_cmd_cfg_adec_params_wav) + + +#define AUDPP_CMD_WAV_STEREO_CFG_MONO 0x0001 +#define AUDPP_CMD_WAV_STEREO_CFG_STEREO 0x0002 + +#define AUDPP_CMD_WAV_PCM_WIDTH_8 0x0000 +#define AUDPP_CMD_WAV_PCM_WIDTH_16 0x0001 +#define AUDPP_CMD_WAV_PCM_WIDTH_32 0x0002 + +typedef struct { + audpp_cmd_cfg_adec_params_common common; + unsigned short stereo_cfg; + unsigned short pcm_width; + unsigned short sign; +} __attribute__((packed)) audpp_cmd_cfg_adec_params_wav; + +/* + * Command Structure to configure Per decoder Parameters (ADPCM) + */ + +#define AUDPP_CMD_CFG_ADEC_PARAMS_ADPCM_LEN \ + sizeof(audpp_cmd_cfg_adec_params_adpcm) + + +#define AUDPP_CMD_ADPCM_STEREO_CFG_MONO 0x0001 +#define AUDPP_CMD_ADPCM_STEREO_CFG_STEREO 0x0002 + +typedef struct { + audpp_cmd_cfg_adec_params_common common; + unsigned short stereo_cfg; + unsigned short block_size; +} __attribute__((packed)) audpp_cmd_cfg_adec_params_adpcm; + +/* + * Command Structure to configure Per decoder Parameters (MP3) + */ + +#define AUDPP_CMD_CFG_ADEC_PARAMS_MP3_LEN \ + sizeof(audpp_cmd_cfg_adec_params_mp3) + +typedef struct { + audpp_cmd_cfg_adec_params_common common; +} __attribute__((packed)) audpp_cmd_cfg_adec_params_mp3; + + +/* + * Command Structure to configure Per decoder Parameters (AAC) + */ + +#define AUDPP_CMD_CFG_ADEC_PARAMS_AAC_LEN \ + sizeof(audpp_cmd_cfg_adec_params_aac) + + +#define AUDPP_CMD_AAC_FORMAT_ADTS -1 +#define AUDPP_CMD_AAC_FORMAT_RAW 0x0000 +#define AUDPP_CMD_AAC_FORMAT_PSUEDO_RAW 0x0001 +#define AUDPP_CMD_AAC_FORMAT_LOAS 0x0002 + +#define AUDPP_CMD_AAC_AUDIO_OBJECT_LC 0x0002 +#define AUDPP_CMD_AAC_AUDIO_OBJECT_LTP 0x0004 +#define AUDPP_CMD_AAC_AUDIO_OBJECT_ERLC 0x0011 + +#define AUDPP_CMD_AAC_SBR_ON_FLAG_ON 0x0001 +#define AUDPP_CMD_AAC_SBR_ON_FLAG_OFF 0x0000 + +#define AUDPP_CMD_AAC_SBR_PS_ON_FLAG_ON 0x0001 +#define AUDPP_CMD_AAC_SBR_PS_ON_FLAG_OFF 0x0000 + +typedef struct { + audpp_cmd_cfg_adec_params_common common; + signed short format; + unsigned short audio_object; + unsigned short ep_config; + unsigned short aac_section_data_resilience_flag; + unsigned short aac_scalefactor_data_resilience_flag; + unsigned short aac_spectral_data_resilience_flag; + unsigned short sbr_on_flag; + unsigned short sbr_ps_on_flag; + unsigned short dual_mono_mode; + unsigned short channel_configuration; +} __attribute__((packed)) audpp_cmd_cfg_adec_params_aac; + +/* + * Command Structure to configure Per decoder Parameters (V13K) + */ + +#define AUDPP_CMD_CFG_ADEC_PARAMS_V13K_LEN \ + sizeof(struct audpp_cmd_cfg_adec_params_v13k) + + +#define AUDPP_CMD_STEREO_CFG_MONO 0x0001 +#define AUDPP_CMD_STEREO_CFG_STEREO 0x0002 + +struct audpp_cmd_cfg_adec_params_v13k { + audpp_cmd_cfg_adec_params_common common; + unsigned short stereo_cfg; +} __attribute__((packed)); + +#define AUDPP_CMD_CFG_ADEC_PARAMS_EVRC_LEN \ + sizeof(struct audpp_cmd_cfg_adec_params_evrc) + +struct audpp_cmd_cfg_adec_params_evrc { + audpp_cmd_cfg_adec_params_common common; + unsigned short stereo_cfg; +} __attribute__ ((packed)); + +/* + * Command Structure to configure the HOST PCM interface + */ + +#define AUDPP_CMD_PCM_INTF 0x0001 +#define AUDPP_CMD_PCM_INTF_2 0x0002 +#define AUDPP_CMD_PCM_INTF_LEN sizeof(audpp_cmd_pcm_intf) + +#define AUDPP_CMD_PCM_INTF_MONO_V 0x0001 +#define AUDPP_CMD_PCM_INTF_STEREO_V 0x0002 + +/* These two values differentiate the two types of commands that could be issued + * Interface configuration command and Buffer update command */ + +#define AUDPP_CMD_PCM_INTF_CONFIG_CMD_V 0x0000 +#define AUDPP_CMD_PCM_INTF_BUFFER_CMD_V -1 + +#define AUDPP_CMD_PCM_INTF_RX_ENA_M 0x000F +#define AUDPP_CMD_PCM_INTF_RX_ENA_ARMTODSP_V 0x0008 +#define AUDPP_CMD_PCM_INTF_RX_ENA_DSPTOARM_V 0x0004 + +/* These flags control the enabling and disabling of the interface together + * with host interface bit mask. */ + +#define AUDPP_CMD_PCM_INTF_ENA_V -1 +#define AUDPP_CMD_PCM_INTF_DIS_V 0x0000 + + +#define AUDPP_CMD_PCM_INTF_FULL_DUPLEX 0x0 +#define AUDPP_CMD_PCM_INTF_HALF_DUPLEX_TODSP 0x1 + + +#define AUDPP_CMD_PCM_INTF_OBJECT_NUM 0x5 +#define AUDPP_CMD_PCM_INTF_COMMON_OBJECT_NUM 0x6 + + +typedef struct { + unsigned short cmd_id; + unsigned short object_num; + signed short config; + unsigned short intf_type; + + /* DSP -> ARM Configuration */ + unsigned short read_buf1LSW; + unsigned short read_buf1MSW; + unsigned short read_buf1_len; + + unsigned short read_buf2LSW; + unsigned short read_buf2MSW; + unsigned short read_buf2_len; + /* 0:HOST_PCM_INTF disable + ** 0xFFFF: HOST_PCM_INTF enable + */ + signed short dsp_to_arm_flag; + unsigned short partition_number; + + /* ARM -> DSP Configuration */ + unsigned short write_buf1LSW; + unsigned short write_buf1MSW; + unsigned short write_buf1_len; + + unsigned short write_buf2LSW; + unsigned short write_buf2MSW; + unsigned short write_buf2_len; + + /* 0:HOST_PCM_INTF disable + ** 0xFFFF: HOST_PCM_INTF enable + */ + signed short arm_to_rx_flag; + unsigned short weight_decoder_to_rx; + unsigned short weight_arm_to_rx; + + unsigned short partition_number_arm_to_dsp; + unsigned short sample_rate; + unsigned short channel_mode; +} __attribute__((packed)) audpp_cmd_pcm_intf; + +/* + ** BUFFER UPDATE COMMAND + */ +#define AUDPP_CMD_PCM_INTF_SEND_BUF_PARAMS_LEN \ + sizeof(audpp_cmd_pcm_intf_send_buffer) + +typedef struct { + unsigned short cmd_id; + unsigned short host_pcm_object; + /* set config = 0xFFFF for configuration*/ + signed short config; + unsigned short intf_type; + unsigned short dsp_to_arm_buf_id; + unsigned short arm_to_dsp_buf_id; + unsigned short arm_to_dsp_buf_len; +} __attribute__((packed)) audpp_cmd_pcm_intf_send_buffer; + + +/* + * Commands Related to uPAudPPCmd3Queue + */ + +/* + * Command Structure to configure post processing params (Commmon) + */ + +#define AUDPP_CMD_CFG_OBJECT_PARAMS 0x0000 +#define AUDPP_CMD_CFG_OBJECT_PARAMS_COMMON_LEN \ + sizeof(audpp_cmd_cfg_object_params_common) + +#define AUDPP_CMD_OBJ0_UPDATE 0x8000 +#define AUDPP_CMD_OBJ0_DONT_UPDATE 0x0000 + +#define AUDPP_CMD_OBJ1_UPDATE 0x8000 +#define AUDPP_CMD_OBJ1_DONT_UPDATE 0x0000 + +#define AUDPP_CMD_OBJ2_UPDATE 0x8000 +#define AUDPP_CMD_OBJ2_DONT_UPDATE 0x0000 + +#define AUDPP_CMD_OBJ3_UPDATE 0x8000 +#define AUDPP_CMD_OBJ3_DONT_UPDATE 0x0000 + +#define AUDPP_CMD_OBJ4_UPDATE 0x8000 +#define AUDPP_CMD_OBJ4_DONT_UPDATE 0x0000 + +#define AUDPP_CMD_HPCM_UPDATE 0x8000 +#define AUDPP_CMD_HPCM_DONT_UPDATE 0x0000 + +#define AUDPP_CMD_COMMON_CFG_UPDATE 0x8000 +#define AUDPP_CMD_COMMON_CFG_DONT_UPDATE 0x0000 + +typedef struct { + unsigned short cmd_id; + unsigned short obj0_cfg; + unsigned short obj1_cfg; + unsigned short obj2_cfg; + unsigned short obj3_cfg; + unsigned short obj4_cfg; + unsigned short host_pcm_obj_cfg; + unsigned short comman_cfg; + unsigned short command_type; +} __attribute__((packed)) audpp_cmd_cfg_object_params_common; + +/* + * Command Structure to configure post processing params (Volume) + */ + +#define AUDPP_CMD_CFG_OBJECT_PARAMS_VOLUME_LEN \ + sizeof(audpp_cmd_cfg_object_params_volume) + +typedef struct { + audpp_cmd_cfg_object_params_common common; + unsigned short volume; + unsigned short pan; +} __attribute__((packed)) audpp_cmd_cfg_object_params_volume; + +/* + * Command Structure to configure post processing params (PCM Filter) --DOUBT + */ + +typedef struct { + unsigned short numerator_b0_filter_lsw; + unsigned short numerator_b0_filter_msw; + unsigned short numerator_b1_filter_lsw; + unsigned short numerator_b1_filter_msw; + unsigned short numerator_b2_filter_lsw; + unsigned short numerator_b2_filter_msw; +} __attribute__((packed)) numerator; + +typedef struct { + unsigned short denominator_a0_filter_lsw; + unsigned short denominator_a0_filter_msw; + unsigned short denominator_a1_filter_lsw; + unsigned short denominator_a1_filter_msw; +} __attribute__((packed)) denominator; + +typedef struct { + unsigned short shift_factor_0; +} __attribute__((packed)) shift_factor; + +typedef struct { + unsigned short pan_filter_0; +} __attribute__((packed)) pan; + +typedef struct { + numerator numerator_filter; + denominator denominator_filter; + shift_factor shift_factor_filter; + pan pan_filter; +} __attribute__((packed)) filter_1; + +typedef struct { + numerator numerator_filter[2]; + denominator denominator_filter[2]; + shift_factor shift_factor_filter[2]; + pan pan_filter[2]; +} __attribute__((packed)) filter_2; + +typedef struct { + numerator numerator_filter[3]; + denominator denominator_filter[3]; + shift_factor shift_factor_filter[3]; + pan pan_filter[3]; +} __attribute__((packed)) filter_3; + +typedef struct { + numerator numerator_filter[4]; + denominator denominator_filter[4]; + shift_factor shift_factor_filter[4]; + pan pan_filter[4]; +} __attribute__((packed)) filter_4; + +#define AUDPP_CMD_CFG_OBJECT_PARAMS_PCM_LEN \ + sizeof(audpp_cmd_cfg_object_params_pcm) + + +typedef struct { + audpp_cmd_cfg_object_params_common common; + unsigned short active_flag; + unsigned short num_bands; + union { + filter_1 filter_1_params; + filter_2 filter_2_params; + filter_3 filter_3_params; + filter_4 filter_4_params; + } __attribute__((packed)) params_filter; +} __attribute__((packed)) audpp_cmd_cfg_object_params_pcm; + + +/* + * Command Structure to configure post processing parameters (equalizer) + */ + +#define AUDPP_CMD_CFG_OBJECT_PARAMS_EQALIZER_LEN \ + sizeof(audpp_cmd_cfg_object_params_eqalizer) + +typedef struct { + unsigned short numerator_coeff_0_lsw; + unsigned short numerator_coeff_0_msw; + unsigned short numerator_coeff_1_lsw; + unsigned short numerator_coeff_1_msw; + unsigned short numerator_coeff_2_lsw; + unsigned short numerator_coeff_2_msw; +} __attribute__((packed)) eq_numerator; + +typedef struct { + unsigned short denominator_coeff_0_lsw; + unsigned short denominator_coeff_0_msw; + unsigned short denominator_coeff_1_lsw; + unsigned short denominator_coeff_1_msw; +} __attribute__((packed)) eq_denominator; + +typedef struct { + unsigned short shift_factor; +} __attribute__((packed)) eq_shiftfactor; + +typedef struct { + eq_numerator numerator; + eq_denominator denominator; + eq_shiftfactor shiftfactor; +} __attribute__((packed)) eq_coeff_1; + +typedef struct { + eq_numerator numerator[2]; + eq_denominator denominator[2]; + eq_shiftfactor shiftfactor[2]; +} __attribute__((packed)) eq_coeff_2; + +typedef struct { + eq_numerator numerator[3]; + eq_denominator denominator[3]; + eq_shiftfactor shiftfactor[3]; +} __attribute__((packed)) eq_coeff_3; + +typedef struct { + eq_numerator numerator[4]; + eq_denominator denominator[4]; + eq_shiftfactor shiftfactor[4]; +} __attribute__((packed)) eq_coeff_4; + +typedef struct { + eq_numerator numerator[5]; + eq_denominator denominator[5]; + eq_shiftfactor shiftfactor[5]; +} __attribute__((packed)) eq_coeff_5; + +typedef struct { + eq_numerator numerator[6]; + eq_denominator denominator[6]; + eq_shiftfactor shiftfactor[6]; +} __attribute__((packed)) eq_coeff_6; + +typedef struct { + eq_numerator numerator[7]; + eq_denominator denominator[7]; + eq_shiftfactor shiftfactor[7]; +} __attribute__((packed)) eq_coeff_7; + +typedef struct { + eq_numerator numerator[8]; + eq_denominator denominator[8]; + eq_shiftfactor shiftfactor[8]; +} __attribute__((packed)) eq_coeff_8; + +typedef struct { + eq_numerator numerator[9]; + eq_denominator denominator[9]; + eq_shiftfactor shiftfactor[9]; +} __attribute__((packed)) eq_coeff_9; + +typedef struct { + eq_numerator numerator[10]; + eq_denominator denominator[10]; + eq_shiftfactor shiftfactor[10]; +} __attribute__((packed)) eq_coeff_10; + +typedef struct { + eq_numerator numerator[11]; + eq_denominator denominator[11]; + eq_shiftfactor shiftfactor[11]; +} __attribute__((packed)) eq_coeff_11; + +typedef struct { + eq_numerator numerator[12]; + eq_denominator denominator[12]; + eq_shiftfactor shiftfactor[12]; +} __attribute__((packed)) eq_coeff_12; + + +typedef struct { + audpp_cmd_cfg_object_params_common common; + unsigned short eq_flag; + unsigned short num_bands; + union { + eq_coeff_1 eq_coeffs_1; + eq_coeff_2 eq_coeffs_2; + eq_coeff_3 eq_coeffs_3; + eq_coeff_4 eq_coeffs_4; + eq_coeff_5 eq_coeffs_5; + eq_coeff_6 eq_coeffs_6; + eq_coeff_7 eq_coeffs_7; + eq_coeff_8 eq_coeffs_8; + eq_coeff_9 eq_coeffs_9; + eq_coeff_10 eq_coeffs_10; + eq_coeff_11 eq_coeffs_11; + eq_coeff_12 eq_coeffs_12; + } __attribute__((packed)) eq_coeff; +} __attribute__((packed)) audpp_cmd_cfg_object_params_eqalizer; + + +/* + * Command Structure to configure post processing parameters (ADRC) + */ + +#define AUDPP_CMD_CFG_OBJECT_PARAMS_ADRC_LEN \ + sizeof(audpp_cmd_cfg_object_params_adrc) + + +#define AUDPP_CMD_ADRC_FLAG_DIS 0x0000 +#define AUDPP_CMD_ADRC_FLAG_ENA -1 + +typedef struct { + audpp_cmd_cfg_object_params_common common; + signed short adrc_flag; + unsigned short compression_th; + unsigned short compression_slope; + unsigned short rms_time; + unsigned short attack_const_lsw; + unsigned short attack_const_msw; + unsigned short release_const_lsw; + unsigned short release_const_msw; + unsigned short adrc_system_delay; +} __attribute__((packed)) audpp_cmd_cfg_object_params_adrc; + +/* + * Command Structure to configure post processing parameters(Spectrum Analizer) + */ + +#define AUDPP_CMD_CFG_OBJECT_PARAMS_SPECTRAM_LEN \ + sizeof(audpp_cmd_cfg_object_params_spectram) + + +typedef struct { + audpp_cmd_cfg_object_params_common common; + unsigned short sample_interval; + unsigned short num_coeff; +} __attribute__((packed)) audpp_cmd_cfg_object_params_spectram; + +/* + * Command Structure to configure post processing parameters (QConcert) + */ + +#define AUDPP_CMD_CFG_OBJECT_PARAMS_QCONCERT_LEN \ + sizeof(audpp_cmd_cfg_object_params_qconcert) + + +#define AUDPP_CMD_QCON_ENA_FLAG_ENA -1 +#define AUDPP_CMD_QCON_ENA_FLAG_DIS 0x0000 + +#define AUDPP_CMD_QCON_OP_MODE_HEADPHONE -1 +#define AUDPP_CMD_QCON_OP_MODE_SPEAKER_FRONT 0x0000 +#define AUDPP_CMD_QCON_OP_MODE_SPEAKER_SIDE 0x0001 +#define AUDPP_CMD_QCON_OP_MODE_SPEAKER_DESKTOP 0x0002 + +#define AUDPP_CMD_QCON_GAIN_UNIT 0x7FFF +#define AUDPP_CMD_QCON_GAIN_SIX_DB 0x4027 + + +#define AUDPP_CMD_QCON_EXPANSION_MAX 0x7FFF + + +typedef struct { + audpp_cmd_cfg_object_params_common common; + signed short enable_flag; + signed short output_mode; + signed short gain; + signed short expansion; + signed short delay; + unsigned short stages_per_mode; +} __attribute__((packed)) audpp_cmd_cfg_object_params_qconcert; + +/* + * Command Structure to configure post processing parameters (Side Chain) + */ + +#define AUDPP_CMD_CFG_OBJECT_PARAMS_SIDECHAIN_LEN \ + sizeof(audpp_cmd_cfg_object_params_sidechain) + + +#define AUDPP_CMD_SIDECHAIN_ACTIVE_FLAG_DIS 0x0000 +#define AUDPP_CMD_SIDECHAIN_ACTIVE_FLAG_ENA -1 + +typedef struct { + audpp_cmd_cfg_object_params_common common; + signed short active_flag; + unsigned short num_bands; + union { + filter_1 filter_1_params; + filter_2 filter_2_params; + filter_3 filter_3_params; + filter_4 filter_4_params; + } __attribute__((packed)) params_filter; +} __attribute__((packed)) audpp_cmd_cfg_object_params_sidechain; + + +/* + * Command Structure to configure post processing parameters (QAFX) + */ + +#define AUDPP_CMD_CFG_OBJECT_PARAMS_QAFX_LEN \ + sizeof(audpp_cmd_cfg_object_params_qafx) + +#define AUDPP_CMD_QAFX_ENA_DISA 0x0000 +#define AUDPP_CMD_QAFX_ENA_ENA_CFG -1 +#define AUDPP_CMD_QAFX_ENA_DIS_CFG 0x0001 + +#define AUDPP_CMD_QAFX_CMD_TYPE_ENV 0x0100 +#define AUDPP_CMD_QAFX_CMD_TYPE_OBJ 0x0010 +#define AUDPP_CMD_QAFX_CMD_TYPE_QUERY 0x1000 + +#define AUDPP_CMD_QAFX_CMDS_ENV_OP_MODE 0x0100 +#define AUDPP_CMD_QAFX_CMDS_ENV_LIS_POS 0x0101 +#define AUDPP_CMD_QAFX_CMDS_ENV_LIS_ORI 0x0102 +#define AUDPP_CMD_QAFX_CMDS_ENV_LIS_VEL 0X0103 +#define AUDPP_CMD_QAFX_CMDS_ENV_ENV_RES 0x0107 + +#define AUDPP_CMD_QAFX_CMDS_OBJ_SAMP_FREQ 0x0010 +#define AUDPP_CMD_QAFX_CMDS_OBJ_VOL 0x0011 +#define AUDPP_CMD_QAFX_CMDS_OBJ_DIST 0x0012 +#define AUDPP_CMD_QAFX_CMDS_OBJ_POS 0x0013 +#define AUDPP_CMD_QAFX_CMDS_OBJ_VEL 0x0014 + + +typedef struct { + audpp_cmd_cfg_object_params_common common; + signed short enable; + unsigned short command_type; + unsigned short num_commands; + unsigned short commands; +} __attribute__((packed)) audpp_cmd_cfg_object_params_qafx; + +/* + * Command Structure to enable , disable or configure the reverberation effect + * (Common) + */ + +#define AUDPP_CMD_REVERB_CONFIG 0x0001 +#define AUDPP_CMD_REVERB_CONFIG_COMMON_LEN \ + sizeof(audpp_cmd_reverb_config_common) + +#define AUDPP_CMD_ENA_ENA 0xFFFF +#define AUDPP_CMD_ENA_DIS 0x0000 +#define AUDPP_CMD_ENA_CFG 0x0001 + +#define AUDPP_CMD_CMD_TYPE_ENV 0x0104 +#define AUDPP_CMD_CMD_TYPE_OBJ 0x0015 +#define AUDPP_CMD_CMD_TYPE_QUERY 0x1000 + + +typedef struct { + unsigned short cmd_id; + unsigned short enable; + unsigned short cmd_type; +} __attribute__((packed)) audpp_cmd_reverb_config_common; + +/* + * Command Structure to enable , disable or configure the reverberation effect + * (ENV-0x0104) + */ + +#define AUDPP_CMD_REVERB_CONFIG_ENV_104_LEN \ + sizeof(audpp_cmd_reverb_config_env_104) + +typedef struct { + audpp_cmd_reverb_config_common common; + unsigned short env_gain; + unsigned short decay_msw; + unsigned short decay_lsw; + unsigned short decay_timeratio_msw; + unsigned short decay_timeratio_lsw; + unsigned short delay_time; + unsigned short reverb_gain; + unsigned short reverb_delay; +} __attribute__((packed)) audpp_cmd_reverb_config_env_104; + +/* + * Command Structure to enable , disable or configure the reverberation effect + * (ENV-0x0015) + */ + +#define AUDPP_CMD_REVERB_CONFIG_ENV_15_LEN \ + sizeof(audpp_cmd_reverb_config_env_15) + +typedef struct { + audpp_cmd_reverb_config_common common; + unsigned short object_num; + unsigned short absolute_gain; +} __attribute__((packed)) audpp_cmd_reverb_config_env_15; + + +#endif /* QDSP5AUDPPCMDI_H */ + diff --git a/drivers/staging/dream/include/mach/qdsp5/qdsp5audppmsg.h b/drivers/staging/dream/include/mach/qdsp5/qdsp5audppmsg.h new file mode 100644 index 000000000000..44fea224001a --- /dev/null +++ b/drivers/staging/dream/include/mach/qdsp5/qdsp5audppmsg.h @@ -0,0 +1,318 @@ +#ifndef QDSP5AUDPPMSG_H +#define QDSP5AUDPPMSG_H + +/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* + + Q D S P 5 A U D I O P O S T P R O C E S S I N G M S G + +GENERAL DESCRIPTION + Messages sent by AUDPPTASK to ARM + +REFERENCES + None + +EXTERNALIZED FUNCTIONS + None + +Copyright(c) 1992 - 2009 by QUALCOMM, Incorporated. + +This software is licensed under the terms of the GNU General Public +License version 2, as published by the Free Software Foundation, and +may be copied, distributed, and modified under those terms. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/ +/*=========================================================================== + + EDIT HISTORY FOR FILE + +This section contains comments describing changes made to this file. +Notice that changes are listed in reverse chronological order. + + $Header: //source/qcom/qct/multimedia2/Audio/drivers/QDSP5Driver/QDSP5Interface/main/latest/qdsp5audppmsg.h#4 $ + +===========================================================================*/ + +/* + * AUDPPTASK uses audPPuPRlist to send messages to the ARM + * Location : MEMA + * Buffer Size : 45 + * No of Buffers in a queue : 5 for gaming audio and 1 for other images + */ + +/* + * MSG to Informs the ARM os Success/Failure of bringing up the decoder + */ + +#define AUDPP_MSG_STATUS_MSG 0x0001 +#define AUDPP_MSG_STATUS_MSG_LEN \ + sizeof(audpp_msg_status_msg) + +#define AUDPP_MSG_STATUS_SLEEP 0x0000 +#define AUDPP_MSG__STATUS_INIT 0x0001 +#define AUDPP_MSG_MSG_STATUS_CFG 0x0002 +#define AUDPP_MSG_STATUS_PLAY 0x0003 + +#define AUDPP_MSG_REASON_MIPS 0x0000 +#define AUDPP_MSG_REASON_MEM 0x0001 + +typedef struct{ + unsigned short dec_id; + unsigned short status; + unsigned short reason; +} __attribute__((packed)) audpp_msg_status_msg; + +/* + * MSG to communicate the spectrum analyzer output bands to the ARM + */ +#define AUDPP_MSG_SPA_BANDS 0x0002 +#define AUDPP_MSG_SPA_BANDS_LEN \ + sizeof(audpp_msg_spa_bands) + +typedef struct { + unsigned short current_object; + unsigned short spa_band_1; + unsigned short spa_band_2; + unsigned short spa_band_3; + unsigned short spa_band_4; + unsigned short spa_band_5; + unsigned short spa_band_6; + unsigned short spa_band_7; + unsigned short spa_band_8; + unsigned short spa_band_9; + unsigned short spa_band_10; + unsigned short spa_band_11; + unsigned short spa_band_12; + unsigned short spa_band_13; + unsigned short spa_band_14; + unsigned short spa_band_15; + unsigned short spa_band_16; + unsigned short spa_band_17; + unsigned short spa_band_18; + unsigned short spa_band_19; + unsigned short spa_band_20; + unsigned short spa_band_21; + unsigned short spa_band_22; + unsigned short spa_band_23; + unsigned short spa_band_24; + unsigned short spa_band_25; + unsigned short spa_band_26; + unsigned short spa_band_27; + unsigned short spa_band_28; + unsigned short spa_band_29; + unsigned short spa_band_30; + unsigned short spa_band_31; + unsigned short spa_band_32; +} __attribute__((packed)) audpp_msg_spa_bands; + +/* + * MSG to communicate the PCM I/O buffer status to ARM + */ +#define AUDPP_MSG_HOST_PCM_INTF_MSG 0x0003 +#define AUDPP_MSG_HOST_PCM_INTF_MSG_LEN \ + sizeof(audpp_msg_host_pcm_intf_msg) + +#define AUDPP_MSG_HOSTPCM_ID_TX_ARM 0x0000 +#define AUDPP_MSG_HOSTPCM_ID_ARM_TX 0x0001 +#define AUDPP_MSG_HOSTPCM_ID_RX_ARM 0x0002 +#define AUDPP_MSG_HOSTPCM_ID_ARM_RX 0x0003 + +#define AUDPP_MSG_SAMP_FREQ_INDX_96000 0x0000 +#define AUDPP_MSG_SAMP_FREQ_INDX_88200 0x0001 +#define AUDPP_MSG_SAMP_FREQ_INDX_64000 0x0002 +#define AUDPP_MSG_SAMP_FREQ_INDX_48000 0x0003 +#define AUDPP_MSG_SAMP_FREQ_INDX_44100 0x0004 +#define AUDPP_MSG_SAMP_FREQ_INDX_32000 0x0005 +#define AUDPP_MSG_SAMP_FREQ_INDX_24000 0x0006 +#define AUDPP_MSG_SAMP_FREQ_INDX_22050 0x0007 +#define AUDPP_MSG_SAMP_FREQ_INDX_16000 0x0008 +#define AUDPP_MSG_SAMP_FREQ_INDX_12000 0x0009 +#define AUDPP_MSG_SAMP_FREQ_INDX_11025 0x000A +#define AUDPP_MSG_SAMP_FREQ_INDX_8000 0x000B + +#define AUDPP_MSG_CHANNEL_MODE_MONO 0x0001 +#define AUDPP_MSG_CHANNEL_MODE_STEREO 0x0002 + +typedef struct{ + unsigned short obj_num; + unsigned short numbers_of_samples; + unsigned short host_pcm_id; + unsigned short buf_indx; + unsigned short samp_freq_indx; + unsigned short channel_mode; +} __attribute__((packed)) audpp_msg_host_pcm_intf_msg; + + +/* + * MSG to communicate 3D position of the source and listener , source volume + * source rolloff, source orientation + */ + +#define AUDPP_MSG_QAFX_POS 0x0004 +#define AUDPP_MSG_QAFX_POS_LEN \ + sizeof(audpp_msg_qafx_pos) + +typedef struct { + unsigned short current_object; + unsigned short x_pos_lis_msw; + unsigned short x_pos_lis_lsw; + unsigned short y_pos_lis_msw; + unsigned short y_pos_lis_lsw; + unsigned short z_pos_lis_msw; + unsigned short z_pos_lis_lsw; + unsigned short x_fwd_msw; + unsigned short x_fwd_lsw; + unsigned short y_fwd_msw; + unsigned short y_fwd_lsw; + unsigned short z_fwd_msw; + unsigned short z_fwd_lsw; + unsigned short x_up_msw; + unsigned short x_up_lsw; + unsigned short y_up_msw; + unsigned short y_up_lsw; + unsigned short z_up_msw; + unsigned short z_up_lsw; + unsigned short x_vel_lis_msw; + unsigned short x_vel_lis_lsw; + unsigned short y_vel_lis_msw; + unsigned short y_vel_lis_lsw; + unsigned short z_vel_lis_msw; + unsigned short z_vel_lis_lsw; + unsigned short threed_enable_flag; + unsigned short volume; + unsigned short x_pos_source_msw; + unsigned short x_pos_source_lsw; + unsigned short y_pos_source_msw; + unsigned short y_pos_source_lsw; + unsigned short z_pos_source_msw; + unsigned short z_pos_source_lsw; + unsigned short max_dist_0_msw; + unsigned short max_dist_0_lsw; + unsigned short min_dist_0_msw; + unsigned short min_dist_0_lsw; + unsigned short roll_off_factor; + unsigned short mute_after_max_flag; + unsigned short x_vel_source_msw; + unsigned short x_vel_source_lsw; + unsigned short y_vel_source_msw; + unsigned short y_vel_source_lsw; + unsigned short z_vel_source_msw; + unsigned short z_vel_source_lsw; +} __attribute__((packed)) audpp_msg_qafx_pos; + +/* + * MSG to provide AVSYNC feedback from DSP to ARM + */ + +#define AUDPP_MSG_AVSYNC_MSG 0x0005 +#define AUDPP_MSG_AVSYNC_MSG_LEN \ + sizeof(audpp_msg_avsync_msg) + +typedef struct { + unsigned short active_flag; + unsigned short num_samples_counter0_HSW; + unsigned short num_samples_counter0_MSW; + unsigned short num_samples_counter0_LSW; + unsigned short num_bytes_counter0_HSW; + unsigned short num_bytes_counter0_MSW; + unsigned short num_bytes_counter0_LSW; + unsigned short samp_freq_obj_0; + unsigned short samp_freq_obj_1; + unsigned short samp_freq_obj_2; + unsigned short samp_freq_obj_3; + unsigned short samp_freq_obj_4; + unsigned short samp_freq_obj_5; + unsigned short samp_freq_obj_6; + unsigned short samp_freq_obj_7; + unsigned short samp_freq_obj_8; + unsigned short samp_freq_obj_9; + unsigned short samp_freq_obj_10; + unsigned short samp_freq_obj_11; + unsigned short samp_freq_obj_12; + unsigned short samp_freq_obj_13; + unsigned short samp_freq_obj_14; + unsigned short samp_freq_obj_15; + unsigned short num_samples_counter4_HSW; + unsigned short num_samples_counter4_MSW; + unsigned short num_samples_counter4_LSW; + unsigned short num_bytes_counter4_HSW; + unsigned short num_bytes_counter4_MSW; + unsigned short num_bytes_counter4_LSW; +} __attribute__((packed)) audpp_msg_avsync_msg; + +/* + * MSG to provide PCM DMA Missed feedback from the DSP to ARM + */ + +#define AUDPP_MSG_PCMDMAMISSED 0x0006 +#define AUDPP_MSG_PCMDMAMISSED_LEN \ + sizeof(audpp_msg_pcmdmamissed); + +typedef struct{ + /* + ** Bit 0 0 = PCM DMA not missed for object 0 + ** 1 = PCM DMA missed for object0 + ** Bit 1 0 = PCM DMA not missed for object 1 + ** 1 = PCM DMA missed for object1 + ** Bit 2 0 = PCM DMA not missed for object 2 + ** 1 = PCM DMA missed for object2 + ** Bit 3 0 = PCM DMA not missed for object 3 + ** 1 = PCM DMA missed for object3 + ** Bit 4 0 = PCM DMA not missed for object 4 + ** 1 = PCM DMA missed for object4 + */ + unsigned short pcmdmamissed; +} __attribute__((packed)) audpp_msg_pcmdmamissed; + +/* + * MSG to AUDPP enable or disable feedback form DSP to ARM + */ + +#define AUDPP_MSG_CFG_MSG 0x0007 +#define AUDPP_MSG_CFG_MSG_LEN \ + sizeof(audpp_msg_cfg_msg) + +#define AUDPP_MSG_ENA_ENA 0xFFFF +#define AUDPP_MSG_ENA_DIS 0x0000 + +typedef struct{ + /* Enabled - 0xffff + ** Disabled - 0 + */ + unsigned short enabled; +} __attribute__((packed)) audpp_msg_cfg_msg; + +/* + * MSG to communicate the reverb per object volume + */ + +#define AUDPP_MSG_QREVERB_VOLUME 0x0008 +#define AUDPP_MSG_QREVERB_VOLUME_LEN \ + sizeof(audpp_msg_qreverb_volume) + + +typedef struct { + unsigned short obj_0_gain; + unsigned short obj_1_gain; + unsigned short obj_2_gain; + unsigned short obj_3_gain; + unsigned short obj_4_gain; + unsigned short hpcm_obj_volume; +} __attribute__((packed)) audpp_msg_qreverb_volume; + +#define AUDPP_MSG_ROUTING_ACK 0x0009 +#define AUDPP_MSG_ROUTING_ACK_LEN \ + sizeof(struct audpp_msg_routing_ack) + +struct audpp_msg_routing_ack { + unsigned short dec_id; + unsigned short routing_mode; +} __attribute__((packed)); + +#define AUDPP_MSG_FLUSH_ACK 0x000A + +#endif /* QDSP5AUDPPMSG_H */ diff --git a/drivers/staging/dream/include/mach/qdsp5/qdsp5audpreproccmdi.h b/drivers/staging/dream/include/mach/qdsp5/qdsp5audpreproccmdi.h new file mode 100644 index 000000000000..06d33d571583 --- /dev/null +++ b/drivers/staging/dream/include/mach/qdsp5/qdsp5audpreproccmdi.h @@ -0,0 +1,256 @@ +#ifndef QDSP5AUDPREPROCCMDI_H +#define QDSP5AUDPREPROCCMDI_H + +/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* + + A U D I O P R E P R O C E S S I N G I N T E R N A L C O M M A N D S + +GENERAL DESCRIPTION + This file contains defintions of format blocks of commands + that are accepted by AUDPREPROC Task + +REFERENCES + None + +EXTERNALIZED FUNCTIONS + None + +Copyright(c) 1992 - 2008 by QUALCOMM, Incorporated. + +This software is licensed under the terms of the GNU General Public +License version 2, as published by the Free Software Foundation, and +may be copied, distributed, and modified under those terms. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/ +/*=========================================================================== + + EDIT HISTORY FOR FILE + +This section contains comments describing changes made to this file. +Notice that changes are listed in reverse chronological order. + +$Header: //source/qcom/qct/multimedia2/Audio/drivers/QDSP5Driver/QDSP5Interface/main/latest/qdsp5audpreproccmdi.h#2 $ + +===========================================================================*/ + +/* + * AUDIOPREPROC COMMANDS: + * ARM uses uPAudPreProcCmdQueue to communicate with AUDPREPROCTASK + * Location : MEMB + * Buffer size : 51 + * Number of buffers in a queue : 3 + */ + +/* + * Command to configure the parameters of AGC + */ + +#define AUDPREPROC_CMD_CFG_AGC_PARAMS 0x0000 +#define AUDPREPROC_CMD_CFG_AGC_PARAMS_LEN \ + sizeof(audpreproc_cmd_cfg_agc_params) + +#define AUDPREPROC_CMD_TX_AGC_PARAM_MASK_COMP_SLOPE 0x0009 +#define AUDPREPROC_CMD_TX_AGC_PARAM_MASK_COMP_TH 0x000A +#define AUDPREPROC_CMD_TX_AGC_PARAM_MASK_EXP_SLOPE 0x000B +#define AUDPREPROC_CMD_TX_AGC_PARAM_MASK_EXP_TH 0x000C +#define AUDPREPROC_CMD_TX_AGC_PARAM_MASK_COMP_AIG_FLAG 0x000D +#define AUDPREPROC_CMD_TX_AGC_PARAM_MASK_COMP_STATIC_GAIN 0x000E +#define AUDPREPROC_CMD_TX_AGC_PARAM_MASK_TX_AGC_ENA_FLAG 0x000F + +#define AUDPREPROC_CMD_TX_AGC_ENA_FLAG_ENA -1 +#define AUDPREPROC_CMD_TX_AGC_ENA_FLAG_DIS 0x0000 + +#define AUDPREPROC_CMD_ADP_GAIN_FLAG_ENA_ADP_GAIN -1 +#define AUDPREPROC_CMD_ADP_GAIN_FLAG_ENA_STATIC_GAIN 0x0000 + +#define AUDPREPROC_CMD_PARAM_MASK_RMS_TAY 0x0004 +#define AUDPREPROC_CMD_PARAM_MASK_RELEASEK 0x0005 +#define AUDPREPROC_CMD_PARAM_MASK_DELAY 0x0006 +#define AUDPREPROC_CMD_PARAM_MASK_ATTACKK 0x0007 +#define AUDPREPROC_CMD_PARAM_MASK_LEAKRATE_SLOW 0x0008 +#define AUDPREPROC_CMD_PARAM_MASK_LEAKRATE_FAST 0x0009 +#define AUDPREPROC_CMD_PARAM_MASK_AIG_RELEASEK 0x000A +#define AUDPREPROC_CMD_PARAM_MASK_AIG_MIN 0x000B +#define AUDPREPROC_CMD_PARAM_MASK_AIG_MAX 0x000C +#define AUDPREPROC_CMD_PARAM_MASK_LEAK_UP 0x000D +#define AUDPREPROC_CMD_PARAM_MASK_LEAK_DOWN 0x000E +#define AUDPREPROC_CMD_PARAM_MASK_AIG_ATTACKK 0x000F + +typedef struct { + unsigned short cmd_id; + unsigned short tx_agc_param_mask; + unsigned short tx_agc_enable_flag; + unsigned short static_gain; + signed short adaptive_gain_flag; + unsigned short expander_th; + unsigned short expander_slope; + unsigned short compressor_th; + unsigned short compressor_slope; + unsigned short param_mask; + unsigned short aig_attackk; + unsigned short aig_leak_down; + unsigned short aig_leak_up; + unsigned short aig_max; + unsigned short aig_min; + unsigned short aig_releasek; + unsigned short aig_leakrate_fast; + unsigned short aig_leakrate_slow; + unsigned short attackk_msw; + unsigned short attackk_lsw; + unsigned short delay; + unsigned short releasek_msw; + unsigned short releasek_lsw; + unsigned short rms_tav; +} __attribute__((packed)) audpreproc_cmd_cfg_agc_params; + + +/* + * Command to configure the params of Advanved AGC + */ + +#define AUDPREPROC_CMD_CFG_AGC_PARAMS_2 0x0001 +#define AUDPREPROC_CMD_CFG_AGC_PARAMS_2_LEN \ + sizeof(audpreproc_cmd_cfg_agc_params_2) + +#define AUDPREPROC_CMD_2_TX_AGC_ENA_FLAG_ENA -1; +#define AUDPREPROC_CMD_2_TX_AGC_ENA_FLAG_DIS 0x0000; + +typedef struct { + unsigned short cmd_id; + unsigned short agc_param_mask; + signed short tx_agc_enable_flag; + unsigned short comp_static_gain; + unsigned short exp_th; + unsigned short exp_slope; + unsigned short comp_th; + unsigned short comp_slope; + unsigned short comp_rms_tav; + unsigned short comp_samp_mask; + unsigned short comp_attackk_msw; + unsigned short comp_attackk_lsw; + unsigned short comp_releasek_msw; + unsigned short comp_releasek_lsw; + unsigned short comp_delay; + unsigned short comp_makeup_gain; +} __attribute__((packed)) audpreproc_cmd_cfg_agc_params_2; + +/* + * Command to configure params for ns + */ + +#define AUDPREPROC_CMD_CFG_NS_PARAMS 0x0002 +#define AUDPREPROC_CMD_CFG_NS_PARAMS_LEN \ + sizeof(audpreproc_cmd_cfg_ns_params) + +#define AUDPREPROC_CMD_EC_MODE_NEW_NLMS_ENA 0x0001 +#define AUDPREPROC_CMD_EC_MODE_NEW_NLMS_DIS 0x0000 +#define AUDPREPROC_CMD_EC_MODE_NEW_DES_ENA 0x0002 +#define AUDPREPROC_CMD_EC_MODE_NEW_DES_DIS 0x0000 +#define AUDPREPROC_CMD_EC_MODE_NEW_NS_ENA 0x0004 +#define AUDPREPROC_CMD_EC_MODE_NEW_NS_DIS 0x0000 +#define AUDPREPROC_CMD_EC_MODE_NEW_CNI_ENA 0x0008 +#define AUDPREPROC_CMD_EC_MODE_NEW_CNI_DIS 0x0000 + +#define AUDPREPROC_CMD_EC_MODE_NEW_NLES_ENA 0x0010 +#define AUDPREPROC_CMD_EC_MODE_NEW_NLES_DIS 0x0000 +#define AUDPREPROC_CMD_EC_MODE_NEW_HB_ENA 0x0020 +#define AUDPREPROC_CMD_EC_MODE_NEW_HB_DIS 0x0000 +#define AUDPREPROC_CMD_EC_MODE_NEW_VA_ENA 0x0040 +#define AUDPREPROC_CMD_EC_MODE_NEW_VA_DIS 0x0000 +#define AUDPREPROC_CMD_EC_MODE_NEW_PCD_ENA 0x0080 +#define AUDPREPROC_CMD_EC_MODE_NEW_PCD_DIS 0x0000 +#define AUDPREPROC_CMD_EC_MODE_NEW_FEHI_ENA 0x0100 +#define AUDPREPROC_CMD_EC_MODE_NEW_FEHI_DIS 0x0000 +#define AUDPREPROC_CMD_EC_MODE_NEW_NEHI_ENA 0x0200 +#define AUDPREPROC_CMD_EC_MODE_NEW_NEHI_DIS 0x0000 +#define AUDPREPROC_CMD_EC_MODE_NEW_NLPP_ENA 0x0400 +#define AUDPREPROC_CMD_EC_MODE_NEW_NLPP_DIS 0x0000 +#define AUDPREPROC_CMD_EC_MODE_NEW_FNE_ENA 0x0800 +#define AUDPREPROC_CMD_EC_MODE_NEW_FNE_DIS 0x0000 +#define AUDPREPROC_CMD_EC_MODE_NEW_PRENLMS_ENA 0x1000 +#define AUDPREPROC_CMD_EC_MODE_NEW_PRENLMS_DIS 0x0000 + +typedef struct { + unsigned short cmd_id; + unsigned short ec_mode_new; + unsigned short dens_gamma_n; + unsigned short dens_nfe_block_size; + unsigned short dens_limit_ns; + unsigned short dens_limit_ns_d; + unsigned short wb_gamma_e; + unsigned short wb_gamma_n; +} __attribute__((packed)) audpreproc_cmd_cfg_ns_params; + +/* + * Command to configure parameters for IIR tuning filter + */ + +#define AUDPREPROC_CMD_CFG_IIR_TUNING_FILTER_PARAMS 0x0003 +#define AUDPREPROC_CMD_CFG_IIR_TUNING_FILTER_PARAMS_LEN \ + sizeof(audpreproc_cmd_cfg_iir_tuning_filter_params) + +#define AUDPREPROC_CMD_IIR_ACTIVE_FLAG_DIS 0x0000 +#define AUDPREPROC_CMD_IIR_ACTIVE_FLAG_ENA 0x0001 + +typedef struct { + unsigned short cmd_id; + unsigned short active_flag; + unsigned short num_bands; + unsigned short numerator_coeff_b0_filter0_lsw; + unsigned short numerator_coeff_b0_filter0_msw; + unsigned short numerator_coeff_b1_filter0_lsw; + unsigned short numerator_coeff_b1_filter0_msw; + unsigned short numerator_coeff_b2_filter0_lsw; + unsigned short numerator_coeff_b2_filter0_msw; + unsigned short numerator_coeff_b0_filter1_lsw; + unsigned short numerator_coeff_b0_filter1_msw; + unsigned short numerator_coeff_b1_filter1_lsw; + unsigned short numerator_coeff_b1_filter1_msw; + unsigned short numerator_coeff_b2_filter1_lsw; + unsigned short numerator_coeff_b2_filter1_msw; + unsigned short numerator_coeff_b0_filter2_lsw; + unsigned short numerator_coeff_b0_filter2_msw; + unsigned short numerator_coeff_b1_filter2_lsw; + unsigned short numerator_coeff_b1_filter2_msw; + unsigned short numerator_coeff_b2_filter2_lsw; + unsigned short numerator_coeff_b2_filter2_msw; + unsigned short numerator_coeff_b0_filter3_lsw; + unsigned short numerator_coeff_b0_filter3_msw; + unsigned short numerator_coeff_b1_filter3_lsw; + unsigned short numerator_coeff_b1_filter3_msw; + unsigned short numerator_coeff_b2_filter3_lsw; + unsigned short numerator_coeff_b2_filter3_msw; + unsigned short denominator_coeff_a0_filter0_lsw; + unsigned short denominator_coeff_a0_filter0_msw; + unsigned short denominator_coeff_a1_filter0_lsw; + unsigned short denominator_coeff_a1_filter0_msw; + unsigned short denominator_coeff_a0_filter1_lsw; + unsigned short denominator_coeff_a0_filter1_msw; + unsigned short denominator_coeff_a1_filter1_lsw; + unsigned short denominator_coeff_a1_filter1_msw; + unsigned short denominator_coeff_a0_filter2_lsw; + unsigned short denominator_coeff_a0_filter2_msw; + unsigned short denominator_coeff_a1_filter2_lsw; + unsigned short denominator_coeff_a1_filter2_msw; + unsigned short denominator_coeff_a0_filter3_lsw; + unsigned short denominator_coeff_a0_filter3_msw; + unsigned short denominator_coeff_a1_filter3_lsw; + unsigned short denominator_coeff_a1_filter3_msw; + + unsigned short shift_factor_filter0; + unsigned short shift_factor_filter1; + unsigned short shift_factor_filter2; + unsigned short shift_factor_filter3; + + unsigned short channel_selected0; + unsigned short channel_selected1; + unsigned short channel_selected2; + unsigned short channel_selected3; +} __attribute__((packed))audpreproc_cmd_cfg_iir_tuning_filter_params; + +#endif diff --git a/drivers/staging/dream/include/mach/qdsp5/qdsp5audpreprocmsg.h b/drivers/staging/dream/include/mach/qdsp5/qdsp5audpreprocmsg.h new file mode 100644 index 000000000000..f40e41e76737 --- /dev/null +++ b/drivers/staging/dream/include/mach/qdsp5/qdsp5audpreprocmsg.h @@ -0,0 +1,85 @@ +#ifndef QDSP5AUDPREPROCMSG_H +#define QDSP5AUDPREPROCMSG_H + +/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* + + A U D I O P R E P R O C E S S I N G M E S S A G E S + +GENERAL DESCRIPTION + This file contains defintions of format blocks of messages + that are rcvd by AUDPREPROC Task + +REFERENCES + None + +EXTERNALIZED FUNCTIONS + None + +Copyright(c) 1992 - 2008 by QUALCOMM, Incorporated. + +This software is licensed under the terms of the GNU General Public +License version 2, as published by the Free Software Foundation, and +may be copied, distributed, and modified under those terms. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/ +/*=========================================================================== + + EDIT HISTORY FOR FILE + +This section contains comments describing changes made to this file. +Notice that changes are listed in reverse chronological order. + + $Header: //source/qcom/qct/multimedia2/Audio/drivers/QDSP5Driver/QDSP5Interface/main/latest/qdsp5audpreprocmsg.h#3 $ + +===========================================================================*/ + +/* + * ADSPREPROCTASK Messages + * AUDPREPROCTASK uses audPreProcUpRlist to communicate with ARM + * Location : MEMA + * Message Length : 2 + */ + +/* + * Message to indicate particular feature has been enabled or disabled + */ + + +#define AUDPREPROC_MSG_CMD_CFG_DONE_MSG 0x0000 +#define AUDPREPROC_MSG_CMD_CFG_DONE_MSG_LEN \ + sizeof(audpreproc_msg_cmd_cfg_done_msg) + +#define AUDPREPROC_MSG_TYPE_AGC 0x0000 +#define AUDPREPROC_MSG_TYPE_NOISE_REDUCTION 0x0001 +#define AUDPREPROC_MSG_TYPE_IIR_FILTER 0x0002 + + +#define AUDPREPROC_MSG_STATUS_FLAG_ENA -1 +#define AUDPREPROC_MSG_STATUS_FLAG_DIS 0x0000 + +typedef struct { + unsigned short type; + signed short status_flag; +} __attribute__((packed)) audpreproc_msg_cmd_cfg_done_msg; + + +/* + * Message to indicate particular feature has selected for wrong samp freq + */ + +#define AUDPREPROC_MSG_ERROR_MSG_ID 0x0001 +#define AUDPREPROC_MSG_ERROR_MSG_ID_LEN \ + sizeof(audpreproc_msg_error_msg_id) + +#define AUDPREPROC_MSG_ERR_INDEX_NS 0x0000 + +typedef struct { + unsigned short err_index; +} __attribute__((packed)) audpreproc_msg_error_msg_id; + +#endif diff --git a/drivers/staging/dream/include/mach/qdsp5/qdsp5audreccmdi.h b/drivers/staging/dream/include/mach/qdsp5/qdsp5audreccmdi.h new file mode 100644 index 000000000000..d03ee024ae91 --- /dev/null +++ b/drivers/staging/dream/include/mach/qdsp5/qdsp5audreccmdi.h @@ -0,0 +1,176 @@ +#ifndef QDSP5AUDRECCMDI_H +#define QDSP5AUDRECCMDI_H + +/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* + + A U D I O R E C O R D I N T E R N A L C O M M A N D S + +GENERAL DESCRIPTION + This file contains defintions of format blocks of commands + that are accepted by AUDREC Task + +REFERENCES + None + +EXTERNALIZED FUNCTIONS + None + +Copyright(c) 1992 - 2008 by QUALCOMM, Incorporated. + +This software is licensed under the terms of the GNU General Public +License version 2, as published by the Free Software Foundation, and +may be copied, distributed, and modified under those terms. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/ + +/*=========================================================================== + + EDIT HISTORY FOR FILE + +This section contains comments describing changes made to this file. +Notice that changes are listed in reverse chronological order. + + $Header: //source/qcom/qct/multimedia2/Audio/drivers/QDSP5Driver/QDSP5Interface/main/latest/qdsp5audreccmdi.h#3 $ + +============================================================================*/ + +/* + * AUDRECTASK COMMANDS + * ARM uses 2 queues to communicate with the AUDRECTASK + * 1.uPAudRecCmdQueue + * Location :MEMC + * Buffer Size : 8 + * No of Buffers in a queue : 3 + * 2.audRecUpBitStreamQueue + * Location : MEMC + * Buffer Size : 4 + * No of buffers in a queue : 2 + */ + +/* + * Commands on uPAudRecCmdQueue + */ + +/* + * Command to initiate and terminate the audio recording section + */ + +#define AUDREC_CMD_CFG 0x0000 +#define AUDREC_CMD_CFG_LEN sizeof(audrec_cmd_cfg) + +#define AUDREC_CMD_TYPE_0_INDEX_WAV 0x0000 +#define AUDREC_CMD_TYPE_0_INDEX_AAC 0x0001 + +#define AUDREC_CMD_TYPE_0_ENA 0x4000 +#define AUDREC_CMD_TYPE_0_DIS 0x0000 + +#define AUDREC_CMD_TYPE_0_NOUPDATE 0x0000 +#define AUDREC_CMD_TYPE_0_UPDATE 0x8000 + +#define AUDREC_CMD_TYPE_1_INDEX_SBC 0x0002 + +#define AUDREC_CMD_TYPE_1_ENA 0x4000 +#define AUDREC_CMD_TYPE_1_DIS 0x0000 + +#define AUDREC_CMD_TYPE_1_NOUPDATE 0x0000 +#define AUDREC_CMD_TYPE_1_UPDATE 0x8000 + +typedef struct { + unsigned short cmd_id; + unsigned short type_0; + unsigned short type_1; +} __attribute__((packed)) audrec_cmd_cfg; + + +/* + * Command to configure the recording parameters for RecType0(AAC/WAV) encoder + */ + +#define AUDREC_CMD_AREC0PARAM_CFG 0x0001 +#define AUDREC_CMD_AREC0PARAM_CFG_LEN \ + sizeof(audrec_cmd_arec0param_cfg) + +#define AUDREC_CMD_SAMP_RATE_INDX_8000 0x000B +#define AUDREC_CMD_SAMP_RATE_INDX_11025 0x000A +#define AUDREC_CMD_SAMP_RATE_INDX_12000 0x0009 +#define AUDREC_CMD_SAMP_RATE_INDX_16000 0x0008 +#define AUDREC_CMD_SAMP_RATE_INDX_22050 0x0007 +#define AUDREC_CMD_SAMP_RATE_INDX_24000 0x0006 +#define AUDREC_CMD_SAMP_RATE_INDX_32000 0x0005 +#define AUDREC_CMD_SAMP_RATE_INDX_44100 0x0004 +#define AUDREC_CMD_SAMP_RATE_INDX_48000 0x0003 + +#define AUDREC_CMD_STEREO_MODE_MONO 0x0000 +#define AUDREC_CMD_STEREO_MODE_STEREO 0x0001 + +typedef struct { + unsigned short cmd_id; + unsigned short ptr_to_extpkt_buffer_msw; + unsigned short ptr_to_extpkt_buffer_lsw; + unsigned short buf_len; + unsigned short samp_rate_index; + unsigned short stereo_mode; + unsigned short rec_quality; +} __attribute__((packed)) audrec_cmd_arec0param_cfg; + +/* + * Command to configure the recording parameters for RecType1(SBC) encoder + */ + +#define AUDREC_CMD_AREC1PARAM_CFG 0x0002 +#define AUDREC_CMD_AREC1PARAM_CFG_LEN \ + sizeof(audrec_cmd_arec1param_cfg) + +#define AUDREC_CMD_PARAM_BUF_BLOCKS_4 0x0000 +#define AUDREC_CMD_PARAM_BUF_BLOCKS_8 0x0001 +#define AUDREC_CMD_PARAM_BUF_BLOCKS_12 0x0002 +#define AUDREC_CMD_PARAM_BUF_BLOCKS_16 0x0003 + +#define AUDREC_CMD_PARAM_BUF_SUB_BANDS_8 0x0010 +#define AUDREC_CMD_PARAM_BUF_MODE_MONO 0x0000 +#define AUDREC_CMD_PARAM_BUF_MODE_DUAL 0x0040 +#define AUDREC_CMD_PARAM_BUF_MODE_STEREO 0x0050 +#define AUDREC_CMD_PARAM_BUF_MODE_JSTEREO 0x0060 +#define AUDREC_CMD_PARAM_BUF_LOUDNESS 0x0000 +#define AUDREC_CMD_PARAM_BUF_SNR 0x0100 +#define AUDREC_CMD_PARAM_BUF_BASIC_VER 0x0000 + +typedef struct { + unsigned short cmd_id; + unsigned short ptr_to_extpkt_buffer_msw; + unsigned short ptr_to_extpkt_buffer_lsw; + unsigned short buf_len; + unsigned short param_buf; + unsigned short bit_rate_0; + unsigned short bit_rate_1; +} __attribute__((packed)) audrec_cmd_arec1param_cfg; + + +/* + * Commands on audRecUpBitStreamQueue + */ + +/* + * Command to indicate the current packet read count + */ + +#define AUDREC_CMD_PACKET_EXT_PTR 0x0000 +#define AUDREC_CMD_PACKET_EXT_PTR_LEN \ + sizeof(audrec_cmd_packet_ext_ptr) + +#define AUDREC_CMD_TYPE_0 0x0000 +#define AUDREC_CMD_TYPE_1 0x0001 + +typedef struct { + unsigned short cmd_id; + unsigned short type; + unsigned short curr_rec_count_msw; + unsigned short curr_rec_count_lsw; +} __attribute__((packed)) audrec_cmd_packet_ext_ptr; + +#endif diff --git a/drivers/staging/dream/include/mach/qdsp5/qdsp5audrecmsg.h b/drivers/staging/dream/include/mach/qdsp5/qdsp5audrecmsg.h new file mode 100644 index 000000000000..bb6eb5093cf5 --- /dev/null +++ b/drivers/staging/dream/include/mach/qdsp5/qdsp5audrecmsg.h @@ -0,0 +1,127 @@ +#ifndef QDSP5AUDRECMSGI_H +#define QDSP5AUDRECMSGI_H + +/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* + + A U D I O R E C O R D M E S S A G E S + +GENERAL DESCRIPTION + This file contains defintions of format blocks of messages + that are sent by AUDREC Task + +REFERENCES + None + +EXTERNALIZED FUNCTIONS + None + +Copyright(c) 1992 - 2008 by QUALCOMM, Incorporated. + +This software is licensed under the terms of the GNU General Public +License version 2, as published by the Free Software Foundation, and +may be copied, distributed, and modified under those terms. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/ + +/*=========================================================================== + + EDIT HISTORY FOR FILE + +This section contains comments describing changes made to this file. +Notice that changes are listed in reverse chronological order. + + $Header: //source/qcom/qct/multimedia2/Audio/drivers/QDSP5Driver/QDSP5Interface/main/latest/qdsp5audrecmsg.h#3 $ + +============================================================================*/ + +/* + * AUDRECTASK MESSAGES + * AUDRECTASK uses audRecUpRlist to communicate with ARM + * Location : MEMC + * Buffer size : 4 + * No of buffers in a queue : 2 + */ + +/* + * Message to notify that config command is done + */ + +#define AUDREC_MSG_CMD_CFG_DONE_MSG 0x0002 +#define AUDREC_MSG_CMD_CFG_DONE_MSG_LEN \ + sizeof(audrec_msg_cmd_cfg_done_msg) + + +#define AUDREC_MSG_CFG_DONE_TYPE_0_ENA 0x4000 +#define AUDREC_MSG_CFG_DONE_TYPE_0_DIS 0x0000 + +#define AUDREC_MSG_CFG_DONE_TYPE_0_NO_UPDATE 0x0000 +#define AUDREC_MSG_CFG_DONE_TYPE_0_UPDATE 0x8000 + +#define AUDREC_MSG_CFG_DONE_TYPE_1_ENA 0x4000 +#define AUDREC_MSG_CFG_DONE_TYPE_1_DIS 0x0000 + +#define AUDREC_MSG_CFG_DONE_TYPE_1_NO_UPDATE 0x0000 +#define AUDREC_MSG_CFG_DONE_TYPE_1_UPDATE 0x8000 + +typedef struct { + unsigned short type_0; + unsigned short type_1; +} __attribute__((packed))audrec_msg_cmd_cfg_done_msg; + + +/* + * Message to notify arec0/1 cfg done and recording params revd by task + */ + +#define AUDREC_MSG_CMD_AREC_PARAM_CFG_DONE_MSG 0x0003 +#define AUDREC_MSG_CMD_AREC_PARAM_CFG_DONE_MSG_LEN \ + sizeof(audrec_msg_cmd_arec_param_cfg_done_msg) + +#define AUDREC_MSG_AREC_PARAM_TYPE_0 0x0000 +#define AUDREC_MSG_AREC_PARAM_TYPE_1 0x0001 + +typedef struct { + unsigned short type; +} __attribute__((packed))audrec_msg_cmd_arec_param_cfg_done_msg; + + +/* + * Message to notify no more buffers are available in ext mem to DME + */ + +#define AUDREC_MSG_FATAL_ERR_MSG 0x0004 +#define AUDREC_MSG_FATAL_ERR_MSG_LEN \ + sizeof(audrec_msg_fatal_err_msg) + +#define AUDREC_MSG_FATAL_ERR_TYPE_0 0x0000 +#define AUDREC_MSG_FATAL_ERR_TYPE_1 0x0001 + +typedef struct { + unsigned short type; +} __attribute__((packed))audrec_msg_fatal_err_msg; + +/* + * Message to notify DME deliverd the encoded pkt to ext pkt buffer + */ + +#define AUDREC_MSG_PACKET_READY_MSG 0x0005 +#define AUDREC_MSG_PACKET_READY_MSG_LEN \ + sizeof(audrec_msg_packet_ready_msg) + +#define AUDREC_MSG_PACKET_READY_TYPE_0 0x0000 +#define AUDREC_MSG_PACKET_READY_TYPE_1 0x0001 + +typedef struct { + unsigned short type; + unsigned short pkt_counter_msw; + unsigned short pkt_counter_lsw; + unsigned short pkt_read_cnt_msw; + unsigned short pkt_read_cnt_lsw; +} __attribute__((packed))audrec_msg_packet_ready_msg; + +#endif diff --git a/drivers/staging/dream/include/mach/qdsp5/qdsp5jpegcmdi.h b/drivers/staging/dream/include/mach/qdsp5/qdsp5jpegcmdi.h new file mode 100644 index 000000000000..574ad6bbcade --- /dev/null +++ b/drivers/staging/dream/include/mach/qdsp5/qdsp5jpegcmdi.h @@ -0,0 +1,376 @@ +#ifndef QDSP5VIDJPEGCMDI_H +#define QDSP5VIDJPEGCMDI_H + +/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* + + J P E G I N T E R N A L C O M M A N D S + +GENERAL DESCRIPTION + This file contains defintions of format blocks of commands + that are accepted by JPEG Task + +REFERENCES + None + +EXTERNALIZED FUNCTIONS + None + +Copyright(c) 1992 - 2008 by QUALCOMM, Incorporated. + +This software is licensed under the terms of the GNU General Public +License version 2, as published by the Free Software Foundation, and +may be copied, distributed, and modified under those terms. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/ +/*=========================================================================== + + EDIT HISTORY FOR FILE + +This section contains comments describing changes made to this file. +Notice that changes are listed in reverse chronological order. + +$Header: //source/qcom/qct/multimedia2/AdspSvc/7XXX/qdsp5cmd/video/qdsp5jpegcmdi.h#2 $ $DateTime: 2008/07/30 10:50:23 $ $Author: pavanr $ +Revision History: +when who what, where, why +-------- --- ---------------------------------------------------------- +06/09/08 sv initial version +===========================================================================*/ + +/* + * ARM to JPEG configuration commands are passed through the + * uPJpegCfgCmdQueue + */ + +/* + * Command to configure JPEG Encoder + */ + +#define JPEG_CMD_ENC_CFG 0x0000 +#define JPEG_CMD_ENC_CFG_LEN sizeof(jpeg_cmd_enc_cfg) + +#define JPEG_CMD_ENC_PROCESS_CFG_OP_ROTATION_0 0x0000 +#define JPEG_CMD_ENC_PROCESS_CFG_OP_ROTATION_90 0x0100 +#define JPEG_CMD_ENC_PROCESS_CFG_OP_ROTATION_180 0x0200 +#define JPEG_CMD_ENC_PROCESS_CFG_OP_ROTATION_270 0x0300 +#define JPEG_CMD_ENC_PROCESS_CFG_IP_DATA_FORMAT_M 0x0003 +#define JPEG_CMD_ENC_PROCESS_CFG_IP_DATA_FORMAT_H2V2 0x0000 +#define JPEG_CMD_ENC_PROCESS_CFG_IP_DATA_FORMAT_H2V1 0x0001 +#define JPEG_CMD_ENC_PROCESS_CFG_IP_DATA_FORMAT_H1V2 0x0002 + +#define JPEG_CMD_IP_SIZE_CFG_LUMA_HEIGHT_M 0x0000FFFF +#define JPEG_CMD_IP_SIZE_CFG_LUMA_WIDTH_M 0xFFFF0000 +#define JPEG_CMD_ENC_UPSAMP_IP_SIZE_CFG_ENA 0x0001 +#define JPEG_CMD_ENC_UPSAMP_IP_SIZE_CFG_DIS 0x0000 + +#define JPEG_CMD_FRAG_SIZE_LUMA_HEIGHT_M 0xFFFF + +typedef struct { + unsigned int cmd_id; + unsigned int process_cfg; + unsigned int ip_size_cfg; + unsigned int op_size_cfg; + unsigned int frag_cfg; + unsigned int frag_cfg_part[16]; + + unsigned int part_num; + + unsigned int op_buf_0_cfg_part1; + unsigned int op_buf_0_cfg_part2; + unsigned int op_buf_1_cfg_part1; + unsigned int op_buf_1_cfg_part2; + + unsigned int luma_qunt_table[32]; + unsigned int chroma_qunt_table[32]; + + unsigned int upsamp_ip_size_cfg; + unsigned int upsamp_ip_frame_off; + unsigned int upsamp_pp_filter_coeff[64]; +} __attribute__((packed)) jpeg_cmd_enc_cfg; + +/* + * Command to configure JPEG Decoder + */ + +#define JPEG_CMD_DEC_CFG 0x0001 +#define JPEG_CMD_DEC_CFG_LEN sizeof(jpeg_cmd_dec_cfg) + +#define JPEG_CMD_DEC_OP_DATA_FORMAT_M 0x0001 +#define JPEG_CMD_DEC_OP_DATA_FORMAT_H2V2 0x0000 +#define JPEG_CMD_DEC_OP_DATA_FORMAT_H2V1 0x0001 + +#define JPEG_CMD_DEC_OP_DATA_FORMAT_SCALE_FACTOR_8 0x000000 +#define JPEG_CMD_DEC_OP_DATA_FORMAT_SCALE_FACTOR_4 0x010000 +#define JPEG_CMD_DEC_OP_DATA_FORMAT_SCALE_FACTOR_2 0x020000 +#define JPEG_CMD_DEC_OP_DATA_FORMAT_SCALE_FACTOR_1 0x030000 + +#define JPEG_CMD_DEC_IP_STREAM_BUF_CFG_PART3_NOT_FINAL 0x0000 +#define JPEG_CMD_DEC_IP_STREAM_BUF_CFG_PART3_FINAL 0x0001 + + +typedef struct { + unsigned int cmd_id; + unsigned int img_dimension_cfg; + unsigned int op_data_format; + unsigned int restart_interval; + unsigned int ip_buf_partition_num; + unsigned int ip_stream_buf_cfg_part1; + unsigned int ip_stream_buf_cfg_part2; + unsigned int ip_stream_buf_cfg_part3; + unsigned int op_stream_buf_0_cfg_part1; + unsigned int op_stream_buf_0_cfg_part2; + unsigned int op_stream_buf_0_cfg_part3; + unsigned int op_stream_buf_1_cfg_part1; + unsigned int op_stream_buf_1_cfg_part2; + unsigned int op_stream_buf_1_cfg_part3; + unsigned int luma_qunt_table_0_3; + unsigned int luma_qunt_table_4_7; + unsigned int luma_qunt_table_8_11; + unsigned int luma_qunt_table_12_15; + unsigned int luma_qunt_table_16_19; + unsigned int luma_qunt_table_20_23; + unsigned int luma_qunt_table_24_27; + unsigned int luma_qunt_table_28_31; + unsigned int luma_qunt_table_32_35; + unsigned int luma_qunt_table_36_39; + unsigned int luma_qunt_table_40_43; + unsigned int luma_qunt_table_44_47; + unsigned int luma_qunt_table_48_51; + unsigned int luma_qunt_table_52_55; + unsigned int luma_qunt_table_56_59; + unsigned int luma_qunt_table_60_63; + unsigned int chroma_qunt_table_0_3; + unsigned int chroma_qunt_table_4_7; + unsigned int chroma_qunt_table_8_11; + unsigned int chroma_qunt_table_12_15; + unsigned int chroma_qunt_table_16_19; + unsigned int chroma_qunt_table_20_23; + unsigned int chroma_qunt_table_24_27; + unsigned int chroma_qunt_table_28_31; + unsigned int chroma_qunt_table_32_35; + unsigned int chroma_qunt_table_36_39; + unsigned int chroma_qunt_table_40_43; + unsigned int chroma_qunt_table_44_47; + unsigned int chroma_qunt_table_48_51; + unsigned int chroma_qunt_table_52_55; + unsigned int chroma_qunt_table_56_59; + unsigned int chroma_qunt_table_60_63; + unsigned int luma_dc_hm_code_cnt_table_0_3; + unsigned int luma_dc_hm_code_cnt_table_4_7; + unsigned int luma_dc_hm_code_cnt_table_8_11; + unsigned int luma_dc_hm_code_cnt_table_12_15; + unsigned int luma_dc_hm_code_val_table_0_3; + unsigned int luma_dc_hm_code_val_table_4_7; + unsigned int luma_dc_hm_code_val_table_8_11; + unsigned int chroma_dc_hm_code_cnt_table_0_3; + unsigned int chroma_dc_hm_code_cnt_table_4_7; + unsigned int chroma_dc_hm_code_cnt_table_8_11; + unsigned int chroma_dc_hm_code_cnt_table_12_15; + unsigned int chroma_dc_hm_code_val_table_0_3; + unsigned int chroma_dc_hm_code_val_table_4_7; + unsigned int chroma_dc_hm_code_val_table_8_11; + unsigned int luma_ac_hm_code_cnt_table_0_3; + unsigned int luma_ac_hm_code_cnt_table_4_7; + unsigned int luma_ac_hm_code_cnt_table_8_11; + unsigned int luma_ac_hm_code_cnt_table_12_15; + unsigned int luma_ac_hm_code_val_table_0_3; + unsigned int luma_ac_hm_code_val_table_4_7; + unsigned int luma_ac_hm_code_val_table_8_11; + unsigned int luma_ac_hm_code_val_table_12_15; + unsigned int luma_ac_hm_code_val_table_16_19; + unsigned int luma_ac_hm_code_val_table_20_23; + unsigned int luma_ac_hm_code_val_table_24_27; + unsigned int luma_ac_hm_code_val_table_28_31; + unsigned int luma_ac_hm_code_val_table_32_35; + unsigned int luma_ac_hm_code_val_table_36_39; + unsigned int luma_ac_hm_code_val_table_40_43; + unsigned int luma_ac_hm_code_val_table_44_47; + unsigned int luma_ac_hm_code_val_table_48_51; + unsigned int luma_ac_hm_code_val_table_52_55; + unsigned int luma_ac_hm_code_val_table_56_59; + unsigned int luma_ac_hm_code_val_table_60_63; + unsigned int luma_ac_hm_code_val_table_64_67; + unsigned int luma_ac_hm_code_val_table_68_71; + unsigned int luma_ac_hm_code_val_table_72_75; + unsigned int luma_ac_hm_code_val_table_76_79; + unsigned int luma_ac_hm_code_val_table_80_83; + unsigned int luma_ac_hm_code_val_table_84_87; + unsigned int luma_ac_hm_code_val_table_88_91; + unsigned int luma_ac_hm_code_val_table_92_95; + unsigned int luma_ac_hm_code_val_table_96_99; + unsigned int luma_ac_hm_code_val_table_100_103; + unsigned int luma_ac_hm_code_val_table_104_107; + unsigned int luma_ac_hm_code_val_table_108_111; + unsigned int luma_ac_hm_code_val_table_112_115; + unsigned int luma_ac_hm_code_val_table_116_119; + unsigned int luma_ac_hm_code_val_table_120_123; + unsigned int luma_ac_hm_code_val_table_124_127; + unsigned int luma_ac_hm_code_val_table_128_131; + unsigned int luma_ac_hm_code_val_table_132_135; + unsigned int luma_ac_hm_code_val_table_136_139; + unsigned int luma_ac_hm_code_val_table_140_143; + unsigned int luma_ac_hm_code_val_table_144_147; + unsigned int luma_ac_hm_code_val_table_148_151; + unsigned int luma_ac_hm_code_val_table_152_155; + unsigned int luma_ac_hm_code_val_table_156_159; + unsigned int luma_ac_hm_code_val_table_160_161; + unsigned int chroma_ac_hm_code_cnt_table_0_3; + unsigned int chroma_ac_hm_code_cnt_table_4_7; + unsigned int chroma_ac_hm_code_cnt_table_8_11; + unsigned int chroma_ac_hm_code_cnt_table_12_15; + unsigned int chroma_ac_hm_code_val_table_0_3; + unsigned int chroma_ac_hm_code_val_table_4_7; + unsigned int chroma_ac_hm_code_val_table_8_11; + unsigned int chroma_ac_hm_code_val_table_12_15; + unsigned int chroma_ac_hm_code_val_table_16_19; + unsigned int chroma_ac_hm_code_val_table_20_23; + unsigned int chroma_ac_hm_code_val_table_24_27; + unsigned int chroma_ac_hm_code_val_table_28_31; + unsigned int chroma_ac_hm_code_val_table_32_35; + unsigned int chroma_ac_hm_code_val_table_36_39; + unsigned int chroma_ac_hm_code_val_table_40_43; + unsigned int chroma_ac_hm_code_val_table_44_47; + unsigned int chroma_ac_hm_code_val_table_48_51; + unsigned int chroma_ac_hm_code_val_table_52_55; + unsigned int chroma_ac_hm_code_val_table_56_59; + unsigned int chroma_ac_hm_code_val_table_60_63; + unsigned int chroma_ac_hm_code_val_table_64_67; + unsigned int chroma_ac_hm_code_val_table_68_71; + unsigned int chroma_ac_hm_code_val_table_72_75; + unsigned int chroma_ac_hm_code_val_table_76_79; + unsigned int chroma_ac_hm_code_val_table_80_83; + unsigned int chroma_ac_hm_code_val_table_84_87; + unsigned int chroma_ac_hm_code_val_table_88_91; + unsigned int chroma_ac_hm_code_val_table_92_95; + unsigned int chroma_ac_hm_code_val_table_96_99; + unsigned int chroma_ac_hm_code_val_table_100_103; + unsigned int chroma_ac_hm_code_val_table_104_107; + unsigned int chroma_ac_hm_code_val_table_108_111; + unsigned int chroma_ac_hm_code_val_table_112_115; + unsigned int chroma_ac_hm_code_val_table_116_119; + unsigned int chroma_ac_hm_code_val_table_120_123; + unsigned int chroma_ac_hm_code_val_table_124_127; + unsigned int chroma_ac_hm_code_val_table_128_131; + unsigned int chroma_ac_hm_code_val_table_132_135; + unsigned int chroma_ac_hm_code_val_table_136_139; + unsigned int chroma_ac_hm_code_val_table_140_143; + unsigned int chroma_ac_hm_code_val_table_144_147; + unsigned int chroma_ac_hm_code_val_table_148_151; + unsigned int chroma_ac_hm_code_val_table_152_155; + unsigned int chroma_ac_hm_code_val_table_156_159; + unsigned int chroma_ac_hm_code_val_table_160_161; +} __attribute__((packed)) jpeg_cmd_dec_cfg; + + +/* + * ARM to JPEG configuration commands are passed through the + * uPJpegActionCmdQueue + */ + +/* + * Command to start the encode process + */ + +#define JPEG_CMD_ENC_ENCODE 0x0000 +#define JPEG_CMD_ENC_ENCODE_LEN sizeof(jpeg_cmd_enc_encode) + + +typedef struct { + unsigned short cmd_id; +} __attribute__((packed)) jpeg_cmd_enc_encode; + + +/* + * Command to transition from current state of encoder to IDLE state + */ + +#define JPEG_CMD_ENC_IDLE 0x0001 +#define JPEG_CMD_ENC_IDLE_LEN sizeof(jpeg_cmd_enc_idle) + + +typedef struct { + unsigned short cmd_id; +} __attribute__((packed)) jpeg_cmd_enc_idle; + + +/* + * Command to inform the encoder that another buffer is ready + */ + +#define JPEG_CMD_ENC_OP_CONSUMED 0x0002 +#define JPEG_CMD_ENC_OP_CONSUMED_LEN sizeof(jpeg_cmd_enc_op_consumed) + + +typedef struct { + unsigned int cmd_id; + unsigned int op_buf_addr; + unsigned int op_buf_size; +} __attribute__((packed)) jpeg_cmd_enc_op_consumed; + + +/* + * Command to start the decoding process + */ + +#define JPEG_CMD_DEC_DECODE 0x0003 +#define JPEG_CMD_DEC_DECODE_LEN sizeof(jpeg_cmd_dec_decode) + + +typedef struct { + unsigned short cmd_id; +} __attribute__((packed)) jpeg_cmd_dec_decode; + + +/* + * Command to transition from the current state of decoder to IDLE + */ + +#define JPEG_CMD_DEC_IDLE 0x0004 +#define JPEG_CMD_DEC_IDLE_LEN sizeof(jpeg_cmd_dec_idle) + + +typedef struct { + unsigned short cmd_id; +} __attribute__((packed)) jpeg_cmd_dec_idle; + + +/* + * Command to inform that an op buffer is ready for use + */ + +#define JPEG_CMD_DEC_OP_CONSUMED 0x0005 +#define JPEG_CMD_DEC_OP_CONSUMED_LEN sizeof(jpeg_cmd_dec_op_consumed) + + +typedef struct { + unsigned int cmd_id; + unsigned int luma_op_buf_addr; + unsigned int luma_op_buf_size; + unsigned int chroma_op_buf_addr; +} __attribute__((packed)) jpeg_cmd_dec_op_consumed; + + +/* + * Command to pass a new ip buffer to the jpeg decoder + */ + +#define JPEG_CMD_DEC_IP 0x0006 +#define JPEG_CMD_DEC_IP_LEN sizeof(jpeg_cmd_dec_ip_len) + +#define JPEG_CMD_EOI_INDICATOR_NOT_END 0x0000 +#define JPEG_CMD_EOI_INDICATOR_END 0x0001 + +typedef struct { + unsigned int cmd_id; + unsigned int ip_buf_addr; + unsigned int ip_buf_size; + unsigned int eoi_indicator; +} __attribute__((packed)) jpeg_cmd_dec_ip; + + + +#endif diff --git a/drivers/staging/dream/include/mach/qdsp5/qdsp5jpegmsg.h b/drivers/staging/dream/include/mach/qdsp5/qdsp5jpegmsg.h new file mode 100644 index 000000000000..d11aa3fbccb6 --- /dev/null +++ b/drivers/staging/dream/include/mach/qdsp5/qdsp5jpegmsg.h @@ -0,0 +1,177 @@ +#ifndef QDSP5VIDJPEGMSGI_H +#define QDSP5VIDJPEGMSGI_H + +/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* + + J P E G I N T E R N A L M E S S A G E S + +GENERAL DESCRIPTION + This file contains defintions of format blocks of messages + that are sent by JPEG Task + +REFERENCES + None + +EXTERNALIZED FUNCTIONS + None + +Copyright(c) 1992 - 2008 by QUALCOMM, Incorporated. + +This software is licensed under the terms of the GNU General Public +License version 2, as published by the Free Software Foundation, and +may be copied, distributed, and modified under those terms. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/ +/*=========================================================================== + + EDIT HISTORY FOR FILE + +This section contains comments describing changes made to this file. +Notice that changes are listed in reverse chronological order. + +$Header: //source/qcom/qct/multimedia2/AdspSvc/7XXX/qdsp5cmd/video/qdsp5jpegmsg.h#2 $ $DateTime: 2008/07/30 10:50:23 $ $Author: pavanr $ +Revision History: + +when who what, where, why +-------- --- ---------------------------------------------------------- +05/10/08 sv initial version +===========================================================================*/ + +/* + * Messages from JPEG task to ARM through jpeguPMsgQueue + */ + +/* + * Message is ACK for CMD_JPEGE_ENCODE cmd + */ + +#define JPEG_MSG_ENC_ENCODE_ACK 0x0000 +#define JPEG_MSG_ENC_ENCODE_ACK_LEN \ + sizeof(jpeg_msg_enc_encode_ack) + +typedef struct { +} __attribute__((packed)) jpeg_msg_enc_encode_ack; + + +/* + * Message informs the up when op buffer is ready for consumption and + * when encoding is complete or errors + */ + +#define JPEG_MSG_ENC_OP_PRODUCED 0x0001 +#define JPEG_MSG_ENC_OP_PRODUCED_LEN \ + sizeof(jpeg_msg_enc_op_produced) + +#define JPEG_MSGOP_OP_BUF_STATUS_ENC_DONE_PROGRESS 0x0000 +#define JPEG_MSGOP_OP_BUF_STATUS_ENC_DONE_COMPLETE 0x0001 +#define JPEG_MSGOP_OP_BUF_STATUS_ENC_ERR 0x10000 + +typedef struct { + unsigned int op_buf_addr; + unsigned int op_buf_size; + unsigned int op_buf_status; +} __attribute__((packed)) jpeg_msg_enc_op_produced; + + +/* + * Message to ack CMD_JPEGE_IDLE + */ + +#define JPEG_MSG_ENC_IDLE_ACK 0x0002 +#define JPEG_MSG_ENC_IDLE_ACK_LEN sizeof(jpeg_msg_enc_idle_ack) + + +typedef struct { +} __attribute__ ((packed)) jpeg_msg_enc_idle_ack; + + +/* + * Message to indicate the illegal command + */ + +#define JPEG_MSG_ENC_ILLEGAL_COMMAND 0x0003 +#define JPEG_MSG_ENC_ILLEGAL_COMMAND_LEN \ + sizeof(jpeg_msg_enc_illegal_command) + +typedef struct { + unsigned int status; +} __attribute__((packed)) jpeg_msg_enc_illegal_command; + + +/* + * Message to ACK CMD_JPEGD_DECODE + */ + +#define JPEG_MSG_DEC_DECODE_ACK 0x0004 +#define JPEG_MSG_DEC_DECODE_ACK_LEN \ + sizeof(jpeg_msg_dec_decode_ack) + + +typedef struct { +} __attribute__((packed)) jpeg_msg_dec_decode_ack; + + +/* + * Message to inform up that an op buffer is ready for consumption and when + * decoding is complete or an error occurs + */ + +#define JPEG_MSG_DEC_OP_PRODUCED 0x0005 +#define JPEG_MSG_DEC_OP_PRODUCED_LEN \ + sizeof(jpeg_msg_dec_op_produced) + +#define JPEG_MSG_DEC_OP_BUF_STATUS_PROGRESS 0x0000 +#define JPEG_MSG_DEC_OP_BUF_STATUS_DONE 0x0001 + +typedef struct { + unsigned int luma_op_buf_addr; + unsigned int chroma_op_buf_addr; + unsigned int num_mcus; + unsigned int op_buf_status; +} __attribute__((packed)) jpeg_msg_dec_op_produced; + +/* + * Message to ack CMD_JPEGD_IDLE cmd + */ + +#define JPEG_MSG_DEC_IDLE_ACK 0x0006 +#define JPEG_MSG_DEC_IDLE_ACK_LEN sizeof(jpeg_msg_dec_idle_ack) + + +typedef struct { +} __attribute__((packed)) jpeg_msg_dec_idle_ack; + + +/* + * Message to indicate illegal cmd was received + */ + +#define JPEG_MSG_DEC_ILLEGAL_COMMAND 0x0007 +#define JPEG_MSG_DEC_ILLEGAL_COMMAND_LEN \ + sizeof(jpeg_msg_dec_illegal_command) + + +typedef struct { + unsigned int status; +} __attribute__((packed)) jpeg_msg_dec_illegal_command; + +/* + * Message to request up for the next segment of ip bit stream + */ + +#define JPEG_MSG_DEC_IP_REQUEST 0x0008 +#define JPEG_MSG_DEC_IP_REQUEST_LEN \ + sizeof(jpeg_msg_dec_ip_request) + + +typedef struct { +} __attribute__((packed)) jpeg_msg_dec_ip_request; + + + +#endif diff --git a/drivers/staging/dream/include/mach/qdsp5/qdsp5lpmcmdi.h b/drivers/staging/dream/include/mach/qdsp5/qdsp5lpmcmdi.h new file mode 100644 index 000000000000..6c76e2c20cf4 --- /dev/null +++ b/drivers/staging/dream/include/mach/qdsp5/qdsp5lpmcmdi.h @@ -0,0 +1,82 @@ +#ifndef QDSP5LPMCMDI_H +#define QDSP5LPMCMDI_H + +/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* + + L P M I N T E R N A L C O M M A N D S + +GENERAL DESCRIPTION + This file contains defintions of format blocks of commands + that are accepted by LPM Task + +REFERENCES + None + +EXTERNALIZED FUNCTIONS + None + +Copyright(c) 1992 - 2008 by QUALCOMM, Incorporated. + +This software is licensed under the terms of the GNU General Public +License version 2, as published by the Free Software Foundation, and +may be copied, distributed, and modified under those terms. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/ +/*=========================================================================== + + EDIT HISTORY FOR FILE + +This section contains comments describing changes made to this file. +Notice that changes are listed in reverse chronological order. + + +$Header: //source/qcom/qct/multimedia2/AdspSvc/7XXX/qdsp5cmd/video/qdsp5lpmcmdi.h#2 $ $DateTime: 2008/07/30 10:50:23 $ $Author: pavanr $ +Revision History: + +when who what, where, why +-------- --- ---------------------------------------------------------- +06/12/08 sv initial version +===========================================================================*/ + + +/* + * Command to start LPM processing based on the config params + */ + +#define LPM_CMD_START 0x0000 +#define LPM_CMD_START_LEN sizeof(lpm_cmd_start) + +#define LPM_CMD_SPATIAL_FILTER_PART_OPMODE_0 0x00000000 +#define LPM_CMD_SPATIAL_FILTER_PART_OPMODE_1 0x00010000 +typedef struct { + unsigned int cmd_id; + unsigned int ip_data_cfg_part1; + unsigned int ip_data_cfg_part2; + unsigned int ip_data_cfg_part3; + unsigned int ip_data_cfg_part4; + unsigned int op_data_cfg_part1; + unsigned int op_data_cfg_part2; + unsigned int op_data_cfg_part3; + unsigned int spatial_filter_part[32]; +} __attribute__((packed)) lpm_cmd_start; + + + +/* + * Command to stop LPM processing + */ + +#define LPM_CMD_IDLE 0x0001 +#define LPM_CMD_IDLE_LEN sizeof(lpm_cmd_idle) + +typedef struct { + unsigned int cmd_id; +} __attribute__((packed)) lpm_cmd_idle; + + +#endif diff --git a/drivers/staging/dream/include/mach/qdsp5/qdsp5lpmmsg.h b/drivers/staging/dream/include/mach/qdsp5/qdsp5lpmmsg.h new file mode 100644 index 000000000000..3d1039d6ba42 --- /dev/null +++ b/drivers/staging/dream/include/mach/qdsp5/qdsp5lpmmsg.h @@ -0,0 +1,80 @@ +#ifndef QDSP5LPMMSGI_H +#define QDSP5LPMMSGI_H + +/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* + + L P M I N T E R N A L M E S S A G E S + +GENERAL DESCRIPTION + This file contains defintions of format blocks of commands + that are accepted by LPM Task + +REFERENCES + None + +EXTERNALIZED FUNCTIONS + None + +Copyright(c) 1992 - 2008 by QUALCOMM, Incorporated. + +This software is licensed under the terms of the GNU General Public +License version 2, as published by the Free Software Foundation, and +may be copied, distributed, and modified under those terms. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/ +/*=========================================================================== + + EDIT HISTORY FOR FILE + +This section contains comments describing changes made to this file. +Notice that changes are listed in reverse chronological order. + +$Header: //source/qcom/qct/multimedia2/AdspSvc/7XXX/qdsp5cmd/video/qdsp5lpmmsg.h#2 $ $DateTime: 2008/07/30 10:50:23 $ $Author: pavanr $ +Revision History: + +when who what, where, why +-------- --- ---------------------------------------------------------- +06/12/08 sv initial version +===========================================================================*/ + +/* + * Message to acknowledge CMD_LPM_IDLE command + */ + +#define LPM_MSG_IDLE_ACK 0x0000 +#define LPM_MSG_IDLE_ACK_LEN sizeof(lpm_msg_idle_ack) + +typedef struct { +} __attribute__((packed)) lpm_msg_idle_ack; + + +/* + * Message to acknowledge CMD_LPM_START command + */ + + +#define LPM_MSG_START_ACK 0x0001 +#define LPM_MSG_START_ACK_LEN sizeof(lpm_msg_start_ack) + + +typedef struct { +} __attribute__((packed)) lpm_msg_start_ack; + + +/* + * Message to notify the ARM that LPM processing is complete + */ + +#define LPM_MSG_DONE 0x0002 +#define LPM_MSG_DONE_LEN sizeof(lpm_msg_done) + +typedef struct { +} __attribute__((packed)) lpm_msg_done; + + +#endif diff --git a/drivers/staging/dream/include/mach/qdsp5/qdsp5vdeccmdi.h b/drivers/staging/dream/include/mach/qdsp5/qdsp5vdeccmdi.h new file mode 100644 index 000000000000..3a32ee99c6e4 --- /dev/null +++ b/drivers/staging/dream/include/mach/qdsp5/qdsp5vdeccmdi.h @@ -0,0 +1,235 @@ +#ifndef QDSP5VIDDECCMDI_H +#define QDSP5VIDDECCMDI_H + +/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* + + V I D E O D E C O D E R I N T E R N A L C O M M A N D S + +GENERAL DESCRIPTION + This file contains defintions of format blocks of commands + that are accepted by VIDDEC Task + +REFERENCES + None + +EXTERNALIZED FUNCTIONS + None + +Copyright(c) 1992 - 2008 by QUALCOMM, Incorporated. + +This software is licensed under the terms of the GNU General Public +License version 2, as published by the Free Software Foundation, and +may be copied, distributed, and modified under those terms. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/ +/*=========================================================================== + + EDIT HISTORY FOR FILE + +This section contains comments describing changes made to this file. +Notice that changes are listed in reverse chronological order. + +$Header: //source/qcom/qct/multimedia2/AdspSvc/7XXX/qdsp5cmd/video/qdsp5vdeccmdi.h#2 $ $DateTime: 2008/07/30 10:50:23 $ $Author: pavanr $ +Revision History: + +when who what, where, why +-------- --- ---------------------------------------------------------- +05/10/08 ac initial version +===========================================================================*/ + + +/* + * Command to inform VIDDEC that new subframe packet is ready + */ + +#define VIDDEC_CMD_SUBFRAME_PKT 0x0000 +#define VIDDEC_CMD_SUBFRAME_PKT_LEN \ + sizeof(viddec_cmd_subframe_pkt) + +#define VIDDEC_CMD_SF_INFO_1_DM_DMA_STATS_EXCHANGE_FLAG_DM 0x0000 +#define VIDDEC_CMD_SF_INFO_1_DM_DMA_STATS_EXCHANGE_FLAG_DMA 0x0001 + +#define VIDDEC_CMD_SF_INFO_0_SUBFRAME_CONTI 0x0000 +#define VIDDEC_CMD_SF_INFO_0_SUBFRAME_FIRST 0x0001 +#define VIDDEC_CMD_SF_INFO_0_SUBFRAME_LAST 0x0002 +#define VIDDEC_CMD_SF_INFO_0_SUBFRAME_FIRST_AND_LAST 0x0003 + +#define VIDDEC_CMD_CODEC_SELECTION_WORD_MPEG_4 0x0000 +#define VIDDEC_CMD_CODEC_SELECTION_WORD_H_263_P0 0x0001 +#define VIDDEC_CMD_CODEC_SELECTION_WORD_H_264 0x0002 +#define VIDDEC_CMD_CODEC_SELECTION_WORD_H_263_p3 0x0003 +#define VIDDEC_CMD_CODEC_SELECTION_WORD_RV9 0x0004 +#define VIDDEC_CMD_CODEC_SELECTION_WORD_WMV9 0x0005 +#define VIDDEC_CMD_CODEC_SELECTION_WORD_SMCDB 0x0006 +#define VIDDEC_CMD_CODEC_SELECTION_WORD_QFRE 0x0007 +#define VIDDEC_CMD_CODEC_SELECTION_WORD_VLD 0x0008 + +typedef struct { + unsigned short cmd_id; + unsigned short packet_seq_number; + unsigned short codec_instance_id; + unsigned short subframe_packet_size_high; + unsigned short subframe_packet_size_low; + unsigned short subframe_packet_high; + unsigned short subframe_packet_low; + unsigned short subframe_packet_partition; + unsigned short statistics_packet_size_high; + unsigned short statistics_packet_size_low; + unsigned short statistics_packet_high; + unsigned short statistics_packet_low; + unsigned short statistics_partition; + unsigned short subframe_info_1; + unsigned short subframe_info_0; + unsigned short codec_selection_word; + unsigned short num_mbs; +} __attribute__((packed)) viddec_cmd_subframe_pkt; + + +/* + * Command to inform VIDDEC task that post processing is required for the frame + */ + +#define VIDDEC_CMD_PP_ENABLE 0x0001 +#define VIDDEC_CMD_PP_ENABLE_LEN \ + sizeof(viddec_cmd_pp_enable) + +#define VIDDEC_CMD_PP_INFO_0_DM_DMA_LS_EXCHANGE_FLAG_DM 0x0000 +#define VIDDEC_CMD_PP_INFO_0_DM_DMA_LS_EXCHANGE_FLAG_DMA 0x0001 + +typedef struct { + unsigned short cmd_id; + unsigned short packet_seq_num; + unsigned short codec_instance_id; + unsigned short postproc_info_0; + unsigned short codec_selection_word; + unsigned short pp_output_addr_high; + unsigned short pp_output_addr_low; + unsigned short postproc_info_1; + unsigned short load_sharing_packet_size_high; + unsigned short load_sharing_packet_size_low; + unsigned short load_sharing_packet_high; + unsigned short load_sharing_packet_low; + unsigned short load_sharing_partition; + unsigned short pp_param_0; + unsigned short pp_param_1; + unsigned short pp_param_2; + unsigned short pp_param_3; +} __attribute__((packed)) viddec_cmd_pp_enable; + + +/* + * FRAME Header Packet : It is at the start of new frame + */ + +#define VIDDEC_CMD_FRAME_HEADER_PACKET 0x0002 +#define VIDDEC_CMD_FRAME_HEADER_PACKET_LEN \ + sizeof(viddec_cmd_frame_header_packet) + +#define VIDDEC_CMD_FRAME_INFO_0_ERROR_SKIP 0x0000 +#define VIDDEC_CMD_FRAME_INFO_0_ERROR_BLACK 0x0800 + +typedef struct { + unsigned short packet_id; + unsigned short x_dimension; + unsigned short y_dimension; + unsigned short line_width; + unsigned short frame_info_0; + unsigned short frame_buffer_0_high; + unsigned short frame_buffer_0_low; + unsigned short frame_buffer_1_high; + unsigned short frame_buffer_1_low; + unsigned short frame_buffer_2_high; + unsigned short frame_buffer_2_low; + unsigned short frame_buffer_3_high; + unsigned short frame_buffer_3_low; + unsigned short frame_buffer_4_high; + unsigned short frame_buffer_4_low; + unsigned short frame_buffer_5_high; + unsigned short frame_buffer_5_low; + unsigned short frame_buffer_6_high; + unsigned short frame_buffer_6_low; + unsigned short frame_buffer_7_high; + unsigned short frame_buffer_7_low; + unsigned short frame_buffer_8_high; + unsigned short frame_buffer_8_low; + unsigned short frame_buffer_9_high; + unsigned short frame_buffer_9_low; + unsigned short frame_buffer_10_high; + unsigned short frame_buffer_10_low; + unsigned short frame_buffer_11_high; + unsigned short frame_buffer_11_low; + unsigned short frame_buffer_12_high; + unsigned short frame_buffer_12_low; + unsigned short frame_buffer_13_high; + unsigned short frame_buffer_13_low; + unsigned short frame_buffer_14_high; + unsigned short frame_buffer_14_low; + unsigned short frame_buffer_15_high; + unsigned short frame_buffer_15_low; + unsigned short output_frame_buffer_high; + unsigned short output_frame_buffer_low; + unsigned short end_of_packet_marker; +} __attribute__((packed)) viddec_cmd_frame_header_packet; + + +/* + * SLICE HEADER PACKET + * I-Slice and P-Slice + */ + +#define VIDDEC_CMD_SLICE_HEADER_PKT_ISLICE 0x0003 +#define VIDDEC_CMD_SLICE_HEADER_PKT_ISLICE_LEN \ + sizeof(viddec_cmd_slice_header_pkt_islice) + +#define VIDDEC_CMD_ISLICE_INFO_1_MOD_SLICE_TYPE_PSLICE 0x0000 +#define VIDDEC_CMD_ISLICE_INFO_1_MOD_SLICE_TYPE_BSLICE 0x0100 +#define VIDDEC_CMD_ISLICE_INFO_1_MOD_SLICE_TYPE_ISLICE 0x0200 +#define VIDDEC_CMD_ISLICE_INFO_1_MOD_SLICE_TYPE_SPSLICE 0x0300 +#define VIDDEC_CMD_ISLICE_INFO_1_MOD_SLICE_TYPE_SISLICE 0x0400 +#define VIDDEC_CMD_ISLICE_INFO_1_NOPADDING 0x0000 +#define VIDDEC_CMD_ISLICE_INFO_1_PADDING 0x0800 + +#define VIDDEC_CMD_ISLICE_EOP_MARKER 0x7FFF + +typedef struct { + unsigned short cmd_id; + unsigned short packet_id; + unsigned short slice_info_0; + unsigned short slice_info_1; + unsigned short slice_info_2; + unsigned short num_bytes_in_rbsp_high; + unsigned short num_bytes_in_rbsp_low; + unsigned short num_bytes_in_rbsp_consumed; + unsigned short end_of_packet_marker; +} __attribute__((packed)) viddec_cmd_slice_header_pkt_islice; + + +#define VIDDEC_CMD_SLICE_HEADER_PKT_PSLICE 0x0003 +#define VIDDEC_CMD_SLICE_HEADER_PKT_PSLICE_LEN \ + sizeof(viddec_cmd_slice_header_pkt_pslice) + + +typedef struct { + unsigned short cmd_id; + unsigned short packet_id; + unsigned short slice_info_0; + unsigned short slice_info_1; + unsigned short slice_info_2; + unsigned short slice_info_3; + unsigned short refidx_l0_map_tab_info_0; + unsigned short refidx_l0_map_tab_info_1; + unsigned short refidx_l0_map_tab_info_2; + unsigned short refidx_l0_map_tab_info_3; + unsigned short num_bytes_in_rbsp_high; + unsigned short num_bytes_in_rbsp_low; + unsigned short num_bytes_in_rbsp_consumed; + unsigned short end_of_packet_marker; +} __attribute__((packed)) viddec_cmd_slice_header_pkt_pslice; + + +#endif diff --git a/drivers/staging/dream/include/mach/qdsp5/qdsp5vdecmsg.h b/drivers/staging/dream/include/mach/qdsp5/qdsp5vdecmsg.h new file mode 100644 index 000000000000..c1744c1644dd --- /dev/null +++ b/drivers/staging/dream/include/mach/qdsp5/qdsp5vdecmsg.h @@ -0,0 +1,107 @@ +#ifndef QDSP5VIDDECMSGI_H +#define QDSP5VIDDECMSGI_H + +/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* + + V I D E O D E C O D E R I N T E R N A L M E S S A G E S + +GENERAL DESCRIPTION + This file contains defintions of format blocks of messages + that are sent by VIDDEC Task + +REFERENCES + None + +EXTERNALIZED FUNCTIONS + None + +Copyright(c) 1992 - 2008 by QUALCOMM, Incorporated. + +This software is licensed under the terms of the GNU General Public +License version 2, as published by the Free Software Foundation, and +may be copied, distributed, and modified under those terms. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/ +/*=========================================================================== + + EDIT HISTORY FOR FILE + +This section contains comments describing changes made to this file. +Notice that changes are listed in reverse chronological order. + +$Header: //source/qcom/qct/multimedia2/AdspSvc/7XXX/qdsp5cmd/video/qdsp5vdecmsg.h#2 $ $DateTime: 2008/07/30 10:50:23 $ $Author: pavanr $ +Revision History: + +when who what, where, why +-------- --- ---------------------------------------------------------- +05/10/08 ac initial version +===========================================================================*/ + +/* + * Message to inform ARM which VDEC_SUBFRAME_PKT_CMD processed by VIDDEC TASK + */ + +#define VIDDEC_MSG_SUBF_DONE 0x0000 +#define VIDDEC_MSG_SUBF_DONE_LEN \ + sizeof(viddec_msg_subf_done) + +typedef struct { + unsigned short packet_seq_number; + unsigned short codec_instance_id; +} __attribute__((packed)) viddec_msg_subf_done; + + +/* + * Message to inform ARM one frame has been decoded + */ + +#define VIDDEC_MSG_FRAME_DONE 0x0001 +#define VIDDEC_MSG_FRAME_DONE_LEN \ + sizeof(viddec_msg_frame_done) + +typedef struct { + unsigned short packet_seq_number; + unsigned short codec_instance_id; +} __attribute__((packed)) viddec_msg_frame_done; + + +/* + * Message to inform ARM that post processing frame has been decoded + */ + +#define VIDDEC_MSG_PP_ENABLE_CMD_DONE 0x0002 +#define VIDDEC_MSG_PP_ENABLE_CMD_DONE_LEN \ + sizeof(viddec_msg_pp_enable_cmd_done) + +typedef struct { + unsigned short packet_seq_number; + unsigned short codec_instance_id; +} __attribute__((packed)) viddec_msg_pp_enable_cmd_done; + + +/* + * Message to inform ARM that one post processing frame has been decoded + */ + + +#define VIDDEC_MSG_PP_FRAME_DONE 0x0003 +#define VIDDEC_MSG_PP_FRAME_DONE_LEN \ + sizeof(viddec_msg_pp_frame_done) + +#define VIDDEC_MSG_DISP_WORTHY_DISP 0x0000 +#define VIDDEC_MSG_DISP_WORTHY_DISP_NONE 0xFFFF + + +typedef struct { + unsigned short packet_seq_number; + unsigned short codec_instance_id; + unsigned short display_worthy; +} __attribute__((packed)) viddec_msg_pp_frame_done; + + +#endif diff --git a/drivers/staging/dream/include/mach/qdsp5/qdsp5venccmdi.h b/drivers/staging/dream/include/mach/qdsp5/qdsp5venccmdi.h new file mode 100644 index 000000000000..819544d186da --- /dev/null +++ b/drivers/staging/dream/include/mach/qdsp5/qdsp5venccmdi.h @@ -0,0 +1,212 @@ +#ifndef QDSP5VIDENCCMDI_H +#define QDSP5VIDENCCMDI_H + +/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* + + V I D E O E N C O D E R I N T E R N A L C O M M A N D S + +GENERAL DESCRIPTION + This file contains defintions of format blocks of commands + that are accepted by VIDENC Task + +REFERENCES + None + +EXTERNALIZED FUNCTIONS + None + +Copyright(c) 2008 by QUALCOMM, Incorporated. +*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/ +/*=========================================================================== + + EDIT HISTORY FOR FILE + +This section contains comments describing changes made to this file. +Notice that changes are listed in reverse chronological order. + +Revision History: + +when who what, where, why +-------- --- ---------------------------------------------------------- +09/25/08 umeshp initial version +===========================================================================*/ + + #define VIDENC_CMD_CFG 0x0000 + #define VIDENC_CMD_ACTIVE 0x0001 + #define VIDENC_CMD_IDLE 0x0002 + #define VIDENC_CMD_FRAME_START 0x0003 + #define VIDENC_CMD_STATUS_QUERY 0x0004 + #define VIDENC_CMD_RC_CFG 0x0005 + #define VIDENC_CMD_DIS_CFG 0x0006 + #define VIDENC_CMD_DIS 0x0007 + #define VIDENC_CMD_INTRA_REFRESH 0x0008 + #define VIDENC_CMD_DIGITAL_ZOOM 0x0009 + + +/* + * Command to pass the frame message information to VIDENC + */ + + +#define VIDENC_CMD_FRAME_START_LEN \ + sizeof(videnc_cmd_frame_start) + +typedef struct { + unsigned short cmd_id; + unsigned short frame_info; + unsigned short frame_rho_budget_word_high; + unsigned short frame_rho_budget_word_low; + unsigned short input_luma_addr_high; + unsigned short input_luma_addr_low; + unsigned short input_chroma_addr_high; + unsigned short input_chroma_addr_low; + unsigned short ref_vop_buf_ptr_high; + unsigned short ref_vop_buf_ptr_low; + unsigned short enc_pkt_buf_ptr_high; + unsigned short enc_pkt_buf_ptr_low; + unsigned short enc_pkt_buf_size_high; + unsigned short enc_pkt_buf_size_low; + unsigned short unfilt_recon_vop_buf_ptr_high; + unsigned short unfilt_recon_vop_buf_ptr_low; + unsigned short filt_recon_vop_buf_ptr_high; + unsigned short filt_recon_vop_buf_ptr_low; +} __attribute__((packed)) videnc_cmd_frame_start; + +/* + * Command to pass the frame-level digital stabilization parameters to VIDENC + */ + + +#define VIDENC_CMD_DIS_LEN \ + sizeof(videnc_cmd_dis) + +typedef struct { + unsigned short cmd_id; + unsigned short vfe_out_prev_luma_addr_high; + unsigned short vfe_out_prev_luma_addr_low; + unsigned short stabilization_info; +} __attribute__((packed)) videnc_cmd_dis; + +/* + * Command to pass the codec related parameters to VIDENC + */ + + +#define VIDENC_CMD_CFG_LEN \ + sizeof(videnc_cmd_cfg) + +typedef struct { + unsigned short cmd_id; + unsigned short cfg_info_0; + unsigned short cfg_info_1; + unsigned short four_mv_threshold; + unsigned short ise_fse_mv_cost_fac; + unsigned short venc_frame_dim; + unsigned short venc_DM_partition; +} __attribute__((packed)) videnc_cmd_cfg; + +/* + * Command to start the video encoding + */ + + +#define VIDENC_CMD_ACTIVE_LEN \ + sizeof(videnc_cmd_active) + +typedef struct { + unsigned short cmd_id; +} __attribute__((packed)) videnc_cmd_active; + +/* + * Command to stop the video encoding + */ + + +#define VIDENC_CMD_IDLE_LEN \ + sizeof(videnc_cmd_idle) + +typedef struct { + unsigned short cmd_id; +} __attribute__((packed)) videnc_cmd_idle; + +/* + * Command to query staus of VIDENC + */ + + +#define VIDENC_CMD_STATUS_QUERY_LEN \ + sizeof(videnc_cmd_status_query) + +typedef struct { + unsigned short cmd_id; +} __attribute__((packed)) videnc_cmd_status_query; + +/* + * Command to set rate control for a frame + */ + + +#define VIDENC_CMD_RC_CFG_LEN \ + sizeof(videnc_cmd_rc_cfg) + +typedef struct { + unsigned short cmd_id; + unsigned short max_frame_qp_delta; + unsigned short max_min_frame_qp; +} __attribute__((packed)) videnc_cmd_rc_cfg; + +/* + * Command to set intra-refreshing + */ + + +#define VIDENC_CMD_INTRA_REFRESH_LEN \ + sizeof(videnc_cmd_intra_refresh) + +typedef struct { + unsigned short cmd_id; + unsigned short num_mb_refresh; + unsigned short mb_index[15]; +} __attribute__((packed)) videnc_cmd_intra_refresh; + +/* + * Command to pass digital zoom information to the VIDENC + */ +#define VIDENC_CMD_DIGITAL_ZOOM_LEN \ + sizeof(videnc_cmd_digital_zoom) + +typedef struct { + unsigned short cmd_id; + unsigned short digital_zoom_en; + unsigned short luma_frame_shift_X; + unsigned short luma_frame_shift_Y; + unsigned short up_ip_luma_rows; + unsigned short up_ip_luma_cols; + unsigned short up_ip_chroma_rows; + unsigned short up_ip_chroma_cols; + unsigned short luma_ph_incr_V_low; + unsigned short luma_ph_incr_V_high; + unsigned short luma_ph_incr_H_low; + unsigned short luma_ph_incr_H_high; + unsigned short chroma_ph_incr_V_low; + unsigned short chroma_ph_incr_V_high; + unsigned short chroma_ph_incr_H_low; + unsigned short chroma_ph_incr_H_high; +} __attribute__((packed)) videnc_cmd_digital_zoom; + +/* + * Command to configure digital stabilization parameters + */ + +#define VIDENC_CMD_DIS_CFG_LEN \ + sizeof(videnc_cmd_dis_cfg) + +typedef struct { + unsigned short cmd_id; + unsigned short image_stab_subf_start_row_col; + unsigned short image_stab_subf_dim; + unsigned short image_stab_info_0; +} __attribute__((packed)) videnc_cmd_dis_cfg; + + +#endif diff --git a/drivers/staging/dream/include/mach/qdsp5/qdsp5vfecmdi.h b/drivers/staging/dream/include/mach/qdsp5/qdsp5vfecmdi.h new file mode 100644 index 000000000000..55e8fc2269f7 --- /dev/null +++ b/drivers/staging/dream/include/mach/qdsp5/qdsp5vfecmdi.h @@ -0,0 +1,910 @@ +#ifndef QDSP5VFECMDI_H +#define QDSP5VFECMDI_H + +/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* + + V F E I N T E R N A L C O M M A N D S + +GENERAL DESCRIPTION + This file contains defintions of format blocks of commands + that are accepted by VFE Task + +REFERENCES + None + +EXTERNALIZED FUNCTIONS + None + +Copyright(c) 1992 - 2008 by QUALCOMM, Incorporated. + +This software is licensed under the terms of the GNU General Public +License version 2, as published by the Free Software Foundation, and +may be copied, distributed, and modified under those terms. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/ +/*=========================================================================== + + EDIT HISTORY FOR FILE + +This section contains comments describing changes made to this file. +Notice that changes are listed in reverse chronological order. + +$Header: //source/qcom/qct/multimedia2/AdspSvc/7XXX/qdsp5cmd/video/qdsp5vfecmdi.h#2 $ $DateTime: 2008/07/30 10:50:23 $ $Author: pavanr $ +Revision History: + +when who what, where, why +-------- --- ---------------------------------------------------------- +06/12/08 sv initial version +===========================================================================*/ + +/****************************************************************************** + * Commands through vfeCommandScaleQueue + *****************************************************************************/ + +/* + * Command to program scaler for op1 . max op of scaler is VGA + */ + + +#define VFE_CMD_SCALE_OP1_CFG 0x0000 +#define VFE_CMD_SCALE_OP1_CFG_LEN \ + sizeof(vfe_cmd_scale_op1_cfg) + +#define VFE_CMD_SCALE_OP1_SEL_IP_SEL_Y_STANDARD 0x0000 +#define VFE_CMD_SCALE_OP1_SEL_IP_SEL_Y_CASCADED 0x0001 +#define VFE_CMD_SCALE_OP1_SEL_H_Y_SCALER_DIS 0x0000 +#define VFE_CMD_SCALE_OP1_SEL_H_Y_SCALER_ENA 0x0002 +#define VFE_CMD_SCALE_OP1_SEL_H_PP_Y_SCALER_DIS 0x0000 +#define VFE_CMD_SCALE_OP1_SEL_H_PP_Y_SCALER_ENA 0x0004 +#define VFE_CMD_SCALE_OP1_SEL_V_Y_SCALER_DIS 0x0000 +#define VFE_CMD_SCALE_OP1_SEL_V_Y_SCALER_ENA 0x0008 +#define VFE_CMD_SCALE_OP1_SEL_V_PP_Y_SCALER_DIS 0x0000 +#define VFE_CMD_SCALE_OP1_SEL_V_PP_Y_SCALER_ENA 0x0010 +#define VFE_CMD_SCALE_OP1_SEL_IP_SEL_CBCR_STANDARD 0x0000 +#define VFE_CMD_SCALE_OP1_SEL_IP_SEL_CBCR_CASCADED 0x0020 +#define VFE_CMD_SCALE_OP1_SEL_H_CBCR_SCALER_DIS 0x0000 +#define VFE_CMD_SCALE_OP1_SEL_H_CBCR_SCALER_ENA 0x0040 +#define VFE_CMD_SCALE_OP1_SEL_V_CBCR_SCALER_DIS 0x0000 +#define VFE_CMD_SCALE_OP1_SEL_V_CBCR_SCALER_ENA 0x0080 + +#define VFE_CMD_OP1_PP_Y_SCALER_CFG_PART1_DONT_LOAD_COEFFS 0x80000000 +#define VFE_CMD_OP1_PP_Y_SCALER_CFG_PART1_LOAD_COEFFS 0x80000000 + +typedef struct { + unsigned int cmd_id; + unsigned int scale_op1_sel; + unsigned int y_scaler_cfg_part1; + unsigned int y_scaler_cfg_part2; + unsigned int cbcr_scaler_cfg_part1; + unsigned int cbcr_scaler_cfg_part2; + unsigned int cbcr_scaler_cfg_part3; + unsigned int pp_y_scaler_cfg_part1; + unsigned int pp_y_scaler_cfg_part2; + unsigned int y_scaler_v_coeff_bank_part1[16]; + unsigned int y_scaler_v_coeff_bank_part2[16]; + unsigned int y_scaler_h_coeff_bank_part1[16]; + unsigned int y_scaler_h_coeff_bank_part2[16]; +} __attribute__((packed)) vfe_cmd_scale_op1_cfg; + + +/* + * Command to program scaler for op2 + */ + +#define VFE_CMD_SCALE_OP2_CFG 0x0001 +#define VFE_CMD_SCALE_OP2_CFG_LEN \ + sizeof(vfe_cmd_scale_op2_cfg) + +#define VFE_CMD_SCALE_OP2_SEL_IP_SEL_Y_STANDARD 0x0000 +#define VFE_CMD_SCALE_OP2_SEL_IP_SEL_Y_CASCADED 0x0001 +#define VFE_CMD_SCALE_OP2_SEL_H_Y_SCALER_DIS 0x0000 +#define VFE_CMD_SCALE_OP2_SEL_H_Y_SCALER_ENA 0x0002 +#define VFE_CMD_SCALE_OP2_SEL_H_PP_Y_SCALER_DIS 0x0000 +#define VFE_CMD_SCALE_OP2_SEL_H_PP_Y_SCALER_ENA 0x0004 +#define VFE_CMD_SCALE_OP2_SEL_V_Y_SCALER_DIS 0x0000 +#define VFE_CMD_SCALE_OP2_SEL_V_Y_SCALER_ENA 0x0008 +#define VFE_CMD_SCALE_OP2_SEL_V_PP_Y_SCALER_DIS 0x0000 +#define VFE_CMD_SCALE_OP2_SEL_V_PP_Y_SCALER_ENA 0x0010 +#define VFE_CMD_SCALE_OP2_SEL_IP_SEL_CBCR_STANDARD 0x0000 +#define VFE_CMD_SCALE_OP2_SEL_IP_SEL_CBCR_CASCADED 0x0020 +#define VFE_CMD_SCALE_OP2_SEL_H_CBCR_SCALER_DIS 0x0000 +#define VFE_CMD_SCALE_OP2_SEL_H_CBCR_SCALER_ENA 0x0040 +#define VFE_CMD_SCALE_OP2_SEL_V_CBCR_SCALER_DIS 0x0000 +#define VFE_CMD_SCALE_OP2_SEL_V_CBCR_SCALER_ENA 0x0080 + +#define VFE_CMD_OP2_PP_Y_SCALER_CFG_PART1_DONT_LOAD_COEFFS 0x80000000 +#define VFE_CMD_OP2_PP_Y_SCALER_CFG_PART1_LOAD_COEFFS 0x80000000 + +typedef struct { + unsigned int cmd_id; + unsigned int scale_op2_sel; + unsigned int y_scaler_cfg_part1; + unsigned int y_scaler_cfg_part2; + unsigned int cbcr_scaler_cfg_part1; + unsigned int cbcr_scaler_cfg_part2; + unsigned int cbcr_scaler_cfg_part3; + unsigned int pp_y_scaler_cfg_part1; + unsigned int pp_y_scaler_cfg_part2; + unsigned int y_scaler_v_coeff_bank_part1[16]; + unsigned int y_scaler_v_coeff_bank_part2[16]; + unsigned int y_scaler_h_coeff_bank_part1[16]; + unsigned int y_scaler_h_coeff_bank_part2[16]; +} __attribute__((packed)) vfe_cmd_scale_op2_cfg; + + +/****************************************************************************** + * Commands through vfeCommandTableQueue + *****************************************************************************/ + +/* + * Command to program the AXI ip paths + */ + +#define VFE_CMD_AXI_IP_CFG 0x0000 +#define VFE_CMD_AXI_IP_CFG_LEN sizeof(vfe_cmd_axi_ip_cfg) + +#define VFE_CMD_IP_SEL_IP_FORMAT_8 0x0000 +#define VFE_CMD_IP_SEL_IP_FORMAT_10 0x0001 +#define VFE_CMD_IP_SEL_IP_FORMAT_12 0x0002 + +typedef struct { + unsigned int cmd_id; + unsigned int ip_sel; + unsigned int ip_cfg_part1; + unsigned int ip_cfg_part2; + unsigned int ip_unpack_cfg_part[6]; + unsigned int ip_buf_addr[8]; +} __attribute__ ((packed)) vfe_cmd_axi_ip_cfg; + + +/* + * Command to program axi op paths + */ + +#define VFE_CMD_AXI_OP_CFG 0x0001 +#define VFE_CMD_AXI_OP_CFG_LEN sizeof(vfe_cmd_axi_op_cfg) + +#define VFE_CMD_OP_SEL_OP1 0x0000 +#define VFE_CMD_OP_SEL_OP2 0x0001 +#define VFE_CMD_OP_SEL_OP1_OP2 0x0002 +#define VFE_CMD_OP_SEL_CTOA 0x0003 +#define VFE_CMD_OP_SEL_CTOA_OP1 0x0004 +#define VFE_CMD_OP_SEL_CTOA_OP2 0x0005 +#define VFE_CMD_OP_SEL_OP_FORMAT_8 0x0000 +#define VFE_CMD_OP_SEL_OP_FORMAT_10 0x0008 +#define VFE_CMD_OP_SEL_OP_FORMAT_12 0x0010 + + +typedef struct { + unsigned int cmd_id; + unsigned int op_sel; + unsigned int op1_y_cfg_part1; + unsigned int op1_y_cfg_part2; + unsigned int op1_cbcr_cfg_part1; + unsigned int op1_cbcr_cfg_part2; + unsigned int op2_y_cfg_part1; + unsigned int op2_y_cfg_part2; + unsigned int op2_cbcr_cfg_part1; + unsigned int op2_cbcr_cfg_part2; + unsigned int op1_buf1_addr[16]; + unsigned int op2_buf1_addr[16]; +} __attribute__((packed)) vfe_cmd_axi_op_cfg; + + + + +/* + * Command to program the roll off correction module + */ + +#define VFE_CMD_ROLLOFF_CFG 0x0002 +#define VFE_CMD_ROLLOFF_CFG_LEN \ + sizeof(vfe_cmd_rolloff_cfg) + + +typedef struct { + unsigned int cmd_id; + unsigned int correction_opt_center_pos; + unsigned int radius_square_entry[32]; + unsigned int red_table_entry[32]; + unsigned int green_table_entry[32]; + unsigned int blue_table_entry[32]; +} __attribute__((packed)) vfe_cmd_rolloff_cfg; + +/* + * Command to program RGB gamma table + */ + +#define VFE_CMD_RGB_GAMMA_CFG 0x0003 +#define VFE_CMD_RGB_GAMMA_CFG_LEN \ + sizeof(vfe_cmd_rgb_gamma_cfg) + +#define VFE_CMD_RGB_GAMMA_SEL_LINEAR 0x0000 +#define VFE_CMD_RGB_GAMMA_SEL_PW_LINEAR 0x0001 +typedef struct { + unsigned int cmd_id; + unsigned int rgb_gamma_sel; + unsigned int rgb_gamma_entry[256]; +} __attribute__((packed)) vfe_cmd_rgb_gamma_cfg; + + +/* + * Command to program luma gamma table for the noise reduction path + */ + +#define VFE_CMD_Y_GAMMA_CFG 0x0004 +#define VFE_CMD_Y_GAMMA_CFG_LEN \ + sizeof(vfe_cmd_y_gamma_cfg) + +#define VFE_CMD_Y_GAMMA_SEL_LINEAR 0x0000 +#define VFE_CMD_Y_GAMMA_SEL_PW_LINEAR 0x0001 + +typedef struct { + unsigned int cmd_id; + unsigned int y_gamma_sel; + unsigned int y_gamma_entry[256]; +} __attribute__((packed)) vfe_cmd_y_gamma_cfg; + + + +/****************************************************************************** + * Commands through vfeCommandQueue + *****************************************************************************/ + +/* + * Command to reset the VFE to a known good state.All previously programmed + * Params will be lost + */ + + +#define VFE_CMD_RESET 0x0000 +#define VFE_CMD_RESET_LEN sizeof(vfe_cmd_reset) + + +typedef struct { + unsigned short cmd_id; +} __attribute__((packed)) vfe_cmd_reset; + + +/* + * Command to start VFE processing based on the config params + */ + + +#define VFE_CMD_START 0x0001 +#define VFE_CMD_START_LEN sizeof(vfe_cmd_start) + +#define VFE_CMD_STARTUP_PARAMS_SRC_CAMIF 0x0000 +#define VFE_CMD_STARTUP_PARAMS_SRC_AXI 0x0001 +#define VFE_CMD_STARTUP_PARAMS_MODE_CONTINUOUS 0x0000 +#define VFE_CMD_STARTUP_PARAMS_MODE_SNAPSHOT 0x0002 + +#define VFE_CMD_IMAGE_PL_BLACK_LVL_CORR_DIS 0x0000 +#define VFE_CMD_IMAGE_PL_BLACK_LVL_CORR_ENA 0x0001 +#define VFE_CMD_IMAGE_PL_ROLLOFF_CORR_DIS 0x0000 +#define VFE_CMD_IMAGE_PL_ROLLOFF_CORR_ENA 0x0002 +#define VFE_CMD_IMAGE_PL_WHITE_BAL_DIS 0x0000 +#define VFE_CMD_IMAGE_PL_WHITE_BAL_ENA 0x0004 +#define VFE_CMD_IMAGE_PL_RGB_GAMMA_DIS 0x0000 +#define VFE_CMD_IMAGE_PL_RGB_GAMMA_ENA 0x0008 +#define VFE_CMD_IMAGE_PL_LUMA_NOISE_RED_PATH_DIS 0x0000 +#define VFE_CMD_IMAGE_PL_LUMA_NOISE_RED_PATH_ENA 0x0010 +#define VFE_CMD_IMAGE_PL_ADP_FILTER_DIS 0x0000 +#define VFE_CMD_IMAGE_PL_ADP_FILTER_ENA 0x0020 +#define VFE_CMD_IMAGE_PL_CHROMA_SAMP_DIS 0x0000 +#define VFE_CMD_IMAGE_PL_CHROMA_SAMP_ENA 0x0040 + + +typedef struct { + unsigned int cmd_id; + unsigned int startup_params; + unsigned int image_pipeline; + unsigned int frame_dimension; +} __attribute__((packed)) vfe_cmd_start; + + +/* + * Command to halt all processing + */ + +#define VFE_CMD_STOP 0x0002 +#define VFE_CMD_STOP_LEN sizeof(vfe_cmd_stop) + +typedef struct { + unsigned short cmd_id; +} __attribute__((packed)) vfe_cmd_stop; + + +/* + * Command to commit the params that have been programmed to take + * effect on the next frame + */ + +#define VFE_CMD_UPDATE 0x0003 +#define VFE_CMD_UPDATE_LEN sizeof(vfe_cmd_update) + + +typedef struct { + unsigned short cmd_id; +} __attribute__((packed)) vfe_cmd_update; + + +/* + * Command to program CAMIF module + */ + +#define VFE_CMD_CAMIF_CFG 0x0004 +#define VFE_CMD_CAMIF_CFG_LEN sizeof(vfe_cmd_camif_cfg) + +#define VFE_CMD_CFG_VSYNC_SYNC_EDGE_HIGH 0x0000 +#define VFE_CMD_CFG_VSYNC_SYNC_EDGE_LOW 0x0002 +#define VFE_CMD_CFG_HSYNC_SYNC_EDGE_HIGH 0x0000 +#define VFE_CMD_CFG_HSYNC_SYNC_EDGE_LOW 0x0004 +#define VFE_CMD_CFG_SYNC_MODE_APS 0x0000 +#define VFE_CMD_CFG_SYNC_MODE_EFS 0X0008 +#define VFE_CMD_CFG_SYNC_MODE_ELS 0x0010 +#define VFE_CMD_CFG_SYNC_MODE_RVD 0x0018 +#define VFE_CMD_CFG_VFE_SUBSAMP_EN_DIS 0x0000 +#define VFE_CMD_CFG_VFE_SUBSAMP_EN_ENA 0x0020 +#define VFE_CMD_CFG_BUS_SUBSAMP_EN_DIS 0x0000 +#define VFE_CMD_CFG_BUS_SUBSAMP_EN_ENA 0x0080 +#define VFE_CMD_CFG_IRQ_SUBSAMP_EN_DIS 0x0000 +#define VFE_CMD_CFG_IRQ_SUBSAMP_EN_ENA 0x0800 + +#define VFE_CMD_SUBSAMP2_CFG_PIXEL_SKIP_16 0x0000 +#define VFE_CMD_SUBSAMP2_CFG_PIXEL_SKIP_12 0x0010 + +#define VFE_CMD_EPOCH_IRQ_1_DIS 0x0000 +#define VFE_CMD_EPOCH_IRQ_1_ENA 0x4000 +#define VFE_CMD_EPOCH_IRQ_2_DIS 0x0000 +#define VFE_CMD_EPOCH_IRQ_2_ENA 0x8000 + +typedef struct { + unsigned int cmd_id; + unsigned int cfg; + unsigned int efs_cfg; + unsigned int frame_cfg; + unsigned int window_width_cfg; + unsigned int window_height_cfg; + unsigned int subsamp1_cfg; + unsigned int subsamp2_cfg; + unsigned int epoch_irq; +} __attribute__((packed)) vfe_cmd_camif_cfg; + + + +/* + * Command to program the black level module + */ + +#define VFE_CMD_BLACK_LVL_CFG 0x0005 +#define VFE_CMD_BLACK_LVL_CFG_LEN sizeof(vfe_cmd_black_lvl_cfg) + +#define VFE_CMD_BL_SEL_MANUAL 0x0000 +#define VFE_CMD_BL_SEL_AUTO 0x0001 + +typedef struct { + unsigned int cmd_id; + unsigned int black_lvl_sel; + unsigned int cfg_part[3]; +} __attribute__((packed)) vfe_cmd_black_lvl_cfg; + + +/* + * Command to program the active region by cropping the region of interest + */ + +#define VFE_CMD_ACTIVE_REGION_CFG 0x0006 +#define VFE_CMD_ACTIVE_REGION_CFG_LEN \ + sizeof(vfe_cmd_active_region_cfg) + + +typedef struct { + unsigned int cmd_id; + unsigned int cfg_part1; + unsigned int cfg_part2; +} __attribute__((packed)) vfe_cmd_active_region_cfg; + + + +/* + * Command to program the defective pixel correction(DPC) , + * adaptive bayer filter (ABF) and demosaic modules + */ + +#define VFE_CMD_DEMOSAIC_CFG 0x0007 +#define VFE_CMD_DEMOSAIC_CFG_LEN sizeof(vfe_cmd_demosaic_cfg) + +#define VFE_CMD_DEMOSAIC_PART1_ABF_EN_DIS 0x0000 +#define VFE_CMD_DEMOSAIC_PART1_ABF_EN_ENA 0x0001 +#define VFE_CMD_DEMOSAIC_PART1_DPC_EN_DIS 0x0000 +#define VFE_CMD_DEMOSAIC_PART1_DPC_EN_ENA 0x0002 +#define VFE_CMD_DEMOSAIC_PART1_FORCE_ABF_OFF 0x0000 +#define VFE_CMD_DEMOSAIC_PART1_FORCE_ABF_ON 0x0004 +#define VFE_CMD_DEMOSAIC_PART1_SLOPE_SHIFT_1 0x00000000 +#define VFE_CMD_DEMOSAIC_PART1_SLOPE_SHIFT_2 0x10000000 +#define VFE_CMD_DEMOSAIC_PART1_SLOPE_SHIFT_4 0x20000000 +#define VFE_CMD_DEMOSAIC_PART1_SLOPE_SHIFT_8 0x30000000 +#define VFE_CMD_DEMOSAIC_PART1_SLOPE_SHIFT_1_2 0x50000000 +#define VFE_CMD_DEMOSAIC_PART1_SLOPE_SHIFT_1_4 0x60000000 +#define VFE_CMD_DEMOSAIC_PART1_SLOPE_SHIFT_1_8 0x70000000 + +typedef struct { + unsigned int cmd_id; + unsigned int demosaic_part1; + unsigned int demosaic_part2; + unsigned int demosaic_part3; + unsigned int demosaic_part4; + unsigned int demosaic_part5; +} __attribute__((packed)) vfe_cmd_demosaic_cfg; + + +/* + * Command to program the ip format + */ + +#define VFE_CMD_IP_FORMAT_CFG 0x0008 +#define VFE_CMD_IP_FORMAT_CFG_LEN \ + sizeof(vfe_cmd_ip_format_cfg) + +#define VFE_CMD_IP_FORMAT_SEL_RGRG 0x0000 +#define VFE_CMD_IP_FORMAT_SEL_GRGR 0x0001 +#define VFE_CMD_IP_FORMAT_SEL_BGBG 0x0002 +#define VFE_CMD_IP_FORMAT_SEL_GBGB 0x0003 +#define VFE_CMD_IP_FORMAT_SEL_YCBYCR 0x0004 +#define VFE_CMD_IP_FORMAT_SEL_YCRYCB 0x0005 +#define VFE_CMD_IP_FORMAT_SEL_CBYCRY 0x0006 +#define VFE_CMD_IP_FORMAT_SEL_CRYCBY 0x0007 +#define VFE_CMD_IP_FORMAT_SEL_NO_CHROMA 0x0000 +#define VFE_CMD_IP_FORMAT_SEL_CHROMA 0x0008 + + +typedef struct { + unsigned int cmd_id; + unsigned int ip_format_sel; + unsigned int balance_gains_part1; + unsigned int balance_gains_part2; +} __attribute__((packed)) vfe_cmd_ip_format_cfg; + + + +/* + * Command to program max and min allowed op values + */ + +#define VFE_CMD_OP_CLAMP_CFG 0x0009 +#define VFE_CMD_OP_CLAMP_CFG_LEN \ + sizeof(vfe_cmd_op_clamp_cfg) + +typedef struct { + unsigned int cmd_id; + unsigned int op_clamp_max; + unsigned int op_clamp_min; +} __attribute__((packed)) vfe_cmd_op_clamp_cfg; + + +/* + * Command to program chroma sub sample module + */ + +#define VFE_CMD_CHROMA_SUBSAMPLE_CFG 0x000A +#define VFE_CMD_CHROMA_SUBSAMPLE_CFG_LEN \ + sizeof(vfe_cmd_chroma_subsample_cfg) + +#define VFE_CMD_CHROMA_SUBSAMP_SEL_H_INTERESTIAL_SAMPS 0x0000 +#define VFE_CMD_CHROMA_SUBSAMP_SEL_H_COSITED_SAMPS 0x0001 +#define VFE_CMD_CHROMA_SUBSAMP_SEL_V_INTERESTIAL_SAMPS 0x0000 +#define VFE_CMD_CHROMA_SUBSAMP_SEL_V_COSITED_SAMPS 0x0002 +#define VFE_CMD_CHROMA_SUBSAMP_SEL_H_SUBSAMP_DIS 0x0000 +#define VFE_CMD_CHROMA_SUBSAMP_SEL_H_SUBSAMP_ENA 0x0004 +#define VFE_CMD_CHROMA_SUBSAMP_SEL_V_SUBSAMP_DIS 0x0000 +#define VFE_CMD_CHROMA_SUBSAMP_SEL_V_SUBSAMP_ENA 0x0008 + +typedef struct { + unsigned int cmd_id; + unsigned int chroma_subsamp_sel; +} __attribute__((packed)) vfe_cmd_chroma_subsample_cfg; + + +/* + * Command to program the white balance module + */ + +#define VFE_CMD_WHITE_BALANCE_CFG 0x000B +#define VFE_CMD_WHITE_BALANCE_CFG_LEN \ + sizeof(vfe_cmd_white_balance_cfg) + +typedef struct { + unsigned int cmd_id; + unsigned int white_balance_gains; +} __attribute__((packed)) vfe_cmd_white_balance_cfg; + + +/* + * Command to program the color processing module + */ + +#define VFE_CMD_COLOR_PROCESS_CFG 0x000C +#define VFE_CMD_COLOR_PROCESS_CFG_LEN \ + sizeof(vfe_cmd_color_process_cfg) + +#define VFE_CMD_COLOR_CORRE_PART7_Q7_FACTORS 0x0000 +#define VFE_CMD_COLOR_CORRE_PART7_Q8_FACTORS 0x0001 +#define VFE_CMD_COLOR_CORRE_PART7_Q9_FACTORS 0x0002 +#define VFE_CMD_COLOR_CORRE_PART7_Q10_FACTORS 0x0003 + +typedef struct { + unsigned int cmd_id; + unsigned int color_correction_part1; + unsigned int color_correction_part2; + unsigned int color_correction_part3; + unsigned int color_correction_part4; + unsigned int color_correction_part5; + unsigned int color_correction_part6; + unsigned int color_correction_part7; + unsigned int chroma_enhance_part1; + unsigned int chroma_enhance_part2; + unsigned int chroma_enhance_part3; + unsigned int chroma_enhance_part4; + unsigned int chroma_enhance_part5; + unsigned int luma_calc_part1; + unsigned int luma_calc_part2; +} __attribute__((packed)) vfe_cmd_color_process_cfg; + + +/* + * Command to program adaptive filter module + */ + +#define VFE_CMD_ADP_FILTER_CFG 0x000D +#define VFE_CMD_ADP_FILTER_CFG_LEN \ + sizeof(vfe_cmd_adp_filter_cfg) + +#define VFE_CMD_ASF_CFG_PART_SMOOTH_FILTER_DIS 0x0000 +#define VFE_CMD_ASF_CFG_PART_SMOOTH_FILTER_ENA 0x0001 +#define VFE_CMD_ASF_CFG_PART_NO_SHARP_MODE 0x0000 +#define VFE_CMD_ASF_CFG_PART_SINGLE_FILTER 0x0002 +#define VFE_CMD_ASF_CFG_PART_DUAL_FILTER 0x0004 +#define VFE_CMD_ASF_CFG_PART_SHARP_MODE 0x0007 + +typedef struct { + unsigned int cmd_id; + unsigned int asf_cfg_part[7]; +} __attribute__((packed)) vfe_cmd_adp_filter_cfg; + + +/* + * Command to program for frame skip pattern for op1 and op2 + */ + +#define VFE_CMD_FRAME_SKIP_CFG 0x000E +#define VFE_CMD_FRAME_SKIP_CFG_LEN \ + sizeof(vfe_cmd_frame_skip_cfg) + +typedef struct { + unsigned int cmd_id; + unsigned int frame_skip_pattern_op1; + unsigned int frame_skip_pattern_op2; +} __attribute__((packed)) vfe_cmd_frame_skip_cfg; + + +/* + * Command to program field-of-view crop for digital zoom + */ + +#define VFE_CMD_FOV_CROP 0x000F +#define VFE_CMD_FOV_CROP_LEN sizeof(vfe_cmd_fov_crop) + +typedef struct { + unsigned int cmd_id; + unsigned int fov_crop_part1; + unsigned int fov_crop_part2; +} __attribute__((packed)) vfe_cmd_fov_crop; + + + +/* + * Command to program auto focus(AF) statistics module + */ + +#define VFE_CMD_STATS_AUTOFOCUS_CFG 0x0010 +#define VFE_CMD_STATS_AUTOFOCUS_CFG_LEN \ + sizeof(vfe_cmd_stats_autofocus_cfg) + +#define VFE_CMD_AF_STATS_SEL_STATS_DIS 0x0000 +#define VFE_CMD_AF_STATS_SEL_STATS_ENA 0x0001 +#define VFE_CMD_AF_STATS_SEL_PRI_FIXED 0x0000 +#define VFE_CMD_AF_STATS_SEL_PRI_VAR 0x0002 +#define VFE_CMD_AF_STATS_CFG_PART_METRIC_SUM 0x00000000 +#define VFE_CMD_AF_STATS_CFG_PART_METRIC_MAX 0x00200000 + +typedef struct { + unsigned int cmd_id; + unsigned int af_stats_sel; + unsigned int af_stats_cfg_part[8]; + unsigned int af_stats_op_buf_hdr; + unsigned int af_stats_op_buf[3]; +} __attribute__((packed)) vfe_cmd_stats_autofocus_cfg; + + +/* + * Command to program White balance(wb) and exposure (exp) + * statistics module + */ + +#define VFE_CMD_STATS_WB_EXP_CFG 0x0011 +#define VFE_CMD_STATS_WB_EXP_CFG_LEN \ + sizeof(vfe_cmd_stats_wb_exp_cfg) + +#define VFE_CMD_WB_EXP_STATS_SEL_STATS_DIS 0x0000 +#define VFE_CMD_WB_EXP_STATS_SEL_STATS_ENA 0x0001 +#define VFE_CMD_WB_EXP_STATS_SEL_PRI_FIXED 0x0000 +#define VFE_CMD_WB_EXP_STATS_SEL_PRI_VAR 0x0002 + +#define VFE_CMD_WB_EXP_STATS_CFG_PART1_EXP_REG_8_8 0x0000 +#define VFE_CMD_WB_EXP_STATS_CFG_PART1_EXP_REG_16_16 0x0001 +#define VFE_CMD_WB_EXP_STATS_CFG_PART1_EXP_SREG_8_8 0x0000 +#define VFE_CMD_WB_EXP_STATS_CFG_PART1_EXP_SREG_4_4 0x0002 + +typedef struct { + unsigned int cmd_id; + unsigned int wb_exp_stats_sel; + unsigned int wb_exp_stats_cfg_part1; + unsigned int wb_exp_stats_cfg_part2; + unsigned int wb_exp_stats_cfg_part3; + unsigned int wb_exp_stats_cfg_part4; + unsigned int wb_exp_stats_op_buf_hdr; + unsigned int wb_exp_stats_op_buf[3]; +} __attribute__((packed)) vfe_cmd_stats_wb_exp_cfg; + + +/* + * Command to program histogram(hg) stats module + */ + +#define VFE_CMD_STATS_HG_CFG 0x0012 +#define VFE_CMD_STATS_HG_CFG_LEN \ + sizeof(vfe_cmd_stats_hg_cfg) + +#define VFE_CMD_HG_STATS_SEL_PRI_FIXED 0x0000 +#define VFE_CMD_HG_STATS_SEL_PRI_VAR 0x0002 + +typedef struct { + unsigned int cmd_id; + unsigned int hg_stats_sel; + unsigned int hg_stats_cfg_part1; + unsigned int hg_stats_cfg_part2; + unsigned int hg_stats_op_buf_hdr; + unsigned int hg_stats_op_buf; +} __attribute__((packed)) vfe_cmd_stats_hg_cfg; + + +/* + * Command to acknowledge last MSG_VFE_OP1 message + */ + +#define VFE_CMD_OP1_ACK 0x0013 +#define VFE_CMD_OP1_ACK_LEN sizeof(vfe_cmd_op1_ack) + +typedef struct { + unsigned int cmd_id; + unsigned int op1_buf_y_addr; + unsigned int op1_buf_cbcr_addr; +} __attribute__((packed)) vfe_cmd_op1_ack; + + + +/* + * Command to acknowledge last MSG_VFE_OP2 message + */ + +#define VFE_CMD_OP2_ACK 0x0014 +#define VFE_CMD_OP2_ACK_LEN sizeof(vfe_cmd_op2_ack) + +typedef struct { + unsigned int cmd_id; + unsigned int op2_buf_y_addr; + unsigned int op2_buf_cbcr_addr; +} __attribute__((packed)) vfe_cmd_op2_ack; + + + +/* + * Command to acknowledge MSG_VFE_STATS_AUTOFOCUS msg + */ + +#define VFE_CMD_STATS_AF_ACK 0x0015 +#define VFE_CMD_STATS_AF_ACK_LEN sizeof(vfe_cmd_stats_af_ack) + + +typedef struct { + unsigned int cmd_id; + unsigned int af_stats_op_buf; +} __attribute__((packed)) vfe_cmd_stats_af_ack; + + +/* + * Command to acknowledge MSG_VFE_STATS_WB_EXP msg + */ + +#define VFE_CMD_STATS_WB_EXP_ACK 0x0016 +#define VFE_CMD_STATS_WB_EXP_ACK_LEN sizeof(vfe_cmd_stats_wb_exp_ack) + +typedef struct { + unsigned int cmd_id; + unsigned int wb_exp_stats_op_buf; +} __attribute__((packed)) vfe_cmd_stats_wb_exp_ack; + + +/* + * Command to acknowledge MSG_VFE_EPOCH1 message + */ + +#define VFE_CMD_EPOCH1_ACK 0x0017 +#define VFE_CMD_EPOCH1_ACK_LEN sizeof(vfe_cmd_epoch1_ack) + +typedef struct { + unsigned short cmd_id; +} __attribute__((packed)) vfe_cmd_epoch1_ack; + + +/* + * Command to acknowledge MSG_VFE_EPOCH2 message + */ + +#define VFE_CMD_EPOCH2_ACK 0x0018 +#define VFE_CMD_EPOCH2_ACK_LEN sizeof(vfe_cmd_epoch2_ack) + +typedef struct { + unsigned short cmd_id; +} __attribute__((packed)) vfe_cmd_epoch2_ack; + + + +/* + * Command to configure, enable or disable synchronous timer1 + */ + +#define VFE_CMD_SYNC_TIMER1_CFG 0x0019 +#define VFE_CMD_SYNC_TIMER1_CFG_LEN \ + sizeof(vfe_cmd_sync_timer1_cfg) + +#define VFE_CMD_SYNC_T1_CFG_PART1_TIMER_DIS 0x0000 +#define VFE_CMD_SYNC_T1_CFG_PART1_TIMER_ENA 0x0001 +#define VFE_CMD_SYNC_T1_CFG_PART1_POL_HIGH 0x0000 +#define VFE_CMD_SYNC_T1_CFG_PART1_POL_LOW 0x0002 + +typedef struct { + unsigned int cmd_id; + unsigned int sync_t1_cfg_part1; + unsigned int sync_t1_h_sync_countdown; + unsigned int sync_t1_pclk_countdown; + unsigned int sync_t1_duration; +} __attribute__((packed)) vfe_cmd_sync_timer1_cfg; + + +/* + * Command to configure, enable or disable synchronous timer1 + */ + +#define VFE_CMD_SYNC_TIMER2_CFG 0x001A +#define VFE_CMD_SYNC_TIMER2_CFG_LEN \ + sizeof(vfe_cmd_sync_timer2_cfg) + +#define VFE_CMD_SYNC_T2_CFG_PART1_TIMER_DIS 0x0000 +#define VFE_CMD_SYNC_T2_CFG_PART1_TIMER_ENA 0x0001 +#define VFE_CMD_SYNC_T2_CFG_PART1_POL_HIGH 0x0000 +#define VFE_CMD_SYNC_T2_CFG_PART1_POL_LOW 0x0002 + +typedef struct { + unsigned int cmd_id; + unsigned int sync_t2_cfg_part1; + unsigned int sync_t2_h_sync_countdown; + unsigned int sync_t2_pclk_countdown; + unsigned int sync_t2_duration; +} __attribute__((packed)) vfe_cmd_sync_timer2_cfg; + + +/* + * Command to configure and start asynchronous timer1 + */ + +#define VFE_CMD_ASYNC_TIMER1_START 0x001B +#define VFE_CMD_ASYNC_TIMER1_START_LEN \ + sizeof(vfe_cmd_async_timer1_start) + +#define VFE_CMD_ASYNC_T1_POLARITY_A_HIGH 0x0000 +#define VFE_CMD_ASYNC_T1_POLARITY_A_LOW 0x0001 +#define VFE_CMD_ASYNC_T1_POLARITY_B_HIGH 0x0000 +#define VFE_CMD_ASYNC_T1_POLARITY_B_LOW 0x0002 + +typedef struct { + unsigned int cmd_id; + unsigned int async_t1a_cfg; + unsigned int async_t1b_cfg; + unsigned int async_t1_polarity; +} __attribute__((packed)) vfe_cmd_async_timer1_start; + + +/* + * Command to configure and start asynchronous timer2 + */ + +#define VFE_CMD_ASYNC_TIMER2_START 0x001C +#define VFE_CMD_ASYNC_TIMER2_START_LEN \ + sizeof(vfe_cmd_async_timer2_start) + +#define VFE_CMD_ASYNC_T2_POLARITY_A_HIGH 0x0000 +#define VFE_CMD_ASYNC_T2_POLARITY_A_LOW 0x0001 +#define VFE_CMD_ASYNC_T2_POLARITY_B_HIGH 0x0000 +#define VFE_CMD_ASYNC_T2_POLARITY_B_LOW 0x0002 + +typedef struct { + unsigned int cmd_id; + unsigned int async_t2a_cfg; + unsigned int async_t2b_cfg; + unsigned int async_t2_polarity; +} __attribute__((packed)) vfe_cmd_async_timer2_start; + + +/* + * Command to program partial configurations of auto focus(af) + */ + +#define VFE_CMD_STATS_AF_UPDATE 0x001D +#define VFE_CMD_STATS_AF_UPDATE_LEN \ + sizeof(vfe_cmd_stats_af_update) + +#define VFE_CMD_AF_UPDATE_PART1_WINDOW_ONE 0x00000000 +#define VFE_CMD_AF_UPDATE_PART1_WINDOW_MULTI 0x80000000 + +typedef struct { + unsigned int cmd_id; + unsigned int af_update_part1; + unsigned int af_update_part2; +} __attribute__((packed)) vfe_cmd_stats_af_update; + + +/* + * Command to program partial cfg of wb and exp + */ + +#define VFE_CMD_STATS_WB_EXP_UPDATE 0x001E +#define VFE_CMD_STATS_WB_EXP_UPDATE_LEN \ + sizeof(vfe_cmd_stats_wb_exp_update) + +#define VFE_CMD_WB_EXP_UPDATE_PART1_REGIONS_8_8 0x0000 +#define VFE_CMD_WB_EXP_UPDATE_PART1_REGIONS_16_16 0x0001 +#define VFE_CMD_WB_EXP_UPDATE_PART1_SREGIONS_8_8 0x0000 +#define VFE_CMD_WB_EXP_UPDATE_PART1_SREGIONS_4_4 0x0002 + +typedef struct { + unsigned int cmd_id; + unsigned int wb_exp_update_part1; + unsigned int wb_exp_update_part2; + unsigned int wb_exp_update_part3; + unsigned int wb_exp_update_part4; +} __attribute__((packed)) vfe_cmd_stats_wb_exp_update; + + + +/* + * Command to re program the CAMIF FRAME CONFIG settings + */ + +#define VFE_CMD_UPDATE_CAMIF_FRAME_CFG 0x001F +#define VFE_CMD_UPDATE_CAMIF_FRAME_CFG_LEN \ + sizeof(vfe_cmd_update_camif_frame_cfg) + +typedef struct { + unsigned int cmd_id; + unsigned int camif_frame_cfg; +} __attribute__((packed)) vfe_cmd_update_camif_frame_cfg; + + +#endif diff --git a/drivers/staging/dream/include/mach/qdsp5/qdsp5vfemsg.h b/drivers/staging/dream/include/mach/qdsp5/qdsp5vfemsg.h new file mode 100644 index 000000000000..0053cfb65ba1 --- /dev/null +++ b/drivers/staging/dream/include/mach/qdsp5/qdsp5vfemsg.h @@ -0,0 +1,290 @@ +#ifndef QDSP5VFEMSGI_H +#define QDSP5VFEMSGI_H + +/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* + + V F E I N T E R N A L M E S S A G E S + +GENERAL DESCRIPTION + This file contains defintions of format blocks of commands + that are sent by VFE Task + +REFERENCES + None + +EXTERNALIZED FUNCTIONS + None + +Copyright(c) 1992 - 2008 by QUALCOMM, Incorporated. + +This software is licensed under the terms of the GNU General Public +License version 2, as published by the Free Software Foundation, and +may be copied, distributed, and modified under those terms. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/ +/*=========================================================================== + + EDIT HISTORY FOR FILE + +This section contains comments describing changes made to this file. +Notice that changes are listed in reverse chronological order. + +$Header: //source/qcom/qct/multimedia2/AdspSvc/7XXX/qdsp5cmd/video/qdsp5vfemsg.h#2 $ $DateTime: 2008/07/30 10:50:23 $ $Author: pavanr $ +Revision History: + +when who what, where, why +-------- --- ---------------------------------------------------------- +06/12/08 sv initial version +===========================================================================*/ + + +/* + * Message to acknowledge CMD_VFE_REST command + */ + +#define VFE_MSG_RESET_ACK 0x0000 +#define VFE_MSG_RESET_ACK_LEN sizeof(vfe_msg_reset_ack) + +typedef struct { +} __attribute__((packed)) vfe_msg_reset_ack; + + +/* + * Message to acknowledge CMD_VFE_START command + */ + +#define VFE_MSG_START_ACK 0x0001 +#define VFE_MSG_START_ACK_LEN sizeof(vfe_msg_start_ack) + +typedef struct { +} __attribute__((packed)) vfe_msg_start_ack; + +/* + * Message to acknowledge CMD_VFE_STOP command + */ + +#define VFE_MSG_STOP_ACK 0x0002 +#define VFE_MSG_STOP_ACK_LEN sizeof(vfe_msg_stop_ack) + +typedef struct { +} __attribute__((packed)) vfe_msg_stop_ack; + + +/* + * Message to acknowledge CMD_VFE_UPDATE command + */ + +#define VFE_MSG_UPDATE_ACK 0x0003 +#define VFE_MSG_UPDATE_ACK_LEN sizeof(vfe_msg_update_ack) + +typedef struct { +} __attribute__((packed)) vfe_msg_update_ack; + + +/* + * Message to notify the ARM that snapshot processing is complete + * and that the VFE is now STATE_VFE_IDLE + */ + +#define VFE_MSG_SNAPSHOT_DONE 0x0004 +#define VFE_MSG_SNAPSHOT_DONE_LEN \ + sizeof(vfe_msg_snapshot_done) + +typedef struct { +} __attribute__((packed)) vfe_msg_snapshot_done; + + + +/* + * Message to notify ARM that illegal cmd was received and + * system is in the IDLE state + */ + +#define VFE_MSG_ILLEGAL_CMD 0x0005 +#define VFE_MSG_ILLEGAL_CMD_LEN \ + sizeof(vfe_msg_illegal_cmd) + +typedef struct { + unsigned int status; +} __attribute__((packed)) vfe_msg_illegal_cmd; + + +/* + * Message to notify ARM that op1 buf is full and ready + */ + +#define VFE_MSG_OP1 0x0006 +#define VFE_MSG_OP1_LEN sizeof(vfe_msg_op1) + +typedef struct { + unsigned int op1_buf_y_addr; + unsigned int op1_buf_cbcr_addr; + unsigned int black_level_even_col; + unsigned int black_level_odd_col; + unsigned int defect_pixels_detected; + unsigned int asf_max_edge; +} __attribute__((packed)) vfe_msg_op1; + + +/* + * Message to notify ARM that op2 buf is full and ready + */ + +#define VFE_MSG_OP2 0x0007 +#define VFE_MSG_OP2_LEN sizeof(vfe_msg_op2) + +typedef struct { + unsigned int op2_buf_y_addr; + unsigned int op2_buf_cbcr_addr; + unsigned int black_level_even_col; + unsigned int black_level_odd_col; + unsigned int defect_pixels_detected; + unsigned int asf_max_edge; +} __attribute__((packed)) vfe_msg_op2; + + +/* + * Message to notify ARM that autofocus(af) stats are ready + */ + +#define VFE_MSG_STATS_AF 0x0008 +#define VFE_MSG_STATS_AF_LEN sizeof(vfe_msg_stats_af) + +typedef struct { + unsigned int af_stats_op_buffer; +} __attribute__((packed)) vfe_msg_stats_af; + + +/* + * Message to notify ARM that white balance(wb) and exposure (exp) + * stats are ready + */ + +#define VFE_MSG_STATS_WB_EXP 0x0009 +#define VFE_MSG_STATS_WB_EXP_LEN \ + sizeof(vfe_msg_stats_wb_exp) + +typedef struct { + unsigned int wb_exp_stats_op_buf; +} __attribute__((packed)) vfe_msg_stats_wb_exp; + + +/* + * Message to notify the ARM that histogram(hg) stats are ready + */ + +#define VFE_MSG_STATS_HG 0x000A +#define VFE_MSG_STATS_HG_LEN sizeof(vfe_msg_stats_hg) + +typedef struct { + unsigned int hg_stats_op_buf; +} __attribute__((packed)) vfe_msg_stats_hg; + + +/* + * Message to notify the ARM that epoch1 event occurred in the CAMIF + */ + +#define VFE_MSG_EPOCH1 0x000B +#define VFE_MSG_EPOCH1_LEN sizeof(vfe_msg_epoch1) + +typedef struct { +} __attribute__((packed)) vfe_msg_epoch1; + + +/* + * Message to notify the ARM that epoch2 event occurred in the CAMIF + */ + +#define VFE_MSG_EPOCH2 0x000C +#define VFE_MSG_EPOCH2_LEN sizeof(vfe_msg_epoch2) + +typedef struct { +} __attribute__((packed)) vfe_msg_epoch2; + + +/* + * Message to notify the ARM that sync timer1 op is completed + */ + +#define VFE_MSG_SYNC_T1_DONE 0x000D +#define VFE_MSG_SYNC_T1_DONE_LEN sizeof(vfe_msg_sync_t1_done) + +typedef struct { +} __attribute__((packed)) vfe_msg_sync_t1_done; + + +/* + * Message to notify the ARM that sync timer2 op is completed + */ + +#define VFE_MSG_SYNC_T2_DONE 0x000E +#define VFE_MSG_SYNC_T2_DONE_LEN sizeof(vfe_msg_sync_t2_done) + +typedef struct { +} __attribute__((packed)) vfe_msg_sync_t2_done; + + +/* + * Message to notify the ARM that async t1 operation completed + */ + +#define VFE_MSG_ASYNC_T1_DONE 0x000F +#define VFE_MSG_ASYNC_T1_DONE_LEN sizeof(vfe_msg_async_t1_done) + +typedef struct { +} __attribute__((packed)) vfe_msg_async_t1_done; + + + +/* + * Message to notify the ARM that async t2 operation completed + */ + +#define VFE_MSG_ASYNC_T2_DONE 0x0010 +#define VFE_MSG_ASYNC_T2_DONE_LEN sizeof(vfe_msg_async_t2_done) + +typedef struct { +} __attribute__((packed)) vfe_msg_async_t2_done; + + + +/* + * Message to notify the ARM that an error has occurred + */ + +#define VFE_MSG_ERROR 0x0011 +#define VFE_MSG_ERROR_LEN sizeof(vfe_msg_error) + +#define VFE_MSG_ERR_COND_NO_CAMIF_ERR 0x0000 +#define VFE_MSG_ERR_COND_CAMIF_ERR 0x0001 +#define VFE_MSG_ERR_COND_OP1_Y_NO_BUS_OF 0x0000 +#define VFE_MSG_ERR_COND_OP1_Y_BUS_OF 0x0002 +#define VFE_MSG_ERR_COND_OP1_CBCR_NO_BUS_OF 0x0000 +#define VFE_MSG_ERR_COND_OP1_CBCR_BUS_OF 0x0004 +#define VFE_MSG_ERR_COND_OP2_Y_NO_BUS_OF 0x0000 +#define VFE_MSG_ERR_COND_OP2_Y_BUS_OF 0x0008 +#define VFE_MSG_ERR_COND_OP2_CBCR_NO_BUS_OF 0x0000 +#define VFE_MSG_ERR_COND_OP2_CBCR_BUS_OF 0x0010 +#define VFE_MSG_ERR_COND_AF_NO_BUS_OF 0x0000 +#define VFE_MSG_ERR_COND_AF_BUS_OF 0x0020 +#define VFE_MSG_ERR_COND_WB_EXP_NO_BUS_OF 0x0000 +#define VFE_MSG_ERR_COND_WB_EXP_BUS_OF 0x0040 +#define VFE_MSG_ERR_COND_NO_AXI_ERR 0x0000 +#define VFE_MSG_ERR_COND_AXI_ERR 0x0080 + +#define VFE_MSG_CAMIF_STS_IDLE 0x0000 +#define VFE_MSG_CAMIF_STS_CAPTURE_DATA 0x0001 + +typedef struct { + unsigned int err_cond; + unsigned int camif_sts; +} __attribute__((packed)) vfe_msg_error; + + +#endif diff --git a/drivers/staging/dream/include/media/msm_camera.h b/drivers/staging/dream/include/media/msm_camera.h new file mode 100644 index 000000000000..09812d62cc1e --- /dev/null +++ b/drivers/staging/dream/include/media/msm_camera.h @@ -0,0 +1,388 @@ +/* + * Copyright (C) 2008-2009 QUALCOMM Incorporated. + */ +#ifndef __LINUX_MSM_CAMERA_H +#define __LINUX_MSM_CAMERA_H + +#include +#include +#include + +#define MSM_CAM_IOCTL_MAGIC 'm' + +#define MSM_CAM_IOCTL_GET_SENSOR_INFO \ + _IOR(MSM_CAM_IOCTL_MAGIC, 1, struct msm_camsensor_info *) + +#define MSM_CAM_IOCTL_REGISTER_PMEM \ + _IOW(MSM_CAM_IOCTL_MAGIC, 2, struct msm_pmem_info *) + +#define MSM_CAM_IOCTL_UNREGISTER_PMEM \ + _IOW(MSM_CAM_IOCTL_MAGIC, 3, unsigned) + +#define MSM_CAM_IOCTL_CTRL_COMMAND \ + _IOW(MSM_CAM_IOCTL_MAGIC, 4, struct msm_ctrl_cmd *) + +#define MSM_CAM_IOCTL_CONFIG_VFE \ + _IOW(MSM_CAM_IOCTL_MAGIC, 5, struct msm_camera_vfe_cfg_cmd *) + +#define MSM_CAM_IOCTL_GET_STATS \ + _IOR(MSM_CAM_IOCTL_MAGIC, 6, struct msm_camera_stats_event_ctrl *) + +#define MSM_CAM_IOCTL_GETFRAME \ + _IOR(MSM_CAM_IOCTL_MAGIC, 7, struct msm_camera_get_frame *) + +#define MSM_CAM_IOCTL_ENABLE_VFE \ + _IOW(MSM_CAM_IOCTL_MAGIC, 8, struct camera_enable_cmd *) + +#define MSM_CAM_IOCTL_CTRL_CMD_DONE \ + _IOW(MSM_CAM_IOCTL_MAGIC, 9, struct camera_cmd *) + +#define MSM_CAM_IOCTL_CONFIG_CMD \ + _IOW(MSM_CAM_IOCTL_MAGIC, 10, struct camera_cmd *) + +#define MSM_CAM_IOCTL_DISABLE_VFE \ + _IOW(MSM_CAM_IOCTL_MAGIC, 11, struct camera_enable_cmd *) + +#define MSM_CAM_IOCTL_PAD_REG_RESET2 \ + _IOW(MSM_CAM_IOCTL_MAGIC, 12, struct camera_enable_cmd *) + +#define MSM_CAM_IOCTL_VFE_APPS_RESET \ + _IOW(MSM_CAM_IOCTL_MAGIC, 13, struct camera_enable_cmd *) + +#define MSM_CAM_IOCTL_RELEASE_FRAME_BUFFER \ + _IOW(MSM_CAM_IOCTL_MAGIC, 14, struct camera_enable_cmd *) + +#define MSM_CAM_IOCTL_RELEASE_STATS_BUFFER \ + _IOW(MSM_CAM_IOCTL_MAGIC, 15, struct msm_stats_buf *) + +#define MSM_CAM_IOCTL_AXI_CONFIG \ + _IOW(MSM_CAM_IOCTL_MAGIC, 16, struct msm_camera_vfe_cfg_cmd *) + +#define MSM_CAM_IOCTL_GET_PICTURE \ + _IOW(MSM_CAM_IOCTL_MAGIC, 17, struct msm_camera_ctrl_cmd *) + +#define MSM_CAM_IOCTL_SET_CROP \ + _IOW(MSM_CAM_IOCTL_MAGIC, 18, struct crop_info *) + +#define MSM_CAM_IOCTL_PICT_PP \ + _IOW(MSM_CAM_IOCTL_MAGIC, 19, uint8_t *) + +#define MSM_CAM_IOCTL_PICT_PP_DONE \ + _IOW(MSM_CAM_IOCTL_MAGIC, 20, struct msm_snapshot_pp_status *) + +#define MSM_CAM_IOCTL_SENSOR_IO_CFG \ + _IOW(MSM_CAM_IOCTL_MAGIC, 21, struct sensor_cfg_data *) + +#define MSM_CAMERA_LED_OFF 0 +#define MSM_CAMERA_LED_LOW 1 +#define MSM_CAMERA_LED_HIGH 2 + +#define MSM_CAM_IOCTL_FLASH_LED_CFG \ + _IOW(MSM_CAM_IOCTL_MAGIC, 22, unsigned *) + +#define MSM_CAM_IOCTL_UNBLOCK_POLL_FRAME \ + _IO(MSM_CAM_IOCTL_MAGIC, 23) + +#define MSM_CAM_IOCTL_CTRL_COMMAND_2 \ + _IOW(MSM_CAM_IOCTL_MAGIC, 24, struct msm_ctrl_cmd *) + +#define MAX_SENSOR_NUM 3 +#define MAX_SENSOR_NAME 32 + +#define MSM_CAM_CTRL_CMD_DONE 0 +#define MSM_CAM_SENSOR_VFE_CMD 1 + +/***************************************************** + * structure + *****************************************************/ + +/* define five type of structures for userspace <==> kernel + * space communication: + * command 1 - 2 are from userspace ==> kernel + * command 3 - 4 are from kernel ==> userspace + * + * 1. control command: control command(from control thread), + * control status (from config thread); + */ +struct msm_ctrl_cmd { + uint16_t type; + uint16_t length; + void *value; + uint16_t status; + uint32_t timeout_ms; + int resp_fd; /* FIXME: to be used by the kernel, pass-through for now */ +}; + +struct msm_vfe_evt_msg { + unsigned short type; /* 1 == event (RPC), 0 == message (adsp) */ + unsigned short msg_id; + unsigned int len; /* size in, number of bytes out */ + void *data; +}; + +#define MSM_CAM_RESP_CTRL 0 +#define MSM_CAM_RESP_STAT_EVT_MSG 1 +#define MSM_CAM_RESP_V4L2 2 +#define MSM_CAM_RESP_MAX 3 + +/* this one is used to send ctrl/status up to config thread */ +struct msm_stats_event_ctrl { + /* 0 - ctrl_cmd from control thread, + * 1 - stats/event kernel, + * 2 - V4L control or read request */ + int resptype; + int timeout_ms; + struct msm_ctrl_cmd ctrl_cmd; + /* struct vfe_event_t stats_event; */ + struct msm_vfe_evt_msg stats_event; +}; + +/* 2. config command: config command(from config thread); */ +struct msm_camera_cfg_cmd { + /* what to config: + * 1 - sensor config, 2 - vfe config */ + uint16_t cfg_type; + + /* sensor config type */ + uint16_t cmd_type; + uint16_t queue; + uint16_t length; + void *value; +}; + +#define CMD_GENERAL 0 +#define CMD_AXI_CFG_OUT1 1 +#define CMD_AXI_CFG_SNAP_O1_AND_O2 2 +#define CMD_AXI_CFG_OUT2 3 +#define CMD_PICT_T_AXI_CFG 4 +#define CMD_PICT_M_AXI_CFG 5 +#define CMD_RAW_PICT_AXI_CFG 6 +#define CMD_STATS_AXI_CFG 7 +#define CMD_STATS_AF_AXI_CFG 8 +#define CMD_FRAME_BUF_RELEASE 9 +#define CMD_PREV_BUF_CFG 10 +#define CMD_SNAP_BUF_RELEASE 11 +#define CMD_SNAP_BUF_CFG 12 +#define CMD_STATS_DISABLE 13 +#define CMD_STATS_ENABLE 14 +#define CMD_STATS_AF_ENABLE 15 +#define CMD_STATS_BUF_RELEASE 16 +#define CMD_STATS_AF_BUF_RELEASE 17 +#define UPDATE_STATS_INVALID 18 + +/* vfe config command: config command(from config thread)*/ +struct msm_vfe_cfg_cmd { + int cmd_type; + uint16_t length; + void *value; +}; + +#define MAX_CAMERA_ENABLE_NAME_LEN 32 +struct camera_enable_cmd { + char name[MAX_CAMERA_ENABLE_NAME_LEN]; +}; + +#define MSM_PMEM_OUTPUT1 0 +#define MSM_PMEM_OUTPUT2 1 +#define MSM_PMEM_OUTPUT1_OUTPUT2 2 +#define MSM_PMEM_THUMBAIL 3 +#define MSM_PMEM_MAINIMG 4 +#define MSM_PMEM_RAW_MAINIMG 5 +#define MSM_PMEM_AEC_AWB 6 +#define MSM_PMEM_AF 7 +#define MSM_PMEM_MAX 8 + +#define FRAME_PREVIEW_OUTPUT1 0 +#define FRAME_PREVIEW_OUTPUT2 1 +#define FRAME_SNAPSHOT 2 +#define FRAME_THUMBAIL 3 +#define FRAME_RAW_SNAPSHOT 4 +#define FRAME_MAX 5 + +struct msm_pmem_info { + int type; + int fd; + void *vaddr; + uint32_t y_off; + uint32_t cbcr_off; + uint8_t active; +}; + +struct outputCfg { + uint32_t height; + uint32_t width; + + uint32_t window_height_firstline; + uint32_t window_height_lastline; +}; + +#define OUTPUT_1 0 +#define OUTPUT_2 1 +#define OUTPUT_1_AND_2 2 +#define CAMIF_TO_AXI_VIA_OUTPUT_2 3 +#define OUTPUT_1_AND_CAMIF_TO_AXI_VIA_OUTPUT_2 4 +#define OUTPUT_2_AND_CAMIF_TO_AXI_VIA_OUTPUT_1 5 +#define LAST_AXI_OUTPUT_MODE_ENUM = OUTPUT_2_AND_CAMIF_TO_AXI_VIA_OUTPUT_1 6 + +#define MSM_FRAME_PREV_1 0 +#define MSM_FRAME_PREV_2 1 +#define MSM_FRAME_ENC 2 + +struct msm_frame { + int path; + unsigned long buffer; + uint32_t y_off; + uint32_t cbcr_off; + int fd; + + void *cropinfo; + int croplen; +}; + +#define STAT_AEAW 0 +#define STAT_AF 1 +#define STAT_MAX 2 + +struct msm_stats_buf { + int type; + unsigned long buffer; + int fd; +}; + +#define MSM_V4L2_VID_CAP_TYPE 0 +#define MSM_V4L2_STREAM_ON 1 +#define MSM_V4L2_STREAM_OFF 2 +#define MSM_V4L2_SNAPSHOT 3 +#define MSM_V4L2_QUERY_CTRL 4 +#define MSM_V4L2_GET_CTRL 5 +#define MSM_V4L2_SET_CTRL 6 +#define MSM_V4L2_QUERY 7 +#define MSM_V4L2_MAX 8 + +struct crop_info { + void *info; + int len; +}; + +struct msm_postproc { + int ftnum; + struct msm_frame fthumnail; + int fmnum; + struct msm_frame fmain; +}; + +struct msm_snapshot_pp_status { + void *status; +}; + +#define CFG_SET_MODE 0 +#define CFG_SET_EFFECT 1 +#define CFG_START 2 +#define CFG_PWR_UP 3 +#define CFG_PWR_DOWN 4 +#define CFG_WRITE_EXPOSURE_GAIN 5 +#define CFG_SET_DEFAULT_FOCUS 6 +#define CFG_MOVE_FOCUS 7 +#define CFG_REGISTER_TO_REAL_GAIN 8 +#define CFG_REAL_TO_REGISTER_GAIN 9 +#define CFG_SET_FPS 10 +#define CFG_SET_PICT_FPS 11 +#define CFG_SET_BRIGHTNESS 12 +#define CFG_SET_CONTRAST 13 +#define CFG_SET_ZOOM 14 +#define CFG_SET_EXPOSURE_MODE 15 +#define CFG_SET_WB 16 +#define CFG_SET_ANTIBANDING 17 +#define CFG_SET_EXP_GAIN 18 +#define CFG_SET_PICT_EXP_GAIN 19 +#define CFG_SET_LENS_SHADING 20 +#define CFG_GET_PICT_FPS 21 +#define CFG_GET_PREV_L_PF 22 +#define CFG_GET_PREV_P_PL 23 +#define CFG_GET_PICT_L_PF 24 +#define CFG_GET_PICT_P_PL 25 +#define CFG_GET_AF_MAX_STEPS 26 +#define CFG_GET_PICT_MAX_EXP_LC 27 +#define CFG_MAX 28 + +#define MOVE_NEAR 0 +#define MOVE_FAR 1 + +#define SENSOR_PREVIEW_MODE 0 +#define SENSOR_SNAPSHOT_MODE 1 +#define SENSOR_RAW_SNAPSHOT_MODE 2 + +#define SENSOR_QTR_SIZE 0 +#define SENSOR_FULL_SIZE 1 +#define SENSOR_INVALID_SIZE 2 + +#define CAMERA_EFFECT_OFF 0 +#define CAMERA_EFFECT_MONO 1 +#define CAMERA_EFFECT_NEGATIVE 2 +#define CAMERA_EFFECT_SOLARIZE 3 +#define CAMERA_EFFECT_PASTEL 4 +#define CAMERA_EFFECT_MOSAIC 5 +#define CAMERA_EFFECT_RESIZE 6 +#define CAMERA_EFFECT_SEPIA 7 +#define CAMERA_EFFECT_POSTERIZE 8 +#define CAMERA_EFFECT_WHITEBOARD 9 +#define CAMERA_EFFECT_BLACKBOARD 10 +#define CAMERA_EFFECT_AQUA 11 +#define CAMERA_EFFECT_MAX 12 + +struct sensor_pict_fps { + uint16_t prevfps; + uint16_t pictfps; +}; + +struct exp_gain_cfg { + uint16_t gain; + uint32_t line; +}; + +struct focus_cfg { + int32_t steps; + int dir; +}; + +struct fps_cfg { + uint16_t f_mult; + uint16_t fps_div; + uint32_t pict_fps_div; +}; + +struct sensor_cfg_data { + int cfgtype; + int mode; + int rs; + uint8_t max_steps; + + union { + int8_t effect; + uint8_t lens_shading; + uint16_t prevl_pf; + uint16_t prevp_pl; + uint16_t pictl_pf; + uint16_t pictp_pl; + uint32_t pict_max_exp_lc; + uint16_t p_fps; + struct sensor_pict_fps gfps; + struct exp_gain_cfg exp_gain; + struct focus_cfg focus; + struct fps_cfg fps; + } cfg; +}; + +#define GET_NAME 0 +#define GET_PREVIEW_LINE_PER_FRAME 1 +#define GET_PREVIEW_PIXELS_PER_LINE 2 +#define GET_SNAPSHOT_LINE_PER_FRAME 3 +#define GET_SNAPSHOT_PIXELS_PER_LINE 4 +#define GET_SNAPSHOT_FPS 5 +#define GET_SNAPSHOT_MAX_EP_LINE_CNT 6 + +struct msm_camsensor_info { + char name[MAX_SENSOR_NAME]; + uint8_t flash_enabled; +}; +#endif /* __LINUX_MSM_CAMERA_H */ diff --git a/drivers/staging/dream/qdsp5/Makefile b/drivers/staging/dream/qdsp5/Makefile index 991d4a7e157f..beedaaff5cc5 100644 --- a/drivers/staging/dream/qdsp5/Makefile +++ b/drivers/staging/dream/qdsp5/Makefile @@ -1,3 +1,4 @@ +EXTRA_CFLAGS=-Idrivers/staging/dream/include obj-y += adsp.o ifeq ($(CONFIG_MSM_AMSS_VERSION_6350),y) obj-y += adsp_info.o diff --git a/drivers/staging/dream/smd/Makefile b/drivers/staging/dream/smd/Makefile index 892c7414bbed..1c87618366a7 100644 --- a/drivers/staging/dream/smd/Makefile +++ b/drivers/staging/dream/smd/Makefile @@ -1,3 +1,4 @@ +EXTRA_CFLAGS=-Idrivers/staging/dream/include obj-$(CONFIG_MSM_SMD) += smd.o smd_tty.o smd_qmi.o obj-$(CONFIG_MSM_ONCRPCROUTER) += smd_rpcrouter.o obj-$(CONFIG_MSM_ONCRPCROUTER) += smd_rpcrouter_device.o From ccf972bd6bcb35ebd38e0a530c86088e45102aa4 Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Sat, 21 Nov 2009 09:16:47 +0100 Subject: [PATCH 005/367] Staging: dream: fix memory leak in camera error path cppcheck found that ctrl_pmsm is leaked if the open operation fails. Signed-off-by: Eric Sesterhenn Signed-off-by: Pavel Machek Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dream/camera/msm_camera.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/dream/camera/msm_camera.c b/drivers/staging/dream/camera/msm_camera.c index 7d938772eacc..87e118d18827 100644 --- a/drivers/staging/dream/camera/msm_camera.c +++ b/drivers/staging/dream/camera/msm_camera.c @@ -1885,8 +1885,10 @@ static int msm_open_control(struct inode *inode, struct file *filep) return -ENOMEM; rc = msm_open_common(inode, filep, 0); - if (rc < 0) + if (rc < 0) { + kfree(ctrl_pmsm); return rc; + } ctrl_pmsm->pmsm = filep->private_data; filep->private_data = ctrl_pmsm; From bb0bfc2a6b3bc0a680b45690e8e427515cf229a7 Mon Sep 17 00:00:00 2001 From: Huang Weiyi Date: Sun, 13 Dec 2009 21:13:54 +0800 Subject: [PATCH 006/367] Staging: dream: remove duplicated #include Remove duplicated #include('s) in drivers/staging/dream/smd/smd_rpcrouter.c Signed-off-by: Huang Weiyi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dream/smd/smd_rpcrouter.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/dream/smd/smd_rpcrouter.c b/drivers/staging/dream/smd/smd_rpcrouter.c index 5ac2cd4a5978..69911a7bc87a 100644 --- a/drivers/staging/dream/smd/smd_rpcrouter.c +++ b/drivers/staging/dream/smd/smd_rpcrouter.c @@ -38,8 +38,6 @@ #include #include -#include - #include #include "smd_rpcrouter.h" From cb13887657ec7130ff3e4ea7f78cda2e8a943b30 Mon Sep 17 00:00:00 2001 From: Thiago Farina Date: Sun, 22 Nov 2009 17:00:00 -0500 Subject: [PATCH 007/367] Staging: otus: fix some sparse warnings *apdbg.c: use NULL pointer instead of 0 interger. Also make two functions private. Signed-off-by: Thiago Farina Signed-off-by: Greg Kroah-Hartman --- drivers/staging/otus/apdbg.c | 53 +++++++++++++++++------------------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/drivers/staging/otus/apdbg.c b/drivers/staging/otus/apdbg.c index 0eb93f19958a..b59028e7e33c 100644 --- a/drivers/staging/otus/apdbg.c +++ b/drivers/staging/otus/apdbg.c @@ -90,8 +90,27 @@ struct zdap_ioctl { #endif -char hex(char); -unsigned char asctohex(char *str); +static char hex(char v) +{ + if (isdigit(v)) + return v - '0'; + else if (isxdigit(v)) + return tolower(v) - 'a' + 10; + else + return 0; +} + +static unsigned char asctohex(char *str) +{ + unsigned char value; + + value = hex(*str) & 0x0f; + value = value << 4; + str++; + value |= hex(*str) & 0x0f; + + return value; +} char *prgname; @@ -109,10 +128,10 @@ int set_ioctl(int sock, struct ifreq *req) int read_reg(int sock, struct ifreq *req) { - struct zdap_ioctl *zdreq = 0; + struct zdap_ioctl *zdreq = NULL; if (!set_ioctl(sock, req)) - return -1; + return -1; /* * zdreq = (struct zdap_ioctl *)req->ifr_data; @@ -125,7 +144,7 @@ int read_reg(int sock, struct ifreq *req) int read_mem(int sock, struct ifreq *req) { - struct zdap_ioctl *zdreq = 0; + struct zdap_ioctl *zdreq = NULL; int i; if (!set_ioctl(sock, req)) @@ -368,7 +387,7 @@ int main(int argc, char **argv) zdreq.addr = addr; zdreq.cmd = ZM_IOCTL_SET_PIBSS_MODE; - } else { + } else { fprintf(stderr, "error action\n"); exit(1); } @@ -380,25 +399,3 @@ fail: exit(0); } -unsigned char asctohex(char *str) -{ - unsigned char value; - - value = hex(*str) & 0x0f; - value = value << 4; - str++; - value |= hex(*str) & 0x0f; - - return value; -} - -char hex(char v) -{ - if (isdigit(v)) - return v - '0'; - else if (isxdigit(v)) - return tolower(v) - 'a' + 10; - else - return 0; -} - From 1c47faa0af6f9316e863174f6d30ede60ebf7e36 Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Thu, 10 Dec 2009 16:39:44 +0100 Subject: [PATCH 008/367] Staging: otus: Fix branch in zfProtRspSim() This semicolon is misplaced. Signed-off-by: Roel Kluin Signed-off-by: Greg Kroah-Hartman --- drivers/staging/otus/80211core/ctxrx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/otus/80211core/ctxrx.c b/drivers/staging/otus/80211core/ctxrx.c index ac54d5a636b0..7fa4f48fc8ca 100644 --- a/drivers/staging/otus/80211core/ctxrx.c +++ b/drivers/staging/otus/80211core/ctxrx.c @@ -536,8 +536,7 @@ void zfProtRspSim(zdev_t* dev, zbuf_t* buf) zm_msg2_rx(ZM_LV_2, "ip1=", dip[1]); //ARP request to 192.168.1.15 - if ((arpOp == 0x0100) && (dip[0] == 0xa8c0) && (dip[1] == 0x0f01)); - { + if ((arpOp == 0x0100) && (dip[0] == 0xa8c0) && (dip[1] == 0x0f01)) { zm_msg0_rx(ZM_LV_2, "ARP"); /* ARP response */ zmw_rx_buf_writeh(dev, buf, 20, 0x0200); From 51616e21066d040988a33effa82d4ef37fd60959 Mon Sep 17 00:00:00 2001 From: Martyn Welch Date: Tue, 15 Dec 2009 08:42:43 +0000 Subject: [PATCH 009/367] Staging: vme: Correct vme_user error message typo Correction of erroneous error message in vme_user.c. Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vme/devices/vme_user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c index e228942ee081..2159540d9383 100644 --- a/drivers/staging/vme/devices/vme_user.c +++ b/drivers/staging/vme/devices/vme_user.c @@ -574,8 +574,8 @@ static int __init vme_user_init(void) * in future revisions if that ever becomes necessary. */ if (bus_num > USER_BUS_MAX) { - printk(KERN_ERR "%s: Driver only able to handle %d PIO2 " - "Cards\n", driver_name, USER_BUS_MAX); + printk(KERN_ERR "%s: Driver only able to handle %d buses\n", + driver_name, USER_BUS_MAX); bus_num = USER_BUS_MAX; } From 638f199db463a8f2b1535c45ab27d04bb1a55baf Mon Sep 17 00:00:00 2001 From: Martyn Welch Date: Tue, 15 Dec 2009 08:42:49 +0000 Subject: [PATCH 010/367] Staging: vme: Allow override of geographical address on tsi148 Geographical addressing only works if the VME backplane supports it. There are a large number of old backplanes which do not support geographical addressing. These boards will generally report a slot ID of zero - which is an invalid ID in the slot numbering scheme. Allow the geographical address to be over-ridden on the tsi148 so that a slot ID can be provided manually in these circumstances. Signed-off-by: Markus Kraemer Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vme/bridges/vme_tsi148.c | 25 +++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/drivers/staging/vme/bridges/vme_tsi148.c b/drivers/staging/vme/bridges/vme_tsi148.c index 89a7dccb934f..324cc389586f 100644 --- a/drivers/staging/vme/bridges/vme_tsi148.c +++ b/drivers/staging/vme/bridges/vme_tsi148.c @@ -63,6 +63,7 @@ int tsi148_slot_get(void); /* Modue parameter */ int err_chk = 0; +static int geoid; /* XXX These should all be in a per device structure */ struct vme_bridge *tsi148_bridge; @@ -2145,8 +2146,12 @@ int tsi148_slot_get(void) { u32 slot = 0; - slot = ioread32be(tsi148_bridge->base + TSI148_LCSR_VSTAT); - slot = slot & TSI148_LCSR_VSTAT_GA_M; + if (!geoid) { + slot = ioread32be(tsi148_bridge->base + TSI148_LCSR_VSTAT); + slot = slot & TSI148_LCSR_VSTAT_GA_M; + } else + slot = geoid; + return (int)slot; } @@ -2196,6 +2201,7 @@ static int tsi148_crcsr_init(struct pci_dev *pdev) vstat = tsi148_slot_get(); if (cbar != vstat) { + cbar = vstat; dev_info(&pdev->dev, "Setting CR/CSR offset\n"); iowrite32be(cbar<<3, tsi148_bridge->base + TSI148_CBAR); } @@ -2458,8 +2464,13 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id) data = ioread32be(tsi148_bridge->base + TSI148_LCSR_VSTAT); dev_info(&pdev->dev, "Board is%s the VME system controller\n", (data & TSI148_LCSR_VSTAT_SCONS)? "" : " not"); - dev_info(&pdev->dev, "VME geographical address is %d\n", - data & TSI148_LCSR_VSTAT_GA_M); + if (!geoid) { + dev_info(&pdev->dev, "VME geographical address is %d\n", + data & TSI148_LCSR_VSTAT_GA_M); + } else { + dev_info(&pdev->dev, "VME geographical address is set to %d\n", + geoid); + } dev_info(&pdev->dev, "VME Write and flush and error check is %s\n", err_chk ? "enabled" : "disabled"); @@ -2608,7 +2619,8 @@ static void tsi148_remove(struct pci_dev *pdev) /* resources are stored in link list */ list_for_each(pos, &(tsi148_bridge->master_resources)) { - master_image = list_entry(pos, struct vme_master_resource, list); + master_image = list_entry(pos, struct vme_master_resource, + list); list_del(pos); kfree(master_image); } @@ -2634,6 +2646,9 @@ static void __exit tsi148_exit(void) MODULE_PARM_DESC(err_chk, "Check for VME errors on reads and writes"); module_param(err_chk, bool, 0); +MODULE_PARM_DESC(geoid, "Override geographical addressing"); +module_param(geoid, int, 0); + MODULE_DESCRIPTION("VME driver for the Tundra Tempe VME bridge"); MODULE_LICENSE("GPL"); From 12b2d5c0895a03e941e7c145d9d23a45908a857b Mon Sep 17 00:00:00 2001 From: Martyn Welch Date: Tue, 15 Dec 2009 08:42:56 +0000 Subject: [PATCH 011/367] Staging: vme: Allow override of geographical address on ca91c142 Geographical addressing only works if the VME backplane supports it. There are a large number of old backplanes which do not support geographical addressing. These boards will generally report a slot ID of zero - which is an invalid ID in the slot numbering scheme. Allow the geographical address to be over-ridden on the ca91c142 so that a slot ID can be provided manually in these circumstances. Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vme/bridges/vme_ca91cx42.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c index 1cf3e91db59d..5799b0927686 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.c +++ b/drivers/staging/vme/bridges/vme_ca91cx42.c @@ -38,6 +38,9 @@ static int ca91cx42_probe(struct pci_dev *, const struct pci_device_id *); static void ca91cx42_remove(struct pci_dev *); static void __exit ca91cx42_exit(void); +/* Module parameters */ +static int geoid; + struct vme_bridge *ca91cx42_bridge; wait_queue_head_t dma_queue; wait_queue_head_t iack_queue; @@ -881,8 +884,12 @@ int ca91cx42_slot_get(void) { u32 slot = 0; - slot = ioread32(ca91cx42_bridge->base + VCSR_BS); - slot = ((slot & CA91CX42_VCSR_BS_SLOT_M) >> 27); + if (!geoid) { + slot = ioread32(ca91cx42_bridge->base + VCSR_BS); + slot = ((slot & CA91CX42_VCSR_BS_SLOT_M) >> 27); + } else + slot = geoid; + return (int)slot; } @@ -1299,6 +1306,9 @@ static void __exit ca91cx42_exit(void) pci_unregister_driver(&ca91cx42_driver); } +MODULE_PARM_DESC(geoid, "Override geographical addressing"); +module_param(geoid, int, 0); + MODULE_DESCRIPTION("VME driver for the Tundra Universe II VME bridge"); MODULE_LICENSE("GPL"); From ead1f3e301e2d886ef89f8d0c82b4d495f2a81c2 Mon Sep 17 00:00:00 2001 From: Martyn Welch Date: Tue, 15 Dec 2009 08:43:02 +0000 Subject: [PATCH 012/367] Staging: vme: Fix checkpatch errors on VME core. Running checkpatch on the core VME code highlights many errors. Fix them. Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vme/vme.c | 222 +++++++++++++++---------------- drivers/staging/vme/vme.h | 23 ++-- drivers/staging/vme/vme_bridge.h | 8 +- 3 files changed, 126 insertions(+), 127 deletions(-) diff --git a/drivers/staging/vme/vme.c b/drivers/staging/vme/vme.c index 994fdb9b2127..c915e9285780 100644 --- a/drivers/staging/vme/vme.c +++ b/drivers/staging/vme/vme.c @@ -37,8 +37,8 @@ static unsigned int vme_bus_numbers; DEFINE_MUTEX(vme_bus_num_mtx); -static void __exit vme_exit (void); -static int __init vme_init (void); +static void __exit vme_exit(void); +static int __init vme_init(void); /* @@ -86,26 +86,26 @@ static struct vme_bridge *find_bridge(struct vme_resource *resource) * XXX VME bridges could be available on buses other than PCI. At the momment * this framework only supports PCI devices. */ -void * vme_alloc_consistent(struct vme_resource *resource, size_t size, +void *vme_alloc_consistent(struct vme_resource *resource, size_t size, dma_addr_t *dma) { struct vme_bridge *bridge; struct pci_dev *pdev; - if(resource == NULL) { - printk("No resource\n"); + if (resource == NULL) { + printk(KERN_ERR "No resource\n"); return NULL; } bridge = find_bridge(resource); - if(bridge == NULL) { - printk("Can't find bridge\n"); + if (bridge == NULL) { + printk(KERN_ERR "Can't find bridge\n"); return NULL; } /* Find pci_dev container of dev */ if (bridge->parent == NULL) { - printk("Dev entry NULL\n"); + printk(KERN_ERR "Dev entry NULL\n"); return NULL; } pdev = container_of(bridge->parent, struct pci_dev, dev); @@ -126,14 +126,14 @@ void vme_free_consistent(struct vme_resource *resource, size_t size, struct vme_bridge *bridge; struct pci_dev *pdev; - if(resource == NULL) { - printk("No resource\n"); + if (resource == NULL) { + printk(KERN_ERR "No resource\n"); return; } bridge = find_bridge(resource); - if(bridge == NULL) { - printk("Can't find bridge\n"); + if (bridge == NULL) { + printk(KERN_ERR "Can't find bridge\n"); return; } @@ -216,7 +216,7 @@ static int vme_check_window(vme_address_t aspace, unsigned long long vme_base, /* User Defined */ break; default: - printk("Invalid address space\n"); + printk(KERN_ERR "Invalid address space\n"); retval = -EINVAL; break; } @@ -228,7 +228,7 @@ static int vme_check_window(vme_address_t aspace, unsigned long long vme_base, * Request a slave image with specific attributes, return some unique * identifier. */ -struct vme_resource * vme_slave_request(struct device *dev, +struct vme_resource *vme_slave_request(struct device *dev, vme_address_t address, vme_cycle_t cycle) { struct vme_bridge *bridge; @@ -249,13 +249,13 @@ struct vme_resource * vme_slave_request(struct device *dev, struct vme_slave_resource, list); if (slave_image == NULL) { - printk("Registered NULL Slave resource\n"); + printk(KERN_ERR "Registered NULL Slave resource\n"); continue; } /* Find an unlocked and compatible image */ mutex_lock(&(slave_image->mtx)); - if(((slave_image->address_attr & address) == address) && + if (((slave_image->address_attr & address) == address) && ((slave_image->cycle_attr & cycle) == cycle) && (slave_image->locked == 0)) { @@ -292,7 +292,7 @@ err_bus: } EXPORT_SYMBOL(vme_slave_request); -int vme_slave_set (struct vme_resource *resource, int enabled, +int vme_slave_set(struct vme_resource *resource, int enabled, unsigned long long vme_base, unsigned long long size, dma_addr_t buf_base, vme_address_t aspace, vme_cycle_t cycle) { @@ -301,25 +301,25 @@ int vme_slave_set (struct vme_resource *resource, int enabled, int retval; if (resource->type != VME_SLAVE) { - printk("Not a slave resource\n"); + printk(KERN_ERR "Not a slave resource\n"); return -EINVAL; } image = list_entry(resource->entry, struct vme_slave_resource, list); if (bridge->slave_set == NULL) { - printk("Function not supported\n"); + printk(KERN_ERR "Function not supported\n"); return -ENOSYS; } - if(!(((image->address_attr & aspace) == aspace) && + if (!(((image->address_attr & aspace) == aspace) && ((image->cycle_attr & cycle) == cycle))) { - printk("Invalid attributes\n"); + printk(KERN_ERR "Invalid attributes\n"); return -EINVAL; } retval = vme_check_window(aspace, vme_base, size); - if(retval) + if (retval) return retval; return bridge->slave_set(image, enabled, vme_base, size, buf_base, @@ -327,7 +327,7 @@ int vme_slave_set (struct vme_resource *resource, int enabled, } EXPORT_SYMBOL(vme_slave_set); -int vme_slave_get (struct vme_resource *resource, int *enabled, +int vme_slave_get(struct vme_resource *resource, int *enabled, unsigned long long *vme_base, unsigned long long *size, dma_addr_t *buf_base, vme_address_t *aspace, vme_cycle_t *cycle) { @@ -335,14 +335,14 @@ int vme_slave_get (struct vme_resource *resource, int *enabled, struct vme_slave_resource *image; if (resource->type != VME_SLAVE) { - printk("Not a slave resource\n"); + printk(KERN_ERR "Not a slave resource\n"); return -EINVAL; } image = list_entry(resource->entry, struct vme_slave_resource, list); if (bridge->slave_get == NULL) { - printk("vme_slave_get not supported\n"); + printk(KERN_ERR "vme_slave_get not supported\n"); return -EINVAL; } @@ -356,14 +356,14 @@ void vme_slave_free(struct vme_resource *resource) struct vme_slave_resource *slave_image; if (resource->type != VME_SLAVE) { - printk("Not a slave resource\n"); + printk(KERN_ERR "Not a slave resource\n"); return; } slave_image = list_entry(resource->entry, struct vme_slave_resource, list); if (slave_image == NULL) { - printk("Can't find slave resource\n"); + printk(KERN_ERR "Can't find slave resource\n"); return; } @@ -384,7 +384,7 @@ EXPORT_SYMBOL(vme_slave_free); * Request a master image with specific attributes, return some unique * identifier. */ -struct vme_resource * vme_master_request(struct device *dev, +struct vme_resource *vme_master_request(struct device *dev, vme_address_t address, vme_cycle_t cycle, vme_width_t dwidth) { struct vme_bridge *bridge; @@ -411,7 +411,7 @@ struct vme_resource * vme_master_request(struct device *dev, /* Find an unlocked and compatible image */ spin_lock(&(master_image->lock)); - if(((master_image->address_attr & address) == address) && + if (((master_image->address_attr & address) == address) && ((master_image->cycle_attr & cycle) == cycle) && ((master_image->width_attr & dwidth) == dwidth) && (master_image->locked == 0)) { @@ -452,7 +452,7 @@ err_bus: } EXPORT_SYMBOL(vme_master_request); -int vme_master_set (struct vme_resource *resource, int enabled, +int vme_master_set(struct vme_resource *resource, int enabled, unsigned long long vme_base, unsigned long long size, vme_address_t aspace, vme_cycle_t cycle, vme_width_t dwidth) { @@ -461,26 +461,26 @@ int vme_master_set (struct vme_resource *resource, int enabled, int retval; if (resource->type != VME_MASTER) { - printk("Not a master resource\n"); + printk(KERN_ERR "Not a master resource\n"); return -EINVAL; } image = list_entry(resource->entry, struct vme_master_resource, list); if (bridge->master_set == NULL) { - printk("vme_master_set not supported\n"); + printk(KERN_WARNING "vme_master_set not supported\n"); return -EINVAL; } - if(!(((image->address_attr & aspace) == aspace) && + if (!(((image->address_attr & aspace) == aspace) && ((image->cycle_attr & cycle) == cycle) && ((image->width_attr & dwidth) == dwidth))) { - printk("Invalid attributes\n"); + printk(KERN_WARNING "Invalid attributes\n"); return -EINVAL; } retval = vme_check_window(aspace, vme_base, size); - if(retval) + if (retval) return retval; return bridge->master_set(image, enabled, vme_base, size, aspace, @@ -488,7 +488,7 @@ int vme_master_set (struct vme_resource *resource, int enabled, } EXPORT_SYMBOL(vme_master_set); -int vme_master_get (struct vme_resource *resource, int *enabled, +int vme_master_get(struct vme_resource *resource, int *enabled, unsigned long long *vme_base, unsigned long long *size, vme_address_t *aspace, vme_cycle_t *cycle, vme_width_t *dwidth) { @@ -496,14 +496,14 @@ int vme_master_get (struct vme_resource *resource, int *enabled, struct vme_master_resource *image; if (resource->type != VME_MASTER) { - printk("Not a master resource\n"); + printk(KERN_ERR "Not a master resource\n"); return -EINVAL; } image = list_entry(resource->entry, struct vme_master_resource, list); if (bridge->master_get == NULL) { - printk("vme_master_set not supported\n"); + printk(KERN_WARNING "vme_master_set not supported\n"); return -EINVAL; } @@ -515,7 +515,7 @@ EXPORT_SYMBOL(vme_master_get); /* * Read data out of VME space into a buffer. */ -ssize_t vme_master_read (struct vme_resource *resource, void *buf, size_t count, +ssize_t vme_master_read(struct vme_resource *resource, void *buf, size_t count, loff_t offset) { struct vme_bridge *bridge = find_bridge(resource); @@ -523,12 +523,12 @@ ssize_t vme_master_read (struct vme_resource *resource, void *buf, size_t count, size_t length; if (bridge->master_read == NULL) { - printk("Reading from resource not supported\n"); + printk(KERN_WARNING "Reading from resource not supported\n"); return -EINVAL; } if (resource->type != VME_MASTER) { - printk("Not a master resource\n"); + printk(KERN_ERR "Not a master resource\n"); return -EINVAL; } @@ -537,7 +537,7 @@ ssize_t vme_master_read (struct vme_resource *resource, void *buf, size_t count, length = vme_get_size(resource); if (offset > length) { - printk("Invalid Offset\n"); + printk(KERN_WARNING "Invalid Offset\n"); return -EFAULT; } @@ -552,7 +552,7 @@ EXPORT_SYMBOL(vme_master_read); /* * Write data out to VME space from a buffer. */ -ssize_t vme_master_write (struct vme_resource *resource, void *buf, +ssize_t vme_master_write(struct vme_resource *resource, void *buf, size_t count, loff_t offset) { struct vme_bridge *bridge = find_bridge(resource); @@ -560,12 +560,12 @@ ssize_t vme_master_write (struct vme_resource *resource, void *buf, size_t length; if (bridge->master_write == NULL) { - printk("Writing to resource not supported\n"); + printk(KERN_WARNING "Writing to resource not supported\n"); return -EINVAL; } if (resource->type != VME_MASTER) { - printk("Not a master resource\n"); + printk(KERN_ERR "Not a master resource\n"); return -EINVAL; } @@ -574,7 +574,7 @@ ssize_t vme_master_write (struct vme_resource *resource, void *buf, length = vme_get_size(resource); if (offset > length) { - printk("Invalid Offset\n"); + printk(KERN_WARNING "Invalid Offset\n"); return -EFAULT; } @@ -588,19 +588,19 @@ EXPORT_SYMBOL(vme_master_write); /* * Perform RMW cycle to provided location. */ -unsigned int vme_master_rmw (struct vme_resource *resource, unsigned int mask, +unsigned int vme_master_rmw(struct vme_resource *resource, unsigned int mask, unsigned int compare, unsigned int swap, loff_t offset) { struct vme_bridge *bridge = find_bridge(resource); struct vme_master_resource *image; if (bridge->master_rmw == NULL) { - printk("Writing to resource not supported\n"); + printk(KERN_WARNING "Writing to resource not supported\n"); return -EINVAL; } if (resource->type != VME_MASTER) { - printk("Not a master resource\n"); + printk(KERN_ERR "Not a master resource\n"); return -EINVAL; } @@ -615,14 +615,14 @@ void vme_master_free(struct vme_resource *resource) struct vme_master_resource *master_image; if (resource->type != VME_MASTER) { - printk("Not a master resource\n"); + printk(KERN_ERR "Not a master resource\n"); return; } master_image = list_entry(resource->entry, struct vme_master_resource, list); if (master_image == NULL) { - printk("Can't find master resource\n"); + printk(KERN_ERR "Can't find master resource\n"); return; } @@ -666,13 +666,13 @@ struct vme_resource *vme_dma_request(struct device *dev) struct vme_dma_resource, list); if (dma_ctrlr == NULL) { - printk("Registered NULL DMA resource\n"); + printk(KERN_ERR "Registered NULL DMA resource\n"); continue; } /* Find an unlocked controller */ mutex_lock(&(dma_ctrlr->mtx)); - if(dma_ctrlr->locked == 0) { + if (dma_ctrlr->locked == 0) { dma_ctrlr->locked = 1; mutex_unlock(&(dma_ctrlr->mtx)); allocated_ctrlr = dma_ctrlr; @@ -715,16 +715,15 @@ struct vme_dma_list *vme_new_dma_list(struct vme_resource *resource) struct vme_dma_list *dma_list; if (resource->type != VME_DMA) { - printk("Not a DMA resource\n"); + printk(KERN_ERR "Not a DMA resource\n"); return NULL; } ctrlr = list_entry(resource->entry, struct vme_dma_resource, list); - dma_list = (struct vme_dma_list *)kmalloc( - sizeof(struct vme_dma_list), GFP_KERNEL); - if(dma_list == NULL) { - printk("Unable to allocate memory for new dma list\n"); + dma_list = kmalloc(sizeof(struct vme_dma_list), GFP_KERNEL); + if (dma_list == NULL) { + printk(KERN_ERR "Unable to allocate memory for new dma list\n"); return NULL; } INIT_LIST_HEAD(&(dma_list->entries)); @@ -744,17 +743,17 @@ struct vme_dma_attr *vme_dma_pattern_attribute(u32 pattern, struct vme_dma_attr *attributes; struct vme_dma_pattern *pattern_attr; - attributes = (struct vme_dma_attr *)kmalloc( - sizeof(struct vme_dma_attr), GFP_KERNEL); - if(attributes == NULL) { - printk("Unable to allocate memory for attributes structure\n"); + attributes = kmalloc(sizeof(struct vme_dma_attr), GFP_KERNEL); + if (attributes == NULL) { + printk(KERN_ERR "Unable to allocate memory for attributes " + "structure\n"); goto err_attr; } - pattern_attr = (struct vme_dma_pattern *)kmalloc( - sizeof(struct vme_dma_pattern), GFP_KERNEL); - if(pattern_attr == NULL) { - printk("Unable to allocate memory for pattern attributes\n"); + pattern_attr = kmalloc(sizeof(struct vme_dma_pattern), GFP_KERNEL); + if (pattern_attr == NULL) { + printk(KERN_ERR "Unable to allocate memory for pattern " + "attributes\n"); goto err_pat; } @@ -784,17 +783,17 @@ struct vme_dma_attr *vme_dma_pci_attribute(dma_addr_t address) /* XXX Run some sanity checks here */ - attributes = (struct vme_dma_attr *)kmalloc( - sizeof(struct vme_dma_attr), GFP_KERNEL); - if(attributes == NULL) { - printk("Unable to allocate memory for attributes structure\n"); + attributes = kmalloc(sizeof(struct vme_dma_attr), GFP_KERNEL); + if (attributes == NULL) { + printk(KERN_ERR "Unable to allocate memory for attributes " + "structure\n"); goto err_attr; } - pci_attr = (struct vme_dma_pci *)kmalloc(sizeof(struct vme_dma_pci), - GFP_KERNEL); - if(pci_attr == NULL) { - printk("Unable to allocate memory for pci attributes\n"); + pci_attr = kmalloc(sizeof(struct vme_dma_pci), GFP_KERNEL); + if (pci_attr == NULL) { + printk(KERN_ERR "Unable to allocate memory for pci " + "attributes\n"); goto err_pci; } @@ -826,17 +825,18 @@ struct vme_dma_attr *vme_dma_vme_attribute(unsigned long long address, /* XXX Run some sanity checks here */ - attributes = (struct vme_dma_attr *)kmalloc( + attributes = kmalloc( sizeof(struct vme_dma_attr), GFP_KERNEL); - if(attributes == NULL) { - printk("Unable to allocate memory for attributes structure\n"); + if (attributes == NULL) { + printk(KERN_ERR "Unable to allocate memory for attributes " + "structure\n"); goto err_attr; } - vme_attr = (struct vme_dma_vme *)kmalloc(sizeof(struct vme_dma_vme), - GFP_KERNEL); - if(vme_attr == NULL) { - printk("Unable to allocate memory for vme attributes\n"); + vme_attr = kmalloc(sizeof(struct vme_dma_vme), GFP_KERNEL); + if (vme_attr == NULL) { + printk(KERN_ERR "Unable to allocate memory for vme " + "attributes\n"); goto err_vme; } @@ -875,12 +875,12 @@ int vme_dma_list_add(struct vme_dma_list *list, struct vme_dma_attr *src, int retval; if (bridge->dma_list_add == NULL) { - printk("Link List DMA generation not supported\n"); + printk(KERN_WARNING "Link List DMA generation not supported\n"); return -EINVAL; } if (!mutex_trylock(&(list->mtx))) { - printk("Link List already submitted\n"); + printk(KERN_ERR "Link List already submitted\n"); return -EINVAL; } @@ -898,7 +898,7 @@ int vme_dma_list_exec(struct vme_dma_list *list) int retval; if (bridge->dma_list_exec == NULL) { - printk("Link List DMA execution not supported\n"); + printk(KERN_ERR "Link List DMA execution not supported\n"); return -EINVAL; } @@ -918,12 +918,12 @@ int vme_dma_list_free(struct vme_dma_list *list) int retval; if (bridge->dma_list_empty == NULL) { - printk("Emptying of Link Lists not supported\n"); + printk(KERN_WARNING "Emptying of Link Lists not supported\n"); return -EINVAL; } if (!mutex_trylock(&(list->mtx))) { - printk("Link List in use\n"); + printk(KERN_ERR "Link List in use\n"); return -EINVAL; } @@ -933,7 +933,7 @@ int vme_dma_list_free(struct vme_dma_list *list) */ retval = bridge->dma_list_empty(list); if (retval) { - printk("Unable to empty link-list entries\n"); + printk(KERN_ERR "Unable to empty link-list entries\n"); mutex_unlock(&(list->mtx)); return retval; } @@ -949,19 +949,19 @@ int vme_dma_free(struct vme_resource *resource) struct vme_dma_resource *ctrlr; if (resource->type != VME_DMA) { - printk("Not a DMA resource\n"); + printk(KERN_ERR "Not a DMA resource\n"); return -EINVAL; } ctrlr = list_entry(resource->entry, struct vme_dma_resource, list); if (!mutex_trylock(&(ctrlr->mtx))) { - printk("Resource busy, can't free\n"); + printk(KERN_ERR "Resource busy, can't free\n"); return -EBUSY; } if (!(list_empty(&(ctrlr->pending)) && list_empty(&(ctrlr->running)))) { - printk("Resource still processing transfers\n"); + printk(KERN_WARNING "Resource still processing transfers\n"); mutex_unlock(&(ctrlr->mtx)); return -EBUSY; } @@ -1002,7 +1002,7 @@ int vme_irq_request(struct device *dev, int level, int statid, return -EINVAL; } - if((level < 1) || (level > 7)) { + if ((level < 1) || (level > 7)) { printk(KERN_ERR "Invalid interrupt level\n"); return -EINVAL; } @@ -1043,7 +1043,7 @@ void vme_irq_free(struct device *dev, int level, int statid) return; } - if((level < 1) || (level > 7)) { + if ((level < 1) || (level > 7)) { printk(KERN_ERR "Invalid interrupt level\n"); return; } @@ -1078,13 +1078,13 @@ int vme_irq_generate(struct device *dev, int level, int statid) return -EINVAL; } - if((level < 1) || (level > 7)) { + if ((level < 1) || (level > 7)) { printk(KERN_WARNING "Invalid interrupt level\n"); return -EINVAL; } if (bridge->irq_generate == NULL) { - printk("Interrupt generation not supported\n"); + printk(KERN_WARNING "Interrupt generation not supported\n"); return -EINVAL; } @@ -1297,7 +1297,7 @@ int vme_slot_get(struct device *bus) } if (bridge->slot_get == NULL) { - printk("vme_slot_get not supported\n"); + printk(KERN_WARNING "vme_slot_get not supported\n"); return -EINVAL; } @@ -1331,7 +1331,7 @@ static void vme_free_bus_num(int bus) mutex_unlock(&vme_bus_num_mtx); } -int vme_register_bridge (struct vme_bridge *bridge) +int vme_register_bridge(struct vme_bridge *bridge) { struct device *dev; int retval; @@ -1358,7 +1358,7 @@ int vme_register_bridge (struct vme_bridge *bridge) dev_set_name(dev, "vme-%x.%x", bridge->num, i + 1); retval = device_register(dev); - if(retval) + if (retval) goto err_reg; } @@ -1375,7 +1375,7 @@ err_reg: } EXPORT_SYMBOL(vme_register_bridge); -void vme_unregister_bridge (struct vme_bridge *bridge) +void vme_unregister_bridge(struct vme_bridge *bridge) { int i; struct device *dev; @@ -1392,7 +1392,7 @@ EXPORT_SYMBOL(vme_unregister_bridge); /* - Driver Registration --------------------------------------------------- */ -int vme_register_driver (struct vme_driver *drv) +int vme_register_driver(struct vme_driver *drv) { drv->driver.name = drv->name; drv->driver.bus = &vme_bus_type; @@ -1401,7 +1401,7 @@ int vme_register_driver (struct vme_driver *drv) } EXPORT_SYMBOL(vme_register_driver); -void vme_unregister_driver (struct vme_driver *drv) +void vme_unregister_driver(struct vme_driver *drv) { driver_unregister(&drv->driver); } @@ -1418,10 +1418,10 @@ int vme_calc_slot(struct device *dev) /* Determine slot number */ num = 0; - while(num < VME_SLOTS_MAX) { - if(&(bridge->dev[num]) == dev) { + while (num < VME_SLOTS_MAX) { + if (&(bridge->dev[num]) == dev) break; - } + num++; } if (num == VME_SLOTS_MAX) { @@ -1437,8 +1437,8 @@ err_dev: static struct vme_driver *dev_to_vme_driver(struct device *dev) { - if(dev->driver == NULL) - printk("Bugger dev->driver is NULL\n"); + if (dev->driver == NULL) + printk(KERN_ERR "Bugger dev->driver is NULL\n"); return container_of(dev->driver, struct vme_driver, driver); } @@ -1462,7 +1462,7 @@ static int vme_bus_match(struct device *dev, struct device_driver *drv) } i = 0; - while((driver->bind_table[i].bus != 0) || + while ((driver->bind_table[i].bus != 0) || (driver->bind_table[i].slot != 0)) { if (bridge->num == driver->bind_table[i].bus) { @@ -1493,9 +1493,8 @@ static int vme_bus_probe(struct device *dev) driver = dev_to_vme_driver(dev); bridge = dev_to_bridge(dev); - if(driver->probe != NULL) { + if (driver->probe != NULL) retval = driver->probe(dev, bridge->num, vme_calc_slot(dev)); - } return retval; } @@ -1509,9 +1508,8 @@ static int vme_bus_remove(struct device *dev) driver = dev_to_vme_driver(dev); bridge = dev_to_bridge(dev); - if(driver->remove != NULL) { + if (driver->remove != NULL) retval = driver->remove(dev, bridge->num, vme_calc_slot(dev)); - } return retval; } @@ -1524,12 +1522,12 @@ struct bus_type vme_bus_type = { }; EXPORT_SYMBOL(vme_bus_type); -static int __init vme_init (void) +static int __init vme_init(void) { return bus_register(&vme_bus_type); } -static void __exit vme_exit (void) +static void __exit vme_exit(void) { bus_unregister(&vme_bus_type); } diff --git a/drivers/staging/vme/vme.h b/drivers/staging/vme/vme.h index 97dc22e34caf..5a4d163fae10 100644 --- a/drivers/staging/vme/vme.h +++ b/drivers/staging/vme/vme.h @@ -98,28 +98,29 @@ struct vme_driver { struct device_driver driver; }; -void * vme_alloc_consistent(struct vme_resource *, size_t, dma_addr_t *); +void *vme_alloc_consistent(struct vme_resource *, size_t, dma_addr_t *); void vme_free_consistent(struct vme_resource *, size_t, void *, dma_addr_t); size_t vme_get_size(struct vme_resource *); -struct vme_resource * vme_slave_request(struct device *, vme_address_t, vme_cycle_t); -int vme_slave_set (struct vme_resource *, int, unsigned long long, +struct vme_resource *vme_slave_request(struct device *, vme_address_t, + vme_cycle_t); +int vme_slave_set(struct vme_resource *, int, unsigned long long, unsigned long long, dma_addr_t, vme_address_t, vme_cycle_t); -int vme_slave_get (struct vme_resource *, int *, unsigned long long *, +int vme_slave_get(struct vme_resource *, int *, unsigned long long *, unsigned long long *, dma_addr_t *, vme_address_t *, vme_cycle_t *); void vme_slave_free(struct vme_resource *); -struct vme_resource * vme_master_request(struct device *, vme_address_t, vme_cycle_t, - vme_width_t); -int vme_master_set (struct vme_resource *, int, unsigned long long, +struct vme_resource *vme_master_request(struct device *, vme_address_t, + vme_cycle_t, vme_width_t); +int vme_master_set(struct vme_resource *, int, unsigned long long, unsigned long long, vme_address_t, vme_cycle_t, vme_width_t); -int vme_master_get (struct vme_resource *, int *, unsigned long long *, +int vme_master_get(struct vme_resource *, int *, unsigned long long *, unsigned long long *, vme_address_t *, vme_cycle_t *, vme_width_t *); ssize_t vme_master_read(struct vme_resource *, void *, size_t, loff_t); ssize_t vme_master_write(struct vme_resource *, void *, size_t, loff_t); -unsigned int vme_master_rmw (struct vme_resource *, unsigned int, unsigned int, +unsigned int vme_master_rmw(struct vme_resource *, unsigned int, unsigned int, unsigned int, loff_t); void vme_master_free(struct vme_resource *); @@ -153,8 +154,8 @@ void vme_lm_free(struct vme_resource *); int vme_slot_get(struct device *); -int vme_register_driver (struct vme_driver *); -void vme_unregister_driver (struct vme_driver *); +int vme_register_driver(struct vme_driver *); +void vme_unregister_driver(struct vme_driver *); #endif /* _VME_H_ */ diff --git a/drivers/staging/vme/vme_bridge.h b/drivers/staging/vme/vme_bridge.h index 851fa92559f6..a64677e0a31a 100644 --- a/drivers/staging/vme/vme_bridge.h +++ b/drivers/staging/vme/vme_bridge.h @@ -101,7 +101,7 @@ struct vme_irq { * Currently we assume that all chips are PCI-based */ struct vme_bridge { - char name[VMENAMSIZ]; + char name[VMENAMSIZ]; int num; struct list_head master_resources; struct list_head slave_resources; @@ -112,7 +112,7 @@ struct vme_bridge { /* Bridge Info - XXX Move to private structure? */ struct device *parent; /* Generic device struct (pdev->dev for PCI) */ - void * base; /* Base Address of device registers */ + void *base; /* Base Address of device registers */ struct device dev[VME_SLOTS_MAX]; /* Device registered with * device model on VME bus @@ -178,8 +178,8 @@ struct vme_bridge { void vme_irq_handler(struct vme_bridge *, int, int); -int vme_register_bridge (struct vme_bridge *); -void vme_unregister_bridge (struct vme_bridge *); +int vme_register_bridge(struct vme_bridge *); +void vme_unregister_bridge(struct vme_bridge *); #endif /* _VME_BRIDGE_H_ */ From 3cb1b8a77402df3091ba7ecaede9b22484bf51b9 Mon Sep 17 00:00:00 2001 From: Martyn Welch Date: Tue, 15 Dec 2009 08:43:09 +0000 Subject: [PATCH 013/367] Staging: vme: Remove old structures for implemented features Functionality for master RMW and location monitors has been implemented. Remove the commented out structures from the original codebase. Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vme/vme_bridge.h | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/drivers/staging/vme/vme_bridge.h b/drivers/staging/vme/vme_bridge.h index a64677e0a31a..92e5614ab910 100644 --- a/drivers/staging/vme/vme_bridge.h +++ b/drivers/staging/vme/vme_bridge.h @@ -229,36 +229,4 @@ struct vmeArbiterCfg { }; typedef struct vmeArbiterCfg vmeArbiterCfg_t; - -/* - * VMEbus RMW Configuration Data - */ -struct vmeRmwCfg { - unsigned int targetAddrU; /* VME Address (Upper) to trigger RMW cycle */ - unsigned int targetAddr; /* VME Address (Lower) to trigger RMW cycle */ - vme_address_t addrSpace; /* VME Address Space */ - int enableMask; /* Bit mask defining the bits of interest */ - int compareData; /* Data to be compared with the data read */ - int swapData; /* Data written to the VMEbus on success */ - int maxAttempts; /* Maximum times to try */ - int numAttempts; /* Number of attempts before success */ - int reserved; /* For future use */ - -}; -typedef struct vmeRmwCfg vmeRmwCfg_t; - -/* - * VMEbus Location Monitor Arg Structure - */ -struct vmeLmCfg { - unsigned int addrU; /* Location Monitor Address upper */ - unsigned int addr; /* Location Monitor Address lower */ - vme_address_t addrSpace; /* Address Space */ - int userAccessType; /* User/Supervisor Access Type */ - int dataAccessType; /* Data/Program Access Type */ - int lmWait; /* Time to wait for access */ - int lmEvents; /* Lm event mask */ - int reserved; /* For future use */ -}; -typedef struct vmeLmCfg vmeLmCfg_t; #endif From 42d4eff70f57eb889678d40d46a2c01ffd29d9a6 Mon Sep 17 00:00:00 2001 From: Martyn Welch Date: Tue, 15 Dec 2009 08:43:15 +0000 Subject: [PATCH 014/367] Staging: vme: Allow drivers to co-exist Unable to build both drivers at the same time due to classing variables that should be declared static but aren't. Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vme/bridges/vme_ca91cx42.c | 28 ++++++++++++---------- drivers/staging/vme/bridges/vme_tsi148.c | 20 ++++++++-------- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c index 5799b0927686..470479856054 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.c +++ b/drivers/staging/vme/bridges/vme_ca91cx42.c @@ -41,21 +41,23 @@ static void __exit ca91cx42_exit(void); /* Module parameters */ static int geoid; -struct vme_bridge *ca91cx42_bridge; -wait_queue_head_t dma_queue; -wait_queue_head_t iack_queue; -wait_queue_head_t lm_queue; -wait_queue_head_t mbox_queue; +static struct vme_bridge *ca91cx42_bridge; +static wait_queue_head_t dma_queue; +static wait_queue_head_t iack_queue; +#if 0 +static wait_queue_head_t lm_queue; +#endif +static wait_queue_head_t mbox_queue; -void (*lm_callback[4])(int); /* Called in interrupt handler, be careful! */ -void *crcsr_kernel; -dma_addr_t crcsr_bus; +static void (*lm_callback[4])(int); /* Called in interrupt handler */ +static void *crcsr_kernel; +static dma_addr_t crcsr_bus; -struct mutex vme_rmw; /* Only one RMW cycle at a time */ -struct mutex vme_int; /* - * Only one VME interrupt can be - * generated at a time, provide locking - */ +static struct mutex vme_rmw; /* Only one RMW cycle at a time */ +static struct mutex vme_int; /* + * Only one VME interrupt can be + * generated at a time, provide locking + */ static char driver_name[] = "vme_ca91cx42"; diff --git a/drivers/staging/vme/bridges/vme_tsi148.c b/drivers/staging/vme/bridges/vme_tsi148.c index 324cc389586f..4d19a914ec52 100644 --- a/drivers/staging/vme/bridges/vme_tsi148.c +++ b/drivers/staging/vme/bridges/vme_tsi148.c @@ -62,19 +62,19 @@ int tsi148_generate_irq(int, int); int tsi148_slot_get(void); /* Modue parameter */ -int err_chk = 0; +static int err_chk; static int geoid; /* XXX These should all be in a per device structure */ -struct vme_bridge *tsi148_bridge; -wait_queue_head_t dma_queue[2]; -wait_queue_head_t iack_queue; -void (*lm_callback[4])(int); /* Called in interrupt handler, be careful! */ -void *crcsr_kernel; -dma_addr_t crcsr_bus; -struct vme_master_resource *flush_image; -struct mutex vme_rmw; /* Only one RMW cycle at a time */ -struct mutex vme_int; /* +static struct vme_bridge *tsi148_bridge; +static wait_queue_head_t dma_queue[2]; +static wait_queue_head_t iack_queue; +static void (*lm_callback[4])(int); /* Called in interrupt handler */ +static void *crcsr_kernel; +static dma_addr_t crcsr_bus; +static struct vme_master_resource *flush_image; +static struct mutex vme_rmw; /* Only one RMW cycle at a time */ +static struct mutex vme_int; /* * Only one VME interrupt can be * generated at a time, provide locking */ From 203fe0d2e99598eb960baf2cc4b88b6e794e5a20 Mon Sep 17 00:00:00 2001 From: "kirjanov@gmail.com" Date: Fri, 18 Dec 2009 10:51:07 +0300 Subject: [PATCH 015/367] staging: slicoss Convert to netdev_tx_t Convert to netdev_tx_t. Signed-off-by: Denis Kirjanov Signed-off-by: Greg Kroah-Hartman --- drivers/staging/slicoss/slicoss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index 5b191afc1442..a18eeb62f4ef 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -101,7 +101,7 @@ static struct net_device_stats *slic_get_stats(struct net_device *dev); static int slic_entry_open(struct net_device *dev); static int slic_entry_halt(struct net_device *dev); static int slic_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); -static int slic_xmit_start(struct sk_buff *skb, struct net_device *dev); +static netdev_tx_t slic_xmit_start(struct sk_buff *skb, struct net_device *dev); static void slic_xmit_fail(struct adapter *adapter, struct sk_buff *skb, void *cmd, u32 skbtype, u32 status); static void slic_config_pci(struct pci_dev *pcidev); @@ -784,7 +784,7 @@ static void slic_xmit_build_request(struct adapter *adapter, #define NORMAL_ETHFRAME 0 -static int slic_xmit_start(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t slic_xmit_start(struct sk_buff *skb, struct net_device *dev) { struct sliccard *card; struct adapter *adapter = (struct adapter *)netdev_priv(dev); From a71b9978819ce25f911af16fc4d7b96fcdf665d4 Mon Sep 17 00:00:00 2001 From: "kirjanov@gmail.com" Date: Fri, 18 Dec 2009 10:52:45 +0300 Subject: [PATCH 016/367] staging: slicoss Check for valid hw address Check for valid hw address. Signed-off-by: Denis Kirjanov Signed-off-by: Greg Kroah-Hartman --- drivers/staging/slicoss/slicoss.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index a18eeb62f4ef..9c8eb09de1a6 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -2531,6 +2531,9 @@ static int slic_mac_set_address(struct net_device *dev, void *ptr) if (!adapter) return -EBUSY; + if (!is_valid_ether_addr(addr->sa_data)) + return -EINVAL; + memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); memcpy(adapter->currmacaddr, addr->sa_data, dev->addr_len); From f8771fa67d63c57e9eedf034939261865edc2065 Mon Sep 17 00:00:00 2001 From: "kirjanov@gmail.com" Date: Fri, 18 Dec 2009 10:54:27 +0300 Subject: [PATCH 017/367] staging: slicoss No need type casting when using netdev_priv No need type casting when using netdev_priv. Signed-off-by: Denis Kirjanov Signed-off-by: Greg Kroah-Hartman --- drivers/staging/slicoss/slicoss.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index 9c8eb09de1a6..41c440d35b8b 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -292,7 +292,7 @@ static void slic_init_adapter(struct net_device *netdev, { ushort index; struct slic_handle *pslic_handle; - struct adapter *adapter = (struct adapter *)netdev_priv(netdev); + struct adapter *adapter = netdev_priv(netdev); /* adapter->pcidev = pcidev;*/ adapter->vendid = pci_tbl_entry->vendor; @@ -484,7 +484,7 @@ err_out_disable_pci: static int slic_entry_open(struct net_device *dev) { - struct adapter *adapter = (struct adapter *) netdev_priv(dev); + struct adapter *adapter = netdev_priv(dev); struct sliccard *card = adapter->card; u32 locked = 0; int status; @@ -534,7 +534,7 @@ static void __devexit slic_entry_remove(struct pci_dev *pcidev) struct net_device *dev = pci_get_drvdata(pcidev); u32 mmio_start = 0; uint mmio_len = 0; - struct adapter *adapter = (struct adapter *) netdev_priv(dev); + struct adapter *adapter = netdev_priv(dev); struct sliccard *card; struct mcast_address *mcaddr, *mlist; @@ -581,7 +581,7 @@ static void __devexit slic_entry_remove(struct pci_dev *pcidev) static int slic_entry_halt(struct net_device *dev) { - struct adapter *adapter = (struct adapter *)netdev_priv(dev); + struct adapter *adapter = netdev_priv(dev); struct sliccard *card = adapter->card; __iomem struct slic_regs *slic_regs = adapter->slic_regs; @@ -624,7 +624,7 @@ static int slic_entry_halt(struct net_device *dev) static int slic_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { - struct adapter *adapter = (struct adapter *)netdev_priv(dev); + struct adapter *adapter = netdev_priv(dev); struct ethtool_cmd edata; struct ethtool_cmd ecmd; u32 data[7]; @@ -787,7 +787,7 @@ static void slic_xmit_build_request(struct adapter *adapter, static netdev_tx_t slic_xmit_start(struct sk_buff *skb, struct net_device *dev) { struct sliccard *card; - struct adapter *adapter = (struct adapter *)netdev_priv(dev); + struct adapter *adapter = netdev_priv(dev); struct slic_hostcmd *hcmd = NULL; u32 status = 0; u32 skbtype = NORMAL_ETHFRAME; @@ -1071,7 +1071,7 @@ static void slic_xmit_complete(struct adapter *adapter) static irqreturn_t slic_interrupt(int irq, void *dev_id) { struct net_device *dev = (struct net_device *)dev_id; - struct adapter *adapter = (struct adapter *)netdev_priv(dev); + struct adapter *adapter = netdev_priv(dev); u32 isr; if ((adapter->pshmem) && (adapter->pshmem->isr)) { @@ -1229,7 +1229,7 @@ static void slic_init_cleanup(struct adapter *adapter) static struct net_device_stats *slic_get_stats(struct net_device *dev) { - struct adapter *adapter = (struct adapter *)netdev_priv(dev); + struct adapter *adapter = netdev_priv(dev); struct net_device_stats *stats; ASSERT(adapter); @@ -1360,7 +1360,7 @@ static void slic_mcast_set_bit(struct adapter *adapter, char *address) static void slic_mcast_set_list(struct net_device *dev) { - struct adapter *adapter = (struct adapter *)netdev_priv(dev); + struct adapter *adapter = netdev_priv(dev); int status = STATUS_SUCCESS; int i; char *addresses; @@ -2523,7 +2523,7 @@ static bool slic_mac_filter(struct adapter *adapter, static int slic_mac_set_address(struct net_device *dev, void *ptr) { - struct adapter *adapter = (struct adapter *)netdev_priv(dev); + struct adapter *adapter = netdev_priv(dev); struct sockaddr *addr = ptr; if (netif_running(dev)) From d9c057ab0b19e4995884f412b7d15b6c08b1b54e Mon Sep 17 00:00:00 2001 From: "kirjanov@gmail.com" Date: Fri, 18 Dec 2009 10:56:21 +0300 Subject: [PATCH 018/367] staging: slicoss No need to check pointer in debugfs_remove() No need to check pointer expicitly since it has been done in debugfs_remove() Signed-off-by: Denis Kirjanov Signed-off-by: Greg Kroah-Hartman --- drivers/staging/slicoss/slicoss.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index 41c440d35b8b..96108fdb26c5 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -3971,10 +3971,8 @@ static void slic_debug_adapter_create(struct adapter *adapter) static void slic_debug_adapter_destroy(struct adapter *adapter) { - if (adapter->debugfs_entry) { - debugfs_remove(adapter->debugfs_entry); - adapter->debugfs_entry = NULL; - } + debugfs_remove(adapter->debugfs_entry); + adapter->debugfs_entry = NULL; } static void slic_debug_card_create(struct sliccard *card) From 6c7aeb654d0d7f6d3b8de864c60868aa61f1e283 Mon Sep 17 00:00:00 2001 From: "kirjanov@gmail.com" Date: Fri, 18 Dec 2009 10:57:45 +0300 Subject: [PATCH 019/367] staging: slicoss Use dev->stats rather than adapter->stats. Use dev->stats rather than adapter->stats. Signed-off-by: Denis Kirjanov Signed-off-by: Greg Kroah-Hartman --- drivers/staging/slicoss/slicoss.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index 96108fdb26c5..872717024fd0 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -1230,21 +1230,20 @@ static void slic_init_cleanup(struct adapter *adapter) static struct net_device_stats *slic_get_stats(struct net_device *dev) { struct adapter *adapter = netdev_priv(dev); - struct net_device_stats *stats; ASSERT(adapter); - stats = &adapter->stats; - stats->collisions = adapter->slic_stats.iface.xmit_collisions; - stats->rx_errors = adapter->slic_stats.iface.rcv_errors; - stats->tx_errors = adapter->slic_stats.iface.xmt_errors; - stats->rx_missed_errors = adapter->slic_stats.iface.rcv_discards; - stats->tx_heartbeat_errors = 0; - stats->tx_aborted_errors = 0; - stats->tx_window_errors = 0; - stats->tx_fifo_errors = 0; - stats->rx_frame_errors = 0; - stats->rx_length_errors = 0; - return &adapter->stats; + dev->stats.collisions = adapter->slic_stats.iface.xmit_collisions; + dev->stats.rx_errors = adapter->slic_stats.iface.rcv_errors; + dev->stats.tx_errors = adapter->slic_stats.iface.xmt_errors; + dev->stats.rx_missed_errors = adapter->slic_stats.iface.rcv_discards; + dev->stats.tx_heartbeat_errors = 0; + dev->stats.tx_aborted_errors = 0; + dev->stats.tx_window_errors = 0; + dev->stats.tx_fifo_errors = 0; + dev->stats.rx_frame_errors = 0; + dev->stats.rx_length_errors = 0; + + return &dev->stats; } /* From 5d372900aa6b14142cc7d7145cc8be1cb6c0d7b6 Mon Sep 17 00:00:00 2001 From: "kirjanov@gmail.com" Date: Fri, 18 Dec 2009 10:59:04 +0300 Subject: [PATCH 020/367] staging: slicoss Use PCI_DEVICE_TABLE. Use PCI_DEVICE_TABLE: defines array as const and puts it into the __devinitconst section. Signed-off-by: Denis Kirjanov Signed-off-by: Greg Kroah-Hartman --- drivers/staging/slicoss/slicoss.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index 872717024fd0..4dbd5aa2d980 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -194,14 +194,10 @@ MODULE_PARM_DESC(dynamic_intagg, "Dynamic Interrupt Aggregation Setting"); module_param(intagg_delay, int, 0); MODULE_PARM_DESC(intagg_delay, "uSec Interrupt Aggregation Delay"); -static struct pci_device_id slic_pci_tbl[] __devinitdata = { - {PCI_VENDOR_ID_ALACRITECH, - SLIC_1GB_DEVICE_ID, - PCI_ANY_ID, PCI_ANY_ID,}, - {PCI_VENDOR_ID_ALACRITECH, - SLIC_2GB_DEVICE_ID, - PCI_ANY_ID, PCI_ANY_ID,}, - {0,} +static DEFINE_PCI_DEVICE_TABLE(slic_pci_tbl) = { + { PCI_DEVICE(PCI_VENDOR_ID_ALACRITECH, SLIC_1GB_DEVICE_ID) }, + { PCI_DEVICE(PCI_VENDOR_ID_ALACRITECH, SLIC_2GB_DEVICE_ID) }, + { 0 } }; MODULE_DEVICE_TABLE(pci, slic_pci_tbl); From 30ae835f89cac13156fdef84412870f3179f3f22 Mon Sep 17 00:00:00 2001 From: "kirjanov@gmail.com" Date: Fri, 18 Dec 2009 11:00:19 +0300 Subject: [PATCH 021/367] staging: slicoss Use compare_ether_addr. Use compare_ether_addr. Signed-off-by: Denis Kirjanov Signed-off-by: Greg Kroah-Hartman --- drivers/staging/slicoss/slic.h | 9 --------- drivers/staging/slicoss/slicoss.c | 11 +++-------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/drivers/staging/slicoss/slic.h b/drivers/staging/slicoss/slic.h index ccf7625b8bb3..eb3a619c6a94 100644 --- a/drivers/staging/slicoss/slic.h +++ b/drivers/staging/slicoss/slic.h @@ -527,15 +527,6 @@ struct adapter { (largestat) += ((newstat) - (oldstat)); \ } -#define ETHER_EQ_ADDR(_AddrA, _AddrB, _Result) \ -{ \ - _Result = true; \ - if (*(u32 *)(_AddrA) != *(u32 *)(_AddrB)) \ - _Result = false; \ - if (*(u16 *)(&((_AddrA)[4])) != *(u16 *)(&((_AddrB)[4]))) \ - _Result = false; \ -} - #if defined(CONFIG_X86_64) || defined(CONFIG_IA64) #define SLIC_GET_ADDR_LOW(_addr) (u32)((u64)(_addr) & \ 0x00000000FFFFFFFF) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index 4dbd5aa2d980..aefe3fef7728 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -1249,13 +1249,11 @@ static struct net_device_stats *slic_get_stats(struct net_device *dev) static int slic_mcast_add_list(struct adapter *adapter, char *address) { struct mcast_address *mcaddr, *mlist; - bool equaladdr; /* Check to see if it already exists */ mlist = adapter->mcastaddrs; while (mlist) { - ETHER_EQ_ADDR(mlist->address, address, equaladdr); - if (equaladdr) + if (!compare_ether_addr(mlist->address, address)) return STATUS_SUCCESS; mlist = mlist->next; } @@ -2469,7 +2467,6 @@ static bool slic_mac_filter(struct adapter *adapter, u32 opts = adapter->macopts; u32 *dhost4 = (u32 *)ðer_frame->ether_dhost[0]; u16 *dhost2 = (u16 *)ðer_frame->ether_dhost[4]; - bool equaladdr; if (opts & MAC_PROMISC) return true; @@ -2493,10 +2490,8 @@ static bool slic_mac_filter(struct adapter *adapter, struct mcast_address *mcaddr = adapter->mcastaddrs; while (mcaddr) { - ETHER_EQ_ADDR(mcaddr->address, - ether_frame->ether_dhost, - equaladdr); - if (equaladdr) { + if (!compare_ether_addr(mcaddr->address, + ether_frame->ether_dhost)) { adapter->rcv_multicasts++; adapter->stats.multicast++; return true; From a5c252411f16dce1f9586090ffa8210273a4c8fb Mon Sep 17 00:00:00 2001 From: "kirjanov@gmail.com" Date: Fri, 18 Dec 2009 11:02:09 +0300 Subject: [PATCH 022/367] staging: slicoss Use pci_set_consistent_dma_mask. Use pci_set_consistent_dma_mask() in the case of 64-bit consistent allocations. Signed-off-by: Denis Kirjanov Signed-off-by: Greg Kroah-Hartman --- drivers/staging/slicoss/slicoss.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index aefe3fef7728..09a9d759c612 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -366,6 +366,7 @@ static int __devinit slic_entry_probe(struct pci_dev *pcidev, ulong mmio_start = 0; ulong mmio_len = 0; struct sliccard *card = NULL; + int pci_using_dac = 0; slic_global.dynamic_intagg = dynamic_intagg; @@ -379,16 +380,26 @@ static int __devinit slic_entry_probe(struct pci_dev *pcidev, printk(KERN_DEBUG "%s\n", slic_proc_version); } - err = pci_set_dma_mask(pcidev, DMA_BIT_MASK(64)); - if (err) { - err = pci_set_dma_mask(pcidev, DMA_BIT_MASK(32)); - if (err) + if (!pci_set_dma_mask(pcidev, DMA_BIT_MASK(64))) { + pci_using_dac = 1; + if (pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(64))) { + dev_err(&pcidev->dev, "unable to obtain 64-bit DMA for " + "consistent allocations\n"); goto err_out_disable_pci; + } + } else if (pci_set_dma_mask(pcidev, DMA_BIT_MASK(32))) { + pci_using_dac = 0; + pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(32)); + } else { + dev_err(&pcidev->dev, "no usable DMA configuration\n"); + goto err_out_disable_pci; } err = pci_request_regions(pcidev, DRV_NAME); - if (err) + if (err) { + dev_err(&pcidev->dev, "can't obtain PCI resources\n"); goto err_out_disable_pci; + } pci_set_master(pcidev); @@ -404,6 +415,8 @@ static int __devinit slic_entry_probe(struct pci_dev *pcidev, adapter = netdev_priv(netdev); adapter->netdev = netdev; adapter->pcidev = pcidev; + if (pci_using_dac) + netdev->features |= NETIF_F_HIGHDMA; mmio_start = pci_resource_start(pcidev, 0); mmio_len = pci_resource_len(pcidev, 0); From 0ee9f67c4028500a4348e8bc87ee7ec1139b8259 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Sun, 6 Dec 2009 11:34:52 -0800 Subject: [PATCH 023/367] Staging: rtl8187x: Use %pM for mac address output Uncompiled. Doesn't currently build anyway. Converted MAC_FMT to %pM Converted some %02x%02x%02x%02x%02x%02x to %pm Converted MAC_ARG to direct use Removed MAC_FMT and MAC_ARG macros Signed-off-by: Joe Perches Signed-off-by: Greg Kroah-Hartman --- .../staging/rtl8187se/ieee80211/ieee80211.h | 4 -- .../ieee80211/ieee80211_crypt_ccmp.c | 21 ++++---- .../ieee80211/ieee80211_crypt_tkip.c | 20 +++---- .../rtl8187se/ieee80211/ieee80211_rx.c | 48 ++++++++--------- .../rtl8187se/ieee80211/ieee80211_softmac.c | 2 +- .../rtl8187se/ieee80211/ieee80211_tx.c | 6 +-- .../rtl8187se/ieee80211/ieee80211_wx.c | 4 +- drivers/staging/rtl8192e/ieee80211.h | 3 -- .../staging/rtl8192e/ieee80211/ieee80211.h | 3 -- .../rtl8192e/ieee80211/ieee80211_crypt_ccmp.c | 18 +++---- .../rtl8192e/ieee80211/ieee80211_crypt_tkip.c | 27 +++++----- .../staging/rtl8192e/ieee80211/ieee80211_rx.c | 52 +++++++++---------- .../rtl8192e/ieee80211/ieee80211_softmac.c | 2 +- .../staging/rtl8192e/ieee80211/ieee80211_tx.c | 4 +- .../staging/rtl8192e/ieee80211/ieee80211_wx.c | 4 +- .../rtl8192e/ieee80211/rtl819x_BAProc.c | 6 +-- .../rtl8192e/ieee80211/rtl819x_TSProc.c | 6 +-- drivers/staging/rtl8192e/r8192E_core.c | 2 +- .../staging/rtl8192su/ieee80211/ieee80211.h | 4 -- .../ieee80211/ieee80211_crypt_ccmp.c | 21 ++++---- .../ieee80211/ieee80211_crypt_tkip.c | 20 +++---- .../rtl8192su/ieee80211/ieee80211_rx.c | 48 ++++++++--------- .../rtl8192su/ieee80211/ieee80211_softmac.c | 2 +- .../rtl8192su/ieee80211/ieee80211_tx.c | 4 +- .../rtl8192su/ieee80211/ieee80211_wx.c | 4 +- .../rtl8192su/ieee80211/rtl819x_BAProc.c | 6 +-- .../rtl8192su/ieee80211/rtl819x_TSProc.c | 6 +-- drivers/staging/rtl8192su/r8192U_core.c | 2 +- drivers/staging/rtl8192su/r8192U_dm.c | 2 +- drivers/staging/rtl8192u/ieee80211.h | 3 -- .../staging/rtl8192u/ieee80211/ieee80211.h | 3 -- .../rtl8192u/ieee80211/ieee80211_crypt_ccmp.c | 21 ++++---- .../rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 20 +++---- .../staging/rtl8192u/ieee80211/ieee80211_rx.c | 48 ++++++++--------- .../rtl8192u/ieee80211/ieee80211_softmac.c | 2 +- .../staging/rtl8192u/ieee80211/ieee80211_tx.c | 4 +- .../staging/rtl8192u/ieee80211/ieee80211_wx.c | 4 +- .../rtl8192u/ieee80211/rtl819x_BAProc.c | 6 +-- .../rtl8192u/ieee80211/rtl819x_TSProc.c | 6 +-- drivers/staging/rtl8192u/r8192U_core.c | 4 +- 40 files changed, 221 insertions(+), 251 deletions(-) diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h index 0d490c164db6..04a48e7e76e6 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h @@ -161,10 +161,6 @@ do { if (ieee80211_debug_level & (level)) \ #define IEEE80211_DEBUG(level, fmt, args...) do {} while (0) #endif /* CONFIG_IEEE80211_DEBUG */ -#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x" -#define MAC_ARG(x) ((u8 *)(x))[0], ((u8 *)(x))[1], ((u8 *)(x))[2], \ - ((u8 *)(x))[3], ((u8 *)(x))[4], ((u8 *)(x))[5] - /* * To use the debug system; * diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c index 172e8f3ae6c1..40f1b99faad2 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_ccmp.c @@ -285,7 +285,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (!(keyidx & (1 << 5))) { if (net_ratelimit()) { printk(KERN_DEBUG "CCMP: received packet without ExtIV" - " flag from " MAC_FMT "\n", MAC_ARG(hdr->addr2)); + " flag from %pM\n", hdr->addr2); } key->dot11RSNAStatsCCMPFormatErrors++; return -2; @@ -298,9 +298,9 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) } if (!key->key_set) { if (net_ratelimit()) { - printk(KERN_DEBUG "CCMP: received packet from " MAC_FMT + printk(KERN_DEBUG "CCMP: received packet from %pM" " with keyid=%d that does not have a configured" - " key\n", MAC_ARG(hdr->addr2), keyidx); + " key\n", hdr->addr2, keyidx); } return -3; } @@ -315,11 +315,9 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (memcmp(pn, key->rx_pn, CCMP_PN_LEN) <= 0) { if (net_ratelimit()) { - printk(KERN_DEBUG "CCMP: replay detected: STA=" MAC_FMT - " previous PN %02x%02x%02x%02x%02x%02x " - "received PN %02x%02x%02x%02x%02x%02x\n", - MAC_ARG(hdr->addr2), MAC_ARG(key->rx_pn), - MAC_ARG(pn)); + printk(KERN_DEBUG "CCMP: replay detected: STA=%pM" + " previous PN %pm received PN %pm\n", + hdr->addr2, key->rx_pn, pn); } key->dot11RSNAStatsCCMPReplays++; return -4; @@ -347,7 +345,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (memcmp(mic, a, CCMP_MIC_LEN) != 0) { if (net_ratelimit()) { printk(KERN_DEBUG "CCMP: decrypt failed: STA=" - MAC_FMT "\n", MAC_ARG(hdr->addr2)); + "%pM\n", hdr->addr2); } key->dot11RSNAStatsCCMPDecryptErrors++; return -5; @@ -423,11 +421,10 @@ static char * ieee80211_ccmp_print_stats(char *p, void *priv) { struct ieee80211_ccmp_data *ccmp = priv; p += sprintf(p, "key[%d] alg=CCMP key_set=%d " - "tx_pn=%02x%02x%02x%02x%02x%02x " - "rx_pn=%02x%02x%02x%02x%02x%02x " + "tx_pn=%pm rx_pn=%pm " "format_errors=%d replays=%d decrypt_errors=%d\n", ccmp->key_idx, ccmp->key_set, - MAC_ARG(ccmp->tx_pn), MAC_ARG(ccmp->rx_pn), + ccmp->tx_pn, ccmp->rx_pn, ccmp->dot11RSNAStatsCCMPFormatErrors, ccmp->dot11RSNAStatsCCMPReplays, ccmp->dot11RSNAStatsCCMPDecryptErrors); diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c index e6d8385e1d88..a5254111d9a1 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c @@ -385,7 +385,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (!(keyidx & (1 << 5))) { if (net_ratelimit()) { printk(KERN_DEBUG "TKIP: received packet without ExtIV" - " flag from " MAC_FMT "\n", MAC_ARG(hdr->addr2)); + " flag from %pM\n", hdr->addr2); } return -2; } @@ -397,9 +397,9 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) } if (!tkey->key_set) { if (net_ratelimit()) { - printk(KERN_DEBUG "TKIP: received packet from " MAC_FMT + printk(KERN_DEBUG "TKIP: received packet from %pM" " with keyid=%d that does not have a configured" - " key\n", MAC_ARG(hdr->addr2), keyidx); + " key\n", hdr->addr2, keyidx); } return -3; } @@ -410,9 +410,9 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (iv32 < tkey->rx_iv32 || (iv32 == tkey->rx_iv32 && iv16 <= tkey->rx_iv16)) { if (net_ratelimit()) { - printk(KERN_DEBUG "TKIP: replay detected: STA=" MAC_FMT + printk(KERN_DEBUG "TKIP: replay detected: STA=%pM" " previous TSC %08x%04x received TSC " - "%08x%04x\n", MAC_ARG(hdr->addr2), + "%08x%04x\n", hdr->addr2, tkey->rx_iv32, tkey->rx_iv16, iv32, iv16); } tkey->dot11RSNAStatsTKIPReplays++; @@ -431,8 +431,8 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (crypto_blkcipher_decrypt(&desc, &sg, &sg, plen + 4)) { if (net_ratelimit()) { printk(KERN_DEBUG ": TKIP: failed to decrypt " - "received packet from " MAC_FMT "\n", - MAC_ARG(hdr->addr2)); + "received packet from %pM\n", + hdr->addr2); } return -7; } @@ -450,7 +450,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) } if (net_ratelimit()) { printk(KERN_DEBUG "TKIP: ICV error detected: STA=" - MAC_FMT "\n", MAC_ARG(hdr->addr2)); + "%pM\n", hdr->addr2); } tkey->dot11RSNAStatsTKIPICVErrors++; return -5; @@ -604,8 +604,8 @@ static int ieee80211_michael_mic_verify(struct sk_buff *skb, int keyidx, struct ieee80211_hdr_4addr *hdr; hdr = (struct ieee80211_hdr_4addr *)skb->data; printk(KERN_DEBUG "%s: Michael MIC verification failed for " - "MSDU from " MAC_FMT " keyidx=%d\n", - skb->dev ? skb->dev->name : "N/A", MAC_ARG(hdr->addr2), + "MSDU from %pM keyidx=%d\n", + skb->dev ? skb->dev->name : "N/A", hdr->addr2, keyidx); if (skb->dev) ieee80211_michael_mic_failure(skb->dev, hdr, keyidx); diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c index 9128c181bc7d..2b7080cc2c05 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c @@ -311,8 +311,8 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device* ieee, struct sk_buff *skb, strcmp(crypt->ops->name, "TKIP") == 0) { if (net_ratelimit()) { printk(KERN_DEBUG "%s: TKIP countermeasures: dropped " - "received packet from " MAC_FMT "\n", - ieee->dev->name, MAC_ARG(hdr->addr2)); + "received packet from %pM\n", + ieee->dev->name, hdr->addr2); } return -1; } @@ -323,8 +323,8 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device* ieee, struct sk_buff *skb, atomic_dec(&crypt->refcnt); if (res < 0) { IEEE80211_DEBUG_DROP( - "decryption failed (SA=" MAC_FMT - ") res=%d\n", MAC_ARG(hdr->addr2), res); + "decryption failed (SA=%pM" + ") res=%d\n", hdr->addr2, res); if (res == -2) IEEE80211_DEBUG_DROP("Decryption failed ICV " "mismatch (key %d)\n", @@ -356,8 +356,8 @@ ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device* ieee, struct sk_buff *s atomic_dec(&crypt->refcnt); if (res < 0) { printk(KERN_DEBUG "%s: MSDU decryption/MIC verification failed" - " (SA=" MAC_FMT " keyidx=%d)\n", - ieee->dev->name, MAC_ARG(hdr->addr2), keyidx); + " (SA=%pM keyidx=%d)\n", + ieee->dev->name, hdr->addr2, keyidx); return -1; } @@ -550,8 +550,8 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, * frames silently instead of filling system log with * these reports. */ IEEE80211_DEBUG_DROP("Decryption failed (not set)" - " (SA=" MAC_FMT ")\n", - MAC_ARG(hdr->addr2)); + " (SA=%pM)\n", + hdr->addr2); ieee->ieee_stats.rx_discards_undecryptable++; goto rx_dropped; } @@ -709,8 +709,8 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, } else { IEEE80211_DEBUG_DROP( "encryption configured, but RX " - "frame not encrypted (SA=" MAC_FMT ")\n", - MAC_ARG(hdr->addr2)); + "frame not encrypted (SA=%pM)\n", + hdr->addr2); goto rx_dropped; } } @@ -729,9 +729,9 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, !ieee80211_is_eapol_frame(ieee, skb, hdrlen)) { IEEE80211_DEBUG_DROP( "dropped unencrypted RX data " - "frame from " MAC_FMT + "frame from %pM" " (drop_unencrypted=1)\n", - MAC_ARG(hdr->addr2)); + hdr->addr2); goto rx_dropped; } /* @@ -1196,11 +1196,11 @@ inline int ieee80211_network_init( } if (network->mode == 0) { - IEEE80211_DEBUG_SCAN("Filtered out '%s (" MAC_FMT ")' " + IEEE80211_DEBUG_SCAN("Filtered out '%s (%pM)' " "network.\n", escape_essid(network->ssid, network->ssid_len), - MAC_ARG(network->bssid)); + network->bssid); return 1; } @@ -1341,9 +1341,9 @@ inline void ieee80211_process_probe_response( memset(&network, 0, sizeof(struct ieee80211_network)); IEEE80211_DEBUG_SCAN( - "'%s' (" MAC_FMT "): %c%c%c%c %c%c%c%c-%c%c%c%c %c%c%c%c\n", + "'%s' (%pM): %c%c%c%c %c%c%c%c-%c%c%c%c %c%c%c%c\n", escape_essid(info_element->data, info_element->len), - MAC_ARG(beacon->header.addr3), + beacon->header.addr3, (beacon->capability & (1<<0xf)) ? '1' : '0', (beacon->capability & (1<<0xe)) ? '1' : '0', (beacon->capability & (1<<0xd)) ? '1' : '0', @@ -1362,10 +1362,10 @@ inline void ieee80211_process_probe_response( (beacon->capability & (1<<0x0)) ? '1' : '0'); if (ieee80211_network_init(ieee, beacon, &network, stats)) { - IEEE80211_DEBUG_SCAN("Dropped '%s' (" MAC_FMT ") via %s.\n", + IEEE80211_DEBUG_SCAN("Dropped '%s' (%pM) via %s.\n", escape_essid(info_element->data, info_element->len), - MAC_ARG(beacon->header.addr3), + beacon->header.addr3, WLAN_FC_GET_STYPE(beacon->header.frame_ctl) == IEEE80211_STYPE_PROBE_RESP ? "PROBE RESPONSE" : "BEACON"); @@ -1464,11 +1464,11 @@ inline void ieee80211_process_probe_response( /* If there are no more slots, expire the oldest */ list_del(&oldest->list); target = oldest; - IEEE80211_DEBUG_SCAN("Expired '%s' (" MAC_FMT ") from " + IEEE80211_DEBUG_SCAN("Expired '%s' (%pM) from " "network list.\n", escape_essid(target->ssid, target->ssid_len), - MAC_ARG(target->bssid)); + target->bssid); } else { /* Otherwise just pull from the free list */ target = list_entry(ieee->network_free_list.next, @@ -1478,10 +1478,10 @@ inline void ieee80211_process_probe_response( #ifdef CONFIG_IEEE80211_DEBUG - IEEE80211_DEBUG_SCAN("Adding '%s' (" MAC_FMT ") via %s.\n", + IEEE80211_DEBUG_SCAN("Adding '%s' (%pM) via %s.\n", escape_essid(network.ssid, network.ssid_len), - MAC_ARG(network.bssid), + network.bssid, WLAN_FC_GET_STYPE(beacon->header.frame_ctl) == IEEE80211_STYPE_PROBE_RESP ? "PROBE RESPONSE" : "BEACON"); @@ -1492,10 +1492,10 @@ inline void ieee80211_process_probe_response( if(ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE) ieee80211_softmac_new_net(ieee,&network); } else { - IEEE80211_DEBUG_SCAN("Updating '%s' (" MAC_FMT ") via %s.\n", + IEEE80211_DEBUG_SCAN("Updating '%s' (%pM) via %s.\n", escape_essid(target->ssid, target->ssid_len), - MAC_ARG(target->bssid), + target->bssid, WLAN_FC_GET_STYPE(beacon->header.frame_ctl) == IEEE80211_STYPE_PROBE_RESP ? "PROBE RESPONSE" : "BEACON"); diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c index c7c645af0ebb..e8cfcb85727e 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c @@ -1573,7 +1573,7 @@ ieee80211_rx_assoc_rq(struct ieee80211_device *ieee, struct sk_buff *skb) ieee80211_resp_to_assoc_rq(ieee, dest); } - printk(KERN_INFO"New client associated: "MAC_FMT"\n", MAC_ARG(dest)); + printk(KERN_INFO"New client associated: %pM\n", dest); } diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c index 69bd02164b0c..6cb31e1760ac 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c @@ -198,8 +198,8 @@ int ieee80211_encrypt_fragment( header = (struct ieee80211_hdr_4addr *)frag->data; if (net_ratelimit()) { printk(KERN_DEBUG "%s: TKIP countermeasures: dropped " - "TX packet to " MAC_FMT "\n", - ieee->dev->name, MAC_ARG(header->addr1)); + "TX packet to %pM\n", + ieee->dev->name, header->addr1); } return -1; } @@ -407,7 +407,7 @@ int ieee80211_rtl_xmit(struct sk_buff *skb, memcpy(&header.addr2, src, ETH_ALEN); memcpy(&header.addr3, ieee->current_network.bssid, ETH_ALEN); } - // printk(KERN_WARNING "essid MAC address is "MAC_FMT, MAC_ARG(&header.addr1)); + // printk(KERN_WARNING "essid MAC address is %pM", &header.addr1); header.frame_ctl = cpu_to_le16(fc); //hdr_len = IEEE80211_3ADDR_LEN; diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c index 6aad48fe2e18..acd1077e6396 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c @@ -234,10 +234,10 @@ int ieee80211_wx_get_scan(struct ieee80211_device *ieee, else IEEE80211_DEBUG_SCAN( "Not showing network '%s (" - MAC_FMT ")' due to age (%lums).\n", + "%pM)' due to age (%lums).\n", escape_essid(network->ssid, network->ssid_len), - MAC_ARG(network->bssid), + network->bssid, (jiffies - network->last_scanned) / (HZ / 100)); } } diff --git a/drivers/staging/rtl8192e/ieee80211.h b/drivers/staging/rtl8192e/ieee80211.h index 3ba9e9e90bda..c39249eb54b5 100644 --- a/drivers/staging/rtl8192e/ieee80211.h +++ b/drivers/staging/rtl8192e/ieee80211.h @@ -547,9 +547,6 @@ do { if (ieee80211_debug_level & (level)) \ /* debug macros not dependent on CONFIG_IEEE80211_DEBUG */ -#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x" -#define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5] - /* * To use the debug system; * diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211.h b/drivers/staging/rtl8192e/ieee80211/ieee80211.h index aa76390487bb..9d91ab9fc04b 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211.h @@ -615,9 +615,6 @@ do { if (ieee80211_debug_level & (level)) \ /* debug macros not dependent on CONFIG_IEEE80211_DEBUG */ -#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x" -#define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5] - /* * To use the debug system; * diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c index ab871b360b5d..609c289541d4 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c @@ -331,7 +331,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (!(keyidx & (1 << 5))) { if (net_ratelimit()) { printk(KERN_DEBUG "CCMP: received packet without ExtIV" - " flag from " MAC_FMT "\n", MAC_ARG(hdr->addr2)); + " flag from %pM\n", hdr->addr2); } key->dot11RSNAStatsCCMPFormatErrors++; return -2; @@ -344,9 +344,9 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) } if (!key->key_set) { if (net_ratelimit()) { - printk(KERN_DEBUG "CCMP: received packet from " MAC_FMT + printk(KERN_DEBUG "CCMP: received packet from %pM" " with keyid=%d that does not have a configured" - " key\n", MAC_ARG(hdr->addr2), keyidx); + " key\n", hdr->addr2, keyidx); } return -3; } @@ -361,11 +361,9 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (memcmp(pn, key->rx_pn, CCMP_PN_LEN) <= 0) { if (net_ratelimit()) { - printk(KERN_DEBUG "CCMP: replay detected: STA=" MAC_FMT - " previous PN %02x%02x%02x%02x%02x%02x " - "received PN %02x%02x%02x%02x%02x%02x\n", - MAC_ARG(hdr->addr2), MAC_ARG(key->rx_pn), - MAC_ARG(pn)); + printk(KERN_DEBUG "CCMP: replay detected: STA=%pM" + " previous PN %pm received PN %pm\n", + hdr->addr2, key->rx_pn, pn); } key->dot11RSNAStatsCCMPReplays++; return -4; @@ -402,7 +400,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (memcmp(mic, a, CCMP_MIC_LEN) != 0) { if (net_ratelimit()) { printk(KERN_DEBUG "CCMP: decrypt failed: STA=" - MAC_FMT "\n", MAC_ARG(hdr->addr2)); + "%pM\n", hdr->addr2); } key->dot11RSNAStatsCCMPDecryptErrors++; return -5; @@ -482,7 +480,7 @@ static char * ieee80211_ccmp_print_stats(char *p, void *priv) "rx_pn=%02x%02x%02x%02x%02x%02x " "format_errors=%d replays=%d decrypt_errors=%d\n", ccmp->key_idx, ccmp->key_set, - MAC_ARG(ccmp->tx_pn), MAC_ARG(ccmp->rx_pn), + ccmp->tx_pn, ccmp->rx_pn, ccmp->dot11RSNAStatsCCMPFormatErrors, ccmp->dot11RSNAStatsCCMPReplays, ccmp->dot11RSNAStatsCCMPDecryptErrors); diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c index 7a1797e6cbec..7056d932057b 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c @@ -520,7 +520,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (!(keyidx & (1 << 5))) { if (net_ratelimit()) { printk(KERN_DEBUG "TKIP: received packet without ExtIV" - " flag from " MAC_FMT "\n", MAC_ARG(hdr->addr2)); + " flag from %pM\n", hdr->addr2); } return -2; } @@ -532,9 +532,9 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) } if (!tkey->key_set) { if (net_ratelimit()) { - printk(KERN_DEBUG "TKIP: received packet from " MAC_FMT + printk(KERN_DEBUG "TKIP: received packet from %pM" " with keyid=%d that does not have a configured" - " key\n", MAC_ARG(hdr->addr2), keyidx); + " key\n", hdr->addr2, keyidx); } return -3; } @@ -547,9 +547,9 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (iv32 < tkey->rx_iv32 || (iv32 == tkey->rx_iv32 && iv16 <= tkey->rx_iv16)) { if (net_ratelimit()) { - printk(KERN_DEBUG "TKIP: replay detected: STA=" MAC_FMT + printk(KERN_DEBUG "TKIP: replay detected: STA=%pM" " previous TSC %08x%04x received TSC " - "%08x%04x\n", MAC_ARG(hdr->addr2), + "%08x%04x\n", hdr->addr2, tkey->rx_iv32, tkey->rx_iv16, iv32, iv16); } tkey->dot11RSNAStatsTKIPReplays++; @@ -582,8 +582,8 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (crypto_blkcipher_decrypt(&desc, &sg, &sg, plen + 4)) { if (net_ratelimit()) { printk(KERN_DEBUG ": TKIP: failed to decrypt " - "received packet from " MAC_FMT "\n", - MAC_ARG(hdr->addr2)); + "received packet from %pM\n", + hdr->addr2); } return -7; } @@ -606,8 +606,9 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) tkey->rx_phase1_done = 0; } if (net_ratelimit()) { - printk(KERN_DEBUG "TKIP: ICV error detected: STA=" - MAC_FMT "\n", MAC_ARG(hdr->addr2)); + printk(KERN_DEBUG + "TKIP: ICV error detected: STA=%pM\n", + hdr->addr2); } tkey->dot11RSNAStatsTKIPICVErrors++; return -5; @@ -816,8 +817,8 @@ static void ieee80211_michael_mic_failure(struct net_device *dev, /* TODO: needed parameters: count, keyid, key type, TSC */ sprintf(buf, "MLME-MICHAELMICFAILURE.indication(keyid=%d %scast addr=" - MAC_FMT ")", keyidx, hdr->addr1[0] & 0x01 ? "broad" : "uni", - MAC_ARG(hdr->addr2)); + "%pM)", keyidx, hdr->addr1[0] & 0x01 ? "broad" : "uni", + hdr->addr2); memset(&wrqu, 0, sizeof(wrqu)); wrqu.data.length = strlen(buf); wireless_send_event(dev, IWEVCUSTOM, &wrqu, buf); @@ -862,8 +863,8 @@ static int ieee80211_michael_mic_verify(struct sk_buff *skb, int keyidx, struct ieee80211_hdr_4addr *hdr; hdr = (struct ieee80211_hdr_4addr *) skb->data; printk(KERN_DEBUG "%s: Michael MIC verification failed for " - "MSDU from " MAC_FMT " keyidx=%d\n", - skb->dev ? skb->dev->name : "N/A", MAC_ARG(hdr->addr2), + "MSDU from %pM keyidx=%d\n", + skb->dev ? skb->dev->name : "N/A", hdr->addr2, keyidx); if (skb->dev) ieee80211_michael_mic_failure(skb->dev, hdr, keyidx); diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c index 06d91715143c..7a500ac37acb 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c @@ -366,8 +366,8 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device* ieee, struct sk_buff *skb, strcmp(crypt->ops->name, "TKIP") == 0) { if (net_ratelimit()) { printk(KERN_DEBUG "%s: TKIP countermeasures: dropped " - "received packet from " MAC_FMT "\n", - ieee->dev->name, MAC_ARG(hdr->addr2)); + "received packet from %pM\n", + ieee->dev->name, hdr->addr2); } return -1; } @@ -378,8 +378,8 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device* ieee, struct sk_buff *skb, atomic_dec(&crypt->refcnt); if (res < 0) { IEEE80211_DEBUG_DROP( - "decryption failed (SA=" MAC_FMT - ") res=%d\n", MAC_ARG(hdr->addr2), res); + "decryption failed (SA=%pM" + ") res=%d\n", hdr->addr2, res); if (res == -2) IEEE80211_DEBUG_DROP("Decryption failed ICV " "mismatch (key %d)\n", @@ -416,8 +416,8 @@ ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device* ieee, struct sk_buff *s atomic_dec(&crypt->refcnt); if (res < 0) { printk(KERN_DEBUG "%s: MSDU decryption/MIC verification failed" - " (SA=" MAC_FMT " keyidx=%d)\n", - ieee->dev->name, MAC_ARG(hdr->addr2), keyidx); + " (SA=%pM keyidx=%d)\n", + ieee->dev->name, hdr->addr2, keyidx); return -1; } @@ -1045,8 +1045,8 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, * frames silently instead of filling system log with * these reports. */ IEEE80211_DEBUG_DROP("Decryption failed (not set)" - " (SA=" MAC_FMT ")\n", - MAC_ARG(hdr->addr2)); + " (SA=%pM)\n", + hdr->addr2); ieee->ieee_stats.rx_discards_undecryptable++; goto rx_dropped; } @@ -1114,8 +1114,8 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, (keyidx = hostap_rx_frame_decrypt(ieee, skb, crypt)) < 0) { printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth " - "from " MAC_FMT "\n", dev->name, - MAC_ARG(hdr->addr2)); + "from %pM\n", dev->name, + hdr->addr2); /* TODO: could inform hostapd about this so that it * could send auth failure report */ goto rx_dropped; @@ -1311,8 +1311,8 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, } else { IEEE80211_DEBUG_DROP( "encryption configured, but RX " - "frame not encrypted (SA=" MAC_FMT ")\n", - MAC_ARG(hdr->addr2)); + "frame not encrypted (SA=%pM)\n", + hdr->addr2); goto rx_dropped; } } @@ -1331,9 +1331,9 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, !ieee80211_is_eapol_frame(ieee, skb, hdrlen)) { IEEE80211_DEBUG_DROP( "dropped unencrypted RX data " - "frame from " MAC_FMT + "frame from %pM" " (drop_unencrypted=1)\n", - MAC_ARG(hdr->addr2)); + hdr->addr2); goto rx_dropped; } /* @@ -2369,11 +2369,11 @@ static inline int ieee80211_network_init( } if (network->mode == 0) { - IEEE80211_DEBUG_SCAN("Filtered out '%s (" MAC_FMT ")' " + IEEE80211_DEBUG_SCAN("Filtered out '%s (%pM)' " "network.\n", escape_essid(network->ssid, network->ssid_len), - MAC_ARG(network->bssid)); + network->bssid); return 1; } @@ -2557,9 +2557,9 @@ static inline void ieee80211_process_probe_response( memset(&network, 0, sizeof(struct ieee80211_network)); IEEE80211_DEBUG_SCAN( - "'%s' (" MAC_FMT "): %c%c%c%c %c%c%c%c-%c%c%c%c %c%c%c%c\n", + "'%s' (%pM): %c%c%c%c %c%c%c%c-%c%c%c%c %c%c%c%c\n", escape_essid(info_element->data, info_element->len), - MAC_ARG(beacon->header.addr3), + beacon->header.addr3, (beacon->capability & (1<<0xf)) ? '1' : '0', (beacon->capability & (1<<0xe)) ? '1' : '0', (beacon->capability & (1<<0xd)) ? '1' : '0', @@ -2578,10 +2578,10 @@ static inline void ieee80211_process_probe_response( (beacon->capability & (1<<0x0)) ? '1' : '0'); if (ieee80211_network_init(ieee, beacon, &network, stats)) { - IEEE80211_DEBUG_SCAN("Dropped '%s' (" MAC_FMT ") via %s.\n", + IEEE80211_DEBUG_SCAN("Dropped '%s' (%pM) via %s.\n", escape_essid(info_element->data, info_element->len), - MAC_ARG(beacon->header.addr3), + beacon->header.addr3, WLAN_FC_GET_STYPE(beacon->header.frame_ctl) == IEEE80211_STYPE_PROBE_RESP ? "PROBE RESPONSE" : "BEACON"); @@ -2692,11 +2692,11 @@ static inline void ieee80211_process_probe_response( /* If there are no more slots, expire the oldest */ list_del(&oldest->list); target = oldest; - IEEE80211_DEBUG_SCAN("Expired '%s' (" MAC_FMT ") from " + IEEE80211_DEBUG_SCAN("Expired '%s' (%pM) from " "network list.\n", escape_essid(target->ssid, target->ssid_len), - MAC_ARG(target->bssid)); + target->bssid); } else { /* Otherwise just pull from the free list */ target = list_entry(ieee->network_free_list.next, @@ -2706,10 +2706,10 @@ static inline void ieee80211_process_probe_response( #ifdef CONFIG_IEEE80211_DEBUG - IEEE80211_DEBUG_SCAN("Adding '%s' (" MAC_FMT ") via %s.\n", + IEEE80211_DEBUG_SCAN("Adding '%s' (%pM) via %s.\n", escape_essid(network.ssid, network.ssid_len), - MAC_ARG(network.bssid), + network.bssid, WLAN_FC_GET_STYPE(beacon->header.frame_ctl) == IEEE80211_STYPE_PROBE_RESP ? "PROBE RESPONSE" : "BEACON"); @@ -2719,10 +2719,10 @@ static inline void ieee80211_process_probe_response( if(ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE) ieee80211_softmac_new_net(ieee,&network); } else { - IEEE80211_DEBUG_SCAN("Updating '%s' (" MAC_FMT ") via %s.\n", + IEEE80211_DEBUG_SCAN("Updating '%s' (%pM) via %s.\n", escape_essid(target->ssid, target->ssid_len), - MAC_ARG(target->bssid), + target->bssid, WLAN_FC_GET_STYPE(beacon->header.frame_ctl) == IEEE80211_STYPE_PROBE_RESP ? "PROBE RESPONSE" : "BEACON"); diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c index 6d1ddec39f0e..9e923e29c455 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c @@ -1897,7 +1897,7 @@ ieee80211_rx_assoc_rq(struct ieee80211_device *ieee, struct sk_buff *skb) ieee80211_resp_to_assoc_rq(ieee, dest); } - printk(KERN_INFO"New client associated: "MAC_FMT"\n", MAC_ARG(dest)); + printk(KERN_INFO"New client associated: %pM\n", dest); //FIXME #if 0 spin_lock_irqsave(&ieee->lock,flags); diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_tx.c index 798fb4154c25..0710d9e30dba 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_tx.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_tx.c @@ -200,8 +200,8 @@ int ieee80211_encrypt_fragment( header = (struct ieee80211_hdr *) frag->data; if (net_ratelimit()) { printk(KERN_DEBUG "%s: TKIP countermeasures: dropped " - "TX packet to " MAC_FMT "\n", - ieee->dev->name, MAC_ARG(header->addr1)); + "TX packet to %pM\n", + ieee->dev->name, header->addr1); } return -1; } diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c index 3441b72dd8fa..efd61bbf06f9 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c @@ -386,10 +386,10 @@ int ieee80211_wx_get_scan(struct ieee80211_device *ieee, else IEEE80211_DEBUG_SCAN( "Not showing network '%s (" - MAC_FMT ")' due to age (%lums).\n", + "%pM)' due to age (%lums).\n", escape_essid(network->ssid, network->ssid_len), - MAC_ARG(network->bssid), + network->bssid, (jiffies - network->last_scanned) / (HZ / 100)); } diff --git a/drivers/staging/rtl8192e/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192e/ieee80211/rtl819x_BAProc.c index e41e8a0c739c..ae0e5b9e2183 100644 --- a/drivers/staging/rtl8192e/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192e/ieee80211/rtl819x_BAProc.c @@ -113,7 +113,7 @@ static struct sk_buff* ieee80211_ADDBA(struct ieee80211_device* ieee, u8* Dst, P u16 tmp = 0; u16 len = ieee->tx_headroom + 9; //category(1) + action field(1) + Dialog Token(1) + BA Parameter Set(2) + BA Timeout Value(2) + BA Start SeqCtrl(2)(or StatusCode(2)) - IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), frame(%d) sentd to:"MAC_FMT", ieee->dev:%p\n", __FUNCTION__, type, MAC_ARG(Dst), ieee->dev); + IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), frame(%d) sentd to:%pM, ieee->dev:%p\n", __FUNCTION__, type, Dst, ieee->dev); if (pBA == NULL||ieee == NULL) { IEEE80211_DEBUG(IEEE80211_DL_ERR, "pBA(%p) is NULL or ieee(%p) is NULL\n", pBA, ieee); @@ -243,7 +243,7 @@ static struct sk_buff* ieee80211_DELBA( u16 len = 6 + ieee->tx_headroom; if (net_ratelimit()) - IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), ReasonCode(%d) sentd to:"MAC_FMT"\n", __FUNCTION__, ReasonCode, MAC_ARG(dst)); + IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), ReasonCode(%d) sentd to:%pM\n", __FUNCTION__, ReasonCode, dst); memset(&DelbaParamSet, 0, 2); @@ -397,7 +397,7 @@ int ieee80211_rx_ADDBAReq( struct ieee80211_device* ieee, struct sk_buff *skb) pBaTimeoutVal = (u16*)(tag + 5); pBaStartSeqCtrl = (PSEQUENCE_CONTROL)(req + 7); - printk("====================>rx ADDBAREQ from :"MAC_FMT"\n", MAC_ARG(dst)); + printk("====================>rx ADDBAREQ from :%pM\n", dst); //some other capability is not ready now. if( (ieee->current_network.qos_data.active == 0) || (ieee->pHTInfo->bCurrentHTSupport == false)) //|| diff --git a/drivers/staging/rtl8192e/ieee80211/rtl819x_TSProc.c b/drivers/staging/rtl8192e/ieee80211/rtl819x_TSProc.c index 2816b60a08a9..e2cbfd3aa00f 100644 --- a/drivers/staging/rtl8192e/ieee80211/rtl819x_TSProc.c +++ b/drivers/staging/rtl8192e/ieee80211/rtl819x_TSProc.c @@ -304,7 +304,7 @@ PTS_COMMON_INFO SearchAdmitTRStream(struct ieee80211_device *ieee, u8* Addr, u8 if(search_dir[dir] ==false ) continue; list_for_each_entry(pRet, psearch_list, List){ - // IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:"MAC_FMT", TID:%d, dir:%d\n", MAC_ARG(pRet->Addr), pRet->TSpec.f.TSInfo.field.ucTSID, pRet->TSpec.f.TSInfo.field.ucDirection); + // IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:%pM, TID:%d, dir:%d\n", pRet->Addr, pRet->TSpec.f.TSInfo.field.ucTSID, pRet->TSpec.f.TSInfo.field.ucDirection); if (memcmp(pRet->Addr, Addr, 6) == 0) if (pRet->TSpec.f.TSInfo.field.ucTSID == TID) if(pRet->TSpec.f.TSInfo.field.ucDirection == dir) @@ -466,7 +466,7 @@ bool GetTs( ResetRxTsEntry(tmp); } - IEEE80211_DEBUG(IEEE80211_DL_TS, "to init current TS, UP:%d, Dir:%d, addr:"MAC_FMT"\n", UP, Dir, MAC_ARG(Addr)); + IEEE80211_DEBUG(IEEE80211_DL_TS, "to init current TS, UP:%d, Dir:%d, addr:%pM\n", UP, Dir, Addr); // Prepare TS Info releated field pTSInfo->field.ucTrafficType = 0; // Traffic type: WMM is reserved in this field pTSInfo->field.ucTSID = UP; // TSID @@ -552,7 +552,7 @@ void RemoveTsEntry( void RemovePeerTS(struct ieee80211_device* ieee, u8* Addr) { PTS_COMMON_INFO pTS, pTmpTS; - printk("===========>RemovePeerTS,"MAC_FMT"\n", MAC_ARG(Addr)); + printk("===========>RemovePeerTS,%pM\n", Addr); #if 1 list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List) { diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c index 0ca5d8b4f746..0f6954863e69 100644 --- a/drivers/staging/rtl8192e/r8192E_core.c +++ b/drivers/staging/rtl8192e/r8192E_core.c @@ -6394,7 +6394,7 @@ void setKey( struct net_device *dev, if (EntryNo >= TOTAL_CAM_ENTRY) RT_TRACE(COMP_ERR, "cam entry exceeds in setKey()\n"); - RT_TRACE(COMP_SEC, "====>to setKey(), dev:%p, EntryNo:%d, KeyIndex:%d, KeyType:%d, MacAddr"MAC_FMT"\n", dev,EntryNo, KeyIndex, KeyType, MAC_ARG(MacAddr)); + RT_TRACE(COMP_SEC, "====>to setKey(), dev:%p, EntryNo:%d, KeyIndex:%d, KeyType:%d, MacAddr%pM\n", dev,EntryNo, KeyIndex, KeyType, MacAddr); if (DefaultKey) usConfig |= BIT15 | (KeyType<<2); diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211.h b/drivers/staging/rtl8192su/ieee80211/ieee80211.h index 9a4c858b0666..159fddf628e2 100644 --- a/drivers/staging/rtl8192su/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192su/ieee80211/ieee80211.h @@ -195,10 +195,6 @@ extern u32 ieee80211_debug_level; #define IEEE80211_DEBUG_DATA(level, data, datalen) do {} while(0) #endif /* CONFIG_IEEE80211_DEBUG */ -#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x" -#define MAC_ARG(x) ((u8 *)(x))[0], ((u8 *)(x))[1], ((u8 *)(x))[2], \ - ((u8 *)(x))[3], ((u8 *)(x))[4], ((u8 *)(x))[5] - /* * To use the debug system; * diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_ccmp.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_ccmp.c index 7bc956e1f458..8a93f7d3eb38 100644 --- a/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_ccmp.c +++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_ccmp.c @@ -288,7 +288,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (!(keyidx & (1 << 5))) { if (net_ratelimit()) { printk(KERN_DEBUG "CCMP: received packet without ExtIV" - " flag from " MAC_FMT "\n", MAC_ARG(hdr->addr2)); + " flag from %pM\n", hdr->addr2); } key->dot11RSNAStatsCCMPFormatErrors++; return -2; @@ -301,9 +301,9 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) } if (!key->key_set) { if (net_ratelimit()) { - printk(KERN_DEBUG "CCMP: received packet from " MAC_FMT + printk(KERN_DEBUG "CCMP: received packet from %pM" " with keyid=%d that does not have a configured" - " key\n", MAC_ARG(hdr->addr2), keyidx); + " key\n", hdr->addr2, keyidx); } return -3; } @@ -318,11 +318,9 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (memcmp(pn, key->rx_pn, CCMP_PN_LEN) <= 0) { if (net_ratelimit()) { - printk(KERN_DEBUG "CCMP: replay detected: STA=" MAC_FMT - " previous PN %02x%02x%02x%02x%02x%02x " - "received PN %02x%02x%02x%02x%02x%02x\n", - MAC_ARG(hdr->addr2), MAC_ARG(key->rx_pn), - MAC_ARG(pn)); + printk(KERN_DEBUG "CCMP: replay detected: STA=%pM" + " previous PN %pm received PN %pm\n", + hdr->addr2, key->rx_pn, pn); } key->dot11RSNAStatsCCMPReplays++; return -4; @@ -359,7 +357,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (memcmp(mic, a, CCMP_MIC_LEN) != 0) { if (net_ratelimit()) { printk(KERN_DEBUG "CCMP: decrypt failed: STA=" - MAC_FMT "\n", MAC_ARG(hdr->addr2)); + "%pM\n", hdr->addr2); } key->dot11RSNAStatsCCMPDecryptErrors++; return -5; @@ -435,11 +433,10 @@ static char * ieee80211_ccmp_print_stats(char *p, void *priv) { struct ieee80211_ccmp_data *ccmp = priv; p += sprintf(p, "key[%d] alg=CCMP key_set=%d " - "tx_pn=%02x%02x%02x%02x%02x%02x " - "rx_pn=%02x%02x%02x%02x%02x%02x " + "tx_pn=%pm rx_pn=%pm " "format_errors=%d replays=%d decrypt_errors=%d\n", ccmp->key_idx, ccmp->key_set, - MAC_ARG(ccmp->tx_pn), MAC_ARG(ccmp->rx_pn), + ccmp->tx_pn, ccmp->rx_pn, ccmp->dot11RSNAStatsCCMPFormatErrors, ccmp->dot11RSNAStatsCCMPReplays, ccmp->dot11RSNAStatsCCMPDecryptErrors); diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_tkip.c index 9b9438fb5f60..7e48748da102 100644 --- a/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_tkip.c +++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt_tkip.c @@ -410,7 +410,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (!(keyidx & (1 << 5))) { if (net_ratelimit()) { printk(KERN_DEBUG "TKIP: received packet without ExtIV" - " flag from " MAC_FMT "\n", MAC_ARG(hdr->addr2)); + " flag from %pM\n", hdr->addr2); } return -2; } @@ -422,9 +422,9 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) } if (!tkey->key_set) { if (net_ratelimit()) { - printk(KERN_DEBUG "TKIP: received packet from " MAC_FMT + printk(KERN_DEBUG "TKIP: received packet from %pM" " with keyid=%d that does not have a configured" - " key\n", MAC_ARG(hdr->addr2), keyidx); + " key\n", hdr->addr2, keyidx); } return -3; } @@ -437,9 +437,9 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (iv32 < tkey->rx_iv32 || (iv32 == tkey->rx_iv32 && iv16 <= tkey->rx_iv16)) { if (net_ratelimit()) { - printk(KERN_DEBUG "TKIP: replay detected: STA=" MAC_FMT + printk(KERN_DEBUG "TKIP: replay detected: STA=%pM" " previous TSC %08x%04x received TSC " - "%08x%04x\n", MAC_ARG(hdr->addr2), + "%08x%04x\n", hdr->addr2, tkey->rx_iv32, tkey->rx_iv16, iv32, iv16); } tkey->dot11RSNAStatsTKIPReplays++; @@ -460,8 +460,8 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (crypto_blkcipher_decrypt(&desc, &sg, &sg, plen + 4)) { if (net_ratelimit()) { printk(KERN_DEBUG ": TKIP: failed to decrypt " - "received packet from " MAC_FMT "\n", - MAC_ARG(hdr->addr2)); + "received packet from %pM\n", + hdr->addr2); } return -7; } @@ -480,7 +480,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) } if (net_ratelimit()) { printk(KERN_DEBUG "TKIP: ICV error detected: STA=" - MAC_FMT "\n", MAC_ARG(hdr->addr2)); + "%pM\n", hdr->addr2); } tkey->dot11RSNAStatsTKIPICVErrors++; return -5; @@ -635,8 +635,8 @@ static int ieee80211_michael_mic_verify(struct sk_buff *skb, int keyidx, struct ieee80211_hdr_4addr *hdr; hdr = (struct ieee80211_hdr_4addr *) skb->data; printk(KERN_DEBUG "%s: Michael MIC verification failed for " - "MSDU from " MAC_FMT " keyidx=%d\n", - skb->dev ? skb->dev->name : "N/A", MAC_ARG(hdr->addr2), + "MSDU from %pM keyidx=%d\n", + skb->dev ? skb->dev->name : "N/A", hdr->addr2, keyidx); if (skb->dev) ieee80211_michael_mic_failure(skb->dev, hdr, keyidx); diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c index fecfa120ff48..67b99ad88475 100644 --- a/drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c +++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c @@ -314,8 +314,8 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device* ieee, struct sk_buff *skb, strcmp(crypt->ops->name, "TKIP") == 0) { if (net_ratelimit()) { printk(KERN_DEBUG "%s: TKIP countermeasures: dropped " - "received packet from " MAC_FMT "\n", - ieee->dev->name, MAC_ARG(hdr->addr2)); + "received packet from %pM\n", + ieee->dev->name, hdr->addr2); } return -1; } @@ -326,8 +326,8 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device* ieee, struct sk_buff *skb, atomic_dec(&crypt->refcnt); if (res < 0) { IEEE80211_DEBUG_DROP( - "decryption failed (SA=" MAC_FMT - ") res=%d\n", MAC_ARG(hdr->addr2), res); + "decryption failed (SA=%pM" + ") res=%d\n", hdr->addr2, res); if (res == -2) IEEE80211_DEBUG_DROP("Decryption failed ICV " "mismatch (key %d)\n", @@ -364,8 +364,8 @@ ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device* ieee, struct sk_buff *s atomic_dec(&crypt->refcnt); if (res < 0) { printk(KERN_DEBUG "%s: MSDU decryption/MIC verification failed" - " (SA=" MAC_FMT " keyidx=%d)\n", - ieee->dev->name, MAC_ARG(hdr->addr2), keyidx); + " (SA=%pM keyidx=%d)\n", + ieee->dev->name, hdr->addr2, keyidx); return -1; } @@ -939,8 +939,8 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, * frames silently instead of filling system log with * these reports. */ IEEE80211_DEBUG_DROP("Decryption failed (not set)" - " (SA=" MAC_FMT ")\n", - MAC_ARG(hdr->addr2)); + " (SA=%pM)\n", + hdr->addr2); ieee->ieee_stats.rx_discards_undecryptable++; goto rx_dropped; } @@ -1143,8 +1143,8 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, } else { IEEE80211_DEBUG_DROP( "encryption configured, but RX " - "frame not encrypted (SA=" MAC_FMT ")\n", - MAC_ARG(hdr->addr2)); + "frame not encrypted (SA=%pM)\n", + hdr->addr2); goto rx_dropped; } } @@ -1163,9 +1163,9 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, !ieee80211_is_eapol_frame(ieee, skb, hdrlen)) { IEEE80211_DEBUG_DROP( "dropped unencrypted RX data " - "frame from " MAC_FMT + "frame from %pM" " (drop_unencrypted=1)\n", - MAC_ARG(hdr->addr2)); + hdr->addr2); goto rx_dropped; } /* @@ -2159,11 +2159,11 @@ static inline int ieee80211_network_init( } if (network->mode == 0) { - IEEE80211_DEBUG_SCAN("Filtered out '%s (" MAC_FMT ")' " + IEEE80211_DEBUG_SCAN("Filtered out '%s (%pM)' " "network.\n", escape_essid(network->ssid, network->ssid_len), - MAC_ARG(network->bssid)); + network->bssid); return 1; } @@ -2345,9 +2345,9 @@ static inline void ieee80211_process_probe_response( memset(&network, 0, sizeof(struct ieee80211_network)); IEEE80211_DEBUG_SCAN( - "'%s' (" MAC_FMT "): %c%c%c%c %c%c%c%c-%c%c%c%c %c%c%c%c\n", + "'%s' (%pM): %c%c%c%c %c%c%c%c-%c%c%c%c %c%c%c%c\n", escape_essid(info_element->data, info_element->len), - MAC_ARG(beacon->header.addr3), + beacon->header.addr3, (beacon->capability & (1<<0xf)) ? '1' : '0', (beacon->capability & (1<<0xe)) ? '1' : '0', (beacon->capability & (1<<0xd)) ? '1' : '0', @@ -2366,10 +2366,10 @@ static inline void ieee80211_process_probe_response( (beacon->capability & (1<<0x0)) ? '1' : '0'); if (ieee80211_network_init(ieee, beacon, &network, stats)) { - IEEE80211_DEBUG_SCAN("Dropped '%s' (" MAC_FMT ") via %s.\n", + IEEE80211_DEBUG_SCAN("Dropped '%s' (%pM) via %s.\n", escape_essid(info_element->data, info_element->len), - MAC_ARG(beacon->header.addr3), + beacon->header.addr3, WLAN_FC_GET_STYPE(beacon->header.frame_ctl) == IEEE80211_STYPE_PROBE_RESP ? "PROBE RESPONSE" : "BEACON"); @@ -2478,11 +2478,11 @@ static inline void ieee80211_process_probe_response( /* If there are no more slots, expire the oldest */ list_del(&oldest->list); target = oldest; - IEEE80211_DEBUG_SCAN("Expired '%s' (" MAC_FMT ") from " + IEEE80211_DEBUG_SCAN("Expired '%s' (%pM) from " "network list.\n", escape_essid(target->ssid, target->ssid_len), - MAC_ARG(target->bssid)); + target->bssid); } else { /* Otherwise just pull from the free list */ target = list_entry(ieee->network_free_list.next, @@ -2492,10 +2492,10 @@ static inline void ieee80211_process_probe_response( #ifdef CONFIG_IEEE80211_DEBUG - IEEE80211_DEBUG_SCAN("Adding '%s' (" MAC_FMT ") via %s.\n", + IEEE80211_DEBUG_SCAN("Adding '%s' (%pM) via %s.\n", escape_essid(network.ssid, network.ssid_len), - MAC_ARG(network.bssid), + network.bssid, WLAN_FC_GET_STYPE(beacon->header.frame_ctl) == IEEE80211_STYPE_PROBE_RESP ? "PROBE RESPONSE" : "BEACON"); @@ -2505,10 +2505,10 @@ static inline void ieee80211_process_probe_response( if(ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE) ieee80211_softmac_new_net(ieee,&network); } else { - IEEE80211_DEBUG_SCAN("Updating '%s' (" MAC_FMT ") via %s.\n", + IEEE80211_DEBUG_SCAN("Updating '%s' (%pM) via %s.\n", escape_essid(target->ssid, target->ssid_len), - MAC_ARG(target->bssid), + target->bssid, WLAN_FC_GET_STYPE(beacon->header.frame_ctl) == IEEE80211_STYPE_PROBE_RESP ? "PROBE RESPONSE" : "BEACON"); diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c index 95d4f84dcf3f..e46f3bc6a21a 100644 --- a/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c @@ -1709,7 +1709,7 @@ ieee80211_rx_assoc_rq(struct ieee80211_device *ieee, struct sk_buff *skb) ieee80211_resp_to_assoc_rq(ieee, dest); } - printk(KERN_INFO"New client associated: "MAC_FMT"\n", MAC_ARG(dest)); + printk(KERN_INFO"New client associated: %pM\n", dest); //FIXME } diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_tx.c index 4d54e1e62d22..484c3aba5cb3 100644 --- a/drivers/staging/rtl8192su/ieee80211/ieee80211_tx.c +++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_tx.c @@ -199,8 +199,8 @@ int ieee80211_encrypt_fragment( header = (struct rtl_ieee80211_hdr *)frag->data; if (net_ratelimit()) { printk(KERN_DEBUG "%s: TKIP countermeasures: dropped " - "TX packet to " MAC_FMT "\n", - ieee->dev->name, MAC_ARG(header->addr1)); + "TX packet to %pM\n", + ieee->dev->name, header->addr1); } return -1; } diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c index 85c7e96b622d..0f21ccbdeddd 100644 --- a/drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c +++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c @@ -261,10 +261,10 @@ int ieee80211_wx_get_scan(struct ieee80211_device *ieee, else IEEE80211_DEBUG_SCAN( "Not showing network '%s (" - MAC_FMT ")' due to age (%lums).\n", + "%pM)' due to age (%lums).\n", escape_essid(network->ssid, network->ssid_len), - MAC_ARG(network->bssid), + network->bssid, (jiffies - network->last_scanned) / (HZ / 100)); } diff --git a/drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c index 8d12ffca18fa..6eb1096866af 100644 --- a/drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c @@ -113,7 +113,7 @@ static struct sk_buff* ieee80211_ADDBA(struct ieee80211_device* ieee, u8* Dst, P u16 tmp = 0; u16 len = ieee->tx_headroom + 9; //category(1) + action field(1) + Dialog Token(1) + BA Parameter Set(2) + BA Timeout Value(2) + BA Start SeqCtrl(2)(or StatusCode(2)) - IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), frame(%d) sentd to:"MAC_FMT", ieee->dev:%p\n", __FUNCTION__, type, MAC_ARG(Dst), ieee->dev); + IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), frame(%d) sentd to:%pM, ieee->dev:%p\n", __FUNCTION__, type, Dst, ieee->dev); if (pBA == NULL||ieee == NULL) { IEEE80211_DEBUG(IEEE80211_DL_ERR, "pBA(%p) is NULL or ieee(%p) is NULL\n", pBA, ieee); @@ -200,7 +200,7 @@ static struct sk_buff* ieee80211_DELBA( u16 len = 6 + ieee->tx_headroom; if (net_ratelimit()) - IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), ReasonCode(%d) sentd to:"MAC_FMT"\n", __FUNCTION__, ReasonCode, MAC_ARG(dst)); + IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), ReasonCode(%d) sentd to:%pM\n", __FUNCTION__, ReasonCode, dst); memset(&DelbaParamSet, 0, 2); @@ -354,7 +354,7 @@ int ieee80211_rx_ADDBAReq( struct ieee80211_device* ieee, struct sk_buff *skb) pBaTimeoutVal = (u16*)(tag + 5); pBaStartSeqCtrl = (PSEQUENCE_CONTROL)(req + 7); - printk("====================>rx ADDBAREQ from :"MAC_FMT"\n", MAC_ARG(dst)); + printk("====================>rx ADDBAREQ from :%pM\n", dst); //some other capability is not ready now. if( (ieee->current_network.qos_data.active == 0) || (ieee->pHTInfo->bCurrentHTSupport == false) || diff --git a/drivers/staging/rtl8192su/ieee80211/rtl819x_TSProc.c b/drivers/staging/rtl8192su/ieee80211/rtl819x_TSProc.c index ad3bf35d80e6..60cf1f8781ce 100644 --- a/drivers/staging/rtl8192su/ieee80211/rtl819x_TSProc.c +++ b/drivers/staging/rtl8192su/ieee80211/rtl819x_TSProc.c @@ -291,7 +291,7 @@ PTS_COMMON_INFO SearchAdmitTRStream(struct ieee80211_device *ieee, u8* Addr, u8 if(search_dir[dir] ==false ) continue; list_for_each_entry(pRet, psearch_list, List){ - // IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:"MAC_FMT", TID:%d, dir:%d\n", MAC_ARG(pRet->Addr), pRet->TSpec.f.TSInfo.field.ucTSID, pRet->TSpec.f.TSInfo.field.ucDirection); + // IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:%pM, TID:%d, dir:%d\n", pRet->Addr, pRet->TSpec.f.TSInfo.field.ucTSID, pRet->TSpec.f.TSInfo.field.ucDirection); if (memcmp(pRet->Addr, Addr, 6) == 0) if (pRet->TSpec.f.TSInfo.field.ucTSID == TID) if(pRet->TSpec.f.TSInfo.field.ucDirection == dir) @@ -447,7 +447,7 @@ bool GetTs( ResetRxTsEntry(tmp); } - IEEE80211_DEBUG(IEEE80211_DL_TS, "to init current TS, UP:%d, Dir:%d, addr:"MAC_FMT"\n", UP, Dir, MAC_ARG(Addr)); + IEEE80211_DEBUG(IEEE80211_DL_TS, "to init current TS, UP:%d, Dir:%d, addr:%pM\n", UP, Dir, Addr); // Prepare TS Info releated field pTSInfo->field.ucTrafficType = 0; // Traffic type: WMM is reserved in this field pTSInfo->field.ucTSID = UP; // TSID @@ -533,7 +533,7 @@ void RemoveTsEntry( void RemovePeerTS(struct ieee80211_device* ieee, u8* Addr) { PTS_COMMON_INFO pTS, pTmpTS; - printk("===========>RemovePeerTS,"MAC_FMT"\n", MAC_ARG(Addr)); + printk("===========>RemovePeerTS,%pM\n", Addr); #if 1 list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List) { diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c index ccb9d5b8cd44..7fa02ac8e500 100644 --- a/drivers/staging/rtl8192su/r8192U_core.c +++ b/drivers/staging/rtl8192su/r8192U_core.c @@ -7677,7 +7677,7 @@ void setKey( struct net_device *dev, if (EntryNo >= TOTAL_CAM_ENTRY) RT_TRACE(COMP_ERR, "cam entry exceeds in setKey()\n"); - RT_TRACE(COMP_SEC, "====>to setKey(), dev:%p, EntryNo:%d, KeyIndex:%d, KeyType:%d, MacAddr"MAC_FMT"\n", dev,EntryNo, KeyIndex, KeyType, MAC_ARG(MacAddr)); + RT_TRACE(COMP_SEC, "====>to setKey(), dev:%p, EntryNo:%d, KeyIndex:%d, KeyType:%d, MacAddr%pM\n", dev,EntryNo, KeyIndex, KeyType, MacAddr); if (DefaultKey) usConfig |= BIT15 | (KeyType<<2); diff --git a/drivers/staging/rtl8192su/r8192U_dm.c b/drivers/staging/rtl8192su/r8192U_dm.c index 7891e9640272..fa5e24416dde 100644 --- a/drivers/staging/rtl8192su/r8192U_dm.c +++ b/drivers/staging/rtl8192su/r8192U_dm.c @@ -2697,7 +2697,7 @@ static void dm_check_edca_turbo( u8* peername[11] = {"unknown", "realtek", "realtek_92se", "broadcom", "ralink", "atheros", "cisco", "marvell", "92u_softap", "self_softap"}; static int wb_tmp = 0; if (wb_tmp == 0){ - printk("%s():iot peer is %#x:%s, bssid:"MAC_FMT"\n",__FUNCTION__,pHTInfo->IOTPeer,peername[pHTInfo->IOTPeer], MAC_ARG(priv->ieee80211->current_network.bssid)); + printk("%s():iot peer is %#x:%s, bssid:%pM\n",__FUNCTION__,pHTInfo->IOTPeer,peername[pHTInfo->IOTPeer], priv->ieee80211->current_network.bssid); wb_tmp = 1; } } diff --git a/drivers/staging/rtl8192u/ieee80211.h b/drivers/staging/rtl8192u/ieee80211.h index 3a47f1213e85..9d05ed6791ee 100644 --- a/drivers/staging/rtl8192u/ieee80211.h +++ b/drivers/staging/rtl8192u/ieee80211.h @@ -551,9 +551,6 @@ do { if (ieee80211_debug_level & (level)) \ /* debug macros not dependent on CONFIG_IEEE80211_DEBUG */ -#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x" -#define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5] - /* * To use the debug system; * diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h index 10908e123b86..3cda38bb6b77 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h @@ -551,9 +551,6 @@ do { if (ieee80211_debug_level & (level)) \ /* debug macros not dependent on CONFIG_IEEE80211_DEBUG */ -#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x" -#define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5] - /* * To use the debug system; * diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c index 0b33bf463320..0b57632bcff9 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c @@ -288,7 +288,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (!(keyidx & (1 << 5))) { if (net_ratelimit()) { printk(KERN_DEBUG "CCMP: received packet without ExtIV" - " flag from " MAC_FMT "\n", MAC_ARG(hdr->addr2)); + " flag from %pM\n", hdr->addr2); } key->dot11RSNAStatsCCMPFormatErrors++; return -2; @@ -301,9 +301,9 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) } if (!key->key_set) { if (net_ratelimit()) { - printk(KERN_DEBUG "CCMP: received packet from " MAC_FMT + printk(KERN_DEBUG "CCMP: received packet from %pM" " with keyid=%d that does not have a configured" - " key\n", MAC_ARG(hdr->addr2), keyidx); + " key\n", hdr->addr2, keyidx); } return -3; } @@ -318,11 +318,9 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (memcmp(pn, key->rx_pn, CCMP_PN_LEN) <= 0) { if (net_ratelimit()) { - printk(KERN_DEBUG "CCMP: replay detected: STA=" MAC_FMT - " previous PN %02x%02x%02x%02x%02x%02x " - "received PN %02x%02x%02x%02x%02x%02x\n", - MAC_ARG(hdr->addr2), MAC_ARG(key->rx_pn), - MAC_ARG(pn)); + printk(KERN_DEBUG "CCMP: replay detected: STA=%pM" + " previous PN %pm received PN %pm\n", + hdr->addr2, key->rx_pn, pn); } key->dot11RSNAStatsCCMPReplays++; return -4; @@ -359,7 +357,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (memcmp(mic, a, CCMP_MIC_LEN) != 0) { if (net_ratelimit()) { printk(KERN_DEBUG "CCMP: decrypt failed: STA=" - MAC_FMT "\n", MAC_ARG(hdr->addr2)); + "%pM\n", hdr->addr2); } key->dot11RSNAStatsCCMPDecryptErrors++; return -5; @@ -435,11 +433,10 @@ static char * ieee80211_ccmp_print_stats(char *p, void *priv) { struct ieee80211_ccmp_data *ccmp = priv; p += sprintf(p, "key[%d] alg=CCMP key_set=%d " - "tx_pn=%02x%02x%02x%02x%02x%02x " - "rx_pn=%02x%02x%02x%02x%02x%02x " + "tx_pn=%pm rx_pn=%pm " "format_errors=%d replays=%d decrypt_errors=%d\n", ccmp->key_idx, ccmp->key_set, - MAC_ARG(ccmp->tx_pn), MAC_ARG(ccmp->rx_pn), + ccmp->tx_pn, ccmp->rx_pn, ccmp->dot11RSNAStatsCCMPFormatErrors, ccmp->dot11RSNAStatsCCMPReplays, ccmp->dot11RSNAStatsCCMPDecryptErrors); diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c index 841b99955b79..9510507d8d05 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c @@ -410,7 +410,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (!(keyidx & (1 << 5))) { if (net_ratelimit()) { printk(KERN_DEBUG "TKIP: received packet without ExtIV" - " flag from " MAC_FMT "\n", MAC_ARG(hdr->addr2)); + " flag from %pM\n", hdr->addr2); } return -2; } @@ -422,9 +422,9 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) } if (!tkey->key_set) { if (net_ratelimit()) { - printk(KERN_DEBUG "TKIP: received packet from " MAC_FMT + printk(KERN_DEBUG "TKIP: received packet from %pM" " with keyid=%d that does not have a configured" - " key\n", MAC_ARG(hdr->addr2), keyidx); + " key\n", hdr->addr2, keyidx); } return -3; } @@ -437,9 +437,9 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (iv32 < tkey->rx_iv32 || (iv32 == tkey->rx_iv32 && iv16 <= tkey->rx_iv16)) { if (net_ratelimit()) { - printk(KERN_DEBUG "TKIP: replay detected: STA=" MAC_FMT + printk(KERN_DEBUG "TKIP: replay detected: STA=%pM" " previous TSC %08x%04x received TSC " - "%08x%04x\n", MAC_ARG(hdr->addr2), + "%08x%04x\n", hdr->addr2, tkey->rx_iv32, tkey->rx_iv16, iv32, iv16); } tkey->dot11RSNAStatsTKIPReplays++; @@ -460,8 +460,8 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (crypto_blkcipher_decrypt(&desc, &sg, &sg, plen + 4)) { if (net_ratelimit()) { printk(KERN_DEBUG ": TKIP: failed to decrypt " - "received packet from " MAC_FMT "\n", - MAC_ARG(hdr->addr2)); + "received packet from %pM\n", + hdr->addr2); } return -7; } @@ -480,7 +480,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) } if (net_ratelimit()) { printk(KERN_DEBUG "TKIP: ICV error detected: STA=" - MAC_FMT "\n", MAC_ARG(hdr->addr2)); + "%pM\n", hdr->addr2); } tkey->dot11RSNAStatsTKIPICVErrors++; return -5; @@ -635,8 +635,8 @@ static int ieee80211_michael_mic_verify(struct sk_buff *skb, int keyidx, struct ieee80211_hdr_4addr *hdr; hdr = (struct ieee80211_hdr_4addr *) skb->data; printk(KERN_DEBUG "%s: Michael MIC verification failed for " - "MSDU from " MAC_FMT " keyidx=%d\n", - skb->dev ? skb->dev->name : "N/A", MAC_ARG(hdr->addr2), + "MSDU from %pM keyidx=%d\n", + skb->dev ? skb->dev->name : "N/A", hdr->addr2, keyidx); if (skb->dev) ieee80211_michael_mic_failure(skb->dev, hdr, keyidx); diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c index 0e003c5bb000..7e9b367594a0 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c @@ -360,8 +360,8 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device* ieee, struct sk_buff *skb, strcmp(crypt->ops->name, "TKIP") == 0) { if (net_ratelimit()) { printk(KERN_DEBUG "%s: TKIP countermeasures: dropped " - "received packet from " MAC_FMT "\n", - ieee->dev->name, MAC_ARG(hdr->addr2)); + "received packet from %pM\n", + ieee->dev->name, hdr->addr2); } return -1; } @@ -372,8 +372,8 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device* ieee, struct sk_buff *skb, atomic_dec(&crypt->refcnt); if (res < 0) { IEEE80211_DEBUG_DROP( - "decryption failed (SA=" MAC_FMT - ") res=%d\n", MAC_ARG(hdr->addr2), res); + "decryption failed (SA=%pM" + ") res=%d\n", hdr->addr2, res); if (res == -2) IEEE80211_DEBUG_DROP("Decryption failed ICV " "mismatch (key %d)\n", @@ -410,8 +410,8 @@ ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device* ieee, struct sk_buff *s atomic_dec(&crypt->refcnt); if (res < 0) { printk(KERN_DEBUG "%s: MSDU decryption/MIC verification failed" - " (SA=" MAC_FMT " keyidx=%d)\n", - ieee->dev->name, MAC_ARG(hdr->addr2), keyidx); + " (SA=%pM keyidx=%d)\n", + ieee->dev->name, hdr->addr2, keyidx); return -1; } @@ -1016,8 +1016,8 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, * frames silently instead of filling system log with * these reports. */ IEEE80211_DEBUG_DROP("Decryption failed (not set)" - " (SA=" MAC_FMT ")\n", - MAC_ARG(hdr->addr2)); + " (SA=%pM)\n", + hdr->addr2); ieee->ieee_stats.rx_discards_undecryptable++; goto rx_dropped; } @@ -1256,8 +1256,8 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, } else { IEEE80211_DEBUG_DROP( "encryption configured, but RX " - "frame not encrypted (SA=" MAC_FMT ")\n", - MAC_ARG(hdr->addr2)); + "frame not encrypted (SA=%pM)\n", + hdr->addr2); goto rx_dropped; } } @@ -1276,9 +1276,9 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, !ieee80211_is_eapol_frame(ieee, skb, hdrlen)) { IEEE80211_DEBUG_DROP( "dropped unencrypted RX data " - "frame from " MAC_FMT + "frame from %pM" " (drop_unencrypted=1)\n", - MAC_ARG(hdr->addr2)); + hdr->addr2); goto rx_dropped; } /* @@ -2260,11 +2260,11 @@ static inline int ieee80211_network_init( } if (network->mode == 0) { - IEEE80211_DEBUG_SCAN("Filtered out '%s (" MAC_FMT ")' " + IEEE80211_DEBUG_SCAN("Filtered out '%s (%pM)' " "network.\n", escape_essid(network->ssid, network->ssid_len), - MAC_ARG(network->bssid)); + network->bssid); return 1; } @@ -2439,9 +2439,9 @@ static inline void ieee80211_process_probe_response( memset(&network, 0, sizeof(struct ieee80211_network)); IEEE80211_DEBUG_SCAN( - "'%s' (" MAC_FMT "): %c%c%c%c %c%c%c%c-%c%c%c%c %c%c%c%c\n", + "'%s' (%pM): %c%c%c%c %c%c%c%c-%c%c%c%c %c%c%c%c\n", escape_essid(info_element->data, info_element->len), - MAC_ARG(beacon->header.addr3), + beacon->header.addr3, (beacon->capability & (1<<0xf)) ? '1' : '0', (beacon->capability & (1<<0xe)) ? '1' : '0', (beacon->capability & (1<<0xd)) ? '1' : '0', @@ -2460,10 +2460,10 @@ static inline void ieee80211_process_probe_response( (beacon->capability & (1<<0x0)) ? '1' : '0'); if (ieee80211_network_init(ieee, beacon, &network, stats)) { - IEEE80211_DEBUG_SCAN("Dropped '%s' (" MAC_FMT ") via %s.\n", + IEEE80211_DEBUG_SCAN("Dropped '%s' (%pM) via %s.\n", escape_essid(info_element->data, info_element->len), - MAC_ARG(beacon->header.addr3), + beacon->header.addr3, WLAN_FC_GET_STYPE(beacon->header.frame_ctl) == IEEE80211_STYPE_PROBE_RESP ? "PROBE RESPONSE" : "BEACON"); @@ -2574,11 +2574,11 @@ static inline void ieee80211_process_probe_response( /* If there are no more slots, expire the oldest */ list_del(&oldest->list); target = oldest; - IEEE80211_DEBUG_SCAN("Expired '%s' (" MAC_FMT ") from " + IEEE80211_DEBUG_SCAN("Expired '%s' (%pM) from " "network list.\n", escape_essid(target->ssid, target->ssid_len), - MAC_ARG(target->bssid)); + target->bssid); } else { /* Otherwise just pull from the free list */ target = list_entry(ieee->network_free_list.next, @@ -2588,10 +2588,10 @@ static inline void ieee80211_process_probe_response( #ifdef CONFIG_IEEE80211_DEBUG - IEEE80211_DEBUG_SCAN("Adding '%s' (" MAC_FMT ") via %s.\n", + IEEE80211_DEBUG_SCAN("Adding '%s' (%pM) via %s.\n", escape_essid(network.ssid, network.ssid_len), - MAC_ARG(network.bssid), + network.bssid, WLAN_FC_GET_STYPE(beacon->header.frame_ctl) == IEEE80211_STYPE_PROBE_RESP ? "PROBE RESPONSE" : "BEACON"); @@ -2601,10 +2601,10 @@ static inline void ieee80211_process_probe_response( if(ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE) ieee80211_softmac_new_net(ieee,&network); } else { - IEEE80211_DEBUG_SCAN("Updating '%s' (" MAC_FMT ") via %s.\n", + IEEE80211_DEBUG_SCAN("Updating '%s' (%pM) via %s.\n", escape_essid(target->ssid, target->ssid_len), - MAC_ARG(target->bssid), + target->bssid, WLAN_FC_GET_STYPE(beacon->header.frame_ctl) == IEEE80211_STYPE_PROBE_RESP ? "PROBE RESPONSE" : "BEACON"); diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c index 8a86e93465c8..27d925712cdd 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c @@ -1731,7 +1731,7 @@ ieee80211_rx_assoc_rq(struct ieee80211_device *ieee, struct sk_buff *skb) ieee80211_resp_to_assoc_rq(ieee, dest); } - printk(KERN_INFO"New client associated: "MAC_FMT"\n", MAC_ARG(dest)); + printk(KERN_INFO"New client associated: %pM\n", dest); //FIXME } diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c index b29c36bac377..48537d948945 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c @@ -200,8 +200,8 @@ int ieee80211_encrypt_fragment( header = (struct ieee80211_hdr *) frag->data; if (net_ratelimit()) { printk(KERN_DEBUG "%s: TKIP countermeasures: dropped " - "TX packet to " MAC_FMT "\n", - ieee->dev->name, MAC_ARG(header->addr1)); + "TX packet to %pM\n", + ieee->dev->name, header->addr1); } return -1; } diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c index 5f12d62658c9..da2449d290cb 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c @@ -289,10 +289,10 @@ int ieee80211_wx_get_scan(struct ieee80211_device *ieee, else IEEE80211_DEBUG_SCAN( "Not showing network '%s (" - MAC_FMT ")' due to age (%lums).\n", + "%pM)' due to age (%lums).\n", escape_essid(network->ssid, network->ssid_len), - MAC_ARG(network->bssid), + network->bssid, (jiffies - network->last_scanned) / (HZ / 100)); } diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c index 512a57aebde3..27d083a70eb2 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c @@ -113,7 +113,7 @@ static struct sk_buff* ieee80211_ADDBA(struct ieee80211_device* ieee, u8* Dst, P u16 tmp = 0; u16 len = ieee->tx_headroom + 9; //category(1) + action field(1) + Dialog Token(1) + BA Parameter Set(2) + BA Timeout Value(2) + BA Start SeqCtrl(2)(or StatusCode(2)) - IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), frame(%d) sentd to:"MAC_FMT", ieee->dev:%p\n", __FUNCTION__, type, MAC_ARG(Dst), ieee->dev); + IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), frame(%d) sentd to:%pM, ieee->dev:%p\n", __FUNCTION__, type, Dst, ieee->dev); if (pBA == NULL||ieee == NULL) { IEEE80211_DEBUG(IEEE80211_DL_ERR, "pBA(%p) is NULL or ieee(%p) is NULL\n", pBA, ieee); @@ -201,7 +201,7 @@ static struct sk_buff* ieee80211_DELBA( u16 len = 6 + ieee->tx_headroom; if (net_ratelimit()) - IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), ReasonCode(%d) sentd to:"MAC_FMT"\n", __FUNCTION__, ReasonCode, MAC_ARG(dst)); + IEEE80211_DEBUG(IEEE80211_DL_TRACE | IEEE80211_DL_BA, "========>%s(), ReasonCode(%d) sentd to:%pM\n", __FUNCTION__, ReasonCode, dst); memset(&DelbaParamSet, 0, 2); @@ -355,7 +355,7 @@ int ieee80211_rx_ADDBAReq( struct ieee80211_device* ieee, struct sk_buff *skb) pBaTimeoutVal = (u16*)(tag + 5); pBaStartSeqCtrl = (PSEQUENCE_CONTROL)(req + 7); - printk("====================>rx ADDBAREQ from :"MAC_FMT"\n", MAC_ARG(dst)); + printk("====================>rx ADDBAREQ from :%pM\n", dst); //some other capability is not ready now. if( (ieee->current_network.qos_data.active == 0) || (ieee->pHTInfo->bCurrentHTSupport == false)) //|| diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c index 5373d565af24..d1275e887f0c 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c @@ -290,7 +290,7 @@ PTS_COMMON_INFO SearchAdmitTRStream(struct ieee80211_device *ieee, u8* Addr, u8 if(search_dir[dir] ==false ) continue; list_for_each_entry(pRet, psearch_list, List){ - // IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:"MAC_FMT", TID:%d, dir:%d\n", MAC_ARG(pRet->Addr), pRet->TSpec.f.TSInfo.field.ucTSID, pRet->TSpec.f.TSInfo.field.ucDirection); + // IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:%pM, TID:%d, dir:%d\n", pRet->Addr, pRet->TSpec.f.TSInfo.field.ucTSID, pRet->TSpec.f.TSInfo.field.ucDirection); if (memcmp(pRet->Addr, Addr, 6) == 0) if (pRet->TSpec.f.TSInfo.field.ucTSID == TID) if(pRet->TSpec.f.TSInfo.field.ucDirection == dir) @@ -445,7 +445,7 @@ bool GetTs( ResetRxTsEntry(tmp); } - IEEE80211_DEBUG(IEEE80211_DL_TS, "to init current TS, UP:%d, Dir:%d, addr:"MAC_FMT"\n", UP, Dir, MAC_ARG(Addr)); + IEEE80211_DEBUG(IEEE80211_DL_TS, "to init current TS, UP:%d, Dir:%d, addr:%pM\n", UP, Dir, Addr); // Prepare TS Info releated field pTSInfo->field.ucTrafficType = 0; // Traffic type: WMM is reserved in this field pTSInfo->field.ucTSID = UP; // TSID @@ -531,7 +531,7 @@ void RemoveTsEntry( void RemovePeerTS(struct ieee80211_device* ieee, u8* Addr) { PTS_COMMON_INFO pTS, pTmpTS; - printk("===========>RemovePeerTS,"MAC_FMT"\n", MAC_ARG(Addr)); + printk("===========>RemovePeerTS,%pM\n", Addr); list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List) { if (memcmp(pTS->Addr, Addr, 6) == 0) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index adade13e1e19..5afc73751043 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -2976,7 +2976,7 @@ static void rtl8192_read_eeprom_info(struct net_device* dev) memcpy(dev->dev_addr, bMac_Tmp_Addr, 6); //should I set IDR0 here? } - RT_TRACE(COMP_EPROM, "MAC addr:"MAC_FMT"\n", MAC_ARG(dev->dev_addr)); + RT_TRACE(COMP_EPROM, "MAC addr:%pM\n", dev->dev_addr); priv->rf_type = RTL819X_DEFAULT_RF_TYPE; //default 1T2R priv->rf_chip = RF_8256; @@ -6037,7 +6037,7 @@ void setKey( struct net_device *dev, if (EntryNo >= TOTAL_CAM_ENTRY) RT_TRACE(COMP_ERR, "cam entry exceeds in setKey()\n"); - RT_TRACE(COMP_SEC, "====>to setKey(), dev:%p, EntryNo:%d, KeyIndex:%d, KeyType:%d, MacAddr"MAC_FMT"\n", dev,EntryNo, KeyIndex, KeyType, MAC_ARG(MacAddr)); + RT_TRACE(COMP_SEC, "====>to setKey(), dev:%p, EntryNo:%d, KeyIndex:%d, KeyType:%d, MacAddr%pM\n", dev,EntryNo, KeyIndex, KeyType, MacAddr); if (DefaultKey) usConfig |= BIT15 | (KeyType<<2); From d753fa1df300fe9215a08603f1f8ac18825839eb Mon Sep 17 00:00:00 2001 From: Ameya Palande <2ameya@gmail.com> Date: Fri, 11 Dec 2009 19:10:10 +0200 Subject: [PATCH 024/367] Staging: mimio: Fix checkpatch.pl spacing errors Signed-off-by: Ameya Palande <2ameya@gmail.com> Signed-off-by: Greg Kroah-Hartman --- drivers/staging/mimio/mimio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/mimio/mimio.c b/drivers/staging/mimio/mimio.c index 1ba8103f5003..4d7a602a919c 100644 --- a/drivers/staging/mimio/mimio.c +++ b/drivers/staging/mimio/mimio.c @@ -145,7 +145,7 @@ static void mimio_rx_handler(struct mimio *, unsigned char *, unsigned int); static int mimio_tx(struct mimio *, const char *, int); static char mimio_name[] = "VirtualInk mimio-Xi"; -static struct usb_device_id mimio_table [] = { +static struct usb_device_id mimio_table[] = { { USB_DEVICE(MIMIO_VENDOR_ID, MIMIO_PRODUCT_ID) }, { USB_DEVICE(0x0525, 0xa4a0) }, /* gadget zero firmware */ { } @@ -588,7 +588,7 @@ static int handle_mimio_rx_penupdown(struct mimio *mimio, *(mimio->pktbuf.p + 2); if (x != *(mimio->pktbuf.p + 3)) { dev_dbg(&mimio->idev->dev, "EV_PEN%s: bad xsum.\n", - down ? "DOWN":"UP"); + down ? "DOWN" : "UP"); /* skip this event data */ mimio->pktbuf.p += 4; /* decode any remaining events */ From 2c6211606dafaeec51e471cd6aa277fbf45fe80c Mon Sep 17 00:00:00 2001 From: Ameya Palande <2ameya@gmail.com> Date: Fri, 11 Dec 2009 19:10:11 +0200 Subject: [PATCH 025/367] Staging: mimio: Remove dead code Signed-off-by: Ameya Palande <2ameya@gmail.com> Signed-off-by: Greg Kroah-Hartman --- drivers/staging/mimio/mimio.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/drivers/staging/mimio/mimio.c b/drivers/staging/mimio/mimio.c index 4d7a602a919c..5bdbe02eb793 100644 --- a/drivers/staging/mimio/mimio.c +++ b/drivers/staging/mimio/mimio.c @@ -505,23 +505,6 @@ static int mimio_probe(struct usb_interface *ifc, input_set_abs_params(input_dev, ABS_Y, 0, MIMIO_YRANGE_MAX, 0, 0); input_dev->absbit[BIT_WORD(ABS_MISC)] |= BIT_MASK(ABS_MISC); -#if 0 - input_dev->absmin[ABS_X] = 0; - input_dev->absmin[ABS_Y] = 0; - input_dev->absmax[ABS_X] = 9600; - input_dev->absmax[ABS_Y] = 4800; - input_dev->absfuzz[ABS_X] = 0; - input_dev->absfuzz[ABS_Y] = 0; - input_dev->absflat[ABS_X] = 0; - input_dev->absflat[ABS_Y] = 0; -#endif - -#if 0 - /* this will just reduce the precision */ - input_dev->absfuzz[ABS_X] = 8; /* experimental; may need to change */ - input_dev->absfuzz[ABS_Y] = 8; /* experimental; may need to change */ -#endif - /* * Register the input device. */ @@ -720,13 +703,6 @@ static void mimio_rx_handler(struct mimio *mimio, if (instr_ofst[mimio->pktbuf.instr] >= 0) { int code = BTN_TOOL_PEN + instr_ofst[mimio->last_pen_down]; -#if 0 - /* Utter hack to ensure we get forwarded _AND_ - * so we can identify when a complete signal is - * received */ - mimio->idev->abs[ABS_Y] = -1; - mimio->idev->abs[ABS_X] = -1; -#endif /* input_regs(mimio->idev, regs); */ input_report_abs(mimio->idev, ABS_X, x); input_report_abs(mimio->idev, ABS_Y, y); From 8d4ecdda9870d0999ebb8ed59293f420b5d244fd Mon Sep 17 00:00:00 2001 From: Ameya Palande <2ameya@gmail.com> Date: Fri, 11 Dec 2009 19:10:12 +0200 Subject: [PATCH 026/367] Staging: mimio: checkpatch.pl line > 80 chars fixes Rearrange code and cleanup the information to get rid of checkpatch.pl line > 80 chars complaints. Signed-off-by: Ameya Palande <2ameya@gmail.com> Signed-off-by: Greg Kroah-Hartman --- drivers/staging/mimio/mimio.c | 96 +++++++++++++++++++---------------- 1 file changed, 51 insertions(+), 45 deletions(-) diff --git a/drivers/staging/mimio/mimio.c b/drivers/staging/mimio/mimio.c index 5bdbe02eb793..2cfef4a0851f 100644 --- a/drivers/staging/mimio/mimio.c +++ b/drivers/staging/mimio/mimio.c @@ -1,47 +1,46 @@ /* * Hardware event => input event mapping: * + * BTN_TOOL_PEN 0x140 black + * BTN_TOOL_RUBBER 0x141 blue + * BTN_TOOL_BRUSH 0x142 green + * BTN_TOOL_PENCIL 0x143 red + * BTN_TOOL_AIRBRUSH 0x144 eraser + * BTN_TOOL_FINGER 0x145 small eraser + * BTN_TOOL_MOUSE 0x146 mimio interactive + * BTN_TOOL_LENS 0x147 mimio interactive but1 + * LOCALBTN_TOOL_EXTRA1 0x14a mimio interactive but2 == BTN_TOUCH + * LOCALBTN_TOOL_EXTRA2 0x14b mimio extra pens (orange, brown, yellow, + * purple) == BTN_STYLUS + * LOCALBTN_TOOL_EXTRA3 0x14c unused == BTN_STYLUS2 + * BTN_TOOL_DOUBLETAP 0x14d unused + * BTN_TOOL_TRIPLETAP 0x14e unused * - * - input.h:#define BTN_TOOL_PEN 0x140 black - input.h:#define BTN_TOOL_RUBBER 0x141 blue - input.h:#define BTN_TOOL_BRUSH 0x142 green - input.h:#define BTN_TOOL_PENCIL 0x143 red - input.h:#define BTN_TOOL_AIRBRUSH 0x144 eraser - input.h:#define BTN_TOOL_FINGER 0x145 small eraser - input.h:#define BTN_TOOL_MOUSE 0x146 mimio interactive - input.h:#define BTN_TOOL_LENS 0x147 mimio interactive but1 - input.h:#define LOCALBTN_TOOL_EXTRA1 0x14a mimio interactive but2 == BTN_TOUCH - input.h:#define LOCALBTN_TOOL_EXTRA2 0x14b mimio extra pens (orange, brown, yellow, purple) == BTN_STYLUS - input.h:#define LOCALBTN_TOOL_EXTRA3 0x14c unused == BTN_STYLUS2 - input.h:#define BTN_TOOL_DOUBLETAP 0x14d unused - input.h:#define BTN_TOOL_TRIPLETAP 0x14e unused - * - * MIMIO_EV_PENDOWN(MIMIO_PEN_K) => EV_KEY BIT(BTN_TOOL_PEN) - * MIMIO_EV_PENDOWN(MIMIO_PEN_B) => EV_KEY BIT(BTN_TOOL_RUBBER) - * MIMIO_EV_PENDOWN(MIMIO_PEN_G) => EV_KEY BIT(BTN_TOOL_BRUSH) - * MIMIO_EV_PENDOWN(MIMIO_PEN_R) => EV_KEY BIT(BTN_TOOL_PENCIL) - * MIMIO_EV_PENDOWN(MIMIO_PEN_E) => EV_KEY BIT(BTN_TOOL_AIRBRUSH) - * MIMIO_EV_PENDOWN(MIMIO_PEN_ES) => EV_KEY BIT(BTN_TOOL_FINGER) - * MIMIO_EV_PENDOWN(MIMIO_PEN_I) => EV_KEY BIT(BTN_TOOL_MOUSE) - * MIMIO_EV_PENDOWN(MIMIO_PEN_IL) => EV_KEY BIT(BTN_TOOL_LENS) - * MIMIO_EV_PENDOWN(MIMIO_PEN_IR) => EV_KEY BIT(BTN_TOOL_DOUBLETAP) - * MIMIO_EV_PENDOWN(MIMIO_PEN_EX) => EV_KEY BIT(BTN_TOOL_TRIPLETAP) - * MIMIO_EV_PENDATA => EV_ABS BIT(ABS_X), BIT(ABS_Y) - * MIMIO_EV_MEMRESET => EV_KEY BIT(BTN_0) - * MIMIO_EV_ACC(ACC_NEWPAGE) => EV_KEY BIT(BTN_1) - * MIMIO_EV_ACC(ACC_TAGPAGE) => EV_KEY BIT(BTN_2) - * MIMIO_EV_ACC(ACC_PRINTPAGE) => EV_KEY BIT(BTN_3) - * MIMIO_EV_ACC(ACC_MAXIMIZE) => EV_KEY BIT(BTN_4) - * MIMIO_EV_ACC(ACC_FINDCTLPNL) => EV_KEY BIT(BTN_5) - * + * MIMIO_EV_PENDOWN(MIMIO_PEN_K) => EV_KEY BIT(BTN_TOOL_PEN) + * MIMIO_EV_PENDOWN(MIMIO_PEN_B) => EV_KEY BIT(BTN_TOOL_RUBBER) + * MIMIO_EV_PENDOWN(MIMIO_PEN_G) => EV_KEY BIT(BTN_TOOL_BRUSH) + * MIMIO_EV_PENDOWN(MIMIO_PEN_R) => EV_KEY BIT(BTN_TOOL_PENCIL) + * MIMIO_EV_PENDOWN(MIMIO_PEN_E) => EV_KEY BIT(BTN_TOOL_AIRBRUSH) + * MIMIO_EV_PENDOWN(MIMIO_PEN_ES) => EV_KEY BIT(BTN_TOOL_FINGER) + * MIMIO_EV_PENDOWN(MIMIO_PEN_I) => EV_KEY BIT(BTN_TOOL_MOUSE) + * MIMIO_EV_PENDOWN(MIMIO_PEN_IL) => EV_KEY BIT(BTN_TOOL_LENS) + * MIMIO_EV_PENDOWN(MIMIO_PEN_IR) => EV_KEY BIT(BTN_TOOL_DOUBLETAP) + * MIMIO_EV_PENDOWN(MIMIO_PEN_EX) => EV_KEY BIT(BTN_TOOL_TRIPLETAP) + * MIMIO_EV_PENDATA => EV_ABS BIT(ABS_X), BIT(ABS_Y) + * MIMIO_EV_MEMRESET => EV_KEY BIT(BTN_0) + * MIMIO_EV_ACC(ACC_NEWPAGE) => EV_KEY BIT(BTN_1) + * MIMIO_EV_ACC(ACC_TAGPAGE) => EV_KEY BIT(BTN_2) + * MIMIO_EV_ACC(ACC_PRINTPAGE) => EV_KEY BIT(BTN_3) + * MIMIO_EV_ACC(ACC_MAXIMIZE) => EV_KEY BIT(BTN_4) + * MIMIO_EV_ACC(ACC_FINDCTLPNL) => EV_KEY BIT(BTN_5) * * open issues: - * - cold-load of data captured when mimio in standalone mode not yet - * supported; need to snoop Win32 box to see datastream for this. - * - mimio mouse not yet supported; need to snoop Win32 box to see the - * datastream for this. + * - cold-load of data captured when mimio in standalone mode not yet + * supported; need to snoop Win32 box to see datastream for this. + * - mimio mouse not yet supported; need to snoop Win32 box to see the + * datastream for this. */ + #include #include #include @@ -357,14 +356,21 @@ static int mimio_open(struct input_dev *idev) rslt = usb_submit_urb(mimio->in.urb, GFP_KERNEL); if (rslt) { dev_err(&idev->dev, "usb_submit_urb failure " - "(res = %d: %s). Not greeting.\n", - rslt, - (!urb ? "urb is NULL" : - (urb->hcpriv ? "urb->hcpriv is non-NULL" : - (!urb->complete ? "urb is not complete" : - (urb->number_of_packets <= 0 ? "urb has no packets" : - (urb->interval <= 0 ? "urb interval too small" : - "urb interval too large or some other error")))))); + "(res = %d: ", rslt); + if (!urb) + dev_err(&idev->dev, "urb is NULL"); + else if (urb->hcpriv) + dev_err(&idev->dev, "urb->hcpriv is non-NULL"); + else if (!urb->complete) + dev_err(&idev->dev, "urb is not complete"); + else if (urb->number_of_packets <= 0) + dev_err(&idev->dev, "urb has no packets"); + else if (urb->interval <= 0) + dev_err(&idev->dev, "urb interval too small"); + else + dev_err(&idev->dev, "urb interval too large " \ + "or some other error"); + dev_err(&idev->dev, "). Not greeting.\n"); rslt = -EIO; goto exit; } From e89230ec9154870a165de7e4acc411e1e7eec345 Mon Sep 17 00:00:00 2001 From: Peter Huewe Date: Tue, 15 Dec 2009 05:04:22 +0100 Subject: [PATCH 027/367] Staging: asus_oled: Add defines for asus vendor_id and device_id to be consistent with hid-ids.h This almost trivial patch replaces the hardcoded values for the vendor and device ids with defines, as they are used in drivers/hid/hid-ids.h For me this seems to be more consistent, however as drivers/hid/hid-ids.h is not within the default include directory I had to redefine the defines here (maybe move the hid-ids.h to include/linux ?) Signed-off-by: Peter Huewe Signed-off-by: Greg Kroah-Hartman --- drivers/staging/asus_oled/asus_oled.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/staging/asus_oled/asus_oled.c b/drivers/staging/asus_oled/asus_oled.c index 43c57b7688ab..0c1fb0d618a5 100644 --- a/drivers/staging/asus_oled/asus_oled.c +++ b/drivers/staging/asus_oled/asus_oled.c @@ -52,6 +52,10 @@ #define ASUS_OLED_DISP_HEIGHT 32 #define ASUS_OLED_PACKET_BUF_SIZE 256 +#define USB_VENDOR_ID_ASUS 0x0b05 +#define USB_DEVICE_ID_ASUS_LCM 0x1726 +#define USB_DEVICE_ID_ASUS_LCM2 0x175b + MODULE_AUTHOR("Jakub Schmidtke, sjakub@gmail.com"); MODULE_DESCRIPTION("Asus OLED Driver v" ASUS_OLED_VERSION); MODULE_LICENSE("GPL"); @@ -85,16 +89,18 @@ struct oled_dev_desc_str { /* table of devices that work with this driver */ static struct usb_device_id id_table[] = { /* Asus G1/G2 (and variants)*/ - { USB_DEVICE(0x0b05, 0x1726) }, + { USB_DEVICE(USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_LCM) }, /* Asus G50V (and possibly others - G70? G71?)*/ - { USB_DEVICE(0x0b05, 0x175b) }, + { USB_DEVICE(USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_LCM2) }, { }, }; /* parameters of specific devices */ static struct oled_dev_desc_str oled_dev_desc_table[] = { - { 0x0b05, 0x1726, 128, PACK_MODE_G1, "G1/G2" }, - { 0x0b05, 0x175b, 256, PACK_MODE_G50, "G50" }, + { USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_LCM, 128, PACK_MODE_G1, + "G1/G2" }, + { USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_LCM2, 256, PACK_MODE_G50, + "G50" }, { }, }; From bad2239e87d73fd999a9c5d5efa5024b16046c6c Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Sat, 12 Dec 2009 23:39:41 +0100 Subject: [PATCH 028/367] Staging: batman-adv: replace internal logging mechanism. batman-adv used its own logging infrastructure. Replace this with standard kernel logging, printk(), with compile time and runtime options to enable/disable different debug levels. Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/Makefile | 2 +- drivers/staging/batman-adv/README | 50 ++++- drivers/staging/batman-adv/bitarray.c | 15 +- drivers/staging/batman-adv/device.c | 13 +- drivers/staging/batman-adv/hard-interface.c | 36 ++-- drivers/staging/batman-adv/log.c | 179 ------------------ drivers/staging/batman-adv/log.h | 32 ---- drivers/staging/batman-adv/main.c | 24 ++- drivers/staging/batman-adv/main.h | 45 ++--- drivers/staging/batman-adv/proc.c | 171 +++-------------- drivers/staging/batman-adv/routing.c | 102 +++++----- drivers/staging/batman-adv/send.c | 56 +++--- drivers/staging/batman-adv/soft-interface.c | 3 +- .../staging/batman-adv/translation-table.c | 22 ++- drivers/staging/batman-adv/vis.c | 12 +- 15 files changed, 242 insertions(+), 520 deletions(-) delete mode 100644 drivers/staging/batman-adv/log.c delete mode 100644 drivers/staging/batman-adv/log.h diff --git a/drivers/staging/batman-adv/Makefile b/drivers/staging/batman-adv/Makefile index 02da87134fce..64bdb7828e99 100644 --- a/drivers/staging/batman-adv/Makefile +++ b/drivers/staging/batman-adv/Makefile @@ -19,4 +19,4 @@ # obj-m += batman-adv.o -batman-adv-objs := main.o proc.o send.o routing.o soft-interface.o device.o translation-table.o bitarray.o hash.o ring_buffer.o vis.o hard-interface.o aggregation.o log.o +batman-adv-objs := main.o proc.o send.o routing.o soft-interface.o device.o translation-table.o bitarray.o hash.o ring_buffer.o vis.o hard-interface.o aggregation.o diff --git a/drivers/staging/batman-adv/README b/drivers/staging/batman-adv/README index 3aaf393ebaa7..6c624820edd1 100644 --- a/drivers/staging/batman-adv/README +++ b/drivers/staging/batman-adv/README @@ -1,4 +1,4 @@ -[state: 07-11-2009] +[state: 13-11-2009] BATMAN-ADV ---------- @@ -96,6 +96,54 @@ To deactivate batman, do: # echo "" > /proc/net/batman-adv/interfaces +LOGGING/DEBUGGING +----------------- + +All error messages, warnings and information messages are sent to the +kernel log. Depending on your operating system distribution this can be +read in one of a number of ways. Try using the commands: dmesg, +logread, or looking in the files /var/log/kern.log or +/var/log/syslog. All batman-adv messages are prefixed with +"batman-adv:" So to see just these messages try + +dmesg | grep batman-adv + +When investigating problems with your mesh network it is sometimes +necessary to see more detail debug messages. This must be enabled when +compiling the batman-adv module. When building batman-adv as part of +kernel, use "make menuconfig" and enable the option +"B.A.T.M.A.N. debugging". When compiling outside of the kernel tree it +is necessary to edit the file Makefile.kbuild and uncomment the line + +#EXTRA_CFLAGS += -DCONFIG_BATMAN_DEBUG + +The additional debug output is by default disabled. It can be enabled +either at kernel modules load time or during run time. To enable debug +output at module load time, add the module parameter debug=. + can take one of four values. + +0 - All debug output disabled +1 - Enable messages related to routing / flooding / broadcasting +2 - Enable route or hna added / changed / deleted +3 - Enable all messages + +e.g. + +modprobe batman-adv debug=2 + +will load the module and enable debug messages for when routes or HNAs +change. + +The debug output can also be changed at runtime using the file +/sys/module/batman-adv/parameters/debug. e.g. + +echo 2 > /sys/module/batman-adv/parameters/debug + +enables debug messages for when routes or HNAs + +The debug output is sent to the kernel logs. So try dmesg, logread etc +to see the debug messages. + BATCTL ------ diff --git a/drivers/staging/batman-adv/bitarray.c b/drivers/staging/batman-adv/bitarray.c index 3c67f5f42b2b..212eef93afe4 100644 --- a/drivers/staging/batman-adv/bitarray.c +++ b/drivers/staging/batman-adv/bitarray.c @@ -21,7 +21,6 @@ #include "main.h" #include "bitarray.h" -#include "log.h" /* returns true if the corresponding bit in the given seq_bits indicates true * and curr_seqno is within range of last_seqno */ @@ -80,8 +79,8 @@ void bit_shift(TYPE_OF_WORD *seq_bits, int32_t n) * from. * * left is high, right is low: FEDC BA98 7654 3210 - * ^^ ^^ - * vvvv + * ^^ ^^ + * vvvv * ^^^^ = from, vvvvv =to, we'd have word_num==1 and * word_offset==WORD_BIT_SIZE/2 ????? in this example. * (=24 bits) @@ -133,13 +132,13 @@ char bit_get_packet(TYPE_OF_WORD *seq_bits, int16_t seq_num_diff, (seq_num_diff < -TQ_LOCAL_WINDOW_SIZE)) { if (seq_num_diff > TQ_LOCAL_WINDOW_SIZE) - debug_log(LOG_TYPE_BATMAN, - "We missed a lot of packets (%i) !\n", - seq_num_diff-1); + bat_dbg(DBG_BATMAN, + "We missed a lot of packets (%i) !\n", + seq_num_diff-1); if (-seq_num_diff > TQ_LOCAL_WINDOW_SIZE) - debug_log(LOG_TYPE_BATMAN, - "Other host probably restarted !\n"); + bat_dbg(DBG_BATMAN, + "Other host probably restarted !\n"); for (i = 0; i < NUM_WORDS; i++) seq_bits[i] = 0; diff --git a/drivers/staging/batman-adv/device.c b/drivers/staging/batman-adv/device.c index 1e7d1f88674f..12f2de98b3d0 100644 --- a/drivers/staging/batman-adv/device.c +++ b/drivers/staging/batman-adv/device.c @@ -21,7 +21,6 @@ #include "main.h" #include "device.h" -#include "log.h" #include "send.h" #include "types.h" #include "hash.h" @@ -60,7 +59,7 @@ int bat_device_setup(void) /* register our device - kernel assigns a free major number */ tmp_major = register_chrdev(0, DRIVER_DEVICE, &fops); if (tmp_major < 0) { - debug_log(LOG_TYPE_WARN, "Registering the character device failed with %d\n", + printk(KERN_ERR "batman-adv:Registering the character device failed with %d\n", tmp_major); return 0; } @@ -68,7 +67,7 @@ int bat_device_setup(void) batman_class = class_create(THIS_MODULE, "batman-adv"); if (IS_ERR(batman_class)) { - debug_log(LOG_TYPE_WARN, "Could not register class 'batman-adv' \n"); + printk(KERN_ERR "batman-adv:Could not register class 'batman-adv' \n"); return 0; } @@ -111,7 +110,7 @@ int bat_device_open(struct inode *inode, struct file *file) } if (device_client_hash[i] != device_client) { - debug_log(LOG_TYPE_WARN, "Error - can't add another packet client: maximum number of clients reached \n"); + printk(KERN_ERR "batman-adv:Error - can't add another packet client: maximum number of clients reached \n"); kfree(device_client); return -EXFULL; } @@ -208,7 +207,7 @@ ssize_t bat_device_write(struct file *file, const char __user *buff, struct batman_if *batman_if; if (len < sizeof(struct icmp_packet)) { - debug_log(LOG_TYPE_NOTICE, "Error - can't send packet from char device: invalid packet size\n"); + printk(KERN_DEBUG "batman-adv:Error - can't send packet from char device: invalid packet size\n"); return -EINVAL; } @@ -219,12 +218,12 @@ ssize_t bat_device_write(struct file *file, const char __user *buff, return -EFAULT; if (icmp_packet.packet_type != BAT_ICMP) { - debug_log(LOG_TYPE_NOTICE, "Error - can't send packet from char device: got bogus packet type (expected: BAT_ICMP)\n"); + printk(KERN_DEBUG "batman-adv:Error - can't send packet from char device: got bogus packet type (expected: BAT_ICMP)\n"); return -EINVAL; } if (icmp_packet.msg_type != ECHO_REQUEST) { - debug_log(LOG_TYPE_NOTICE, "Error - can't send packet from char device: got bogus message type (expected: ECHO_REQUEST)\n"); + printk(KERN_DEBUG "batman-adv:Error - can't send packet from char device: got bogus message type (expected: ECHO_REQUEST)\n"); return -EINVAL; } diff --git a/drivers/staging/batman-adv/hard-interface.c b/drivers/staging/batman-adv/hard-interface.c index 5ea35da5ee7a..e9cb977d0016 100644 --- a/drivers/staging/batman-adv/hard-interface.c +++ b/drivers/staging/batman-adv/hard-interface.c @@ -21,7 +21,6 @@ #include "main.h" #include "hard-interface.h" -#include "log.h" #include "soft-interface.h" #include "send.h" #include "translation-table.h" @@ -87,9 +86,9 @@ static void check_known_mac_addr(uint8_t *addr) continue; addr_to_string(mac_string, addr); - debug_log(LOG_TYPE_WARN, "The newly added mac address (%s) already exists on: %s\n", - mac_string, batman_if->dev); - debug_log(LOG_TYPE_WARN, "It is strongly recommended to keep mac addresses unique to avoid problems!\n"); + printk(KERN_WARNING "batman-adv:The newly added mac address (%s) already exists on: %s\n", + mac_string, batman_if->dev); + printk(KERN_WARNING "batman-adv:It is strongly recommended to keep mac addresses unique to avoid problems!\n"); } rcu_read_unlock(); } @@ -171,8 +170,8 @@ void hardif_deactivate_interface(struct batman_if *batman_if) batman_if->if_active = IF_INACTIVE; active_ifs--; - debug_log(LOG_TYPE_NOTICE, "Interface deactivated: %s\n", - batman_if->dev); + printk(KERN_INFO "batman-adv:Interface deactivated: %s\n", + batman_if->dev); } /* (re)activate given interface. */ @@ -197,7 +196,7 @@ static void hardif_activate_interface(struct batman_if *batman_if) &batman_if->raw_sock); if (retval < 0) { - debug_log(LOG_TYPE_WARN, "Can't create raw socket: %i\n", + printk(KERN_ERR "batman-adv:Can't create raw socket: %i\n", retval); goto sock_err; } @@ -210,7 +209,7 @@ static void hardif_activate_interface(struct batman_if *batman_if) (struct sockaddr *)&bind_addr, sizeof(bind_addr)); if (retval < 0) { - debug_log(LOG_TYPE_WARN, "Can't create bind raw socket: %i\n", + printk(KERN_ERR "batman-adv:Can't create bind raw socket: %i\n", retval); goto bind_err; } @@ -235,8 +234,8 @@ static void hardif_activate_interface(struct batman_if *batman_if) if (batman_if->if_num == 0) set_main_if_addr(batman_if->net_dev->dev_addr); - debug_log(LOG_TYPE_NOTICE, "Interface activated: %s\n", - batman_if->dev); + printk(KERN_INFO "batman-adv:Interface activated: %s\n", + batman_if->dev); return; @@ -290,7 +289,7 @@ static int resize_orig(struct orig_node *orig_node, int if_num) data_ptr = kmalloc((if_num + 1) * sizeof(TYPE_OF_WORD) * NUM_WORDS, GFP_ATOMIC); if (!data_ptr) { - debug_log(LOG_TYPE_WARN, "Can't resize orig: out of memory\n"); + printk(KERN_ERR "batman-adv:Can't resize orig: out of memory\n"); return -1; } @@ -301,7 +300,7 @@ static int resize_orig(struct orig_node *orig_node, int if_num) data_ptr = kmalloc((if_num + 1) * sizeof(uint8_t), GFP_ATOMIC); if (!data_ptr) { - debug_log(LOG_TYPE_WARN, "Can't resize orig: out of memory\n"); + printk(KERN_ERR "batman-adv:Can't resize orig: out of memory\n"); return -1; } @@ -324,7 +323,7 @@ int hardif_add_interface(char *dev, int if_num) batman_if = kmalloc(sizeof(struct batman_if), GFP_KERNEL); if (!batman_if) { - debug_log(LOG_TYPE_WARN, "Can't add interface (%s): out of memory\n", dev); + printk(KERN_ERR "batman-adv:Can't add interface (%s): out of memory\n", dev); return -1; } @@ -339,7 +338,7 @@ int hardif_add_interface(char *dev, int if_num) batman_if->packet_buff = kmalloc(batman_if->packet_len, GFP_KERNEL); if (!batman_if->packet_buff) { - debug_log(LOG_TYPE_WARN, "Can't add interface packet (%s): out of memory\n", dev); + printk(KERN_ERR "batman-adv:Can't add interface packet (%s): out of memory\n", dev); goto out; } @@ -348,7 +347,7 @@ int hardif_add_interface(char *dev, int if_num) batman_if->if_active = IF_INACTIVE; INIT_RCU_HEAD(&batman_if->rcu); - debug_log(LOG_TYPE_NOTICE, "Adding interface: %s\n", dev); + printk(KERN_INFO "batman-adv:Adding interface: %s\n", dev); avail_ifs++; INIT_LIST_HEAD(&batman_if->list); @@ -389,7 +388,7 @@ int hardif_add_interface(char *dev, int if_num) spin_unlock(&orig_hash_lock); if (!hardif_is_interface_up(batman_if->dev)) - debug_log(LOG_TYPE_WARN, "Not using interface %s (retrying later): interface not active\n", batman_if->dev); + printk(KERN_ERR "batman-adv:Not using interface %s (retrying later): interface not active\n", batman_if->dev); else hardif_activate_interface(batman_if); @@ -413,7 +412,7 @@ char hardif_get_active_if_num(void) } static int hard_if_event(struct notifier_block *this, - unsigned long event, void *ptr) + unsigned long event, void *ptr) { struct net_device *dev = (struct net_device *)ptr; struct batman_if *batman_if = get_batman_if_by_name(dev->name); @@ -436,7 +435,6 @@ static int hard_if_event(struct notifier_block *this, break; /* NETDEV_CHANGEADDR - mac address change - what are we doing here ? */ default: - /* debug_log(LOG_TYPE_CRIT, "hard_if_event: %s %i\n", dev->name, event); */ break; }; @@ -447,5 +445,5 @@ out: } struct notifier_block hard_if_notifier = { - .notifier_call = hard_if_event, + .notifier_call = hard_if_event, }; diff --git a/drivers/staging/batman-adv/log.c b/drivers/staging/batman-adv/log.c deleted file mode 100644 index f37c7f01a9f5..000000000000 --- a/drivers/staging/batman-adv/log.c +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright (C) 2007-2009 B.A.T.M.A.N. contributors: - * - * Marek Lindner, Simon Wunderlich - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA - * - */ - -#include "main.h" -#include "log.h" - -#define LOG_BUF_MASK (log_buf_len-1) -#define LOG_BUF(idx) (log_buf[(idx) & LOG_BUF_MASK]) - -static char log_buf[LOG_BUF_LEN]; -static int log_buf_len = LOG_BUF_LEN; -static unsigned long log_start; -static unsigned long log_end; -uint8_t log_level; - -static DEFINE_SPINLOCK(logbuf_lock); - -const struct file_operations proc_log_operations = { - .open = log_open, - .release = log_release, - .read = log_read, - .write = log_write, - .poll = log_poll, -}; - -static DECLARE_WAIT_QUEUE_HEAD(log_wait); - -static void emit_log_char(char c) -{ - LOG_BUF(log_end) = c; - log_end++; - - if (log_end - log_start > log_buf_len) - log_start = log_end - log_buf_len; -} - -static int fdebug_log(char *fmt, ...) -{ - int printed_len; - char *p; - va_list args; - static char debug_log_buf[256]; - unsigned long flags; - - spin_lock_irqsave(&logbuf_lock, flags); - va_start(args, fmt); - printed_len = vscnprintf(debug_log_buf, sizeof(debug_log_buf), fmt, - args); - va_end(args); - - for (p = debug_log_buf; *p != 0; p++) - emit_log_char(*p); - - spin_unlock_irqrestore(&logbuf_lock, flags); - - wake_up(&log_wait); - - return 0; -} - -int debug_log(int type, char *fmt, ...) -{ - va_list args; - int retval = 0; - char tmp_log_buf[256]; - - /* only critical information get into the official kernel log */ - if (type == LOG_TYPE_CRIT) { - va_start(args, fmt); - vscnprintf(tmp_log_buf, sizeof(tmp_log_buf), fmt, args); - printk(KERN_ERR "batman-adv: %s", tmp_log_buf); - va_end(args); - } - - if ((type == LOG_TYPE_CRIT) || (log_level & type)) { - va_start(args, fmt); - vscnprintf(tmp_log_buf, sizeof(tmp_log_buf), fmt, args); - fdebug_log("[%10u] %s", (jiffies / HZ), tmp_log_buf); - va_end(args); - } - - return retval; -} - -int log_open(struct inode *inode, struct file *file) -{ - inc_module_count(); - return 0; -} - -int log_release(struct inode *inode, struct file *file) -{ - dec_module_count(); - return 0; -} - -ssize_t log_read(struct file *file, char __user *buf, size_t count, - loff_t *ppos) -{ - int error, i = 0; - char c; - unsigned long flags; - - if ((file->f_flags & O_NONBLOCK) && !(log_end - log_start)) - return -EAGAIN; - - if ((!buf) || (count < 0)) - return -EINVAL; - - if (count == 0) - return 0; - - if (!access_ok(VERIFY_WRITE, buf, count)) - return -EFAULT; - - error = wait_event_interruptible(log_wait, (log_start - log_end)); - - if (error) - return error; - - spin_lock_irqsave(&logbuf_lock, flags); - - while ((!error) && (log_start != log_end) && (i < count)) { - c = LOG_BUF(log_start); - - log_start++; - - spin_unlock_irqrestore(&logbuf_lock, flags); - - error = __put_user(c, buf); - - spin_lock_irqsave(&logbuf_lock, flags); - - buf++; - i++; - - } - - spin_unlock_irqrestore(&logbuf_lock, flags); - - if (!error) - return i; - - return error; -} - -ssize_t log_write(struct file *file, const char __user *buf, size_t count, - loff_t *ppos) -{ - return count; -} - -unsigned int log_poll(struct file *file, poll_table *wait) -{ - poll_wait(file, &log_wait, wait); - - if (log_end - log_start) - return POLLIN | POLLRDNORM; - - return 0; -} diff --git a/drivers/staging/batman-adv/log.h b/drivers/staging/batman-adv/log.h deleted file mode 100644 index 780e3abb48f9..000000000000 --- a/drivers/staging/batman-adv/log.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2007-2009 B.A.T.M.A.N. contributors: - * - * Marek Lindner, Simon Wunderlich - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA - * - */ - -extern const struct file_operations proc_log_operations; -extern uint8_t log_level; - -int debug_log(int type, char *fmt, ...); -int log_open(struct inode *inode, struct file *file); -int log_release(struct inode *inode, struct file *file); -ssize_t log_read(struct file *file, char __user *buf, size_t count, - loff_t *ppos); -ssize_t log_write(struct file *file, const char __user *buf, size_t count, - loff_t *ppos); -unsigned int log_poll(struct file *file, poll_table *wait); diff --git a/drivers/staging/batman-adv/main.c b/drivers/staging/batman-adv/main.c index bb89bfc5dda6..4b93a5d33cf9 100644 --- a/drivers/staging/batman-adv/main.c +++ b/drivers/staging/batman-adv/main.c @@ -21,7 +21,6 @@ #include "main.h" #include "proc.h" -#include "log.h" #include "routing.h" #include "send.h" #include "soft-interface.h" @@ -57,6 +56,17 @@ atomic_t module_state; struct workqueue_struct *bat_event_workqueue; +#ifdef CONFIG_BATMAN_DEBUG +int debug; + +module_param(debug, int, 0644); + +int bat_debug_type(int type) +{ + return debug & type; +} +#endif + int init_module(void) { int retval; @@ -90,21 +100,21 @@ int init_module(void) interface_setup); if (!soft_device) { - debug_log(LOG_TYPE_CRIT, "Unable to allocate the batman interface\n"); + printk(KERN_ERR "batman-adv:Unable to allocate the batman interface\n"); goto end; } retval = register_netdev(soft_device); if (retval < 0) { - debug_log(LOG_TYPE_CRIT, "Unable to register the batman interface: %i\n", retval); + printk(KERN_ERR "batman-adv:Unable to register the batman interface: %i\n", retval); goto free_soft_device; } register_netdevice_notifier(&hard_if_notifier); - debug_log(LOG_TYPE_CRIT, "B.A.T.M.A.N. advanced %s%s (compatibility version %i) loaded \n", - SOURCE_VERSION, REVISION_VERSION_STR, COMPAT_VERSION); + printk(KERN_INFO "batman-adv:B.A.T.M.A.N. advanced %s%s (compatibility version %i) loaded \n", + SOURCE_VERSION, REVISION_VERSION_STR, COMPAT_VERSION); return 0; @@ -156,7 +166,7 @@ void activate_module(void) kthread_task = kthread_run(packet_recv_thread, NULL, "batman-adv"); if (IS_ERR(kthread_task)) { - debug_log(LOG_TYPE_CRIT, "Unable to start packet receive thread\n"); + printk(KERN_ERR "batman-adv:Unable to start packet receive thread\n"); kthread_task = NULL; } } @@ -166,7 +176,7 @@ void activate_module(void) goto end; err: - debug_log(LOG_TYPE_CRIT, "Unable to allocate memory for mesh information structures: out of mem ?\n"); + printk(KERN_ERR "batman-adv:Unable to allocate memory for mesh information structures: out of mem ?\n"); shutdown_module(); end: return; diff --git a/drivers/staging/batman-adv/main.h b/drivers/staging/batman-adv/main.h index facb6b79ee52..6907cacf8c41 100644 --- a/drivers/staging/batman-adv/main.h +++ b/drivers/staging/batman-adv/main.h @@ -33,16 +33,16 @@ #define TQ_MAX_VALUE 255 #define JITTER 20 -#define TTL 50 /* Time To Live of broadcast messages */ -#define MAX_ADDR 16 /* number of interfaces which can be added to +#define TTL 50 /* Time To Live of broadcast messages */ +#define MAX_ADDR 16 /* number of interfaces which can be added to * batman. */ -#define PURGE_TIMEOUT 200000 /* purge originators after time in ms if no +#define PURGE_TIMEOUT 200000 /* purge originators after time in ms if no * valid packet comes in -> TODO: check * influence on TQ_LOCAL_WINDOW_SIZE */ #define LOCAL_HNA_TIMEOUT 3600000 -#define TQ_LOCAL_WINDOW_SIZE 64 /* sliding packet range of received originator +#define TQ_LOCAL_WINDOW_SIZE 64 /* sliding packet range of received originator * messages in squence numbers (should be a * multiple of our word size) */ #define TQ_GLOBAL_WINDOW_SIZE 5 @@ -69,24 +69,27 @@ /* - * Logging + * Debug Messages */ -#define LOG_TYPE_CRIT 0 /* highest priority for fatal errors such as - * blocked sockets / failed packet delivery / - * programming errors */ -#define LOG_TYPE_WARN 1 /* warnings for small errors like wrong user - * input / damaged packets / etc */ -#define LOG_TYPE_NOTICE 2 /* notice information for new interfaces / - * changed settings / new originators / etc */ -#define LOG_TYPE_BATMAN 4 /* all messages related to routing / flooding / - * broadcasting / etc */ -#define LOG_TYPE_ROUTES 8 /* route or hna added / changed / deleted */ -#define LOG_TYPE_CRIT_NAME "critical" -#define LOG_TYPE_WARN_NAME "warnings" -#define LOG_TYPE_NOTICE_NAME "notices" -#define LOG_TYPE_BATMAN_NAME "batman" -#define LOG_TYPE_ROUTES_NAME "routes" +#define DBG_BATMAN 1 /* all messages related to routing / flooding / + * broadcasting / etc */ +#define DBG_ROUTES 2 /* route or hna added / changed / deleted */ + +#ifdef CONFIG_BATMAN_DEBUG +extern int debug; + +extern int bat_debug_type(int type); +#define bat_dbg(type, fmt, arg...) do { \ + if (bat_debug_type(type)) \ + printk(KERN_DEBUG "batman-adv:" fmt, ## arg); \ + } \ + while (0) +#else /* !CONFIG_BATMAN_DEBUG */ +#define bat_dbg(type, fmt, arg...) do { \ + } \ + while (0) +#endif /* * Vis @@ -147,5 +150,3 @@ int choose_orig(void *data, int32_t size); int is_my_mac(uint8_t *addr); int is_bcast(uint8_t *addr); int is_mcast(uint8_t *addr); - - diff --git a/drivers/staging/batman-adv/proc.c b/drivers/staging/batman-adv/proc.c index aac3df7f13fb..ed4c73484d7d 100644 --- a/drivers/staging/batman-adv/proc.c +++ b/drivers/staging/batman-adv/proc.c @@ -21,7 +21,6 @@ #include "main.h" #include "proc.h" -#include "log.h" #include "routing.h" #include "translation-table.h" #include "hard-interface.h" @@ -34,7 +33,6 @@ static uint8_t vis_format = DOT_DRAW; static struct proc_dir_entry *proc_batman_dir, *proc_interface_file; static struct proc_dir_entry *proc_orig_interval_file, *proc_originators_file; -static struct proc_dir_entry *proc_log_file, *proc_log_level_file; static struct proc_dir_entry *proc_transt_local_file; static struct proc_dir_entry *proc_transt_global_file; static struct proc_dir_entry *proc_vis_file, *proc_vis_format_file; @@ -77,8 +75,7 @@ static ssize_t proc_interfaces_write(struct file *instance, return -ENOMEM; if (count > IFNAMSIZ - 1) { - debug_log(LOG_TYPE_WARN, - "Can't add interface: device name is too long\n"); + printk(KERN_WARNING "batman-adv:Can't add interface: device name is too long\n"); goto end; } @@ -105,7 +102,7 @@ static ssize_t proc_interfaces_write(struct file *instance, rcu_read_lock(); list_for_each_entry_rcu(batman_if, &if_list, list) { if (strncmp(batman_if->dev, if_string, count) == 0) { - debug_log(LOG_TYPE_WARN, "Given interface is already active: %s\n", if_string); + printk(KERN_ERR "batman-adv:Given interface is already active: %s\n", if_string); rcu_read_unlock(); goto end; @@ -162,20 +159,18 @@ static ssize_t proc_orig_interval_write(struct file *file, retval = strict_strtoul(interval_string, 10, &originator_interval_tmp); if (retval) { - debug_log(LOG_TYPE_WARN, "New originator interval invalid\n"); + printk(KERN_ERR "batman-adv:New originator interval invalid\n"); goto end; } if (originator_interval_tmp <= JITTER * 2) { - debug_log(LOG_TYPE_WARN, - "New originator interval too small: %i (min: %i)\n", - originator_interval_tmp, JITTER * 2); + printk(KERN_WARNING "batman-adv:New originator interval too small: %li (min: %i)\n", + originator_interval_tmp, JITTER * 2); goto end; } - debug_log(LOG_TYPE_NOTICE, - "Changing originator interval from: %i to: %i\n", - atomic_read(&originator_interval), originator_interval_tmp); + printk(KERN_INFO "batman-adv:Changing originator interval from: %i to: %li\n", + atomic_read(&originator_interval), originator_interval_tmp); atomic_set(&originator_interval, originator_interval_tmp); @@ -235,7 +230,7 @@ static int proc_originators_read(struct seq_file *seq, void *offset) addr_to_string(orig_str, orig_node->orig); addr_to_string(router_str, orig_node->router->addr); - seq_printf(seq, "%-17s (%3i) %17s [%10s]:", + seq_printf(seq, "%-17s (%3i) %17s [%10s]:", orig_str, orig_node->router->tq_avg, router_str, orig_node->router->if_incoming->dev); @@ -263,84 +258,6 @@ static int proc_originators_open(struct inode *inode, struct file *file) return single_open(file, proc_originators_read, NULL); } -static int proc_log_level_read(struct seq_file *seq, void *offset) -{ - - seq_printf(seq, "[x] %s (%d)\n", LOG_TYPE_CRIT_NAME, LOG_TYPE_CRIT); - seq_printf(seq, "[%c] %s (%d)\n", - (LOG_TYPE_WARN & log_level) ? 'x' : ' ', - LOG_TYPE_WARN_NAME, LOG_TYPE_WARN); - seq_printf(seq, "[%c] %s (%d)\n", - (LOG_TYPE_NOTICE & log_level) ? 'x' : ' ', - LOG_TYPE_NOTICE_NAME, LOG_TYPE_NOTICE); - seq_printf(seq, "[%c] %s (%d)\n", - (LOG_TYPE_BATMAN & log_level) ? 'x' : ' ', - LOG_TYPE_BATMAN_NAME, LOG_TYPE_BATMAN); - seq_printf(seq, "[%c] %s (%d)\n", - (LOG_TYPE_ROUTES & log_level) ? 'x' : ' ', - LOG_TYPE_ROUTES_NAME, LOG_TYPE_ROUTES); - return 0; -} - -static int proc_log_level_open(struct inode *inode, struct file *file) -{ - return single_open(file, proc_log_level_read, NULL); -} - -static ssize_t proc_log_level_write(struct file *instance, - const char __user *userbuffer, - size_t count, loff_t *data) -{ - char *log_level_string, *tokptr, *cp; - int finished, not_copied = 0; - unsigned long log_level_tmp = 0; - - log_level_string = kmalloc(count, GFP_KERNEL); - - if (!log_level_string) - return -ENOMEM; - - not_copied = copy_from_user(log_level_string, userbuffer, count); - log_level_string[count - not_copied - 1] = 0; - - if (strict_strtoul(log_level_string, 10, &log_level_tmp) < 0) { - /* was not a number, doing textual parsing */ - log_level_tmp = 0; - tokptr = log_level_string; - - for (cp = log_level_string, finished = 0; !finished; cp++) { - switch (*cp) { - case 0: - finished = 1; - case ' ': - case '\n': - case '\t': - *cp = 0; - /* compare */ - if (strcmp(tokptr, LOG_TYPE_WARN_NAME) == 0) - log_level_tmp |= LOG_TYPE_WARN; - if (strcmp(tokptr, LOG_TYPE_NOTICE_NAME) == 0) - log_level_tmp |= LOG_TYPE_NOTICE; - if (strcmp(tokptr, LOG_TYPE_BATMAN_NAME) == 0) - log_level_tmp |= LOG_TYPE_BATMAN; - if (strcmp(tokptr, LOG_TYPE_ROUTES_NAME) == 0) - log_level_tmp |= LOG_TYPE_ROUTES; - tokptr = cp + 1; - break; - default: - ; - } - } - } - - debug_log(LOG_TYPE_CRIT, "Changing log_level from: %i to: %i\n", - log_level, log_level_tmp); - log_level = log_level_tmp; - - kfree(log_level_string); - return count; -} - static int proc_transt_local_read(struct seq_file *seq, void *offset) { char *buf; @@ -412,7 +329,7 @@ static void proc_vis_insert_interface(const uint8_t *interface, bool primary) { /* Did we get an empty list? (then insert imediately) */ - if(*if_entry == NULL) { + if (*if_entry == NULL) { *if_entry = kmalloc(sizeof(struct vis_if_list), GFP_KERNEL); if (*if_entry == NULL) return; @@ -585,14 +502,14 @@ static ssize_t proc_vis_write(struct file *file, const char __user * buffer, vis_mode_string[count - not_copied - 1] = 0; if (strcmp(vis_mode_string, "client") == 0) { - debug_log(LOG_TYPE_NOTICE, "Setting VIS mode to client\n"); + printk(KERN_INFO "batman-adv:Setting VIS mode to client\n"); vis_set_mode(VIS_TYPE_CLIENT_UPDATE); } else if (strcmp(vis_mode_string, "server") == 0) { - debug_log(LOG_TYPE_NOTICE, "Setting VIS mode to server\n"); + printk(KERN_INFO "batman-adv:Setting VIS mode to server\n"); vis_set_mode(VIS_TYPE_SERVER_SYNC); } else - debug_log(LOG_TYPE_WARN, "Unknown VIS mode: %s\n", - vis_mode_string); + printk(KERN_ERR "batman-adv:Unknown VIS mode: %s\n", + vis_mode_string); kfree(vis_mode_string); return count; @@ -637,16 +554,16 @@ static ssize_t proc_vis_format_write(struct file *file, vis_format_string[count - not_copied - 1] = 0; if (strcmp(vis_format_string, VIS_FORMAT_DD_NAME) == 0) { - debug_log(LOG_TYPE_NOTICE, "Setting VIS output format to: %s\n", - VIS_FORMAT_DD_NAME); + printk(KERN_INFO "batman-adv:Setting VIS output format to: %s\n", + VIS_FORMAT_DD_NAME); vis_format = DOT_DRAW; } else if (strcmp(vis_format_string, VIS_FORMAT_JSON_NAME) == 0) { - debug_log(LOG_TYPE_NOTICE, "Setting VIS output format to: %s\n", - VIS_FORMAT_JSON_NAME); + printk(KERN_INFO "batman-adv:Setting VIS output format to: %s\n", + VIS_FORMAT_JSON_NAME); vis_format = JSON; } else - debug_log(LOG_TYPE_WARN, "Unknown VIS output format: %s\n", - vis_format_string); + printk(KERN_ERR "batman-adv:Unknown VIS output format: %s\n", + vis_format_string); kfree(vis_format_string); return count; @@ -677,16 +594,16 @@ static ssize_t proc_aggr_write(struct file *file, const char __user *buffer, strict_strtoul(aggr_string, 10, &aggregation_enabled_tmp); if ((aggregation_enabled_tmp != 0) && (aggregation_enabled_tmp != 1)) { - debug_log(LOG_TYPE_WARN, "Aggregation can only be enabled (1) or disabled (0), given value: %li\n", aggregation_enabled_tmp); + printk(KERN_ERR "batman-adv:Aggregation can only be enabled (1) or disabled (0), given value: %li\n", aggregation_enabled_tmp); goto end; } - debug_log(LOG_TYPE_NOTICE, "Changing aggregation from: %s (%i) to: %s (%li)\n", - (atomic_read(&aggregation_enabled) == 1 ? - "enabled" : "disabled"), - atomic_read(&aggregation_enabled), - (aggregation_enabled_tmp == 1 ? "enabled" : "disabled"), - aggregation_enabled_tmp); + printk(KERN_INFO "batman-adv:Changing aggregation from: %s (%i) to: %s (%li)\n", + (atomic_read(&aggregation_enabled) == 1 ? + "enabled" : "disabled"), + atomic_read(&aggregation_enabled), + (aggregation_enabled_tmp == 1 ? "enabled" : "disabled"), + aggregation_enabled_tmp); atomic_set(&aggregation_enabled, (unsigned)aggregation_enabled_tmp); end: @@ -760,15 +677,6 @@ static const struct file_operations proc_transt_global_fops = { .release = single_release, }; -static const struct file_operations proc_log_level_fops = { - .owner = THIS_MODULE, - .open = proc_log_level_open, - .read = seq_read, - .write = proc_log_level_write, - .llseek = seq_lseek, - .release = single_release, -}; - static const struct file_operations proc_interfaces_fops = { .owner = THIS_MODULE, .open = proc_interfaces_open, @@ -795,12 +703,6 @@ void cleanup_procfs(void) if (proc_transt_local_file) remove_proc_entry(PROC_FILE_TRANST_LOCAL, proc_batman_dir); - if (proc_log_file) - remove_proc_entry(PROC_FILE_LOG, proc_batman_dir); - - if (proc_log_level_file) - remove_proc_entry(PROC_FILE_LOG_LEVEL, proc_batman_dir); - if (proc_originators_file) remove_proc_entry(PROC_FILE_ORIGINATORS, proc_batman_dir); @@ -862,17 +764,6 @@ int setup_procfs(void) return -EFAULT; } - proc_log_level_file = create_proc_entry(PROC_FILE_LOG_LEVEL, - S_IWUSR | S_IRUGO, - proc_batman_dir); - if (proc_log_level_file) { - proc_log_level_file->proc_fops = &proc_log_level_fops; - } else { - printk(KERN_ERR "batman-adv: Registering the '/proc/net/%s/%s' file failed\n", PROC_ROOT_DIR, PROC_FILE_LOG_LEVEL); - cleanup_procfs(); - return -EFAULT; - } - proc_originators_file = create_proc_entry(PROC_FILE_ORIGINATORS, S_IRUGO, proc_batman_dir); if (proc_originators_file) { @@ -883,16 +774,6 @@ int setup_procfs(void) return -EFAULT; } - proc_log_file = create_proc_entry(PROC_FILE_LOG, - S_IRUGO, proc_batman_dir); - if (proc_log_file) { - proc_log_file->proc_fops = &proc_log_operations; - } else { - printk(KERN_ERR "batman-adv: Registering the '/proc/net/%s/%s' file failed\n", PROC_FILE_LOG, PROC_FILE_GATEWAYS); - cleanup_procfs(); - return -EFAULT; - } - proc_transt_local_file = create_proc_entry(PROC_FILE_TRANST_LOCAL, S_IRUGO, proc_batman_dir); if (proc_transt_local_file) { diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c index 4a14c363ac2b..1f42d4167422 100644 --- a/drivers/staging/batman-adv/routing.c +++ b/drivers/staging/batman-adv/routing.c @@ -25,7 +25,6 @@ #include "main.h" #include "routing.h" -#include "log.h" #include "send.h" #include "soft-interface.h" #include "hard-interface.h" @@ -88,7 +87,7 @@ static struct neigh_node *create_neighbor(struct orig_node *orig_node, struct or { struct neigh_node *neigh_node; - debug_log(LOG_TYPE_BATMAN, "Creating new last-hop neighbour of originator\n"); + bat_dbg(DBG_BATMAN, "Creating new last-hop neighbour of originator\n"); neigh_node = kmalloc(sizeof(struct neigh_node), GFP_ATOMIC); memset(neigh_node, 0, sizeof(struct neigh_node)); @@ -136,7 +135,7 @@ static struct orig_node *get_orig_node(uint8_t *addr) return orig_node; addr_to_string(orig_str, addr); - debug_log(LOG_TYPE_BATMAN, "Creating new originator: %s \n", orig_str); + bat_dbg(DBG_BATMAN, "Creating new originator: %s \n", orig_str); orig_node = kmalloc(sizeof(struct orig_node), GFP_ATOMIC); memset(orig_node, 0, sizeof(struct orig_node)); @@ -159,7 +158,7 @@ static struct orig_node *get_orig_node(uint8_t *addr) swaphash = hash_resize(orig_hash, orig_hash->size * 2); if (swaphash == NULL) - debug_log(LOG_TYPE_CRIT, "Couldn't resize orig hash table \n"); + printk(KERN_ERR "batman-adv:Couldn't resize orig hash table \n"); else orig_hash = swaphash; } @@ -196,15 +195,15 @@ static void update_routes(struct orig_node *orig_node, struct neigh_node *neigh_ /* route deleted */ if ((orig_node->router != NULL) && (neigh_node == NULL)) { - - debug_log(LOG_TYPE_ROUTES, "Deleting route towards: %s\n", orig_str); + bat_dbg(DBG_ROUTES, "Deleting route towards: %s\n", + orig_str); hna_global_del_orig(orig_node, "originator timed out"); /* route added */ } else if ((orig_node->router == NULL) && (neigh_node != NULL)) { addr_to_string(neigh_str, neigh_node->addr); - debug_log(LOG_TYPE_ROUTES, "Adding route towards: %s (via %s)\n", orig_str, neigh_str); + bat_dbg(DBG_ROUTES, "Adding route towards: %s (via %s)\n", orig_str, neigh_str); hna_global_add_orig(orig_node, hna_buff, hna_buff_len); /* route changed */ @@ -212,7 +211,7 @@ static void update_routes(struct orig_node *orig_node, struct neigh_node *neigh_ addr_to_string(neigh_str, neigh_node->addr); addr_to_string(router_str, orig_node->router->addr); - debug_log(LOG_TYPE_ROUTES, "Changing route towards: %s (now via %s - was via %s)\n", orig_str, neigh_str, router_str); + bat_dbg(DBG_ROUTES, "Changing route towards: %s (now via %s - was via %s)\n", orig_str, neigh_str, router_str); } @@ -296,9 +295,9 @@ static int isBidirectionalNeigh(struct orig_node *orig_node, struct orig_node *o (TQ_LOCAL_WINDOW_SIZE - neigh_node->real_packet_count)) / (TQ_LOCAL_WINDOW_SIZE * TQ_LOCAL_WINDOW_SIZE * TQ_LOCAL_WINDOW_SIZE); - batman_packet->tq = ((batman_packet->tq * orig_neigh_node->tq_own * orig_neigh_node->tq_asym_penalty) / (TQ_MAX_VALUE * TQ_MAX_VALUE)); + batman_packet->tq = ((batman_packet->tq * orig_neigh_node->tq_own * orig_neigh_node->tq_asym_penalty) / (TQ_MAX_VALUE * TQ_MAX_VALUE)); - debug_log(LOG_TYPE_BATMAN, "bidirectional: orig = %-15s neigh = %-15s => own_bcast = %2i, real recv = %2i, local tq: %3i, asym_penalty: %3i, total tq: %3i \n", + bat_dbg(DBG_BATMAN, "bidirectional: orig = %-15s neigh = %-15s => own_bcast = %2i, real recv = %2i, local tq: %3i, asym_penalty: %3i, total tq: %3i \n", orig_str, neigh_str, total_count, neigh_node->real_packet_count, orig_neigh_node->tq_own, orig_neigh_node->tq_asym_penalty, batman_packet->tq); /* if link has the minimum required transmission quality consider it bidirectional */ @@ -313,7 +312,7 @@ static void update_orig(struct orig_node *orig_node, struct ethhdr *ethhdr, stru struct neigh_node *neigh_node = NULL, *tmp_neigh_node = NULL; int tmp_hna_buff_len; - debug_log(LOG_TYPE_BATMAN, "update_originator(): Searching and updating originator entry of received packet \n"); + bat_dbg(DBG_BATMAN, "update_originator(): Searching and updating originator entry of received packet \n"); list_for_each_entry(tmp_neigh_node, &orig_node->neigh_list, list) { if (compare_orig(tmp_neigh_node->addr, ethhdr->h_source) && (tmp_neigh_node->if_incoming == if_incoming)) { @@ -331,7 +330,7 @@ static void update_orig(struct orig_node *orig_node, struct ethhdr *ethhdr, stru if (neigh_node == NULL) neigh_node = create_neighbor(orig_node, get_orig_node(ethhdr->h_source), ethhdr->h_source, if_incoming); else - debug_log(LOG_TYPE_BATMAN, "Updating existing last-hop neighbour of originator\n"); + bat_dbg(DBG_BATMAN, "Updating existing last-hop neighbour of originator\n"); orig_node->flags = batman_packet->flags; neigh_node->last_valid = jiffies; @@ -396,7 +395,8 @@ static char count_real_packets(struct ethhdr *ethhdr, struct batman_packet *batm } if (!is_duplicate) { - debug_log(LOG_TYPE_BATMAN, "updating last_seqno: old %d, new %d \n", orig_node->last_real_seqno, batman_packet->seqno); + bat_dbg(DBG_BATMAN, "updating last_seqno: old %d, new %d \n", + orig_node->last_real_seqno, batman_packet->seqno); orig_node->last_real_seqno = batman_packet->seqno; } @@ -436,7 +436,7 @@ void receive_bat_packet(struct ethhdr *ethhdr, struct batman_packet *batman_pack is_single_hop_neigh = (compare_orig(ethhdr->h_source, batman_packet->orig) ? 1 : 0); - debug_log(LOG_TYPE_BATMAN, "Received BATMAN packet via NB: %s, IF: %s [%s] (from OG: %s, via prev OG: %s, seqno %d, tq %d, TTL %d, V %d, IDF %d) \n", neigh_str, if_incoming->dev, if_incoming->addr_str, orig_str, prev_sender_str, batman_packet->seqno, batman_packet->tq, batman_packet->ttl, batman_packet->version, has_directlink_flag); + bat_dbg(DBG_BATMAN, "Received BATMAN packet via NB: %s, IF: %s [%s] (from OG: %s, via prev OG: %s, seqno %d, tq %d, TTL %d, V %d, IDF %d) \n", neigh_str, if_incoming->dev, if_incoming->addr_str, orig_str, prev_sender_str, batman_packet->seqno, batman_packet->tq, batman_packet->ttl, batman_packet->version, has_directlink_flag); list_for_each_entry_rcu(batman_if, &if_list, list) { if (batman_if->if_active != IF_ACTIVE) @@ -456,17 +456,17 @@ void receive_bat_packet(struct ethhdr *ethhdr, struct batman_packet *batman_pack } if (batman_packet->version != COMPAT_VERSION) { - debug_log(LOG_TYPE_BATMAN, "Drop packet: incompatible batman version (%i) \n", batman_packet->version); + bat_dbg(DBG_BATMAN, "Drop packet: incompatible batman version (%i) \n", batman_packet->version); return; } if (is_my_addr) { - debug_log(LOG_TYPE_BATMAN, "Drop packet: received my own broadcast (sender: %s) \n", neigh_str); + bat_dbg(DBG_BATMAN, "Drop packet: received my own broadcast (sender: %s) \n", neigh_str); return; } if (is_broadcast) { - debug_log(LOG_TYPE_BATMAN, "Drop packet: ignoring all packets with broadcast source addr (sender: %s) \n", neigh_str); + bat_dbg(DBG_BATMAN, "Drop packet: ignoring all packets with broadcast source addr (sender: %s) \n", neigh_str); return; } @@ -481,19 +481,19 @@ void receive_bat_packet(struct ethhdr *ethhdr, struct batman_packet *batman_pack orig_neigh_node->bcast_own_sum[if_incoming->if_num] = bit_packet_count((TYPE_OF_WORD *)&(orig_neigh_node->bcast_own[if_incoming->if_num * NUM_WORDS])); } - debug_log(LOG_TYPE_BATMAN, "Drop packet: originator packet from myself (via neighbour) \n"); + bat_dbg(DBG_BATMAN, "Drop packet: originator packet from myself (via neighbour) \n"); return; } if (batman_packet->tq == 0) { count_real_packets(ethhdr, batman_packet, if_incoming); - debug_log(LOG_TYPE_BATMAN, "Drop packet: originator packet with tq equal 0 \n"); + bat_dbg(DBG_BATMAN, "Drop packet: originator packet with tq equal 0 \n"); return; } if (is_my_oldorig) { - debug_log(LOG_TYPE_BATMAN, "Drop packet: ignoring all rebroadcast echos (sender: %s) \n", neigh_str); + bat_dbg(DBG_BATMAN, "Drop packet: ignoring all rebroadcast echos (sender: %s) \n", neigh_str); return; } @@ -508,7 +508,7 @@ void receive_bat_packet(struct ethhdr *ethhdr, struct batman_packet *batman_pack (compare_orig(orig_node->router->addr, batman_packet->prev_sender)) && !(compare_orig(batman_packet->orig, batman_packet->prev_sender)) && (compare_orig(orig_node->router->addr, orig_node->router->orig_node->router->addr))) { - debug_log(LOG_TYPE_BATMAN, "Drop packet: ignoring all rebroadcast packets that may make me loop (sender: %s) \n", neigh_str); + bat_dbg(DBG_BATMAN, "Drop packet: ignoring all rebroadcast packets that may make me loop (sender: %s) \n", neigh_str); return; } @@ -519,7 +519,7 @@ void receive_bat_packet(struct ethhdr *ethhdr, struct batman_packet *batman_pack /* drop packet if sender is not a direct neighbor and if we don't route towards it */ if (!is_single_hop_neigh && (orig_neigh_node->router == NULL)) { - debug_log(LOG_TYPE_BATMAN, "Drop packet: OGM via unknown neighbor! \n"); + bat_dbg(DBG_BATMAN, "Drop packet: OGM via unknown neighbor!\n"); return; } @@ -537,22 +537,22 @@ void receive_bat_packet(struct ethhdr *ethhdr, struct batman_packet *batman_pack /* mark direct link on incoming interface */ schedule_forward_packet(orig_node, ethhdr, batman_packet, 1, hna_buff_len, if_incoming); - debug_log(LOG_TYPE_BATMAN, "Forwarding packet: rebroadcast neighbour packet with direct link flag \n"); + bat_dbg(DBG_BATMAN, "Forwarding packet: rebroadcast neighbour packet with direct link flag\n"); return; } /* multihop originator */ if (!is_bidirectional) { - debug_log(LOG_TYPE_BATMAN, "Drop packet: not received via bidirectional link\n"); + bat_dbg(DBG_BATMAN, "Drop packet: not received via bidirectional link\n"); return; } if (is_duplicate) { - debug_log(LOG_TYPE_BATMAN, "Drop packet: duplicate packet received\n"); + bat_dbg(DBG_BATMAN, "Drop packet: duplicate packet received\n"); return; } - debug_log(LOG_TYPE_BATMAN, "Forwarding packet: rebroadcast originator packet \n"); + bat_dbg(DBG_BATMAN, "Forwarding packet: rebroadcast originator packet\n"); schedule_forward_packet(orig_node, ethhdr, batman_packet, 0, hna_buff_len, if_incoming); } @@ -574,7 +574,7 @@ void purge_orig(struct work_struct *work) if (time_after(jiffies, orig_node->last_valid + ((2 * PURGE_TIMEOUT * HZ) / 1000))) { - debug_log(LOG_TYPE_BATMAN, "Originator timeout: originator %s, last_valid %u \n", orig_str, (orig_node->last_valid / HZ)); + bat_dbg(DBG_BATMAN, "Originator timeout: originator %s, last_valid %lu\n", orig_str, (orig_node->last_valid / HZ)); hash_remove_bucket(orig_hash, hashit); free_orig_node(orig_node); @@ -591,7 +591,7 @@ void purge_orig(struct work_struct *work) if (time_after(jiffies, neigh_node->last_valid + ((PURGE_TIMEOUT * HZ) / 1000))) { addr_to_string(neigh_str, neigh_node->addr); - debug_log(LOG_TYPE_BATMAN, "Neighbour timeout: originator %s, neighbour: %s, last_valid %u \n", orig_str, neigh_str, (neigh_node->last_valid / HZ)); + bat_dbg(DBG_BATMAN, "Neighbour timeout: originator %s, neighbour: %s, last_valid %lu\n", orig_str, neigh_str, (neigh_node->last_valid / HZ)); neigh_purged = 1; list_del(list_pos); @@ -652,7 +652,7 @@ int packet_recv_thread(void *data) atomic_set(&exit_cond, 0); packet_buff = kmalloc(PACKBUFF_SIZE, GFP_KERNEL); if (!packet_buff) { - debug_log(LOG_TYPE_CRIT, "Could allocate memory for the packet buffer. :(\n"); + printk(KERN_ERR "batman-adv:Could allocate memory for the packet buffer. :(\n"); return -1; } @@ -677,9 +677,9 @@ int packet_recv_thread(void *data) while (1) { if (batman_if->if_active != IF_ACTIVE) { if (batman_if->if_active != IF_TO_BE_ACTIVATED) - debug_log(LOG_TYPE_NOTICE, - "Could not read from deactivated interface %s!\n", - batman_if->dev); + printk(KERN_WARNING + "batman-adv:Could not read from deactivated interface %s!\n", + batman_if->dev); if (batman_if->raw_sock) receive_raw_packet(batman_if->raw_sock, packet_buff, PACKBUFF_SIZE); @@ -698,7 +698,7 @@ int packet_recv_thread(void *data) batman_packet = (struct batman_packet *)(packet_buff + sizeof(struct ethhdr)); if (batman_packet->version != COMPAT_VERSION) { - debug_log(LOG_TYPE_BATMAN, "Drop packet: incompatible batman version (%i) \n", batman_packet->version); + bat_dbg(DBG_BATMAN, "Drop packet: incompatible batman version (%i)\n", batman_packet->version); continue; } @@ -719,9 +719,9 @@ int packet_recv_thread(void *data) spin_lock(&orig_hash_lock); receive_aggr_bat_packet(ethhdr, - packet_buff + sizeof(struct ethhdr), - result - sizeof(struct ethhdr), - batman_if); + packet_buff + sizeof(struct ethhdr), + result - sizeof(struct ethhdr), + batman_if); spin_unlock(&orig_hash_lock); break; @@ -768,9 +768,9 @@ int packet_recv_thread(void *data) icmp_packet->ttl = TTL; send_raw_packet(packet_buff + sizeof(struct ethhdr), - result - sizeof(struct ethhdr), - orig_node->batman_if, - orig_node->router->addr); + result - sizeof(struct ethhdr), + orig_node->batman_if, + orig_node->router->addr); } @@ -785,7 +785,7 @@ int packet_recv_thread(void *data) addr_to_string(src_str, icmp_packet->orig); addr_to_string(dst_str, icmp_packet->dst); - debug_log(LOG_TYPE_NOTICE, "Error - can't send packet from %s to %s: ttl exceeded\n", src_str, dst_str); + printk(KERN_WARNING "batman-adv:Warning - can't send packet from %s to %s: ttl exceeded\n", src_str, dst_str); /* send TTL exceeded if packet is an echo request (traceroute) */ if (icmp_packet->msg_type != ECHO_REQUEST) @@ -803,9 +803,9 @@ int packet_recv_thread(void *data) icmp_packet->ttl = TTL; send_raw_packet(packet_buff + sizeof(struct ethhdr), - result - sizeof(struct ethhdr), - orig_node->batman_if, - orig_node->router->addr); + result - sizeof(struct ethhdr), + orig_node->batman_if, + orig_node->router->addr); } @@ -825,9 +825,9 @@ int packet_recv_thread(void *data) /* route it */ send_raw_packet(packet_buff + sizeof(struct ethhdr), - result - sizeof(struct ethhdr), - orig_node->batman_if, - orig_node->router->addr); + result - sizeof(struct ethhdr), + orig_node->batman_if, + orig_node->router->addr); } spin_unlock(&orig_hash_lock); @@ -866,7 +866,7 @@ int packet_recv_thread(void *data) addr_to_string(src_str, ((struct ethhdr *)(unicast_packet + 1))->h_source); addr_to_string(dst_str, unicast_packet->dest); - debug_log(LOG_TYPE_NOTICE, "Error - can't send packet from %s to %s: ttl exceeded\n", src_str, dst_str); + printk(KERN_WARNING "batman-adv:Warning - can't send packet from %s to %s: ttl exceeded\n", src_str, dst_str); continue; } @@ -880,9 +880,9 @@ int packet_recv_thread(void *data) /* route it */ send_raw_packet(packet_buff + sizeof(struct ethhdr), - result - sizeof(struct ethhdr), - orig_node->batman_if, - orig_node->router->addr); + result - sizeof(struct ethhdr), + orig_node->batman_if, + orig_node->router->addr); } spin_unlock(&orig_hash_lock); @@ -980,7 +980,7 @@ int packet_recv_thread(void *data) } if ((result < 0) && (result != -EAGAIN)) - debug_log(LOG_TYPE_CRIT, "Could not receive packet from interface %s: %i\n", batman_if->dev, result); + printk(KERN_ERR "batman-adv:Could not receive packet from interface %s: %i\n", batman_if->dev, result); /* lock for the next iteration */ rcu_read_lock(); diff --git a/drivers/staging/batman-adv/send.c b/drivers/staging/batman-adv/send.c index eb617508cca4..fc4953f50dff 100644 --- a/drivers/staging/batman-adv/send.c +++ b/drivers/staging/batman-adv/send.c @@ -21,7 +21,6 @@ #include "main.h" #include "send.h" -#include "log.h" #include "routing.h" #include "translation-table.h" #include "hard-interface.h" @@ -72,9 +71,9 @@ void send_raw_packet(unsigned char *pack_buff, int pack_buff_len, return; if (!(batman_if->net_dev->flags & IFF_UP)) { - debug_log(LOG_TYPE_WARN, - "Interface %s is not up - can't send packet via that interface (IF_TO_BE_DEACTIVATED was here) !\n", - batman_if->dev); + printk(KERN_WARNING + "batman-adv:Interface %s is not up - can't send packet via that interface!\n", + batman_if->dev); return; } @@ -101,9 +100,9 @@ void send_raw_packet(unsigned char *pack_buff, int pack_buff_len, * (which is > 0). This will not be treated as an error. */ retval = dev_queue_xmit(skb); if (retval < 0) - debug_log(LOG_TYPE_CRIT, - "Can't write to raw socket (IF_TO_BE_DEACTIVATED was here): %i\n", - retval); + printk(KERN_WARNING + "batman-adv:Can't write to raw socket: %i\n", + retval); } /* Send a packet to a given interface */ @@ -140,15 +139,15 @@ static void send_packet_to_if(struct forw_packet *forw_packet, fwd_str = (packet_num > 0 ? "Forwarding" : (forw_packet->own ? "Sending own" : "Forwarding")); - debug_log(LOG_TYPE_BATMAN, - "%s %spacket (originator %s, seqno %d, TQ %d, TTL %d, IDF %s) on interface %s [%s]\n", - fwd_str, - (packet_num > 0 ? "aggregated " : ""), - orig_str, ntohs(batman_packet->seqno), - batman_packet->tq, batman_packet->ttl, - (batman_packet->flags & DIRECTLINK ? - "on" : "off"), - batman_if->dev, batman_if->addr_str); + bat_dbg(DBG_BATMAN, + "%s %spacket (originator %s, seqno %d, TQ %d, TTL %d, IDF %s) on interface %s [%s]\n", + fwd_str, + (packet_num > 0 ? "aggregated " : ""), + orig_str, ntohs(batman_packet->seqno), + batman_packet->tq, batman_packet->ttl, + (batman_packet->flags & DIRECTLINK ? + "on" : "off"), + batman_if->dev, batman_if->addr_str); buff_pos += sizeof(struct batman_packet) + (batman_packet->num_hna * ETH_ALEN); @@ -172,8 +171,7 @@ static void send_packet(struct forw_packet *forw_packet) unsigned char directlink = (batman_packet->flags & DIRECTLINK ? 1 : 0); if (!forw_packet->if_incoming) { - debug_log(LOG_TYPE_CRIT, - "Error - can't forward packet: incoming iface not specified\n"); + printk(KERN_ERR "batman-adv: Error - can't forward packet: incoming iface not specified\n"); return; } @@ -188,12 +186,12 @@ static void send_packet(struct forw_packet *forw_packet) (forw_packet->own && (forw_packet->if_incoming->if_num > 0))) { /* FIXME: what about aggregated packets ? */ - debug_log(LOG_TYPE_BATMAN, - "%s packet (originator %s, seqno %d, TTL %d) on interface %s [%s]\n", - (forw_packet->own ? "Sending own" : "Forwarding"), - orig_str, ntohs(batman_packet->seqno), - batman_packet->ttl, forw_packet->if_incoming->dev, - forw_packet->if_incoming->addr_str); + bat_dbg(DBG_BATMAN, + "%s packet (originator %s, seqno %d, TTL %d) on interface %s [%s]\n", + (forw_packet->own ? "Sending own" : "Forwarding"), + orig_str, ntohs(batman_packet->seqno), + batman_packet->ttl, forw_packet->if_incoming->dev, + forw_packet->if_incoming->addr_str); send_raw_packet(forw_packet->packet_buff, forw_packet->packet_len, @@ -286,7 +284,7 @@ void schedule_forward_packet(struct orig_node *orig_node, unsigned long send_time; if (batman_packet->ttl <= 1) { - debug_log(LOG_TYPE_BATMAN, "ttl exceeded \n"); + bat_dbg(DBG_BATMAN, "ttl exceeded \n"); return; } @@ -314,9 +312,9 @@ void schedule_forward_packet(struct orig_node *orig_node, /* apply hop penalty */ batman_packet->tq = hop_penalty(batman_packet->tq); - debug_log(LOG_TYPE_BATMAN, "Forwarding packet: tq_orig: %i, tq_avg: %i, tq_forw: %i, ttl_orig: %i, ttl_forw: %i \n", - in_tq, tq_avg, batman_packet->tq, in_ttl - 1, - batman_packet->ttl); + bat_dbg(DBG_BATMAN, "Forwarding packet: tq_orig: %i, tq_avg: %i, tq_forw: %i, ttl_orig: %i, ttl_forw: %i \n", + in_tq, tq_avg, batman_packet->tq, in_ttl - 1, + batman_packet->ttl); batman_packet->seqno = htons(batman_packet->seqno); @@ -439,7 +437,7 @@ void purge_outstanding_packets(void) struct forw_packet *forw_packet; struct hlist_node *tmp_node, *safe_tmp_node; - debug_log(LOG_TYPE_BATMAN, "purge_outstanding_packets()\n"); + bat_dbg(DBG_BATMAN, "purge_outstanding_packets()\n"); /* free bcast list */ spin_lock(&forw_bcast_list_lock); diff --git a/drivers/staging/batman-adv/soft-interface.c b/drivers/staging/batman-adv/soft-interface.c index d543f50b647f..168a4e195a1c 100644 --- a/drivers/staging/batman-adv/soft-interface.c +++ b/drivers/staging/batman-adv/soft-interface.c @@ -24,7 +24,6 @@ #include "hard-interface.h" #include "send.h" #include "translation-table.h" -#include "log.h" #include "types.h" #include "hash.h" #include @@ -212,7 +211,7 @@ int interface_tx(struct sk_buff *skb, struct net_device *dev) * dropping */ if (!spin_trylock(&orig_hash_lock)) { lock_dropped++; - debug_log(LOG_TYPE_NOTICE, "%d packets dropped because lock was hold\n", lock_dropped); + printk(KERN_WARNING "batman-adv:%d packets dropped because lock was hold\n", lock_dropped); goto dropped; } diff --git a/drivers/staging/batman-adv/translation-table.c b/drivers/staging/batman-adv/translation-table.c index c2190e177c56..c7122da98f1e 100644 --- a/drivers/staging/batman-adv/translation-table.c +++ b/drivers/staging/batman-adv/translation-table.c @@ -21,7 +21,6 @@ #include "main.h" #include "translation-table.h" -#include "log.h" #include "soft-interface.h" #include "types.h" #include "hash.h" @@ -82,12 +81,12 @@ void hna_local_add(uint8_t *addr) MAC-flooding. */ if ((num_hna + 1 > (ETH_DATA_LEN - BAT_PACKET_LEN) / ETH_ALEN) || (num_hna + 1 > 255)) { - debug_log(LOG_TYPE_ROUTES, "Can't add new local hna entry (%s): number of local hna entries exceeds packet size \n", hna_str); + bat_dbg(DBG_ROUTES, "Can't add new local hna entry (%s): number of local hna entries exceeds packet size \n", hna_str); return; } - debug_log(LOG_TYPE_ROUTES, "Creating new local hna entry: %s \n", - hna_str); + bat_dbg(DBG_ROUTES, "Creating new local hna entry: %s \n", + hna_str); hna_local_entry = kmalloc(sizeof(struct hna_local_entry), GFP_ATOMIC); if (!hna_local_entry) @@ -113,7 +112,7 @@ void hna_local_add(uint8_t *addr) hna_local_hash->size * 2); if (swaphash == NULL) - debug_log(LOG_TYPE_CRIT, "Couldn't resize local hna hash table \n"); + printk(KERN_ERR "batman-adv:Couldn't resize local hna hash table \n"); else hna_local_hash = swaphash; } @@ -205,8 +204,8 @@ static void hna_local_del(struct hna_local_entry *hna_local_entry, char hna_str[ETH_STR_LEN]; addr_to_string(hna_str, hna_local_entry->addr); - debug_log(LOG_TYPE_ROUTES, "Deleting local hna entry (%s): %s \n", - hna_str, message); + bat_dbg(DBG_ROUTES, "Deleting local hna entry (%s): %s \n", + hna_str, message); hash_remove(hna_local_hash, hna_local_entry->addr); _hna_local_del(hna_local_entry); @@ -291,7 +290,9 @@ void hna_global_add_orig(struct orig_node *orig_node, memcpy(hna_global_entry->addr, hna_ptr, ETH_ALEN); addr_to_string(hna_str, hna_global_entry->addr); - debug_log(LOG_TYPE_ROUTES, "Creating new global hna entry: %s (via %s)\n", hna_str, orig_str); + bat_dbg(DBG_ROUTES, + "Creating new global hna entry: %s (via %s)\n", + hna_str, orig_str); spin_lock_irqsave(&hna_global_hash_lock, flags); hash_add(hna_global_hash, hna_global_entry); @@ -333,7 +334,7 @@ void hna_global_add_orig(struct orig_node *orig_node, hna_global_hash->size * 2); if (swaphash == NULL) - debug_log(LOG_TYPE_CRIT, "Couldn't resize global hna hash table \n"); + printk(KERN_ERR "batman-adv:Couldn't resize global hna hash table \n"); else hna_global_hash = swaphash; } @@ -386,7 +387,8 @@ void _hna_global_del_orig(struct hna_global_entry *hna_global_entry, addr_to_string(orig_str, hna_global_entry->orig_node->orig); addr_to_string(hna_str, hna_global_entry->addr); - debug_log(LOG_TYPE_ROUTES, "Deleting global hna entry %s (via %s): %s \n", hna_str, orig_str, message); + bat_dbg(DBG_ROUTES, "Deleting global hna entry %s (via %s): %s \n", + hna_str, orig_str, message); hash_remove(hna_global_hash, hna_global_entry->addr); kfree(hna_global_entry); diff --git a/drivers/staging/batman-adv/vis.c b/drivers/staging/batman-adv/vis.c index f6c9acb289ed..cdb8aab146d7 100644 --- a/drivers/staging/batman-adv/vis.c +++ b/drivers/staging/batman-adv/vis.c @@ -23,7 +23,6 @@ #include "send.h" #include "translation-table.h" #include "vis.h" -#include "log.h" #include "soft-interface.h" #include "hard-interface.h" #include "hash.h" @@ -445,8 +444,7 @@ static void send_vis_packet(struct vis_info *info) int packet_length; if (info->packet.ttl < 2) { - debug_log(LOG_TYPE_NOTICE, - "Error - can't send vis packet: ttl exceeded\n"); + printk(KERN_WARNING "batman-adv: Error - can't send vis packet: ttl exceeded\n"); return; } @@ -495,13 +493,13 @@ int vis_init(void) vis_hash = hash_new(256, vis_info_cmp, vis_info_choose); if (!vis_hash) { - debug_log(LOG_TYPE_CRIT, "Can't initialize vis_hash\n"); + printk(KERN_ERR "batman-adv:Can't initialize vis_hash\n"); goto err; } my_vis_info = kmalloc(1000, GFP_ATOMIC); if (!my_vis_info) { - debug_log(LOG_TYPE_CRIT, "Can't initialize vis packet\n"); + printk(KERN_ERR "batman-adv:Can't initialize vis packet\n"); goto err; } @@ -522,8 +520,8 @@ int vis_init(void) memcpy(my_vis_info->packet.sender_orig, mainIfAddr, ETH_ALEN); if (hash_add(vis_hash, my_vis_info) < 0) { - debug_log(LOG_TYPE_CRIT, - "Can't add own vis packet into hash\n"); + printk(KERN_ERR + "batman-adv:Can't add own vis packet into hash\n"); free_info(my_vis_info); /* not in hash, need to remove it * manually. */ goto err; From 4efe0b06559e8cb39c3d6a9bd01cc99604dfd247 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Sat, 12 Dec 2009 23:39:42 +0100 Subject: [PATCH 029/367] Staging: batman-adv: Refactor routing.c Break up a lot of the big functions up into many smaller ones. This helps with readability and there is now a lot less code squashed against the right hand margin. Signed-off-by: Andrew Lunn Acked-by: Marek Lindner Acked-by: Simon Wunderlich Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/routing.c | 1318 ++++++++++++++++---------- 1 file changed, 794 insertions(+), 524 deletions(-) diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c index 1f42d4167422..1ff2a7aae108 100644 --- a/drivers/staging/batman-adv/routing.c +++ b/drivers/staging/batman-adv/routing.c @@ -19,10 +19,6 @@ * */ - - - - #include "main.h" #include "routing.h" #include "send.h" @@ -37,8 +33,6 @@ #include "aggregation.h" #include "compat.h" - - DECLARE_WAIT_QUEUE_HEAD(thread_wait); static DECLARE_DELAYED_WORK(purge_orig_wq, purge_orig); @@ -83,7 +77,9 @@ void originator_free(void) spin_unlock(&orig_hash_lock); } -static struct neigh_node *create_neighbor(struct orig_node *orig_node, struct orig_node *orig_neigh_node, uint8_t *neigh, struct batman_if *if_incoming) +static struct neigh_node * +create_neighbor(struct orig_node *orig_node, struct orig_node *orig_neigh_node, + uint8_t *neigh, struct batman_if *if_incoming) { struct neigh_node *neigh_node; @@ -122,12 +118,14 @@ void free_orig_node(void *data) kfree(orig_node); } -/* this function finds or creates an originator entry for the given address if it does not exits */ +/* this function finds or creates an originator entry for the given + * address if it does not exits */ static struct orig_node *get_orig_node(uint8_t *addr) { struct orig_node *orig_node; struct hashtable_t *swaphash; char orig_str[ETH_STR_LEN]; + int size; orig_node = ((struct orig_node *)hash_find(orig_hash, addr)); @@ -146,11 +144,14 @@ static struct orig_node *get_orig_node(uint8_t *addr) orig_node->batman_if = NULL; orig_node->hna_buff = NULL; - orig_node->bcast_own = kmalloc(num_ifs * sizeof(TYPE_OF_WORD) * NUM_WORDS, GFP_ATOMIC); - memset(orig_node->bcast_own, 0, num_ifs * sizeof(TYPE_OF_WORD) * NUM_WORDS); + size = num_ifs * sizeof(TYPE_OF_WORD) * NUM_WORDS; - orig_node->bcast_own_sum = kmalloc(num_ifs * sizeof(uint8_t), GFP_ATOMIC); - memset(orig_node->bcast_own_sum, 0, num_ifs * sizeof(uint8_t)); + orig_node->bcast_own = kmalloc(size, GFP_ATOMIC); + memset(orig_node->bcast_own, 0, size); + + size = num_ifs * sizeof(uint8_t); + orig_node->bcast_own_sum = kmalloc(size, GFP_ATOMIC); + memset(orig_node->bcast_own_sum, 0, size); hash_add(orig_hash, orig_node); @@ -158,7 +159,8 @@ static struct orig_node *get_orig_node(uint8_t *addr) swaphash = hash_resize(orig_hash, orig_hash->size * 2); if (swaphash == NULL) - printk(KERN_ERR "batman-adv:Couldn't resize orig hash table \n"); + printk(KERN_ERR + "batman-adv:Couldn't resize orig hash table \n"); else orig_hash = swaphash; } @@ -170,75 +172,99 @@ void slide_own_bcast_window(struct batman_if *batman_if) { struct hash_it_t *hashit = NULL; struct orig_node *orig_node; + TYPE_OF_WORD *word; spin_lock(&orig_hash_lock); while (NULL != (hashit = hash_iterate(orig_hash, hashit))) { orig_node = hashit->bucket->data; + word = &(orig_node->bcast_own[batman_if->if_num * NUM_WORDS]); - bit_get_packet((TYPE_OF_WORD *)&(orig_node->bcast_own[batman_if->if_num * NUM_WORDS]), 1, 0); - orig_node->bcast_own_sum[batman_if->if_num] = bit_packet_count((TYPE_OF_WORD *)&(orig_node->bcast_own[batman_if->if_num * NUM_WORDS])); + bit_get_packet(word, 1, 0); + orig_node->bcast_own_sum[batman_if->if_num] = + bit_packet_count(word); } spin_unlock(&orig_hash_lock); } -static void update_routes(struct orig_node *orig_node, struct neigh_node *neigh_node, unsigned char *hna_buff, int hna_buff_len) +static void update_HNA(struct orig_node *orig_node, + unsigned char *hna_buff, int hna_buff_len) +{ + if ((hna_buff_len != orig_node->hna_buff_len) || + ((hna_buff_len > 0) && + (orig_node->hna_buff_len > 0) && + (memcmp(orig_node->hna_buff, hna_buff, hna_buff_len) != 0))) { + + if (orig_node->hna_buff_len > 0) + hna_global_del_orig(orig_node, + "originator changed hna"); + + if ((hna_buff_len > 0) && (hna_buff != NULL)) + hna_global_add_orig(orig_node, hna_buff, hna_buff_len); + } +} + +static void update_route(struct orig_node *orig_node, + struct neigh_node *neigh_node, + unsigned char *hna_buff, int hna_buff_len) +{ + char orig_str[ETH_STR_LEN], neigh_str[ETH_STR_LEN]; + char router_str[ETH_STR_LEN]; + + addr_to_string(orig_str, orig_node->orig); + + /* route deleted */ + if ((orig_node->router != NULL) && (neigh_node == NULL)) { + + bat_dbg(DBG_ROUTES, "Deleting route towards: %s\n", + orig_str); + hna_global_del_orig(orig_node, "originator timed out"); + + /* route added */ + } else if ((orig_node->router == NULL) && (neigh_node != NULL)) { + + addr_to_string(neigh_str, neigh_node->addr); + bat_dbg(DBG_ROUTES, + "Adding route towards: %s (via %s)\n", + orig_str, neigh_str); + hna_global_add_orig(orig_node, hna_buff, hna_buff_len); + + /* route changed */ + } else { + addr_to_string(neigh_str, neigh_node->addr); + addr_to_string(router_str, orig_node->router->addr); + bat_dbg(DBG_ROUTES, "Changing route towards: %s (now via %s - was via %s)\n", orig_str, neigh_str, router_str); + } + + if (neigh_node != NULL) + orig_node->batman_if = neigh_node->if_incoming; + else + orig_node->batman_if = NULL; + + orig_node->router = neigh_node; +} + + +static void update_routes(struct orig_node *orig_node, + struct neigh_node *neigh_node, + unsigned char *hna_buff, int hna_buff_len) { - char orig_str[ETH_STR_LEN], neigh_str[ETH_STR_LEN], router_str[ETH_STR_LEN]; if (orig_node == NULL) return; - if (orig_node->router != neigh_node) { - addr_to_string(orig_str, orig_node->orig); - - /* route deleted */ - if ((orig_node->router != NULL) && (neigh_node == NULL)) { - bat_dbg(DBG_ROUTES, "Deleting route towards: %s\n", - orig_str); - hna_global_del_orig(orig_node, "originator timed out"); - - /* route added */ - } else if ((orig_node->router == NULL) && (neigh_node != NULL)) { - - addr_to_string(neigh_str, neigh_node->addr); - bat_dbg(DBG_ROUTES, "Adding route towards: %s (via %s)\n", orig_str, neigh_str); - hna_global_add_orig(orig_node, hna_buff, hna_buff_len); - - /* route changed */ - } else { - - addr_to_string(neigh_str, neigh_node->addr); - addr_to_string(router_str, orig_node->router->addr); - bat_dbg(DBG_ROUTES, "Changing route towards: %s (now via %s - was via %s)\n", orig_str, neigh_str, router_str); - - } - - if (neigh_node != NULL) - orig_node->batman_if = neigh_node->if_incoming; - else - orig_node->batman_if = NULL; - - orig_node->router = neigh_node; - + if (orig_node->router != neigh_node) + update_route(orig_node, neigh_node, hna_buff, hna_buff_len); /* may be just HNA changed */ - } else { - - if ((hna_buff_len != orig_node->hna_buff_len) || ((hna_buff_len > 0) && (orig_node->hna_buff_len > 0) && (memcmp(orig_node->hna_buff, hna_buff, hna_buff_len) != 0))) { - - if (orig_node->hna_buff_len > 0) - hna_global_del_orig(orig_node, "originator changed hna"); - - if ((hna_buff_len > 0) && (hna_buff != NULL)) - hna_global_add_orig(orig_node, hna_buff, hna_buff_len); - - } - - } + else + update_HNA(orig_node, hna_buff, hna_buff_len); } -static int isBidirectionalNeigh(struct orig_node *orig_node, struct orig_node *orig_neigh_node, struct batman_packet *batman_packet, struct batman_if *if_incoming) +static int isBidirectionalNeigh(struct orig_node *orig_node, + struct orig_node *orig_neigh_node, + struct batman_packet *batman_packet, + struct batman_if *if_incoming) { struct neigh_node *neigh_node = NULL, *tmp_neigh_node = NULL; char orig_str[ETH_STR_LEN], neigh_str[ETH_STR_LEN]; @@ -248,66 +274,100 @@ static int isBidirectionalNeigh(struct orig_node *orig_node, struct orig_node *o addr_to_string(neigh_str, orig_neigh_node->orig); if (orig_node == orig_neigh_node) { - list_for_each_entry(tmp_neigh_node, &orig_node->neigh_list, list) { + list_for_each_entry(tmp_neigh_node, + &orig_node->neigh_list, + list) { - if (compare_orig(tmp_neigh_node->addr, orig_neigh_node->orig) && (tmp_neigh_node->if_incoming == if_incoming)) + if (compare_orig(tmp_neigh_node->addr, + orig_neigh_node->orig) && + (tmp_neigh_node->if_incoming == if_incoming)) neigh_node = tmp_neigh_node; } if (neigh_node == NULL) - neigh_node = create_neighbor(orig_node, orig_neigh_node, orig_neigh_node->orig, if_incoming); + neigh_node = create_neighbor(orig_node, + orig_neigh_node, + orig_neigh_node->orig, + if_incoming); neigh_node->last_valid = jiffies; } else { /* find packet count of corresponding one hop neighbor */ - list_for_each_entry(tmp_neigh_node, &orig_neigh_node->neigh_list, list) { + list_for_each_entry(tmp_neigh_node, + &orig_neigh_node->neigh_list, list) { - if (compare_orig(tmp_neigh_node->addr, orig_neigh_node->orig) && (tmp_neigh_node->if_incoming == if_incoming)) + if (compare_orig(tmp_neigh_node->addr, + orig_neigh_node->orig) && + (tmp_neigh_node->if_incoming == if_incoming)) neigh_node = tmp_neigh_node; } if (neigh_node == NULL) - neigh_node = create_neighbor(orig_neigh_node, orig_neigh_node, orig_neigh_node->orig, if_incoming); + neigh_node = create_neighbor(orig_neigh_node, + orig_neigh_node, + orig_neigh_node->orig, + if_incoming); } orig_node->last_valid = jiffies; /* pay attention to not get a value bigger than 100 % */ - total_count = (orig_neigh_node->bcast_own_sum[if_incoming->if_num] > neigh_node->real_packet_count ? neigh_node->real_packet_count : orig_neigh_node->bcast_own_sum[if_incoming->if_num]); + total_count = (orig_neigh_node->bcast_own_sum[if_incoming->if_num] > + neigh_node->real_packet_count ? + neigh_node->real_packet_count : + orig_neigh_node->bcast_own_sum[if_incoming->if_num]); /* if we have too few packets (too less data) we set tq_own to zero */ /* if we receive too few packets it is not considered bidirectional */ - if ((total_count < TQ_LOCAL_BIDRECT_SEND_MINIMUM) || (neigh_node->real_packet_count < TQ_LOCAL_BIDRECT_RECV_MINIMUM)) + if ((total_count < TQ_LOCAL_BIDRECT_SEND_MINIMUM) || + (neigh_node->real_packet_count < TQ_LOCAL_BIDRECT_RECV_MINIMUM)) orig_neigh_node->tq_own = 0; else - /* neigh_node->real_packet_count is never zero as we only purge old information when getting new information */ - orig_neigh_node->tq_own = (TQ_MAX_VALUE * total_count) / neigh_node->real_packet_count; + /* neigh_node->real_packet_count is never zero as we + * only purge old information when getting new + * information */ + orig_neigh_node->tq_own = (TQ_MAX_VALUE * total_count) / + neigh_node->real_packet_count; /* - * 1 - ((1-x) ** 3), normalized to TQ_MAX_VALUE - * this does affect the nearly-symmetric links only a little, - * but punishes asymmetric links more. - * this will give a value between 0 and TQ_MAX_VALUE + * 1 - ((1-x) ** 3), normalized to TQ_MAX_VALUE this does + * affect the nearly-symmetric links only a little, but + * punishes asymmetric links more. This will give a value + * between 0 and TQ_MAX_VALUE */ - orig_neigh_node->tq_asym_penalty = TQ_MAX_VALUE - (TQ_MAX_VALUE * - (TQ_LOCAL_WINDOW_SIZE - neigh_node->real_packet_count) * - (TQ_LOCAL_WINDOW_SIZE - neigh_node->real_packet_count) * - (TQ_LOCAL_WINDOW_SIZE - neigh_node->real_packet_count)) / - (TQ_LOCAL_WINDOW_SIZE * TQ_LOCAL_WINDOW_SIZE * TQ_LOCAL_WINDOW_SIZE); + orig_neigh_node->tq_asym_penalty = + TQ_MAX_VALUE - + (TQ_MAX_VALUE * + (TQ_LOCAL_WINDOW_SIZE - neigh_node->real_packet_count) * + (TQ_LOCAL_WINDOW_SIZE - neigh_node->real_packet_count) * + (TQ_LOCAL_WINDOW_SIZE - neigh_node->real_packet_count)) / + (TQ_LOCAL_WINDOW_SIZE * + TQ_LOCAL_WINDOW_SIZE * + TQ_LOCAL_WINDOW_SIZE); - batman_packet->tq = ((batman_packet->tq * orig_neigh_node->tq_own * orig_neigh_node->tq_asym_penalty) / (TQ_MAX_VALUE * TQ_MAX_VALUE)); + batman_packet->tq = ((batman_packet->tq * + orig_neigh_node->tq_own * + orig_neigh_node->tq_asym_penalty) / + (TQ_MAX_VALUE * TQ_MAX_VALUE)); bat_dbg(DBG_BATMAN, "bidirectional: orig = %-15s neigh = %-15s => own_bcast = %2i, real recv = %2i, local tq: %3i, asym_penalty: %3i, total tq: %3i \n", - orig_str, neigh_str, total_count, neigh_node->real_packet_count, orig_neigh_node->tq_own, orig_neigh_node->tq_asym_penalty, batman_packet->tq); + orig_str, neigh_str, total_count, + neigh_node->real_packet_count, orig_neigh_node->tq_own, + orig_neigh_node->tq_asym_penalty, batman_packet->tq); - /* if link has the minimum required transmission quality consider it bidirectional */ + /* if link has the minimum required transmission quality + * consider it bidirectional */ if (batman_packet->tq >= TQ_TOTAL_BIDRECT_LIMIT) return 1; return 0; } -static void update_orig(struct orig_node *orig_node, struct ethhdr *ethhdr, struct batman_packet *batman_packet, struct batman_if *if_incoming, unsigned char *hna_buff, int hna_buff_len, char is_duplicate) +static void update_orig(struct orig_node *orig_node, struct ethhdr *ethhdr, + struct batman_packet *batman_packet, + struct batman_if *if_incoming, + unsigned char *hna_buff, int hna_buff_len, + char is_duplicate) { struct neigh_node *neigh_node = NULL, *tmp_neigh_node = NULL; int tmp_hna_buff_len; @@ -315,7 +375,8 @@ static void update_orig(struct orig_node *orig_node, struct ethhdr *ethhdr, stru bat_dbg(DBG_BATMAN, "update_originator(): Searching and updating originator entry of received packet \n"); list_for_each_entry(tmp_neigh_node, &orig_node->neigh_list, list) { - if (compare_orig(tmp_neigh_node->addr, ethhdr->h_source) && (tmp_neigh_node->if_incoming == if_incoming)) { + if (compare_orig(tmp_neigh_node->addr, ethhdr->h_source) && + (tmp_neigh_node->if_incoming == if_incoming)) { neigh_node = tmp_neigh_node; continue; } @@ -323,19 +384,26 @@ static void update_orig(struct orig_node *orig_node, struct ethhdr *ethhdr, stru if (is_duplicate) continue; - ring_buffer_set(tmp_neigh_node->tq_recv, &tmp_neigh_node->tq_index, 0); - tmp_neigh_node->tq_avg = ring_buffer_avg(tmp_neigh_node->tq_recv); + ring_buffer_set(tmp_neigh_node->tq_recv, + &tmp_neigh_node->tq_index, 0); + tmp_neigh_node->tq_avg = + ring_buffer_avg(tmp_neigh_node->tq_recv); } if (neigh_node == NULL) - neigh_node = create_neighbor(orig_node, get_orig_node(ethhdr->h_source), ethhdr->h_source, if_incoming); + neigh_node = create_neighbor(orig_node, + get_orig_node(ethhdr->h_source), + ethhdr->h_source, if_incoming); else - bat_dbg(DBG_BATMAN, "Updating existing last-hop neighbour of originator\n"); + bat_dbg(DBG_BATMAN, + "Updating existing last-hop neighbour of originator\n"); orig_node->flags = batman_packet->flags; neigh_node->last_valid = jiffies; - ring_buffer_set(neigh_node->tq_recv, &neigh_node->tq_index, batman_packet->tq); + ring_buffer_set(neigh_node->tq_recv, + &neigh_node->tq_index, + batman_packet->tq); neigh_node->tq_avg = ring_buffer_avg(neigh_node->tq_recv); if (!is_duplicate) { @@ -343,9 +411,11 @@ static void update_orig(struct orig_node *orig_node, struct ethhdr *ethhdr, stru neigh_node->last_ttl = batman_packet->ttl; } - tmp_hna_buff_len = (hna_buff_len > batman_packet->num_hna * ETH_ALEN ? batman_packet->num_hna * ETH_ALEN : hna_buff_len); + tmp_hna_buff_len = (hna_buff_len > batman_packet->num_hna * ETH_ALEN ? + batman_packet->num_hna * ETH_ALEN : hna_buff_len); - /* if this neighbor already is our next hop there is nothing to change */ + /* if this neighbor already is our next hop there is nothing + * to change */ if (orig_node->router == neigh_node) goto update_hna; @@ -354,11 +424,12 @@ static void update_orig(struct orig_node *orig_node, struct ethhdr *ethhdr, stru (orig_node->router->tq_avg > neigh_node->tq_avg)) goto update_hna; - /* if the TQ is the same and the link not more symetric we won't consider it either */ + /* if the TQ is the same and the link not more symetric we + * won't consider it either */ if ((orig_node->router) && ((neigh_node->tq_avg == orig_node->router->tq_avg) && - (orig_node->router->orig_node->bcast_own_sum[if_incoming->if_num] >= - neigh_node->orig_node->bcast_own_sum[if_incoming->if_num]))) + (orig_node->router->orig_node->bcast_own_sum[if_incoming->if_num] + >= neigh_node->orig_node->bcast_own_sum[if_incoming->if_num]))) goto update_hna; update_routes(orig_node, neigh_node, hna_buff, tmp_hna_buff_len); @@ -369,29 +440,35 @@ update_hna: return; } -static char count_real_packets(struct ethhdr *ethhdr, struct batman_packet *batman_packet, struct batman_if *if_incoming) +static char count_real_packets(struct ethhdr *ethhdr, + struct batman_packet *batman_packet, + struct batman_if *if_incoming) { struct orig_node *orig_node; struct neigh_node *tmp_neigh_node; char is_duplicate = 0; - + uint16_t seq_diff; orig_node = get_orig_node(batman_packet->orig); if (orig_node == NULL) return 0; - list_for_each_entry(tmp_neigh_node, &orig_node->neigh_list, list) { if (!is_duplicate) - is_duplicate = get_bit_status(tmp_neigh_node->real_bits, orig_node->last_real_seqno, batman_packet->seqno); - - if (compare_orig(tmp_neigh_node->addr, ethhdr->h_source) && (tmp_neigh_node->if_incoming == if_incoming)) - bit_get_packet(tmp_neigh_node->real_bits, batman_packet->seqno - orig_node->last_real_seqno, 1); + is_duplicate = + get_bit_status(tmp_neigh_node->real_bits, + orig_node->last_real_seqno, + batman_packet->seqno); + seq_diff = batman_packet->seqno - orig_node->last_real_seqno; + if (compare_orig(tmp_neigh_node->addr, ethhdr->h_source) && + (tmp_neigh_node->if_incoming == if_incoming)) + bit_get_packet(tmp_neigh_node->real_bits, seq_diff, 1); else - bit_get_packet(tmp_neigh_node->real_bits, batman_packet->seqno - orig_node->last_real_seqno, 0); + bit_get_packet(tmp_neigh_node->real_bits, seq_diff, 0); - tmp_neigh_node->real_packet_count = bit_packet_count(tmp_neigh_node->real_bits); + tmp_neigh_node->real_packet_count = + bit_packet_count(tmp_neigh_node->real_bits); } if (!is_duplicate) { @@ -403,24 +480,33 @@ static char count_real_packets(struct ethhdr *ethhdr, struct batman_packet *batm return is_duplicate; } -void receive_bat_packet(struct ethhdr *ethhdr, struct batman_packet *batman_packet, unsigned char *hna_buff, int hna_buff_len, struct batman_if *if_incoming) +void receive_bat_packet(struct ethhdr *ethhdr, + struct batman_packet *batman_packet, + unsigned char *hna_buff, + int hna_buff_len, + struct batman_if *if_incoming) { struct batman_if *batman_if; struct orig_node *orig_neigh_node, *orig_node; - char orig_str[ETH_STR_LEN], prev_sender_str[ETH_STR_LEN], neigh_str[ETH_STR_LEN]; + char orig_str[ETH_STR_LEN], prev_sender_str[ETH_STR_LEN]; + char neigh_str[ETH_STR_LEN]; char has_directlink_flag; - char is_my_addr = 0, is_my_orig = 0, is_my_oldorig = 0, is_broadcast = 0, is_bidirectional, is_single_hop_neigh, is_duplicate; + char is_my_addr = 0, is_my_orig = 0, is_my_oldorig = 0; + char is_broadcast = 0, is_bidirectional, is_single_hop_neigh; + char is_duplicate; unsigned short if_incoming_seqno; - /* Silently drop when the batman packet is actually not a correct packet. + /* Silently drop when the batman packet is actually not a + * correct packet. * * This might happen if a packet is padded (e.g. Ethernet has a * minimum frame length of 64 byte) and the aggregation interprets * it as an additional length. * - * TODO: A more sane solution would be to have a bit in the batman_packet - * to detect whether the packet is the last packet in an aggregation. - * Here we expect that the padding is always zero (or not 0x01) + * TODO: A more sane solution would be to have a bit in the + * batman_packet to detect whether the packet is the last + * packet in an aggregation. Here we expect that the padding + * is always zero (or not 0x01) */ if (batman_packet->packet_type != BAT_PACKET) return; @@ -434,21 +520,29 @@ void receive_bat_packet(struct ethhdr *ethhdr, struct batman_packet *batman_pack has_directlink_flag = (batman_packet->flags & DIRECTLINK ? 1 : 0); - is_single_hop_neigh = (compare_orig(ethhdr->h_source, batman_packet->orig) ? 1 : 0); + is_single_hop_neigh = (compare_orig(ethhdr->h_source, + batman_packet->orig) ? 1 : 0); - bat_dbg(DBG_BATMAN, "Received BATMAN packet via NB: %s, IF: %s [%s] (from OG: %s, via prev OG: %s, seqno %d, tq %d, TTL %d, V %d, IDF %d) \n", neigh_str, if_incoming->dev, if_incoming->addr_str, orig_str, prev_sender_str, batman_packet->seqno, batman_packet->tq, batman_packet->ttl, batman_packet->version, has_directlink_flag); + bat_dbg(DBG_BATMAN, "Received BATMAN packet via NB: %s, IF: %s [%s] (from OG: %s, via prev OG: %s, seqno %d, tq %d, TTL %d, V %d, IDF %d) \n", + neigh_str, if_incoming->dev, if_incoming->addr_str, + orig_str, prev_sender_str, batman_packet->seqno, + batman_packet->tq, batman_packet->ttl, batman_packet->version, + has_directlink_flag); list_for_each_entry_rcu(batman_if, &if_list, list) { if (batman_if->if_active != IF_ACTIVE) continue; - if (compare_orig(ethhdr->h_source, batman_if->net_dev->dev_addr)) + if (compare_orig(ethhdr->h_source, + batman_if->net_dev->dev_addr)) is_my_addr = 1; - if (compare_orig(batman_packet->orig, batman_if->net_dev->dev_addr)) + if (compare_orig(batman_packet->orig, + batman_if->net_dev->dev_addr)) is_my_orig = 1; - if (compare_orig(batman_packet->prev_sender, batman_if->net_dev->dev_addr)) + if (compare_orig(batman_packet->prev_sender, + batman_if->net_dev->dev_addr)) is_my_oldorig = 1; if (compare_orig(ethhdr->h_source, broadcastAddr)) @@ -456,12 +550,16 @@ void receive_bat_packet(struct ethhdr *ethhdr, struct batman_packet *batman_pack } if (batman_packet->version != COMPAT_VERSION) { - bat_dbg(DBG_BATMAN, "Drop packet: incompatible batman version (%i) \n", batman_packet->version); + bat_dbg(DBG_BATMAN, + "Drop packet: incompatible batman version (%i)\n", + batman_packet->version); return; } if (is_my_addr) { - bat_dbg(DBG_BATMAN, "Drop packet: received my own broadcast (sender: %s) \n", neigh_str); + bat_dbg(DBG_BATMAN, + "Drop packet: received my own broadcast (sender: %s)\n", + neigh_str); return; } @@ -471,14 +569,24 @@ void receive_bat_packet(struct ethhdr *ethhdr, struct batman_packet *batman_pack } if (is_my_orig) { + TYPE_OF_WORD *word; + int offset; + orig_neigh_node = get_orig_node(ethhdr->h_source); - /* neighbour has to indicate direct link and it has to come via the corresponding interface */ - /* if received seqno equals last send seqno save new seqno for bidirectional check */ - if (has_directlink_flag && compare_orig(if_incoming->net_dev->dev_addr, batman_packet->orig) && - (batman_packet->seqno - if_incoming_seqno + 2 == 0)) { - bit_mark((TYPE_OF_WORD *)&(orig_neigh_node->bcast_own[if_incoming->if_num * NUM_WORDS]), 0); - orig_neigh_node->bcast_own_sum[if_incoming->if_num] = bit_packet_count((TYPE_OF_WORD *)&(orig_neigh_node->bcast_own[if_incoming->if_num * NUM_WORDS])); + /* neighbour has to indicate direct link and it has to + * come via the corresponding interface */ + /* if received seqno equals last send seqno save new + * seqno for bidirectional check */ + if (has_directlink_flag && + compare_orig(if_incoming->net_dev->dev_addr, + batman_packet->orig) && + (batman_packet->seqno - if_incoming_seqno + 2 == 0)) { + offset = if_incoming->if_num * NUM_WORDS; + word = &(orig_neigh_node->bcast_own[offset]); + bit_mark(word, 0); + orig_neigh_node->bcast_own_sum[if_incoming->if_num] = + bit_packet_count(word); } bat_dbg(DBG_BATMAN, "Drop packet: originator packet from myself (via neighbour) \n"); @@ -504,38 +612,50 @@ void receive_bat_packet(struct ethhdr *ethhdr, struct batman_packet *batman_pack return; /* avoid temporary routing loops */ - if ((orig_node->router) && (orig_node->router->orig_node->router) && - (compare_orig(orig_node->router->addr, batman_packet->prev_sender)) && + if ((orig_node->router) && + (orig_node->router->orig_node->router) && + (compare_orig(orig_node->router->addr, + batman_packet->prev_sender)) && !(compare_orig(batman_packet->orig, batman_packet->prev_sender)) && - (compare_orig(orig_node->router->addr, orig_node->router->orig_node->router->addr))) { + (compare_orig(orig_node->router->addr, + orig_node->router->orig_node->router->addr))) { bat_dbg(DBG_BATMAN, "Drop packet: ignoring all rebroadcast packets that may make me loop (sender: %s) \n", neigh_str); return; } - /* if sender is a direct neighbor the sender mac equals originator mac */ - orig_neigh_node = (is_single_hop_neigh ? orig_node : get_orig_node(ethhdr->h_source)); + /* if sender is a direct neighbor the sender mac equals + * originator mac */ + orig_neigh_node = (is_single_hop_neigh ? + orig_node : get_orig_node(ethhdr->h_source)); if (orig_neigh_node == NULL) return; - /* drop packet if sender is not a direct neighbor and if we don't route towards it */ - if (!is_single_hop_neigh && (orig_neigh_node->router == NULL)) { + /* drop packet if sender is not a direct neighbor and if we + * don't route towards it */ + if (!is_single_hop_neigh && + (orig_neigh_node->router == NULL)) { bat_dbg(DBG_BATMAN, "Drop packet: OGM via unknown neighbor!\n"); return; } - is_bidirectional = isBidirectionalNeigh(orig_node, orig_neigh_node, batman_packet, if_incoming); + is_bidirectional = isBidirectionalNeigh(orig_node, orig_neigh_node, + batman_packet, if_incoming); - /* update ranking if it is not a duplicate or has the same seqno and similar ttl as the non-duplicate */ - if (is_bidirectional && (!is_duplicate || - ((orig_node->last_real_seqno == batman_packet->seqno) && - (orig_node->last_ttl - 3 <= batman_packet->ttl)))) - update_orig(orig_node, ethhdr, batman_packet, if_incoming, hna_buff, hna_buff_len, is_duplicate); + /* update ranking if it is not a duplicate or has the same + * seqno and similar ttl as the non-duplicate */ + if (is_bidirectional && + (!is_duplicate || + ((orig_node->last_real_seqno == batman_packet->seqno) && + (orig_node->last_ttl - 3 <= batman_packet->ttl)))) + update_orig(orig_node, ethhdr, batman_packet, + if_incoming, hna_buff, hna_buff_len, is_duplicate); /* is single hop (direct) neighbour */ if (is_single_hop_neigh) { /* mark direct link on incoming interface */ - schedule_forward_packet(orig_node, ethhdr, batman_packet, 1, hna_buff_len, if_incoming); + schedule_forward_packet(orig_node, ethhdr, batman_packet, + 1, hna_buff_len, if_incoming); bat_dbg(DBG_BATMAN, "Forwarding packet: rebroadcast neighbour packet with direct link flag\n"); return; @@ -543,7 +663,8 @@ void receive_bat_packet(struct ethhdr *ethhdr, struct batman_packet *batman_pack /* multihop originator */ if (!is_bidirectional) { - bat_dbg(DBG_BATMAN, "Drop packet: not received via bidirectional link\n"); + bat_dbg(DBG_BATMAN, + "Drop packet: not received via bidirectional link\n"); return; } @@ -552,65 +673,85 @@ void receive_bat_packet(struct ethhdr *ethhdr, struct batman_packet *batman_pack return; } - bat_dbg(DBG_BATMAN, "Forwarding packet: rebroadcast originator packet\n"); - schedule_forward_packet(orig_node, ethhdr, batman_packet, 0, hna_buff_len, if_incoming); + bat_dbg(DBG_BATMAN, + "Forwarding packet: rebroadcast originator packet\n"); + schedule_forward_packet(orig_node, ethhdr, batman_packet, + 0, hna_buff_len, if_incoming); } +static bool purge_orig_neigbours(struct orig_node *orig_node, + struct neigh_node **best_neigh_node) +{ + struct list_head *list_pos, *list_pos_tmp; + char neigh_str[ETH_STR_LEN], orig_str[ETH_STR_LEN]; + struct neigh_node *neigh_node; + bool neigh_purged = false; + + *best_neigh_node = NULL; + + + /* for all neighbours towards this originator ... */ + list_for_each_safe(list_pos, list_pos_tmp, &orig_node->neigh_list) { + neigh_node = list_entry(list_pos, struct neigh_node, list); + + if (time_after(jiffies, + (neigh_node->last_valid + + ((PURGE_TIMEOUT * HZ) / 1000)))) { + + addr_to_string(neigh_str, neigh_node->addr); + bat_dbg(DBG_BATMAN, "Neighbour timeout: originator %s, neighbour: %s, last_valid %lu\n", orig_str, neigh_str, (neigh_node->last_valid / HZ)); + + neigh_purged = true; + list_del(list_pos); + kfree(neigh_node); + } else { + if ((*best_neigh_node == NULL) || + (neigh_node->tq_avg > (*best_neigh_node)->tq_avg)) + *best_neigh_node = neigh_node; + } + } + return neigh_purged; +} + +static bool purge_orig_node(struct orig_node *orig_node) +{ + struct neigh_node *best_neigh_node; + char orig_str[ETH_STR_LEN]; + + addr_to_string(orig_str, orig_node->orig); + + if (time_after(jiffies, + (orig_node->last_valid + + ((2 * PURGE_TIMEOUT * HZ) / 1000)))) { + + bat_dbg(DBG_BATMAN, + "Originator timeout: originator %s, last_valid %lu\n", + orig_str, (orig_node->last_valid / HZ)); + return true; + } else { + if (purge_orig_neigbours(orig_node, &best_neigh_node)) + update_routes(orig_node, best_neigh_node, + orig_node->hna_buff, + orig_node->hna_buff_len); + } + return false; +} + + void purge_orig(struct work_struct *work) { - struct list_head *list_pos, *list_pos_tmp; struct hash_it_t *hashit = NULL; struct orig_node *orig_node; - struct neigh_node *neigh_node, *best_neigh_node; - char orig_str[ETH_STR_LEN], neigh_str[ETH_STR_LEN], neigh_purged; spin_lock(&orig_hash_lock); /* for all origins... */ while (NULL != (hashit = hash_iterate(orig_hash, hashit))) { - orig_node = hashit->bucket->data; - addr_to_string(orig_str, orig_node->orig); - - if (time_after(jiffies, orig_node->last_valid + ((2 * PURGE_TIMEOUT * HZ) / 1000))) { - - bat_dbg(DBG_BATMAN, "Originator timeout: originator %s, last_valid %lu\n", orig_str, (orig_node->last_valid / HZ)); - + if (purge_orig_node(orig_node)) { hash_remove_bucket(orig_hash, hashit); free_orig_node(orig_node); - - } else { - - best_neigh_node = NULL; - neigh_purged = 0; - - /* for all neighbours towards this originator ... */ - list_for_each_safe(list_pos, list_pos_tmp, &orig_node->neigh_list) { - neigh_node = list_entry(list_pos, struct neigh_node, list); - - if (time_after(jiffies, neigh_node->last_valid + ((PURGE_TIMEOUT * HZ) / 1000))) { - - addr_to_string(neigh_str, neigh_node->addr); - bat_dbg(DBG_BATMAN, "Neighbour timeout: originator %s, neighbour: %s, last_valid %lu\n", orig_str, neigh_str, (neigh_node->last_valid / HZ)); - - neigh_purged = 1; - list_del(list_pos); - kfree(neigh_node); - - } else { - - if ((best_neigh_node == NULL) || (neigh_node->tq_avg > best_neigh_node->tq_avg)) - best_neigh_node = neigh_node; - - } - - } - - if (neigh_purged) - update_routes(orig_node, best_neigh_node, orig_node->hna_buff, orig_node->hna_buff_len); - } - } spin_unlock(&orig_hash_lock); @@ -618,7 +759,8 @@ void purge_orig(struct work_struct *work) start_purge_timer(); } -static int receive_raw_packet(struct socket *raw_sock, unsigned char *packet_buff, int packet_buff_len) +static int receive_raw_packet(struct socket *raw_sock, + unsigned char *packet_buff, int packet_buff_len) { struct kvec iov; struct msghdr msg; @@ -631,367 +773,495 @@ static int receive_raw_packet(struct socket *raw_sock, unsigned char *packet_buf msg.msg_namelen = 0; msg.msg_control = NULL; - return kernel_recvmsg(raw_sock, &msg, &iov, 1, packet_buff_len, MSG_DONTWAIT); + return kernel_recvmsg(raw_sock, &msg, &iov, 1, packet_buff_len, + MSG_DONTWAIT); } +static void recv_bat_packet(struct ethhdr *ethhdr, + unsigned char *packet_buff, + int result, + struct batman_if *batman_if) +{ + /* packet with broadcast indication but unicast recipient */ + if (!is_bcast(ethhdr->h_dest)) + return; + + /* packet with broadcast sender address */ + if (is_bcast(ethhdr->h_source)) + return; + + /* drop packet if it has not at least one batman packet as payload */ + if (result < sizeof(struct ethhdr) + sizeof(struct batman_packet)) + return; + + spin_lock(&orig_hash_lock); + receive_aggr_bat_packet(ethhdr, + packet_buff + sizeof(struct ethhdr), + result - sizeof(struct ethhdr), + batman_if); + spin_unlock(&orig_hash_lock); +} + +static void recv_my_icmp_packet(struct ethhdr *ethhdr, + struct icmp_packet *icmp_packet, + unsigned char *packet_buff, + int result) +{ + struct orig_node *orig_node; + + /* add data to device queue */ + if (icmp_packet->msg_type != ECHO_REQUEST) { + bat_device_receive_packet(icmp_packet); + return; + } + + /* answer echo request (ping) */ + /* get routing information */ + spin_lock(&orig_hash_lock); + orig_node = ((struct orig_node *)hash_find(orig_hash, + icmp_packet->orig)); + + if ((orig_node != NULL) && + (orig_node->batman_if != NULL) && + (orig_node->router != NULL)) { + memcpy(icmp_packet->dst, icmp_packet->orig, ETH_ALEN); + memcpy(icmp_packet->orig, ethhdr->h_dest, ETH_ALEN); + icmp_packet->msg_type = ECHO_REPLY; + icmp_packet->ttl = TTL; + + send_raw_packet(packet_buff + sizeof(struct ethhdr), + result - sizeof(struct ethhdr), + orig_node->batman_if, + orig_node->router->addr); + } + + spin_unlock(&orig_hash_lock); + return; +} + +static void recv_icmp_ttl_exceeded(struct icmp_packet *icmp_packet, + struct ethhdr *ethhdr, + unsigned char *packet_buff, + int result, + struct batman_if *batman_if) +{ + unsigned char src_str[ETH_STR_LEN], dst_str[ETH_STR_LEN]; + struct orig_node *orig_node; + + addr_to_string(src_str, icmp_packet->orig); + addr_to_string(dst_str, icmp_packet->dst); + + printk(KERN_WARNING "batman-adv:Warning - can't send packet from %s to %s: ttl exceeded\n", src_str, dst_str); + + /* send TTL exceeded if packet is an echo request (traceroute) */ + if (icmp_packet->msg_type != ECHO_REQUEST) + return; + + /* get routing information */ + spin_lock(&orig_hash_lock); + orig_node = ((struct orig_node *) + hash_find(orig_hash, icmp_packet->orig)); + + if ((orig_node != NULL) && + (orig_node->batman_if != NULL) && + (orig_node->router != NULL)) { + memcpy(icmp_packet->dst, icmp_packet->orig, ETH_ALEN); + memcpy(icmp_packet->orig, ethhdr->h_dest, ETH_ALEN); + icmp_packet->msg_type = TTL_EXCEEDED; + icmp_packet->ttl = TTL; + + send_raw_packet(packet_buff + sizeof(struct ethhdr), + result - sizeof(struct ethhdr), + orig_node->batman_if, + orig_node->router->addr); + + } + + spin_unlock(&orig_hash_lock); +} + + + +static void recv_icmp_packet(struct ethhdr *ethhdr, + unsigned char *packet_buff, + int result, + struct batman_if *batman_if) +{ + struct icmp_packet *icmp_packet; + struct orig_node *orig_node; + + /* packet with unicast indication but broadcast recipient */ + if (is_bcast(ethhdr->h_dest)) + return; + + /* packet with broadcast sender address */ + if (is_bcast(ethhdr->h_source)) + return; + + /* not for me */ + if (!is_my_mac(ethhdr->h_dest)) + return; + + /* drop packet if it has not necessary minimum size */ + if (result < sizeof(struct ethhdr) + sizeof(struct icmp_packet)) + return; + + icmp_packet = (struct icmp_packet *) + (packet_buff + sizeof(struct ethhdr)); + + /* packet for me */ + if (is_my_mac(icmp_packet->dst)) + recv_my_icmp_packet(ethhdr, icmp_packet, packet_buff, result); + + /* TTL exceeded */ + if (icmp_packet->ttl < 2) { + recv_icmp_ttl_exceeded(icmp_packet, ethhdr, packet_buff, result, + batman_if); + return; + + } + + /* get routing information */ + spin_lock(&orig_hash_lock); + orig_node = ((struct orig_node *) + hash_find(orig_hash, icmp_packet->dst)); + + if ((orig_node != NULL) && + (orig_node->batman_if != NULL) && + (orig_node->router != NULL)) { + + /* decrement ttl */ + icmp_packet->ttl--; + + /* route it */ + send_raw_packet(packet_buff + sizeof(struct ethhdr), + result - sizeof(struct ethhdr), + orig_node->batman_if, + orig_node->router->addr); + } + spin_unlock(&orig_hash_lock); +} + +static void recv_unicast_packet(struct ethhdr *ethhdr, + unsigned char *packet_buff, + int result, + struct batman_if *batman_if) +{ + struct unicast_packet *unicast_packet; + unsigned char src_str[ETH_STR_LEN], dst_str[ETH_STR_LEN]; + struct orig_node *orig_node; + int hdr_size = sizeof(struct ethhdr) + sizeof(struct unicast_packet); + + /* packet with unicast indication but broadcast recipient */ + if (is_bcast(ethhdr->h_dest)) + return; + + /* packet with broadcast sender address */ + if (is_bcast(ethhdr->h_source)) + return; + + /* not for me */ + if (!is_my_mac(ethhdr->h_dest)) + return; + + /* drop packet if it has not necessary minimum size */ + if (result < hdr_size) + return; + + unicast_packet = (struct unicast_packet *) + (packet_buff + sizeof(struct ethhdr)); + + /* packet for me */ + if (is_my_mac(unicast_packet->dest)) { + interface_rx(soft_device, packet_buff + hdr_size, + result - hdr_size); + return; + + } + + /* TTL exceeded */ + if (unicast_packet->ttl < 2) { + addr_to_string(src_str, ((struct ethhdr *) + (unicast_packet + 1))->h_source); + addr_to_string(dst_str, unicast_packet->dest); + + printk(KERN_WARNING "batman-adv:Warning - can't send packet from %s to %s: ttl exceeded\n", src_str, dst_str); + return; + } + + /* get routing information */ + spin_lock(&orig_hash_lock); + orig_node = ((struct orig_node *) + hash_find(orig_hash, unicast_packet->dest)); + + if ((orig_node != NULL) && + (orig_node->batman_if != NULL) && + (orig_node->router != NULL)) { + /* decrement ttl */ + unicast_packet->ttl--; + + /* route it */ + send_raw_packet(packet_buff + sizeof(struct ethhdr), + result - sizeof(struct ethhdr), + orig_node->batman_if, + orig_node->router->addr); + } + spin_unlock(&orig_hash_lock); +} + + +static void recv_bcast_packet(struct ethhdr *ethhdr, + unsigned char *packet_buff, + int result, + struct batman_if *batman_if) +{ + struct orig_node *orig_node; + struct bcast_packet *bcast_packet; + int hdr_size = sizeof(struct ethhdr) + sizeof(struct bcast_packet); + + /* packet with broadcast indication but unicast recipient */ + if (!is_bcast(ethhdr->h_dest)) + return; + + /* packet with broadcast sender address */ + if (is_bcast(ethhdr->h_source)) + return; + + /* drop packet if it has not necessary minimum size */ + if (result < hdr_size) + return; + + /* ignore broadcasts sent by myself */ + if (is_my_mac(ethhdr->h_source)) + return; + + bcast_packet = (struct bcast_packet *) + (packet_buff + sizeof(struct ethhdr)); + + /* ignore broadcasts originated by myself */ + if (is_my_mac(bcast_packet->orig)) + return; + + spin_lock(&orig_hash_lock); + orig_node = ((struct orig_node *) + hash_find(orig_hash, bcast_packet->orig)); + + if (orig_node == NULL) { + spin_unlock(&orig_hash_lock); + return; + } + + /* check flood history */ + if (get_bit_status(orig_node->bcast_bits, + orig_node->last_bcast_seqno, + ntohs(bcast_packet->seqno))) { + spin_unlock(&orig_hash_lock); + return; + } + + /* mark broadcast in flood history */ + if (bit_get_packet(orig_node->bcast_bits, + ntohs(bcast_packet->seqno) - + orig_node->last_bcast_seqno, 1)) + orig_node->last_bcast_seqno = ntohs(bcast_packet->seqno); + + spin_unlock(&orig_hash_lock); + + /* broadcast for me */ + interface_rx(soft_device, packet_buff + hdr_size, result - hdr_size); + + /* rebroadcast packet */ + add_bcast_packet_to_list(packet_buff + sizeof(struct ethhdr), + result - sizeof(struct ethhdr)); +} + +static void recv_vis_packet(struct ethhdr *ethhdr, + unsigned char *packet_buff, + int result) +{ + struct vis_packet *vis_packet; + int hdr_size = sizeof(struct ethhdr) + sizeof(struct vis_packet); + int vis_info_len; + + /* drop if too short. */ + if (result < hdr_size) + return; + + /* not for me */ + if (!is_my_mac(ethhdr->h_dest)) + return; + + vis_packet = (struct vis_packet *)(packet_buff + sizeof(struct ethhdr)); + vis_info_len = result - hdr_size; + + /* ignore own packets */ + if (is_my_mac(vis_packet->vis_orig)) + return; + + if (is_my_mac(vis_packet->sender_orig)) + return; + + switch (vis_packet->vis_type) { + case VIS_TYPE_SERVER_SYNC: + receive_server_sync_packet(vis_packet, vis_info_len); + break; + + case VIS_TYPE_CLIENT_UPDATE: + receive_client_update_packet(vis_packet, vis_info_len); + break; + + default: /* ignore unknown packet */ + break; + } +} + +static int recv_one_packet(struct batman_if *batman_if, + unsigned char *packet_buff) +{ + int result; + struct ethhdr *ethhdr; + struct batman_packet *batman_packet; + + result = receive_raw_packet(batman_if->raw_sock, packet_buff, + PACKBUFF_SIZE); + if (result <= 0) + return result; + + if (result < sizeof(struct ethhdr) + 2) + return 0; + + ethhdr = (struct ethhdr *)packet_buff; + batman_packet = (struct batman_packet *) + (packet_buff + sizeof(struct ethhdr)); + + if (batman_packet->version != COMPAT_VERSION) { + bat_dbg(DBG_BATMAN, + "Drop packet: incompatible batman version (%i)\n", + batman_packet->version); + return 0; + } + + switch (batman_packet->packet_type) { + /* batman originator packet */ + case BAT_PACKET: + recv_bat_packet(ethhdr, packet_buff, result, batman_if); + break; + + /* batman icmp packet */ + case BAT_ICMP: + recv_icmp_packet(ethhdr, packet_buff, result, batman_if); + break; + + /* unicast packet */ + case BAT_UNICAST: + recv_unicast_packet(ethhdr, packet_buff, result, batman_if); + break; + + /* broadcast packet */ + case BAT_BCAST: + recv_bcast_packet(ethhdr, + packet_buff, result, batman_if); + break; + + /* vis packet */ + case BAT_VIS: + recv_vis_packet(ethhdr, packet_buff, result); + break; + } + return 0; +} + + +static int discard_one_packet(struct batman_if *batman_if, + unsigned char *packet_buff) +{ + int result = -EAGAIN; + + if (batman_if->if_active != IF_TO_BE_ACTIVATED) { + printk(KERN_WARNING + "batman-adv:Could not read from deactivated interface %s!\n", + batman_if->dev); + } else { + if (batman_if->raw_sock) + result = receive_raw_packet(batman_if->raw_sock, + packet_buff, + PACKBUFF_SIZE); + } + return result; +} + + +static bool is_interface_active(struct batman_if *batman_if) +{ + if (batman_if->if_active != IF_ACTIVE) + return false; + + return true; +} + +static void service_interface(struct batman_if *batman_if, + unsigned char *packet_buff) + +{ + int result; + + do { + if (is_interface_active(batman_if)) + result = recv_one_packet(batman_if, packet_buff); + else + result = discard_one_packet(batman_if, packet_buff); + } while (result >= 0); + + /* we perform none blocking reads, so EAGAIN indicates there + are no more packets to read. Anything else is a real + error.*/ + + if ((result < 0) && (result != -EAGAIN)) + printk(KERN_ERR "batman-adv:Could not receive packet from interface %s: %i\n", batman_if->dev, result); +} + +static void service_interfaces(unsigned char *packet_buffer) +{ + struct batman_if *batman_if; + rcu_read_lock(); + list_for_each_entry_rcu(batman_if, &if_list, list) { + rcu_read_unlock(); + service_interface(batman_if, packet_buffer); + rcu_read_lock(); + } + rcu_read_unlock(); +} + + int packet_recv_thread(void *data) { - struct batman_if *batman_if; - struct ethhdr *ethhdr; - struct batman_packet *batman_packet; - struct unicast_packet *unicast_packet; - struct bcast_packet *bcast_packet; - struct icmp_packet *icmp_packet; - struct vis_packet *vis_packet; - struct orig_node *orig_node; - unsigned char *packet_buff, src_str[ETH_STR_LEN], dst_str[ETH_STR_LEN]; - int vis_info_len; - int result; + unsigned char *packet_buff; atomic_set(&data_ready_cond, 0); atomic_set(&exit_cond, 0); packet_buff = kmalloc(PACKBUFF_SIZE, GFP_KERNEL); if (!packet_buff) { - printk(KERN_ERR "batman-adv:Could allocate memory for the packet buffer. :(\n"); + printk(KERN_ERR"batman-adv:Could allocate memory for the packet buffer. :(\n"); return -1; } while ((!kthread_should_stop()) && (!atomic_read(&exit_cond))) { - wait_event_interruptible(thread_wait, (atomic_read(&data_ready_cond) || atomic_read(&exit_cond))); + wait_event_interruptible(thread_wait, + (atomic_read(&data_ready_cond) || + atomic_read(&exit_cond))); atomic_set(&data_ready_cond, 0); if (kthread_should_stop() || atomic_read(&exit_cond)) break; - /* we only want to safely traverse the list, hard-interfaces - * won't be deleted anyway as long as this thread runs. */ - - rcu_read_lock(); - list_for_each_entry_rcu(batman_if, &if_list, list) { - rcu_read_unlock(); - - result = -1; - - while (1) { - if (batman_if->if_active != IF_ACTIVE) { - if (batman_if->if_active != IF_TO_BE_ACTIVATED) - printk(KERN_WARNING - "batman-adv:Could not read from deactivated interface %s!\n", - batman_if->dev); - - if (batman_if->raw_sock) - receive_raw_packet(batman_if->raw_sock, packet_buff, PACKBUFF_SIZE); - result = 0; - break; - } - - result = receive_raw_packet(batman_if->raw_sock, packet_buff, PACKBUFF_SIZE); - if (result <= 0) - break; - - if (result < sizeof(struct ethhdr) + 2) - continue; - - ethhdr = (struct ethhdr *)packet_buff; - batman_packet = (struct batman_packet *)(packet_buff + sizeof(struct ethhdr)); - - if (batman_packet->version != COMPAT_VERSION) { - bat_dbg(DBG_BATMAN, "Drop packet: incompatible batman version (%i)\n", batman_packet->version); - continue; - } - - switch (batman_packet->packet_type) { - /* batman originator packet */ - case BAT_PACKET: - /* packet with broadcast indication but unicast recipient */ - if (!is_bcast(ethhdr->h_dest)) - continue; - - /* packet with broadcast sender address */ - if (is_bcast(ethhdr->h_source)) - continue; - - /* drop packet if it has not at least one batman packet as payload */ - if (result < sizeof(struct ethhdr) + sizeof(struct batman_packet)) - continue; - - spin_lock(&orig_hash_lock); - receive_aggr_bat_packet(ethhdr, - packet_buff + sizeof(struct ethhdr), - result - sizeof(struct ethhdr), - batman_if); - spin_unlock(&orig_hash_lock); - - break; - - /* batman icmp packet */ - case BAT_ICMP: - /* packet with unicast indication but broadcast recipient */ - if (is_bcast(ethhdr->h_dest)) - continue; - - /* packet with broadcast sender address */ - if (is_bcast(ethhdr->h_source)) - continue; - - /* not for me */ - if (!is_my_mac(ethhdr->h_dest)) - continue; - - /* drop packet if it has not necessary minimum size */ - if (result < sizeof(struct ethhdr) + sizeof(struct icmp_packet)) - continue; - - icmp_packet = (struct icmp_packet *)(packet_buff + sizeof(struct ethhdr)); - - /* packet for me */ - if (is_my_mac(icmp_packet->dst)) { - - /* add data to device queue */ - if (icmp_packet->msg_type != ECHO_REQUEST) { - bat_device_receive_packet(icmp_packet); - continue; - } - - /* answer echo request (ping) */ - /* get routing information */ - spin_lock(&orig_hash_lock); - orig_node = ((struct orig_node *)hash_find(orig_hash, icmp_packet->orig)); - - if ((orig_node != NULL) && (orig_node->batman_if != NULL) && (orig_node->router != NULL)) { - - memcpy(icmp_packet->dst, icmp_packet->orig, ETH_ALEN); - memcpy(icmp_packet->orig, ethhdr->h_dest, ETH_ALEN); - icmp_packet->msg_type = ECHO_REPLY; - icmp_packet->ttl = TTL; - - send_raw_packet(packet_buff + sizeof(struct ethhdr), - result - sizeof(struct ethhdr), - orig_node->batman_if, - orig_node->router->addr); - - } - - spin_unlock(&orig_hash_lock); - continue; - - } - - /* TTL exceeded */ - if (icmp_packet->ttl < 2) { - - addr_to_string(src_str, icmp_packet->orig); - addr_to_string(dst_str, icmp_packet->dst); - - printk(KERN_WARNING "batman-adv:Warning - can't send packet from %s to %s: ttl exceeded\n", src_str, dst_str); - - /* send TTL exceeded if packet is an echo request (traceroute) */ - if (icmp_packet->msg_type != ECHO_REQUEST) - continue; - - /* get routing information */ - spin_lock(&orig_hash_lock); - orig_node = ((struct orig_node *)hash_find(orig_hash, icmp_packet->orig)); - - if ((orig_node != NULL) && (orig_node->batman_if != NULL) && (orig_node->router != NULL)) { - - memcpy(icmp_packet->dst, icmp_packet->orig, ETH_ALEN); - memcpy(icmp_packet->orig, ethhdr->h_dest, ETH_ALEN); - icmp_packet->msg_type = TTL_EXCEEDED; - icmp_packet->ttl = TTL; - - send_raw_packet(packet_buff + sizeof(struct ethhdr), - result - sizeof(struct ethhdr), - orig_node->batman_if, - orig_node->router->addr); - - } - - spin_unlock(&orig_hash_lock); - continue; - - } - - /* get routing information */ - spin_lock(&orig_hash_lock); - orig_node = ((struct orig_node *)hash_find(orig_hash, icmp_packet->dst)); - - if ((orig_node != NULL) && (orig_node->batman_if != NULL) && (orig_node->router != NULL)) { - - /* decrement ttl */ - icmp_packet->ttl--; - - /* route it */ - send_raw_packet(packet_buff + sizeof(struct ethhdr), - result - sizeof(struct ethhdr), - orig_node->batman_if, - orig_node->router->addr); - } - - spin_unlock(&orig_hash_lock); - break; - - /* unicast packet */ - case BAT_UNICAST: - /* packet with unicast indication but broadcast recipient */ - if (is_bcast(ethhdr->h_dest)) - continue; - - /* packet with broadcast sender address */ - if (is_bcast(ethhdr->h_source)) - continue; - - /* not for me */ - if (!is_my_mac(ethhdr->h_dest)) - continue; - - /* drop packet if it has not necessary minimum size */ - if (result < sizeof(struct ethhdr) + sizeof(struct unicast_packet)) - continue; - - unicast_packet = (struct unicast_packet *)(packet_buff + sizeof(struct ethhdr)); - - /* packet for me */ - if (is_my_mac(unicast_packet->dest)) { - - interface_rx(soft_device, packet_buff + sizeof(struct ethhdr) + sizeof(struct unicast_packet), result - sizeof(struct ethhdr) - sizeof(struct unicast_packet)); - continue; - - } - - /* TTL exceeded */ - if (unicast_packet->ttl < 2) { - addr_to_string(src_str, ((struct ethhdr *)(unicast_packet + 1))->h_source); - addr_to_string(dst_str, unicast_packet->dest); - - printk(KERN_WARNING "batman-adv:Warning - can't send packet from %s to %s: ttl exceeded\n", src_str, dst_str); - continue; - } - - /* get routing information */ - spin_lock(&orig_hash_lock); - orig_node = ((struct orig_node *)hash_find(orig_hash, unicast_packet->dest)); - - if ((orig_node != NULL) && (orig_node->batman_if != NULL) && (orig_node->router != NULL)) { - /* decrement ttl */ - unicast_packet->ttl--; - - /* route it */ - send_raw_packet(packet_buff + sizeof(struct ethhdr), - result - sizeof(struct ethhdr), - orig_node->batman_if, - orig_node->router->addr); - } - - spin_unlock(&orig_hash_lock); - break; - - /* broadcast packet */ - case BAT_BCAST: - /* packet with broadcast indication but unicast recipient */ - if (!is_bcast(ethhdr->h_dest)) - continue; - - /* packet with broadcast sender address */ - if (is_bcast(ethhdr->h_source)) - continue; - - /* drop packet if it has not necessary minimum size */ - if (result < sizeof(struct ethhdr) + sizeof(struct bcast_packet)) - continue; - - /* ignore broadcasts sent by myself */ - if (is_my_mac(ethhdr->h_source)) - continue; - - bcast_packet = (struct bcast_packet *)(packet_buff + sizeof(struct ethhdr)); - - /* ignore broadcasts originated by myself */ - if (is_my_mac(bcast_packet->orig)) - continue; - - spin_lock(&orig_hash_lock); - orig_node = ((struct orig_node *)hash_find(orig_hash, bcast_packet->orig)); - - if (orig_node == NULL) { - spin_unlock(&orig_hash_lock); - continue; - } - - /* check flood history */ - if (get_bit_status(orig_node->bcast_bits, orig_node->last_bcast_seqno, ntohs(bcast_packet->seqno))) { - spin_unlock(&orig_hash_lock); - continue; - } - - /* mark broadcast in flood history */ - if (bit_get_packet(orig_node->bcast_bits, ntohs(bcast_packet->seqno) - orig_node->last_bcast_seqno, 1)) - orig_node->last_bcast_seqno = ntohs(bcast_packet->seqno); - - spin_unlock(&orig_hash_lock); - - /* broadcast for me */ - interface_rx(soft_device, packet_buff + sizeof(struct ethhdr) + sizeof(struct bcast_packet), result - sizeof(struct ethhdr) - sizeof(struct bcast_packet)); - - /* rebroadcast packet */ - add_bcast_packet_to_list(packet_buff + sizeof(struct ethhdr), - result - sizeof(struct ethhdr)); - - break; - - /* vis packet */ - case BAT_VIS: - /* drop if too short. */ - if (result < sizeof(struct ethhdr) + sizeof(struct vis_packet)) - continue; - - /* not for me */ - if (!is_my_mac(ethhdr->h_dest)) - continue; - - vis_packet = (struct vis_packet *)(packet_buff + sizeof(struct ethhdr)); - vis_info_len = result - sizeof(struct ethhdr) - sizeof(struct vis_packet); - - /* ignore own packets */ - if (is_my_mac(vis_packet->vis_orig)) - continue; - - if (is_my_mac(vis_packet->sender_orig)) - continue; - - switch (vis_packet->vis_type) { - case VIS_TYPE_SERVER_SYNC: - receive_server_sync_packet(vis_packet, vis_info_len); - break; - - case VIS_TYPE_CLIENT_UPDATE: - receive_client_update_packet(vis_packet, vis_info_len); - break; - - default: /* ignore unknown packet */ - break; - } - - break; - } - - } - - if ((result < 0) && (result != -EAGAIN)) - printk(KERN_ERR "batman-adv:Could not receive packet from interface %s: %i\n", batman_if->dev, result); - - /* lock for the next iteration */ - rcu_read_lock(); - } - rcu_read_unlock(); - + service_interfaces(packet_buff); } kfree(packet_buff); - /* do not exit until kthread_stop() is actually called, otherwise it will wait for us - * forever. */ + /* do not exit until kthread_stop() is actually called, + * otherwise it will wait for us forever. */ while (!kthread_should_stop()) schedule(); From da6b9ba95f2ce3f923013ce09793ab16f05bac25 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Sat, 12 Dec 2009 23:39:43 +0100 Subject: [PATCH 030/367] Staging: batman-adv: stop persistent warnings if a device is deactivated. Without this change we spam the kernel log on every packet received on any other interface when an interface has been added, but is not yet active, ie UP. Signed-off-by: Simon Wunderlich Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/routing.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c index 1ff2a7aae108..decf67fa944c 100644 --- a/drivers/staging/batman-adv/routing.c +++ b/drivers/staging/batman-adv/routing.c @@ -1177,12 +1177,8 @@ static int discard_one_packet(struct batman_if *batman_if, { int result = -EAGAIN; - if (batman_if->if_active != IF_TO_BE_ACTIVATED) { - printk(KERN_WARNING - "batman-adv:Could not read from deactivated interface %s!\n", - batman_if->dev); - } else { - if (batman_if->raw_sock) + if ((batman_if->if_active == IF_TO_BE_ACTIVATED) + && (batman_if->raw_sock)) { result = receive_raw_packet(batman_if->raw_sock, packet_buff, PACKBUFF_SIZE); From 4088c7ca57b6dbe25683bb16f25233cce373996c Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Sat, 12 Dec 2009 23:39:44 +0100 Subject: [PATCH 031/367] Staging: batman-adv: Always receive when discarding. It does not matter if the interface is to be activated or not, we must read the packet in order that it be discarded. Signed-off-by: Simon Wunderlich Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/routing.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c index decf67fa944c..6a8d73d51357 100644 --- a/drivers/staging/batman-adv/routing.c +++ b/drivers/staging/batman-adv/routing.c @@ -1177,8 +1177,7 @@ static int discard_one_packet(struct batman_if *batman_if, { int result = -EAGAIN; - if ((batman_if->if_active == IF_TO_BE_ACTIVATED) - && (batman_if->raw_sock)) { + if (batman_if->raw_sock) { result = receive_raw_packet(batman_if->raw_sock, packet_buff, PACKBUFF_SIZE); From 8a2e042c2d9b4f1252dbbbb7c31bd3f8af19c8f2 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Sat, 12 Dec 2009 23:39:45 +0100 Subject: [PATCH 032/367] Staging: batman-adv: Split originator handling parts out of routing.c Bug found and fixed in origional version by Linus Luessing. Signed-off-by: Simon Wunderlich Signed-off-by: Linus Luessing Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/Makefile | 2 +- drivers/staging/batman-adv/main.c | 1 + drivers/staging/batman-adv/originator.c | 243 ++++++++++++++++++++++++ drivers/staging/batman-adv/originator.h | 31 +++ drivers/staging/batman-adv/routing.c | 221 +-------------------- drivers/staging/batman-adv/routing.h | 12 +- 6 files changed, 289 insertions(+), 221 deletions(-) create mode 100644 drivers/staging/batman-adv/originator.c create mode 100644 drivers/staging/batman-adv/originator.h diff --git a/drivers/staging/batman-adv/Makefile b/drivers/staging/batman-adv/Makefile index 64bdb7828e99..42b4e6370263 100644 --- a/drivers/staging/batman-adv/Makefile +++ b/drivers/staging/batman-adv/Makefile @@ -19,4 +19,4 @@ # obj-m += batman-adv.o -batman-adv-objs := main.o proc.o send.o routing.o soft-interface.o device.o translation-table.o bitarray.o hash.o ring_buffer.o vis.o hard-interface.o aggregation.o +batman-adv-objs := main.o proc.o send.o routing.o soft-interface.o device.o translation-table.o bitarray.o hash.o ring_buffer.o vis.o hard-interface.o aggregation.o originator.o diff --git a/drivers/staging/batman-adv/main.c b/drivers/staging/batman-adv/main.c index 4b93a5d33cf9..a74bfbeba7c4 100644 --- a/drivers/staging/batman-adv/main.c +++ b/drivers/staging/batman-adv/main.c @@ -23,6 +23,7 @@ #include "proc.h" #include "routing.h" #include "send.h" +#include "originator.h" #include "soft-interface.h" #include "device.h" #include "translation-table.h" diff --git a/drivers/staging/batman-adv/originator.c b/drivers/staging/batman-adv/originator.c new file mode 100644 index 000000000000..9962af7ae640 --- /dev/null +++ b/drivers/staging/batman-adv/originator.c @@ -0,0 +1,243 @@ +/* + * Copyright (C) 2009 B.A.T.M.A.N. contributors: + * + * Marek Lindner, Simon Wunderlich + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA + * + */ + +/* increase the reference counter for this originator */ + +#include "main.h" +#include "originator.h" +#include "hash.h" +#include "translation-table.h" +#include "routing.h" + + +static DECLARE_DELAYED_WORK(purge_orig_wq, purge_orig); + +static void start_purge_timer(void) +{ + queue_delayed_work(bat_event_workqueue, &purge_orig_wq, 1 * HZ); +} + +int originator_init(void) +{ + if (orig_hash) + return 1; + + spin_lock(&orig_hash_lock); + orig_hash = hash_new(128, compare_orig, choose_orig); + + if (!orig_hash) + goto err; + + spin_unlock(&orig_hash_lock); + start_purge_timer(); + return 1; + +err: + spin_unlock(&orig_hash_lock); + return 0; +} + +void originator_free(void) +{ + if (!orig_hash) + return; + + cancel_delayed_work_sync(&purge_orig_wq); + + spin_lock(&orig_hash_lock); + hash_delete(orig_hash, free_orig_node); + orig_hash = NULL; + spin_unlock(&orig_hash_lock); +} + +struct neigh_node * +create_neighbor(struct orig_node *orig_node, struct orig_node *orig_neigh_node, + uint8_t *neigh, struct batman_if *if_incoming) +{ + struct neigh_node *neigh_node; + + bat_dbg(DBG_BATMAN, "Creating new last-hop neighbour of originator\n"); + + neigh_node = kmalloc(sizeof(struct neigh_node), GFP_ATOMIC); + memset(neigh_node, 0, sizeof(struct neigh_node)); + INIT_LIST_HEAD(&neigh_node->list); + + memcpy(neigh_node->addr, neigh, ETH_ALEN); + neigh_node->orig_node = orig_neigh_node; + neigh_node->if_incoming = if_incoming; + + list_add_tail(&neigh_node->list, &orig_node->neigh_list); + return neigh_node; +} + +void free_orig_node(void *data) +{ + struct list_head *list_pos, *list_pos_tmp; + struct neigh_node *neigh_node; + struct orig_node *orig_node = (struct orig_node *)data; + + /* for all neighbours towards this originator ... */ + list_for_each_safe(list_pos, list_pos_tmp, &orig_node->neigh_list) { + neigh_node = list_entry(list_pos, struct neigh_node, list); + + list_del(list_pos); + kfree(neigh_node); + } + + hna_global_del_orig(orig_node, "originator timed out"); + + kfree(orig_node->bcast_own); + kfree(orig_node->bcast_own_sum); + kfree(orig_node); +} + +/* this function finds or creates an originator entry for the given + * address if it does not exits */ +struct orig_node *get_orig_node(uint8_t *addr) +{ + struct orig_node *orig_node; + struct hashtable_t *swaphash; + char orig_str[ETH_STR_LEN]; + int size; + + orig_node = ((struct orig_node *)hash_find(orig_hash, addr)); + + if (orig_node != NULL) + return orig_node; + + addr_to_string(orig_str, addr); + bat_dbg(DBG_BATMAN, "Creating new originator: %s \n", orig_str); + + orig_node = kmalloc(sizeof(struct orig_node), GFP_ATOMIC); + memset(orig_node, 0, sizeof(struct orig_node)); + INIT_LIST_HEAD(&orig_node->neigh_list); + + memcpy(orig_node->orig, addr, ETH_ALEN); + orig_node->router = NULL; + orig_node->batman_if = NULL; + orig_node->hna_buff = NULL; + + size = num_ifs * sizeof(TYPE_OF_WORD) * NUM_WORDS; + + orig_node->bcast_own = kmalloc(size, GFP_ATOMIC); + memset(orig_node->bcast_own, 0, size); + + size = num_ifs * sizeof(uint8_t); + orig_node->bcast_own_sum = kmalloc(size, GFP_ATOMIC); + memset(orig_node->bcast_own_sum, 0, size); + + hash_add(orig_hash, orig_node); + + if (orig_hash->elements * 4 > orig_hash->size) { + swaphash = hash_resize(orig_hash, orig_hash->size * 2); + + if (swaphash == NULL) + printk(KERN_ERR + "batman-adv:Couldn't resize orig hash table \n"); + else + orig_hash = swaphash; + } + + return orig_node; +} + +static bool purge_orig_neigbours(struct orig_node *orig_node, + struct neigh_node **best_neigh_node) +{ + struct list_head *list_pos, *list_pos_tmp; + char neigh_str[ETH_STR_LEN], orig_str[ETH_STR_LEN]; + struct neigh_node *neigh_node; + bool neigh_purged = false; + + *best_neigh_node = NULL; + + + /* for all neighbours towards this originator ... */ + list_for_each_safe(list_pos, list_pos_tmp, &orig_node->neigh_list) { + neigh_node = list_entry(list_pos, struct neigh_node, list); + + if (time_after(jiffies, + (neigh_node->last_valid + + ((PURGE_TIMEOUT * HZ) / 1000)))) { + + addr_to_string(neigh_str, neigh_node->addr); + addr_to_string(orig_str, orig_node->orig); + bat_dbg(DBG_BATMAN, "Neighbour timeout: originator %s, neighbour: %s, last_valid %lu\n", orig_str, neigh_str, (neigh_node->last_valid / HZ)); + + neigh_purged = true; + list_del(list_pos); + kfree(neigh_node); + } else { + if ((*best_neigh_node == NULL) || + (neigh_node->tq_avg > (*best_neigh_node)->tq_avg)) + *best_neigh_node = neigh_node; + } + } + return neigh_purged; +} + + +static bool purge_orig_node(struct orig_node *orig_node) +{ + struct neigh_node *best_neigh_node; + char orig_str[ETH_STR_LEN]; + + addr_to_string(orig_str, orig_node->orig); + + if (time_after(jiffies, + (orig_node->last_valid + + ((2 * PURGE_TIMEOUT * HZ) / 1000)))) { + + bat_dbg(DBG_BATMAN, + "Originator timeout: originator %s, last_valid %lu\n", + orig_str, (orig_node->last_valid / HZ)); + return true; + } else { + if (purge_orig_neigbours(orig_node, &best_neigh_node)) + update_routes(orig_node, best_neigh_node, + orig_node->hna_buff, + orig_node->hna_buff_len); + } + return false; +} + +void purge_orig(struct work_struct *work) +{ + struct hash_it_t *hashit = NULL; + struct orig_node *orig_node; + + spin_lock(&orig_hash_lock); + + /* for all origins... */ + while (NULL != (hashit = hash_iterate(orig_hash, hashit))) { + orig_node = hashit->bucket->data; + if (purge_orig_node(orig_node)) { + hash_remove_bucket(orig_hash, hashit); + free_orig_node(orig_node); + } + } + + spin_unlock(&orig_hash_lock); + + start_purge_timer(); +} + + diff --git a/drivers/staging/batman-adv/originator.h b/drivers/staging/batman-adv/originator.h new file mode 100644 index 000000000000..6ef7a054a0a9 --- /dev/null +++ b/drivers/staging/batman-adv/originator.h @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2007-2009 B.A.T.M.A.N. contributors: + * + * Marek Lindner, Simon Wunderlich + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA + * + */ + +int originator_init(void); +void free_orig_node(void *data); +void originator_free(void); +void purge_orig(struct work_struct *work); +struct orig_node *orig_find(char *mac); +struct orig_node *get_orig_node(uint8_t *addr); +struct neigh_node * +create_neighbor(struct orig_node *orig_node, struct orig_node *orig_neigh_node, + uint8_t *neigh, struct batman_if *if_incoming); + diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c index 6a8d73d51357..e8d712788dad 100644 --- a/drivers/staging/batman-adv/routing.c +++ b/drivers/staging/batman-adv/routing.c @@ -22,152 +22,22 @@ #include "main.h" #include "routing.h" #include "send.h" +#include "hash.h" #include "soft-interface.h" #include "hard-interface.h" #include "device.h" #include "translation-table.h" +#include "originator.h" #include "types.h" -#include "hash.h" #include "ring_buffer.h" #include "vis.h" #include "aggregation.h" #include "compat.h" DECLARE_WAIT_QUEUE_HEAD(thread_wait); -static DECLARE_DELAYED_WORK(purge_orig_wq, purge_orig); static atomic_t data_ready_cond; atomic_t exit_cond; - -static void start_purge_timer(void) -{ - queue_delayed_work(bat_event_workqueue, &purge_orig_wq, 1 * HZ); -} - -int originator_init(void) -{ - if (orig_hash) - return 1; - - spin_lock(&orig_hash_lock); - orig_hash = hash_new(128, compare_orig, choose_orig); - - if (!orig_hash) - goto err; - - spin_unlock(&orig_hash_lock); - start_purge_timer(); - return 1; - -err: - spin_unlock(&orig_hash_lock); - return 0; -} - -void originator_free(void) -{ - if (!orig_hash) - return; - - cancel_delayed_work_sync(&purge_orig_wq); - - spin_lock(&orig_hash_lock); - hash_delete(orig_hash, free_orig_node); - orig_hash = NULL; - spin_unlock(&orig_hash_lock); -} - -static struct neigh_node * -create_neighbor(struct orig_node *orig_node, struct orig_node *orig_neigh_node, - uint8_t *neigh, struct batman_if *if_incoming) -{ - struct neigh_node *neigh_node; - - bat_dbg(DBG_BATMAN, "Creating new last-hop neighbour of originator\n"); - - neigh_node = kmalloc(sizeof(struct neigh_node), GFP_ATOMIC); - memset(neigh_node, 0, sizeof(struct neigh_node)); - INIT_LIST_HEAD(&neigh_node->list); - - memcpy(neigh_node->addr, neigh, ETH_ALEN); - neigh_node->orig_node = orig_neigh_node; - neigh_node->if_incoming = if_incoming; - - list_add_tail(&neigh_node->list, &orig_node->neigh_list); - return neigh_node; -} - -void free_orig_node(void *data) -{ - struct list_head *list_pos, *list_pos_tmp; - struct neigh_node *neigh_node; - struct orig_node *orig_node = (struct orig_node *)data; - - /* for all neighbours towards this originator ... */ - list_for_each_safe(list_pos, list_pos_tmp, &orig_node->neigh_list) { - neigh_node = list_entry(list_pos, struct neigh_node, list); - - list_del(list_pos); - kfree(neigh_node); - } - - hna_global_del_orig(orig_node, "originator timed out"); - - kfree(orig_node->bcast_own); - kfree(orig_node->bcast_own_sum); - kfree(orig_node); -} - -/* this function finds or creates an originator entry for the given - * address if it does not exits */ -static struct orig_node *get_orig_node(uint8_t *addr) -{ - struct orig_node *orig_node; - struct hashtable_t *swaphash; - char orig_str[ETH_STR_LEN]; - int size; - - orig_node = ((struct orig_node *)hash_find(orig_hash, addr)); - - if (orig_node != NULL) - return orig_node; - - addr_to_string(orig_str, addr); - bat_dbg(DBG_BATMAN, "Creating new originator: %s \n", orig_str); - - orig_node = kmalloc(sizeof(struct orig_node), GFP_ATOMIC); - memset(orig_node, 0, sizeof(struct orig_node)); - INIT_LIST_HEAD(&orig_node->neigh_list); - - memcpy(orig_node->orig, addr, ETH_ALEN); - orig_node->router = NULL; - orig_node->batman_if = NULL; - orig_node->hna_buff = NULL; - - size = num_ifs * sizeof(TYPE_OF_WORD) * NUM_WORDS; - - orig_node->bcast_own = kmalloc(size, GFP_ATOMIC); - memset(orig_node->bcast_own, 0, size); - - size = num_ifs * sizeof(uint8_t); - orig_node->bcast_own_sum = kmalloc(size, GFP_ATOMIC); - memset(orig_node->bcast_own_sum, 0, size); - - hash_add(orig_hash, orig_node); - - if (orig_hash->elements * 4 > orig_hash->size) { - swaphash = hash_resize(orig_hash, orig_hash->size * 2); - - if (swaphash == NULL) - printk(KERN_ERR - "batman-adv:Couldn't resize orig hash table \n"); - else - orig_hash = swaphash; - } - - return orig_node; -} - void slide_own_bcast_window(struct batman_if *batman_if) { struct hash_it_t *hashit = NULL; @@ -246,7 +116,7 @@ static void update_route(struct orig_node *orig_node, } -static void update_routes(struct orig_node *orig_node, +void update_routes(struct orig_node *orig_node, struct neigh_node *neigh_node, unsigned char *hna_buff, int hna_buff_len) { @@ -679,85 +549,6 @@ void receive_bat_packet(struct ethhdr *ethhdr, 0, hna_buff_len, if_incoming); } -static bool purge_orig_neigbours(struct orig_node *orig_node, - struct neigh_node **best_neigh_node) -{ - struct list_head *list_pos, *list_pos_tmp; - char neigh_str[ETH_STR_LEN], orig_str[ETH_STR_LEN]; - struct neigh_node *neigh_node; - bool neigh_purged = false; - - *best_neigh_node = NULL; - - - /* for all neighbours towards this originator ... */ - list_for_each_safe(list_pos, list_pos_tmp, &orig_node->neigh_list) { - neigh_node = list_entry(list_pos, struct neigh_node, list); - - if (time_after(jiffies, - (neigh_node->last_valid + - ((PURGE_TIMEOUT * HZ) / 1000)))) { - - addr_to_string(neigh_str, neigh_node->addr); - bat_dbg(DBG_BATMAN, "Neighbour timeout: originator %s, neighbour: %s, last_valid %lu\n", orig_str, neigh_str, (neigh_node->last_valid / HZ)); - - neigh_purged = true; - list_del(list_pos); - kfree(neigh_node); - } else { - if ((*best_neigh_node == NULL) || - (neigh_node->tq_avg > (*best_neigh_node)->tq_avg)) - *best_neigh_node = neigh_node; - } - } - return neigh_purged; -} - -static bool purge_orig_node(struct orig_node *orig_node) -{ - struct neigh_node *best_neigh_node; - char orig_str[ETH_STR_LEN]; - - addr_to_string(orig_str, orig_node->orig); - - if (time_after(jiffies, - (orig_node->last_valid + - ((2 * PURGE_TIMEOUT * HZ) / 1000)))) { - - bat_dbg(DBG_BATMAN, - "Originator timeout: originator %s, last_valid %lu\n", - orig_str, (orig_node->last_valid / HZ)); - return true; - } else { - if (purge_orig_neigbours(orig_node, &best_neigh_node)) - update_routes(orig_node, best_neigh_node, - orig_node->hna_buff, - orig_node->hna_buff_len); - } - return false; -} - - -void purge_orig(struct work_struct *work) -{ - struct hash_it_t *hashit = NULL; - struct orig_node *orig_node; - - spin_lock(&orig_hash_lock); - - /* for all origins... */ - while (NULL != (hashit = hash_iterate(orig_hash, hashit))) { - orig_node = hashit->bucket->data; - if (purge_orig_node(orig_node)) { - hash_remove_bucket(orig_hash, hashit); - free_orig_node(orig_node); - } - } - - spin_unlock(&orig_hash_lock); - - start_purge_timer(); -} static int receive_raw_packet(struct socket *raw_sock, unsigned char *packet_buff, int packet_buff_len) @@ -1178,9 +969,9 @@ static int discard_one_packet(struct batman_if *batman_if, int result = -EAGAIN; if (batman_if->raw_sock) { - result = receive_raw_packet(batman_if->raw_sock, - packet_buff, - PACKBUFF_SIZE); + result = receive_raw_packet(batman_if->raw_sock, + packet_buff, + PACKBUFF_SIZE); } return result; } diff --git a/drivers/staging/batman-adv/routing.h b/drivers/staging/batman-adv/routing.h index 0123ea86debb..890a4f53b553 100644 --- a/drivers/staging/batman-adv/routing.h +++ b/drivers/staging/batman-adv/routing.h @@ -24,11 +24,13 @@ extern wait_queue_head_t thread_wait; extern atomic_t exit_cond; -int originator_init(void); -void free_orig_node(void *data); -void originator_free(void); void slide_own_bcast_window(struct batman_if *batman_if); void batman_data_ready(struct sock *sk, int len); -void purge_orig(struct work_struct *work); int packet_recv_thread(void *data); -void receive_bat_packet(struct ethhdr *ethhdr, struct batman_packet *batman_packet, unsigned char *hna_buff, int hna_buff_len, struct batman_if *if_incoming); +void receive_bat_packet(struct ethhdr *ethhdr, + struct batman_packet *batman_packet, + unsigned char *hna_buff, int hna_buff_len, + struct batman_if *if_incoming); +void update_routes(struct orig_node *orig_node, + struct neigh_node *neigh_node, + unsigned char *hna_buff, int hna_buff_len); From 734cc82a65cd5abc1b616fb0699eb2c251de7831 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Sat, 12 Dec 2009 23:39:46 +0100 Subject: [PATCH 033/367] Staging: batman-adv: Fix the naming of the debug option. So that the configuration hierarchy is correct, set the debug option to have the same base as the main BATMAN option. Signed-off-by: Andrew Lunn Signed-off-by: Marek Lindner Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/Kconfig | 4 ++-- drivers/staging/batman-adv/README | 2 +- drivers/staging/batman-adv/main.c | 2 +- drivers/staging/batman-adv/main.h | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/batman-adv/Kconfig b/drivers/staging/batman-adv/Kconfig index 1d74dabf9511..69e8fb039be0 100644 --- a/drivers/staging/batman-adv/Kconfig +++ b/drivers/staging/batman-adv/Kconfig @@ -14,10 +14,10 @@ config BATMAN_ADV http://www.open-mesh.org/ for more information and user space tools. -config BATMAN_DEBUG +config BATMAN_ADV_DEBUG bool "B.A.T.M.A.N. debugging" depends on BATMAN_ADV != n - help + ---help--- This is an option for use by developers; most people should say N here. This enables compilation of support for diff --git a/drivers/staging/batman-adv/README b/drivers/staging/batman-adv/README index 6c624820edd1..a6a419de0b50 100644 --- a/drivers/staging/batman-adv/README +++ b/drivers/staging/batman-adv/README @@ -115,7 +115,7 @@ kernel, use "make menuconfig" and enable the option "B.A.T.M.A.N. debugging". When compiling outside of the kernel tree it is necessary to edit the file Makefile.kbuild and uncomment the line -#EXTRA_CFLAGS += -DCONFIG_BATMAN_DEBUG +#EXTRA_CFLAGS += -DCONFIG_BATMAN_ADV_DEBUG The additional debug output is by default disabled. It can be enabled either at kernel modules load time or during run time. To enable debug diff --git a/drivers/staging/batman-adv/main.c b/drivers/staging/batman-adv/main.c index a74bfbeba7c4..434c600a6a47 100644 --- a/drivers/staging/batman-adv/main.c +++ b/drivers/staging/batman-adv/main.c @@ -57,7 +57,7 @@ atomic_t module_state; struct workqueue_struct *bat_event_workqueue; -#ifdef CONFIG_BATMAN_DEBUG +#ifdef CONFIG_BATMAN_ADV_DEBUG int debug; module_param(debug, int, 0644); diff --git a/drivers/staging/batman-adv/main.h b/drivers/staging/batman-adv/main.h index 6907cacf8c41..eb6a702c6444 100644 --- a/drivers/staging/batman-adv/main.h +++ b/drivers/staging/batman-adv/main.h @@ -76,7 +76,7 @@ * broadcasting / etc */ #define DBG_ROUTES 2 /* route or hna added / changed / deleted */ -#ifdef CONFIG_BATMAN_DEBUG +#ifdef CONFIG_BATMAN_ADV_DEBUG extern int debug; extern int bat_debug_type(int type); @@ -85,7 +85,7 @@ extern int bat_debug_type(int type); printk(KERN_DEBUG "batman-adv:" fmt, ## arg); \ } \ while (0) -#else /* !CONFIG_BATMAN_DEBUG */ +#else /* !CONFIG_BATMAN_ADV_DEBUG */ #define bat_dbg(type, fmt, arg...) do { \ } \ while (0) From c4ad074f11acc46a4ded25dec4f4c2b8d2d4ebb8 Mon Sep 17 00:00:00 2001 From: Ameya Palande <2ameya@gmail.com> Date: Mon, 14 Dec 2009 13:57:59 +0200 Subject: [PATCH 034/367] Staging: iio: checkinclude.pl fix Remove which is included twice Signed-off-by: Ameya Palande <2ameya@gmail.com> Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/ring_sw.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/iio/ring_sw.c b/drivers/staging/iio/ring_sw.c index 359ff9208f36..b746cf603225 100644 --- a/drivers/staging/iio/ring_sw.c +++ b/drivers/staging/iio/ring_sw.c @@ -8,7 +8,6 @@ */ #include -#include #include #include #include From 6309017f050af5bb66350ec25a2a1dd0c5643422 Mon Sep 17 00:00:00 2001 From: Huang Weiyi Date: Sun, 13 Dec 2009 21:14:10 +0800 Subject: [PATCH 035/367] Staging: wlags49_h2: remove duplicated #include Remove duplicated #include('s) in drivers/staging/wlags49_h2/wl_pci.c Signed-off-by: Huang Weiyi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlags49_h2/wl_pci.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/wlags49_h2/wl_pci.c b/drivers/staging/wlags49_h2/wl_pci.c index a3db111d4a95..01e4bec9fd5b 100644 --- a/drivers/staging/wlags49_h2/wl_pci.c +++ b/drivers/staging/wlags49_h2/wl_pci.c @@ -81,7 +81,6 @@ #include #include #include -#include #include #include From f70615a8f134c4ebe3c2848bb43a68335406a001 Mon Sep 17 00:00:00 2001 From: Huang Weiyi Date: Sun, 13 Dec 2009 22:06:25 +0800 Subject: [PATCH 036/367] Staging: ramzswap: remove unused #include Remove unused #include ('s) in drivers/staging/ramzswap/ramzswap_drv.c Signed-off-by: Huang Weiyi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ramzswap/ramzswap_drv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/ramzswap/ramzswap_drv.c b/drivers/staging/ramzswap/ramzswap_drv.c index 989fac5b01b3..18196f3852d8 100644 --- a/drivers/staging/ramzswap/ramzswap_drv.c +++ b/drivers/staging/ramzswap/ramzswap_drv.c @@ -29,7 +29,6 @@ #include #include #include -#include #include "ramzswap_drv.h" From 789d9dbdad5cb24fbf0c0e4fa5c5f1b792e4e81e Mon Sep 17 00:00:00 2001 From: Radu Voicilas Date: Fri, 4 Dec 2009 20:42:53 -0800 Subject: [PATCH 037/367] Staging: rtl8192e: fix some codingstyle issues dot11d.h needed a good refactoring - I've dropped some of the // comments or transformed them to match the kernel documentation. r8180_93cx6.h - fixed a little bit the copyright section. Signed-off-by: Radu Voicilas Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192e/dot11d.h | 122 ++++++++++++------------- drivers/staging/rtl8192e/r8180_93cx6.h | 33 +++---- 2 files changed, 75 insertions(+), 80 deletions(-) diff --git a/drivers/staging/rtl8192e/dot11d.h b/drivers/staging/rtl8192e/dot11d.h index 15b7a4ba37b6..5b0e2dbc2bb8 100644 --- a/drivers/staging/rtl8192e/dot11d.h +++ b/drivers/staging/rtl8192e/dot11d.h @@ -1,102 +1,96 @@ -#ifndef __INC_DOT11D_H -#define __INC_DOT11D_H +#ifndef INC_DOT11D_H +#define INC_DOT11D_H #ifdef ENABLE_DOT11D #include "ieee80211.h" -//#define ENABLE_DOT11D - -//#define DOT11D_MAX_CHNL_NUM 83 - typedef struct _CHNL_TXPOWER_TRIPLE { u8 FirstChnl; u8 NumChnls; u8 MaxTxPowerInDbm; -}CHNL_TXPOWER_TRIPLE, *PCHNL_TXPOWER_TRIPLE; +} CHNL_TXPOWER_TRIPLE, *PCHNL_TXPOWER_TRIPLE; typedef enum _DOT11D_STATE { DOT11D_STATE_NONE = 0, DOT11D_STATE_LEARNED, DOT11D_STATE_DONE, -}DOT11D_STATE; +} DOT11D_STATE; + +/** + * struct _RT_DOT11D_INFO + * @CountryIeLen: value greater than 0 if @CountryIeBuf contains + * valid country information element. + * @chanell_map: holds channel values + * 0 - invalid, + * 1 - valid (active scan), + * 2 - valid (passive scan) + * @CountryIeSrcAddr - Source AP of the country IE + */ typedef struct _RT_DOT11D_INFO { - //DECLARE_RT_OBJECT(RT_DOT11D_INFO); + bool bEnabled; - bool bEnabled; // dot11MultiDomainCapabilityEnabled + u16 CountryIeLen; + u8 CountryIeBuf[MAX_IE_LEN]; + u8 CountryIeSrcAddr[6]; + u8 CountryIeWatchdog; - u16 CountryIeLen; // > 0 if CountryIeBuf[] contains valid country information element. - u8 CountryIeBuf[MAX_IE_LEN]; - u8 CountryIeSrcAddr[6]; // Source AP of the country IE. - u8 CountryIeWatchdog; - - u8 channel_map[MAX_CHANNEL_NUMBER+1]; //!!!Value 0: Invalid, 1: Valid (active scan), 2: Valid (passive scan) - //u8 ChnlListLen; // #Bytes valid in ChnlList[]. - //u8 ChnlList[DOT11D_MAX_CHNL_NUM]; - u8 MaxTxPwrDbmList[MAX_CHANNEL_NUMBER+1]; + u8 channel_map[MAX_CHANNEL_NUMBER+1]; + u8 MaxTxPwrDbmList[MAX_CHANNEL_NUMBER+1]; DOT11D_STATE State; -}RT_DOT11D_INFO, *PRT_DOT11D_INFO; -#define eqMacAddr(a,b) ( ((a)[0]==(b)[0] && (a)[1]==(b)[1] && (a)[2]==(b)[2] && (a)[3]==(b)[3] && (a)[4]==(b)[4] && (a)[5]==(b)[5]) ? 1:0 ) -#define cpMacAddr(des,src) ((des)[0]=(src)[0],(des)[1]=(src)[1],(des)[2]=(src)[2],(des)[3]=(src)[3],(des)[4]=(src)[4],(des)[5]=(src)[5]) -#define GET_DOT11D_INFO(__pIeeeDev) ((PRT_DOT11D_INFO)((__pIeeeDev)->pDot11dInfo)) +} RT_DOT11D_INFO, *PRT_DOT11D_INFO; + +#define eqMacAddr(a, b) (((a)[0] == (b)[0] && (a)[1] == (b)[1] && (a)[2] == \ + (b)[2] && (a)[3] == (b)[3] && (a)[4] == (b)[4] && \ + (a)[5] == (b)[5]) ? 1 : 0) + +#define cpMacAddr(des, src) ((des)[0] = (src)[0], (des)[1] = (src)[1], \ + (des)[2] = (src)[2], (des)[3] = (src)[3], \ + (des)[4] = (src)[4], (des)[5] = (src)[5]) + +#define GET_DOT11D_INFO(__pIeeeDev) ((PRT_DOT11D_INFO) \ + ((__pIeeeDev)->pDot11dInfo)) #define IS_DOT11D_ENABLE(__pIeeeDev) GET_DOT11D_INFO(__pIeeeDev)->bEnabled -#define IS_COUNTRY_IE_VALID(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen > 0) +#define IS_COUNTRY_IE_VALID(__pIeeeDev) \ + (GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen > 0) -#define IS_EQUAL_CIE_SRC(__pIeeeDev, __pTa) eqMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa) -#define UPDATE_CIE_SRC(__pIeeeDev, __pTa) cpMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa) +#define IS_EQUAL_CIE_SRC(__pIeeeDev, __pTa) \ + eqMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa) + +#define UPDATE_CIE_SRC(__pIeeeDev, __pTa) \ + cpMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa) #define IS_COUNTRY_IE_CHANGED(__pIeeeDev, __Ie) \ - (((__Ie).Length == 0 || (__Ie).Length != GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen) ? \ - FALSE : \ - (!memcmp(GET_DOT11D_INFO(__pIeeeDev)->CountryIeBuf, (__Ie).Octet, (__Ie).Length))) + (((__Ie).Length == 0 || (__Ie).Length != \ + GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen) ? FALSE : \ + (!memcmp(GET_DOT11D_INFO(__pIeeeDev)->CountryIeBuf, \ + (__Ie).Octet, (__Ie).Length))) #define CIE_WATCHDOG_TH 1 #define GET_CIE_WATCHDOG(__pIeeeDev) GET_DOT11D_INFO(__pIeeeDev)->CountryIeWatchdog #define RESET_CIE_WATCHDOG(__pIeeeDev) GET_CIE_WATCHDOG(__pIeeeDev) = 0 #define UPDATE_CIE_WATCHDOG(__pIeeeDev) ++GET_CIE_WATCHDOG(__pIeeeDev) -#define IS_DOT11D_STATE_DONE(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->State == DOT11D_STATE_DONE) +#define IS_DOT11D_STATE_DONE(__pIeeeDev) \ + (GET_DOT11D_INFO(__pIeeeDev)->State == DOT11D_STATE_DONE) -void -Dot11d_Init( - struct ieee80211_device *dev - ); +void Dot11d_Init(struct ieee80211_device *dev); -void -Dot11d_Reset( - struct ieee80211_device *dev - ); +void Dot11d_Reset(struct ieee80211_device *dev); -void -Dot11d_UpdateCountryIe( - struct ieee80211_device *dev, - u8 * pTaddr, - u16 CoutryIeLen, - u8 * pCoutryIe - ); +void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr, + u16 CoutryIeLen, u8 *pCoutryIe); -u8 -DOT11D_GetMaxTxPwrInDbm( - struct ieee80211_device *dev, - u8 Channel - ); +u8 DOT11D_GetMaxTxPwrInDbm(struct ieee80211_device *dev, u8 channel); -void -DOT11D_ScanComplete( - struct ieee80211_device * dev - ); +void DOT11D_ScanComplete(struct ieee80211_device *dev); -int IsLegalChannel( - struct ieee80211_device * dev, - u8 channel -); +int IsLegalChannel(struct ieee80211_device *dev, u8 channel); -int ToLegalChannel( - struct ieee80211_device * dev, - u8 channel -); -#endif //ENABLE_DOT11D -#endif // #ifndef __INC_DOT11D_H +int ToLegalChannel(struct ieee80211_device *dev, u8 channel); + +#endif /* ENABLE_DOT11D */ +#endif /* INC_DOT11D_H */ diff --git a/drivers/staging/rtl8192e/r8180_93cx6.h b/drivers/staging/rtl8192e/r8180_93cx6.h index 62e14c78e960..4c3f675c6a66 100644 --- a/drivers/staging/rtl8192e/r8180_93cx6.h +++ b/drivers/staging/rtl8192e/r8180_93cx6.h @@ -1,17 +1,18 @@ -/* - This is part of rtl8187 OpenSource driver - Copyright (C) Andrea Merello 2004-2005 - Released under the terms of GPL (General Public Licence) - - Parts of this driver are based on the GPL part of the official realtek driver - Parts of this driver are based on the rtl8180 driver skeleton from Patric Schenke & Andres Salomon - Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver - - We want to tanks the Authors of such projects and the Ndiswrapper project Authors. -*/ - -/*This files contains card eeprom (93c46 or 93c56) programming routines*/ -/*memory is addressed by WORDS*/ +/* r8180_93cx6.h - 93c46 or 93c56 eeprom card programming routines + * + * This is part of rtl8187 OpenSource driver + * Copyright (C) Andrea Merello 2004-2005 + * Released under the terms of GPL (General Public Licence) + * Parts of this driver are based on the GPL part of the official realtek driver + * + * Parts of this driver are based on the rtl8180 driver skeleton from + * Patric Schenke & Andres Salomon. + * + * Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver + * + * We want to thank the authors of the above mentioned projects and to + * the authors of the Ndiswrapper project. + */ #include "r8192E.h" #include "r8192E_hw.h" @@ -36,5 +37,5 @@ #define EPROM_TXPW2 0x1b #define EPROM_TXPW1 0x3d - -u32 eprom_read(struct net_device *dev,u32 addr); //reads a 16 bits word +/* Reads a 16 bits word. */ +u32 eprom_read(struct net_device *dev, u32 addr); From 65a4378471510787e080188f933913315f1afa0c Mon Sep 17 00:00:00 2001 From: david woo Date: Tue, 22 Dec 2009 09:40:36 -0800 Subject: [PATCH 038/367] Staging: rtl9192e: fix power usage issues This patch should allow the driver to consume a lot less power. Signed-off-by: david woo Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192e/Makefile | 9 +- .../staging/rtl8192e/ieee80211/ieee80211.h | 156 +++- .../rtl8192e/ieee80211/ieee80211_crypt_ccmp.c | 6 +- .../staging/rtl8192e/ieee80211/ieee80211_rx.c | 96 ++- .../rtl8192e/ieee80211/ieee80211_softmac.c | 246 ++++-- .../rtl8192e/ieee80211/ieee80211_softmac_wx.c | 26 +- .../staging/rtl8192e/ieee80211/ieee80211_tx.c | 76 ++ .../staging/rtl8192e/ieee80211/rtl819x_HT.h | 4 +- .../rtl8192e/ieee80211/rtl819x_HTProc.c | 63 +- drivers/staging/rtl8192e/r8190_rtl8256.c | 358 +++++---- drivers/staging/rtl8192e/r8192E.h | 23 +- drivers/staging/rtl8192e/r8192E_core.c | 757 +++++++++++++++--- drivers/staging/rtl8192e/r8192E_dm.c | 40 +- drivers/staging/rtl8192e/r8192E_hw.h | 8 + drivers/staging/rtl8192e/r8192E_wx.c | 216 +++-- drivers/staging/rtl8192e/r8192E_wx.h | 1 - drivers/staging/rtl8192e/r819xE_phy.c | 2 +- drivers/staging/rtl8192e/r819xE_phyreg.h | 3 + 18 files changed, 1662 insertions(+), 428 deletions(-) diff --git a/drivers/staging/rtl8192e/Makefile b/drivers/staging/rtl8192e/Makefile index 5e4aa9546b51..e032c3e1e864 100644 --- a/drivers/staging/rtl8192e/Makefile +++ b/drivers/staging/rtl8192e/Makefile @@ -1,13 +1,15 @@ NIC_SELECT = RTL8192E - EXTRA_CFLAGS += -DRTL8192E EXTRA_CFLAGS += -std=gnu89 EXTRA_CFLAGS += -O2 EXTRA_CFLAGS += -DTHOMAS_TURBO EXTRA_CFLAGS += -DENABLE_DOT11D -r8192_pci-objs := \ +EXTRA_CFLAGS += -DENABLE_IPS +EXTRA_CFLAGS += -DENABLE_LPS + +r8192e_pci-objs := \ r8192E_core.o \ r8180_93cx6.o \ r8192E_wx.o \ @@ -31,4 +33,5 @@ r8192_pci-objs := \ ieee80211/ieee80211_crypt_ccmp.o \ ieee80211/ieee80211_crypt_wep.o -obj-$(CONFIG_RTL8192E) += r8192_pci.o +obj-$(CONFIG_RTL8192E) += r8192e_pci.o + diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211.h b/drivers/staging/rtl8192e/ieee80211/ieee80211.h index 9d91ab9fc04b..5859f66ff013 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211.h @@ -180,6 +180,8 @@ typedef struct cb_desc { u8 DrvAggrNum; u16 pkt_size; u8 reserved12; + + u8 bdhcp; }cb_desc, *pcb_desc; /*--------------------------Define -------------------------------------------*/ @@ -740,6 +742,8 @@ struct ieee80211_snap_hdr { #define WLAN_FC_GET_VERS(fc) ((fc) & IEEE80211_FCTL_VERS) #define WLAN_FC_GET_TYPE(fc) ((fc) & IEEE80211_FCTL_FTYPE) #define WLAN_FC_GET_STYPE(fc) ((fc) & IEEE80211_FCTL_STYPE) +#define WLAN_FC_MORE_DATA(fc) ((fc) & IEEE80211_FCTL_MOREDATA) + #define WLAN_FC_GET_FRAMETYPE(fc) ((fc) & IEEE80211_FCTL_FRAMETYPE) #define WLAN_GET_SEQ_FRAG(seq) ((seq) & IEEE80211_SCTL_FRAG) @@ -1052,7 +1056,7 @@ struct ieee80211_device; #define SEC_ALG_NONE 0 #define SEC_ALG_WEP 1 #define SEC_ALG_TKIP 2 -#define SEC_ALG_CCMP 3 +#define SEC_ALG_CCMP 4 #define WEP_KEYS 4 #define WEP_KEY_LEN 13 @@ -1121,6 +1125,14 @@ enum ieee80211_mfie { /* Minimal header; can be used for passing 802.11 frames with sufficient * information to determine what type of underlying data type is actually * stored in the data. */ + struct ieee80211_pspoll_hdr { + __le16 frame_ctl; + __le16 aid; + u8 bssid[ETH_ALEN]; + u8 ta[ETH_ALEN]; + //u8 payload[0]; +} __attribute__ ((packed)); + struct ieee80211_hdr { __le16 frame_ctl; __le16 duration_id; @@ -1657,6 +1669,7 @@ struct ieee80211_network { bool ralink_cap_exist; bool atheros_cap_exist; bool cisco_cap_exist; + bool marvell_cap_exist; bool unknown_cap_exist; // u8 berp_info; bool berp_info_valid; @@ -1862,6 +1875,19 @@ typedef struct _RT_POWER_SAVE_CONTROL // Leisre Poswer Save : Disable RF if connected but traffic is not busy // bool bLeisurePs; + u32 PowerProfile; + u8 LpsIdleCount; + u8 RegMaxLPSAwakeIntvl; + u8 LPSAwakeIntvl; + + u32 CurPsLevel; + u32 RegRfPsLevel; + + bool bFwCtrlLPS; + u8 FWCtrlPSMode; + + bool LinkReqInIPSRFOffPgs; + bool BufConnectinfoBefore; }RT_POWER_SAVE_CONTROL,*PRT_POWER_SAVE_CONTROL; @@ -1902,14 +1928,121 @@ typedef struct _RT_LINK_DETECT_T{ u32 NumTxOkInPeriod; u32 NumRxOkInPeriod; + u32 NumRxUnicastOkInPeriod; bool bBusyTraffic; }RT_LINK_DETECT_T, *PRT_LINK_DETECT_T; +//added by amy 090330 +typedef enum _HW_VARIABLES{ + HW_VAR_ETHER_ADDR, + HW_VAR_MULTICAST_REG, + HW_VAR_BASIC_RATE, + HW_VAR_BSSID, + HW_VAR_MEDIA_STATUS, + HW_VAR_SECURITY_CONF, + HW_VAR_BEACON_INTERVAL, + HW_VAR_ATIM_WINDOW, + HW_VAR_LISTEN_INTERVAL, + HW_VAR_CS_COUNTER, + HW_VAR_DEFAULTKEY0, + HW_VAR_DEFAULTKEY1, + HW_VAR_DEFAULTKEY2, + HW_VAR_DEFAULTKEY3, + HW_VAR_SIFS, + HW_VAR_DIFS, + HW_VAR_EIFS, + HW_VAR_SLOT_TIME, + HW_VAR_ACK_PREAMBLE, + HW_VAR_CW_CONFIG, + HW_VAR_CW_VALUES, + HW_VAR_RATE_FALLBACK_CONTROL, + HW_VAR_CONTENTION_WINDOW, + HW_VAR_RETRY_COUNT, + HW_VAR_TR_SWITCH, + HW_VAR_COMMAND, // For Command Register, Annie, 2006-04-07. + HW_VAR_WPA_CONFIG, //2004/08/23, kcwu, for 8187 Security config + HW_VAR_AMPDU_MIN_SPACE, // The spacing between sub-frame. Roger, 2008.07.04. + HW_VAR_SHORTGI_DENSITY, // The density for shortGI. Roger, 2008.07.04. + HW_VAR_AMPDU_FACTOR, + HW_VAR_MCS_RATE_AVAILABLE, + HW_VAR_AC_PARAM, // For AC Parameters, 2005.12.01, by rcnjko. + HW_VAR_ACM_CTRL, // For ACM Control, Annie, 2005-12-13. + HW_VAR_DIS_Req_Qsize, // For DIS_Reg_Qsize, Joseph + HW_VAR_CCX_CHNL_LOAD, // For CCX 2 channel load request, 2006.05.04. + HW_VAR_CCX_NOISE_HISTOGRAM, // For CCX 2 noise histogram request, 2006.05.04. + HW_VAR_CCX_CLM_NHM, // For CCX 2 parallel channel load request and noise histogram request, 2006.05.12. + HW_VAR_TxOPLimit, // For turbo mode related settings, added by Roger, 2006.12.07 + HW_VAR_TURBO_MODE, // For turbo mode related settings, added by Roger, 2006.12.15. + HW_VAR_RF_STATE, // For change or query RF power state, 061214, rcnjko. + HW_VAR_RF_OFF_BY_HW, // For UI to query if external HW signal disable RF, 061229, rcnjko. + HW_VAR_BUS_SPEED, // In unit of bps. 2006.07.03, by rcnjko. + HW_VAR_SET_DEV_POWER, // Set to low power, added by LanHsin, 2007. + + //1!!!!!!!!!!!!!!!!!!!!!!!!!!! + //1Attention Please!!!<11n or 8190 specific code should be put below this line> + //1!!!!!!!!!!!!!!!!!!!!!!!!!!! + HW_VAR_RCR, //for RCR, David 2006,05,11 + HW_VAR_RATR_0, + HW_VAR_RRSR, + HW_VAR_CPU_RST, + HW_VAR_CECHK_BSSID, + HW_VAR_LBK_MODE, // Set lookback mode, 2008.06.11. added by Roger. + // Set HW related setting for 11N AES bug. + HW_VAR_AES_11N_FIX, + // Set Usb Rx Aggregation + HW_VAR_USB_RX_AGGR, + HW_VAR_USER_CONTROL_TURBO_MODE, + HW_VAR_RETRY_LIMIT, +#ifndef _RTL8192_EXT_PATCH_ + HW_VAR_INIT_TX_RATE, //Get Current Tx rate register. 2008.12.10. Added by tynli +#endif + HW_VAR_TX_RATE_REG, //Get Current Tx rate register. 2008.12.10. Added by tynli + HW_VAR_EFUSE_USAGE, //Get current EFUSE utilization. 2008.12.19. Added by Roger. + HW_VAR_EFUSE_BYTES, + HW_VAR_AUTOLOAD_STATUS, //Get current autoload status, 0: autoload success, 1: autoload fail. 2008.12.19. Added by Roger. + HW_VAR_RF_2R_DISABLE, // 2R disable + HW_VAR_SET_RPWM, + HW_VAR_H2C_FW_PWRMODE, // For setting FW related H2C cmd structure. by tynli. 2009.2.18 + HW_VAR_H2C_FW_JOINBSSRPT, // For setting FW related H2C cmd structure. by tynli. 2009.2.18 + HW_VAR_1X1_RECV_COMBINE, // For 1T2R but only 1SS, Add by hpfan 2009.04.16 hpfan + HW_VAR_STOP_SEND_BEACON, + HW_VAR_TSF_TIMER, // Read from TSF register to get the current TSF timer, by Bruce, 2009-07-22. + HW_VAR_IO_CMD, + HW_VAR_HANDLE_FW_C2H, //Added by tynli. For handling FW C2H command. 2009.10.07. + HW_VAR_DL_FW_RSVD_PAGE, //Added by tynli. Download the packets that FW will use to RSVD page. 2009.10.14. + HW_VAR_AID, //Added by tynli. + HW_VAR_HW_SEQ_ENABLE, //Added by tynli. 2009.10.20. + HW_VAR_UPDATE_TSF, //Added by tynli. 2009.10.22. For Hw count TBTT time. + HW_VAR_BCN_VALID, //Added by tynli. + HW_VAR_FWLPS_RF_ON //Added by tynli. 2009.11.09. For checking if Fw finishs RF on sequence. +}HW_VARIABLES; + +#define RT_CHECK_FOR_HANG_PERIOD 2 struct ieee80211_device { struct net_device *dev; struct ieee80211_security sec; + bool need_sw_enc; +#ifdef ENABLE_LPS + bool bAwakePktSent; + u8 LPSDelayCnt; + bool bIsAggregateFrame; + bool polling; + void (*LeisurePSLeave)(struct net_device *dev); +#endif + +#ifdef ENABLE_IPS + bool proto_stoppping; + bool wx_set_enc; + struct semaphore ips_sem; + struct work_struct ips_leave_wq; + void (*ieee80211_ips_leave_wq) (struct net_device *dev); + void (*ieee80211_ips_leave)(struct net_device *dev); +#endif + void (*SetHwRegHandler)(struct net_device *dev,u8 variable,u8* val); + u8 (*rtllib_ap_sec_type)(struct ieee80211_device *ieee); + //hw security related // u8 hwsec_support; //support? u8 hwsec_active; //hw security active. @@ -2316,7 +2449,7 @@ struct ieee80211_device { * stop_send_bacons is NOT guaranteed to be called only * after start_send_beacons. */ - void (*start_send_beacons) (struct net_device *dev,u16 tx_rate); + void (*start_send_beacons) (struct net_device *dev); void (*stop_send_beacons) (struct net_device *dev); /* power save mode related */ @@ -2370,6 +2503,19 @@ struct ieee80211_device { u8 priv[0]; }; +#define RT_RF_OFF_LEVL_ASPM BIT0 // PCI ASPM +#define RT_RF_OFF_LEVL_CLK_REQ BIT1 // PCI clock request +#define RT_RF_OFF_LEVL_PCI_D3 BIT2 // PCI D3 mode +#define RT_RF_OFF_LEVL_HALT_NIC BIT3 // NIC halt, re-initialize hw parameters +#define RT_RF_OFF_LEVL_FREE_FW BIT4 // FW free, re-download the FW +#define RT_RF_OFF_LEVL_FW_32K BIT5 // FW in 32k +#define RT_RF_PS_LEVEL_ALWAYS_ASPM BIT6 // Always enable ASPM and Clock Req in initialization. +#define RT_RF_LPS_DISALBE_2R BIT30 // When LPS is on, disable 2R if no packet is received or transmittd. +#define RT_RF_LPS_LEVEL_ASPM BIT31 // LPS with ASPM +#define RT_IN_PS_LEVEL(pPSC, _PS_FLAG) ((pPSC->CurPsLevel & _PS_FLAG) ? true : false) +#define RT_CLEAR_PS_LEVEL(pPSC, _PS_FLAG) (pPSC->CurPsLevel &= (~(_PS_FLAG))) +#define RT_SET_PS_LEVEL(pPSC, _PS_FLAG) (pPSC->CurPsLevel |= _PS_FLAG) + #define IEEE_A (1<<0) #define IEEE_B (1<<1) #define IEEE_G (1<<2) @@ -2606,9 +2752,9 @@ extern void ieee80211_stop_scan(struct ieee80211_device *ieee); extern void ieee80211_start_scan_syncro(struct ieee80211_device *ieee); extern void ieee80211_check_all_nets(struct ieee80211_device *ieee); extern void ieee80211_start_protocol(struct ieee80211_device *ieee); -extern void ieee80211_stop_protocol(struct ieee80211_device *ieee); +extern void ieee80211_stop_protocol(struct ieee80211_device *ieee,u8 shutdown); extern void ieee80211_softmac_start_protocol(struct ieee80211_device *ieee); -extern void ieee80211_softmac_stop_protocol(struct ieee80211_device *ieee); +extern void ieee80211_softmac_stop_protocol(struct ieee80211_device *ieee,u8 shutdown); extern void ieee80211_reset_queue(struct ieee80211_device *ieee); extern void ieee80211_rtl_wake_queue(struct ieee80211_device *ieee); extern void ieee80211_rtl_stop_queue(struct ieee80211_device *ieee); @@ -2795,5 +2941,7 @@ extern int ieee80211_parse_info_param(struct ieee80211_device *ieee, struct ieee80211_rx_stats *stats); void ieee80211_indicate_packets(struct ieee80211_device *ieee, struct ieee80211_rxb** prxbIndicateArray,u8 index); +void ieee80211_sta_ps_send_null_frame(struct ieee80211_device *ieee, short pwr); +void ieee80211_sta_ps_send_pspoll_frame(struct ieee80211_device *ieee); #define RT_ASOC_RETRY_LIMIT 5 #endif /* IEEE80211_H */ diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c index 609c289541d4..70159cf28bce 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c @@ -361,9 +361,9 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) if (memcmp(pn, key->rx_pn, CCMP_PN_LEN) <= 0) { if (net_ratelimit()) { - printk(KERN_DEBUG "CCMP: replay detected: STA=%pM" - " previous PN %pm received PN %pm\n", - hdr->addr2, key->rx_pn, pn); + //printk(KERN_DEBUG "CCMP: replay detected: STA=%pM" + // " previous PN %pm received PN %pm\n", + // hdr->addr2, key->rx_pn, pn); } key->dot11RSNAStatsCCMPReplays++; return -4; diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c index 7a500ac37acb..ce265ae5fe18 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c @@ -312,6 +312,17 @@ static int ieee80211_is_eapol_frame(struct ieee80211_device *ieee, if (skb->len < 24) return 0; +#if 1 + if (ieee->hwsec_active) + { + cb_desc *tcb_desc = (cb_desc *)(skb->cb+ MAX_DEV_ADDR_SIZE); + tcb_desc->bHwSec = 1; + + if(ieee->need_sw_enc) + tcb_desc->bHwSec = 0; + } +#endif + hdr = (struct ieee80211_hdr_4addr *) skb->data; fc = le16_to_cpu(hdr->frame_ctl); @@ -406,6 +417,10 @@ ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device* ieee, struct sk_buff *s { cb_desc *tcb_desc = (cb_desc *)(skb->cb+ MAX_DEV_ADDR_SIZE); tcb_desc->bHwSec = 1; + + if(ieee->need_sw_enc) + tcb_desc->bHwSec = 0; + } hdr = (struct ieee80211_hdr_4addr *) skb->data; @@ -799,7 +814,7 @@ void RxReorderIndicatePacket( struct ieee80211_device *ieee, #endif } -u8 parse_subframe(struct sk_buff *skb, +u8 parse_subframe(struct ieee80211_device* ieee,struct sk_buff *skb, struct ieee80211_rx_stats *rx_stats, struct ieee80211_rxb *rxb,u8* src,u8* dst) { @@ -839,6 +854,7 @@ u8 parse_subframe(struct sk_buff *skb, } skb_pull(skb, LLCOffset); + ieee->bIsAggregateFrame = bIsAggregateFrame;//added by amy for Leisure PS if(!bIsAggregateFrame) { rxb->nr_subframes = 1; @@ -940,6 +956,7 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, u8 TID = 0; u16 SeqNum = 0; PRX_TS_RECORD pTS = NULL; + bool unicast_packet = false; //bool bIsAggregateFrame = false; //added by amy for reorder #ifdef NOT_YET @@ -1215,6 +1232,24 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, if (memcmp(bssid, ieee->current_network.bssid, ETH_ALEN)) goto rx_dropped; +#ifdef ENABLE_LPS + if ((ieee->iw_mode == IW_MODE_INFRA) && (ieee->sta_sleep == 1) + && (ieee->polling)) { + if (WLAN_FC_MORE_DATA(fc)) { + /* more data bit is set, let's request a new frame from the AP */ + ieee80211_sta_ps_send_pspoll_frame(ieee); + } else { + ieee->polling = false; + } + } +#endif + + ieee->need_sw_enc = 0; + + if((!rx_stats->Decrypted)){ + ieee->need_sw_enc = 1; + } + /* skb: hdr + (possibly fragmented, possibly encrypted) payload */ if (ieee->host_decrypt && (fc & IEEE80211_FCTL_WEP) && @@ -1296,6 +1331,9 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, ieee->LinkDetectInfo.NumRxOkInPeriod++; hdr = (struct ieee80211_hdr_4addr *) skb->data; + if((!is_multicast_ether_addr(hdr->addr1)) && (!is_broadcast_ether_addr(hdr->addr1))) + unicast_packet = true; + if (crypt && !(fc & IEEE80211_FCTL_WEP) && !ieee->open_wep) { if (/*ieee->ieee802_1x &&*/ ieee80211_is_eapol_frame(ieee, skb, hdrlen)) { @@ -1367,7 +1405,7 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, } /* to parse amsdu packets */ /* qos data packets & reserved bit is 1 */ - if(parse_subframe(skb,rx_stats,rxb,src,dst) == 0) { + if(parse_subframe(ieee, skb,rx_stats,rxb,src,dst) == 0) { /* only to free rxb, and not submit the packets to upper layer */ for(i =0; i < rxb->nr_subframes; i++) { dev_kfree_skb(rxb->subframes[i]); @@ -1377,6 +1415,32 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb, goto rx_dropped; } +#ifdef ENABLE_LPS + if(unicast_packet) + { + if (type == IEEE80211_FTYPE_DATA) + { + + if(ieee->bIsAggregateFrame) + ieee->LinkDetectInfo.NumRxUnicastOkInPeriod+=rxb->nr_subframes; + else + ieee->LinkDetectInfo.NumRxUnicastOkInPeriod++; + + // 2009.03.03 Leave DC mode immediately when detect high traffic + // DbgPrint("ending Seq %d\n", Frame_SeqNum(pduOS)); + if((ieee->state == IEEE80211_LINKED) /*&& !MgntInitAdapterInProgress(pMgntInfo)*/) + { + if( ((ieee->LinkDetectInfo.NumRxUnicastOkInPeriod +ieee->LinkDetectInfo.NumTxOkInPeriod) > 8 ) || + (ieee->LinkDetectInfo.NumRxUnicastOkInPeriod > 2) ) + { + if(ieee->LeisurePSLeave) + ieee->LeisurePSLeave(dev); + } + } + } + } +#endif + ieee->last_rx_ps_time = jiffies; //added by amy for reorder if(ieee->pHTInfo->bCurRxReorderEnable == false ||pTS == NULL){ @@ -2013,12 +2077,22 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee, info_element->data[1] == 0x13 && info_element->data[2] == 0x74)) { - printk("========>%s(): athros AP is exist\n",__FUNCTION__); + //printk("========>%s(): athros AP is exist\n",__FUNCTION__); network->atheros_cap_exist = true; } else network->atheros_cap_exist = false; + if ((info_element->len >= 3 && + info_element->data[0] == 0x00 && + info_element->data[1] == 0x50 && + info_element->data[2] == 0x43) ) + { + network->marvell_cap_exist = true; + //printk("========>%s(): marvel AP is exist\n",__FUNCTION__); + } + + if(info_element->len >= 3 && info_element->data[0] == 0x00 && info_element->data[1] == 0x40 && @@ -2219,7 +2293,8 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee, } if(!network->atheros_cap_exist && !network->broadcom_cap_exist && - !network->cisco_cap_exist && !network->ralink_cap_exist && !network->bssht.bdRT2RTAggregation) + !network->cisco_cap_exist && !network->ralink_cap_exist && !network->bssht.bdRT2RTAggregation && + !network->marvell_cap_exist) { network->unknown_cap_exist = true; } @@ -2333,6 +2408,7 @@ static inline int ieee80211_network_init( network->broadcom_cap_exist = false; network->ralink_cap_exist = false; network->atheros_cap_exist = false; + network->marvell_cap_exist = false; network->cisco_cap_exist = false; network->unknown_cap_exist = false; #ifdef THOMAS_TURBO @@ -2463,6 +2539,7 @@ static inline void update_network(struct ieee80211_network *dst, dst->broadcom_cap_exist = src->broadcom_cap_exist; dst->ralink_cap_exist = src->ralink_cap_exist; dst->atheros_cap_exist = src->atheros_cap_exist; + dst->marvell_cap_exist = src->marvell_cap_exist; dst->cisco_cap_exist = src->cisco_cap_exist; dst->unknown_cap_exist = src->unknown_cap_exist; memcpy(dst->wpa_ie, src->wpa_ie, src->wpa_ie_len); @@ -2761,12 +2838,14 @@ void ieee80211_rx_mgt(struct ieee80211_device *ieee, struct ieee80211_hdr_4addr *header, struct ieee80211_rx_stats *stats) { +#if 0 if(ieee->sta_sleep || (ieee->ps != IEEE80211_PS_DISABLED && ieee->iw_mode == IW_MODE_INFRA && ieee->state == IEEE80211_LINKED)) { tasklet_schedule(&ieee->ps_task); } +#endif if(WLAN_FC_GET_STYPE(header->frame_ctl) != IEEE80211_STYPE_PROBE_RESP && WLAN_FC_GET_STYPE(header->frame_ctl) != IEEE80211_STYPE_BEACON) @@ -2780,6 +2859,15 @@ void ieee80211_rx_mgt(struct ieee80211_device *ieee, IEEE80211_DEBUG_SCAN("Beacon\n"); ieee80211_process_probe_response( ieee, (struct ieee80211_probe_response *)header, stats); + + //printk("----------->%s()\n", __func__); + if(ieee->sta_sleep || (ieee->ps != IEEE80211_PS_DISABLED && + ieee->iw_mode == IW_MODE_INFRA && + ieee->state == IEEE80211_LINKED)) + { + tasklet_schedule(&ieee->ps_task); + } + break; case IEEE80211_STYPE_PROBE_RESP: diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c index 9e923e29c455..ea96c4956930 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c @@ -646,7 +646,7 @@ void ieee80211_stop_send_beacons(struct ieee80211_device *ieee) void ieee80211_start_send_beacons(struct ieee80211_device *ieee) { if(ieee->start_send_beacons) - ieee->start_send_beacons(ieee->dev,ieee->basic_rate); + ieee->start_send_beacons(ieee->dev); if(ieee->softmac_features & IEEE_SOFTMAC_BEACONS) ieee80211_beacons_start(ieee); } @@ -686,6 +686,11 @@ void ieee80211_stop_scan(struct ieee80211_device *ieee) /* called with ieee->lock held */ void ieee80211_rtl_start_scan(struct ieee80211_device *ieee) { +#ifdef ENABLE_IPS + if(ieee->ieee80211_ips_leave_wq != NULL) + ieee->ieee80211_ips_leave_wq(ieee->dev); +#endif + #ifdef ENABLE_DOT11D if(IS_DOT11D_ENABLE(ieee) ) { @@ -1093,6 +1098,40 @@ struct sk_buff* ieee80211_null_func(struct ieee80211_device *ieee,short pwr) } +struct sk_buff* ieee80211_pspoll_func(struct ieee80211_device *ieee) +{ + struct sk_buff *skb; + struct ieee80211_pspoll_hdr* hdr; + +#ifdef USB_USE_ALIGNMENT + u32 Tmpaddr=0; + int alignment=0; + skb = dev_alloc_skb(sizeof(struct ieee80211_pspoll_hdr) + ieee->tx_headroom + USB_512B_ALIGNMENT_SIZE); +#else + skb = dev_alloc_skb(sizeof(struct ieee80211_pspoll_hdr)+ieee->tx_headroom); +#endif + if (!skb) + return NULL; + +#ifdef USB_USE_ALIGNMENT + Tmpaddr = (u32)skb->data; + alignment = Tmpaddr & 0x1ff; + skb_reserve(skb,(USB_512B_ALIGNMENT_SIZE - alignment)); +#endif + skb_reserve(skb, ieee->tx_headroom); + + hdr = (struct ieee80211_pspoll_hdr*)skb_put(skb,sizeof(struct ieee80211_pspoll_hdr)); + + memcpy(hdr->bssid, ieee->current_network.bssid, ETH_ALEN); + memcpy(hdr->ta, ieee->dev->dev_addr, ETH_ALEN); + + hdr->aid = cpu_to_le16(ieee->assoc_id | 0xc000); + hdr->frame_ctl = cpu_to_le16(IEEE80211_FTYPE_CTL |IEEE80211_STYPE_PSPOLL | IEEE80211_FCTL_PM); + + return skb; + +} + void ieee80211_resp_to_assoc_rq(struct ieee80211_device *ieee, u8* dest) { @@ -1582,6 +1621,11 @@ void ieee80211_associate_procedure_wq(struct ieee80211_device *ieee) { #endif ieee->sync_scan_hurryup = 1; +#ifdef ENABLE_IPS + if(ieee->ieee80211_ips_leave != NULL) + ieee->ieee80211_ips_leave(ieee->dev); +#endif + down(&ieee->wx_sem); if (ieee->data_hard_stop) @@ -1592,6 +1636,17 @@ void ieee80211_associate_procedure_wq(struct ieee80211_device *ieee) //ieee->set_chan(ieee->dev, ieee->current_network.channel); HTSetConnectBwMode(ieee, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT); +#ifdef ENABLE_IPS + if(ieee->eRFPowerState == eRfOff) + { + if(ieee->ieee80211_ips_leave_wq != NULL) + ieee->ieee80211_ips_leave_wq(ieee->dev); + + up(&ieee->wx_sem); + return; + } +#endif + ieee->associate_seq = 1; ieee80211_associate_step1(ieee); @@ -1918,43 +1973,92 @@ void ieee80211_sta_ps_send_null_frame(struct ieee80211_device *ieee, short pwr) } +void ieee80211_sta_ps_send_pspoll_frame(struct ieee80211_device *ieee) +{ + + struct sk_buff *buf = ieee80211_pspoll_func(ieee); + + if (buf) + softmac_ps_mgmt_xmit(buf, ieee); + +} short ieee80211_sta_ps_sleep(struct ieee80211_device *ieee, u32 *time_h, u32 *time_l) { int timeout = ieee->ps_timeout; u8 dtim; - /*if(ieee->ps == IEEE80211_PS_DISABLED || - ieee->iw_mode != IW_MODE_INFRA || - ieee->state != IEEE80211_LINKED) + PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(ieee->PowerSaveControl)); + if(ieee->LPSDelayCnt) + { + //printk("===============>Delay enter LPS for DHCP and ARP packets...\n"); + ieee->LPSDelayCnt --; return 0; - */ + } + dtim = ieee->current_network.dtim_data; - //printk("DTIM\n"); +// printk("%s():DTIM:%d\n",__FUNCTION__,dtim); if(!(dtim & IEEE80211_DTIM_VALID)) return 0; timeout = ieee->current_network.beacon_interval; //should we use ps_timeout value or beacon_interval //printk("VALID\n"); ieee->current_network.dtim_data = IEEE80211_DTIM_INVALID; - - if(dtim & ((IEEE80211_DTIM_UCAST | IEEE80211_DTIM_MBCAST)& ieee->ps)) + /* there's no need to nofity AP that I find you buffered with broadcast packet */ + if(dtim & (IEEE80211_DTIM_UCAST & ieee->ps)) return 2; - if(!time_after(jiffies, ieee->dev->trans_start + MSECS(timeout))) + if(!time_after(jiffies, ieee->dev->trans_start + MSECS(timeout))){ +// printk("%s():111Oh Oh ,it is not time out return 0\n",__FUNCTION__); return 0; - - if(!time_after(jiffies, ieee->last_rx_ps_time + MSECS(timeout))) + } + if(!time_after(jiffies, ieee->last_rx_ps_time + MSECS(timeout))){ +// printk("%s():222Oh Oh ,it is not time out return 0\n",__FUNCTION__); return 0; - + } if((ieee->softmac_features & IEEE_SOFTMAC_SINGLE_QUEUE ) && (ieee->mgmt_queue_tail != ieee->mgmt_queue_head)) return 0; if(time_l){ + if(ieee->bAwakePktSent == true) { + pPSC->LPSAwakeIntvl = 1;//tx wake one beacon + } else { + u8 MaxPeriod = 1; + + if(pPSC->LPSAwakeIntvl == 0) + pPSC->LPSAwakeIntvl = 1; + //pNdisCommon->RegLPSMaxIntvl /// 0x0 - eFastPs, 0xFF -DTIM, 0xNN - 0xNN * BeaconIntvl + if(pPSC->RegMaxLPSAwakeIntvl == 0) // Default (0x0 - eFastPs, 0xFF -DTIM, 0xNN - 0xNN * BeaconIntvl) + MaxPeriod = 1; // 1 Beacon interval + else if(pPSC->RegMaxLPSAwakeIntvl == 0xFF) // DTIM + MaxPeriod = ieee->current_network.dtim_period; + else + MaxPeriod = pPSC->RegMaxLPSAwakeIntvl; + pPSC->LPSAwakeIntvl = (pPSC->LPSAwakeIntvl >= MaxPeriod) ? MaxPeriod : (pPSC->LPSAwakeIntvl + 1); + } + { + u8 LPSAwakeIntvl_tmp = 0; + u8 period = ieee->current_network.dtim_period; + u8 count = ieee->current_network.tim.tim_count; + if(count == 0 ) { + if(pPSC->LPSAwakeIntvl > period) + LPSAwakeIntvl_tmp = period + (pPSC->LPSAwakeIntvl - period) -((pPSC->LPSAwakeIntvl-period)%period); + else + LPSAwakeIntvl_tmp = pPSC->LPSAwakeIntvl; + + } else { + if(pPSC->LPSAwakeIntvl > ieee->current_network.tim.tim_count) + LPSAwakeIntvl_tmp = count + (pPSC->LPSAwakeIntvl - count) -((pPSC->LPSAwakeIntvl-count)%period); + else + LPSAwakeIntvl_tmp = pPSC->LPSAwakeIntvl;//ieee->current_network.tim.tim_count;//pPSC->LPSAwakeIntvl; + } + //printk("=========>%s()assoc_id:%d(%#x),bAwakePktSent:%d,DTIM:%d, sleep interval:%d, LPSAwakeIntvl_tmp:%d, count:%d\n",__func__,ieee->assoc_id,cpu_to_le16(ieee->assoc_id),ieee->bAwakePktSent,ieee->current_network.dtim_period,pPSC->LPSAwakeIntvl,LPSAwakeIntvl_tmp,count); + *time_l = ieee->current_network.last_dtim_sta_time[0] - + (ieee->current_network.beacon_interval); + + MSECS(ieee->current_network.beacon_interval * LPSAwakeIntvl_tmp); // * ieee->current_network.dtim_period) * 1000; } + } if(time_h){ *time_h = ieee->current_network.last_dtim_sta_time[1]; @@ -1982,6 +2086,8 @@ inline void ieee80211_sta_ps(struct ieee80211_device *ieee) ieee->state != IEEE80211_LINKED)){ // #warning CHECK_LOCK_HERE + printk("=====>%s(): no need to ps,wake up!! ieee->ps is %d,ieee->iw_mode is %d,ieee->state is %d\n", + __FUNCTION__,ieee->ps,ieee->iw_mode,ieee->state); spin_lock_irqsave(&ieee->mgmt_tx_lock, flags2); ieee80211_sta_wakeup(ieee, 1); @@ -1991,27 +2097,27 @@ inline void ieee80211_sta_ps(struct ieee80211_device *ieee) sleep = ieee80211_sta_ps_sleep(ieee,&th, &tl); /* 2 wake, 1 sleep, 0 do nothing */ - if(sleep == 0) + if(sleep == 0)//it is not time out or dtim is not valid + { + //printk("===========>sleep is 0,do nothing\n"); goto out; - + } if(sleep == 1){ - - if(ieee->sta_sleep == 1) + //printk("===========>sleep is 1,to sleep\n"); + if(ieee->sta_sleep == 1){ + //printk("%s(1): sta_sleep = 1, sleep again ++++++++++ \n", __func__); ieee->enter_sleep_state(ieee->dev,th,tl); + } else if(ieee->sta_sleep == 0){ // printk("send null 1\n"); spin_lock_irqsave(&ieee->mgmt_tx_lock, flags2); if(ieee->ps_is_queue_empty(ieee->dev)){ - - ieee->sta_sleep = 2; - ieee->ack_tx_to_ieee = 1; - + //printk("%s(2): sta_sleep = 0, notify AP we will sleeped ++++++++++ SendNullFunctionData\n", __func__); ieee80211_sta_ps_send_null_frame(ieee,1); - ieee->ps_th = th; ieee->ps_tl = tl; } @@ -2019,11 +2125,13 @@ inline void ieee80211_sta_ps(struct ieee80211_device *ieee) } + ieee->bAwakePktSent = false;//after null to power save we set it to false. not listen every beacon. }else if(sleep == 2){ -//#warning CHECK_LOCK_HERE + //printk("==========>sleep is 2,to wakeup\n"); spin_lock_irqsave(&ieee->mgmt_tx_lock, flags2); + //printk("%s(3): pkt buffered in ap will awake ++++++++++ ieee80211_sta_wakeup\n", __func__); ieee80211_sta_wakeup(ieee,1); spin_unlock_irqrestore(&ieee->mgmt_tx_lock, flags2); @@ -2038,9 +2146,19 @@ void ieee80211_sta_wakeup(struct ieee80211_device *ieee, short nl) { if(ieee->sta_sleep == 0){ if(nl){ - printk("Warning: driver is probably failing to report TX ps error\n"); - ieee->ack_tx_to_ieee = 1; - ieee80211_sta_ps_send_null_frame(ieee, 0); + if(ieee->pHTInfo->IOTAction & HT_IOT_ACT_NULL_DATA_POWER_SAVING) + { + //printk("%s(1): notify AP we are awaked ++++++++++ SendNullFunctionData\n", __func__); + //printk("Warning: driver is probably failing to report TX ps error\n"); + ieee->ack_tx_to_ieee = 1; + ieee80211_sta_ps_send_null_frame(ieee, 0); + } + else + { + ieee->ack_tx_to_ieee = 1; + //printk("%s(2): notify AP we are awaked ++++++++++ Send PS-Poll\n", __func__); + ieee80211_sta_ps_send_pspoll_frame(ieee); + } } return; @@ -2048,12 +2166,27 @@ void ieee80211_sta_wakeup(struct ieee80211_device *ieee, short nl) if(ieee->sta_sleep == 1) ieee->sta_wake_up(ieee->dev); - - ieee->sta_sleep = 0; - if(nl){ - ieee->ack_tx_to_ieee = 1; - ieee80211_sta_ps_send_null_frame(ieee, 0); + + if(ieee->pHTInfo->IOTAction & HT_IOT_ACT_NULL_DATA_POWER_SAVING) + { + //printk("%s(3): notify AP we are awaked ++++++++++ SendNullFunctionData\n", __func__); + //printk("Warning: driver is probably failing to report TX ps error\n"); + ieee->ack_tx_to_ieee = 1; + ieee80211_sta_ps_send_null_frame(ieee, 0); + } + else + { + ieee->ack_tx_to_ieee = 1; + ieee->polling = true; + //printk("%s(4): notify AP we are awaked ++++++++++ Send PS-Poll\n", __func__); + //ieee80211_sta_ps_send_null_frame(ieee, 0); + ieee80211_sta_ps_send_pspoll_frame(ieee); + } + + } else { + ieee->sta_sleep = 0; + ieee->polling = false; } } @@ -2067,23 +2200,30 @@ void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success) /* Null frame with PS bit set */ if(success){ ieee->sta_sleep = 1; + //printk("notify AP we will sleep and send null ok, so sleep now++++++++++ enter_sleep_state\n"); ieee->enter_sleep_state(ieee->dev,ieee->ps_th,ieee->ps_tl); } - /* if the card report not success we can't be sure the AP - * has not RXed so we can't assume the AP believe us awake - */ - } - /* 21112005 - tx again null without PS bit if lost */ - else { + } else {/* 21112005 - tx again null without PS bit if lost */ if((ieee->sta_sleep == 0) && !success){ spin_lock_irqsave(&ieee->mgmt_tx_lock, flags2); - ieee80211_sta_ps_send_null_frame(ieee, 0); + //ieee80211_sta_ps_send_null_frame(ieee, 0); + if(ieee->pHTInfo->IOTAction & HT_IOT_ACT_NULL_DATA_POWER_SAVING) + { + //printk("notify AP we will sleep but send bull failed, so resend++++++++++ SendNullFunctionData\n"); + ieee80211_sta_ps_send_null_frame(ieee, 0); + } + else + { + //printk("notify AP we are awaked but send pspoll failed, so resend++++++++++ Send PS-Poll\n"); + ieee80211_sta_ps_send_pspoll_frame(ieee); + } spin_unlock_irqrestore(&ieee->mgmt_tx_lock, flags2); } } spin_unlock_irqrestore(&ieee->lock, flags); } + void ieee80211_process_action(struct ieee80211_device* ieee, struct sk_buff* skb) { struct ieee80211_hdr* header = (struct ieee80211_hdr*)skb->data; @@ -2227,7 +2367,7 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb, { if (!ieee->GetNmodeSupportBySecCfg(ieee->dev)) { - // WEP or TKIP encryption + // WEP or TKIP encryption if(IsHTHalfNmodeAPs(ieee)) { bSupportNmode = true; @@ -2238,7 +2378,7 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb, bSupportNmode = false; bHalfSupportNmode = false; } - printk("==========>to link with AP using SEC(%d, %d)", bSupportNmode, bHalfSupportNmode); + printk("==========>to link with AP using SEC(%d, %d)\n", bSupportNmode, bHalfSupportNmode); } } /* Dummy wirless mode setting to avoid encryption issue */ @@ -2574,6 +2714,7 @@ void ieee80211_start_ibss_wq(struct ieee80211_device *ieee) ieee->ssid_set = 1; } + ieee->state = IEEE80211_NOLINK; /* check if we have this cell in our network list */ ieee80211_softmac_check_all_nets(ieee); @@ -2705,6 +2846,10 @@ void ieee80211_start_bss(struct ieee80211_device *ieee) spin_lock_irqsave(&ieee->lock, flags); if (ieee->state == IEEE80211_NOLINK){ +#ifdef ENABLE_IPS + if(ieee->ieee80211_ips_leave_wq != NULL) + ieee->ieee80211_ips_leave_wq(ieee->dev); +#endif ieee->actscanning = true; ieee80211_rtl_start_scan(ieee); } @@ -2823,21 +2968,23 @@ struct sk_buff *ieee80211_get_beacon(struct ieee80211_device *ieee) return skb; } -void ieee80211_softmac_stop_protocol(struct ieee80211_device *ieee) +void ieee80211_softmac_stop_protocol(struct ieee80211_device *ieee, u8 shutdown) { ieee->sync_scan_hurryup = 1; down(&ieee->wx_sem); - ieee80211_stop_protocol(ieee); + ieee80211_stop_protocol(ieee, shutdown); up(&ieee->wx_sem); } -void ieee80211_stop_protocol(struct ieee80211_device *ieee) +void ieee80211_stop_protocol(struct ieee80211_device *ieee, u8 shutdown) { if (!ieee->proto_started) return; - ieee->proto_started = 0; + if(shutdown) + ieee->proto_started = 0; + ieee->proto_stoppping = 1; ieee80211_stop_send_beacons(ieee); del_timer_sync(&ieee->associate_timer); @@ -2849,6 +2996,8 @@ void ieee80211_stop_protocol(struct ieee80211_device *ieee) ieee80211_disassociate(ieee); RemoveAllTS(ieee); //added as we disconnect from the previous BSS, Remove all TS + + ieee->proto_stoppping = 0; } void ieee80211_softmac_start_protocol(struct ieee80211_device *ieee) @@ -2894,6 +3043,8 @@ void ieee80211_start_protocol(struct ieee80211_device *ieee) ieee->init_wmmparam_flag = 0;//reinitialize AC_xx_PARAM registers. + ieee->state = IEEE80211_NOLINK; + /* if the user set the MAC of the ad-hoc cell and then * switch to managed mode, shall we make sure that association @@ -3013,7 +3164,9 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee) #endif sema_init(&ieee->wx_sem, 1); sema_init(&ieee->scan_sem, 1); - +#ifdef ENABLE_IPS + sema_init(&ieee->ips_sem,1); +#endif spin_lock_init(&ieee->mgmt_tx_lock); spin_lock_init(&ieee->beacon_lock); @@ -3537,5 +3690,6 @@ EXPORT_SYMBOL_NOVERS(ieee80211_stop_scan); EXPORT_SYMBOL_NOVERS(ieee80211_send_probe_requests); EXPORT_SYMBOL_NOVERS(ieee80211_softmac_scan_syncro); EXPORT_SYMBOL_NOVERS(ieee80211_start_scan_syncro); +EXPORT_SYMBOL_NOVERS(ieee80211_sta_ps_send_null_frame); +EXPORT_SYMBOL_NOVERS(ieee80211_sta_ps_send_pspoll_frame); #endif -//EXPORT_SYMBOL(ieee80211_sta_ps_send_null_frame); diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c index 7c21aaab9063..1bbd49f1d6f6 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c @@ -160,7 +160,7 @@ int ieee80211_wx_set_wap(struct ieee80211_device *ieee, } if (ifup) - ieee80211_stop_protocol(ieee); + ieee80211_stop_protocol(ieee,true); /* just to avoid to give inconsistent infos in the * get wx method. not really needed otherwise @@ -302,7 +302,7 @@ int ieee80211_wx_set_mode(struct ieee80211_device *ieee, struct iw_request_info if (!ieee->proto_started){ ieee->iw_mode = wrqu->mode; }else{ - ieee80211_stop_protocol(ieee); + ieee80211_stop_protocol(ieee,true); ieee->iw_mode = wrqu->mode; ieee80211_start_protocol(ieee); } @@ -326,6 +326,17 @@ void ieee80211_wx_sync_scan_wq(struct ieee80211_device *ieee) int b40M = 0; static int count = 0; chan = ieee->current_network.channel; + +#ifdef ENABLE_LPS + if (ieee->LeisurePSLeave) { + ieee->LeisurePSLeave(ieee->dev); + } + + /* notify AP to be in PS mode */ + ieee80211_sta_ps_send_null_frame(ieee, 1); + ieee80211_sta_ps_send_null_frame(ieee, 1); +#endif + netif_carrier_off(ieee->dev); if (ieee->data_hard_stop) @@ -360,6 +371,12 @@ void ieee80211_wx_sync_scan_wq(struct ieee80211_device *ieee) ieee->InitialGainHandler(ieee->dev,IG_Restore); ieee->state = IEEE80211_LINKED; ieee->link_change(ieee->dev); + +#ifdef ENABLE_LPS + /* Notify AP that I wake up again */ + ieee80211_sta_ps_send_null_frame(ieee, 0); +#endif + // To prevent the immediately calling watch_dog after scan. if(ieee->LinkDetectInfo.NumRecvBcnInPeriod==0||ieee->LinkDetectInfo.NumRecvDataInPeriod==0 ) { @@ -429,8 +446,9 @@ int ieee80211_wx_set_essid(struct ieee80211_device *ieee, goto out; } - if(proto_started) - ieee80211_stop_protocol(ieee); + if(proto_started){ + ieee80211_stop_protocol(ieee,true); + } /* this is just to be sure that the GET wx callback diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_tx.c index 0710d9e30dba..a75f3668a40a 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_tx.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_tx.c @@ -334,6 +334,13 @@ void ieee80211_tx_query_agg_cap(struct ieee80211_device* ieee, struct sk_buff* s if(!Adapter->HalFunc.GetNmodeSupportBySecCfgHandler(Adapter)) return; #endif + + if(tcb_desc->bdhcp)// || ieee->CntAfterLink<2) + { + return; + } + + #if 1 if(!ieee->GetNmodeSupportBySecCfg(ieee->dev)) { @@ -628,6 +635,7 @@ int ieee80211_rtl_xmit(struct sk_buff *skb, struct net_device *dev) int qos_actived = ieee->current_network.qos_data.active; struct ieee80211_crypt_data* crypt; + bool bdhcp =false; cb_desc *tcb_desc; @@ -672,6 +680,55 @@ int ieee80211_rtl_xmit(struct sk_buff *skb, struct net_device *dev) } #endif + // The following is for DHCP and ARP packet, we use cck1M to tx these packets and let LPS awake some time + // to prevent DHCP protocol fail + if (skb->len > 282){//MINIMUM_DHCP_PACKET_SIZE) { + if (ETH_P_IP == ether_type) {// IP header + const struct iphdr *ip = (struct iphdr *)((u8 *)skb->data+14); + if (IPPROTO_UDP == ip->protocol) {//FIXME windows is 11 but here UDP in linux kernel is 17. + struct udphdr *udp = (struct udphdr *)((u8 *)ip + (ip->ihl << 2)); + //if(((ntohs(udp->source) == 68) && (ntohs(udp->dest) == 67)) || + /// ((ntohs(udp->source) == 67) && (ntohs(udp->dest) == 68))) { + if(((((u8 *)udp)[1] == 68) && (((u8 *)udp)[3] == 67)) || + ((((u8 *)udp)[1] == 67) && (((u8 *)udp)[3] == 68))) { + // 68 : UDP BOOTP client + // 67 : UDP BOOTP server + printk("DHCP pkt src port:%d, dest port:%d!!\n", ((u8 *)udp)[1],((u8 *)udp)[3]); + // Use low rate to send DHCP packet. + //if(pMgntInfo->IOTAction & HT_IOT_ACT_WA_IOT_Broadcom) + //{ + // tcb_desc->DataRate = MgntQuery_TxRateExcludeCCKRates(ieee);//0xc;//ofdm 6m + // tcb_desc->bTxDisableRateFallBack = false; + //} + //else + //pTcb->DataRate = Adapter->MgntInfo.LowestBasicRate; + //RTPRINT(FDM, WA_IOT, ("DHCP TranslateHeader(), pTcb->DataRate = 0x%x\n", pTcb->DataRate)); + + bdhcp = true; +#ifdef _RTL8192_EXT_PATCH_ + ieee->LPSDelayCnt = 100;//pPSC->LPSAwakeIntvl*2; //AMY,090701 +#else + ieee->LPSDelayCnt = 100;//pPSC->LPSAwakeIntvl*2; +#endif + } + } + }else if(ETH_P_ARP == ether_type){// IP ARP packet + printk("=================>DHCP Protocol start tx ARP pkt!!\n"); + bdhcp = true; + ieee->LPSDelayCnt = ieee->current_network.tim.tim_count; + + //if(pMgntInfo->IOTAction & HT_IOT_ACT_WA_IOT_Broadcom) + //{ + // tcb_desc->DataRate = MgntQuery_TxRateExcludeCCKRates(Adapter->MgntInfo.mBrates);//0xc;//ofdm 6m + // tcb_desc->bTxDisableRateFallBack = FALSE; + //} + //else + // tcb_desc->DataRate = Adapter->MgntInfo.LowestBasicRate; + //RTPRINT(FDM, WA_IOT, ("ARP TranslateHeader(), pTcb->DataRate = 0x%x\n", pTcb->DataRate)); + + } + } + /* Save source and destination addresses */ memcpy(&dest, skb->data, ETH_ALEN); memcpy(&src, skb->data+ETH_ALEN, ETH_ALEN); @@ -895,6 +952,25 @@ int ieee80211_rtl_xmit(struct sk_buff *skb, struct net_device *dev) else //tcb_desc->data_rate = CURRENT_RATE(ieee->current_network.mode, ieee->rate, ieee->HTCurrentOperaRate); tcb_desc->data_rate = CURRENT_RATE(ieee->mode, ieee->rate, ieee->HTCurrentOperaRate); + + if(bdhcp == true){ + // Use low rate to send DHCP packet. + //if(ieee->pHTInfo->IOTAction & HT_IOT_ACT_WA_IOT_Broadcom) { + // tcb_desc->data_rate = MGN_1M;//MgntQuery_TxRateExcludeCCKRates(ieee);//0xc;//ofdm 6m + // tcb_desc->bTxDisableRateFallBack = false; + //} + //else + { + tcb_desc->data_rate = MGN_1M; + tcb_desc->bTxDisableRateFallBack = 1; + } + + tcb_desc->RATRIndex = 7; + tcb_desc->bTxUseDriverAssingedRate = 1; + tcb_desc->bdhcp = 1; + } + + ieee80211_qurey_ShortPreambleMode(ieee, tcb_desc); ieee80211_tx_query_agg_cap(ieee, txb->fragments[0], tcb_desc); ieee80211_query_HTCapShortGI(ieee, tcb_desc); diff --git a/drivers/staging/rtl8192e/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192e/ieee80211/rtl819x_HT.h index 992b71825a8b..f968817d073c 100644 --- a/drivers/staging/rtl8192e/ieee80211/rtl819x_HT.h +++ b/drivers/staging/rtl8192e/ieee80211/rtl819x_HT.h @@ -458,7 +458,8 @@ typedef enum _HT_IOT_PEER HT_IOT_PEER_RALINK = 3, HT_IOT_PEER_ATHEROS = 4, HT_IOT_PEER_CISCO= 5, - HT_IOT_PEER_MAX = 6 + HT_IOT_PEER_MARVELL=6, + HT_IOT_PEER_MAX = 7 }HT_IOT_PEER_E, *PHTIOT_PEER_E; // @@ -475,6 +476,7 @@ typedef enum _HT_IOT_ACTION{ HT_IOT_ACT_CDD_FSYNC = 0x00000080, HT_IOT_ACT_PURE_N_MODE = 0x00000100, HT_IOT_ACT_FORCED_CTS2SELF = 0x00000200, + HT_IOT_ACT_NULL_DATA_POWER_SAVING = 0x00800000, }HT_IOT_ACTION_E, *PHT_IOT_ACTION_E; #endif //_RTL819XU_HTTYPE_H_ diff --git a/drivers/staging/rtl8192e/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192e/ieee80211/rtl819x_HTProc.c index 1e392141779a..c93247362fe8 100644 --- a/drivers/staging/rtl8192e/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192e/ieee80211/rtl819x_HTProc.c @@ -32,7 +32,7 @@ u16 MCS_DATA_RATE[2][2][77] = static u8 UNKNOWN_BORADCOM[3] = {0x00, 0x14, 0xbf}; static u8 LINKSYSWRT330_LINKSYSWRT300_BROADCOM[3] = {0x00, 0x1a, 0x70}; static u8 LINKSYSWRT350_LINKSYSWRT150_BROADCOM[3] = {0x00, 0x1d, 0x7e}; -static u8 NETGEAR834Bv2_BROADCOM[3] = {0x00, 0x1b, 0x2f}; +//static u8 NETGEAR834Bv2_BROADCOM[3] = {0x00, 0x1b, 0x2f}; static u8 BELKINF5D8233V1_RALINK[3] = {0x00, 0x17, 0x3f}; //cosa 03202008 static u8 BELKINF5D82334V3_RALINK[3] = {0x00, 0x1c, 0xdf}; static u8 PCI_RALINK[3] = {0x00, 0x90, 0xcc}; @@ -40,6 +40,7 @@ static u8 EDIMAX_RALINK[3] = {0x00, 0x0e, 0x2e}; static u8 AIRLINK_RALINK[3] = {0x00, 0x18, 0x02}; static u8 DLINK_ATHEROS[3] = {0x00, 0x1c, 0xf0}; static u8 CISCO_BROADCOM[3] = {0x00, 0x17, 0x94}; +static u8 LINKSYS_MARVELL_4400N[3] = {0x00, 0x14, 0xa4}; // 2008/04/01 MH For Cisco G mode RX TP We need to change FW duration. Shoud we put the // code in other place?? @@ -349,12 +350,12 @@ bool IsHTHalfNmodeAPs(struct ieee80211_device* ieee) bool retValue = false; struct ieee80211_network* net = &ieee->current_network; #if 0 - if(pMgntInfo->bHalfNMode == false) + if(ieee->bHalfNMode == false) retValue = false; else #endif if((memcmp(net->bssid, BELKINF5D8233V1_RALINK, 3)==0) || - (memcmp(net->bssid, BELKINF5D82334V3_RALINK, 3)==0) || + (memcmp(net->bssid, BELKINF5D82334V3_RALINK, 3)==0) || (memcmp(net->bssid, PCI_RALINK, 3)==0) || (memcmp(net->bssid, EDIMAX_RALINK, 3)==0) || (memcmp(net->bssid, AIRLINK_RALINK, 3)==0) || @@ -363,7 +364,7 @@ bool IsHTHalfNmodeAPs(struct ieee80211_device* ieee) else if((memcmp(net->bssid, UNKNOWN_BORADCOM, 3)==0) || (memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3)==0)|| (memcmp(net->bssid, LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3)==0)|| - (memcmp(net->bssid, NETGEAR834Bv2_BROADCOM, 3)==0) || + //(memcmp(net->bssid, NETGEAR834Bv2_BROADCOM, 3)==0) || (net->broadcom_cap_exist)) retValue = true; else if(net->bssht.bdRT2RTAggregation) @@ -387,13 +388,15 @@ void HTIOTPeerDetermine(struct ieee80211_device* ieee) struct ieee80211_network* net = &ieee->current_network; if(net->bssht.bdRT2RTAggregation) pHTInfo->IOTPeer = HT_IOT_PEER_REALTEK; - else if(net->broadcom_cap_exist) + else if(net->broadcom_cap_exist){ pHTInfo->IOTPeer = HT_IOT_PEER_BROADCOM; + } else if((memcmp(net->bssid, UNKNOWN_BORADCOM, 3)==0) || (memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3)==0)|| - (memcmp(net->bssid, LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3)==0)|| - (memcmp(net->bssid, NETGEAR834Bv2_BROADCOM, 3)==0) ) + (memcmp(net->bssid, LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3)==0)){//|| + //(memcmp(net->bssid, NETGEAR834Bv2_BROADCOM, 3)==0) ){ pHTInfo->IOTPeer = HT_IOT_PEER_BROADCOM; + } else if((memcmp(net->bssid, BELKINF5D8233V1_RALINK, 3)==0) || (memcmp(net->bssid, BELKINF5D82334V3_RALINK, 3)==0) || (memcmp(net->bssid, PCI_RALINK, 3)==0) || @@ -405,6 +408,10 @@ void HTIOTPeerDetermine(struct ieee80211_device* ieee) pHTInfo->IOTPeer = HT_IOT_PEER_ATHEROS; else if(memcmp(net->bssid, CISCO_BROADCOM, 3)==0) pHTInfo->IOTPeer = HT_IOT_PEER_CISCO; + else if ((memcmp(net->bssid, LINKSYS_MARVELL_4400N, 3) == 0) || + net->marvell_cap_exist){ + pHTInfo->IOTPeer = HT_IOT_PEER_MARVELL; + } else pHTInfo->IOTPeer = HT_IOT_PEER_UNKNOWN; @@ -442,6 +449,18 @@ u8 HTIOTActIsDisableMCS14(struct ieee80211_device* ieee, u8* PeerMacAddr) return ret; } +u8 HTIOTActIsForcedCTS2Self(struct ieee80211_device *ieee, struct ieee80211_network *network) +{ + u8 retValue = 0; + //if(network->marvell_cap_exist) + if(ieee->pHTInfo->IOTPeer == HT_IOT_PEER_MARVELL) + { + retValue = 1; + } + + return retValue; +} + /** * Function: HTIOTActIsDisableMCS15 @@ -578,6 +597,23 @@ u8 HTIOTActIsCCDFsync(u8* PeerMacAddr) return retValue; } +// +// Send null data for to tell AP that we are awake. +// +bool +HTIOTActIsNullDataPowerSaving(struct ieee80211_device* ieee,struct ieee80211_network *network) +{ + bool retValue = false; + + PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo; + { + if(pHTInfo->IOTPeer == HT_IOT_PEER_BROADCOM) // ||(pBssDesc->Vender == HT_IOT_PEER_ATHEROS && pBssDesc->SubTypeOfVender == HT_IOT_PEER_ATHEROS_DIR635)) + return true; + + } + return retValue; +} + void HTResetIOTSetting( PRT_HIGH_THROUGHPUT pHTInfo ) @@ -1071,6 +1107,13 @@ void HTOnAssocRsp(struct ieee80211_device *ieee) // Config and configure A-MSDU setting // pHTInfo->bCurrent_AMSDU_Support = pHTInfo->bAMSDU_Support; + if (ieee->rtllib_ap_sec_type && + (ieee->rtllib_ap_sec_type(ieee)&(SEC_ALG_WEP|SEC_ALG_TKIP))){ + if( (pHTInfo->IOTPeer== HT_IOT_PEER_ATHEROS) || + (pHTInfo->IOTPeer == HT_IOT_PEER_UNKNOWN) ) + pHTInfo->bCurrentAMPDUEnable = false; + } + nMaxAMSDUSize = (pPeerHTCap->MaxAMSDUSize==0)?3839:7935; @@ -1515,6 +1558,9 @@ void HTResetSelfAndSavePeerSetting(struct ieee80211_device* ieee, struct ieee80 bIOTAction = HTIOTActIsDisableMCS14(ieee, pNetwork->bssid); if(bIOTAction) pHTInfo->IOTAction |= HT_IOT_ACT_DISABLE_MCS14; + bIOTAction = HTIOTActIsForcedCTS2Self(ieee, pNetwork); + if(bIOTAction) + pHTInfo->IOTAction |= HT_IOT_ACT_FORCED_CTS2SELF; bIOTAction = HTIOTActIsDisableMCS15(ieee); if(bIOTAction) @@ -1537,6 +1583,9 @@ void HTResetSelfAndSavePeerSetting(struct ieee80211_device* ieee, struct ieee80 if(bIOTAction) pHTInfo->IOTAction |= HT_IOT_ACT_CDD_FSYNC; + bIOTAction = HTIOTActIsNullDataPowerSaving(ieee, pNetwork); + if(bIOTAction) + pHTInfo->IOTAction |= HT_IOT_ACT_NULL_DATA_POWER_SAVING; } else diff --git a/drivers/staging/rtl8192e/r8190_rtl8256.c b/drivers/staging/rtl8192e/r8190_rtl8256.c index 3d67fbb65b96..1bd054d42f24 100644 --- a/drivers/staging/rtl8192e/r8190_rtl8256.c +++ b/drivers/staging/rtl8192e/r8190_rtl8256.c @@ -429,11 +429,12 @@ SetRFPowerState8190( bool bResult = true; //u8 eRFPath; u8 i = 0, QueueID = 0; - ptx_ring head=NULL,tail=NULL; + //ptx_ring head=NULL,tail=NULL; + struct rtl8192_tx_ring *ring = NULL; if(priv->SetRFPowerStateInProgress == true) return false; - RT_TRACE(COMP_POWER, "===========> SetRFPowerState8190()!\n"); + //RT_TRACE(COMP_PS, "===========> SetRFPowerState8190()!\n"); priv->SetRFPowerStateInProgress = true; switch(priv->rf_chip) @@ -442,11 +443,11 @@ SetRFPowerState8190( switch( eRFPowerState ) { case eRfOn: - RT_TRACE(COMP_POWER, "SetRFPowerState8190() eRfOn !\n"); + //RT_TRACE(COMP_PS, "SetRFPowerState8190() eRfOn !\n"); //RXTX enable control: On //for(eRFPath = 0; eRFPath NumTotalRFPath; eRFPath++) - // PHY_SetRFReg(Adapter, (RF90_RADIO_PATH_E)eRFPath, 0x4, 0xC00, 0x2); - #ifdef RTL8190P + // PHY_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x4, 0xC00, 0x2); +#ifdef RTL8190P if(priv->rf_type == RF_2T4R) { //enable RF-Chip A/B @@ -479,36 +480,92 @@ SetRFPowerState8190( //analog to digital part2 on rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x1800, 0x3); // 0x880[12:11] } - #else - write_nic_byte(dev, ANAPAR, 0x37);//160MHz - write_nic_byte(dev, MacBlkCtrl, 0x17); // 0x403 - mdelay(1); - //enable clock 80/88 MHz + else if(priv->rf_type == RF_1T1R) //RF-C + { + //enable RF-Chip C/D + rtl8192_setBBreg(dev, rFPGA0_XC_RFInterfaceOE, BIT4, 0x1); // 0x868[4] + //analog to digital on + rtl8192_setBBreg(dev, rFPGA0_AnalogParameter4, 0x400, 0x1);// 0x88c[10] + //digital to analog on + rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x80, 0x1); // 0x880[7] + //rx antenna on + rtl8192_setBBreg(dev, rOFDM0_TRxPathEnable, 0x4, 0x1);// 0xc04[2] + //rx antenna on + rtl8192_setBBreg(dev, rOFDM1_TRxPathEnable, 0x4, 0x1);// 0xd04[2] + //analog to digital part2 on + rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x800, 0x1); // 0x880[11] + } - priv->bHwRfOffAction = 0; - //} +#elif defined RTL8192E + // turn on RF + if((priv->ieee80211->eRFPowerState == eRfOff) && RT_IN_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC)) + { // The current RF state is OFF and the RF OFF level is halting the NIC, re-initialize the NIC. + bool rtstatus = true; + u32 InitilizeCount = 3; + do + { + InitilizeCount--; + priv->RegRfOff = false; + rtstatus = NicIFEnableNIC(dev); + }while( (rtstatus != true) &&(InitilizeCount >0) ); - // Baseband reset 2008.09.30 add - write_nic_byte(dev, BB_RESET, (read_nic_byte(dev, BB_RESET)|BIT0)); + if(rtstatus != true) + { + RT_TRACE(COMP_ERR,"%s():Initialize Adapter fail,return\n",__FUNCTION__); + priv->SetRFPowerStateInProgress = false; + return false; + } - //2 AFE - // 2008.09.30 add - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter2, 0x20000000, 0x1); // 0x884 - //analog to digital part2 on - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x60, 0x3); // 0x880[6:5] - //digital to analog on - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x98, 0x13); // 0x880[4:3] - //analog to digital on - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter4, 0xf03, 0xf03);// 0x88c[9:8] - //rx antenna on - //PHY_SetBBReg(Adapter, rOFDM0_TRxPathEnable, 0x3, 0x3);// 0xc04[1:0] - //rx antenna on 2008.09.30 mark - //PHY_SetBBReg(Adapter, rOFDM1_TRxPathEnable, 0x3, 0x3);// 0xd04[1:0] + RT_CLEAR_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC); + } else { + write_nic_byte(dev, ANAPAR, 0x37);//160MHz + //write_nic_byte(dev, MacBlkCtrl, 0x17); // 0x403 + mdelay(1); + //enable clock 80/88 MHz + rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x4, 0x1); // 0x880[2] + priv->bHwRfOffAction = 0; + //} - //2 RF - //enable RF-Chip A/B + //RF-A, RF-B + //enable RF-Chip A/B rtl8192_setBBreg(dev, rFPGA0_XA_RFInterfaceOE, BIT4, 0x1); // 0x860[4] - rtl8192_setBBreg(dev, rFPGA0_XB_RFInterfaceOE, BIT4, 0x1); // 0x864[4] + //analog to digital on + rtl8192_setBBreg(dev, rFPGA0_AnalogParameter4, 0x300, 0x3);// 0x88c[9:8] + //digital to analog on + rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x18, 0x3); // 0x880[4:3] + //rx antenna on + rtl8192_setBBreg(dev, rOFDM0_TRxPathEnable, 0x3, 0x3);// 0xc04[1:0] + //rx antenna on + rtl8192_setBBreg(dev, rOFDM1_TRxPathEnable, 0x3, 0x3);// 0xd04[1:0] + //analog to digital part2 on + rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x60, 0x3); // 0x880[6:5] + + // Baseband reset 2008.09.30 add + //write_nic_byte(dev, BB_RESET, (read_nic_byte(dev, BB_RESET)|BIT0)); + + //2 AFE + // 2008.09.30 add + //rtl8192_setBBreg(dev, rFPGA0_AnalogParameter2, 0x20000000, 0x1); // 0x884 + //analog to digital part2 on + //rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x60, 0x3); // 0x880[6:5] + + + //digital to analog on + //rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x98, 0x13); // 0x880[4:3] + //analog to digital on + //rtl8192_setBBreg(dev, rFPGA0_AnalogParameter4, 0xf03, 0xf03);// 0x88c[9:8] + //rx antenna on + //PHY_SetBBReg(dev, rOFDM0_TRxPathEnable, 0x3, 0x3);// 0xc04[1:0] + //rx antenna on 2008.09.30 mark + //PHY_SetBBReg(dev, rOFDM1_TRxPathEnable, 0x3, 0x3);// 0xd04[1:0] + + //2 RF + //enable RF-Chip A/B + //rtl8192_setBBreg(dev, rFPGA0_XA_RFInterfaceOE, BIT4, 0x1); // 0x860[4] + //rtl8192_setBBreg(dev, rFPGA0_XB_RFInterfaceOE, BIT4, 0x1); // 0x864[4] + + } + #endif break; @@ -517,119 +574,137 @@ SetRFPowerState8190( // By Bruce, 2008-01-16. // case eRfSleep: - case eRfOff: - RT_TRACE(COMP_POWER, "SetRFPowerState8190() eRfOff/Sleep !\n"); - if (pPSC->bLeisurePs) + { + // HW setting had been configured with deeper mode. + if(priv->ieee80211->eRFPowerState == eRfOff) + break; + + // Update current RF state variable. + //priv->ieee80211->eRFPowerState = eRFPowerState; + + //if (pPSC->bLeisurePs) { for(QueueID = 0, i = 0; QueueID < MAX_TX_QUEUE; ) { - switch(QueueID) { - case MGNT_QUEUE: - tail=priv->txmapringtail; - head=priv->txmapringhead; - break; + ring = &priv->tx_ring[QueueID]; - case BK_QUEUE: - tail=priv->txbkpringtail; - head=priv->txbkpringhead; - break; + if(skb_queue_len(&ring->queue) == 0) + { + QueueID++; + continue; + } + else + { + RT_TRACE((COMP_POWER|COMP_RF), "eRf Off/Sleep: %d times TcbBusyQueue[%d] !=0 before doze!\n", (i+1), QueueID); + udelay(10); + i++; + } - case BE_QUEUE: - tail=priv->txbepringtail; - head=priv->txbepringhead; - break; - - case VI_QUEUE: - tail=priv->txvipringtail; - head=priv->txvipringhead; - break; - - case VO_QUEUE: - tail=priv->txvopringtail; - head=priv->txvopringhead; - break; - - default: - tail=head=NULL; + if(i >= MAX_DOZE_WAITING_TIMES_9x) + { + RT_TRACE(COMP_POWER, "\n\n\n TimeOut!! SetRFPowerState8190(): eRfOff: %d times TcbBusyQueue[%d] != 0 !!!\n\n\n", MAX_DOZE_WAITING_TIMES_9x, QueueID); break; + } } - if(tail == head) + } + + //if(Adapter->HardwareType == HARDWARE_TYPE_RTL8190P) +#ifdef RTL8190P + { + PHY_SetRtl8190pRfOff(dev); + } + //else if(Adapter->HardwareType == HARDWARE_TYPE_RTL8192E) +#elif defined RTL8192E + { + PHY_SetRtl8192eRfOff(dev); + } +#endif + } + break; + + case eRfOff: + //RT_TRACE(COMP_PS, "SetRFPowerState8190() eRfOff/Sleep !\n"); + + // Update current RF state variable. + //priv->ieee80211->eRFPowerState = eRFPowerState; + + // + // Disconnect with Any AP or STA. + // + for(QueueID = 0, i = 0; QueueID < MAX_TX_QUEUE; ) + { + ring = &priv->tx_ring[QueueID]; + + if(skb_queue_len(&ring->queue) == 0) { - //DbgPrint("QueueID = %d", QueueID); QueueID++; continue; } else { - RT_TRACE(COMP_POWER, "eRf Off/Sleep: %d times BusyQueue[%d] !=0 before doze!\n", (i+1), QueueID); + RT_TRACE(COMP_POWER, + "eRf Off/Sleep: %d times TcbBusyQueue[%d] !=0 before doze!\n", (i+1), QueueID); udelay(10); i++; } if(i >= MAX_DOZE_WAITING_TIMES_9x) { - RT_TRACE(COMP_POWER, "\n\n\n TimeOut!! SetRFPowerState8190(): eRfOff: %d times BusyQueue[%d] != 0 !!!\n\n\n", MAX_DOZE_WAITING_TIMES_9x, QueueID); + RT_TRACE(COMP_POWER, "\n\n\n SetZebraRFPowerState8185B(): eRfOff: %d times TcbBusyQueue[%d] != 0 !!!\n\n\n", MAX_DOZE_WAITING_TIMES_9x, QueueID); break; } } - } - #ifdef RTL8190P - if(priv->rf_type == RF_2T4R) + + //if(Adapter->HardwareType == HARDWARE_TYPE_RTL8190P) +#if defined RTL8190P { - //disable RF-Chip A/B - rtl8192_setBBreg(dev, rFPGA0_XA_RFInterfaceOE, BIT4, 0x0); // 0x860[4] + PHY_SetRtl8190pRfOff(dev); } - //disable RF-Chip C/D - rtl8192_setBBreg(dev, rFPGA0_XC_RFInterfaceOE, BIT4, 0x0); // 0x868[4] - //analog to digital off, for power save - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter4, 0xf00, 0x0);// 0x88c[11:8] - //digital to analog off, for power save - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x1e0, 0x0); // 0x880[8:5] - //rx antenna off - rtl8192_setBBreg(dev, rOFDM0_TRxPathEnable, 0xf, 0x0);// 0xc04[3:0] - //rx antenna off - rtl8192_setBBreg(dev, rOFDM1_TRxPathEnable, 0xf, 0x0);// 0xd04[3:0] - //analog to digital part2 off, for power save - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x1e00, 0x0); // 0x880[12:9] -#else //8192E - //2 RF - //disable RF-Chip A/B - rtl8192_setBBreg(dev, rFPGA0_XA_RFInterfaceOE, BIT4, 0x0); // 0x860[4] - rtl8192_setBBreg(dev, rFPGA0_XB_RFInterfaceOE, BIT4, 0x0); // 0x864[4] - //2 AFE - //analog to digital off, for power save - //PHY_SetBBReg(Adapter, rFPGA0_AnalogParameter4, 0xf00, 0x0);// 0x88c[11:8] - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter4, 0xf03, 0x0); // 2008.09.30 Modify - //digital to analog off, for power save - //PHY_SetBBReg(Adapter, rFPGA0_AnalogParameter1, 0x18, 0x0); // 0x880[4:3] - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x98, 0x0); // 0x880 2008.09.30 Modify - //rx antenna off 2008.09.30 mark - //PHY_SetBBReg(Adapter, rOFDM0_TRxPathEnable, 0xf, 0x0);// 0xc04[3:0] - //rx antenna off 2008.09.30 mark - //PHY_SetBBReg(Adapter, rOFDM1_TRxPathEnable, 0xf, 0x0);// 0xd04[3:0] - //analog to digital part2 off, for power save - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x60, 0x0); // 0x880[6:5] - // 2008.09.30 add - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter2, 0x20000000, 0x0); // 0x884 + //else if(Adapter->HardwareType == HARDWARE_TYPE_RTL8192E) +#elif defined RTL8192E + { + //if(pPSC->RegRfPsLevel & RT_RF_OFF_LEVL_HALT_NIC && !RT_IN_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC) && priv->ieee80211->RfOffReason > RF_CHANGE_BY_PS) + if (pPSC->RegRfPsLevel & RT_RF_OFF_LEVL_HALT_NIC && !RT_IN_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC)) + { // Disable all components. + // + // Note: + // NicIFSetLinkStatus is a big problem when we indicate the status to OS, + // the OS(XP) will reset. But now, we cnnot find why the NIC is hard to receive + // packets after RF ON. Just keep this function here and still work to find out the root couse. + // By Bruce, 2009-05-01. + // + //NicIFSetLinkStatus( Adapter, RT_MEDIA_DISCONNECT ); + //if HW radio of , need to indicate scan complete first for not be reset. + //if(MgntScanInProgress(pMgntInfo)) + // MgntResetScanProcess( Adapter ); - - //disable clock 80/88 MHz 2008.09.30 mark - //PHY_SetBBReg(Adapter, rFPGA0_AnalogParameter1, 0x4, 0x0); // 0x880[2] - //2 BB - // Baseband reset 2008.09.30 add - write_nic_byte(dev, BB_RESET, (read_nic_byte(dev, BB_RESET)|BIT0)); // 0x101 - //MAC: off - write_nic_byte(dev, MacBlkCtrl, 0x0); // 0x403 - //slow down cpu/lbus clock from 160MHz to Lower - write_nic_byte(dev, ANAPAR, 0x07); // 0x 17 40MHz - priv->bHwRfOffAction = 0; - //} + // <1> Disable Interrupt + //rtl8192_irq_disable(dev); + // <2> Stop all timer + //MgntCancelAllTimer(Adapter); + // <3> Disable Adapter + //NicIFHaltAdapter(Adapter, false); + NicIFDisableNIC(dev); + RT_SET_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC); + } + else if (!(pPSC->RegRfPsLevel & RT_RF_OFF_LEVL_HALT_NIC)) + { // Normal case. + // IPS should go to this. + PHY_SetRtl8192eRfOff(dev); + } + } +#else + else + { + RT_TRACE(COMP_DBG,DBG_TRACE,("It is not 8190Pci and 8192PciE \n")); + } #endif + break; default: bResult = false; - RT_TRACE(COMP_ERR, "SetRFPowerState8190(): unknown state to set: 0x%X!!!\n", eRFPowerState); + RT_TRACE(COMP_ERR, "SetRFPowerState8190(): unknow state to set: 0x%X!!!\n", eRFPowerState); break; } @@ -644,64 +719,11 @@ SetRFPowerState8190( { // Update current RF state variable. priv->ieee80211->eRFPowerState = eRFPowerState; - - switch(priv->rf_chip ) - { - case RF_8256: - switch(priv->ieee80211->eRFPowerState) - { - case eRfOff: - // - //If Rf off reason is from IPS, Led should blink with no link, by Maddest 071015 - // - if(priv->ieee80211->RfOffReason==RF_CHANGE_BY_IPS ) - { - #ifdef TO_DO - Adapter->HalFunc.LedControlHandler(Adapter,LED_CTL_NO_LINK); - #endif - } - else - { - // Turn off LED if RF is not ON. - #ifdef TO_DO - Adapter->HalFunc.LedControlHandler(Adapter, LED_CTL_POWER_OFF); - #endif - } - break; - - case eRfOn: - // Turn on RF we are still linked, which might happen when - // we quickly turn off and on HW RF. 2006.05.12, by rcnjko. - if( priv->ieee80211->state == IEEE80211_LINKED) - { - #ifdef TO_DO - Adapter->HalFunc.LedControlHandler(Adapter, LED_CTL_LINK); - #endif - } - else - { - // Turn off LED if RF is not ON. - #ifdef TO_DO - Adapter->HalFunc.LedControlHandler(Adapter, LED_CTL_NO_LINK); - #endif - } - break; - - default: - // do nothing. - break; - }// Switch RF state - - break; - - default: - RT_TRACE(COMP_ERR, "SetRFPowerState8190(): Unknown RF type\n"); - break; - }// Switch RFChipID } + //printk("%s()priv->ieee80211->eRFPowerState:%s\n" ,__func__,priv->ieee80211->eRFPowerState == eRfOn ? "On" : "Off"); priv->SetRFPowerStateInProgress = false; - RT_TRACE(COMP_POWER, "<=========== SetRFPowerState8190() bResult = %d!\n", bResult); + //RT_TRACE(COMP_PS, "<=========== SetRFPowerState8190() bResult = %d!\n", bResult); return bResult; } diff --git a/drivers/staging/rtl8192e/r8192E.h b/drivers/staging/rtl8192e/r8192E.h index 61b6f250b917..f4be9cc11005 100644 --- a/drivers/staging/rtl8192e/r8192E.h +++ b/drivers/staging/rtl8192e/r8192E.h @@ -39,7 +39,7 @@ #include #include #include -#include "ieee80211.h" +#include "ieee80211/ieee80211.h" @@ -1003,6 +1003,11 @@ typedef struct r8192_priv int irq; short irq_enabled; struct ieee80211_device *ieee80211; +#ifdef ENABLE_LPS + bool ps_force; + bool force_lps; + bool bdisable_nic; +#endif bool being_init_adapter; u8 Rf_Mode; short card_8192; /* O: rtl8192, 1:rtl8185 V B/C, 2:rtl8185 V D */ @@ -1477,7 +1482,7 @@ void write_nic_word(struct net_device *dev, int x,u16 y); void write_nic_dword(struct net_device *dev, int x,u32 y); void force_pci_posting(struct net_device *dev); -void rtl8192_rtx_disable(struct net_device *); +void rtl8192_halt_adapter(struct net_device *dev, bool reset); void rtl8192_rx_enable(struct net_device *); void rtl8192_tx_enable(struct net_device *); @@ -1512,5 +1517,19 @@ short rtl8192_is_tx_queue_empty(struct net_device *dev); #ifdef ENABLE_IPS void IPSEnter(struct net_device *dev); void IPSLeave(struct net_device *dev); +void InactivePsWorkItemCallback(struct net_device *dev); +void IPSLeave_wq(void *data); +void ieee80211_ips_leave_wq(struct net_device *dev); +void ieee80211_ips_leave(struct net_device *dev); #endif +#ifdef ENABLE_LPS +void LeisurePSEnter(struct net_device *dev); +void LeisurePSLeave(struct net_device *dev); +#endif + +bool NicIFEnableNIC(struct net_device* dev); +bool NicIFDisableNIC(struct net_device* dev); + +void rtl8192_irq_disable(struct net_device *dev); +void PHY_SetRtl8192eRfOff(struct net_device* dev); #endif diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c index 0f6954863e69..662231968724 100644 --- a/drivers/staging/rtl8192e/r8192E_core.c +++ b/drivers/staging/rtl8192e/r8192E_core.c @@ -66,7 +66,7 @@ #endif #ifdef ENABLE_DOT11D -#include "dot11d.h" +#include "ieee80211/dot11d.h" #endif //set here to open your trace code. //WB @@ -75,7 +75,7 @@ u32 rt_global_debug_component = \ // COMP_EPROM | // COMP_PHY | // COMP_RF | - COMP_FIRMWARE | +// COMP_FIRMWARE | // COMP_TRACE | // COMP_DOWN | // COMP_SWBW | @@ -343,6 +343,141 @@ void write_nic_word(struct net_device *dev, int x,u16 y) #endif /* RTL_IO_MAP */ +u8 rtl8192e_ap_sec_type(struct ieee80211_device *ieee) +{ + //struct r8192_priv* priv = ieee80211_priv(dev); + //struct ieee80211_device *ieee = priv->ieee80211; + + static u8 ccmp_ie[4] = {0x00,0x50,0xf2,0x04}; + static u8 ccmp_rsn_ie[4] = {0x00, 0x0f, 0xac, 0x04}; + int wpa_ie_len= ieee->wpa_ie_len; + struct ieee80211_crypt_data* crypt; + int encrypt; + + crypt = ieee->crypt[ieee->tx_keyidx]; + + encrypt = (ieee->current_network.capability & WLAN_CAPABILITY_PRIVACY) ||\ + (ieee->host_encrypt && crypt && crypt->ops && \ + (0 == strcmp(crypt->ops->name,"WEP"))); + + /* simply judge */ + if(encrypt && (wpa_ie_len == 0)) { + // wep encryption, no N mode setting */ + return SEC_ALG_WEP; + } else if((wpa_ie_len != 0)) { + // parse pairwise key type */ + if (((ieee->wpa_ie[0] == 0xdd) && (!memcmp(&(ieee->wpa_ie[14]),ccmp_ie,4))) || + ((ieee->wpa_ie[0] == 0x30) && (!memcmp(&ieee->wpa_ie[10],ccmp_rsn_ie, 4)))) + return SEC_ALG_CCMP; + else + return SEC_ALG_TKIP; + } else { + return SEC_ALG_NONE; + } +} + +void +rtl8192e_SetHwReg(struct net_device *dev,u8 variable,u8* val) +{ + struct r8192_priv* priv = ieee80211_priv(dev); + + switch(variable) + { + + case HW_VAR_BSSID: + write_nic_dword(dev, BSSIDR, ((u32*)(val))[0]); + write_nic_word(dev, BSSIDR+2, ((u16*)(val+2))[0]); + break; + + case HW_VAR_MEDIA_STATUS: + { + RT_OP_MODE OpMode = *((RT_OP_MODE *)(val)); + //LED_CTL_MODE LedAction = LED_CTL_NO_LINK; + u8 btMsr = read_nic_byte(dev, MSR); + + btMsr &= 0xfc; + + switch(OpMode) + { + case RT_OP_MODE_INFRASTRUCTURE: + btMsr |= MSR_INFRA; + //LedAction = LED_CTL_LINK; + break; + + case RT_OP_MODE_IBSS: + btMsr |= MSR_ADHOC; + // led link set seperate + break; + + case RT_OP_MODE_AP: + btMsr |= MSR_AP; + //LedAction = LED_CTL_LINK; + break; + + default: + btMsr |= MSR_NOLINK; + break; + } + + write_nic_byte(dev, MSR, btMsr); + + //priv->ieee80211->LedControlHandler(dev, LedAction); + } + break; + + case HW_VAR_CECHK_BSSID: + { + u32 RegRCR, Type; + + Type = ((u8*)(val))[0]; + //priv->ieee80211->GetHwRegHandler(dev, HW_VAR_RCR, (u8*)(&RegRCR)); + RegRCR = read_nic_dword(dev,RCR); + priv->ReceiveConfig = RegRCR; + + if (Type == true) + RegRCR |= (RCR_CBSSID); + else if (Type == false) + RegRCR &= (~RCR_CBSSID); + + //priv->ieee80211->SetHwRegHandler( dev, HW_VAR_RCR, (u8*)(&RegRCR) ); + write_nic_dword(dev, RCR,RegRCR); + priv->ReceiveConfig = RegRCR; + + } + break; + + case HW_VAR_SLOT_TIME: + { + //PSTA_QOS pStaQos = Adapter->MgntInfo.pStaQos; + //AC_CODING eACI; + + priv->slot_time = val[0]; + write_nic_byte(dev, SLOT_TIME, val[0]); + + } + break; + + case HW_VAR_ACK_PREAMBLE: + { + u32 regTmp = 0; + priv->short_preamble = (bool)(*(u8*)val ); + regTmp = priv->basic_rate; + if (priv->short_preamble) + regTmp |= BRSR_AckShortPmb; + write_nic_dword(dev, RRSR, regTmp); + } + break; + + case HW_VAR_CPU_RST: + write_nic_dword(dev, CPU_GEN, ((u32*)(val))[0]); + break; + + default: + break; + } + +} + /////////////////////////////////////////////////////////// @@ -365,11 +500,6 @@ void rtl8192_restart(struct work_struct *work); //void rtl8192_rq_tx_ack(struct work_struct *work); void watch_dog_timer_callback(unsigned long data); -#ifdef ENABLE_IPS -void IPSEnter(struct net_device *dev); -void IPSLeave(struct net_device *dev); -void InactivePsWorkItemCallback(struct net_device *dev); -#endif /**************************************************************************** -----------------------------PROCFS STUFF------------------------- *****************************************************************************/ @@ -707,7 +837,7 @@ static void rtl8192_irq_enable(struct net_device *dev) } -static void rtl8192_irq_disable(struct net_device *dev) +void rtl8192_irq_disable(struct net_device *dev) { struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); @@ -717,6 +847,7 @@ static void rtl8192_irq_disable(struct net_device *dev) } +#if 0 static void rtl8192_set_mode(struct net_device *dev,int mode) { u8 ecmd; @@ -727,7 +858,7 @@ static void rtl8192_set_mode(struct net_device *dev,int mode) ecmd=ecmd &~ (1<desc = NULL; } - +#if 0 static void rtl8192_beacon_disable(struct net_device *dev) { struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); @@ -873,38 +1004,116 @@ static void rtl8192_beacon_disable(struct net_device *dev) reg &= ~(IMR_BcnInt | IMR_BcnInt | IMR_TBDOK | IMR_TBDER); write_nic_dword(priv->ieee80211->dev, INTA_MASK, reg); } +#endif -void rtl8192_rtx_disable(struct net_device *dev) +void PHY_SetRtl8192eRfOff(struct net_device* dev ) { - u8 cmd; + //struct r8192_priv *priv = ieee80211_priv(dev); + + //disable RF-Chip A/B + rtl8192_setBBreg(dev, rFPGA0_XA_RFInterfaceOE, BIT4, 0x0); + //analog to digital off, for power save + rtl8192_setBBreg(dev, rFPGA0_AnalogParameter4, 0x300, 0x0); + //digital to analog off, for power save + rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x18, 0x0); + //rx antenna off + rtl8192_setBBreg(dev, rOFDM0_TRxPathEnable, 0xf, 0x0); + //rx antenna off + rtl8192_setBBreg(dev, rOFDM1_TRxPathEnable, 0xf, 0x0); + //analog to digital part2 off, for power save + rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x60, 0x0); + rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x4, 0x0); + // Analog parameter!!Change bias and Lbus control. + write_nic_byte(dev, ANAPAR_FOR_8192PciE, 0x07); + +} + +void rtl8192_halt_adapter(struct net_device *dev, bool reset) +{ + //u8 cmd; struct r8192_priv *priv = ieee80211_priv(dev); - int i; + int i; + u8 OpMode; + u8 u1bTmp; + u32 ulRegRead; + OpMode = RT_OP_MODE_NO_LINK; + priv->ieee80211->SetHwRegHandler(dev, HW_VAR_MEDIA_STATUS, &OpMode); + +#if 1 + if(!priv->ieee80211->bSupportRemoteWakeUp) + { + u1bTmp = 0x0; // disable tx/rx. In 8185 we write 0x10 (Reset bit), but here we make reference to WMAC and wirte 0x0. 2006.11.21 Emily + //priv->ieee80211->SetHwRegHandler(dev, HW_VAR_COMMAND, &u1bTmp ); // Using HW_VAR_COMMAND instead of writing CMDR directly. Rewrited by Annie, 2006-04-07. + write_nic_byte(dev, CMDR, u1bTmp); + } +#else cmd=read_nic_byte(dev,CMDR); -// if(!priv->ieee80211->bSupportRemoteWakeUp) { - write_nic_byte(dev, CMDR, cmd &~ \ - (CR_TE|CR_RE)); -// } - force_pci_posting(dev); - mdelay(30); + write_nic_byte(dev, CMDR, cmd &~ (CR_TE|CR_RE)); +#endif - for(i = 0; i < MAX_QUEUE_SIZE; i++) { - skb_queue_purge(&priv->ieee80211->skb_waitQ [i]); - } - for(i = 0; i < MAX_QUEUE_SIZE; i++) { - skb_queue_purge(&priv->ieee80211->skb_aggQ [i]); - } + mdelay(20); + if(!reset) + { + //PlatformStallExecution(150000); + mdelay(150); + +#ifdef RTL8192E + priv->bHwRfOffAction = 2; +#endif + + // + // Call MgntActSet_RF_State instead to prevent RF config race condition. + // By Bruce, 2008-01-17. + // + if(!priv->ieee80211->bSupportRemoteWakeUp) + { + //MgntActSet_RF_State(Adapter, eRfOff, RF_CHANGE_BY_INIT); + //MgntActSet_RF_State(Adapter, eRfOff, Adapter->MgntInfo.RfOffReason); + //if(Adapter->HardwareType == HARDWARE_TYPE_RTL8190P) + + PHY_SetRtl8192eRfOff(dev); + + // 2006.11.30. System reset bit + //priv->ieee80211->GetHwRegHandler(dev, HW_VAR_CPU_RST, (u32*)(&ulRegRead) ); + ulRegRead = read_nic_dword(dev,CPU_GEN); + ulRegRead|=CPU_GEN_SYSTEM_RESET; + //priv->ieee80211->SetHwRegHandler(dev, HW_VAR_CPU_RST, &ulRegRead); + write_nic_dword(dev,CPU_GEN, ulRegRead); + } + else + { + //2008.06.03 for WOL + write_nic_dword(dev, WFCRC0, 0xffffffff); + write_nic_dword(dev, WFCRC1, 0xffffffff); + write_nic_dword(dev, WFCRC2, 0xffffffff); + + //Write PMR register + write_nic_byte(dev, PMR, 0x5); + //Disable tx, enanble rx + write_nic_byte(dev, MacBlkCtrl, 0xa); + } + } + + for(i = 0; i < MAX_QUEUE_SIZE; i++) { + skb_queue_purge(&priv->ieee80211->skb_waitQ [i]); + } + for(i = 0; i < MAX_QUEUE_SIZE; i++) { + skb_queue_purge(&priv->ieee80211->skb_aggQ [i]); + } skb_queue_purge(&priv->skb_queue); return; } +#if 0 static void rtl8192_reset(struct net_device *dev) { rtl8192_irq_disable(dev); printk("This is RTL819xP Reset procedure\n"); } +#endif static u16 rtl_rate[] = {10,20,55,110,60,90,120,180,240,360,480,540}; inline u16 rtl8192_rate2rate(short rate) @@ -954,6 +1163,12 @@ static void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev, /* shall not be referred by command packet */ assert(queue_index != TXCMD_QUEUE); + if((priv->bHwRadioOff == true)||(!priv->up)) + { + kfree_skb(skb); + return; + } + //spin_lock_irqsave(&priv->tx_lock,flags); memcpy((unsigned char *)(skb->cb),&dev,sizeof(dev)); @@ -996,6 +1211,13 @@ static int rtl8192_hard_start_xmit(struct sk_buff *skb,struct net_device *dev) cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); u8 queue_index = tcb_desc->queue_index; + if(queue_index != TXCMD_QUEUE){ + if((priv->bHwRadioOff == true)||(!priv->up)) + { + kfree_skb(skb); + return 0; + } + } //spin_lock_irqsave(&priv->tx_lock,flags); @@ -1379,6 +1601,15 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff* skb) u8* pda_addr = NULL; int idx; + if(priv->bdisable_nic){ + RT_TRACE(COMP_ERR,"%s: ERR!! Nic is disabled! Can't tx packet len=%d qidx=%d!!!\n", __FUNCTION__, skb->len, tcb_desc->queue_index); + return skb->len; + } + +#ifdef ENABLE_LPS + priv->ieee80211->bAwakePktSent = true; +#endif + mapping = pci_map_single(priv->pdev, skb->data, skb->len, PCI_DMA_TODEVICE); /* collect the tx packets statitcs */ pda_addr = ((u8*)skb->data) + sizeof(TX_FWINFO_8190PCI); @@ -1481,6 +1712,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff* skb) if((pdesc->OWN == 1) && (tcb_desc->queue_index != BEACON_QUEUE)) { RT_TRACE(COMP_ERR,"No more TX desc@%d, ring->idx = %d,idx = %d,%x", \ tcb_desc->queue_index,ring->idx, idx,skb->len); + spin_unlock_irqrestore(&priv->irq_th_lock,flags); return skb->len; } @@ -1779,7 +2011,7 @@ static void rtl8192_qos_activate(struct work_struct * work) (((u32)(qos_parameters->cw_max[i]))<< AC_PARAM_ECW_MAX_OFFSET)| (((u32)(qos_parameters->cw_min[i]))<< AC_PARAM_ECW_MIN_OFFSET)| ((u32)u1bAIFS << AC_PARAM_AIFS_OFFSET)); - printk("===>u4bAcParam:%x, ", u4bAcParam); + //printk("===>u4bAcParam:%x, ", u4bAcParam); write_nic_dword(dev, WDCAPARA_ADD[i], u4bAcParam); //write_nic_dword(dev, WDCAPARA_ADD[i], 0x005e4332); } @@ -1964,11 +2196,24 @@ void rtl8192_update_ratr_table(struct net_device* dev) write_nic_byte(dev, UFWP, 1); } +#if 0 static u8 ccmp_ie[4] = {0x00,0x50,0xf2,0x04}; static u8 ccmp_rsn_ie[4] = {0x00, 0x0f, 0xac, 0x04}; +#endif + static bool GetNmodeSupportBySecCfg8190Pci(struct net_device*dev) { #if 1 + + struct r8192_priv *priv = ieee80211_priv(dev); + struct ieee80211_device *ieee = priv->ieee80211; + if (ieee->rtllib_ap_sec_type && + (ieee->rtllib_ap_sec_type(ieee)&(SEC_ALG_WEP|SEC_ALG_TKIP))) { + return false; + } else { + return true; + } +#else struct r8192_priv* priv = ieee80211_priv(dev); struct ieee80211_device* ieee = priv->ieee80211; int wpa_ie_len= ieee->wpa_ie_len; @@ -1995,18 +2240,6 @@ static bool GetNmodeSupportBySecCfg8190Pci(struct net_device*dev) return true; } -#if 0 - //In here we discuss with SD4 David. He think we still can send TKIP in broadcast group key in MCS rate. - //We can't force in G mode if Pairwie key is AES and group key is TKIP - if((pSecInfo->GroupEncAlgorithm == WEP104_Encryption) || (pSecInfo->GroupEncAlgorithm == WEP40_Encryption) || - (pSecInfo->PairwiseEncAlgorithm == WEP104_Encryption) || - (pSecInfo->PairwiseEncAlgorithm == WEP40_Encryption) || (pSecInfo->PairwiseEncAlgorithm == TKIP_Encryption)) - { - return false; - } - else - return true; -#endif return true; #endif } @@ -2127,7 +2360,19 @@ short rtl8192_is_tx_queue_empty(struct net_device *dev) } static void rtl8192_hw_sleep_down(struct net_device *dev) { - RT_TRACE(COMP_POWER, "%s()============>come to sleep down\n", __FUNCTION__); + struct r8192_priv *priv = ieee80211_priv(dev); + unsigned long flags = 0; + + spin_lock_irqsave(&priv->rf_ps_lock,flags); + if (priv->RFChangeInProgress) { + spin_unlock_irqrestore(&priv->rf_ps_lock,flags); + RT_TRACE(COMP_RF, "rtl8192_hw_sleep_down(): RF Change in progress! \n"); + printk("rtl8192_hw_sleep_down(): RF Change in progress!\n"); + return; + } + spin_unlock_irqrestore(&priv->rf_ps_lock,flags); + //RT_TRACE(COMP_PS, "%s()============>come to sleep down\n", __FUNCTION__); + MgntActSet_RF_State(dev, eRfSleep, RF_CHANGE_BY_PS); } static void rtl8192_hw_sleep_wq (struct work_struct *work) @@ -2138,21 +2383,29 @@ static void rtl8192_hw_sleep_wq (struct work_struct *work) struct delayed_work *dwork = container_of(work,struct delayed_work,work); struct ieee80211_device *ieee = container_of(dwork,struct ieee80211_device,hw_sleep_wq); struct net_device *dev = ieee->dev; - //printk("=========>%s()\n", __FUNCTION__); + rtl8192_hw_sleep_down(dev); } -// printk("dev is %d\n",dev); -// printk("&*&(^*(&(&=========>%s()\n", __FUNCTION__); + static void rtl8192_hw_wakeup(struct net_device* dev) { -// u32 flags = 0; + struct r8192_priv *priv = ieee80211_priv(dev); + unsigned long flags = 0; -// spin_lock_irqsave(&priv->ps_lock,flags); - RT_TRACE(COMP_POWER, "%s()============>come to wake up\n", __FUNCTION__); + spin_lock_irqsave(&priv->rf_ps_lock,flags); + if (priv->RFChangeInProgress) { + spin_unlock_irqrestore(&priv->rf_ps_lock,flags); + RT_TRACE(COMP_RF, "rtl8192_hw_wakeup(): RF Change in progress! \n"); + printk("rtl8192_hw_wakeup(): RF Change in progress! schedule wake up task again\n"); + queue_delayed_work(priv->ieee80211->wq,&priv->ieee80211->hw_wakeup_wq,MSECS(10));//PowerSave is not supported if kernel version is below 2.6.20 + return; + } + spin_unlock_irqrestore(&priv->rf_ps_lock,flags); + + //RT_TRACE(COMP_PS, "%s()============>come to wake up\n", __FUNCTION__); MgntActSet_RF_State(dev, eRfOn, RF_CHANGE_BY_PS); - //FIXME: will we send package stored while nic is sleep? -// spin_unlock_irqrestore(&priv->ps_lock,flags); } + void rtl8192_hw_wakeup_wq (struct work_struct *work) { // struct r8180_priv *priv = container_of(work, struct r8180_priv, watch_dog_wq); @@ -2169,7 +2422,6 @@ void rtl8192_hw_wakeup_wq (struct work_struct *work) #define MAX_SLEEP_TIME 10000 static void rtl8192_hw_to_sleep(struct net_device *dev, u32 th, u32 tl) { - struct r8192_priv *priv = ieee80211_priv(dev); u32 rb = jiffies; @@ -2177,58 +2429,55 @@ static void rtl8192_hw_to_sleep(struct net_device *dev, u32 th, u32 tl) spin_lock_irqsave(&priv->ps_lock,flags); - /* Writing HW register with 0 equals to disable - * the timer, that is not really what we want - */ - tl -= MSECS(4+16+7); + // Writing HW register with 0 equals to disable + // the timer, that is not really what we want + // + tl -= MSECS(8+16+7); - //if(tl == 0) tl = 1; - - /* FIXME HACK FIXME HACK */ -// force_pci_posting(dev); - //mdelay(1); - -// rb = read_nic_dword(dev, TSFTR); - - /* If the interval in witch we are requested to sleep is too - * short then give up and remain awake - */ + // If the interval in witch we are requested to sleep is too + // short then give up and remain awake + // when we sleep after send null frame, the timer will be too short to sleep. + // if(((tl>=rb)&& (tl-rb) <= MSECS(MIN_SLEEP_TIME)) - ||((rb>tl)&& (rb-tl) < MSECS(MIN_SLEEP_TIME))) { + ||((rb>tl)&& (rb-tl) < MSECS(MIN_SLEEP_TIME))) { spin_unlock_irqrestore(&priv->ps_lock,flags); - printk("too short to sleep\n"); + printk("too short to sleep::%x, %x, %lx\n",tl, rb, MSECS(MIN_SLEEP_TIME)); return; } -// write_nic_dword(dev, TimerInt, tl); -// rb = read_nic_dword(dev, TSFTR); - { - u32 tmp = (tl>rb)?(tl-rb):(rb-tl); - // if (tlieee80211->wq, &priv->ieee80211->hw_wakeup_wq, tmp); //as tl may be less than rb - } - /* if we suspect the TimerInt is gone beyond tl - * while setting it, then give up - */ -#if 1 if(((tl > rb) && ((tl-rb) > MSECS(MAX_SLEEP_TIME)))|| - ((tl < rb) && ((rb-tl) > MSECS(MAX_SLEEP_TIME)))) { + ((tl < rb) && (tl>MSECS(69)) && ((rb-tl) > MSECS(MAX_SLEEP_TIME)))|| + ((tlMSECS(MAX_SLEEP_TIME)))) { printk("========>too long to sleep:%x, %x, %lx\n", tl, rb, MSECS(MAX_SLEEP_TIME)); spin_unlock_irqrestore(&priv->ps_lock,flags); return; } -#endif -// if(priv->rf_sleep) -// priv->rf_sleep(dev); - - //printk("<=========%s()\n", __FUNCTION__); - queue_delayed_work(priv->ieee80211->wq, (void *)&priv->ieee80211->hw_sleep_wq,0); + { + u32 tmp = (tl>rb)?(tl-rb):(rb-tl); + queue_delayed_work(priv->ieee80211->wq, + &priv->ieee80211->hw_wakeup_wq,tmp); + //PowerSave not supported when kernel version less 2.6.20 + } + queue_delayed_work(priv->ieee80211->wq, + (void *)&priv->ieee80211->hw_sleep_wq,0); spin_unlock_irqrestore(&priv->ps_lock,flags); + } static void rtl8192_init_priv_variable(struct net_device* dev) { struct r8192_priv *priv = ieee80211_priv(dev); u8 i; + PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl)); + + // Default Halt the NIC if RF is OFF. + pPSC->RegRfPsLevel |= RT_RF_OFF_LEVL_HALT_NIC; + pPSC->RegRfPsLevel |= RT_RF_OFF_LEVL_CLK_REQ; + pPSC->RegRfPsLevel |= RT_RF_OFF_LEVL_ASPM; + pPSC->RegRfPsLevel |= RT_RF_LPS_LEVEL_ASPM; + pPSC->bLeisurePs = true; + pPSC->RegMaxLPSAwakeIntvl = 5; + priv->bHwRadioOff = false; + priv->being_init_adapter = false; priv->txbuffsize = 1600;//1024; priv->txfwbuffersize = 4096; @@ -2328,6 +2577,17 @@ static void rtl8192_init_priv_variable(struct net_device* dev) //added by amy priv->ieee80211->InitialGainHandler = InitialGain819xPci; +#ifdef ENABLE_IPS + priv->ieee80211->ieee80211_ips_leave_wq = ieee80211_ips_leave_wq; + priv->ieee80211->ieee80211_ips_leave = ieee80211_ips_leave; +#endif +#ifdef ENABLE_LPS + priv->ieee80211->LeisurePSLeave = LeisurePSLeave; +#endif//ENABL + + priv->ieee80211->SetHwRegHandler = rtl8192e_SetHwReg; + priv->ieee80211->rtllib_ap_sec_type = rtl8192e_ap_sec_type; + priv->card_type = USB; { priv->ShortRetryLimit = 0x30; @@ -2400,6 +2660,10 @@ static void rtl8192_init_priv_task(struct net_device* dev) priv->priv_wq = create_workqueue(DRV_NAME); #endif +#ifdef ENABLE_IPS + INIT_WORK(&priv->ieee80211->ips_leave_wq, (void*)IPSLeave_wq); +#endif + // INIT_WORK(&priv->reset_wq, (void(*)(void*)) rtl8192_restart); INIT_WORK(&priv->reset_wq, rtl8192_restart); // INIT_DELAYED_WORK(&priv->watch_dog_wq, hal_dm_watchdog); @@ -2926,13 +3190,14 @@ static void rtl8192_read_eeprom_info(struct net_device* dev) #endif break; } -/* - //2008.06.03, for WOL + + if( priv->eeprom_vid == 0x1186 && priv->eeprom_did == 0x3304) - priv->ieee80211->bSupportRemoteWakeUp = TRUE; + priv->ieee80211->bSupportRemoteWakeUp = true; else - priv->ieee80211->bSupportRemoteWakeUp = FALSE; -*/ + priv->ieee80211->bSupportRemoteWakeUp = false; + + RT_TRACE(COMP_INIT, "RegChannelPlan(%d)\n", priv->RegChannelPlan); RT_TRACE(COMP_INIT, "ChannelPlan = %d \n", priv->ChannelPlan); RT_TRACE(COMP_INIT, "LedStrategy = %d \n", priv->LedStrategy); @@ -4006,12 +4271,19 @@ static void rtl819x_ifsilentreset(struct net_device *dev) struct ieee80211_device *ieee = priv->ieee80211; + return; + // 2007.07.20. If we need to check CCK stop, please uncomment this line. //bStuck = Adapter->HalFunc.CheckHWStopHandler(Adapter); if(priv->ResetProgress==RESET_TYPE_NORESET) { RESET_START: +#ifdef ENABLE_LPS + //LZM for PS-Poll AID issue. 090429 + if(priv->ieee80211->state == IEEE80211_LINKED) + LeisurePSLeave(dev); +#endif RT_TRACE(COMP_RESET,"=========>Reset progress!! \n"); @@ -4051,9 +4323,9 @@ RESET_START: } else{ printk("ieee->state is NOT LINKED\n"); - ieee80211_softmac_stop_protocol(priv->ieee80211); + ieee80211_softmac_stop_protocol(priv->ieee80211,true); } - rtl8192_rtx_disable(dev); + rtl8192_halt_adapter(dev, true); up(&priv->wx_sem); RT_TRACE(COMP_RESET,"%s():<==========down process is finished\n",__FUNCTION__); RT_TRACE(COMP_RESET,"%s():===========>start to up the driver\n",__FUNCTION__); @@ -4150,6 +4422,128 @@ void InactivePsWorkItemCallback(struct net_device *dev) RT_TRACE(COMP_POWER, "InactivePsWorkItemCallback() <--------- \n"); } +#ifdef ENABLE_LPS +// +// Change current and default preamble mode. +// 2005.01.06, by rcnjko. +// +bool MgntActSet_802_11_PowerSaveMode(struct net_device *dev, u8 rtPsMode) +{ + struct r8192_priv *priv = ieee80211_priv(dev); + //PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl)); + //u8 RpwmVal, FwPwrMode; + + // Currently, we do not change power save mode on IBSS mode. + if(priv->ieee80211->iw_mode == IW_MODE_ADHOC) + { + return false; + } + + // + // If we make HW to fill up the PwrMgt bit for us, + // some AP will not response to our mgnt frames with PwrMgt bit set, + // e.g. cannot associate the AP. + // So I commented out it. 2005.02.16, by rcnjko. + // +// // Change device's power save mode. +// Adapter->HalFunc.SetPSModeHandler( Adapter, rtPsMode ); + + // Update power save mode configured. + //RT_TRACE(COMP_LPS,"%s(): set ieee->ps = %x\n",__FUNCTION__,rtPsMode); + if(!priv->ps_force) { + priv->ieee80211->ps = rtPsMode; + } + + // Awake immediately + if(priv->ieee80211->sta_sleep != 0 && rtPsMode == IEEE80211_PS_DISABLED) + { + unsigned long flags; + + //PlatformSetTimer(Adapter, &(pMgntInfo->AwakeTimer), 0); + // Notify the AP we awke. + rtl8192_hw_wakeup(dev); + priv->ieee80211->sta_sleep = 0; + + spin_lock_irqsave(&(priv->ieee80211->mgmt_tx_lock), flags); + printk("LPS leave: notify AP we are awaked ++++++++++ SendNullFunctionData\n"); + ieee80211_sta_ps_send_null_frame(priv->ieee80211, 0); + spin_unlock_irqrestore(&(priv->ieee80211->mgmt_tx_lock), flags); + } + + return true; +} + +//================================================================================ +// Leisure Power Save in linked state. +//================================================================================ + +// +// Description: +// Enter the leisure power save mode. +// +void LeisurePSEnter(struct net_device *dev) +{ + struct r8192_priv *priv = ieee80211_priv(dev); + PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl)); + + //RT_TRACE(COMP_PS, "LeisurePSEnter()...\n"); + //RT_TRACE(COMP_PS, "pPSC->bLeisurePs = %d, ieee->ps = %d,pPSC->LpsIdleCount is %d,RT_CHECK_FOR_HANG_PERIOD is %d\n", + // pPSC->bLeisurePs, priv->ieee80211->ps,pPSC->LpsIdleCount,RT_CHECK_FOR_HANG_PERIOD); + + if(!((priv->ieee80211->iw_mode == IW_MODE_INFRA) && + (priv->ieee80211->state == IEEE80211_LINKED)) || + (priv->ieee80211->iw_mode == IW_MODE_ADHOC) || + (priv->ieee80211->iw_mode == IW_MODE_MASTER)) + return; + + if (pPSC->bLeisurePs) + { + // Idle for a while if we connect to AP a while ago. + if(pPSC->LpsIdleCount >= RT_CHECK_FOR_HANG_PERIOD) // 4 Sec + { + + if(priv->ieee80211->ps == IEEE80211_PS_DISABLED) + { + + //RT_TRACE(COMP_LPS, "LeisurePSEnter(): Enter 802.11 power save mode...\n"); + MgntActSet_802_11_PowerSaveMode(dev, IEEE80211_PS_MBCAST|IEEE80211_PS_UNICAST); + + } + } + else + pPSC->LpsIdleCount++; + } +} + + +// +// Description: +// Leave the leisure power save mode. +// +void LeisurePSLeave(struct net_device *dev) +{ + struct r8192_priv *priv = ieee80211_priv(dev); + PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl)); + + + //RT_TRACE(COMP_PS, "LeisurePSLeave()...\n"); + //RT_TRACE(COMP_PS, "pPSC->bLeisurePs = %d, ieee->ps = %d\n", + // pPSC->bLeisurePs, priv->ieee80211->ps); + + if (pPSC->bLeisurePs) + { + if(priv->ieee80211->ps != IEEE80211_PS_DISABLED) + { + // move to lps_wakecomplete() + //RT_TRACE(COMP_LPS, "LeisurePSLeave(): Busy Traffic , Leave 802.11 power save..\n"); + MgntActSet_802_11_PowerSaveMode(dev, IEEE80211_PS_DISABLED); + + } + } +} +#endif + + // // Description: // Enter the inactive power save mode. RF will be off @@ -4178,6 +4572,7 @@ IPSEnter(struct net_device *dev) && (priv->ieee80211->state != IEEE80211_LINKED) ) { RT_TRACE(COMP_RF,"IPSEnter(): Turn off RF.\n"); + //printk("IPSEnter(): Turn off RF.\n"); pPSC->eInactivePowerState = eRfOff; // queue_work(priv->priv_wq,&(pPSC->InactivePsWorkItem)); InactivePsWorkItemCallback(dev); @@ -4203,12 +4598,53 @@ IPSLeave(struct net_device *dev) if (rtState != eRfOn && !pPSC->bSwRfProcessing && priv->ieee80211->RfOffReason <= RF_CHANGE_BY_IPS) { RT_TRACE(COMP_POWER, "IPSLeave(): Turn on RF.\n"); + //printk("IPSLeave(): Turn on RF.\n"); pPSC->eInactivePowerState = eRfOn; // queue_work(priv->priv_wq,&(pPSC->InactivePsWorkItem)); InactivePsWorkItemCallback(dev); } } } + +void IPSLeave_wq(void *data) +{ + struct ieee80211_device *ieee = container_of(data,struct ieee80211_device,ips_leave_wq); + struct net_device *dev = ieee->dev; + + struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); + down(&priv->ieee80211->ips_sem); + IPSLeave(dev); + up(&priv->ieee80211->ips_sem); +} + +void ieee80211_ips_leave_wq(struct net_device *dev) +{ + struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); + RT_RF_POWER_STATE rtState; + rtState = priv->ieee80211->eRFPowerState; + + if(priv->ieee80211->PowerSaveControl.bInactivePs){ + if(rtState == eRfOff){ + if(priv->ieee80211->RfOffReason > RF_CHANGE_BY_IPS) + { + RT_TRACE(COMP_ERR, "%s(): RF is OFF.\n",__FUNCTION__); + return; + } + else{ + printk("=========>%s(): IPSLeave\n",__FUNCTION__); + queue_work(priv->ieee80211->wq,&priv->ieee80211->ips_leave_wq); + } + } + } +} +//added by amy 090331 end +void ieee80211_ips_leave(struct net_device *dev) +{ + struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); + down(&priv->ieee80211->ips_sem); + IPSLeave(dev); + up(&priv->ieee80211->ips_sem); +} #endif static void rtl819x_update_rxcounts( @@ -4244,15 +4680,23 @@ void rtl819x_watchdog_wqcallback(struct work_struct *work) unsigned long flags; bool bBusyTraffic = false; static u8 last_time = 0; + bool bEnterPS = false; + + if((!priv->up) || (priv->bHwRadioOff == true)) + return; + if(!priv->up) return; hal_dm_watchdog(dev); #ifdef ENABLE_IPS // printk("watch_dog ENABLE_IPS\n"); if(ieee->actscanning == false){ - if((ieee->iw_mode != IW_MODE_ADHOC) && (ieee->state == IEEE80211_NOLINK) && (ieee->beinretry == false) && (ieee->eRFPowerState == eRfOn) && !ieee->is_set_key){ + //printk("%d,%d,%d,%d\n", ieee->eRFPowerState, ieee->is_set_key, ieee->proto_stoppping, ieee->wx_set_enc); + if((ieee->iw_mode == IW_MODE_INFRA) && (ieee->state == IEEE80211_NOLINK) &&\ + (ieee->eRFPowerState == eRfOn)&&!ieee->is_set_key &&\ + (!ieee->proto_stoppping) && !ieee->wx_set_enc){ if(ieee->PowerSaveControl.ReturnPoint == IPS_CALLBACK_NONE){ - printk("====================>haha:IPSEnter()\n"); + //printk("====================>haha:IPSEnter()\n"); IPSEnter(dev); //ieee80211_stop_scan(priv->ieee80211); } @@ -4262,14 +4706,49 @@ void rtl819x_watchdog_wqcallback(struct work_struct *work) {//to get busy traffic condition if(ieee->state == IEEE80211_LINKED) { - if( ieee->LinkDetectInfo.NumRxOkInPeriod> 666 || - ieee->LinkDetectInfo.NumTxOkInPeriod> 666 ) { + if( ieee->LinkDetectInfo.NumRxOkInPeriod> 100 || + ieee->LinkDetectInfo.NumTxOkInPeriod> 100 ) { bBusyTraffic = true; } +#ifdef ENABLE_LPS + //added by amy for Leisure PS + if( ((ieee->LinkDetectInfo.NumRxUnicastOkInPeriod + ieee->LinkDetectInfo.NumTxOkInPeriod) > 8 ) || + (ieee->LinkDetectInfo.NumRxUnicastOkInPeriod > 2) ) + { + //printk("ieee->LinkDetectInfo.NumRxUnicastOkInPeriod is %d,ieee->LinkDetectInfo.NumTxOkInPeriod is %d\n", + // ieee->LinkDetectInfo.NumRxUnicastOkInPeriod,ieee->LinkDetectInfo.NumTxOkInPeriod); + bEnterPS= false; + } + else + { + bEnterPS= true; + } + + //printk("***bEnterPS = %d\n", bEnterPS); + // LeisurePS only work in infra mode. + if(bEnterPS) + { + LeisurePSEnter(dev); + } + else + { + LeisurePSLeave(dev); + } +#endif + } + else + { +#ifdef ENABLE_LPS + //RT_TRACE(COMP_LPS,"====>no link LPS leave\n"); + LeisurePSLeave(dev); +#endif + } + ieee->LinkDetectInfo.NumRxOkInPeriod = 0; ieee->LinkDetectInfo.NumTxOkInPeriod = 0; + ieee->LinkDetectInfo.NumRxUnicastOkInPeriod = 0; ieee->LinkDetectInfo.bBusyTraffic = bBusyTraffic; } @@ -4288,14 +4767,14 @@ void rtl819x_watchdog_wqcallback(struct work_struct *work) if( ieee->eRFPowerState == eRfOff) RT_TRACE(COMP_ERR,"========>%s()\n",__FUNCTION__); printk("===>%s(): AP is power off,connect another one\n",__FUNCTION__); - // Dot11d_Reset(dev); + // Dot11d_Reset(dev); ieee->state = IEEE80211_ASSOCIATING; notify_wx_assoc_event(priv->ieee80211); - RemovePeerTS(priv->ieee80211,priv->ieee80211->current_network.bssid); + RemovePeerTS(priv->ieee80211,priv->ieee80211->current_network.bssid); ieee->is_roaming = true; ieee->is_set_key = false; - ieee->link_change(dev); - queue_work(ieee->wq, &ieee->associate_procedure_wq); + ieee->link_change(dev); + queue_work(ieee->wq, &ieee->associate_procedure_wq); } } ieee->LinkDetectInfo.NumRecvBcnInPeriod=0; @@ -4348,6 +4827,7 @@ int _rtl8192_up(struct net_device *dev) RT_STATUS init_status = RT_STATUS_SUCCESS; priv->up=1; priv->ieee80211->ieee_up=1; + priv->bdisable_nic = false; //YJ,add,091111 RT_TRACE(COMP_INIT, "Bringing up iface"); init_status = rtl8192_adapter_start(dev); @@ -4422,6 +4902,12 @@ int rtl8192_down(struct net_device *dev) #endif if (priv->up == 0) return -1; +#ifdef ENABLE_LPS + //LZM for PS-Poll AID issue. 090429 + if(priv->ieee80211->state == IEEE80211_LINKED) + LeisurePSLeave(dev); +#endif + priv->up=0; priv->ieee80211->ieee_up = 0; RT_TRACE(COMP_DOWN, "==========>%s()\n", __FUNCTION__); @@ -4459,11 +4945,9 @@ int rtl8192_down(struct net_device *dev) deinit_hal_dm(dev); del_timer_sync(&priv->watch_dog_timer); - ieee80211_softmac_stop_protocol(priv->ieee80211); -#ifdef ENABLE_IPS - MgntActSet_RF_State(dev, eRfOff, RF_CHANGE_BY_INIT); -#endif - rtl8192_rtx_disable(dev); + ieee80211_softmac_stop_protocol(priv->ieee80211,true); + + rtl8192_halt_adapter(dev,false); memset(&priv->ieee80211->current_network, 0 , offsetof(struct ieee80211_network, list)); RT_TRACE(COMP_DOWN, "<==========%s()\n", __FUNCTION__); @@ -4479,10 +4963,10 @@ void rtl8192_commit(struct net_device *dev) if (priv->up == 0) return ; - ieee80211_softmac_stop_protocol(priv->ieee80211); + ieee80211_softmac_stop_protocol(priv->ieee80211,true); rtl8192_irq_disable(dev); - rtl8192_rtx_disable(dev); + rtl8192_halt_adapter(dev,true); _rtl8192_up(dev); } @@ -6381,11 +6865,13 @@ void setKey( struct net_device *dev, if(priv->ieee80211->RfOffReason > RF_CHANGE_BY_IPS) { RT_TRACE(COMP_ERR, "%s(): RF is OFF.\n",__FUNCTION__); - up(&priv->wx_sem); + //up(&priv->wx_sem); return ; } else{ + down(&priv->ieee80211->ips_sem); IPSLeave(dev); + up(&priv->ieee80211->ips_sem); } } } @@ -6455,6 +6941,65 @@ void CamPrintDbgReg(struct net_device* dev) RT_TRACE(COMP_SEC, "WPA_Config=%x \n",ucValue); } +bool NicIFEnableNIC(struct net_device* dev) +{ + RT_STATUS init_status = RT_STATUS_SUCCESS; + struct r8192_priv* priv = ieee80211_priv(dev); + PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl)); + + //YJ,add,091109 + if (priv->up == 0){ + RT_TRACE(COMP_ERR, "ERR!!! %s(): Driver is already down!\n",__FUNCTION__); + priv->bdisable_nic = false; //YJ,add,091111 + return false; + } + // <1> Reset memory: descriptor, buffer,.. + //NicIFResetMemory(Adapter); + + // <2> Enable Adapter + //printk("===========>%s()\n",__FUNCTION__); + //priv->bfirst_init = true; + init_status = rtl8192_adapter_start(dev); + if (init_status != RT_STATUS_SUCCESS) { + RT_TRACE(COMP_ERR,"ERR!!! %s(): initialization is failed!\n",__FUNCTION__); + priv->bdisable_nic = false; //YJ,add,091111 + return -1; + } + //printk("start adapter finished\n"); + RT_CLEAR_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC); + //priv->bfirst_init = false; + + // <3> Enable Interrupt + rtl8192_irq_enable(dev); + priv->bdisable_nic = false; + //RT_TRACE(COMP_PS,"<===========%s()\n",__FUNCTION__); + return (init_status == RT_STATUS_SUCCESS) ? true:false; +} +bool NicIFDisableNIC(struct net_device* dev) +{ + bool status = true; + struct r8192_priv* priv = ieee80211_priv(dev); + u8 tmp_state = 0; + // <1> Disable Interrupt + //RT_TRACE(COMP_PS, "=========>%s()\n",__FUNCTION__); + priv->bdisable_nic = true; //YJ,move,091109 + tmp_state = priv->ieee80211->state; + + ieee80211_softmac_stop_protocol(priv->ieee80211, false); + + priv->ieee80211->state = tmp_state; + rtl8192_cancel_deferred_work(priv); + rtl8192_irq_disable(dev); + // <2> Stop all timer + + // <3> Disable Adapter + rtl8192_halt_adapter(dev, false); +// priv->bdisable_nic = true; + //RT_TRACE(COMP_PS, "<=========%s()\n",__FUNCTION__); + + return status; +} + /*************************************************************************** ------------------- module init / exit stubs ---------------- diff --git a/drivers/staging/rtl8192e/r8192E_dm.c b/drivers/staging/rtl8192e/r8192E_dm.c index 5ffb4f74055b..a249f00da60d 100644 --- a/drivers/staging/rtl8192e/r8192E_dm.c +++ b/drivers/staging/rtl8192e/r8192E_dm.c @@ -19,26 +19,28 @@ Major Change History: #include "r819xE_phy.h" #include "r819xE_phyreg.h" #include "r8190_rtl8256.h" + +#define DRV_NAME "rtl819xE" /*---------------------------Define Local Constant---------------------------*/ // // Indicate different AP vendor for IOT issue. // #ifdef RTL8190P static u32 edca_setting_DL[HT_IOT_PEER_MAX] = -{ 0x5e4322, 0x5e4322, 0x5e4322, 0x604322, 0xa44f, 0x5e4322}; +{ 0x5e4322, 0x5e4322, 0x5e4322, 0x604322, 0xa44f, 0x5e4322, 0x5e4322}; static u32 edca_setting_UL[HT_IOT_PEER_MAX] = -{ 0x5e4322, 0xa44f, 0x5e4322, 0x604322, 0x5e4322, 0x5e4322}; +{ 0x5e4322, 0xa44f, 0x5e4322, 0x604322, 0x5e4322, 0x5e4322, 0x5e4322}; #else #ifdef RTL8192E static u32 edca_setting_DL[HT_IOT_PEER_MAX] = -{ 0x5e4322, 0x5e4322, 0x5e4322, 0x604322, 0xa44f, 0x5e4322}; +{ 0x5e4322, 0x5e4322, 0x5e4322, 0x604322, 0xa44f, 0x5e4322, 0x5e4322}; static u32 edca_setting_UL[HT_IOT_PEER_MAX] = -{ 0x5e4322, 0xa44f, 0x5e4322, 0x604322, 0x5e4322, 0x5e4322}; +{ 0x5e4322, 0xa44f, 0x5e4322, 0x604322, 0x5e4322, 0x5e4322, 0x5e4322}; #else static u32 edca_setting_DL[HT_IOT_PEER_MAX] = -{ 0x5e4322, 0x5e4322, 0x5e4322, 0x604322, 0xa44f, 0x5ea44f}; +{ 0x5e4322, 0x5e4322, 0x5e4322, 0x604322, 0xa44f, 0x5ea44f, 0x5e4322}; static u32 edca_setting_UL[HT_IOT_PEER_MAX] = -{ 0x5e4322, 0xa44f, 0x5e4322, 0x604322, 0x5ea44f, 0x5ea44f}; +{ 0x5e4322, 0xa44f, 0x5e4322, 0x604322, 0x5ea44f, 0x5ea44f, 0x5e4322}; #endif #endif @@ -275,6 +277,30 @@ void dm_CheckRxAggregation(struct net_device *dev) { #endif +// call the script file to enable +void dm_check_ac_dc_power(struct net_device *dev) +{ + struct r8192_priv *priv = ieee80211_priv(dev); + static char *ac_dc_check_script_path = "/etc/acpi/wireless-rtl-ac-dc-power.sh"; + char *argv[] = {ac_dc_check_script_path,DRV_NAME,NULL}; + static char *envp[] = {"HOME=/", + "TERM=linux", + "PATH=/usr/bin:/bin", + NULL}; + + if(priv->ResetProgress == RESET_TYPE_SILENT) + { + RT_TRACE((COMP_INIT | COMP_POWER | COMP_RF), "GPIOChangeRFWorkItemCallBack(): Silent Reseting!!!!!!!\n"); + return; + } + + if(priv->ieee80211->state != IEEE80211_LINKED) { + return; + } + call_usermodehelper(ac_dc_check_script_path,argv,envp,1); + + return; +}; void hal_dm_watchdog(struct net_device *dev) { @@ -282,6 +308,8 @@ void hal_dm_watchdog(struct net_device *dev) //static u8 previous_bssid[6] ={0}; + dm_check_ac_dc_power(dev); + /*Add by amy 2008/05/15 ,porting from windows code.*/ dm_check_rate_adaptive(dev); dm_dynamic_txpower(dev); diff --git a/drivers/staging/rtl8192e/r8192E_hw.h b/drivers/staging/rtl8192e/r8192E_hw.h index 388908fc8d20..346bfb18e2b0 100644 --- a/drivers/staging/rtl8192e/r8192E_hw.h +++ b/drivers/staging/rtl8192e/r8192E_hw.h @@ -808,4 +808,12 @@ enum _RTL8192Pci_HW { #define GPI 0x108 #define GPO 0x109 #define GPE 0x10a + +#define ANAPAR_FOR_8192PciE 0x17 // Analog parameter register + +#define MSR_NOLINK 0x00 +#define MSR_ADHOC 0x01 +#define MSR_INFRA 0x02 +#define MSR_AP 0x03 + #endif diff --git a/drivers/staging/rtl8192e/r8192E_wx.c b/drivers/staging/rtl8192e/r8192E_wx.c index d1eb89229cdf..0b0f39ce3ced 100644 --- a/drivers/staging/rtl8192e/r8192E_wx.c +++ b/drivers/staging/rtl8192e/r8192E_wx.c @@ -22,7 +22,7 @@ #include "r8192E_hw.h" #include "r8192E_wx.h" #ifdef ENABLE_DOT11D -#include "dot11d.h" +#include "ieee80211/dot11d.h" #endif #define RATE_COUNT 12 @@ -70,6 +70,9 @@ static int r8192_wx_set_rate(struct net_device *dev, int ret; struct r8192_priv *priv = ieee80211_priv(dev); + if(priv->bHwRadioOff == true) + return 0; + down(&priv->wx_sem); ret = ieee80211_wx_set_rate(priv->ieee80211,info,wrqu,extra); @@ -87,6 +90,9 @@ static int r8192_wx_set_rts(struct net_device *dev, int ret; struct r8192_priv *priv = ieee80211_priv(dev); + if(priv->bHwRadioOff == true) + return 0; + down(&priv->wx_sem); ret = ieee80211_wx_set_rts(priv->ieee80211,info,wrqu,extra); @@ -111,6 +117,9 @@ static int r8192_wx_set_power(struct net_device *dev, int ret; struct r8192_priv *priv = ieee80211_priv(dev); + if(priv->bHwRadioOff == true) + return 0; + down(&priv->wx_sem); ret = ieee80211_wx_set_power(priv->ieee80211,info,wrqu,extra); @@ -290,6 +299,9 @@ static int r8192_wx_set_rawtx(struct net_device *dev, struct r8192_priv *priv = ieee80211_priv(dev); int ret; + if(priv->bHwRadioOff == true) + return 0; + down(&priv->wx_sem); ret = ieee80211_wx_set_rawtx(priv->ieee80211, info, wrqu, extra); @@ -325,6 +337,9 @@ static int r8192_wx_set_crcmon(struct net_device *dev, int enable = (parms[0] > 0); short prev = priv->crcmon; + if(priv->bHwRadioOff == true) + return 0; + down(&priv->wx_sem); if(enable) @@ -352,6 +367,9 @@ static int r8192_wx_set_mode(struct net_device *dev, struct iw_request_info *a, RT_RF_POWER_STATE rtState; int ret; + if(priv->bHwRadioOff == true) + return 0; + rtState = priv->ieee80211->eRFPowerState; down(&priv->wx_sem); #ifdef ENABLE_IPS @@ -366,8 +384,10 @@ static int r8192_wx_set_mode(struct net_device *dev, struct iw_request_info *a, return -1; } else{ - printk("=========>%s(): IPSLeave\n",__FUNCTION__); + RT_TRACE(COMP_ERR, "%s(): IPSLeave\n",__FUNCTION__); + down(&priv->ieee80211->ips_sem); IPSLeave(dev); + up(&priv->ieee80211->ips_sem); } } } @@ -425,7 +445,7 @@ static int rtl8180_wx_get_range(struct net_device *dev, */ /* ~5 Mb/s real (802.11b) */ - range->throughput = 5 * 1000 * 1000; + range->throughput = 130 * 1000 * 1000; // TODO: Not used in 802.11b? // range->min_nwid; /* Minimal NWID we are able to set */ @@ -468,7 +488,7 @@ static int rtl8180_wx_get_range(struct net_device *dev, range->pmt_flags = IW_POWER_TIMEOUT; range->pm_capa = IW_POWER_PERIOD | IW_POWER_TIMEOUT | IW_POWER_ALL_R; range->we_version_compiled = WIRELESS_EXT; - range->we_version_source = 16; + range->we_version_source = 18; // range->retry_capa; /* What retry options are supported */ // range->retry_flags; /* How to decode max/min retry limit */ @@ -517,7 +537,12 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a, struct ieee80211_device* ieee = priv->ieee80211; RT_RF_POWER_STATE rtState; int ret; + + if(priv->bHwRadioOff == true) + return 0; + rtState = priv->ieee80211->eRFPowerState; + if(!priv->up) return -ENETDOWN; if (priv->ieee80211->LinkDetectInfo.bBusyTraffic == true) return -EAGAIN; @@ -547,8 +572,10 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a, return -1; } else{ - printk("=========>%s(): IPSLeave\n",__FUNCTION__); + //RT_TRACE(COMP_PS, "%s(): IPSLeave\n",__FUNCTION__); + down(&priv->ieee80211->ips_sem); IPSLeave(dev); + up(&priv->ieee80211->ips_sem); } } } @@ -580,6 +607,9 @@ static int r8192_wx_get_scan(struct net_device *dev, struct iw_request_info *a, int ret; struct r8192_priv *priv = ieee80211_priv(dev); + if(priv->bHwRadioOff == true) + return 0; + if(!priv->up) return -ENETDOWN; down(&priv->wx_sem); @@ -599,23 +629,16 @@ static int r8192_wx_set_essid(struct net_device *dev, RT_RF_POWER_STATE rtState; int ret; + if(priv->bHwRadioOff == true) + return 0; + rtState = priv->ieee80211->eRFPowerState; down(&priv->wx_sem); + #ifdef ENABLE_IPS - if(priv->ieee80211->PowerSaveControl.bInactivePs){ - if(rtState == eRfOff){ - if(priv->ieee80211->RfOffReason > RF_CHANGE_BY_IPS) - { - RT_TRACE(COMP_ERR, "%s(): RF is OFF.\n",__FUNCTION__); - up(&priv->wx_sem); - return -1; - } - else{ - printk("=========>%s(): IPSLeave\n",__FUNCTION__); - IPSLeave(dev); - } - } - } + down(&priv->ieee80211->ips_sem); + IPSLeave(dev); + up(&priv->ieee80211->ips_sem); #endif ret = ieee80211_wx_set_essid(priv->ieee80211,a,wrqu,b); @@ -650,6 +673,9 @@ static int r8192_wx_set_freq(struct net_device *dev, struct iw_request_info *a, int ret; struct r8192_priv *priv = ieee80211_priv(dev); + if(priv->bHwRadioOff == true) + return 0; + down(&priv->wx_sem); ret = ieee80211_wx_set_freq(priv->ieee80211, a, wrqu, b); @@ -673,6 +699,9 @@ static int r8192_wx_set_frag(struct net_device *dev, { struct r8192_priv *priv = ieee80211_priv(dev); + if(priv->bHwRadioOff == true) + return 0; + if (wrqu->frag.disabled) priv->ieee80211->fts = DEFAULT_FRAG_THRESHOLD; else { @@ -711,8 +740,16 @@ static int r8192_wx_set_wap(struct net_device *dev, struct r8192_priv *priv = ieee80211_priv(dev); // struct sockaddr *temp = (struct sockaddr *)awrq; + if(priv->bHwRadioOff == true) + return 0; + down(&priv->wx_sem); +#ifdef ENABLE_IPS + down(&priv->ieee80211->ips_sem); + IPSLeave(dev); + up(&priv->ieee80211->ips_sem); +#endif ret = ieee80211_wx_set_wap(priv->ieee80211,info,awrq,extra); up(&priv->wx_sem); @@ -753,14 +790,24 @@ static int r8192_wx_set_enc(struct net_device *dev, u32 hwkey[4]={0,0,0,0}; u8 mask=0xff; u32 key_idx=0; - u8 zero_addr[4][6] ={ {0x00,0x00,0x00,0x00,0x00,0x00}, + u8 zero_addr[4][6] ={{0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00,0x01}, {0x00,0x00,0x00,0x00,0x00,0x02}, {0x00,0x00,0x00,0x00,0x00,0x03} }; int i; + if(priv->bHwRadioOff == true) + return 0; + if(!priv->up) return -ENETDOWN; + priv->ieee80211->wx_set_enc = 1; +#ifdef ENABLE_IPS + down(&priv->ieee80211->ips_sem); + IPSLeave(dev); + up(&priv->ieee80211->ips_sem); +#endif + down(&priv->wx_sem); RT_TRACE(COMP_SEC, "Setting SW wep key"); @@ -768,7 +815,6 @@ static int r8192_wx_set_enc(struct net_device *dev, up(&priv->wx_sem); - //sometimes, the length is zero while we do not type key value if(wrqu->encoding.length!=0){ @@ -868,6 +914,8 @@ static int r8192_wx_set_enc(struct net_device *dev, } #endif + priv->ieee80211->wx_set_enc = 0; + return ret; } @@ -893,6 +941,9 @@ static int r8192_wx_set_retry(struct net_device *dev, struct r8192_priv *priv = ieee80211_priv(dev); int err = 0; + if(priv->bHwRadioOff == true) + return 0; + down(&priv->wx_sem); if (wrqu->retry.flags & IW_RETRY_LIFETIME || @@ -985,6 +1036,10 @@ static int r8192_wx_set_sens(struct net_device *dev, struct r8192_priv *priv = ieee80211_priv(dev); short err = 0; + + if(priv->bHwRadioOff == true) + return 0; + down(&priv->wx_sem); //DMESG("attempt to set sensivity to %ddb",wrqu->sens.value); if(priv->rf_set_sens == NULL) { @@ -1011,7 +1066,19 @@ static int r8192_wx_set_enc_ext(struct net_device *dev, struct r8192_priv *priv = ieee80211_priv(dev); struct ieee80211_device* ieee = priv->ieee80211; + if(priv->bHwRadioOff == true) + return 0; + down(&priv->wx_sem); + + priv->ieee80211->wx_set_enc = 1; + +#ifdef ENABLE_IPS + down(&priv->ieee80211->ips_sem); + IPSLeave(dev); + up(&priv->ieee80211->ips_sem); +#endif + ret = ieee80211_wx_set_encode_ext(ieee, info, wrqu, extra); { @@ -1091,6 +1158,7 @@ static int r8192_wx_set_enc_ext(struct net_device *dev, } end_hw_sec: + priv->ieee80211->wx_set_enc = 0; up(&priv->wx_sem); return ret; @@ -1102,6 +1170,10 @@ static int r8192_wx_set_auth(struct net_device *dev, int ret=0; //printk("====>%s()\n", __FUNCTION__); struct r8192_priv *priv = ieee80211_priv(dev); + + if(priv->bHwRadioOff == true) + return 0; + down(&priv->wx_sem); ret = ieee80211_wx_set_auth(priv->ieee80211, info, &(data->param), extra); up(&priv->wx_sem); @@ -1116,6 +1188,10 @@ static int r8192_wx_set_mlme(struct net_device *dev, int ret=0; struct r8192_priv *priv = ieee80211_priv(dev); + + if(priv->bHwRadioOff == true) + return 0; + down(&priv->wx_sem); ret = ieee80211_wx_set_mlme(priv->ieee80211, info, wrqu, extra); up(&priv->wx_sem); @@ -1129,6 +1205,10 @@ static int r8192_wx_set_gen_ie(struct net_device *dev, //printk("====>%s(), len:%d\n", __FUNCTION__, data->length); int ret=0; struct r8192_priv *priv = ieee80211_priv(dev); + + if(priv->bHwRadioOff == true) + return 0; + down(&priv->wx_sem); ret = ieee80211_wx_set_gen_ie(priv->ieee80211, extra, data->data.length); up(&priv->wx_sem); @@ -1142,6 +1222,42 @@ static int dummy(struct net_device *dev, struct iw_request_info *a, return -1; } +// check ac/dc status with the help of user space application */ +static int r8192_wx_adapter_power_status(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct r8192_priv *priv = ieee80211_priv(dev); +#ifdef ENABLE_LPS + PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->ieee80211->PowerSaveControl)); + struct ieee80211_device* ieee = priv->ieee80211; +#endif + down(&priv->wx_sem); + +#ifdef ENABLE_LPS + RT_TRACE(COMP_POWER, "%s(): %s\n",__FUNCTION__, (*extra == 6)?"DC power":"AC power"); + // ieee->ps shall not be set under DC mode, otherwise it conflict + // with Leisure power save mode setting. + // + if(*extra || priv->force_lps) { + priv->ps_force = false; + pPSC->bLeisurePs = true; + } else { + //LZM for PS-Poll AID issue. 090429 + if(priv->ieee80211->state == IEEE80211_LINKED) + LeisurePSLeave(dev); + + priv->ps_force = true; + pPSC->bLeisurePs = false; + ieee->ps = *extra; + } + +#endif + up(&priv->wx_sem); + return 0; + +} + static iw_handler r8192_wx_handlers[] = { @@ -1231,72 +1347,28 @@ static const struct iw_priv_args r8192_private_args[] = { SIOCIWFIRSTPRIV + 0x2, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "rawtx" } -#ifdef JOHN_IOCTL - , - { - SIOCIWFIRSTPRIV + 0x3, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "readRF" - } - , - { - SIOCIWFIRSTPRIV + 0x4, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "writeRF" - } - , - { - SIOCIWFIRSTPRIV + 0x5, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "readBB" - } - , - { - SIOCIWFIRSTPRIV + 0x6, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "writeBB" - } - , - { - SIOCIWFIRSTPRIV + 0x7, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "readnicb" - } - , - { - SIOCIWFIRSTPRIV + 0x8, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "writenicb" - } - , - { - SIOCIWFIRSTPRIV + 0x9, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "apinfo" - } - -#endif , { SIOCIWFIRSTPRIV + 0x3, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "forcereset" } + , + { + SIOCIWFIRSTPRIV + 0x4, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED|1, IW_PRIV_TYPE_NONE, + "set_power" + } }; static iw_handler r8192_private_handler[] = { -// r8192_wx_set_monitor, /* SIOCIWFIRSTPRIV */ r8192_wx_set_crcmon, /*SIOCIWSECONDPRIV*/ -// r8192_wx_set_forceassociate, -// r8192_wx_set_beaconinterval, -// r8192_wx_set_monitor_type, r8192_wx_set_scan_type, r8192_wx_set_rawtx, -#ifdef JOHN_IOCTL - r8192_wx_read_regs, - r8192_wx_write_regs, - r8192_wx_read_bb, - r8192_wx_write_bb, - r8192_wx_read_nicb, - r8192_wx_write_nicb, - r8192_wx_get_ap_status -#endif r8192_wx_force_reset, + r8192_wx_adapter_power_status, }; //#if WIRELESS_EXT >= 17 diff --git a/drivers/staging/rtl8192e/r8192E_wx.h b/drivers/staging/rtl8192e/r8192E_wx.h index 79ebdb698a41..047030bc051a 100644 --- a/drivers/staging/rtl8192e/r8192E_wx.h +++ b/drivers/staging/rtl8192e/r8192E_wx.h @@ -15,7 +15,6 @@ #ifndef R8180_WX_H #define R8180_WX_H //#include -//#include "ieee80211.h" extern struct iw_handler_def r8192_wx_handlers_def; /* Enable the rtl819x_core.c to share this function, david 2008.9.22 */ extern struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev); diff --git a/drivers/staging/rtl8192e/r819xE_phy.c b/drivers/staging/rtl8192e/r819xE_phy.c index c44059aeacb6..7bd4fae0667e 100644 --- a/drivers/staging/rtl8192e/r819xE_phy.c +++ b/drivers/staging/rtl8192e/r819xE_phy.c @@ -5,7 +5,7 @@ #include "r819xE_phy.h" #include "r8192E_dm.h" #ifdef ENABLE_DOT11D -#include "dot11d.h" +#include "ieee80211/dot11d.h" #endif static u32 RF_CHANNEL_TABLE_ZEBRA[] = { 0, diff --git a/drivers/staging/rtl8192e/r819xE_phyreg.h b/drivers/staging/rtl8192e/r819xE_phyreg.h index 37f0feefaf2c..6a26883d1e9e 100644 --- a/drivers/staging/rtl8192e/r819xE_phyreg.h +++ b/drivers/staging/rtl8192e/r819xE_phyreg.h @@ -38,6 +38,8 @@ #define MCS_TXAGC 0x340 // MCS AGC #define CCK_TXAGC 0x348 // CCK AGC +#define MacBlkCtrl 0x403 // Mac block on/off control register + //page8 #define rFPGA0_RFMOD 0x800 //RF mode & CCK TxSC #define rFPGA0_TxInfo 0x804 @@ -875,4 +877,5 @@ #define rRTL8256TxBBBW 19 #define bRTL8256TxBBBW 0x18 + #endif //__INC_HAL8190PCIPHYREG_H From 8f2668418f182ac6b50b994851c36bd0a116e4f8 Mon Sep 17 00:00:00 2001 From: Radu Voicilas Date: Fri, 4 Dec 2009 20:43:16 -0800 Subject: [PATCH 039/367] Staging: rtl8192e: fix more coding style issues. Fixes to the way code looks. Signed-off-by: Radu Voicilas Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192e/r8190_rtl8256.h | 49 +++++++++++++----------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/drivers/staging/rtl8192e/r8190_rtl8256.h b/drivers/staging/rtl8192e/r8190_rtl8256.h index 7d9095a70aec..ce49c606521a 100644 --- a/drivers/staging/rtl8192e/r8190_rtl8256.h +++ b/drivers/staging/rtl8192e/r8190_rtl8256.h @@ -1,28 +1,33 @@ -/* - This is part of the rtl8180-sa2400 driver - released under the GPL (See file COPYING for details). - Copyright (c) 2005 Andrea Merello +/* r8190_rtl8256.h - rtl8256 radio frontend + * + * This is part of the rtl8180-sa2400 driver + * released under the GPL (See file COPYING for details). + * Copyright (c) 2005 Andrea Merello + * + * Many thanks to Realtek Corp. for their great support! + */ - This files contains programming code for the rtl8256 - radio frontend. - - *Many* thanks to Realtek Corp. for their great support! - -*/ - -#ifndef RTL8225H -#define RTL8225H +#ifndef RTL8225_H +#define RTL8225_H #ifdef RTL8190P -#define RTL819X_TOTAL_RF_PATH 4 +#define RTL819X_TOTAL_RF_PATH 4 #else -#define RTL819X_TOTAL_RF_PATH 2 //for 8192E +#define RTL819X_TOTAL_RF_PATH 2 /* for 8192E */ #endif -extern void PHY_SetRF8256Bandwidth(struct net_device* dev , HT_CHANNEL_WIDTH Bandwidth); -extern RT_STATUS PHY_RF8256_Config(struct net_device* dev); -extern RT_STATUS phy_RF8256_Config_ParaFile(struct net_device* dev); -extern void PHY_SetRF8256CCKTxPower(struct net_device* dev, u8 powerlevel); -extern void PHY_SetRF8256OFDMTxPower(struct net_device* dev, u8 powerlevel); -extern bool MgntActSet_RF_State(struct net_device* dev, RT_RF_POWER_STATE StateToSet, RT_RF_CHANGE_SOURCE ChangeSource); -#endif +extern void PHY_SetRF8256Bandwidth(struct net_device *dev, + HT_CHANNEL_WIDTH Bandwidth); + +extern RT_STATUS PHY_RF8256_Config(struct net_device *dev); + +extern RT_STATUS phy_RF8256_Config_ParaFile(struct net_device *dev); + +extern void PHY_SetRF8256CCKTxPower(struct net_device *dev, u8 powerlevel); +extern void PHY_SetRF8256OFDMTxPower(struct net_device *dev, u8 powerlevel); + +extern bool MgntActSet_RF_State(struct net_device *dev, + RT_RF_POWER_STATE StateToSet, + RT_RF_CHANGE_SOURCE ChangeSource); + +#endif /* RTL8225_H */ From 1719e1190a019c65750bc515b3ff2ec694e52bc2 Mon Sep 17 00:00:00 2001 From: Radu Voicilas Date: Mon, 7 Dec 2009 18:20:07 -0800 Subject: [PATCH 040/367] Staging: rtl8192e: Code style fix for r819xE_phyreg.h Changed all the comments to conform to the standard, aligned register values. Signed-off-by: Radu Voicilas Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192e/r819xE_phyreg.h | 1084 +++++++++++----------- 1 file changed, 559 insertions(+), 525 deletions(-) diff --git a/drivers/staging/rtl8192e/r819xE_phyreg.h b/drivers/staging/rtl8192e/r819xE_phyreg.h index 6a26883d1e9e..d5de279f6644 100644 --- a/drivers/staging/rtl8192e/r819xE_phyreg.h +++ b/drivers/staging/rtl8192e/r819xE_phyreg.h @@ -81,55 +81,70 @@ #define rFPGA0_XB_LSSIReadBack 0x8a4 #define rFPGA0_XC_LSSIReadBack 0x8a8 #define rFPGA0_XD_LSSIReadBack 0x8ac -#define rFPGA0_PSDReport 0x8b4 +#define rFPGA0_PSDReport 0x8b4 #define rFPGA0_XAB_RFInterfaceRB 0x8e0 #define rFPGA0_XCD_RFInterfaceRB 0x8e4 -//page 9 -#define rFPGA1_RFMOD 0x900 //RF mode & OFDM TxSC -#define rFPGA1_TxBlock 0x904 -#define rFPGA1_DebugSelect 0x908 -#define rFPGA1_TxInfo 0x90c +/* Page 9 - RF mode & OFDM TxSC */ +#define rFPGA1_RFMOD 0x900 +#define rFPGA1_TxBlock 0x904 +#define rFPGA1_DebugSelect 0x908 +#define rFPGA1_TxInfo 0x90c -//page a -#define rCCK0_System 0xa00 -#define rCCK0_AFESetting 0xa04 -#define rCCK0_CCA 0xa08 -#define rCCK0_RxAGC1 0xa0c //AGC default value, saturation level -#define rCCK0_RxAGC2 0xa10 //AGC & DAGC -#define rCCK0_RxHP 0xa14 -#define rCCK0_DSPParameter1 0xa18 //Timing recovery & Channel estimation threshold -#define rCCK0_DSPParameter2 0xa1c //SQ threshold -#define rCCK0_TxFilter1 0xa20 -#define rCCK0_TxFilter2 0xa24 -#define rCCK0_DebugPort 0xa28 //debug port and Tx filter3 -#define rCCK0_FalseAlarmReport 0xa2c //0xa2d -#define rCCK0_TRSSIReport 0xa50 -#define rCCK0_RxReport 0xa54 //0xa57 -#define rCCK0_FACounterLower 0xa5c //0xa5b -#define rCCK0_FACounterUpper 0xa58 //0xa5c +/* Page a */ +#define rCCK0_System 0xa00 +#define rCCK0_AFESetting 0xa04 +#define rCCK0_CCA 0xa08 +/* AGC default value, saturation level */ +#define rCCK0_RxAGC1 0xa0c +/* AGC & DAGC */ +#define rCCK0_RxAGC2 0xa10 +#define rCCK0_RxHP 0xa14 +/* Timing recovery & channel estimation threshold */ +#define rCCK0_DSPParameter1 0xa18 +/* SQ threshold */ +#define rCCK0_DSPParameter2 0xa1c +#define rCCK0_TxFilter1 0xa20 +#define rCCK0_TxFilter2 0xa24 +/* Debug port and TX filter 3 */ +#define rCCK0_DebugPort 0xa28 +#define rCCK0_FalseAlarmReport 0xa2c +#define rCCK0_TRSSIReport 0xa50 +#define rCCK0_RxReport 0xa54 +#define rCCK0_FACounterLower 0xa5c +#define rCCK0_FACounterUpper 0xa58 -//page c -#define rOFDM0_LSTF 0xc00 +/* Page c */ +#define rOFDM0_LSTF 0xc00 #define rOFDM0_TRxPathEnable 0xc04 -#define rOFDM0_TRMuxPar 0xc08 -#define rOFDM0_TRSWIsolation 0xc0c -#define rOFDM0_XARxAFE 0xc10 //RxIQ DC offset, Rx digital filter, DC notch filter -#define rOFDM0_XARxIQImbalance 0xc14 //RxIQ imblance matrix -#define rOFDM0_XBRxAFE 0xc18 +#define rOFDM0_TRMuxPar 0xc08 +#define rOFDM0_TRSWIsolation 0xc0c +/* RxIQ DC offset, Rx digital filter, DC notch filter */ +#define rOFDM0_XARxAFE 0xc10 +/* RxIQ imblance matrix */ +#define rOFDM0_XARxIQImbalance 0xc14 +#define rOFDM0_XBRxAFE 0xc18 #define rOFDM0_XBRxIQImbalance 0xc1c -#define rOFDM0_XCRxAFE 0xc20 +#define rOFDM0_XCRxAFE 0xc20 #define rOFDM0_XCRxIQImbalance 0xc24 -#define rOFDM0_XDRxAFE 0xc28 +#define rOFDM0_XDRxAFE 0xc28 #define rOFDM0_XDRxIQImbalance 0xc2c -#define rOFDM0_RxDetector1 0xc30 //PD,BW & SBD -#define rOFDM0_RxDetector2 0xc34 //SBD & Fame Sync. -#define rOFDM0_RxDetector3 0xc38 //Frame Sync. -#define rOFDM0_RxDetector4 0xc3c //PD, SBD, Frame Sync & Short-GI -#define rOFDM0_RxDSP 0xc40 //Rx Sync Path -#define rOFDM0_CFOandDAGC 0xc44 //CFO & DAGC -#define rOFDM0_CCADropThreshold 0xc48 //CCA Drop threshold -#define rOFDM0_ECCAThreshold 0xc4c // energy CCA +/* PD, BW & SBD */ +#define rOFDM0_RxDetector1 0xc30 +/* SBD */ +#define rOFDM0_RxDetector2 0xc34 +/* Frame Sync */ +#define rOFDM0_RxDetector3 0xc38 +/* PD, SBD, Frame Sync & Short-GI */ +#define rOFDM0_RxDetector4 0xc3c +/* Rx Sync Path */ +#define rOFDM0_RxDSP 0xc40 +/* CFO & DAGC */ +#define rOFDM0_CFOandDAGC 0xc44 +/* CCA Drop threshold */ +#define rOFDM0_CCADropThreshold 0xc48 +/* Energy CCA */ +#define rOFDM0_ECCAThreshold 0xc4c #define rOFDM0_XAAGCCore1 0xc50 #define rOFDM0_XAAGCCore2 0xc54 #define rOFDM0_XBAGCCore1 0xc58 @@ -141,501 +156,517 @@ #define rOFDM0_AGCParameter1 0xc70 #define rOFDM0_AGCParameter2 0xc74 #define rOFDM0_AGCRSSITable 0xc78 -#define rOFDM0_HTSTFAGC 0xc7c +#define rOFDM0_HTSTFAGC 0xc7c #define rOFDM0_XATxIQImbalance 0xc80 -#define rOFDM0_XATxAFE 0xc84 +#define rOFDM0_XATxAFE 0xc84 #define rOFDM0_XBTxIQImbalance 0xc88 -#define rOFDM0_XBTxAFE 0xc8c +#define rOFDM0_XBTxAFE 0xc8c #define rOFDM0_XCTxIQImbalance 0xc90 -#define rOFDM0_XCTxAFE 0xc94 +#define rOFDM0_XCTxAFE 0xc94 #define rOFDM0_XDTxIQImbalance 0xc98 -#define rOFDM0_XDTxAFE 0xc9c +#define rOFDM0_XDTxAFE 0xc9c #define rOFDM0_RxHPParameter 0xce0 #define rOFDM0_TxPseudoNoiseWgt 0xce4 -#define rOFDM0_FrameSync 0xcf0 -#define rOFDM0_DFSReport 0xcf4 -#define rOFDM0_TxCoeff1 0xca4 -#define rOFDM0_TxCoeff2 0xca8 -#define rOFDM0_TxCoeff3 0xcac -#define rOFDM0_TxCoeff4 0xcb0 -#define rOFDM0_TxCoeff5 0xcb4 -#define rOFDM0_TxCoeff6 0xcb8 +#define rOFDM0_FrameSync 0xcf0 +#define rOFDM0_DFSReport 0xcf4 +#define rOFDM0_TxCoeff1 0xca4 +#define rOFDM0_TxCoeff2 0xca8 +#define rOFDM0_TxCoeff3 0xcac +#define rOFDM0_TxCoeff4 0xcb0 +#define rOFDM0_TxCoeff5 0xcb4 +#define rOFDM0_TxCoeff6 0xcb8 -//page d -#define rOFDM1_LSTF 0xd00 +/* Page d */ +#define rOFDM1_LSTF 0xd00 #define rOFDM1_TRxPathEnable 0xd04 -#define rOFDM1_CFO 0xd08 -#define rOFDM1_CSI1 0xd10 -#define rOFDM1_SBD 0xd14 -#define rOFDM1_CSI2 0xd18 -#define rOFDM1_CFOTracking 0xd2c +#define rOFDM1_CFO 0xd08 +#define rOFDM1_CSI1 0xd10 +#define rOFDM1_SBD 0xd14 +#define rOFDM1_CSI2 0xd18 +#define rOFDM1_CFOTracking 0xd2c #define rOFDM1_TRxMesaure1 0xd34 -#define rOFDM1_IntfDet 0xd3c -#define rOFDM1_PseudoNoiseStateAB 0xd50 -#define rOFDM1_PseudoNoiseStateCD 0xd54 -#define rOFDM1_RxPseudoNoiseWgt 0xd58 -#define rOFDM_PHYCounter1 0xda0 //cca, parity fail -#define rOFDM_PHYCounter2 0xda4 //rate illegal, crc8 fail -#define rOFDM_PHYCounter3 0xda8 //MCS not support -#define rOFDM_ShortCFOAB 0xdac -#define rOFDM_ShortCFOCD 0xdb0 -#define rOFDM_LongCFOAB 0xdb4 -#define rOFDM_LongCFOCD 0xdb8 -#define rOFDM_TailCFOAB 0xdbc -#define rOFDM_TailCFOCD 0xdc0 +#define rOFDM1_IntfDet 0xd3c +#define rOFDM1_PseudoNoiseStateAB 0xd50 +#define rOFDM1_PseudoNoiseStateCD 0xd54 +#define rOFDM1_RxPseudoNoiseWgt 0xd58 +/* cca, parity fail */ +#define rOFDM_PHYCounter1 0xda0 +/* rate illegal, crc8 fail */ +#define rOFDM_PHYCounter2 0xda4 +/* MCS not supported */ +#define rOFDM_PHYCounter3 0xda8 +#define rOFDM_ShortCFOAB 0xdac +#define rOFDM_ShortCFOCD 0xdb0 +#define rOFDM_LongCFOAB 0xdb4 +#define rOFDM_LongCFOCD 0xdb8 +#define rOFDM_TailCFOAB 0xdbc +#define rOFDM_TailCFOCD 0xdc0 #define rOFDM_PWMeasure1 0xdc4 #define rOFDM_PWMeasure2 0xdc8 -#define rOFDM_BWReport 0xdcc -#define rOFDM_AGCReport 0xdd0 -#define rOFDM_RxSNR 0xdd4 -#define rOFDM_RxEVMCSI 0xdd8 -#define rOFDM_SIGReport 0xddc +#define rOFDM_BWReport 0xdcc +#define rOFDM_AGCReport 0xdd0 +#define rOFDM_RxSNR 0xdd4 +#define rOFDM_RxEVMCSI 0xdd8 +#define rOFDM_SIGReport 0xddc -//page e -#define rTxAGC_Rate18_06 0xe00 -#define rTxAGC_Rate54_24 0xe04 -#define rTxAGC_CCK_Mcs32 0xe08 -#define rTxAGC_Mcs03_Mcs00 0xe10 -#define rTxAGC_Mcs07_Mcs04 0xe14 -#define rTxAGC_Mcs11_Mcs08 0xe18 -#define rTxAGC_Mcs15_Mcs12 0xe1c +/* Page e */ +#define rTxAGC_Rate18_06 0xe00 +#define rTxAGC_Rate54_24 0xe04 +#define rTxAGC_CCK_Mcs32 0xe08 +#define rTxAGC_Mcs03_Mcs00 0xe10 +#define rTxAGC_Mcs07_Mcs04 0xe14 +#define rTxAGC_Mcs11_Mcs08 0xe18 +#define rTxAGC_Mcs15_Mcs12 0xe1c -//RF -//Zebra1 +/* RF Zebra 1 */ #define rZebra1_HSSIEnable 0x0 #define rZebra1_TRxEnable1 0x1 #define rZebra1_TRxEnable2 0x2 -#define rZebra1_AGC 0x4 +#define rZebra1_AGC 0x4 #define rZebra1_ChargePump 0x5 -#define rZebra1_Channel 0x7 -#define rZebra1_TxGain 0x8 -#define rZebra1_TxLPF 0x9 -#define rZebra1_RxLPF 0xb +#define rZebra1_Channel 0x7 +#define rZebra1_TxGain 0x8 +#define rZebra1_TxLPF 0x9 +#define rZebra1_RxLPF 0xb #define rZebra1_RxHPFCorner 0xc -//Zebra4 -#define rGlobalCtrl 0 -#define rRTL8256_TxLPF 19 -#define rRTL8256_RxLPF 11 +/* Zebra 4 */ +#define rGlobalCtrl 0 +#define rRTL8256_TxLPF 19 +#define rRTL8256_RxLPF 11 -//RTL8258 -#define rRTL8258_TxLPF 0x11 -#define rRTL8258_RxLPF 0x13 +/* RTL8258 */ +#define rRTL8258_TxLPF 0x11 +#define rRTL8258_RxLPF 0x13 #define rRTL8258_RSSILPF 0xa -//Bit Mask -//page-1 -#define bBBResetB 0x100 -#define bGlobalResetB 0x200 -#define bOFDMTxStart 0x4 -#define bCCKTxStart 0x8 -#define bCRC32Debug 0x100 -#define bPMACLoopback 0x10 -#define bTxLSIG 0xffffff -#define bOFDMTxRate 0xf -#define bOFDMTxReserved 0x10 -#define bOFDMTxLength 0x1ffe0 -#define bOFDMTxParity 0x20000 -#define bTxHTSIG1 0xffffff -#define bTxHTMCSRate 0x7f -#define bTxHTBW 0x80 -#define bTxHTLength 0xffff00 -#define bTxHTSIG2 0xffffff -#define bTxHTSmoothing 0x1 -#define bTxHTSounding 0x2 -#define bTxHTReserved 0x4 -#define bTxHTAggreation 0x8 -#define bTxHTSTBC 0x30 -#define bTxHTAdvanceCoding 0x40 -#define bTxHTShortGI 0x80 -#define bTxHTNumberHT_LTF 0x300 -#define bTxHTCRC8 0x3fc00 -#define bCounterReset 0x10000 -#define bNumOfOFDMTx 0xffff -#define bNumOfCCKTx 0xffff0000 -#define bTxIdleInterval 0xffff -#define bOFDMService 0xffff0000 -#define bTxMACHeader 0xffffffff -#define bTxDataInit 0xff -#define bTxHTMode 0x100 -#define bTxDataType 0x30000 -#define bTxRandomSeed 0xffffffff -#define bCCKTxPreamble 0x1 -#define bCCKTxSFD 0xffff0000 -#define bCCKTxSIG 0xff -#define bCCKTxService 0xff00 -#define bCCKLengthExt 0x8000 -#define bCCKTxLength 0xffff0000 -#define bCCKTxCRC16 0xffff -#define bCCKTxStatus 0x1 -#define bOFDMTxStatus 0x2 +/* Bit Mask */ +/* Page 1 */ +#define bBBResetB 0x100 +#define bGlobalResetB 0x200 +#define bOFDMTxStart 0x4 +#define bCCKTxStart 0x8 +#define bCRC32Debug 0x100 +#define bPMACLoopback 0x10 +#define bTxLSIG 0xffffff +#define bOFDMTxRate 0xf +#define bOFDMTxReserved 0x10 +#define bOFDMTxLength 0x1ffe0 +#define bOFDMTxParity 0x20000 +#define bTxHTSIG1 0xffffff +#define bTxHTMCSRate 0x7f +#define bTxHTBW 0x80 +#define bTxHTLength 0xffff00 +#define bTxHTSIG2 0xffffff +#define bTxHTSmoothing 0x1 +#define bTxHTSounding 0x2 +#define bTxHTReserved 0x4 +#define bTxHTAggreation 0x8 +#define bTxHTSTBC 0x30 +#define bTxHTAdvanceCoding 0x40 +#define bTxHTShortGI 0x80 +#define bTxHTNumberHT_LTF 0x300 +#define bTxHTCRC8 0x3fc00 +#define bCounterReset 0x10000 +#define bNumOfOFDMTx 0xffff +#define bNumOfCCKTx 0xffff0000 +#define bTxIdleInterval 0xffff +#define bOFDMService 0xffff0000 +#define bTxMACHeader 0xffffffff +#define bTxDataInit 0xff +#define bTxHTMode 0x100 +#define bTxDataType 0x30000 +#define bTxRandomSeed 0xffffffff +#define bCCKTxPreamble 0x1 +#define bCCKTxSFD 0xffff0000 +#define bCCKTxSIG 0xff +#define bCCKTxService 0xff00 +#define bCCKLengthExt 0x8000 +#define bCCKTxLength 0xffff0000 +#define bCCKTxCRC16 0xffff +#define bCCKTxStatus 0x1 +#define bOFDMTxStatus 0x2 -//page-8 -#define bRFMOD 0x1 -#define bJapanMode 0x2 -#define bCCKTxSC 0x30 -#define bCCKEn 0x1000000 -#define bOFDMEn 0x2000000 -#define bOFDMRxADCPhase 0x10000 -#define bOFDMTxDACPhase 0x40000 -#define bXATxAGC 0x3f -#define bXBTxAGC 0xf00 -#define bXCTxAGC 0xf000 -#define bXDTxAGC 0xf0000 -#define bPAStart 0xf0000000 -#define bTRStart 0x00f00000 -#define bRFStart 0x0000f000 -#define bBBStart 0x000000f0 -#define bBBCCKStart 0x0000000f -#define bPAEnd 0xf //Reg0x814 -#define bTREnd 0x0f000000 -#define bRFEnd 0x000f0000 -#define bCCAMask 0x000000f0 //T2R -#define bR2RCCAMask 0x00000f00 -#define bHSSI_R2TDelay 0xf8000000 -#define bHSSI_T2RDelay 0xf80000 -#define bContTxHSSI 0x400 //channel gain at continue Tx -#define bIGFromCCK 0x200 -#define bAGCAddress 0x3f -#define bRxHPTx 0x7000 -#define bRxHPT2R 0x38000 -#define bRxHPCCKIni 0xc0000 -#define bAGCTxCode 0xc00000 -#define bAGCRxCode 0x300000 -#define b3WireDataLength 0x800 -#define b3WireAddressLength 0x400 -#define b3WireRFPowerDown 0x1 -//#define bHWSISelect 0x8 -#define b5GPAPEPolarity 0x40000000 -#define b2GPAPEPolarity 0x80000000 -#define bRFSW_TxDefaultAnt 0x3 -#define bRFSW_TxOptionAnt 0x30 -#define bRFSW_RxDefaultAnt 0x300 -#define bRFSW_RxOptionAnt 0x3000 -#define bRFSI_3WireData 0x1 -#define bRFSI_3WireClock 0x2 -#define bRFSI_3WireLoad 0x4 -#define bRFSI_3WireRW 0x8 -#define bRFSI_3Wire 0xf //3-wire total control -#define bRFSI_RFENV 0x10 -#define bRFSI_TRSW 0x20 -#define bRFSI_TRSWB 0x40 -#define bRFSI_ANTSW 0x100 -#define bRFSI_ANTSWB 0x200 -#define bRFSI_PAPE 0x400 -#define bRFSI_PAPE5G 0x800 -#define bBandSelect 0x1 -#define bHTSIG2_GI 0x80 -#define bHTSIG2_Smoothing 0x01 -#define bHTSIG2_Sounding 0x02 -#define bHTSIG2_Aggreaton 0x08 -#define bHTSIG2_STBC 0x30 -#define bHTSIG2_AdvCoding 0x40 +/* Page 8 */ +#define bRFMOD 0x1 +#define bJapanMode 0x2 +#define bCCKTxSC 0x30 +#define bCCKEn 0x1000000 +#define bOFDMEn 0x2000000 +#define bOFDMRxADCPhase 0x10000 +#define bOFDMTxDACPhase 0x40000 +#define bXATxAGC 0x3f +#define bXBTxAGC 0xf00 +#define bXCTxAGC 0xf000 +#define bXDTxAGC 0xf0000 +#define bPAStart 0xf0000000 +#define bTRStart 0x00f00000 +#define bRFStart 0x0000f000 +#define bBBStart 0x000000f0 +#define bBBCCKStart 0x0000000f +/* Reg)x814 */ +#define bPAEnd 0xf +#define bTREnd 0x0f000000 +#define bRFEnd 0x000f0000 +/* T2R */ +#define bCCAMask 0x000000f0 +#define bR2RCCAMask 0x00000f00 +#define bHSSI_R2TDelay 0xf8000000 +#define bHSSI_T2RDelay 0xf80000 +/* Channel gain at continue TX. */ +#define bContTxHSSI 0x400 +#define bIGFromCCK 0x200 +#define bAGCAddress 0x3f +#define bRxHPTx 0x7000 +#define bRxHPT2R 0x38000 +#define bRxHPCCKIni 0xc0000 +#define bAGCTxCode 0xc00000 +#define bAGCRxCode 0x300000 +#define b3WireDataLength 0x800 +#define b3WireAddressLength 0x400 +#define b3WireRFPowerDown 0x1 +/*#define bHWSISelect 0x8 */ +#define b5GPAPEPolarity 0x40000000 +#define b2GPAPEPolarity 0x80000000 +#define bRFSW_TxDefaultAnt 0x3 +#define bRFSW_TxOptionAnt 0x30 +#define bRFSW_RxDefaultAnt 0x300 +#define bRFSW_RxOptionAnt 0x3000 +#define bRFSI_3WireData 0x1 +#define bRFSI_3WireClock 0x2 +#define bRFSI_3WireLoad 0x4 +#define bRFSI_3WireRW 0x8 +/* 3-wire total control */ +#define bRFSI_3Wire 0xf +#define bRFSI_RFENV 0x10 +#define bRFSI_TRSW 0x20 +#define bRFSI_TRSWB 0x40 +#define bRFSI_ANTSW 0x100 +#define bRFSI_ANTSWB 0x200 +#define bRFSI_PAPE 0x400 +#define bRFSI_PAPE5G 0x800 +#define bBandSelect 0x1 +#define bHTSIG2_GI 0x80 +#define bHTSIG2_Smoothing 0x01 +#define bHTSIG2_Sounding 0x02 +#define bHTSIG2_Aggreaton 0x08 +#define bHTSIG2_STBC 0x30 +#define bHTSIG2_AdvCoding 0x40 #define bHTSIG2_NumOfHTLTF 0x300 -#define bHTSIG2_CRC8 0x3fc -#define bHTSIG1_MCS 0x7f -#define bHTSIG1_BandWidth 0x80 -#define bHTSIG1_HTLength 0xffff -#define bLSIG_Rate 0xf -#define bLSIG_Reserved 0x10 -#define bLSIG_Length 0x1fffe -#define bLSIG_Parity 0x20 -#define bCCKRxPhase 0x4 -#define bLSSIReadAddress 0x3f000000 //LSSI "Read" Address -#define bLSSIReadEdge 0x80000000 //LSSI "Read" edge signal -#define bLSSIReadBackData 0xfff -#define bLSSIReadOKFlag 0x1000 -#define bCCKSampleRate 0x8 //0: 44MHz, 1:88MHz +#define bHTSIG2_CRC8 0x3fc +#define bHTSIG1_MCS 0x7f +#define bHTSIG1_BandWidth 0x80 +#define bHTSIG1_HTLength 0xffff +#define bLSIG_Rate 0xf +#define bLSIG_Reserved 0x10 +#define bLSIG_Length 0x1fffe +#define bLSIG_Parity 0x20 +#define bCCKRxPhase 0x4 +/* LSSI "read" address */ +#define bLSSIReadAddress 0x3f000000 +/* LSSI "read" edge signal */ +#define bLSSIReadEdge 0x80000000 +#define bLSSIReadBackData 0xfff +#define bLSSIReadOKFlag 0x1000 +/* 0: 44 MHz, 1: 88MHz */ +#define bCCKSampleRate 0x8 -#define bRegulator0Standby 0x1 -#define bRegulatorPLLStandby 0x2 -#define bRegulator1Standby 0x4 -#define bPLLPowerUp 0x8 -#define bDPLLPowerUp 0x10 -#define bDA10PowerUp 0x20 -#define bAD7PowerUp 0x200 -#define bDA6PowerUp 0x2000 -#define bXtalPowerUp 0x4000 -#define b40MDClkPowerUP 0x8000 -#define bDA6DebugMode 0x20000 -#define bDA6Swing 0x380000 -#define bADClkPhase 0x4000000 -#define b80MClkDelay 0x18000000 -#define bAFEWatchDogEnable 0x20000000 -#define bXtalCap 0x0f000000 -#define bXtalCap01 0xc0000000 -#define bXtalCap23 0x3 -#define bXtalCap92x 0x0f000000 -#define bIntDifClkEnable 0x400 -#define bExtSigClkEnable 0x800 +#define bRegulator0Standby 0x1 +#define bRegulatorPLLStandby 0x2 +#define bRegulator1Standby 0x4 +#define bPLLPowerUp 0x8 +#define bDPLLPowerUp 0x10 +#define bDA10PowerUp 0x20 +#define bAD7PowerUp 0x200 +#define bDA6PowerUp 0x2000 +#define bXtalPowerUp 0x4000 +#define b40MDClkPowerUP 0x8000 +#define bDA6DebugMode 0x20000 +#define bDA6Swing 0x380000 +#define bADClkPhase 0x4000000 +#define b80MClkDelay 0x18000000 +#define bAFEWatchDogEnable 0x20000000 +#define bXtalCap 0x0f000000 +#define bXtalCap01 0xc0000000 +#define bXtalCap23 0x3 +#define bXtalCap92x 0x0f000000 +#define bIntDifClkEnable 0x400 +#define bExtSigClkEnable 0x800 #define bBandgapMbiasPowerUp 0x10000 -#define bAD11SHGain 0xc0000 -#define bAD11InputRange 0x700000 -#define bAD11OPCurrent 0x3800000 -#define bIPathLoopback 0x4000000 -#define bQPathLoopback 0x8000000 -#define bAFELoopback 0x10000000 -#define bDA10Swing 0x7e0 -#define bDA10Reverse 0x800 -#define bDAClkSource 0x1000 -#define bAD7InputRange 0x6000 -#define bAD7Gain 0x38000 -#define bAD7OutputCMMode 0x40000 -#define bAD7InputCMMode 0x380000 -#define bAD7Current 0xc00000 -#define bRegulatorAdjust 0x7000000 -#define bAD11PowerUpAtTx 0x1 -#define bDA10PSAtTx 0x10 -#define bAD11PowerUpAtRx 0x100 -#define bDA10PSAtRx 0x1000 +#define bAD11SHGain 0xc0000 +#define bAD11InputRange 0x700000 +#define bAD11OPCurrent 0x3800000 +#define bIPathLoopback 0x4000000 +#define bQPathLoopback 0x8000000 +#define bAFELoopback 0x10000000 +#define bDA10Swing 0x7e0 +#define bDA10Reverse 0x800 +#define bDAClkSource 0x1000 +#define bAD7InputRange 0x6000 +#define bAD7Gain 0x38000 +#define bAD7OutputCMMode 0x40000 +#define bAD7InputCMMode 0x380000 +#define bAD7Current 0xc00000 +#define bRegulatorAdjust 0x7000000 +#define bAD11PowerUpAtTx 0x1 +#define bDA10PSAtTx 0x10 +#define bAD11PowerUpAtRx 0x100 +#define bDA10PSAtRx 0x1000 -#define bCCKRxAGCFormat 0x200 +#define bCCKRxAGCFormat 0x200 -#define bPSDFFTSamplepPoint 0xc000 -#define bPSDAverageNum 0x3000 -#define bIQPathControl 0xc00 -#define bPSDFreq 0x3ff -#define bPSDAntennaPath 0x30 -#define bPSDIQSwitch 0x40 -#define bPSDRxTrigger 0x400000 -#define bPSDTxTrigger 0x80000000 -#define bPSDSineToneScale 0x7f000000 -#define bPSDReport 0xffff +#define bPSDFFTSamplepPoint 0xc000 +#define bPSDAverageNum 0x3000 +#define bIQPathControl 0xc00 +#define bPSDFreq 0x3ff +#define bPSDAntennaPath 0x30 +#define bPSDIQSwitch 0x40 +#define bPSDRxTrigger 0x400000 +#define bPSDTxTrigger 0x80000000 +#define bPSDSineToneScale 0x7f000000 +#define bPSDReport 0xffff -//page-9 -#define bOFDMTxSC 0x30000000 -#define bCCKTxOn 0x1 -#define bOFDMTxOn 0x2 -#define bDebugPage 0xfff //reset debug page and also HWord, LWord -#define bDebugItem 0xff //reset debug page and LWord -#define bAntL 0x10 -#define bAntNonHT 0x100 -#define bAntHT1 0x1000 -#define bAntHT2 0x10000 -#define bAntHT1S1 0x100000 -#define bAntNonHTS1 0x1000000 +/* Page 8 */ +#define bOFDMTxSC 0x30000000 +#define bCCKTxOn 0x1 +#define bOFDMTxOn 0x2 +/* Reset debug page and also HWord, LWord */ +#define bDebugPage 0xfff +/* Reset debug page and LWord */ +#define bDebugItem 0xff +#define bAntL 0x10 +#define bAntNonHT 0x100 +#define bAntHT1 0x1000 +#define bAntHT2 0x10000 +#define bAntHT1S1 0x100000 +#define bAntNonHTS1 0x1000000 -//page-a -#define bCCKBBMode 0x3 -#define bCCKTxPowerSaving 0x80 -#define bCCKRxPowerSaving 0x40 -#define bCCKSideBand 0x10 -#define bCCKScramble 0x8 -#define bCCKAntDiversity 0x8000 +/* Page a */ +#define bCCKBBMode 0x3 +#define bCCKTxPowerSaving 0x80 +#define bCCKRxPowerSaving 0x40 +#define bCCKSideBand 0x10 +#define bCCKScramble 0x8 +#define bCCKAntDiversity 0x8000 #define bCCKCarrierRecovery 0x4000 -#define bCCKTxRate 0x3000 -#define bCCKDCCancel 0x0800 -#define bCCKISICancel 0x0400 -#define bCCKMatchFilter 0x0200 -#define bCCKEqualizer 0x0100 -#define bCCKPreambleDetect 0x800000 -#define bCCKFastFalseCCA 0x400000 -#define bCCKChEstStart 0x300000 -#define bCCKCCACount 0x080000 -#define bCCKcs_lim 0x070000 -#define bCCKBistMode 0x80000000 -#define bCCKCCAMask 0x40000000 +#define bCCKTxRate 0x3000 +#define bCCKDCCancel 0x0800 +#define bCCKISICancel 0x0400 +#define bCCKMatchFilter 0x0200 +#define bCCKEqualizer 0x0100 +#define bCCKPreambleDetect 0x800000 +#define bCCKFastFalseCCA 0x400000 +#define bCCKChEstStart 0x300000 +#define bCCKCCACount 0x080000 +#define bCCKcs_lim 0x070000 +#define bCCKBistMode 0x80000000 +#define bCCKCCAMask 0x40000000 #define bCCKTxDACPhase 0x4 -#define bCCKRxADCPhase 0x20000000 //r_rx_clk +/* r_rx_clk */ +#define bCCKRxADCPhase 0x20000000 #define bCCKr_cp_mode0 0x0100 -#define bCCKTxDCOffset 0xf0 -#define bCCKRxDCOffset 0xf -#define bCCKCCAMode 0xc000 -#define bCCKFalseCS_lim 0x3f00 -#define bCCKCS_ratio 0xc00000 -#define bCCKCorgBit_sel 0x300000 -#define bCCKPD_lim 0x0f0000 -#define bCCKNewCCA 0x80000000 -#define bCCKRxHPofIG 0x8000 -#define bCCKRxIG 0x7f00 -#define bCCKLNAPolarity 0x800000 -#define bCCKRx1stGain 0x7f0000 -#define bCCKRFExtend 0x20000000 //CCK Rx Iinital gain polarity -#define bCCKRxAGCSatLevel 0x1f000000 -#define bCCKRxAGCSatCount 0xe0 -#define bCCKRxRFSettle 0x1f //AGCsamp_dly -#define bCCKFixedRxAGC 0x8000 -//#define bCCKRxAGCFormat 0x4000 //remove to HSSI register 0x824 -#define bCCKAntennaPolarity 0x2000 -#define bCCKTxFilterType 0x0c00 +#define bCCKTxDCOffset 0xf0 +#define bCCKRxDCOffset 0xf +#define bCCKCCAMode 0xc000 +#define bCCKFalseCS_lim 0x3f00 +#define bCCKCS_ratio 0xc00000 +#define bCCKCorgBit_sel 0x300000 +#define bCCKPD_lim 0x0f0000 +#define bCCKNewCCA 0x80000000 +#define bCCKRxHPofIG 0x8000 +#define bCCKRxIG 0x7f00 +#define bCCKLNAPolarity 0x800000 +#define bCCKRx1stGain 0x7f0000 +/* CCK Rx Initial gain polarity */ +#define bCCKRFExtend 0x20000000 +#define bCCKRxAGCSatLevel 0x1f000000 +#define bCCKRxAGCSatCount 0xe0 +/* AGCSAmp_dly */ +#define bCCKRxRFSettle 0x1f +#define bCCKFixedRxAGC 0x8000 +/*#define bCCKRxAGCFormat 0x4000 remove to HSSI register 0x824 */ +#define bCCKAntennaPolarity 0x2000 +#define bCCKTxFilterType 0x0c00 #define bCCKRxAGCReportType 0x0300 -#define bCCKRxDAGCEn 0x80000000 -#define bCCKRxDAGCPeriod 0x20000000 +#define bCCKRxDAGCEn 0x80000000 +#define bCCKRxDAGCPeriod 0x20000000 #define bCCKRxDAGCSatLevel 0x1f000000 -#define bCCKTimingRecovery 0x800000 -#define bCCKTxC0 0x3f0000 -#define bCCKTxC1 0x3f000000 -#define bCCKTxC2 0x3f -#define bCCKTxC3 0x3f00 -#define bCCKTxC4 0x3f0000 -#define bCCKTxC5 0x3f000000 -#define bCCKTxC6 0x3f -#define bCCKTxC7 0x3f00 -#define bCCKDebugPort 0xff0000 -#define bCCKDACDebug 0x0f000000 -#define bCCKFalseAlarmEnable 0x8000 -#define bCCKFalseAlarmRead 0x4000 -#define bCCKTRSSI 0x7f -#define bCCKRxAGCReport 0xfe -#define bCCKRxReport_AntSel 0x80000000 -#define bCCKRxReport_MFOff 0x40000000 +#define bCCKTimingRecovery 0x800000 +#define bCCKTxC0 0x3f0000 +#define bCCKTxC1 0x3f000000 +#define bCCKTxC2 0x3f +#define bCCKTxC3 0x3f00 +#define bCCKTxC4 0x3f0000 +#define bCCKTxC5 0x3f000000 +#define bCCKTxC6 0x3f +#define bCCKTxC7 0x3f00 +#define bCCKDebugPort 0xff0000 +#define bCCKDACDebug 0x0f000000 +#define bCCKFalseAlarmEnable 0x8000 +#define bCCKFalseAlarmRead 0x4000 +#define bCCKTRSSI 0x7f +#define bCCKRxAGCReport 0xfe +#define bCCKRxReport_AntSel 0x80000000 +#define bCCKRxReport_MFOff 0x40000000 #define bCCKRxRxReport_SQLoss 0x20000000 -#define bCCKRxReport_Pktloss 0x10000000 +#define bCCKRxReport_Pktloss 0x10000000 #define bCCKRxReport_Lockedbit 0x08000000 #define bCCKRxReport_RateError 0x04000000 -#define bCCKRxReport_RxRate 0x03000000 +#define bCCKRxReport_RxRate 0x03000000 #define bCCKRxFACounterLower 0xff #define bCCKRxFACounterUpper 0xff000000 -#define bCCKRxHPAGCStart 0xe000 -#define bCCKRxHPAGCFinal 0x1c00 +#define bCCKRxHPAGCStart 0xe000 +#define bCCKRxHPAGCFinal 0x1c00 #define bCCKRxFalseAlarmEnable 0x8000 -#define bCCKFACounterFreeze 0x4000 +#define bCCKFACounterFreeze 0x4000 -#define bCCKTxPathSel 0x10000000 -#define bCCKDefaultRxPath 0xc000000 -#define bCCKOptionRxPath 0x3000000 +#define bCCKTxPathSel 0x10000000 +#define bCCKDefaultRxPath 0xc000000 +#define bCCKOptionRxPath 0x3000000 -//page c -#define bNumOfSTF 0x3 -#define bShift_L 0xc0 -#define bGI_TH 0xc -#define bRxPathA 0x1 -#define bRxPathB 0x2 -#define bRxPathC 0x4 -#define bRxPathD 0x8 -#define bTxPathA 0x1 -#define bTxPathB 0x2 -#define bTxPathC 0x4 -#define bTxPathD 0x8 -#define bTRSSIFreq 0x200 -#define bADCBackoff 0x3000 -#define bDFIRBackoff 0xc000 -#define bTRSSILatchPhase 0x10000 -#define bRxIDCOffset 0xff -#define bRxQDCOffset 0xff00 -#define bRxDFIRMode 0x1800000 -#define bRxDCNFType 0xe000000 -#define bRXIQImb_A 0x3ff -#define bRXIQImb_B 0xfc00 -#define bRXIQImb_C 0x3f0000 -#define bRXIQImb_D 0xffc00000 -#define bDC_dc_Notch 0x60000 -#define bRxNBINotch 0x1f000000 -#define bPD_TH 0xf -#define bPD_TH_Opt2 0xc000 -#define bPWED_TH 0x700 -#define bIfMF_Win_L 0x800 -#define bPD_Option 0x1000 -#define bMF_Win_L 0xe000 -#define bBW_Search_L 0x30000 -#define bwin_enh_L 0xc0000 -#define bBW_TH 0x700000 -#define bED_TH2 0x3800000 -#define bBW_option 0x4000000 -#define bRatio_TH 0x18000000 -#define bWindow_L 0xe0000000 -#define bSBD_Option 0x1 -#define bFrame_TH 0x1c -#define bFS_Option 0x60 -#define bDC_Slope_check 0x80 -#define bFGuard_Counter_DC_L 0xe00 -#define bFrame_Weight_Short 0x7000 -#define bSub_Tune 0xe00000 -#define bFrame_DC_Length 0xe000000 -#define bSBD_start_offset 0x30000000 -#define bFrame_TH_2 0x7 -#define bFrame_GI2_TH 0x38 -#define bGI2_Sync_en 0x40 -#define bSarch_Short_Early 0x300 -#define bSarch_Short_Late 0xc00 -#define bSarch_GI2_Late 0x70000 -#define bCFOAntSum 0x1 -#define bCFOAcc 0x2 -#define bCFOStartOffset 0xc -#define bCFOLookBack 0x70 -#define bCFOSumWeight 0x80 -#define bDAGCEnable 0x10000 -#define bTXIQImb_A 0x3ff -#define bTXIQImb_B 0xfc00 -#define bTXIQImb_C 0x3f0000 -#define bTXIQImb_D 0xffc00000 -#define bTxIDCOffset 0xff -#define bTxQDCOffset 0xff00 -#define bTxDFIRMode 0x10000 -#define bTxPesudoNoiseOn 0x4000000 -#define bTxPesudoNoise_A 0xff -#define bTxPesudoNoise_B 0xff00 -#define bTxPesudoNoise_C 0xff0000 -#define bTxPesudoNoise_D 0xff000000 -#define bCCADropOption 0x20000 -#define bCCADropThres 0xfff00000 -#define bEDCCA_H 0xf -#define bEDCCA_L 0xf0 -#define bLambda_ED 0x300 -#define bRxInitialGain 0x7f -#define bRxAntDivEn 0x80 -#define bRxAGCAddressForLNA 0x7f00 -#define bRxHighPowerFlow 0x8000 -#define bRxAGCFreezeThres 0xc0000 -#define bRxFreezeStep_AGC1 0x300000 -#define bRxFreezeStep_AGC2 0xc00000 -#define bRxFreezeStep_AGC3 0x3000000 -#define bRxFreezeStep_AGC0 0xc000000 -#define bRxRssi_Cmp_En 0x10000000 -#define bRxQuickAGCEn 0x20000000 -#define bRxAGCFreezeThresMode 0x40000000 -#define bRxOverFlowCheckType 0x80000000 -#define bRxAGCShift 0x7f -#define bTRSW_Tri_Only 0x80 -#define bPowerThres 0x300 -#define bRxAGCEn 0x1 -#define bRxAGCTogetherEn 0x2 -#define bRxAGCMin 0x4 -#define bRxHP_Ini 0x7 -#define bRxHP_TRLNA 0x70 -#define bRxHP_RSSI 0x700 -#define bRxHP_BBP1 0x7000 -#define bRxHP_BBP2 0x70000 -#define bRxHP_BBP3 0x700000 -#define bRSSI_H 0x7f0000 //the threshold for high power -#define bRSSI_Gen 0x7f000000 //the threshold for ant diversity -#define bRxSettle_TRSW 0x7 -#define bRxSettle_LNA 0x38 -#define bRxSettle_RSSI 0x1c0 -#define bRxSettle_BBP 0xe00 -#define bRxSettle_RxHP 0x7000 -#define bRxSettle_AntSW_RSSI 0x38000 -#define bRxSettle_AntSW 0xc0000 -#define bRxProcessTime_DAGC 0x300000 -#define bRxSettle_HSSI 0x400000 -#define bRxProcessTime_BBPPW 0x800000 -#define bRxAntennaPowerShift 0x3000000 -#define bRSSITableSelect 0xc000000 -#define bRxHP_Final 0x7000000 -#define bRxHTSettle_BBP 0x7 -#define bRxHTSettle_HSSI 0x8 -#define bRxHTSettle_RxHP 0x70 -#define bRxHTSettle_BBPPW 0x80 -#define bRxHTSettle_Idle 0x300 -#define bRxHTSettle_Reserved 0x1c00 -#define bRxHTRxHPEn 0x8000 -#define bRxHTAGCFreezeThres 0x30000 -#define bRxHTAGCTogetherEn 0x40000 -#define bRxHTAGCMin 0x80000 -#define bRxHTAGCEn 0x100000 -#define bRxHTDAGCEn 0x200000 -#define bRxHTRxHP_BBP 0x1c00000 -#define bRxHTRxHP_Final 0xe0000000 -#define bRxPWRatioTH 0x3 -#define bRxPWRatioEn 0x4 -#define bRxMFHold 0x3800 -#define bRxPD_Delay_TH1 0x38 -#define bRxPD_Delay_TH2 0x1c0 -#define bRxPD_DC_COUNT_MAX 0x600 -//#define bRxMF_Hold 0x3800 +/* Page c */ +#define bNumOfSTF 0x3 +#define bShift_L 0xc0 +#define bGI_TH 0xc +#define bRxPathA 0x1 +#define bRxPathB 0x2 +#define bRxPathC 0x4 +#define bRxPathD 0x8 +#define bTxPathA 0x1 +#define bTxPathB 0x2 +#define bTxPathC 0x4 +#define bTxPathD 0x8 +#define bTRSSIFreq 0x200 +#define bADCBackoff 0x3000 +#define bDFIRBackoff 0xc000 +#define bTRSSILatchPhase 0x10000 +#define bRxIDCOffset 0xff +#define bRxQDCOffset 0xff00 +#define bRxDFIRMode 0x1800000 +#define bRxDCNFType 0xe000000 +#define bRXIQImb_A 0x3ff +#define bRXIQImb_B 0xfc00 +#define bRXIQImb_C 0x3f0000 +#define bRXIQImb_D 0xffc00000 +#define bDC_dc_Notch 0x60000 +#define bRxNBINotch 0x1f000000 +#define bPD_TH 0xf +#define bPD_TH_Opt2 0xc000 +#define bPWED_TH 0x700 +#define bIfMF_Win_L 0x800 +#define bPD_Option 0x1000 +#define bMF_Win_L 0xe000 +#define bBW_Search_L 0x30000 +#define bwin_enh_L 0xc0000 +#define bBW_TH 0x700000 +#define bED_TH2 0x3800000 +#define bBW_option 0x4000000 +#define bRatio_TH 0x18000000 +#define bWindow_L 0xe0000000 +#define bSBD_Option 0x1 +#define bFrame_TH 0x1c +#define bFS_Option 0x60 +#define bDC_Slope_check 0x80 +#define bFGuard_Counter_DC_L 0xe00 +#define bFrame_Weight_Short 0x7000 +#define bSub_Tune 0xe00000 +#define bFrame_DC_Length 0xe000000 +#define bSBD_start_offset 0x30000000 +#define bFrame_TH_2 0x7 +#define bFrame_GI2_TH 0x38 +#define bGI2_Sync_en 0x40 +#define bSarch_Short_Early 0x300 +#define bSarch_Short_Late 0xc00 +#define bSarch_GI2_Late 0x70000 +#define bCFOAntSum 0x1 +#define bCFOAcc 0x2 +#define bCFOStartOffset 0xc +#define bCFOLookBack 0x70 +#define bCFOSumWeight 0x80 +#define bDAGCEnable 0x10000 +#define bTXIQImb_A 0x3ff +#define bTXIQImb_B 0xfc00 +#define bTXIQImb_C 0x3f0000 +#define bTXIQImb_D 0xffc00000 +#define bTxIDCOffset 0xff +#define bTxQDCOffset 0xff00 +#define bTxDFIRMode 0x10000 +#define bTxPesudoNoiseOn 0x4000000 +#define bTxPesudoNoise_A 0xff +#define bTxPesudoNoise_B 0xff00 +#define bTxPesudoNoise_C 0xff0000 +#define bTxPesudoNoise_D 0xff000000 +#define bCCADropOption 0x20000 +#define bCCADropThres 0xfff00000 +#define bEDCCA_H 0xf +#define bEDCCA_L 0xf0 +#define bLambda_ED 0x300 +#define bRxInitialGain 0x7f +#define bRxAntDivEn 0x80 +#define bRxAGCAddressForLNA 0x7f00 +#define bRxHighPowerFlow 0x8000 +#define bRxAGCFreezeThres 0xc0000 +#define bRxFreezeStep_AGC1 0x300000 +#define bRxFreezeStep_AGC2 0xc00000 +#define bRxFreezeStep_AGC3 0x3000000 +#define bRxFreezeStep_AGC0 0xc000000 +#define bRxRssi_Cmp_En 0x10000000 +#define bRxQuickAGCEn 0x20000000 +#define bRxAGCFreezeThresMode 0x40000000 +#define bRxOverFlowCheckType 0x80000000 +#define bRxAGCShift 0x7f +#define bTRSW_Tri_Only 0x80 +#define bPowerThres 0x300 +#define bRxAGCEn 0x1 +#define bRxAGCTogetherEn 0x2 +#define bRxAGCMin 0x4 +#define bRxHP_Ini 0x7 +#define bRxHP_TRLNA 0x70 +#define bRxHP_RSSI 0x700 +#define bRxHP_BBP1 0x7000 +#define bRxHP_BBP2 0x70000 +#define bRxHP_BBP3 0x700000 +/* The threshold for high power */ +#define bRSSI_H 0x7f0000 +/* The threshold for ant diversity */ +#define bRSSI_Gen 0x7f000000 +#define bRxSettle_TRSW 0x7 +#define bRxSettle_LNA 0x38 +#define bRxSettle_RSSI 0x1c0 +#define bRxSettle_BBP 0xe00 +#define bRxSettle_RxHP 0x7000 +#define bRxSettle_AntSW_RSSI 0x38000 +#define bRxSettle_AntSW 0xc0000 +#define bRxProcessTime_DAGC 0x300000 +#define bRxSettle_HSSI 0x400000 +#define bRxProcessTime_BBPPW 0x800000 +#define bRxAntennaPowerShift 0x3000000 +#define bRSSITableSelect 0xc000000 +#define bRxHP_Final 0x7000000 +#define bRxHTSettle_BBP 0x7 +#define bRxHTSettle_HSSI 0x8 +#define bRxHTSettle_RxHP 0x70 +#define bRxHTSettle_BBPPW 0x80 +#define bRxHTSettle_Idle 0x300 +#define bRxHTSettle_Reserved 0x1c00 +#define bRxHTRxHPEn 0x8000 +#define bRxHTAGCFreezeThres 0x30000 +#define bRxHTAGCTogetherEn 0x40000 +#define bRxHTAGCMin 0x80000 +#define bRxHTAGCEn 0x100000 +#define bRxHTDAGCEn 0x200000 +#define bRxHTRxHP_BBP 0x1c00000 +#define bRxHTRxHP_Final 0xe0000000 +#define bRxPWRatioTH 0x3 +#define bRxPWRatioEn 0x4 +#define bRxMFHold 0x3800 +#define bRxPD_Delay_TH1 0x38 +#define bRxPD_Delay_TH2 0x1c0 +#define bRxPD_DC_COUNT_MAX 0x600 +/*#define bRxMF_Hold 0x3800*/ #define bRxPD_Delay_TH 0x8000 #define bRxProcess_Delay 0xf0000 #define bRxSearchrange_GI2_Early 0x700000 @@ -661,7 +692,7 @@ #define bExtLNAGain 0x7c00 -//page d +/* Page d */ #define bSTBCEn 0x4 #define bAntennaMapping 0x10 #define bNss 0x20 @@ -671,12 +702,12 @@ #define bOFDMContinueTx 0x10000000 #define bOFDMSingleCarrier 0x20000000 #define bOFDMSingleTone 0x40000000 -//#define bRxPath1 0x01 -//#define bRxPath2 0x02 -//#define bRxPath3 0x04 -//#define bRxPath4 0x08 -//#define bTxPath1 0x10 -//#define bTxPath2 0x20 +/*#define bRxPath1 0x01 +#define bRxPath2 0x02 +#define bRxPath3 0x04 +#define bRxPath4 0x08 +#define bTxPath1 0x10 +#define bTxPath2 0x20*/ #define bHTDetect 0x100 #define bCFOEn 0x10000 #define bCFOValue 0xfff00000 @@ -689,8 +720,10 @@ #define bCounter_MCSNoSupport 0xffff #define bCounter_FastSync 0xffff #define bShortCFO 0xfff -#define bShortCFOTLength 12 //total -#define bShortCFOFLength 11 //fraction +/* total */ +#define bShortCFOTLength 12 +/* fraction */ +#define bShortCFOFLength 11 #define bLongCFO 0x7ff #define bLongCFOTLength 11 #define bLongCFOFLength 11 @@ -767,18 +800,18 @@ #define bUChCfg 0x7000000 #define bUpdEqz 0x8000000 -//page e -#define bTxAGCRate18_06 0x7f7f7f7f -#define bTxAGCRate54_24 0x7f7f7f7f +/* Page e */ +#define bTxAGCRate18_06 0x7f7f7f7f +#define bTxAGCRate54_24 0x7f7f7f7f #define bTxAGCRateMCS32 0x7f -#define bTxAGCRateCCK 0x7f00 +#define bTxAGCRateCCK 0x7f00 #define bTxAGCRateMCS3_MCS0 0x7f7f7f7f #define bTxAGCRateMCS7_MCS4 0x7f7f7f7f #define bTxAGCRateMCS11_MCS8 0x7f7f7f7f #define bTxAGCRateMCS15_MCS12 0x7f7f7f7f -//Rx Pseduo noise +/* Rx Pseduo noise */ #define bRxPesudoNoiseOn 0x20000000 #define bRxPesudoNoise_A 0xff #define bRxPesudoNoise_B 0xff00 @@ -789,8 +822,7 @@ #define bPesudoNoiseState_C 0xffff #define bPesudoNoiseState_D 0xffff0000 -//RF -//Zebra1 +/* RF Zebra 1 */ #define bZebra1_HSSIEnable 0x8 #define bZebra1_TRxControl 0xc00 #define bZebra1_TRxGainSetting 0x07f @@ -801,7 +833,7 @@ #define bZebra1_TxLPFBW 0x400 #define bZebra1_RxLPFBW 0x600 -//Zebra4 +/* Zebra4 */ #define bRTL8256RegModeCtrl1 0x100 #define bRTL8256RegModeCtrl0 0x40 #define bRTL8256_TxLPFBW 0x18 @@ -812,7 +844,7 @@ #define bRTL8258_RxLPFBW 0xc00 #define bRTL8258_RSSILPFBW 0xc0 -//byte endable for sb_write +/* byte endable for sb_write */ #define bByte0 0x1 #define bByte1 0x2 #define bByte2 0x4 @@ -821,7 +853,7 @@ #define bWord1 0xc #define bDWord 0xf -//for PutRegsetting & GetRegSetting BitMask +/* for PutRegsetting & GetRegSetting BitMask */ #define bMaskByte0 0xff #define bMaskByte1 0xff00 #define bMaskByte2 0xff0000 @@ -830,7 +862,7 @@ #define bMaskLWord 0x0000ffff #define bMaskDWord 0xffffffff -//for PutRFRegsetting & GetRFRegSetting BitMask +/* for PutRFRegsetting & GetRFRegSetting BitMask */ #define bMask12Bits 0xfff #define bEnable 0x1 @@ -839,14 +871,16 @@ #define LeftAntenna 0x0 #define RightAntenna 0x1 -#define tCheckTxStatus 500 //500ms -#define tUpdateRxCounter 100 //100ms +/* 500 ms */ +#define tCheckTxStatus 500 +/* 100 ms */ +#define tUpdateRxCounter 100 #define rateCCK 0 #define rateOFDM 1 #define rateHT 2 -//define Register-End +/* define Register-End */ #define bPMAC_End 0x1ff #define bFPGAPHY0_End 0x8ff #define bFPGAPHY1_End 0x9ff @@ -854,12 +888,12 @@ #define bOFDMPHY0_End 0xcff #define bOFDMPHY1_End 0xdff -//define max debug item in each debug page -//#define bMaxItem_FPGA_PHY0 0x9 -//#define bMaxItem_FPGA_PHY1 0x3 -//#define bMaxItem_PHY_11B 0x16 -//#define bMaxItem_OFDM_PHY0 0x29 -//#define bMaxItem_OFDM_PHY1 0x0 +/*#define max debug item in each debug page +#define bMaxItem_FPGA_PHY0 0x9 +#define bMaxItem_FPGA_PHY1 0x3 +#define bMaxItem_PHY_11B 0x16 +#define bMaxItem_OFDM_PHY0 0x29 +#define bMaxItem_OFDM_PHY1 0x0 */ #define bPMACControl 0x0 #define bWMACControl 0x1 @@ -870,12 +904,12 @@ #define PathC 0x2 #define PathD 0x3 -#define rRTL8256RxMixerPole 0xb -#define bZebraRxMixerPole 0x6 -#define rRTL8256TxBBOPBias 0x9 -#define bRTL8256TxBBOPBias 0x400 -#define rRTL8256TxBBBW 19 -#define bRTL8256TxBBBW 0x18 +#define rRTL8256RxMixerPole 0xb +#define bZebraRxMixerPole 0x6 +#define rRTL8256TxBBOPBias 0x9 +#define bRTL8256TxBBOPBias 0x400 +#define rRTL8256TxBBBW 19 +#define bRTL8256TxBBBW 0x18 -#endif //__INC_HAL8190PCIPHYREG_H +#endif /* __INC_HAL8190PCIPHYREG_H */ From 4db3d5e4e7fce813648215d99fdc5d0fcb73128c Mon Sep 17 00:00:00 2001 From: Radu Voicilas Date: Mon, 7 Dec 2009 18:20:08 -0800 Subject: [PATCH 041/367] Staging: rtl8192e: Code style fixes for r819xE_phy.h Signed-off-by: Radu Voicilas Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192e/r819xE_phy.h | 190 +++++++++++++++----------- 1 file changed, 114 insertions(+), 76 deletions(-) diff --git a/drivers/staging/rtl8192e/r819xE_phy.h b/drivers/staging/rtl8192e/r819xE_phy.h index fa77abe88827..41e0d777eabd 100644 --- a/drivers/staging/rtl8192e/r819xE_phy.h +++ b/drivers/staging/rtl8192e/r819xE_phy.h @@ -1,43 +1,46 @@ #ifndef _R819XU_PHY_H #define _R819XU_PHY_H -/* Channel switch:The size of command tables for switch channel*/ + +/* Channel switch: the size of command tables for switch channel */ #define MAX_PRECMD_CNT 16 #define MAX_RFDEPENDCMD_CNT 16 #define MAX_POSTCMD_CNT 16 #ifdef RTL8190P #define MACPHY_Array_PGLength 21 -#define Rtl819XMACPHY_Array_PG Rtl8190PciMACPHY_Array_PG -#define Rtl819XMACPHY_Array Rtl8190PciMACPHY_Array +#define Rtl819XMACPHY_Array_PG Rtl8190PciMACPHY_Array_PG +#define Rtl819XMACPHY_Array Rtl8190PciMACPHY_Array #define RadioC_ArrayLength 246 #define RadioD_ArrayLength 78 -#define Rtl819XRadioA_Array Rtl8190PciRadioA_Array -#define Rtl819XRadioB_Array Rtl8190PciRadioB_Array -#define Rtl819XRadioC_Array Rtl8190PciRadioC_Array -#define Rtl819XRadioD_Array Rtl8190PciRadioD_Array -#define Rtl819XAGCTAB_Array Rtl8190PciAGCTAB_Array -#define PHY_REGArrayLength 280 -#define Rtl819XPHY_REGArray Rtl8190PciPHY_REGArray -#define PHY_REG_1T2RArrayLength 280 -#define Rtl819XPHY_REG_1T2RArray Rtl8190PciPHY_REG_1T2RArray +#define Rtl819XRadioA_Array Rtl8190PciRadioA_Array +#define Rtl819XRadioB_Array Rtl8190PciRadioB_Array +#define Rtl819XRadioC_Array Rtl8190PciRadioC_Array +#define Rtl819XRadioD_Array Rtl8190PciRadioD_Array +#define Rtl819XAGCTAB_Array Rtl8190PciAGCTAB_Array +#define PHY_REGArrayLength 280 +#define Rtl819XPHY_REGArray Rtl8190PciPHY_REGArray +#define PHY_REG_1T2RArrayLength 280 +#define Rtl819XPHY_REG_1T2RArray Rtl8190PciPHY_REG_1T2RArray +#endif + + +#ifdef RTL8192E +#define MACPHY_Array_PGLength 30 +#define Rtl819XMACPHY_Array_PG Rtl8192PciEMACPHY_Array_PG +#define Rtl819XMACPHY_Array Rtl8192PciEMACPHY_Array +#define RadioC_ArrayLength 1 +#define RadioD_ArrayLength 1 +#define Rtl819XRadioA_Array Rtl8192PciERadioA_Array +#define Rtl819XRadioB_Array Rtl8192PciERadioB_Array +#define Rtl819XRadioC_Array Rtl8192PciERadioC_Array +#define Rtl819XRadioD_Array Rtl8192PciERadioD_Array +#define Rtl819XAGCTAB_Array Rtl8192PciEAGCTAB_Array +#define PHY_REGArrayLength 1 +#define Rtl819XPHY_REGArray Rtl8192PciEPHY_REGArray +#define PHY_REG_1T2RArrayLength 296 +#define Rtl819XPHY_REG_1T2RArray Rtl8192PciEPHY_REG_1T2RArray #endif - #ifdef RTL8192E - #define MACPHY_Array_PGLength 30 - #define Rtl819XMACPHY_Array_PG Rtl8192PciEMACPHY_Array_PG - #define Rtl819XMACPHY_Array Rtl8192PciEMACPHY_Array - #define RadioC_ArrayLength 1 - #define RadioD_ArrayLength 1 - #define Rtl819XRadioA_Array Rtl8192PciERadioA_Array - #define Rtl819XRadioB_Array Rtl8192PciERadioB_Array - #define Rtl819XRadioC_Array Rtl8192PciERadioC_Array - #define Rtl819XRadioD_Array Rtl8192PciERadioD_Array - #define Rtl819XAGCTAB_Array Rtl8192PciEAGCTAB_Array - #define PHY_REGArrayLength 1 - #define Rtl819XPHY_REGArray Rtl8192PciEPHY_REGArray - #define PHY_REG_1T2RArrayLength 296 - #define Rtl819XPHY_REG_1T2RArray Rtl8192PciEPHY_REG_1T2RArray - #endif #define AGCTAB_ArrayLength 384 #define MACPHY_ArrayLength 18 @@ -45,7 +48,7 @@ #define RadioB_ArrayLength 78 -typedef enum _SwChnlCmdID{ +typedef enum _SwChnlCmdID { CmdID_End, CmdID_SetTxPowerLevel, CmdID_BBRegWrite10, @@ -53,16 +56,15 @@ typedef enum _SwChnlCmdID{ CmdID_WritePortUshort, CmdID_WritePortUchar, CmdID_RF_WriteReg, -}SwChnlCmdID; +} SwChnlCmdID; -/*--------------------------------Define structure--------------------------------*/ -/* 1. Switch channel related */ -typedef struct _SwChnlCmd{ - SwChnlCmdID CmdID; - u32 Para1; - u32 Para2; - u32 msDelay; -}__attribute__ ((packed)) SwChnlCmd; +/* switch channel data structure */ +typedef struct _SwChnlCmd { + SwChnlCmdID CmdID; + u32 Para1; + u32 Para2; + u32 msDelay; +} __attribute__ ((packed)) SwChnlCmd; extern u32 rtl819XMACPHY_Array_PG[]; extern u32 rtl819XPHY_REG_1T2RArray[]; @@ -72,54 +74,90 @@ extern u32 rtl819XRadioB_Array[]; extern u32 rtl819XRadioC_Array[]; extern u32 rtl819XRadioD_Array[]; -typedef enum _HW90_BLOCK{ +typedef enum _HW90_BLOCK { HW90_BLOCK_MAC = 0, HW90_BLOCK_PHY0 = 1, HW90_BLOCK_PHY1 = 2, HW90_BLOCK_RF = 3, - HW90_BLOCK_MAXIMUM = 4, // Never use this -}HW90_BLOCK_E, *PHW90_BLOCK_E; + /* Don't ever use this. */ + HW90_BLOCK_MAXIMUM = 4, +} HW90_BLOCK_E, *PHW90_BLOCK_E; -typedef enum _RF90_RADIO_PATH{ - RF90_PATH_A = 0, //Radio Path A - RF90_PATH_B = 1, //Radio Path B - RF90_PATH_C = 2, //Radio Path C - RF90_PATH_D = 3, //Radio Path D - RF90_PATH_MAX //Max RF number 92 support -}RF90_RADIO_PATH_E, *PRF90_RADIO_PATH_E; +typedef enum _RF90_RADIO_PATH { + /* Radio paths */ + RF90_PATH_A = 0, + RF90_PATH_B = 1, + RF90_PATH_C = 2, + RF90_PATH_D = 3, -#define bMaskByte0 0xff -#define bMaskByte1 0xff00 -#define bMaskByte2 0xff0000 -#define bMaskByte3 0xff000000 -#define bMaskHWord 0xffff0000 -#define bMaskLWord 0x0000ffff -#define bMaskDWord 0xffffffff + /* Max RF number 92 support */ + RF90_PATH_MAX +} RF90_RADIO_PATH_E, *PRF90_RADIO_PATH_E; + +#define bMaskByte0 0xff +#define bMaskByte1 0xff00 +#define bMaskByte2 0xff0000 +#define bMaskByte3 0xff000000 +#define bMaskHWord 0xffff0000 +#define bMaskLWord 0x0000ffff +#define bMaskDWord 0xffffffff + +/*extern u32 rtl8192_CalculateBitShift(u32 dwBitMask); + +extern u32 rtl8192_phy_RFSerialRead(struct net_device *dev, + RF90_RADIO_PATH_E eRFPath, u32 Offset); + +extern void rtl8192_phy_RFSerialWrite(struct net_device *dev, + RF90_RADIO_PATH_E eRFPath, u32 Offset, u32 Data); + +extern void rtl8192_InitBBRFRegDef(struct net_device *dev); + +extern RT_STATUS rtl8192_BB_Config_ParaFile(struct net_device *dev); */ + +extern u8 rtl8192_phy_CheckIsLegalRFPath(struct net_device *dev, u32 eRFPath); + +extern void rtl8192_setBBreg(struct net_device *dev, u32 dwRegAddr, + u32 dwBitMask, u32 dwData); + +extern u32 rtl8192_QueryBBReg(struct net_device *dev, u32 dwRegAddr, + u32 dwBitMask); + +extern void rtl8192_phy_SetRFReg(struct net_device *dev, + RF90_RADIO_PATH_E eRFPath, u32 RegAddr, + u32 BitMask, u32 Data); + +extern u32 rtl8192_phy_QueryRFReg(struct net_device *dev, + RF90_RADIO_PATH_E eRFPath, u32 RegAddr, u32 BitMask); + +extern void rtl8192_phy_configmac(struct net_device *dev); + +extern void rtl8192_phyConfigBB(struct net_device *dev, u8 ConfigType); + +extern RT_STATUS rtl8192_phy_checkBBAndRF(struct net_device *dev, + HW90_BLOCK_E CheckBlock, RF90_RADIO_PATH_E eRFPath); + +extern RT_STATUS rtl8192_BBConfig(struct net_device *dev); + +extern void rtl8192_phy_getTxPower(struct net_device *dev); + +extern void rtl8192_phy_setTxPower(struct net_device *dev, u8 channel); -//extern u32 rtl8192_CalculateBitShift(u32 dwBitMask); -extern u8 rtl8192_phy_CheckIsLegalRFPath(struct net_device* dev, u32 eRFPath); -extern void rtl8192_setBBreg(struct net_device* dev, u32 dwRegAddr, u32 dwBitMask, u32 dwData); -extern u32 rtl8192_QueryBBReg(struct net_device* dev, u32 dwRegAddr, u32 dwBitMask); -//extern u32 rtl8192_phy_RFSerialRead(struct net_device* dev, RF90_RADIO_PATH_E eRFPath, u32 Offset); -//extern void rtl8192_phy_RFSerialWrite(struct net_device* dev, RF90_RADIO_PATH_E eRFPath, u32 Offset, u32 Data); -extern void rtl8192_phy_SetRFReg(struct net_device* dev, RF90_RADIO_PATH_E eRFPath, u32 RegAddr, u32 BitMask, u32 Data); -extern u32 rtl8192_phy_QueryRFReg(struct net_device* dev, RF90_RADIO_PATH_E eRFPath, u32 RegAddr, u32 BitMask); -extern void rtl8192_phy_configmac(struct net_device* dev); -extern void rtl8192_phyConfigBB(struct net_device* dev, u8 ConfigType); -//extern void rtl8192_InitBBRFRegDef(struct net_device* dev); -extern RT_STATUS rtl8192_phy_checkBBAndRF(struct net_device* dev, HW90_BLOCK_E CheckBlock, RF90_RADIO_PATH_E eRFPath); -//extern RT_STATUS rtl8192_BB_Config_ParaFile(struct net_device* dev); -extern RT_STATUS rtl8192_BBConfig(struct net_device* dev); -extern void rtl8192_phy_getTxPower(struct net_device* dev); -extern void rtl8192_phy_setTxPower(struct net_device* dev, u8 channel); extern RT_STATUS rtl8192_phy_RFConfig(struct net_device* dev); -extern void rtl8192_phy_updateInitGain(struct net_device* dev); -extern u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device* dev, RF90_RADIO_PATH_E eRFPath); -extern u8 rtl8192_phy_SwChnl(struct net_device* dev, u8 channel); -extern void rtl8192_SetBWMode(struct net_device *dev, HT_CHANNEL_WIDTH Bandwidth, HT_EXTCHNL_OFFSET Offset); +extern void rtl8192_phy_updateInitGain(struct net_device* dev); + +extern u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device *dev, + RF90_RADIO_PATH_E eRFPath); + +extern u8 rtl8192_phy_SwChnl(struct net_device *dev, u8 channel); + +extern void rtl8192_SetBWMode(struct net_device *dev, + HT_CHANNEL_WIDTH Bandwidth, HT_EXTCHNL_OFFSET Offset); + extern void rtl8192_SwChnl_WorkItem(struct net_device *dev); + extern void rtl8192_SetBWModeWorkItem(struct net_device *dev); + extern void InitialGain819xPci(struct net_device *dev, u8 Operation); -#endif +#endif /* _R819XU_PHY_H */ From da94a755cabe96d2c00af2b1b1aff84307c437fe Mon Sep 17 00:00:00 2001 From: Radu Voicilas Date: Mon, 7 Dec 2009 18:20:09 -0800 Subject: [PATCH 042/367] Staging: rtl8192e: Small code fixes for r819xE_firmware.c Signed-off-by: Radu Voicilas Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192e/r819xE_firmware.c | 79 +++++++++++++--------- 1 file changed, 47 insertions(+), 32 deletions(-) diff --git a/drivers/staging/rtl8192e/r819xE_firmware.c b/drivers/staging/rtl8192e/r819xE_firmware.c index 1f9e413bcd49..e05ba1748d30 100644 --- a/drivers/staging/rtl8192e/r819xE_firmware.c +++ b/drivers/staging/rtl8192e/r819xE_firmware.c @@ -1,5 +1,5 @@ /* - * Procedure: Init boot code/firmware code/data session + * Procedure: Init boot code/firmware code/data session * * Description: This routine will intialize firmware. If any error occurs * during the initialization process, the routine shall terminate @@ -7,19 +7,21 @@ * NdisOpenFile only from MiniportInitialize. * * Arguments: The pointer of the adapter - + * * Returns: * NDIS_STATUS_FAILURE - the following initialization process * should be terminated * NDIS_STATUS_SUCCESS - if firmware initialization process * success */ + #include "r8192E.h" #include "r8192E_hw.h" + #include /* It should be double word alignment */ -#define GET_COMMAND_PACKET_FRAG_THRESHOLD(v) (4 * (v / 4) - 8) +#define GET_COMMAND_PACKET_FRAG_THRESHOLD(v) (4 * (v / 4) - 8) enum firmware_init_step { FW_INIT_STEP0_BOOT = 0, @@ -47,17 +49,17 @@ void firmware_init_param(struct net_device *dev) static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, u32 buffer_len) { - struct r8192_priv *priv = ieee80211_priv(dev); - bool rt_status = true; - u16 frag_threshold; - u16 frag_length, frag_offset = 0; - int i; + struct r8192_priv *priv = ieee80211_priv(dev); + bool rt_status = true; + u16 frag_threshold; + u16 frag_length, frag_offset = 0; + int i; - rt_firmware *pfirmware = priv->pFirmware; - struct sk_buff *skb; - unsigned char *seg_ptr; - cb_desc *tcb_desc; - u8 bLastIniPkt; + rt_firmware *pfirmware = priv->pFirmware; + struct sk_buff *skb; + unsigned char *seg_ptr; + cb_desc *tcb_desc; + u8 bLastIniPkt; firmware_init_param(dev); @@ -89,10 +91,17 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, * Transform from little endian to big endian and pending zero */ for (i = 0; i < frag_length; i += 4) { - *seg_ptr++ = ((i+0) < frag_length) ? code_virtual_address[i+3] : 0; - *seg_ptr++ = ((i+1) < frag_length) ? code_virtual_address[i+2] : 0; - *seg_ptr++ = ((i+2) < frag_length) ? code_virtual_address[i+1] : 0; - *seg_ptr++ = ((i+3) < frag_length) ? code_virtual_address[i+0] : 0; + *seg_ptr++ = ((i+0) < frag_length) ? \ + code_virtual_address[i+3] : 0; + + *seg_ptr++ = ((i+1) < frag_length) ? \ + code_virtual_address[i+2] : 0; + + *seg_ptr++ = ((i+2) < frag_length) ? \ + code_virtual_address[i+1] : 0; + + *seg_ptr++ = ((i+3) < frag_length) ? \ + code_virtual_address[i+0] : 0; } tcb_desc->txbuf_size = (u16)i; skb_put(skb, i); @@ -204,16 +213,16 @@ CPUCheckFirmwareReady_Fail: bool init_firmware(struct net_device *dev) { - struct r8192_priv *priv = ieee80211_priv(dev); - bool rt_status = TRUE; - u32 file_length = 0; - u8 *mapped_file = NULL; - u32 init_step = 0; - enum opt_rst_type rst_opt = OPT_SYSTEM_RESET; + struct r8192_priv *priv = ieee80211_priv(dev); + bool rt_status = true; + u32 file_length = 0; + u8 *mapped_file = NULL; + u32 init_step = 0; + enum opt_rst_type rst_opt = OPT_SYSTEM_RESET; enum firmware_init_step starting_state = FW_INIT_STEP0_BOOT; - rt_firmware *pfirmware = priv->pFirmware; - const struct firmware *fw_entry; + rt_firmware *pfirmware = priv->pFirmware; + const struct firmware *fw_entry; const char *fw_name[3] = { "RTL8192E/boot.img", "RTL8192E/main.img", "RTL8192E/data.img"}; @@ -240,31 +249,37 @@ bool init_firmware(struct net_device *dev) * Download boot, main, and data image for System reset. * Download data image for firmware reseta */ - for (init_step = starting_state; init_step <= FW_INIT_STEP2_DATA; init_step++) { + for (init_step = starting_state; init_step <= FW_INIT_STEP2_DATA; \ + init_step++) { /* * Open Image file, and map file to contineous memory if open file success. * or read image file from array. Default load from IMG file */ if (rst_opt == OPT_SYSTEM_RESET) { if (pfirmware->firmware_buf_size[init_step] == 0) { - rc = request_firmware(&fw_entry, fw_name[init_step], &priv->pdev->dev); + rc = request_firmware(&fw_entry, + fw_name[init_step], &priv->pdev->dev); + if (rc < 0) { RT_TRACE(COMP_FIRMWARE, "request firmware fail!\n"); goto download_firmware_fail; } if (fw_entry->size > sizeof(pfirmware->firmware_buf[init_step])) { - RT_TRACE(COMP_FIRMWARE, "img file size exceed the container buffer fail!\n"); + RT_TRACE(COMP_FIRMWARE, \ + "img file size exceed the container buffer fail!\n"); goto download_firmware_fail; } if (init_step != FW_INIT_STEP1_MAIN) { - memcpy(pfirmware->firmware_buf[init_step], fw_entry->data, fw_entry->size); + memcpy(pfirmware->firmware_buf[init_step], + fw_entry->data, fw_entry->size); pfirmware->firmware_buf_size[init_step] = fw_entry->size; } else { memset(pfirmware->firmware_buf[init_step], 0, 128); - memcpy(&pfirmware->firmware_buf[init_step][128], fw_entry->data, fw_entry->size); + memcpy(&pfirmware->firmware_buf[init_step][128], fw_entry->data, + fw_entry->size); pfirmware->firmware_buf_size[init_step] = fw_entry->size+128; } @@ -273,6 +288,7 @@ bool init_firmware(struct net_device *dev) } mapped_file = pfirmware->firmware_buf[init_step]; file_length = pfirmware->firmware_buf_size[init_step]; + } else if (rst_opt == OPT_FIRMWARE_RESET) { /* we only need to download data.img here */ mapped_file = pfirmware->firmware_buf[init_step]; @@ -346,7 +362,6 @@ bool init_firmware(struct net_device *dev) download_firmware_fail: RT_TRACE(COMP_ERR, "ERR in %s()\n", __func__); - rt_status = FALSE; + rt_status = false; return rt_status; - } From aa337ef1fbc9650f8b5b9087af1dac33f71eb01c Mon Sep 17 00:00:00 2001 From: Scott Smedley Date: Fri, 18 Dec 2009 10:54:26 -0800 Subject: [PATCH 043/367] Staging: add dt3155 driver This is a driver for the DT3155 Digitizer Signed-off-by: Scott Smedley Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dt3155/Makefile | 27 + drivers/staging/dt3155/allocator.README | 98 ++ drivers/staging/dt3155/allocator.c | 296 ++++++ drivers/staging/dt3155/allocator.h | 28 + drivers/staging/dt3155/dt3155.h | 175 ++++ drivers/staging/dt3155/dt3155.sysvinit | 60 ++ drivers/staging/dt3155/dt3155_drv.c | 1203 +++++++++++++++++++++++ drivers/staging/dt3155/dt3155_drv.h | 50 + drivers/staging/dt3155/dt3155_io.c | 236 +++++ drivers/staging/dt3155/dt3155_io.h | 400 ++++++++ drivers/staging/dt3155/dt3155_isr.c | 545 ++++++++++ drivers/staging/dt3155/dt3155_isr.h | 77 ++ drivers/staging/dt3155/pci-compat.h | 97 ++ drivers/staging/dt3155/sysdep.h | 820 +++++++++++++++ 14 files changed, 4112 insertions(+) create mode 100644 drivers/staging/dt3155/Makefile create mode 100644 drivers/staging/dt3155/allocator.README create mode 100644 drivers/staging/dt3155/allocator.c create mode 100644 drivers/staging/dt3155/allocator.h create mode 100644 drivers/staging/dt3155/dt3155.h create mode 100644 drivers/staging/dt3155/dt3155.sysvinit create mode 100644 drivers/staging/dt3155/dt3155_drv.c create mode 100644 drivers/staging/dt3155/dt3155_drv.h create mode 100644 drivers/staging/dt3155/dt3155_io.c create mode 100644 drivers/staging/dt3155/dt3155_io.h create mode 100644 drivers/staging/dt3155/dt3155_isr.c create mode 100644 drivers/staging/dt3155/dt3155_isr.h create mode 100644 drivers/staging/dt3155/pci-compat.h create mode 100644 drivers/staging/dt3155/sysdep.h diff --git a/drivers/staging/dt3155/Makefile b/drivers/staging/dt3155/Makefile new file mode 100644 index 000000000000..1717ffbf682f --- /dev/null +++ b/drivers/staging/dt3155/Makefile @@ -0,0 +1,27 @@ + +ifeq ($(shell [[ `uname -r | cut -f 1,2 -d\.` < 2.6 ]] && echo pre2.6),pre2.6) +# system with a pre 2.6 kernel _don't_ use kbuild. +all: + $(MAKE) -f Makefile.pre-2.6 + +clean: + rm -f *.o + +else +# systems with a 2.6 or later kernel use kbuild. +ifneq ($(KERNELRELEASE),) +obj-m := dt3155.o +dt3155-objs := dt3155_drv.o dt3155_isr.o dt3155_io.o allocator.o + +else +KDIR := /lib/modules/$(shell uname -r)/build +PWD := $(shell pwd) + +all: + $(MAKE) -C $(KDIR) M=$(PWD) modules + +clean: + rm -rf *.o *.mod *.mod.c *.ko .dt3155* .allocator.o.cmd .tmp_versions + +endif +endif diff --git a/drivers/staging/dt3155/allocator.README b/drivers/staging/dt3155/allocator.README new file mode 100644 index 000000000000..05700b6c926c --- /dev/null +++ b/drivers/staging/dt3155/allocator.README @@ -0,0 +1,98 @@ + +The allocator shown here exploits high memory. This document explains +how a user can deal with drivers uses this allocator and how a +programmer can link in the module. + +The module is being used by my pxc and pxdrv device drivers (as well as +other ones), available from ftp.systemy.it/pub/develop and +ftp.linux.it/pub/People/Rubini + + User's manual + ============= + + +One of the most compelling problems with any DMA-capable device is the +allocation of a suitable memory buffer. The "allocator" module tries +to deal with the problem in a clean way. The module is able to use +high memory (above the one used in normal operation) for DMA +allocation. + +To prevent the kernel for using high memory, so that it remains +available for DMA, you should pass a command line argument to the +kernel. Command line arguments can be passed to Lilo, to Loadlin or +to whichever loader you are using (unless it's very poor in design). +For Lilo, either use "append=" in /etc/lilo.conf or add commandline +arguments to the interactive prompt. For example, I have a 32MB box +and reserve two megs for DMA: + +In lilo.conf: + image = /zImage + label = linux + append = "mem=30M" + +Or, interactively: + LILO: linux mem=30M + +Once the kernel is booted with the right command-line argument, any +driver linked with the allocator module will be able to get +DMA-capable memory without much trouble (unless the various drivers +need more memory than available). + +The module implements an alloc/free mechanism, so that it can serve +multiple drivers at the same time. Note however that the allocator +uses all of high memory and assumes to be the only piece of software +using such memory. + + + Programmer's manual + =================== + +The allocator, as released, is designed to be linked to a device +driver. In this case, the driver must call allocator_init() before +using the allocator and must call allocator_cleanup() before +unloading. This is usually done from within init_module() and +cleanup_module(). If the allocator is linked to a driver, it won't be +possible for several drivers to allocate high DMA memory, as explained +above. + +It is possible, on the other hand, to compile the module as a standalone +module, so that several modules can rely on the allocator for they DMA +buffers. To compile the allocator as a standalone module, do the +following in this directory (or provide a suitable Makefile, or edit +the source code): + + make allocator.o CC="gcc -Dallocator_init=init_module -Dallocator_cleanup=cleanup_module -include /usr/include/linux/module.h" + +The previous commandline tells to include in the +first place, and to rename the init and cleanup function to the ones +needed for module loading and unloading. Drivers using a standalone +allocator won't need to call allocator_init() nor allocator_cleanup(). + +The allocator exports the following functions (declared in allocator.h): + + unsigned long allocator_allocate_dma (unsigned long kilobytes, + int priority); + + This function returns a physical address, over high_memory, + which corresponds to an area of at least "kilobytes" kilobytes. + The area will be owned by the module calling the function. + The returned address can be passed to device boards, to instruct + their DMA controllers, via phys_to_bus(). The address can be used + by C code after vremap()/ioremap(). The "priority" argument should + be GFP_KERNEL or GFP_ATOMIC, according to the context of the + caller; it is used to call kmalloc(), as the allocator must keep + track of any region it gives away. In case of error the function + returns 0, and the caller is expected to issue a -ENOMEM error. + + + void allocator_free_dma (unsigned long address); + + This function is the reverse of the previous one. If a driver + doesn't free the DMA memory it allocated, the allocator will + consider such memory as busy. Note, however, that + allocator_cleanup() calls kfree() on every region it reclaimed, + so that a driver with the allocator linked in can avoid calling + allocator_free_dma() at unload time. + + + diff --git a/drivers/staging/dt3155/allocator.c b/drivers/staging/dt3155/allocator.c new file mode 100644 index 000000000000..90429db1c5f7 --- /dev/null +++ b/drivers/staging/dt3155/allocator.c @@ -0,0 +1,296 @@ +/* + * allocator.c -- allocate after high_memory, if available + * + * NOTE: this is different from my previous allocator, the one that + * assembles pages, which revealed itself both slow and unreliable. + * + * Copyright (C) 1998 rubini@linux.it (Alessandro Rubini) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + +-- Changes -- + + Date Programmer Description of changes made + ------------------------------------------------------------------- + 02-Aug-2002 NJC allocator now steps in 1MB increments, rather + than doubling its size each time. + Also, allocator_init(u_int *) now returns + (in the first arg) the size of the free + space. This is no longer consistent with + using the allocator as a module, and some changes + may be necessary for that purpose. This was + designed to work with the DT3155 driver, in + stand alone mode only!!! + 26-Oct-2009 SS Port to 2.6.30 kernel. + */ + + +#ifndef __KERNEL__ +# define __KERNEL__ +#endif +#ifndef MODULE +# define MODULE +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include /* PAGE_ALIGN() */ + +#include + +#include "sysdep.h" + +/*#define ALL_DEBUG*/ +#define ALL_MSG "allocator: " + +#undef PDEBUG /* undef it, just in case */ +#ifdef ALL_DEBUG +# define __static +# define DUMP_LIST() dump_list() +# ifdef __KERNEL__ + /* This one if debugging is on, and kernel space */ +# define PDEBUG(fmt, args...) printk( KERN_DEBUG ALL_MSG fmt, ## args) +# else + /* This one for user space */ +# define PDEBUG(fmt, args...) fprintf(stderr, fmt, ## args) +# endif +#else +# define PDEBUG(fmt, args...) /* not debugging: nothing */ +# define DUMP_LIST() +# define __static static +#endif + +#undef PDEBUGG +#define PDEBUGG(fmt, args...) +/*#define PDEBUGG(fmt, args...) printk( KERN_DEBUG ALL_MSG fmt, ## args)*/ + + +int allocator_himem = 1; /* 0 = probe, pos. = megs, neg. = disable */ +int allocator_step = 1; /* This is the step size in MB */ +int allocator_probe = 1; /* This is a flag -- 1=probe, 0=don't probe */ + +static unsigned long allocator_buffer = 0; /* physical address */ +static unsigned long allocator_buffer_size = 0; /* kilobytes */ + +/* + * The allocator keeps a list of DMA areas, so multiple devices + * can coexist. The list is kept sorted by address + */ + +struct allocator_struct { + unsigned long address; + unsigned long size; + struct allocator_struct *next; +}; + +struct allocator_struct *allocator_list = NULL; + + +#ifdef ALL_DEBUG +static int dump_list(void) +{ + struct allocator_struct *ptr; + + PDEBUG("Current list:\n"); + for (ptr = allocator_list; ptr; ptr = ptr->next) { + PDEBUG("0x%08lx (size %likB)\n",ptr->address,ptr->size>>10); + } + return 0; +} +#endif + +/* ======================================================================== + * This function is the actual allocator. + * + * If space is available in high memory (as detected at load time), that + * one is returned. The return value is a physical address (i.e., it can + * be used straight ahead for DMA, but needs remapping for program use). + */ + +unsigned long allocator_allocate_dma (unsigned long kilobytes, int prio) +{ + struct allocator_struct *ptr = allocator_list, *newptr; + unsigned long bytes = kilobytes << 10; + + /* check if high memory is available */ + if (!allocator_buffer) + return 0; + + /* Round it to a multiple of the pagesize */ + bytes = PAGE_ALIGN(bytes); + PDEBUG("request for %li bytes\n", bytes); + + while (ptr && ptr->next) { + if (ptr->next->address - (ptr->address + ptr->size) >= bytes) + break; /* enough space */ + ptr = ptr->next; + } + if (!ptr->next) { + DUMP_LIST(); + PDEBUG("alloc failed\n"); + return 0; /* end of list */ + } + newptr = kmalloc(sizeof(struct allocator_struct),prio); + if (!newptr) + return 0; + + /* ok, now stick it after ptr */ + newptr->address = ptr->address + ptr->size; + newptr->size = bytes; + newptr->next = ptr->next; + ptr->next = newptr; + + DUMP_LIST(); + PDEBUG("returning 0x%08lx\n",newptr->address); + return newptr->address; +} + +int allocator_free_dma (unsigned long address) +{ + struct allocator_struct *ptr = allocator_list, *prev; + + while (ptr && ptr->next) { + if (ptr->next->address == address) + break; + ptr = ptr->next; + } + /* the one being freed is ptr->next */ + prev = ptr; ptr = ptr->next; + + if (!ptr) { + printk(KERN_ERR ALL_MSG "free_dma(0x%08lx) but add. not allocated\n", + ptr->address); + return -EINVAL; + } + PDEBUGG("freeing: %08lx (%li) next %08lx\n",ptr->address,ptr->size, + ptr->next->address); + prev->next = ptr->next; + kfree(ptr); + + /* dump_list(); */ + return 0; +} + +/* ======================================================================== + * Init and cleanup + * + * On cleanup everything is released. If the list is not empty, that a + * problem of our clients + */ +int allocator_init(u_long *allocator_max) +{ + /* check how much free memory is there */ + + volatile void *remapped; + unsigned long max; + unsigned long trial_size = allocator_himem<<20; + unsigned long last_trial = 0; + unsigned long step = allocator_step<<20; + unsigned long i=0; + struct allocator_struct *head, *tail; + char test_string[]="0123456789abcde"; /* 16 bytes */ + + PDEBUGG("himem = %i\n",allocator_himem); + if (allocator_himem < 0) /* don't even try */ + return -EINVAL; + + if (!trial_size) trial_size = 1<<20; /* not specified: try one meg */ + + while (1) { + remapped = ioremap(__pa(high_memory), trial_size); + if (!remapped) + { + PDEBUGG("%li megs failed!\n",trial_size>>20); + break; + } + PDEBUGG("Trying %li megs (at %p, %p)\n",trial_size>>20, + (void *)__pa(high_memory), remapped); + for (i=last_trial; i>20); + break; + } + if (!allocator_probe) break; + } + PDEBUG("%li megs (%li k, %li b)\n",i>>20,i>>10,i); + allocator_buffer_size = i>>10; /* kilobytes */ + allocator_buffer = __pa(high_memory); + if (!allocator_buffer_size) { + printk(KERN_WARNING ALL_MSG "no free high memory to use\n"); + return -ENOMEM; + } + + /* + * to simplify things, always have two cells in the list: + * the first and the last. This avoids some conditionals and + * extra code when allocating and deallocating: we only play + * in the middle of the list + */ + head = kmalloc(sizeof(struct allocator_struct),GFP_KERNEL); + if (!head) + return -ENOMEM; + tail = kmalloc(sizeof(struct allocator_struct),GFP_KERNEL); + if (!tail) { + kfree(head); + return -ENOMEM; + } + + max = allocator_buffer_size<<10; + + head->size = tail->size = 0; + head->address = allocator_buffer; + tail->address = allocator_buffer + max; + head->next = tail; + tail->next = NULL; + allocator_list = head; + + *allocator_max = allocator_buffer_size; /* Back to the user code, in KB */ + + return 0; /* ok, ready */ +} + +void allocator_cleanup(void) +{ + struct allocator_struct *ptr, *next; + + for (ptr = allocator_list; ptr; ptr = next) { + next = ptr->next; + PDEBUG("freeing list: 0x%08lx\n",ptr->address); + kfree(ptr); + } + + allocator_buffer = 0; + allocator_buffer_size = 0; + allocator_list = NULL; +} + + diff --git a/drivers/staging/dt3155/allocator.h b/drivers/staging/dt3155/allocator.h new file mode 100644 index 000000000000..ecc8680e7d45 --- /dev/null +++ b/drivers/staging/dt3155/allocator.h @@ -0,0 +1,28 @@ +/* + * allocator.h -- prototypes for allocating high memory + * + * NOTE: this is different from my previous allocator, the one that + * assembles pages, which revealed itself both slow and unreliable. + * + * Copyright (C) 1998 rubini@linux.it (Alessandro Rubini) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +void allocator_free_dma(unsigned long address); +unsigned long allocator_allocate_dma (unsigned long kilobytes, int priority); +int allocator_init(u_long *); +void allocator_cleanup(void); diff --git a/drivers/staging/dt3155/dt3155.h b/drivers/staging/dt3155/dt3155.h new file mode 100644 index 000000000000..2e158151a755 --- /dev/null +++ b/drivers/staging/dt3155/dt3155.h @@ -0,0 +1,175 @@ +/* + +Copyright 1996,2002,2005 Gregory D. Hager, Alfred A. Rizzi, Noah J. Cowan, + Jason Lapenta, Scott Smedley + +This file is part of the DT3155 Device Driver. + +The DT3155 Device Driver is free software; you can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The DT3155 Device Driver is distributed in the hope that it will be +useful, but WITHOUT ANY WARRANTY; without even the implied warranty +of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the DT3155 Device Driver; if not, write to the Free +Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, +MA 02111-1307 USA + + $Id: dt3155.h,v 1.11 2005/08/09 06:08:51 ssmedley Exp $ + +-- Changes -- + + Date Programmer Description of changes made + ------------------------------------------------------------------- + 03-Jul-2000 JML n/a + 10-Oct-2001 SS port to 2.4 kernel. + 24-Jul-2002 SS remove unused code & added GPL licence. + 05-Aug-2005 SS port to 2.6 kernel; make CCIR mode default. + +*/ + +#ifndef _DT3155_INC +#define _DT3155_INC + +#ifdef __KERNEL__ +#include /* u_int etc. */ +#include /* struct timeval */ +#else +#include +#include +#include +#include +#endif + + +#define TRUE 1 +#define FALSE 0 + +/* Uncomment this for 50Hz CCIR */ +#define CCIR 1 + +/* Can be 1 or 2 */ +#define MAXBOARDS 1 + +#define BOARD_MAX_BUFFS 3 +#define MAXBUFFERS BOARD_MAX_BUFFS*MAXBOARDS + +#define PCI_PAGE_SIZE (1 << 12) + +#ifdef CCIR +#define DT3155_MAX_ROWS 576 +#define DT3155_MAX_COLS 768 +#define FORMAT50HZ TRUE +#else +#define DT3155_MAX_ROWS 480 +#define DT3155_MAX_COLS 640 +#define FORMAT50HZ FALSE +#endif + +/* Configuration structure */ +struct dt3155_config_s { + u_int acq_mode; + u_int cols, rows; + u_int continuous; +}; + + +/* hold data for each frame */ +typedef struct +{ + u_long addr; /* address of the buffer with the frame */ + u_long tag; /* unique number for the frame */ + struct timeval time; /* time that capture took place */ +} frame_info_t; + +/* Structure for interrupt and buffer handling. */ +/* This is the setup for 1 card */ +struct dt3155_fbuffer_s { + int nbuffers; + + frame_info_t frame_info[ BOARD_MAX_BUFFS ]; + + int empty_buffers[ BOARD_MAX_BUFFS ]; /* indexes empty frames */ + int empty_len; /* Number of empty buffers */ + /* Zero means empty */ + + int active_buf; /* Where data is currently dma'ing */ + int locked_buf; /* Buffers used by user */ + + int ready_que[ BOARD_MAX_BUFFS ]; + u_long ready_head; /* The most recent buffer located here */ + u_long ready_len; /* The number of ready buffers */ + + int even_happened; + int even_stopped; + + int stop_acquire; /* Flag to stop interrupts */ + u_long frame_count; /* Counter for frames acquired by this card */ + +}; + + + +#define DT3155_MODE_FRAME 1 +#define DT3155_MODE_FIELD 2 + +#define DT3155_SNAP 1 +#define DT3155_ACQ 2 + +/* There is one status structure for each card. */ +typedef struct dt3155_status_s +{ + int fixed_mode; /* if 1, we are in fixed frame mode */ + u_long reg_addr; /* Register address for a single card */ + u_long mem_addr; /* Buffer start addr for this card */ + u_long mem_size; /* This is the amount of mem available */ + u_int irq; /* this card's irq */ + struct dt3155_config_s config; /* configuration struct */ + struct dt3155_fbuffer_s fbuffer;/* frame buffer state struct */ + u_long state; /* this card's state */ + u_int device_installed; /* Flag if installed. 1=installed */ +} dt3155_status_t; + +/* Reference to global status structure */ +extern struct dt3155_status_s dt3155_status[MAXBOARDS]; + +#define DT3155_STATE_IDLE 0x00 +#define DT3155_STATE_FRAME 0x01 +#define DT3155_STATE_FLD 0x02 +#define DT3155_STATE_STOP 0x100 +#define DT3155_STATE_ERROR 0x200 +#define DT3155_STATE_MODE 0x0ff + +#define DT3155_IOC_MAGIC '!' + +#define DT3155_SET_CONFIG _IOW( DT3155_IOC_MAGIC, 1, struct dt3155_config_s ) +#define DT3155_GET_CONFIG _IOR( DT3155_IOC_MAGIC, 2, struct dt3155_status_s ) +#define DT3155_STOP _IO( DT3155_IOC_MAGIC, 3 ) +#define DT3155_START _IO( DT3155_IOC_MAGIC, 4 ) +#define DT3155_FLUSH _IO( DT3155_IOC_MAGIC, 5 ) +#define DT3155_IOC_MAXNR 5 + +/* Error codes */ + +#define DT_ERR_NO_BUFFERS 0x10000 /* not used but it might be one day - SS */ +#define DT_ERR_CORRUPT 0x20000 +#define DT_ERR_OVERRUN 0x30000 +#define DT_ERR_I2C_TIMEOUT 0x40000 +#define DT_ERR_MASK 0xff0000/* not used but it might be one day - SS */ + +/* User code will probably want to declare one of these for each card */ +typedef struct dt3155_read_s +{ + u_long offset; + u_long frame_seq; + u_long state; + + frame_info_t frame_info; +} dt3155_read_t; + +#endif /* _DT3155_inc */ diff --git a/drivers/staging/dt3155/dt3155.sysvinit b/drivers/staging/dt3155/dt3155.sysvinit new file mode 100644 index 000000000000..92ec0939cb7a --- /dev/null +++ b/drivers/staging/dt3155/dt3155.sysvinit @@ -0,0 +1,60 @@ +#! /bin/sh +# +# Module load/unload script for use with SysV-style /etc/init.d/ systems. +# On a Debian system, copy this to /etc/init.d/dt3155 and then run +# /usr/sbin/update-rc.d dt3155 defaults 55 +# to create the appropriate /etc/rc?.d/[SK]55dt3155 start/stop links. +# (The "55" is arbitrary but is what I use to load this rather late.) +# +# Andy Dougherty Feb 22 2000 doughera@lafayette.edu +# Dept. of Physics +# Lafayette College, Easton PA 18042 +# + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin + +# Edit to point to your local copy. +FILE=/usr/local/lib/modules/dt3155/dt3155.o +NAME="dt3155" +DESC="dt3155 Frame Grabber module" +DEV="dt3155" + +if test ! -f $FILE; then + echo "Unable to locate $FILE" + exit 0 +fi + +set -e + +case "$1" in + start) + echo -n "Loading $DESC " + if /sbin/insmod -v -f $FILE; then + major=`grep $DEV /proc/devices | awk "{print \\$1}"` + rm -f /dev/dt3155? + mknod /dev/dt3155a c $major 0 + mknod /dev/dt3155b c $major 1 + chmod go+rw /dev/dt3155? + echo + else + echo "$FILE not loaded." + fi + ;; + stop) + echo -n "Unloading $DESC: " + if /sbin/rmmod $NAME ; then + echo + else + echo "$DEV not removed" + exit 0 + fi + rm -f /dev/dt3155? + ;; + *) + echo "Usage: /etc/init.d/$NAME {start|stop}" + exit 1 + ;; +esac + +exit 0 + diff --git a/drivers/staging/dt3155/dt3155_drv.c b/drivers/staging/dt3155/dt3155_drv.c new file mode 100644 index 000000000000..f3ae8e82d64e --- /dev/null +++ b/drivers/staging/dt3155/dt3155_drv.c @@ -0,0 +1,1203 @@ +/* + +Copyright 1996,2002,2005 Gregory D. Hager, Alfred A. Rizzi, Noah J. Cowan, + Jason Lapenta, Scott Smedley, Greg Sharp + +This file is part of the DT3155 Device Driver. + +The DT3155 Device Driver is free software; you can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The DT3155 Device Driver is distributed in the hope that it will be +useful, but WITHOUT ANY WARRANTY; without even the implied warranty +of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the DT3155 Device Driver; if not, write to the Free +Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, +MA 02111-1307 USA + +-- Changes -- + + Date Programmer Description of changes made + ------------------------------------------------------------------- + 03-Jul-2000 JML n/a + 10-Oct-2001 SS port to 2.4 kernel + 02-Apr-2002 SS Mods to use allocator as a standalone module; + Merged John Roll's changes (john@cfa.harvard.edu) + to make work with multiple boards. + 02-Jul-2002 SS Merged James Rose's chages (rosejr@purdue.edu) to: + * fix successive interrupt-driven captures + * add select/poll support. + 10-Jul-2002 GCS Add error check when ndevices > MAXBOARDS. + 02-Aug-2002 GCS Fix field mode so that odd (lower) field is stored + in lower half of buffer. + 05-Aug-2005 SS port to 2.6 kernel. + 26-Oct-2009 SS port to 2.6.30 kernel. + +-- Notes -- + +** appended "mem=124" in lilo.conf to allow for 4megs free on my 128meg system. + * using allocator.c and allocator.h from o'reilly book (alessandro rubini) + ftp://ftp.systemy.it/pub/develop (see README.allocator) + + + might want to get rid of MAXboards for allocating initial buffer. + confusing and not necessary + + + in cleanup_module the MOD_IN_USE looks like it is check after it should + + * GFP_DMA should not be set with a PCI system (pg 291) + + - NJC why are only two buffers allowed? (see isr, approx line 358) + +*/ + +extern void printques(int); + +#ifdef MODULE +#include +#include +#include + + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,10) +MODULE_LICENSE("GPL"); +#endif + +#endif + +#ifndef CONFIG_PCI +#error "DT3155 : Kernel PCI support not enabled (DT3155 drive requires PCI)" +#endif + +#include +#include +#include + +#include +#include + +#include "dt3155.h" +#include "dt3155_drv.h" +#include "dt3155_isr.h" +#include "dt3155_io.h" +#include "allocator.h" + +/* Error variable. Zero means no error. */ +int dt3155_errno = 0; + +#ifndef PCI_DEVICE_ID_INTEL_7116 +#define PCI_DEVICE_ID_INTEL_7116 0x1223 +#endif + +#define DT3155_VENDORID PCI_VENDOR_ID_INTEL +#define DT3155_DEVICEID PCI_DEVICE_ID_INTEL_7116 +#define MAXPCI 16 + +#ifdef DT_DEBUG +#define DT_3155_DEBUG_MSG(x,y) printk(x,y) +#else +#define DT_3155_DEBUG_MSG(x,y) +#endif + +/* wait queue for interrupts */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,1) +wait_queue_head_t dt3155_read_wait_queue[ MAXBOARDS ]; +#else +struct wait_queue *dt3155_read_wait_queue[ MAXBOARDS ]; +#endif + +#define DT_3155_SUCCESS 0 +#define DT_3155_FAILURE -EIO + +/* set to dynamicaly allocate, but it is tunable: */ +/* insmod DT_3155 dt3155 dt3155_major=XX */ +int dt3155_major = 0; + +/* The minor numbers are 0 and 1 ... they are not tunable. + * They are used as the indices for the structure vectors, + * and register address vectors + */ + +/* Global structures and variables */ + +/* Status of each device */ +struct dt3155_status_s dt3155_status[ MAXBOARDS ]; + +/* kernel logical address of the board */ +u_char *dt3155_lbase[ MAXBOARDS ] = { NULL +#if MAXBOARDS == 2 + , NULL +#endif +}; +/* DT3155 registers */ +u_char *dt3155_bbase = NULL; /* kernel logical address of the * + * buffer region */ +u_int dt3155_dev_open[ MAXBOARDS ] = {0 +#if MAXBOARDS == 2 + , 0 +#endif +}; + +u_int ndevices = 0; +u_long unique_tag = 0;; + + +/* + * Stops interrupt generation right away and resets the status + * to idle. I don't know why this works and the other way doesn't. + * (James Rose) + */ +static void quick_stop (int minor) +{ + // TODO: scott was here +#if 1 + ReadMReg((dt3155_lbase[ minor ] + INT_CSR), int_csr_r.reg); + /* disable interrupts */ + int_csr_r.fld.FLD_END_EVE_EN = 0; + int_csr_r.fld.FLD_END_ODD_EN = 0; + WriteMReg((dt3155_lbase[ minor ] + INT_CSR), int_csr_r.reg ); + + dt3155_status[ minor ].state &= ~(DT3155_STATE_STOP|0xff); + /* mark the system stopped: */ + dt3155_status[ minor ].state |= DT3155_STATE_IDLE; + dt3155_fbuffer[ minor ]->stop_acquire = 0; + dt3155_fbuffer[ minor ]->even_stopped = 0; +#else + dt3155_status[minor].state |= DT3155_STATE_STOP; + dt3155_status[minor].fbuffer.stop_acquire = 1; +#endif + +} + + +/***************************************************** + * dt3155_isr() Interrupt service routien + * + * - looks like this isr supports IRQ sharing (or could) JML + * - Assumes irq's are disabled, via SA_INTERRUPT flag + * being set in request_irq() call from init_module() + *****************************************************/ +static inline void dt3155_isr( int irq, void *dev_id, struct pt_regs *regs ) +{ + int minor = -1; + int index; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + unsigned long flags; +#else + int flags; +#endif + u_long buffer_addr; + + /* find out who issued the interrupt */ + for ( index = 0; index < ndevices; index++ ) { + if( dev_id == (void*) &dt3155_status[ index ]) + { + minor = index; + break; + } + } + + /* hopefully we should not get here */ + if ( minor < 0 || minor >= MAXBOARDS ) { + printk(KERN_ERR "dt3155_isr called with invalid dev_id\n"); + return; + } + + /* Check for corruption and set a flag if so */ + ReadMReg( (dt3155_lbase[ minor ] + CSR1), csr1_r.reg ); + + if ( (csr1_r.fld.FLD_CRPT_EVE) || (csr1_r.fld.FLD_CRPT_ODD) ) + { + /* TODO: this should probably stop acquisition */ + /* and set some flags so that dt3155_read */ + /* returns an error next time it is called */ + dt3155_errno = DT_ERR_CORRUPT; + printk("dt3155: corrupt field\n"); + return; + } + + ReadMReg((dt3155_lbase[ minor ] + INT_CSR), int_csr_r.reg); + + /* Handle the even field ... */ + if (int_csr_r.fld.FLD_END_EVE) + { + if ( (dt3155_status[ minor ].state & DT3155_STATE_MODE) == + DT3155_STATE_FLD ) + { + dt3155_fbuffer[ minor ]->frame_count++; + } + + ReadI2C(dt3155_lbase[ minor ], EVEN_CSR, &i2c_even_csr.reg); + + /* Clear the interrupt? */ + int_csr_r.fld.FLD_END_EVE = 1; + + /* disable the interrupt if last field */ + if (dt3155_fbuffer[ minor ]->stop_acquire) + { + printk("dt3155: even stopped.\n"); + dt3155_fbuffer[ minor ]->even_stopped = 1; + if (i2c_even_csr.fld.SNGL_EVE) + { + int_csr_r.fld.FLD_END_EVE_EN = 0; + } + else + { + i2c_even_csr.fld.SNGL_EVE = 1; + } + } + + WriteMReg( (dt3155_lbase[ minor ] + INT_CSR), int_csr_r.reg ); + + /* Set up next DMA if we are doing FIELDS */ + if ( (dt3155_status[ minor ].state & DT3155_STATE_MODE ) == + DT3155_STATE_FLD) + { + /* GCS (Aug 2, 2002) -- In field mode, dma the odd field + into the lower half of the buffer */ + const u_long stride = dt3155_status[ minor ].config.cols; + buffer_addr = dt3155_fbuffer[ minor ]-> + frame_info[ dt3155_fbuffer[ minor ]->active_buf ].addr + + (DT3155_MAX_ROWS / 2) * stride; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + local_save_flags(flags); + local_irq_disable(); +#else + save_flags( flags ); + cli(); +#endif + wake_up_interruptible( &dt3155_read_wait_queue[ minor ] ); + + /* Set up the DMA address for the next field */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + local_irq_restore(flags); +#else + restore_flags( flags ); +#endif + WriteMReg((dt3155_lbase[ minor ] + ODD_DMA_START), buffer_addr); + } + + /* Check for errors. */ + i2c_even_csr.fld.DONE_EVE = 1; + if ( i2c_even_csr.fld.ERROR_EVE ) + dt3155_errno = DT_ERR_OVERRUN; + + WriteI2C( dt3155_lbase[ minor ], EVEN_CSR, i2c_even_csr.reg ); + + /* Note that we actually saw an even field meaning */ + /* that subsequent odd field complete the frame */ + dt3155_fbuffer[ minor ]->even_happened = 1; + + /* recording the time that the even field finished, this should be */ + /* about time in the middle of the frame */ + do_gettimeofday( &(dt3155_fbuffer[ minor ]-> + frame_info[ dt3155_fbuffer[ minor ]-> + active_buf ].time) ); + return; + } + + /* ... now handle the odd field */ + if ( int_csr_r.fld.FLD_END_ODD ) + { + ReadI2C( dt3155_lbase[ minor ], ODD_CSR, &i2c_odd_csr.reg ); + + /* Clear the interrupt? */ + int_csr_r.fld.FLD_END_ODD = 1; + + if (dt3155_fbuffer[ minor ]->even_happened || + (dt3155_status[ minor ].state & DT3155_STATE_MODE) == + DT3155_STATE_FLD) + { + dt3155_fbuffer[ minor ]->frame_count++; + } + + if ( dt3155_fbuffer[ minor ]->stop_acquire && + dt3155_fbuffer[ minor ]->even_stopped ) + { + printk(KERN_DEBUG "dt3155: stopping odd..\n"); + if ( i2c_odd_csr.fld.SNGL_ODD ) + { + /* disable interrupts */ + int_csr_r.fld.FLD_END_ODD_EN = 0; + dt3155_status[ minor ].state &= ~(DT3155_STATE_STOP|0xff); + + /* mark the system stopped: */ + dt3155_status[ minor ].state |= DT3155_STATE_IDLE; + dt3155_fbuffer[ minor ]->stop_acquire = 0; + dt3155_fbuffer[ minor ]->even_stopped = 0; + + printk(KERN_DEBUG "dt3155: state is now %lx\n", + dt3155_status[minor].state); + } + else + { + i2c_odd_csr.fld.SNGL_ODD = 1; + } + } + + WriteMReg( (dt3155_lbase[ minor ] + INT_CSR), int_csr_r.reg ); + + /* if the odd field has been acquired, then */ + /* change the next dma location for both fields */ + /* and wake up the process if sleeping */ + if ( dt3155_fbuffer[ minor ]->even_happened || + (dt3155_status[ minor ].state & DT3155_STATE_MODE) == + DT3155_STATE_FLD ) + { + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + local_save_flags(flags); + local_irq_disable(); +#else + save_flags( flags ); + cli(); +#endif + +#ifdef DEBUG_QUES_B + printques( minor ); +#endif + if ( dt3155_fbuffer[ minor ]->nbuffers > 2 ) + { + if ( !are_empty_buffers( minor ) ) + { + /* The number of active + locked buffers is + * at most 2, and since there are none empty, there + * must be at least nbuffers-2 ready buffers. + * This is where we 'drop frames', oldest first. */ + push_empty( pop_ready( minor ), minor ); + } + + /* The ready_que can't be full, since we know + * there is one active buffer right now, so it's safe + * to push the active buf on the ready_que. */ + push_ready( minor, dt3155_fbuffer[ minor ]->active_buf ); + /* There's at least 1 empty -- make it active */ + dt3155_fbuffer[ minor ]->active_buf = pop_empty( minor ); + dt3155_fbuffer[ minor ]-> + frame_info[ dt3155_fbuffer[ minor ]-> + active_buf ].tag = ++unique_tag; + } + else /* nbuffers == 2, special case */ + { /* There is 1 active buffer. + * If there is a locked buffer, keep the active buffer + * the same -- that means we drop a frame. + */ + if ( dt3155_fbuffer[ minor ]->locked_buf < 0 ) + { + push_ready( minor, + dt3155_fbuffer[ minor ]->active_buf ); + if (are_empty_buffers( minor ) ) + { + dt3155_fbuffer[ minor ]->active_buf = + pop_empty( minor ); + } + else + { /* no empty or locked buffers, so use a readybuf */ + dt3155_fbuffer[ minor ]->active_buf = + pop_ready( minor ); + } + } + } + +#ifdef DEBUG_QUES_B + printques( minor ); +#endif + + dt3155_fbuffer[ minor ]->even_happened = 0; + + wake_up_interruptible( &dt3155_read_wait_queue[ minor ] ); + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + local_irq_restore(flags); +#else + restore_flags( flags ); +#endif + } + + + /* Set up the DMA address for the next frame/field */ + buffer_addr = dt3155_fbuffer[ minor ]-> + frame_info[ dt3155_fbuffer[ minor ]->active_buf ].addr; + if ( (dt3155_status[ minor ].state & DT3155_STATE_MODE) == + DT3155_STATE_FLD ) + { + WriteMReg((dt3155_lbase[ minor ] + EVEN_DMA_START), buffer_addr); + } + else + { + WriteMReg((dt3155_lbase[ minor ] + EVEN_DMA_START), buffer_addr); + + WriteMReg((dt3155_lbase[ minor ] + ODD_DMA_START), buffer_addr + + dt3155_status[ minor ].config.cols); + } + + /* Do error checking */ + i2c_odd_csr.fld.DONE_ODD = 1; + if ( i2c_odd_csr.fld.ERROR_ODD ) + dt3155_errno = DT_ERR_OVERRUN; + + WriteI2C(dt3155_lbase[ minor ], ODD_CSR, i2c_odd_csr.reg ); + + return; + } + /* If we get here, the Odd Field wasn't it either... */ + printk( "neither even nor odd. shared perhaps?\n"); +} + +/***************************************************** + * init_isr(int minor) + * turns on interupt generation for the card + * designated by "minor". + * It is called *only* from inside ioctl(). + *****************************************************/ +static void dt3155_init_isr(int minor) +{ + const u_long stride = dt3155_status[ minor ].config.cols; + + switch (dt3155_status[ minor ].state & DT3155_STATE_MODE) + { + case DT3155_STATE_FLD: + { + even_dma_start_r = dt3155_status[ minor ]. + fbuffer.frame_info[ dt3155_status[ minor ].fbuffer.active_buf ].addr; + even_dma_stride_r = 0; + odd_dma_stride_r = 0; + + WriteMReg((dt3155_lbase[ minor ] + EVEN_DMA_START), + even_dma_start_r); + WriteMReg((dt3155_lbase[ minor ] + EVEN_DMA_STRIDE), + even_dma_stride_r); + WriteMReg((dt3155_lbase[ minor ] + ODD_DMA_STRIDE), + odd_dma_stride_r); + break; + } + + case DT3155_STATE_FRAME: + default: + { + even_dma_start_r = dt3155_status[ minor ]. + fbuffer.frame_info[ dt3155_status[ minor ].fbuffer.active_buf ].addr; + odd_dma_start_r = even_dma_start_r + stride; + even_dma_stride_r = stride; + odd_dma_stride_r = stride; + + WriteMReg((dt3155_lbase[ minor ] + EVEN_DMA_START), + even_dma_start_r); + WriteMReg((dt3155_lbase[ minor ] + ODD_DMA_START), + odd_dma_start_r); + WriteMReg((dt3155_lbase[ minor ] + EVEN_DMA_STRIDE), + even_dma_stride_r); + WriteMReg((dt3155_lbase[ minor ] + ODD_DMA_STRIDE), + odd_dma_stride_r); + break; + } + } + + /* 50/60 Hz should be set before this point but let's make sure it is */ + /* right anyway */ + + ReadI2C(dt3155_lbase[ minor ], CONFIG, &i2c_csr2.reg); + i2c_csr2.fld.HZ50 = FORMAT50HZ; + WriteI2C(dt3155_lbase[ minor ], CONFIG, i2c_config.reg); + + /* enable busmaster chip, clear flags */ + + /* + * TODO: + * shouldn't we be concered with continuous values of + * DT3155_SNAP & DT3155_ACQ here? (SS) + */ + + csr1_r.reg = 0; + csr1_r.fld.CAP_CONT_EVE = 1; /* use continuous capture bits to */ + csr1_r.fld.CAP_CONT_ODD = 1; /* enable */ + csr1_r.fld.FLD_DN_EVE = 1; /* writing a 1 clears flags */ + csr1_r.fld.FLD_DN_ODD = 1; + csr1_r.fld.SRST = 1; /* reset - must be 1 */ + csr1_r.fld.FIFO_EN = 1; /* fifo control - must be 1 */ + csr1_r.fld.FLD_CRPT_EVE = 1; /* writing a 1 clears flags */ + csr1_r.fld.FLD_CRPT_ODD = 1; + + WriteMReg((dt3155_lbase[ minor ] + CSR1),csr1_r.reg); + + /* Enable interrupts at the end of each field */ + + int_csr_r.reg = 0; + int_csr_r.fld.FLD_END_EVE_EN = 1; + int_csr_r.fld.FLD_END_ODD_EN = 1; + int_csr_r.fld.FLD_START_EN = 0; + + WriteMReg((dt3155_lbase[ minor ] + INT_CSR), int_csr_r.reg); + + /* start internal BUSY bits */ + + ReadI2C(dt3155_lbase[ minor ], CSR2, &i2c_csr2.reg); + i2c_csr2.fld.BUSY_ODD = 1; + i2c_csr2.fld.BUSY_EVE = 1; + WriteI2C(dt3155_lbase[ minor ], CSR2, i2c_csr2.reg); + + /* Now its up to the interrupt routine!! */ + + return; +} + + +/***************************************************** + * ioctl() + * + *****************************************************/ +static int dt3155_ioctl ( + struct inode *inode, + struct file *file, + u_int cmd, + u_long arg) +{ + int minor = MINOR(inode->i_rdev); /* What device are we ioctl()'ing? */ + + if ( minor >= MAXBOARDS || minor < 0 ) + return -ENODEV; + + /* make sure it is valid command */ + if (_IOC_NR(cmd) > DT3155_IOC_MAXNR) + { + printk("DT3155: invalid IOCTL(0x%x)\n",cmd); + printk("DT3155: Valid commands (0x%x), (0x%x), (0x%x), (0x%x), (0x%x)\n", + DT3155_GET_CONFIG, DT3155_SET_CONFIG, + DT3155_START, DT3155_STOP, DT3155_FLUSH); + return -EINVAL; + } + + switch (cmd) + { + case DT3155_SET_CONFIG: + { + if (dt3155_status[minor].state != DT3155_STATE_IDLE) + return -EBUSY; + + { + struct dt3155_config_s tmp; + if (copy_from_user((void *)&tmp, (void *) arg, sizeof(tmp))) + return -EFAULT; + /* check for valid settings */ + if (tmp.rows > DT3155_MAX_ROWS || + tmp.cols > DT3155_MAX_COLS || + (tmp.acq_mode != DT3155_MODE_FRAME && + tmp.acq_mode != DT3155_MODE_FIELD) || + (tmp.continuous != DT3155_SNAP && + tmp.continuous != DT3155_ACQ)) + { + return -EINVAL; + } + dt3155_status[minor].config = tmp; + } + return 0; + } + case DT3155_GET_CONFIG: + { + if (copy_to_user((void *) arg, (void *) &dt3155_status[minor], + sizeof(dt3155_status_t) )) + return -EFAULT; + return 0; + } + case DT3155_FLUSH: /* Flushes the buffers -- ensures fresh data */ + { + if (dt3155_status[minor].state != DT3155_STATE_IDLE) + return -EBUSY; + return dt3155_flush(minor); + } + case DT3155_STOP: + { + if (dt3155_status[minor].state & DT3155_STATE_STOP || + dt3155_status[minor].fbuffer.stop_acquire) + return -EBUSY; + + if (dt3155_status[minor].state == DT3155_STATE_IDLE) + return 0; + + quick_stop(minor); + if (copy_to_user((void *) arg, (void *) &dt3155_status[minor], + sizeof(dt3155_status_t))) + return -EFAULT; + return 0; + } + case DT3155_START: + { + if (dt3155_status[minor].state != DT3155_STATE_IDLE) + return -EBUSY; + + dt3155_status[minor].fbuffer.stop_acquire = 0; + dt3155_status[minor].fbuffer.frame_count = 0; + + /* Set the MODE in the status -- we default to FRAME */ + if (dt3155_status[minor].config.acq_mode == DT3155_MODE_FIELD) + { + dt3155_status[minor].state = DT3155_STATE_FLD; + } + else + { + dt3155_status[minor].state = DT3155_STATE_FRAME; + } + + dt3155_init_isr(minor); + if (copy_to_user( (void *) arg, (void *) &dt3155_status[minor], + sizeof(dt3155_status_t))) + return -EFAULT; + return 0; + } + default: + { + printk("DT3155: invalid IOCTL(0x%x)\n",cmd); + printk("DT3155: Valid commands (0x%x), (0x%x), (0x%x), (0x%x), (0x%x)\n", + DT3155_GET_CONFIG, DT3155_SET_CONFIG, + DT3155_START, DT3155_STOP, DT3155_FLUSH); + return -ENOSYS; + } + } + return -ENOSYS; +} + +/***************************************************** + * mmap() + * + * only allow the user to mmap the registers and buffer + * It is quite possible that this is broken, since the + * addition of of the capacity for two cards!!!!!!!! + * It *looks* like it should work but since I'm not + * sure how to use it, I'm not actually sure. (NJC? ditto by SS) + *****************************************************/ +static int dt3155_mmap (struct file * file, struct vm_area_struct * vma) +{ + /* which device are we mmapping? */ + int minor = MINOR(file->f_dentry->d_inode->i_rdev); + unsigned long offset; + + /* not actually sure when vm_area_struct changed, + but it was in 2.3 sometime */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,20) + + offset = vma->vm_pgoff << PAGE_SHIFT; + + if (offset >= __pa(high_memory) || (file->f_flags & O_SYNC)) + vma->vm_flags |= VM_IO; + + /* Don't try to swap out physical pages.. */ + vma->vm_flags |= VM_RESERVED; + +#else + + if (vma->vm_offset & ~PAGE_MASK) + return -ENXIO; + + offset = vma->vm_offset; + +#endif + + /* they are mapping the registers or the buffer */ + if ((offset == dt3155_status[minor].reg_addr && + vma->vm_end - vma->vm_start == PCI_PAGE_SIZE) || + (offset == dt3155_status[minor].mem_addr && + vma->vm_end - vma->vm_start == dt3155_status[minor].mem_size)) + { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + if (remap_pfn_range(vma, + vma->vm_start, + offset >> PAGE_SHIFT, + vma->vm_end - vma->vm_start, + vma->vm_page_prot)) +#else + if (remap_page_range(vma->vm_start, + offset, + vma->vm_end - vma->vm_start, + vma->vm_page_prot)) +#endif + { + printk("DT3155: remap_page_range() failed.\n"); + return -EAGAIN; + } + } + else + { + printk("DT3155: dt3155_mmap() bad call.\n"); + return -ENXIO; + } + + return 0; +} + + +/***************************************************** + * open() + * + * Our special open code. + * MOD_INC_USE_COUNT make sure that the driver memory is not freed + * while the device is in use. + *****************************************************/ +static int dt3155_open( struct inode* inode, struct file* filep) +{ + int minor = MINOR(inode->i_rdev); /* what device are we opening? */ + if (dt3155_dev_open[ minor ]) { + printk ("DT3155: Already opened by another process.\n"); + return -EBUSY; + } + + if (dt3155_status[ minor ].device_installed==0) + { + printk("DT3155 Open Error: No such device dt3155 minor number %d\n", + minor); + return -EIO; + } + + if (dt3155_status[ minor ].state != DT3155_STATE_IDLE) { + printk ("DT3155: Not in idle state (state = %lx)\n", + dt3155_status[ minor ].state); + return -EBUSY; + } + + printk("DT3155: Device opened.\n"); + + dt3155_dev_open[ minor ] = 1 ; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) + MOD_INC_USE_COUNT; +#endif + + dt3155_flush( minor ); + + /* Disable ALL interrupts */ + int_csr_r.reg = 0; + WriteMReg( (dt3155_lbase[ minor ] + INT_CSR), int_csr_r.reg ); + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,1) + init_waitqueue_head(&(dt3155_read_wait_queue[minor])); +#else + dt3155_read_wait_queue[minor] = NULL; +#endif + + return 0; +} + + +/***************************************************** + * close() + * + * Now decrement the use count. + * + *****************************************************/ +static int dt3155_close( struct inode *inode, struct file *filep) +{ + int minor; + + minor = MINOR(inode->i_rdev); /* which device are we closing */ + if (!dt3155_dev_open[ minor ]) + { + printk("DT3155: attempt to CLOSE a not OPEN device\n"); + } + else + { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) + MOD_DEC_USE_COUNT; +#endif + dt3155_dev_open[ minor ] = 0; + + if (dt3155_status[ minor ].state != DT3155_STATE_IDLE) + { + quick_stop(minor); + } + } + return 0; +} + +/***************************************************** + * read() + * + *****************************************************/ +static int dt3155_read ( + struct file *filep, + char *buf, + size_t count, + loff_t *ppos) +{ + /* which device are we reading from? */ + int minor = MINOR(filep->f_dentry->d_inode->i_rdev); + u_long offset; + int frame_index; + frame_info_t *frame_info_p; + + /* TODO: this should check the error flag and */ + /* return an error on hardware failures */ + if (count != sizeof(dt3155_read_t)) + { + printk("DT3155 ERROR (NJC): count is not right\n"); + return -EINVAL; + } + + + /* Hack here -- I'm going to allow reading even when idle. + * this is so that the frames can be read after STOP has + * been called. Leaving it here, commented out, as a reminder + * for a short while to make sure there are no problems. + * Note that if the driver is not opened in non_blocking mode, + * and the device is idle, then it could sit here forever! */ + + /* if (dt3155_status[minor].state == DT3155_STATE_IDLE)*/ + /* return -EBUSY;*/ + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,1) + + /* non-blocking reads should return if no data */ + if (filep->f_flags & O_NDELAY) + { + if ((frame_index = dt3155_get_ready_buffer(minor)) < 0) { + /*printk( "dt3155: no buffers available (?)\n");*/ + /* printques(minor); */ + return -EAGAIN; + } + } + else + { + /* + * sleep till data arrives , or we get interrupted. + * Note that wait_event_interruptible() does not actually + * sleep/wait if it's condition evaluates to true upon entry. + */ + wait_event_interruptible(dt3155_read_wait_queue[minor], + (frame_index = dt3155_get_ready_buffer(minor)) + >= 0); + + if (frame_index < 0) + { + printk ("DT3155: read: interrupted\n"); + quick_stop (minor); + printques(minor); + return -EINTR; + } + } + +#else + while ((frame_index = dt3155_get_ready_buffer(minor)) < 0 ) + { + int index; + if (filep->f_flags & O_NDELAY) + return 0; + + /* sleep till data arrives , or we get interrupted */ + interruptible_sleep_on(&dt3155_read_wait_queue[minor]); + for (index = 0; index < _NSIG_WORDS; index++) + { + /* + * Changing the next line of code below to this: + * if (current->pending.signal.sig[index] & + * ~current->blocked.sig[index]) + * would also work on a 2.4 kernel, however, the above + * method is preferred & more portable. + */ + if (current->signal.sig[index] & ~current->blocked.sig[index]) + { + printk ("DT3155: read: interrupted\n"); + return -EINTR; + } + } + } + +#endif + + frame_info_p = &dt3155_status[minor].fbuffer.frame_info[frame_index]; + + /* make this an offset */ + offset = frame_info_p->addr - dt3155_status[minor].mem_addr; + + put_user(offset, (unsigned int *) buf); + buf += sizeof(u_long); + put_user( dt3155_status[minor].fbuffer.frame_count, (unsigned int *) buf); + buf += sizeof(u_long); + put_user(dt3155_status[minor].state, (unsigned int *) buf); + buf += sizeof(u_long); + if (copy_to_user(buf, frame_info_p, sizeof(frame_info_t))) + return -EFAULT; + + return sizeof(dt3155_read_t); +} + +static unsigned int dt3155_poll (struct file * filp, poll_table *wait) +{ + int minor = MINOR(filp->f_dentry->d_inode->i_rdev); + + if (!is_ready_buf_empty(minor)) + return POLLIN | POLLRDNORM; + + poll_wait (filp, &dt3155_read_wait_queue[minor], wait); + + return 0; +} + + +/***************************************************** + * file operations supported by DT3155 driver + * needed by init_module + * register_chrdev + *****************************************************/ +static struct file_operations dt3155_fops = { + read: dt3155_read, + ioctl: dt3155_ioctl, + mmap: dt3155_mmap, + poll: dt3155_poll, + open: dt3155_open, + release: dt3155_close +}; + + +/***************************************************** + * find_PCI(); + * + * PCI has been totally reworked in 2.1.. + *****************************************************/ +static int find_PCI (void) +{ + struct pci_dev *pci_dev = NULL; + int error, pci_index = 0; + unsigned short rev_device; + unsigned long base; + unsigned char irq; + + while ((pci_dev = pci_find_device + (DT3155_VENDORID, DT3155_DEVICEID, pci_dev)) != NULL) + { + pci_index ++; + + /* Is it really there? */ + if ((error = + pci_read_config_word(pci_dev, PCI_CLASS_DEVICE, &rev_device))) + continue; + + /* Found a board */ + DT_3155_DEBUG_MSG("DT3155: Device number %d \n", pci_index); + + /* Make sure the driver was compiled with enough buffers to handle + this many boards */ + if (pci_index > MAXBOARDS) { + printk("DT3155: ERROR - found %d devices, but driver only configured " + "for %d devices\n" + "DT3155: Please change MAXBOARDS in dt3155.h\n", + pci_index, MAXBOARDS); + return DT_3155_FAILURE; + } + + /* Now, just go out and make sure that this/these device(s) is/are + actually mapped into the kernel address space */ + if ((error = pci_read_config_dword( pci_dev, PCI_BASE_ADDRESS_0, + (u_int *) &base))) + { + printk("DT3155: Was not able to find device \n"); + return DT_3155_FAILURE; + } + + DT_3155_DEBUG_MSG("DT3155: Base address 0 for device is %lx \n", base); + dt3155_status[pci_index-1].reg_addr = base; + + /* Remap the base address to a logical address through which we + * can access it. */ + dt3155_lbase[ pci_index - 1 ] = ioremap(base,PCI_PAGE_SIZE); + dt3155_status[ pci_index - 1 ].reg_addr = base; + DT_3155_DEBUG_MSG("DT3155: New logical address is x%x \n", + (u_int)dt3155_lbase[pci_index-1]); + if ( !dt3155_lbase[pci_index-1] ) + { + printk("DT3155: Unable to remap control registers\n"); + return DT_3155_FAILURE; + } + + if ( (error = pci_read_config_byte( pci_dev, PCI_INTERRUPT_LINE, &irq)) ) + { + printk("DT3155: Was not able to find device \n"); + return DT_3155_FAILURE; + } + + DT_3155_DEBUG_MSG("DT3155: IRQ is %d \n",irq); + dt3155_status[ pci_index-1 ].irq = irq; + /* Set flag: kth device found! */ + dt3155_status[ pci_index-1 ].device_installed = 1; + printk("DT3155: Installing device %d w/irq %d and address 0x%x\n", + pci_index, + (u_int)dt3155_status[pci_index-1].irq, + (u_int)dt3155_lbase[pci_index-1]); + + } + ndevices = pci_index; + + return DT_3155_SUCCESS; +} + +u_long allocatorAddr = 0; + +/***************************************************** + * init_module() + *****************************************************/ +int init_module(void) +{ + int index; + int rcode = 0; + char *devname[ MAXBOARDS ]; + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,1) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) + SET_MODULE_OWNER(&dt3155_fops); +#endif +#endif + + devname[ 0 ] = "dt3155a"; +#if MAXBOARDS == 2 + devname[ 1 ] = "dt3155b"; +#endif + + printk("DT3155: Loading module...\n"); + + /* Register the device driver */ + rcode = register_chrdev( dt3155_major, "dt3155", &dt3155_fops ); + if( rcode < 0 ) + { + printk( KERN_INFO "DT3155: register_chrdev failed \n"); + return rcode; + } + + if( dt3155_major == 0 ) + dt3155_major = rcode; /* dynamic */ + + + /* init the status variables. */ + /* DMA memory is taken care of in setup_buffers() */ + for ( index = 0; index < MAXBOARDS; index++ ) + { + dt3155_status[ index ].config.acq_mode = DT3155_MODE_FRAME; + dt3155_status[ index ].config.continuous = DT3155_ACQ; + dt3155_status[ index ].config.cols = DT3155_MAX_COLS; + dt3155_status[ index ].config.rows = DT3155_MAX_ROWS; + dt3155_status[ index ].state = DT3155_STATE_IDLE; + + /* find_PCI() will check if devices are installed; */ + /* first assume they're not: */ + dt3155_status[ index ].mem_addr = 0; + dt3155_status[ index ].mem_size = 0; + dt3155_status[ index ].state = DT3155_STATE_IDLE; + dt3155_status[ index ].device_installed = 0; + } + + /* Now let's find the hardware. find_PCI() will set ndevices to the + * number of cards found in this machine. */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) + if ( !(pcibios_present()) ) + { + printk("DT3155: Error: No PCI bios on this machine \n"); + if( unregister_chrdev( dt3155_major, "dt3155" ) != 0 ) + printk("DT3155: cleanup_module failed\n"); + + return DT_3155_FAILURE; + } + else +#endif + { + if ( (rcode = find_PCI()) != DT_3155_SUCCESS ) + { + printk("DT3155 error: find_PCI() failed to find dt3155 board(s)\n"); + unregister_chrdev( dt3155_major, "dt3155" ); + return rcode; + } + } + + /* Ok, time to setup the frame buffers */ + if( (rcode = dt3155_setup_buffers(&allocatorAddr)) < 0 ) + { + printk("DT3155: Error: setting up buffer not large enough."); + unregister_chrdev( dt3155_major, "dt3155" ); + return rcode; + } + + /* If we are this far, then there is enough RAM */ + /* for the buffers: Print the configuration. */ + for( index = 0; index < ndevices; index++ ) + { + printk("DT3155: Device = %d; acq_mode = %d; " + "continuous = %d; cols = %d; rows = %d;\n", + index , + dt3155_status[ index ].config.acq_mode, + dt3155_status[ index ].config.continuous, + dt3155_status[ index ].config.cols, + dt3155_status[ index ].config.rows); + printk("DT3155: m_addr = 0x%x; m_size = %ld; " + "state = %ld; device_installed = %d\n", + (u_int)dt3155_status[ index ].mem_addr, + dt3155_status[ index ].mem_size, + dt3155_status[ index ].state, + dt3155_status[ index ].device_installed); + } + + /* Disable ALL interrupts */ + int_csr_r.reg = 0; + for( index = 0; index < ndevices; index++ ) + { + WriteMReg( (dt3155_lbase[ index ] + INT_CSR), int_csr_r.reg ); + if( dt3155_status[ index ].device_installed ) + { + /* + * This driver *looks* like it can handle sharing interrupts, + * but I can't actually test myself. I've had reports that it + * DOES work so I'll enable it for now. This comment will remain + * as a reminder in case any problems arise. (SS) + */ + /* in older kernels flags are: SA_SHIRQ | SA_INTERRUPT */ + rcode = request_irq( dt3155_status[ index ].irq, (void *)dt3155_isr, + IRQF_SHARED | IRQF_DISABLED, devname[ index ], + (void*) &dt3155_status[index]); + if( rcode < 0 ) + { + printk("DT3155: minor %d request_irq failed for IRQ %d\n", + index, dt3155_status[index].irq); + unregister_chrdev( dt3155_major, "dt3155" ); + return rcode; + } + } + } + + printk("DT3155: finished loading\n"); + + return 0; +} + +/***************************************************** + * cleanup_module(void) + * + *****************************************************/ +void cleanup_module(void) +{ + int index; + + printk("DT3155: cleanup_module called\n"); + + /* removed DMA allocated with the allocator */ +#ifdef STANDALONE_ALLOCATOR + if (allocatorAddr != 0) + allocator_free_dma(allocatorAddr); +#else + allocator_cleanup(); +#endif + + unregister_chrdev( dt3155_major, "dt3155" ); + + for( index = 0; index < ndevices; index++ ) + { + if( dt3155_status[ index ].device_installed == 1 ) + { + printk( "DT3155: Freeing irq %d for device %d\n", + dt3155_status[ index ].irq, index ); + free_irq( dt3155_status[ index ].irq, (void*)&dt3155_status[index] ); + } + } + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) + if (MOD_IN_USE) + printk("DT3155: device busy, remove delayed\n"); +#endif +} + diff --git a/drivers/staging/dt3155/dt3155_drv.h b/drivers/staging/dt3155/dt3155_drv.h new file mode 100644 index 000000000000..92a92dc2736c --- /dev/null +++ b/drivers/staging/dt3155/dt3155_drv.h @@ -0,0 +1,50 @@ +/* + +Copyright 1996,2002 Gregory D. Hager, Alfred A. Rizzi, Noah J. Cowan, + Scott Smedley + +This file is part of the DT3155 Device Driver. + +The DT3155 Device Driver is free software; you can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The DT3155 Device Driver is distributed in the hope that it will be +useful, but WITHOUT ANY WARRANTY; without even the implied warranty +of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the DT3155 Device Driver; if not, write to the Free +Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, +MA 02111-1307 USA +*/ + +#ifndef DT3155_DRV_INC +#define DT3155_DRV_INC + +/* kernel logical address of the frame grabbers */ +extern u_char *dt3155_lbase[ MAXBOARDS ]; + +/* kernel logical address of ram buffer */ +extern u_char *dt3155_bbase; + +#ifdef __KERNEL__ +#include + +#include /* need access to LINUX_VERSION_CODE */ +/* wait queue for reads */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,1) +extern wait_queue_head_t dt3155_read_wait_queue[MAXBOARDS]; +#else +extern struct wait_queue *dt3155_read_wait_queue[MAXBOARDS]; +#endif +#endif + +/* number of devices */ +extern u_int ndevices; + +extern int dt3155_errno; + +#endif diff --git a/drivers/staging/dt3155/dt3155_io.c b/drivers/staging/dt3155/dt3155_io.c new file mode 100644 index 000000000000..6d516863d1ae --- /dev/null +++ b/drivers/staging/dt3155/dt3155_io.c @@ -0,0 +1,236 @@ +/* + +Copyright 1996,2002,2005 Gregory D. Hager, Alfred A. Rizzi, Noah J. Cowan, + Jason Lapenta, Scott Smedley + +This file is part of the DT3155 Device Driver. + +The DT3155 Device Driver is free software; you can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The DT3155 Device Driver is distributed in the hope that it will be +useful, but WITHOUT ANY WARRANTY; without even the implied warranty +of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the DT3155 Device Driver; if not, write to the Free +Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, +MA 02111-1307 USA + + +-- Changes -- + + Date Programmer Description of changes made + ------------------------------------------------------------------- + 10-Oct-2001 SS port to 2.4 kernel. + 24-Jul-2002 SS GPL licence. + 26-Jul-2002 SS Bug fix: timing logic was wrong. + 08-Aug-2005 SS port to 2.6 kernel. + +*/ + +/* This file provides some basic register io routines. It is modified + from demo code provided by Data Translations. */ + +#ifdef __KERNEL__ +#include +#endif + +#if 0 +#include +#include +#include +#endif + +#include "dt3155.h" +#include "dt3155_io.h" +#include "dt3155_drv.h" + +#ifndef __KERNEL__ +#include +#endif + + +/****** local copies of board's 32 bit registers ******/ +u_long even_dma_start_r; /* bit 0 should always be 0 */ +u_long odd_dma_start_r; /* .. */ +u_long even_dma_stride_r; /* bits 0&1 should always be 0 */ +u_long odd_dma_stride_r; /* .. */ +u_long even_pixel_fmt_r; +u_long odd_pixel_fmt_r; + +FIFO_TRIGGER_R fifo_trigger_r; +XFER_MODE_R xfer_mode_r; +CSR1_R csr1_r; +RETRY_WAIT_CNT_R retry_wait_cnt_r; +INT_CSR_R int_csr_r; + +u_long even_fld_mask_r; +u_long odd_fld_mask_r; + +MASK_LENGTH_R mask_length_r; +FIFO_FLAG_CNT_R fifo_flag_cnt_r; +IIC_CLK_DUR_R iic_clk_dur_r; +IIC_CSR1_R iic_csr1_r; +IIC_CSR2_R iic_csr2_r; +DMA_UPPER_LMT_R even_dma_upper_lmt_r; +DMA_UPPER_LMT_R odd_dma_upper_lmt_r; + + + +/******** local copies of board's 8 bit I2C registers ******/ +I2C_CSR2 i2c_csr2; +I2C_EVEN_CSR i2c_even_csr; +I2C_ODD_CSR i2c_odd_csr; +I2C_CONFIG i2c_config; +u_char i2c_dt_id; +u_char i2c_x_clip_start; +u_char i2c_y_clip_start; +u_char i2c_x_clip_end; +u_char i2c_y_clip_end; +u_char i2c_ad_addr; +u_char i2c_ad_lut; +I2C_AD_CMD i2c_ad_cmd; +u_char i2c_dig_out; +u_char i2c_pm_lut_addr; +u_char i2c_pm_lut_data; + + +// return the time difference (in microseconds) b/w & . +long elapsed2 (const struct timeval *pStart, const struct timeval *pEnd) +{ + long i = (pEnd->tv_sec - pStart->tv_sec) * 1000000; + i += pEnd->tv_usec - pStart->tv_usec; + return i; +} + +/*********************************************************************** + wait_ibsyclr() + + This function handles read/write timing and r/w timeout error + + Returns TRUE if NEW_CYCLE clears + Returns FALSE if NEW_CYCLE doesn't clear in roughly 3 msecs, + otherwise returns 0 + +***********************************************************************/ +int wait_ibsyclr(u_char * lpReg) +{ + /* wait 100 microseconds */ + +#ifdef __KERNEL__ + udelay(100L); + /* __delay(loops_per_sec/10000); */ + if (iic_csr2_r.fld.NEW_CYCLE ) + { /* if NEW_CYCLE didn't clear */ + /* TIMEOUT ERROR */ + dt3155_errno = DT_ERR_I2C_TIMEOUT; + return FALSE; + } + else + return TRUE; /* no error */ +#else + struct timeval StartTime; + struct timeval EndTime; + + const int to_3ms = 3000; /* time out of 3ms = 3000us */ + + gettimeofday( &StartTime, NULL ); + do { + /* get new iic_csr2 value: */ + ReadMReg((lpReg + IIC_CSR2), iic_csr2_r.reg); + gettimeofday( &EndTime, NULL ); + } + while ((elapsed2(&StartTime, &EndTime) < to_3ms) && iic_csr2_r.fld.NEW_CYCLE); + + if (iic_csr2_r.fld.NEW_CYCLE ) + { /* if NEW_CYCLE didn't clear */ + printf("Timed out waiting for NEW_CYCLE to clear!"); + return FALSE; + } + else + return TRUE; /* no error */ +#endif +} + +/*********************************************************************** + WriteI2C() + + This function handles writing to 8-bit DT3155 registers + + 1st parameter is pointer to 32-bit register base address + 2nd parameter is reg. index; + 3rd is value to be written + + Returns TRUE - Successful completion + FALSE - Timeout error - cycle did not complete! +***********************************************************************/ +int WriteI2C (u_char * lpReg, u_short wIregIndex, u_char byVal) +{ + int writestat; /* status for return */ + + /* read 32 bit IIC_CSR2 register data into union */ + + ReadMReg((lpReg + IIC_CSR2), iic_csr2_r.reg); + + iic_csr2_r.fld.DIR_RD = 0; /* for write operation */ + iic_csr2_r.fld.DIR_ADDR = wIregIndex; /* I2C address of I2C register: */ + iic_csr2_r.fld.DIR_WR_DATA = byVal; /* 8 bit data to be written to I2C reg */ + iic_csr2_r.fld.NEW_CYCLE = 1; /* will start a direct I2C cycle: */ + + /* xfer union data into 32 bit IIC_CSR2 register */ + + WriteMReg((lpReg + IIC_CSR2), iic_csr2_r.reg); + + /* wait for IIC cycle to finish */ + + writestat = wait_ibsyclr( lpReg ); + return writestat; /* return with status */ +} + +/*********************************************************************** + ReadI2C() + + This function handles reading from 8-bit DT3155 registers + + 1st parameter is pointer to 32-bit register base address + 2nd parameter is reg. index; + 3rd is adrs of value to be read + + Returns TRUE - Successful completion + FALSE - Timeout error - cycle did not complete! +***********************************************************************/ +int ReadI2C (u_char * lpReg, u_short wIregIndex, u_char * byVal) +{ + int writestat; /* status for return */ + + /* read 32 bit IIC_CSR2 register data into union */ + ReadMReg((lpReg + IIC_CSR2), iic_csr2_r.reg); + + /* for read operation */ + iic_csr2_r.fld.DIR_RD = 1; + + /* I2C address of I2C register: */ + iic_csr2_r.fld.DIR_ADDR = wIregIndex; + + /* will start a direct I2C cycle: */ + iic_csr2_r.fld.NEW_CYCLE = 1; + + /* xfer union's data into 32 bit IIC_CSR2 register */ + WriteMReg((lpReg + IIC_CSR2), iic_csr2_r.reg); + + /* wait for IIC cycle to finish */ + writestat = wait_ibsyclr(lpReg); + + /* Next 2 commands read 32 bit IIC_CSR1 register's data into union */ + /* first read data is in IIC_CSR1 */ + ReadMReg((lpReg + IIC_CSR1), iic_csr1_r.reg); + + /* now get data u_char out of register */ + *byVal = (u_char) iic_csr1_r.fld.RD_DATA; + + return writestat; /* return with status */ +} diff --git a/drivers/staging/dt3155/dt3155_io.h b/drivers/staging/dt3155/dt3155_io.h new file mode 100644 index 000000000000..c1174ab7eac5 --- /dev/null +++ b/drivers/staging/dt3155/dt3155_io.h @@ -0,0 +1,400 @@ +/* + +Copyright 1996,2002 Gregory D. Hager, Alfred A. Rizzi, Noah J. Cowan, + Jason Lapenta, Scott Smedley + +This file is part of the DT3155 Device Driver. + +The DT3155 Device Driver is free software; you can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The DT3155 Device Driver is distributed in the hope that it will be +useful, but WITHOUT ANY WARRANTY; without even the implied warranty +of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the DT3155 Device Driver; if not, write to the Free +Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, +MA 02111-1307 USA + + +-- Changes -- + + Date Programmer Description of changes made + ------------------------------------------------------------------- + 24-Jul-2002 SS GPL licence. + +*/ + +/* This code is a modified version of examples provided by Data Translations.*/ + +#ifndef DT3155_IO_INC +#define DT3155_IO_INC + +/* macros to access registers */ + +#define WriteMReg(Address, Data) * ((u_long *) (Address)) = Data +#define ReadMReg(Address, Data) Data = * ((u_long *) (Address)) + +/***************** 32 bit register globals **************/ + +/* offsets for 32-bit memory mapped registers */ + +#define EVEN_DMA_START 0x000 +#define ODD_DMA_START 0x00C +#define EVEN_DMA_STRIDE 0x018 +#define ODD_DMA_STRIDE 0x024 +#define EVEN_PIXEL_FMT 0x030 +#define ODD_PIXEL_FMT 0x034 +#define FIFO_TRIGGER 0x038 +#define XFER_MODE 0x03C +#define CSR1 0x040 +#define RETRY_WAIT_CNT 0x044 +#define INT_CSR 0x048 +#define EVEN_FLD_MASK 0x04C +#define ODD_FLD_MASK 0x050 +#define MASK_LENGTH 0x054 +#define FIFO_FLAG_CNT 0x058 +#define IIC_CLK_DUR 0x05C +#define IIC_CSR1 0x060 +#define IIC_CSR2 0x064 +#define EVEN_DMA_UPPR_LMT 0x08C +#define ODD_DMA_UPPR_LMT 0x090 + +#define CLK_DUR_VAL 0x01010101 + + + +/******** Assignments and Typedefs for 32 bit Memory Mapped Registers ********/ + +/********************************** + * fifo_trigger_tag + */ +typedef union fifo_trigger_tag { + u_long reg; + struct + { + u_long PACKED : 6; + u_long : 9; + u_long PLANER : 7; + u_long : 9; + } fld; +} FIFO_TRIGGER_R; + +/********************************** + * xfer_mode_tag + */ +typedef union xfer_mode_tag { + u_long reg; + struct + { + u_long : 2; + u_long FIELD_TOGGLE : 1; + u_long : 5; + u_long : 2; + u_long : 22; + } fld; +} XFER_MODE_R; + +/********************************** + * csr1_tag + */ +typedef union csr1_tag { + u_long reg; + struct + { + u_long CAP_CONT_EVE : 1; + u_long CAP_CONT_ODD : 1; + u_long CAP_SNGL_EVE : 1; + u_long CAP_SNGL_ODD : 1; + u_long FLD_DN_EVE : 1; + u_long FLD_DN_ODD : 1; + u_long SRST : 1; + u_long FIFO_EN : 1; + u_long FLD_CRPT_EVE : 1; + u_long FLD_CRPT_ODD : 1; + u_long ADDR_ERR_EVE : 1; + u_long ADDR_ERR_ODD : 1; + u_long CRPT_DIS : 1; + u_long RANGE_EN : 1; + u_long : 16; + } fld; +} CSR1_R; + +/********************************** + * retry_wait_cnt_tag + */ +typedef union retry_wait_cnt_tag { + u_long reg; + struct + { + u_long RTRY_WAIT_CNT : 8; + u_long : 24; + } fld; +} RETRY_WAIT_CNT_R; + +/********************************** + * int_csr_tag + */ +typedef union int_csr_tag { + u_long reg; + struct + { + u_long FLD_END_EVE : 1; + u_long FLD_END_ODD : 1; + u_long FLD_START : 1; + u_long : 5; + u_long FLD_END_EVE_EN : 1; + u_long FLD_END_ODD_EN : 1; + u_long FLD_START_EN : 1; + u_long : 21; + } fld; +} INT_CSR_R; + +/********************************** + * mask_length_tag + */ +typedef union mask_length_tag { + u_long reg; + struct + { + u_long MASK_LEN_EVE : 5; + u_long : 11; + u_long MASK_LEN_ODD : 5; + u_long : 11; + } fld; +} MASK_LENGTH_R; + +/********************************** + * fifo_flag_cnt_tag + */ +typedef union fifo_flag_cnt_tag { + u_long reg; + struct + { + u_long AF_COUNT : 7; + u_long : 9; + u_long AE_COUNT : 7; + u_long : 9; + } fld; +} FIFO_FLAG_CNT_R; + +/********************************** + * iic_clk_dur + */ +typedef union iic_clk_dur { + u_long reg; + struct + { + u_long PHASE_1 : 8; + u_long PHASE_2 : 8; + u_long PHASE_3 : 8; + u_long PHASE_4 : 8; + } fld; +} IIC_CLK_DUR_R; + +/********************************** + * iic_csr1_tag + */ +typedef union iic_csr1_tag { + u_long reg; + struct + { + u_long AUTO_EN : 1; + u_long BYPASS : 1; + u_long SDA_OUT : 1; + u_long SCL_OUT : 1; + u_long : 4; + u_long AUTO_ABORT : 1; + u_long DIRECT_ABORT : 1; + u_long SDA_IN : 1; + u_long SCL_IN : 1; + u_long : 4; + u_long AUTO_ADDR : 8; + u_long RD_DATA : 8; + } fld; +} IIC_CSR1_R; + +/********************************** + * iic_csr2_tag + */ +typedef union iic_csr2_tag { + u_long reg; + struct + { + u_long DIR_WR_DATA : 8; + u_long DIR_SUB_ADDR : 8; + u_long DIR_RD : 1; + u_long DIR_ADDR : 7; + u_long NEW_CYCLE : 1; + u_long : 7; + } fld; +} IIC_CSR2_R; + +/* use for both EVEN and ODD DMA UPPER LIMITS */ + +/********************************** + * dma_upper_lmt_tag + */ +typedef union dma_upper_lmt_tag { + u_long reg; + struct + { + u_long DMA_UPPER_LMT_VAL : 24; + u_long : 8; + } fld; +} DMA_UPPER_LMT_R; + + +/*************************************** + * Global declarations of local copies + * of boards' 32 bit registers + ***************************************/ +extern u_long even_dma_start_r; /* bit 0 should always be 0 */ +extern u_long odd_dma_start_r; /* .. */ +extern u_long even_dma_stride_r; /* bits 0&1 should always be 0 */ +extern u_long odd_dma_stride_r; /* .. */ +extern u_long even_pixel_fmt_r; +extern u_long odd_pixel_fmt_r; + +extern FIFO_TRIGGER_R fifo_trigger_r; +extern XFER_MODE_R xfer_mode_r; +extern CSR1_R csr1_r; +extern RETRY_WAIT_CNT_R retry_wait_cnt_r; +extern INT_CSR_R int_csr_r; + +extern u_long even_fld_mask_r; +extern u_long odd_fld_mask_r; + +extern MASK_LENGTH_R mask_length_r; +extern FIFO_FLAG_CNT_R fifo_flag_cnt_r; +extern IIC_CLK_DUR_R iic_clk_dur_r; +extern IIC_CSR1_R iic_csr1_r; +extern IIC_CSR2_R iic_csr2_r; +extern DMA_UPPER_LMT_R even_dma_upper_lmt_r; +extern DMA_UPPER_LMT_R odd_dma_upper_lmt_r; + + + +/***************** 8 bit I2C register globals ***********/ + +#define CSR2 0x010 /* indices of 8-bit I2C mapped reg's*/ +#define EVEN_CSR 0x011 +#define ODD_CSR 0x012 +#define CONFIG 0x013 +#define DT_ID 0x01F +#define X_CLIP_START 0x020 +#define Y_CLIP_START 0x022 +#define X_CLIP_END 0x024 +#define Y_CLIP_END 0x026 +#define AD_ADDR 0x030 +#define AD_LUT 0x031 +#define AD_CMD 0x032 +#define DIG_OUT 0x040 +#define PM_LUT_ADDR 0x050 +#define PM_LUT_DATA 0x051 + + +/******** Assignments and Typedefs for 8 bit I2C Registers********************/ + +typedef union i2c_csr2_tag { + u_char reg; + struct + { + u_char CHROM_FIL : 1; + u_char SYNC_SNTL : 1; + u_char HZ50 : 1; + u_char SYNC_PRESENT : 1; + u_char BUSY_EVE : 1; + u_char BUSY_ODD : 1; + u_char DISP_PASS : 1; + } fld; +} I2C_CSR2; + +typedef union i2c_even_csr_tag { + u_char reg; + struct + { + u_char DONE_EVE : 1; + u_char SNGL_EVE : 1; + u_char ERROR_EVE : 1; + u_char : 5; + } fld; +} I2C_EVEN_CSR; + +typedef union i2c_odd_csr_tag { + u_char reg; + struct + { + u_char DONE_ODD : 1; + u_char SNGL_ODD : 1; + u_char ERROR_ODD : 1; + u_char : 5; + } fld; +} I2C_ODD_CSR; + +typedef union i2c_config_tag { + u_char reg; + struct + { + u_char ACQ_MODE : 2; + u_char EXT_TRIG_EN : 1; + u_char EXT_TRIG_POL : 1; + u_char H_SCALE : 1; + u_char CLIP : 1; + u_char PM_LUT_SEL : 1; + u_char PM_LUT_PGM : 1; + } fld; +} I2C_CONFIG; + + +typedef union i2c_ad_cmd_tag { /* bits can have 3 different meanings + depending on value of AD_ADDR */ + u_char reg; + struct + { + u_char : 2; + u_char SYNC_LVL_SEL : 2; + u_char SYNC_CNL_SEL : 2; + u_char DIGITIZE_CNL_SEL1 : 2; + } bt252_command; /* Bt252 Command Register */ + struct /* if AD_ADDR = 00h */ + { + u_char IOUT_DATA : 8; + } bt252_iout0; /* Bt252 IOUT0 register */ + struct /* if AD_ADDR = 01h */ + { + u_char IOUT_DATA : 8; + } bt252_iout1; /* BT252 IOUT1 register */ +} I2C_AD_CMD; /* if AD_ADDR = 02h */ + + +/***** Global declarations of local copies of boards' 8 bit I2C registers ***/ + +extern I2C_CSR2 i2c_csr2; +extern I2C_EVEN_CSR i2c_even_csr; +extern I2C_ODD_CSR i2c_odd_csr; +extern I2C_CONFIG i2c_config; +extern u_char i2c_dt_id; +extern u_char i2c_x_clip_start; +extern u_char i2c_y_clip_start; +extern u_char i2c_x_clip_end; +extern u_char i2c_y_clip_end; +extern u_char i2c_ad_addr; +extern u_char i2c_ad_lut; +extern I2C_AD_CMD i2c_ad_cmd; +extern u_char i2c_dig_out; +extern u_char i2c_pm_lut_addr; +extern u_char i2c_pm_lut_data; + +/* Functions for Global use */ + +/* access 8-bit IIC registers */ + +extern int ReadI2C (u_char * lpReg, u_short wIregIndex, u_char * byVal); +extern int WriteI2C (u_char * lpReg, u_short wIregIndex, u_char byVal); + +#endif diff --git a/drivers/staging/dt3155/dt3155_isr.c b/drivers/staging/dt3155/dt3155_isr.c new file mode 100644 index 000000000000..339aee9a0925 --- /dev/null +++ b/drivers/staging/dt3155/dt3155_isr.c @@ -0,0 +1,545 @@ +/* + +Copyright 1996,2002,2005 Gregory D. Hager, Alfred A. Rizzi, Noah J. Cowan, + Jason Lapenta, Scott Smedley, Greg Sharp + +This file is part of the DT3155 Device Driver. + +The DT3155 Device Driver is free software; you can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The DT3155 Device Driver is distributed in the hope that it will be +useful, but WITHOUT ANY WARRANTY; without even the implied warranty +of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the DT3155 Device Driver; if not, write to the Free +Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, +MA 02111-1307 USA + + File: dt3155_isr.c +Purpose: Buffer management routines, and other routines for the ISR + (the actual isr is in dt3155_drv.c) + +-- Changes -- + + Date Programmer Description of changes made + ------------------------------------------------------------------- + 03-Jul-2000 JML n/a + 02-Apr-2002 SS Mods to make work with separate allocator + module; Merged John Roll's mods to make work with + multiple boards. + 10-Jul-2002 GCS Complete rewrite of setup_buffers to disallow + buffers which span a 4MB boundary. + 24-Jul-2002 SS GPL licence. + 30-Jul-2002 NJC Added support for buffer loop. + 31-Jul-2002 NJC Complete rewrite of buffer management + 02-Aug-2002 NJC Including slab.h instead of malloc.h (no warning). + Also, allocator_init() now returns allocator_max + so cleaned up allocate_buffers() accordingly. + 08-Aug-2005 SS port to 2.6 kernel. + +*/ + +#include +#include +#include +#include + +#include "dt3155.h" +#include "dt3155_drv.h" +#include "dt3155_io.h" +#include "dt3155_isr.h" +#include "allocator.h" + +#define FOUR_MB (0x0400000) /* Can't DMA accross a 4MB boundary!*/ +#define UPPER_10_BITS (0x3FF<<22) /* Can't DMA accross a 4MB boundary!*/ + + +/* Pointer into global structure for handling buffers */ +struct dt3155_fbuffer_s *dt3155_fbuffer[MAXBOARDS] = {NULL +#if MAXBOARDS == 2 + , NULL +#endif +}; + +/****************************************************************************** + * Simple array based que struct + * + * Some handy functions using the buffering structure. + *****************************************************************************/ + + +/*************************** + * are_empty_buffers + * m is minor # of device + ***************************/ +inline bool are_empty_buffers( int m ) +{ + return ( dt3155_fbuffer[ m ]->empty_len ); +} + +/************************** + * push_empty + * m is minor # of device + * + * This is slightly confusing. The number empty_len is the literal # + * of empty buffers. After calling, empty_len-1 is the index into the + * empty buffer stack. So, if empty_len == 1, there is one empty buffer, + * given by dt3155_fbuffer[m]->empty_buffers[0]. + * empty_buffers should never fill up, though this is not checked. + **************************/ +inline void push_empty( int index, int m ) +{ + dt3155_fbuffer[m]->empty_buffers[ dt3155_fbuffer[m]->empty_len ] = index; + dt3155_fbuffer[m]->empty_len++; +} + +/************************** + * pop_empty( m ) + * m is minor # of device + **************************/ +inline int pop_empty( int m ) +{ + dt3155_fbuffer[m]->empty_len--; + return dt3155_fbuffer[m]->empty_buffers[ dt3155_fbuffer[m]->empty_len ]; +} + +/************************* + * is_ready_buf_empty( m ) + * m is minor # of device + *************************/ +inline bool is_ready_buf_empty( int m ) +{ + return ((dt3155_fbuffer[ m ]->ready_len) == 0); +} + +/************************* + * is_ready_buf_full( m ) + * m is minor # of device + * this should *never* be true if there are any active, locked or empty + * buffers, since it corresponds to nbuffers ready buffers!! + * 7/31/02: total rewrite. --NJC + *************************/ +inline bool is_ready_buf_full( int m ) +{ + return ( dt3155_fbuffer[ m ]->ready_len == dt3155_fbuffer[ m ]->nbuffers ); +} + +/***************************************************** + * push_ready( m, buffer ) + * m is minor # of device + * + *****************************************************/ +inline void push_ready( int m, int index ) +{ + int head = dt3155_fbuffer[m]->ready_head; + + dt3155_fbuffer[ m ]->ready_que[ head ] = index; + dt3155_fbuffer[ m ]->ready_head = ( (head + 1) % + (dt3155_fbuffer[ m ]->nbuffers) ); + dt3155_fbuffer[ m ]->ready_len++; + +} + +/***************************************************** + * get_tail() + * m is minor # of device + * + * Simply comptutes the tail given the head and the length. + *****************************************************/ +static inline int get_tail( int m ) +{ + return ((dt3155_fbuffer[ m ]->ready_head - + dt3155_fbuffer[ m ]->ready_len + + dt3155_fbuffer[ m ]->nbuffers)% + (dt3155_fbuffer[ m ]->nbuffers)); +} + + + +/***************************************************** + * pop_ready() + * m is minor # of device + * + * This assumes that there is a ready buffer ready... should + * be checked (e.g. with is_ready_buf_empty() prior to call. + *****************************************************/ +inline int pop_ready( int m ) +{ + int tail; + tail = get_tail(m); + dt3155_fbuffer[ m ]->ready_len--; + return dt3155_fbuffer[ m ]->ready_que[ tail ]; +} + + +/***************************************************** + * printques + * m is minor # of device + *****************************************************/ +inline void printques( int m ) +{ + int head = dt3155_fbuffer[ m ]->ready_head; + int tail; + int num = dt3155_fbuffer[ m ]->nbuffers; + int frame_index; + int index; + + tail = get_tail(m); + + printk("\n R:"); + for ( index = tail; index != head; index++, index = index % (num) ) + { + frame_index = dt3155_fbuffer[ m ]->ready_que[ index ]; + printk(" %d ", frame_index ); + } + + printk("\n E:"); + for ( index = 0; index < dt3155_fbuffer[ m ]->empty_len; index++ ) + { + frame_index = dt3155_fbuffer[ m ]->empty_buffers[ index ]; + printk(" %d ", frame_index ); + } + + frame_index = dt3155_fbuffer[ m ]->active_buf; + printk("\n A: %d", frame_index); + + frame_index = dt3155_fbuffer[ m ]->locked_buf; + printk("\n L: %d \n", frame_index ); + +} + +/***************************************************** + * adjust_4MB + * + * If a buffer intersects the 4MB boundary, push + * the start address up to the beginning of the + * next 4MB chunk (assuming bufsize < 4MB). + *****************************************************/ +u_long adjust_4MB (u_long buf_addr, u_long bufsize) { + if (((buf_addr+bufsize) & UPPER_10_BITS) != (buf_addr & UPPER_10_BITS)) + return (buf_addr+bufsize) & UPPER_10_BITS; + else + return buf_addr; +} + + +/***************************************************** + * allocate_buffers + * + * Try to allocate enough memory for all requested + * buffers. If there is not enough free space + * try for less memory. + *****************************************************/ +void allocate_buffers (u_long *buf_addr, u_long* total_size_kbs, + u_long bufsize) +{ + /* Compute the minimum amount of memory guaranteed to hold all + MAXBUFFERS such that no buffer crosses the 4MB boundary. + Store this value in the variable "full_size" */ + + u_long allocator_max; + u_long bufs_per_chunk = (FOUR_MB / bufsize); + u_long filled_chunks = (MAXBUFFERS-1) / bufs_per_chunk; + u_long leftover_bufs = MAXBUFFERS - filled_chunks * bufs_per_chunk; + + u_long full_size = bufsize /* possibly unusable part of 1st chunk */ + + filled_chunks * FOUR_MB /* max # of completely filled 4mb chunks */ + + leftover_bufs * bufsize; /* these buffs will be in a partly filled + chunk at beginning or end */ + + u_long full_size_kbs = 1 + (full_size-1) / 1024; + u_long min_size_kbs = 2*ndevices*bufsize / 1024; + u_long size_kbs; + + /* Now, try to allocate full_size. If this fails, keep trying for + less & less memory until it succeeds. */ +#ifndef STANDALONE_ALLOCATOR + /* initialize the allocator */ + allocator_init(&allocator_max); +#endif + size_kbs = full_size_kbs; + *buf_addr = 0; + printk ("DT3155: We would like to get: %d KB\n", (u_int)(full_size_kbs)); + printk ("DT3155: ...but need at least: %d KB\n", (u_int)(min_size_kbs)); + printk ("DT3155: ...the allocator has: %d KB\n", (u_int)(allocator_max)); + size_kbs = (full_size_kbs <= allocator_max ? full_size_kbs : allocator_max); + if (size_kbs > min_size_kbs) { + if ((*buf_addr = allocator_allocate_dma (size_kbs, GFP_KERNEL)) != 0) { + printk ("DT3155: Managed to allocate: %d KB\n", (u_int)size_kbs); + *total_size_kbs = size_kbs; + return; + } + } + /* If we got here, the allocation failed */ + printk ("DT3155: Allocator failed!\n"); + *buf_addr = 0; + *total_size_kbs = 0; + return; + +} + + +/***************************************************** + * dt3155_setup_buffers + * + * setup_buffers just puts the buffering system into + * a consistent state before the start of interrupts + * + * JML : it looks like all the buffers need to be + * continuous. So I'm going to try and allocate one + * continuous buffer. + * + * GCS : Fix DMA problems when buffer spans + * 4MB boundary. Also, add error checking. This + * function will return -ENOMEM when not enough memory. + *****************************************************/ +u_long dt3155_setup_buffers(u_long *allocatorAddr) + +{ + u_long index; + u_long rambuff_addr; /* start of allocation */ + u_long rambuff_size; /* total size allocated to driver */ + u_long rambuff_acm; /* accumlator, keep track of how much + is left after being split up*/ + u_long rambuff_end; /* end of rambuff */ + u_long numbufs; /* number of useful buffers allocated (per device) */ + u_long bufsize = DT3155_MAX_ROWS * DT3155_MAX_COLS; + int m; /* minor # of device, looped for all devs */ + + /* zero the fbuffer status and address structure */ + for ( m = 0; m < ndevices; m++) + { + dt3155_fbuffer[ m ] = &(dt3155_status[ m ].fbuffer); + + /* Make sure the buffering variables are consistent */ + { + u_char *ptr = (u_char *) dt3155_fbuffer[ m ]; + for( index = 0; index < sizeof(struct dt3155_fbuffer_s); index++) + *(ptr++)=0; + } + } + + /* allocate a large contiguous chunk of RAM */ + allocate_buffers (&rambuff_addr, &rambuff_size, bufsize); + printk( "DT3155: mem info\n" ); + printk( " - rambuf_addr = 0x%x \n", (u_int)rambuff_addr ); + printk( " - length (kb) = %u \n", (u_int)rambuff_size ); + if( rambuff_addr == 0 ) + { + printk( KERN_INFO + "DT3155: Error setup_buffers() allocator dma failed \n" ); + return -ENOMEM; + } + *allocatorAddr = rambuff_addr; + rambuff_end = rambuff_addr + 1024 * rambuff_size; + + /* after allocation, we need to count how many useful buffers there + are so we can give an equal number to each device */ + rambuff_acm = rambuff_addr; + for ( index = 0; index < MAXBUFFERS; index++) { + rambuff_acm = adjust_4MB (rambuff_acm, bufsize);/*avoid spanning 4MB bdry*/ + if (rambuff_acm + bufsize > rambuff_end) + break; + rambuff_acm += bufsize; + } + /* Following line is OK, will waste buffers if index + * not evenly divisible by ndevices -NJC*/ + numbufs = index / ndevices; + printk (" - numbufs = %u\n", (u_int) numbufs); + if (numbufs < 2) { + printk( KERN_INFO + "DT3155: Error setup_buffers() couldn't allocate 2 bufs/board\n" ); + return -ENOMEM; + } + + /* now that we have board memory we spit it up */ + /* between the boards and the buffers */ + rambuff_acm = rambuff_addr; + for ( m = 0; m < ndevices; m ++) + { + rambuff_acm = adjust_4MB (rambuff_acm, bufsize); + + /* Save the start of this boards buffer space (for mmap). */ + dt3155_status[ m ].mem_addr = rambuff_acm; + + for (index = 0; index < numbufs; index++) + { + rambuff_acm = adjust_4MB (rambuff_acm, bufsize); + if (rambuff_acm + bufsize > rambuff_end) { + /* Should never happen */ + printk ("DT3155 PROGRAM ERROR (GCS)\n" + "Error distributing allocated buffers\n"); + return -ENOMEM; + } + + dt3155_fbuffer[ m ]->frame_info[ index ].addr = rambuff_acm; + push_empty( index, m ); + /* printk(" - Buffer : %lx\n", + * dt3155_fbuffer[ m ]->frame_info[ index ].addr ); + */ + dt3155_fbuffer[ m ]->nbuffers += 1; + rambuff_acm += bufsize; + } + + /* Make sure there is an active buffer there. */ + dt3155_fbuffer[ m ]->active_buf = pop_empty( m ); + dt3155_fbuffer[ m ]->even_happened = 0; + dt3155_fbuffer[ m ]->even_stopped = 0; + + /* make sure there is no locked_buf JML 2/28/00 */ + dt3155_fbuffer[ m ]->locked_buf = -1; + + dt3155_status[ m ].mem_size = + rambuff_acm - dt3155_status[ m ].mem_addr; + + /* setup the ready queue */ + dt3155_fbuffer[ m ]->ready_head = 0; + dt3155_fbuffer[ m ]->ready_len = 0; + printk("Available buffers for device %d: %d\n", + m, dt3155_fbuffer[ m ]->nbuffers); + } + + return 1; +} + +/***************************************************** + * internal_release_locked_buffer + * + * The internal function for releasing a locked buffer. + * It assumes interrupts are turned off. + * + * m is minor number of device + *****************************************************/ +static inline void internal_release_locked_buffer( int m ) +{ + /* Pointer into global structure for handling buffers */ + if ( dt3155_fbuffer[ m ]->locked_buf >= 0 ) + { + push_empty( dt3155_fbuffer[ m ]->locked_buf, m ); + dt3155_fbuffer[ m ]->locked_buf = -1; + } +} + + +/***************************************************** + * dt3155_release_locked_buffer() + * m is minor # of device + * + * The user function of the above. + * + *****************************************************/ +inline void dt3155_release_locked_buffer( int m ) +{ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + unsigned long int flags; + local_save_flags(flags); + local_irq_disable(); + internal_release_locked_buffer(m); + local_irq_restore(flags); +#else + int flags; + + save_flags( flags ); + cli(); + internal_release_locked_buffer( m ); + restore_flags( flags ); +#endif +} + + +/***************************************************** + * dt3155_flush() + * m is minor # of device + * + *****************************************************/ +inline int dt3155_flush( int m ) +{ + int index; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + unsigned long int flags; + local_save_flags(flags); + local_irq_disable(); +#else + int flags; + save_flags( flags ); + cli(); +#endif + + internal_release_locked_buffer( m ); + dt3155_fbuffer[ m ]->empty_len = 0; + + for ( index = 0; index < dt3155_fbuffer[ m ]->nbuffers; index++ ) + push_empty( index, m ); + + /* Make sure there is an active buffer there. */ + dt3155_fbuffer[ m ]->active_buf = pop_empty( m ); + + dt3155_fbuffer[ m ]->even_happened = 0; + dt3155_fbuffer[ m ]->even_stopped = 0; + + /* setup the ready queue */ + dt3155_fbuffer[ m ]->ready_head = 0; + dt3155_fbuffer[ m ]->ready_len = 0; + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + local_irq_restore(flags); +#else + restore_flags( flags ); +#endif + + return 0; +} + +/***************************************************** + * dt3155_get_ready_buffer() + * m is minor # of device + * + * get_ready_buffer will grab the next chunk of data + * if it is already there, otherwise it returns 0. + * If the user has a buffer locked it will unlock + * that buffer before returning the new one. + *****************************************************/ +inline int dt3155_get_ready_buffer( int m ) +{ + int frame_index; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + unsigned long int flags; + local_save_flags(flags); + local_irq_disable(); +#else + int flags; + save_flags( flags ); + cli(); +#endif + +#ifdef DEBUG_QUES_A + printques( m ); +#endif + + internal_release_locked_buffer( m ); + + if (is_ready_buf_empty( m )) + frame_index = -1; + else + { + frame_index = pop_ready( m ); + dt3155_fbuffer[ m ]->locked_buf = frame_index; + } + +#ifdef DEBUG_QUES_B + printques( m ); +#endif + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + local_irq_restore(flags); +#else + restore_flags( flags ); +#endif + + return frame_index; +} diff --git a/drivers/staging/dt3155/dt3155_isr.h b/drivers/staging/dt3155/dt3155_isr.h new file mode 100644 index 000000000000..b117b504e277 --- /dev/null +++ b/drivers/staging/dt3155/dt3155_isr.h @@ -0,0 +1,77 @@ +/* + +Copyright 1996,2002 Gregory D. Hager, Alfred A. Rizzi, Noah J. Cowan, + Jason Lapenta, Scott Smedley + +This file is part of the DT3155 Device Driver. + +The DT3155 Device Driver is free software; you can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The DT3155 Device Driver is distributed in the hope that it will be +useful, but WITHOUT ANY WARRANTY; without even the implied warranty +of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the DT3155 Device Driver; if not, write to the Free +Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, +MA 02111-1307 USA + + +-- Changes -- + + Date Programmer Description of changes made + ------------------------------------------------------------------- + 03-Jul-2000 JML n/a + 24-Jul-2002 SS GPL licence. + 26-Oct-2009 SS Porting to 2.6.30 kernel. + +-- notes -- + +*/ + +#ifndef DT3155_ISR_H +#define DT3155_ISR_H + +extern struct dt3155_fbuffer_s *dt3155_fbuffer[MAXBOARDS]; + +/* User functions for buffering */ +/* Initialize the buffering system. This should */ +/* be called prior to enabling interrupts */ + +u_long dt3155_setup_buffers(u_long *allocatorAddr); + +/* Get the next frame of data if it is ready. Returns */ +/* zero if no data is ready. If there is data but */ +/* the user has a locked buffer, it will unlock that */ +/* buffer and return it to the free list. */ + +int dt3155_get_ready_buffer(int minor); + +/* Return a locked buffer to the free list */ + +void dt3155_release_locked_buffer(int minor); + +/* Flush the buffer system */ +int dt3155_flush(int minor); + +/********************************** + * Simple array based que struct + **********************************/ + +bool are_empty_buffers( int minor ); +void push_empty( int index, int minor ); + +int pop_empty( int minor ); + +bool is_ready_buf_empty( int minor ); +bool is_ready_buf_full( int minor ); + +void push_ready( int minor, int index ); +int pop_ready( int minor ); + + +#endif diff --git a/drivers/staging/dt3155/pci-compat.h b/drivers/staging/dt3155/pci-compat.h new file mode 100644 index 000000000000..5f47d5a94d4b --- /dev/null +++ b/drivers/staging/dt3155/pci-compat.h @@ -0,0 +1,97 @@ + +/* This header only makes send when included in a 2.0 compile */ + +#ifndef _PCI_COMPAT_H_ +#define _PCI_COMPAT_H_ + +#ifdef __KERNEL__ + +#include /* pcibios_* */ +#include /* pcibios_* */ +#include /* kmalloc */ + +/* fake the new pci interface based on the old one: encapsulate bus/devfn */ +struct pci_fake_dev { + u8 bus; + u8 devfn; + int index; +}; +#define pci_dev pci_fake_dev /* the other pci_dev is unused by 2.0 drivers */ + +extern inline struct pci_dev *pci_find_device(unsigned int vendorid, + unsigned int devid, + struct pci_dev *from) +{ + struct pci_dev *pptr = kmalloc(sizeof(*pptr), GFP_KERNEL); + int index = 0; + int ret; + + if (!pptr) return NULL; + if (from) index = pptr->index + 1; + ret = pcibios_find_device(vendorid, devid, index, + &pptr->bus, &pptr->devfn); + if (ret) { kfree(pptr); return NULL; } + return pptr; +} + +extern inline struct pci_dev *pci_find_class(unsigned int class, + struct pci_dev *from) +{ + return NULL; /* FIXME */ +} + +extern inline void pci_release_device(struct pci_dev *dev) +{ + kfree(dev); +} + +/* struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); */ + +#define pci_present pcibios_present + +extern inline int +pci_read_config_byte(struct pci_dev *dev, u8 where, u8 *val) +{ + return pcibios_read_config_byte(dev->bus, dev->devfn, where, val); +} + +extern inline int +pci_read_config_word(struct pci_dev *dev, u8 where, u16 *val) +{ + return pcibios_read_config_word(dev->bus, dev->devfn, where, val); +} + +extern inline int +pci_read_config_dword(struct pci_dev *dev, u8 where, u32 *val) +{ + return pcibios_read_config_dword(dev->bus, dev->devfn, where, val); +} + +extern inline int +pci_write_config_byte(struct pci_dev *dev, u8 where, u8 val) +{ + return pcibios_write_config_byte(dev->bus, dev->devfn, where, val); +} + +extern inline int +pci_write_config_word(struct pci_dev *dev, u8 where, u16 val) +{ + return pcibios_write_config_word(dev->bus, dev->devfn, where, val); +} + +extern inline int +pci_write_config_dword(struct pci_dev *dev, u8 where, u32 val) +{ + return pcibios_write_config_dword(dev->bus, dev->devfn, where, val); +} + +extern inline void pci_set_master(struct pci_dev *dev) +{ + u16 cmd; + pcibios_read_config_word(dev->bus, dev->devfn, PCI_COMMAND, &cmd); + cmd |= PCI_COMMAND_MASTER; + pcibios_write_config_word(dev->bus, dev->devfn, PCI_COMMAND, cmd); +} + +#endif /* __KERNEL__ */ +#endif /* _PCI_COMPAT_H_ */ diff --git a/drivers/staging/dt3155/sysdep.h b/drivers/staging/dt3155/sysdep.h new file mode 100644 index 000000000000..1d575d4a53ee --- /dev/null +++ b/drivers/staging/dt3155/sysdep.h @@ -0,0 +1,820 @@ +/* + * sysdep.h -- centralizing compatibility issues between 2.0, 2.2, 2.4 + * + * Copyright (C) 2001 Alessandro Rubini and Jonathan Corbet + * Copyright (C) 2001 O'Reilly & Associates + * + * The source code in this file can be freely used, adapted, + * and redistributed in source or binary form, so long as an + * acknowledgment appears in derived source files. The citation + * should list that the code comes from the book "Linux Device + * Drivers" by Alessandro Rubini and Jonathan Corbet, published + * by O'Reilly & Associates. No warranty is attached; + * we cannot take responsibility for errors or fitness for use. + * + * $Id: sysdep.h,v 1.2 2005/08/09 06:08:51 ssmedley Exp $ + */ + + +#ifndef _SYSDEP_H_ +#define _SYSDEP_H_ + +#ifndef LINUX_VERSION_CODE +# include +#endif + +#ifndef KERNEL_VERSION /* pre-2.1.90 didn't have it */ +# define KERNEL_VERSION(vers,rel,seq) ( ((vers)<<16) | ((rel)<<8) | (seq) ) +#endif + +/* only allow 2.0.x 2.2.y and 2.4.z */ + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,0,0) /* not < 2.0 */ +# error "This kernel is too old: not supported by this file" +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,7,0) /* not > 2.7, by now */ +# error "This kernel is too recent: not supported by this file" +#endif +#if (LINUX_VERSION_CODE & 0xff00) == 1 /* not 2.1 */ +# error "Please don't use linux-2.1, use 2.2, 2.4 or 2.6 instead" +#endif +#if (LINUX_VERSION_CODE & 0xff00) == 3 /* not 2.3 */ +# error "Please don't use linux-2.3, use 2.4 or 2.6 instead" +#endif + +/* remember about the current version */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0) +# define LINUX_20 +#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) +# define LINUX_22 +#else +# define LINUX_24 +#endif + +/* we can't support versioning in pre-2.4 because we #define some functions */ +#if !defined(LINUX_24) && defined(CONFIG_MODVERSIONS) +# error "This sysdep.h can't support CONFIG_MODVERSIONS" +# error "and old kernels at the same time." +# error "Either use 2.4 or avoid using versioning" +#endif + +#ifndef LINUX_20 /* include vmalloc.h if this is 2.2/2.4 */ +# ifdef VM_READ /* a typical flag defined by mm.h */ +# include +# endif +#endif + +#include + +/* Modularization issues */ +#ifdef LINUX_20 +# define __USE_OLD_SYMTAB__ +# define EXPORT_NO_SYMBOLS register_symtab(NULL); +# define REGISTER_SYMTAB(tab) register_symtab(tab) +#else +# define REGISTER_SYMTAB(tab) /* nothing */ +#endif + +#ifdef __USE_OLD_SYMTAB__ +# define __MODULE_STRING(s) /* nothing */ +# define MODULE_PARM(v,t) /* nothing */ +# define MODULE_PARM_DESC(v,t) /* nothing */ +# define MODULE_AUTHOR(n) /* nothing */ +# define MODULE_DESCRIPTION(d) /* nothing */ +# define MODULE_SUPPORTED_DEVICE(n) /* nothing */ +#endif + +/* + * In version 2.2 (up to 2.2.19, at least), the macro for request_module() + * when no kmod is there is wrong. It's a "do {} while 0" but it shouldbe int + */ +#ifdef LINUX_22 +# ifndef CONFIG_KMOD +# undef request_module +# define request_module(name) -ENOSYS +# endif +#endif + + +#ifndef LINUX_20 +# include /* module_init/module_exit */ +#endif + +#ifndef module_init +# define module_init(x) int init_module(void) { return x(); } +# define module_exit(x) void cleanup_module(void) { x(); } +#endif + +#ifndef SET_MODULE_OWNER +# define SET_MODULE_OWNER(structure) /* nothing */ +#endif + +/* + * "select" changed in 2.1.23. The implementation is twin, but this + * header is new + * + */ +#ifdef LINUX_20 +# define __USE_OLD_SELECT__ +#else +# include +#endif + +#ifdef LINUX_20 +# define INODE_FROM_F(filp) ((filp)->f_inode) +#else +# define INODE_FROM_F(filp) ((filp)->f_dentry->d_inode) +#endif + +/* Other changes in the fops are solved using wrappers */ + +/* + * Wait queues changed with 2.3 + */ +#ifndef DECLARE_WAIT_QUEUE_HEAD +# define DECLARE_WAIT_QUEUE_HEAD(head) struct wait_queue *head = NULL + typedef struct wait_queue *wait_queue_head_t; +# define init_waitqueue_head(head) (*(head)) = NULL + +/* offer wake_up_sync as an alias for wake_up */ +# define wake_up_sync(head) wake_up(head) +# define wake_up_interruptible_sync(head) wake_up_interruptible(head) + +/* Pretend we have add_wait_queue_exclusive */ +# define add_wait_queue_exclusive(q,entry) add_wait_queue ((q), (entry)) + +#endif /* no DECLARE_WAIT_QUEUE_HEAD */ + +/* + * Define wait_event for 2.0 kernels. (This ripped off directly from + * the 2.2.18 sched.h) + */ +#ifdef LINUX_20 + +#define __wait_event(wq, condition) \ +do { \ + struct wait_queue __wait; \ + \ + __wait.task = current; \ + add_wait_queue(&wq, &__wait); \ + for (;;) { \ + current->state = TASK_UNINTERRUPTIBLE; \ + mb(); \ + if (condition) \ + break; \ + schedule(); \ + } \ + current->state = TASK_RUNNING; \ + remove_wait_queue(&wq, &__wait); \ +} while (0) + +#define wait_event(wq, condition) \ +do { \ + if (condition) \ + break; \ + __wait_event(wq, condition); \ +} while (0) + +#define __wait_event_interruptible(wq, condition, ret) \ +do { \ + struct wait_queue __wait; \ + \ + __wait.task = current; \ + add_wait_queue(&wq, &__wait); \ + for (;;) { \ + current->state = TASK_INTERRUPTIBLE; \ + mb(); \ + if (condition) \ + break; \ + if (!signal_pending(current)) { \ + schedule(); \ + continue; \ + } \ + ret = -ERESTARTSYS; \ + break; \ + } \ + current->state = TASK_RUNNING; \ + remove_wait_queue(&wq, &__wait); \ +} while (0) + +#define wait_event_interruptible(wq, condition) \ +({ \ + int __ret = 0; \ + if (!(condition)) \ + __wait_event_interruptible(wq, condition, __ret); \ + __ret; \ +}) +#endif + + +/* + * 2.3 added tasklets + */ +#ifdef LINUX_24 +# define HAVE_TASKLETS +#endif + + + + +/* FIXME: implement the other versions of wake_up etc */ + + +/* + * access to user space: use the 2.2 functions, + * and implement them as macros for 2.0 + */ + +#ifdef LINUX_20 +# include +# define access_ok(t,a,sz) (verify_area((t),(void *) (a),(sz)) ? 0 : 1) +# define verify_area_20 verify_area +# define copy_to_user(t,f,n) (memcpy_tofs((t), (f), (n)), 0) +# define copy_from_user(t,f,n) (memcpy_fromfs((t), (f), (n)), 0) +# define __copy_to_user(t,f,n) copy_to_user((t), (f), (n)) +# define __copy_from_user(t,f,n) copy_from_user((t), (f), (n)) + +# define PUT_USER(val,add) (put_user((val),(add)), 0) +# define __PUT_USER(val,add) PUT_USER((val),(add)) + +# define GET_USER(dest,add) ((dest)=get_user((add)), 0) +# define __GET_USER(dest,add) GET_USER((dest),(add)) +#else +# include +# include +# define verify_area_20(t,a,sz) (0) /* == success */ +# define PUT_USER put_user +# define __PUT_USER __put_user +# define GET_USER get_user +# define __GET_USER __get_user +#endif + +/* + * Allocation issues + */ +#ifdef GFP_USER /* only if mm.h has been included */ +# ifdef LINUX_20 +# define __GFP_DMA GFP_DMA /* 2.0 didn't have the leading __ */ +# endif +# ifndef LINUX_24 +# define __GFP_HIGHMEM 0 /* was not there */ +# define GFP_HIGHUSER 0 /* idem */ +# endif + +# ifdef LINUX_20 +# define __get_free_pages(a,b) __get_free_pages((a),(b),0) +# endif +# ifndef LINUX_24 +# define get_zeroed_page get_free_page +# endif +#endif + +/* ioremap */ +#if defined(LINUX_20) && defined(_LINUX_MM_H) +# define ioremap_nocache ioremap +# ifndef __i386__ + /* This simple approach works for non-PC platforms. */ +# define ioremap vremap +# define iounmap vfree +# else /* the PC has ISA; 2.2 and 2.4 remap it, 2.0 needs not */ +extern inline void *ioremap(unsigned long phys_addr, unsigned long size) +{ + if (phys_addr >= 0xA0000 && phys_addr + size <= 0x100000) + return (void *)phys_addr; + return vremap(phys_addr, size); +} + +extern inline void iounmap(void *addr) +{ + if ((unsigned long)addr >= 0xA0000 + && (unsigned long)addr < 0x100000) + return; + vfree(addr); +} +# endif +#endif + +/* Also, define check_mem_region etc */ +#ifndef LINUX_24 +# define check_mem_region(a,b) 0 /* success */ +# define request_mem_region(a,b,c) /* nothing */ +# define release_mem_region(a,b) /* nothing */ +#endif + +/* implement capable() for 2.0 */ +#ifdef LINUX_20 +# define capable(anything) suser() +#endif + +/* The use_count of exec_domain and binfmt changed in 2.1.23 */ + +#ifdef LINUX_20 +# define INCRCOUNT(p) ((p)->module ? __MOD_INC_USE_COUNT((p)->module) : 0) +# define DECRCOUNT(p) ((p)->module ? __MOD_DEC_USE_COUNT((p)->module) : 0) +# define CURRCOUNT(p) ((p)->module && (p)->module->usecount) +#else +# define INCRCOUNT(p) ((p)->use_count++) +# define DECRCOUNT(p) ((p)->use_count--) +# define CURRCOUNT(p) ((p)->use_count) +#endif + +/* + * /proc has changed a lot across the versions... + */ +#ifdef LINUX_20 +# define USE_PROC_REGISTER +#endif + + +/* + * 2.2 didn't have create_proc_{read|info}_entry yet. + * And it looks like there are no other "interesting" entry point, as + * the rest is somehow esotique (mknod, symlink, ...) + */ +#ifdef LINUX_22 +# ifdef PROC_SUPER_MAGIC /* Only if procfs is being used */ +extern inline struct proc_dir_entry *create_proc_read_entry(const char *name, + mode_t mode, struct proc_dir_entry *base, + read_proc_t *read_proc, void * data) +{ + struct proc_dir_entry *res=create_proc_entry(name,mode,base); + if (res) { + res->read_proc=read_proc; + res->data=data; + } + return res; +} + +# ifndef create_proc_info_entry /* added in 2.2.18 */ +typedef int (get_info_t)(char *, char **, off_t, int, int); +extern inline struct proc_dir_entry *create_proc_info_entry(const char *name, + mode_t mode, struct proc_dir_entry *base, get_info_t *get_info) +{ + struct proc_dir_entry *res=create_proc_entry(name,mode,base); + if (res) res->get_info=get_info; + return res; +} +# endif /* no create_proc_info_entry */ +# endif +#endif + +#ifdef LINUX_20 +# define test_and_set_bit(nr,addr) test_bit((nr),(addr)) +# define test_and_clear_bit(nr,addr) clear_bit((nr),(addr)) +# define test_and_change_bit(nr,addr) change_bit((nr),(addr)) +#endif + + +/* 2.0 had no read and write memory barriers, and 2.2 lacks the + set_ functions */ +#ifndef LINUX_24 +# ifdef LINUX_20 +# define wmb() mb() /* this is a big penalty on non-reordering platfs */ +# define rmb() mb() /* this is a big penalty on non-reordering platfs */ +# endif /* LINUX_20 */ + +#define set_mb() do { var = value; mb(); } while (0) +#define set_wmb() do { var = value; wmb(); } while (0) +#endif /* ! LINUX_24 */ + + + +/* 2.1.30 removed these functions. Let's define them, just in case */ +#ifndef LINUX_20 +# define queue_task_irq queue_task +# define queue_task_irq_off queue_task +#endif + +/* 2.1.10 and 2.1.43 introduced new functions. They are worth using */ + +#ifdef LINUX_20 + +# include +# ifdef __LITTLE_ENDIAN +# define cpu_to_le16(x) (x) +# define cpu_to_le32(x) (x) +# define cpu_to_be16(x) htons((x)) +# define cpu_to_be32(x) htonl((x)) +# else +# define cpu_to_be16(x) (x) +# define cpu_to_be32(x) (x) + extern inline __u16 cpu_to_le16(__u16 x) { return (x<<8) | (x>>8);} + extern inline __u32 cpu_to_le32(__u32 x) { return (x>>24) | + ((x>>8)&0xff00) | ((x<<8)&0xff0000) | (x<<24);} +# endif + +# define le16_to_cpu(x) cpu_to_le16(x) +# define le32_to_cpu(x) cpu_to_le32(x) +# define be16_to_cpu(x) cpu_to_be16(x) +# define be32_to_cpu(x) cpu_to_be32(x) + +# define cpu_to_le16p(addr) (cpu_to_le16(*(addr))) +# define cpu_to_le32p(addr) (cpu_to_le32(*(addr))) +# define cpu_to_be16p(addr) (cpu_to_be16(*(addr))) +# define cpu_to_be32p(addr) (cpu_to_be32(*(addr))) + + extern inline void cpu_to_le16s(__u16 *a) {*a = cpu_to_le16(*a);} + extern inline void cpu_to_le32s(__u16 *a) {*a = cpu_to_le32(*a);} + extern inline void cpu_to_be16s(__u16 *a) {*a = cpu_to_be16(*a);} + extern inline void cpu_to_be32s(__u16 *a) {*a = cpu_to_be32(*a);} + +# define le16_to_cpup(x) cpu_to_le16p(x) +# define le32_to_cpup(x) cpu_to_le32p(x) +# define be16_to_cpup(x) cpu_to_be16p(x) +# define be32_to_cpup(x) cpu_to_be32p(x) + +# define le16_to_cpus(x) cpu_to_le16s(x) +# define le32_to_cpus(x) cpu_to_le32s(x) +# define be16_to_cpus(x) cpu_to_be16s(x) +# define be32_to_cpus(x) cpu_to_be32s(x) + +#endif + +#ifdef LINUX_20 +# define __USE_OLD_REBUILD_HEADER__ +#endif + +/* + * 2.0 didn't include sema_init, so we make our own - but only if it + * looks like semaphore.h got included. + */ +#ifdef LINUX_20 +# ifdef MUTEX_LOCKED /* Only if semaphore.h included */ + extern inline void sema_init (struct semaphore *sem, int val) + { + sem->count = val; + sem->waking = sem->lock = 0; + sem->wait = NULL; + } +# endif +#endif /* LINUX_20 */ + +/* + * In 2.0, there is no real need for spinlocks, and they weren't really + * implemented anyway. + * + * XXX the _irqsave variant should be defined eventually to do the + * right thing. + */ +#ifdef LINUX_20 +typedef int spinlock_t; +# define spin_lock(lock) +# define spin_unlock(lock) +# define spin_lock_init(lock) + +# define spin_lock_irqsave(lock,flags) do { \ + save_flags(flags); cli(); } while (0); +# define spin_unlock_irqrestore(lock,flags) restore_flags(flags); +#endif + +/* + * 2.1 stuffed the "flush" method into the middle of the file_operations + * structure. The FOP_NO_FLUSH symbol is for drivers that do not implement + * flush (most of them), it can be inserted in initializers for all 2.x + * kernel versions. + */ +#ifdef LINUX_20 +# define FOP_NO_FLUSH /* nothing */ +# define TAG_LLSEEK lseek +# define TAG_POLL select +#else +# define FOP_NO_FLUSH NULL, +# define TAG_LLSEEK llseek +# define TAG_POLL poll +#endif + + + +/* + * fasync changed in 2.2. + */ +#ifdef LINUX_20 +/* typedef struct inode *fasync_file; */ +# define fasync_file struct inode * +#else + typedef int fasync_file; +#endif + +/* kill_fasync had less arguments, and a different indirection in the first */ +#ifndef LINUX_24 +# define kill_fasync(ptrptr,sig,band) kill_fasync(*(ptrptr),(sig)) +#endif + +/* other things that are virtualized: define the new functions for the old k */ +#ifdef LINUX_20 +# define in_interrupt() (intr_count!=0) +# define mdelay(x) udelay((x)*1000) +# define signal_pending(current) ((current)->signal & ~(current)->blocked) +#endif + +#ifdef LINUX_PCI_H /* only if PCI stuff is being used */ +# ifdef LINUX_20 +# include "pci-compat.h" /* a whole set of replacement functions */ +# else +# define pci_release_device(d) /* placeholder, used in 2.0 to free stuff */ +# endif +#endif + + + +/* + * Some task state stuff + */ + +#ifndef set_current_state +# define set_current_state(s) current->state = (s); +#endif + +#ifdef LINUX_20 +extern inline void schedule_timeout(int timeout) +{ + current->timeout = jiffies + timeout; + current->state = TASK_INTERRUPTIBLE; + schedule(); + current->timeout = 0; +} + +extern inline long sleep_on_timeout(wait_queue_head_t *q, signed long timeout) +{ + signed long early = 0; + + current->timeout = jiffies + timeout; + sleep_on (q); + if (current->timeout > 0) { + early = current->timeout - jiffies; + current->timeout = 0; + } + return early; +} + + +extern inline long interruptible_sleep_on_timeout(wait_queue_head_t *q, + signed long timeout) +{ + signed long early = 0; + + current->timeout = jiffies + timeout; + interruptible_sleep_on (q); + if (current->timeout > 0) { + early = current->timeout - jiffies; + current->timeout = 0; + } + return early; +} + +#endif /* LINUX_20 */ + +/* + * Schedule_task was a late 2.4 addition. + */ +#ifndef LINUX_24 +extern inline int schedule_task(struct tq_struct *task) +{ + queue_task(task, &tq_scheduler); + return 1; +} +#endif + + +/* + * Timing issues + */ +#ifdef LINUX_20 +# define get_fast_time do_gettimeofday +#endif + +#ifdef _LINUX_DELAY_H /* only if linux/delay.h is included */ +# ifndef mdelay /* linux-2.0 */ +# ifndef MAX_UDELAY_MS +# define MAX_UDELAY_MS 5 +# endif +# define mdelay(n) (\ + (__builtin_constant_p(n) && (n)<=MAX_UDELAY_MS) ? udelay((n)*1000) : \ + ({unsigned long msec=(n); while (msec--) udelay(1000);})) +# endif /* mdelay */ +#endif /* _LINUX_DELAY_H */ + + +/* + * No del_timer_sync before 2.4 + */ +#ifndef LINUX_24 +# define del_timer_sync(timer) del_timer(timer) /* and hope */ +#endif + +/* + * mod_timer wasn't present in 2.0 + */ +#ifdef LINUX_20 +static inline int mod_timer(struct timer_list *timer, unsigned long expires) +{ + int pending = del_timer(timer); + if (pending) { + timer->expires = expires; + add_timer(timer); + } + return pending; +} +#endif +/* + * Various changes in mmap and friends. + */ + +#ifndef NOPAGE_SIGBUS +# define NOPAGE_SIGBUS NULL /* return value of the nopage memory method */ +# define NOPAGE_OOM NULL /* No real equivalent in older kernels */ +#endif + +#ifndef VM_RESERVED /* Added 2.4.0-test10 */ +# define VM_RESERVED 0 +#endif + +#ifdef LINUX_24 /* use "vm_pgoff" to get an offset */ +#define VMA_OFFSET(vma) ((vma)->vm_pgoff << PAGE_SHIFT) +#else /* use "vm_offset" */ +#define VMA_OFFSET(vma) ((vma)->vm_offset) +#endif + +#ifdef MAP_NR +#define virt_to_page(page) (mem_map + MAP_NR(page)) +#endif + +#ifndef get_page +# define get_page(p) atomic_inc(&(p)->count) +#endif + +/* + * No DMA lock in 2.0. + */ +#ifdef LINUX_20 +static inline unsigned long claim_dma_lock(void) +{ + unsigned long flags; + save_flags(flags); + cli(); + return flags; +} + +static inline void release_dma_lock(unsigned long flags) +{ + restore_flags(flags); +} +#endif + + +/* + * I/O memory was not managed by ealier kernels, define them as success + */ + +#if 0 /* FIXME: what is the right way to do request_mem_region? */ +#ifndef LINUX_24 +# define check_mem_region(start, len) 0 +# define request_mem_region(start, len, name) 0 +# define release_mem_region(start, len) 0 + + /* + * Also, request_ and release_ region used to return void. Return 0 instead + */ +# define request_region(s, l, n) ({request_region((s),(l),(n));0;}) +# define release_region(s, l) ({release_region((s),(l));0;}) + +#endif /* not LINUX_24 */ +#endif + +/* + * Block layer stuff. + */ +#ifndef LINUX_24 + +/* BLK_DEFAULT_QUEUE for use with these macros only!!!! */ +#define BLK_DEFAULT_QUEUE(major) blk_dev[(major)].request_fn +#define blk_init_queue(where,request_fn) where = request_fn; +#define blk_cleanup_queue(where) where = NULL; + +/* No QUEUE_EMPTY in older kernels */ +#ifndef QUEUE_EMPTY /* Driver can redefine it too */ +# define QUEUE_EMPTY (CURRENT != NULL) +#endif + +#ifdef RO_IOCTLS +static inline int blk_ioctl(kdev_t dev, unsigned int cmd, unsigned long arg) +{ + int err; + + switch (cmd) { + case BLKRAGET: /* return the readahead value */ + if (!arg) return -EINVAL; + err = ! access_ok(VERIFY_WRITE, arg, sizeof(long)); + if (err) return -EFAULT; + PUT_USER(read_ahead[MAJOR(dev)],(long *) arg); + return 0; + + case BLKRASET: /* set the readahead value */ + if (!capable(CAP_SYS_ADMIN)) return -EACCES; + if (arg > 0xff) return -EINVAL; /* limit it */ + read_ahead[MAJOR(dev)] = arg; + return 0; + + case BLKFLSBUF: /* flush */ + if (! capable(CAP_SYS_ADMIN)) return -EACCES; /* only root */ + fsync_dev(dev); + invalidate_buffers(dev); + return 0; + + RO_IOCTLS(dev, arg); + } + return -ENOTTY; +} +#endif /* RO_IOCTLS */ + +#ifdef LINUX_EXTENDED_PARTITION /* defined in genhd.h */ +static inline void register_disk(struct gendisk *gdev, kdev_t dev, + unsigned minors, struct file_operations *ops, long size) +{ + if (! gdev) + return; + resetup_one_dev(gdev, MINOR(dev) >> gdev->minor_shift); +} +#endif /* LINUX_EXTENDED_PARTITION */ + + +#else /* it is Linux 2.4 */ +#define HAVE_BLKPG_H +#endif /* LINUX_24 */ + + + +#ifdef LINUX_20 /* physical and virtual addresses had the same value */ +# define __pa(a) (a) +# define __va(a) (a) +#endif + +/* + * Network driver compatibility + */ + +/* + * 2.0 dev_kfree_skb had an extra arg. The following is a little dangerous + * in that it assumes that FREE_WRITE is always wanted. Very few 2.0 drivers + * use FREE_READ, but the number is *not* zero... + * + * Also: implement the non-checking versions of a couple skb functions - + * but they still check in 2.0. + */ +#ifdef LINUX_20 +# define dev_kfree_skb(skb) dev_kfree_skb((skb), FREE_WRITE); + +# define __skb_push(skb, len) skb_push((skb), (len)) +# define __skb_put(skb, len) skb_put((skb), (len)) +#endif + +/* + * Softnet changes in 2.4 + */ +#ifndef LINUX_24 +# ifdef _LINUX_NETDEVICE_H /* only if netdevice.h was included */ +# define netif_start_queue(dev) clear_bit(0, (void *) &(dev)->tbusy); +# define netif_stop_queue(dev) set_bit(0, (void *) &(dev)->tbusy); + +static inline void netif_wake_queue(struct device *dev) +{ + clear_bit(0, (void *) &(dev)->tbusy); + mark_bh(NET_BH); +} + +/* struct device became struct net_device */ +# define net_device device +# endif /* netdevice.h */ +#endif /* ! LINUX_24 */ + +/* + * Memory barrier stuff, define what's missing from older kernel versions + */ +#ifdef switch_to /* this is always a macro, defined in */ + +# ifndef set_mb +# define set_mb(var, value) do {(var) = (value); mb();} while 0 +# endif +# ifndef set_rmb +# define set_rmb(var, value) do {(var) = (value); rmb();} while 0 +# endif +# ifndef set_wmb +# define set_wmb(var, value) do {(var) = (value); wmb();} while 0 +# endif + +/* The hw barriers are defined as sw barriers. A correct thing if this + specific kernel/platform is supported but has no specific instruction */ +# ifndef mb +# define mb barrier +# endif +# ifndef rmb +# define rmb barrier +# endif +# ifndef wmb +# define wmb barrier +# endif + +#endif /* switch to (i.e. ) */ + + +#endif /* _SYSDEP_H_ */ From ae7fd7b818e728fd90e08460dd45ce81e79c99b0 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 18 Dec 2009 11:05:25 -0800 Subject: [PATCH 044/367] Staging: dt3155: add needed #include This is needed so the code properly builds Cc: Scott Smedley Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dt3155/dt3155_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/dt3155/dt3155_drv.c b/drivers/staging/dt3155/dt3155_drv.c index f3ae8e82d64e..3efdeb9953ff 100644 --- a/drivers/staging/dt3155/dt3155_drv.c +++ b/drivers/staging/dt3155/dt3155_drv.c @@ -76,6 +76,7 @@ MODULE_LICENSE("GPL"); #include #include #include +#include #include #include From bad9f950c011c50e8302b48244229c0250add9b4 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 18 Dec 2009 11:06:11 -0800 Subject: [PATCH 045/367] Staging: dt3155: add TODO file Cc: Scott Smedley Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dt3155/TODO | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 drivers/staging/dt3155/TODO diff --git a/drivers/staging/dt3155/TODO b/drivers/staging/dt3155/TODO new file mode 100644 index 000000000000..3baa3b6294cc --- /dev/null +++ b/drivers/staging/dt3155/TODO @@ -0,0 +1,10 @@ +TODO: + - fix checkpatch.pl issues + - remove old kernel support, it is not needed + - convert to proper PCI device API + - fix sparse warnings + - audit for correct subsystem interaction + - review review review! + +Please send patches to Greg Kroah-Hartman +and Scott Smedley From 293c0db0dd2a7f1a8074645faa9d3a0294623002 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 18 Dec 2009 11:04:54 -0800 Subject: [PATCH 046/367] Staging: dt3155: add it to the build Now it will build with the rest of the kernel Cc: Scott Smedley Signed-off-by: Greg Kroah-Hartman --- drivers/staging/Kconfig | 2 ++ drivers/staging/Makefile | 1 + drivers/staging/dt3155/Kconfig | 4 ++++ drivers/staging/dt3155/Makefile | 33 ++++++--------------------------- 4 files changed, 13 insertions(+), 27 deletions(-) create mode 100644 drivers/staging/dt3155/Kconfig diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig index fc2e963e65e9..02cde3989c5c 100644 --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig @@ -143,5 +143,7 @@ source "drivers/staging/netwave/Kconfig" source "drivers/staging/sm7xx/Kconfig" +source "drivers/staging/dt3155/Kconfig" + endif # !STAGING_EXCLUDE_BUILD endif # STAGING diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile index b5e67b889f60..9d47d42e73ce 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile @@ -53,3 +53,4 @@ obj-$(CONFIG_WAVELAN) += wavelan/ obj-$(CONFIG_PCMCIA_WAVELAN) += wavelan/ obj-$(CONFIG_PCMCIA_NETWAVE) += netwave/ obj-$(CONFIG_FB_SM7XX) += sm7xx/ +obj-$(CONFIG_DT3155) += dt3155/ diff --git a/drivers/staging/dt3155/Kconfig b/drivers/staging/dt3155/Kconfig new file mode 100644 index 000000000000..4a3293c721b1 --- /dev/null +++ b/drivers/staging/dt3155/Kconfig @@ -0,0 +1,4 @@ +config DT3155 + tristate "DT3155 Digitizer support" + depends on PCI + diff --git a/drivers/staging/dt3155/Makefile b/drivers/staging/dt3155/Makefile index 1717ffbf682f..136f21fdbbee 100644 --- a/drivers/staging/dt3155/Makefile +++ b/drivers/staging/dt3155/Makefile @@ -1,27 +1,6 @@ - -ifeq ($(shell [[ `uname -r | cut -f 1,2 -d\.` < 2.6 ]] && echo pre2.6),pre2.6) -# system with a pre 2.6 kernel _don't_ use kbuild. -all: - $(MAKE) -f Makefile.pre-2.6 - -clean: - rm -f *.o - -else -# systems with a 2.6 or later kernel use kbuild. -ifneq ($(KERNELRELEASE),) -obj-m := dt3155.o -dt3155-objs := dt3155_drv.o dt3155_isr.o dt3155_io.o allocator.o - -else -KDIR := /lib/modules/$(shell uname -r)/build -PWD := $(shell pwd) - -all: - $(MAKE) -C $(KDIR) M=$(PWD) modules - -clean: - rm -rf *.o *.mod *.mod.c *.ko .dt3155* .allocator.o.cmd .tmp_versions - -endif -endif +obj-$(CONFIG_DT3155) += dt3155.o +dt3155-objs := \ + dt3155_drv.o \ + dt3155_isr.o \ + dt3155_io.o \ + allocator.o From 59277b679f8b5ce594e367759256668eba652d0d Mon Sep 17 00:00:00 2001 From: Bernie Thompson Date: Tue, 24 Nov 2009 15:52:21 -0800 Subject: [PATCH 047/367] Staging: udlfb: add dynamic modeset support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add dynamic modeset support udlfb uses EDID to find the monitor’s preferred mode udlfb no longer has fixed mode tables – it’s able to set any mode dynamically, from the standard VESA timing characteristics of the monitor. Draws from probe and setmode code of both displaylink-mod 0.3 branch of Roberto De Ioris, and Jaya Kumar's displaylinkfb. Lays foundation for defio support and making backbuffer optional. With additional changes to minimize diffs and clean for checkpatch.pl style. Does not yet include new ioctls or refcount/mutex code from displaylink-mod. Tested to work with existing xf-video-displaylink X server unmodified. Signed-off-by: Bernie Thompson Signed-off-by: Greg Kroah-Hartman --- drivers/staging/udlfb/udlfb.c | 646 +++++++++++++++++++++++----------- drivers/staging/udlfb/udlfb.h | 156 +------- 2 files changed, 448 insertions(+), 354 deletions(-) diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c index f5416af1e902..b61a3e58a9ec 100644 --- a/drivers/staging/udlfb/udlfb.c +++ b/drivers/staging/udlfb/udlfb.c @@ -1,17 +1,19 @@ -/***************************************************************************** - * DLFB Kernel Driver * - * Version 0.2 (udlfb) * - * (C) 2009 Roberto De Ioris * - * * - * This file is licensed under the GPLv2. See COPYING in the package. * - * Based on the amazing work of Florian Echtler and libdlo 0.1 * - * * - * * - * 10.06.09 release 0.2.3 (edid ioctl, fallback for unsupported modes) * - * 05.06.09 release 0.2.2 (real screen blanking, rle compression, double buffer) * - * 31.05.09 release 0.2 * - * 22.05.09 First public (ugly) release * - *****************************************************************************/ +/* + * udlfb.c -- Framebuffer driver for DisplayLink USB controller + * + * Copyright (C) 2009 Roberto De Ioris + * Copyright (C) 2009 Jaya Kumar + * + * This file is subject to the terms and conditions of the GNU General Public + * License v2. See the file COPYING in the main directory of this archive for + * more details. + * + * Layout is based on skeletonfb by James Simmons and Geert Uytterhoeven, + * usb-skeleton by GregKH. + * + * Device-specific portions based on information from Displaylink, with work + * from Florian Echtler, Henrik Bjerregaard Pedersen, and others. + */ #include #include @@ -25,45 +27,263 @@ #include "udlfb.h" -#define DRIVER_VERSION "DLFB 0.2" +#define DRIVER_VERSION "DisplayLink Framebuffer Driver 0.4.1" -/* memory functions taken from vfb */ +static struct fb_fix_screeninfo dlfb_fix = { + .id = "displaylinkfb", + .type = FB_TYPE_PACKED_PIXELS, + .visual = FB_VISUAL_TRUECOLOR, + .xpanstep = 0, + .ypanstep = 0, + .ywrapstep = 0, + .accel = FB_ACCEL_NONE, +}; -static void *rvmalloc(unsigned long size) +#define NR_USB_REQUEST_I2C_SUB_IO 0x02 +#define NR_USB_REQUEST_CHANNEL 0x12 + +/* + * Inserts a specific DisplayLink controller command into the provided + * buffer. + */ +static char *insert_command(char *buf, u8 reg, u8 val) { - void *mem; - unsigned long adr; - - size = PAGE_ALIGN(size); - mem = vmalloc_32(size); - if (!mem) - return NULL; - - memset(mem, 0, size); /* Clear the ram out, no junk to the user */ - adr = (unsigned long)mem; - while (size > 0) { - SetPageReserved(vmalloc_to_page((void *)adr)); - adr += PAGE_SIZE; - size -= PAGE_SIZE; - } - - return mem; + *buf++ = 0xAF; + *buf++ = 0x20; + *buf++ = reg; + *buf++ = val; + return buf; } -static void rvfree(void *mem, unsigned long size) +static char *insert_vidreg_lock(char *buf) { - unsigned long adr; + return insert_command(buf, 0xFF, 0x00); +} - if (!mem) - return; +static char *insert_vidreg_unlock(char *buf) +{ + return insert_command(buf, 0xFF, 0xFF); +} - adr = (unsigned long)mem; - while ((long)size > 0) { - ClearPageReserved(vmalloc_to_page((void *)adr)); - adr += PAGE_SIZE; - size -= PAGE_SIZE; +/* + * Once you send this command, the DisplayLink framebuffer gets driven to the + * display. + */ +static char *insert_enable_hvsync(char *buf) +{ + return insert_command(buf, 0x1F, 0x00); +} + +static char *insert_set_color_depth(char *buf, u8 selection) +{ + return insert_command(buf, 0x00, selection); +} + +static char *insert_set_base16bpp(char *wrptr, u32 base) +{ + /* the base pointer is 16 bits wide, 0x20 is hi byte. */ + wrptr = insert_command(wrptr, 0x20, base >> 16); + wrptr = insert_command(wrptr, 0x21, base >> 8); + return insert_command(wrptr, 0x22, base); +} + +static char *insert_set_base8bpp(char *wrptr, u32 base) +{ + wrptr = insert_command(wrptr, 0x26, base >> 16); + wrptr = insert_command(wrptr, 0x27, base >> 8); + return insert_command(wrptr, 0x28, base); +} + +static char *insert_command_16(char *wrptr, u8 reg, u16 value) +{ + wrptr = insert_command(wrptr, reg, value >> 8); + return insert_command(wrptr, reg+1, value); +} + +/* + * This is kind of weird because the controller takes some + * register values in a different byte order than other registers. + */ +static char *insert_command_16be(char *wrptr, u8 reg, u16 value) +{ + wrptr = insert_command(wrptr, reg, value); + return insert_command(wrptr, reg+1, value >> 8); +} + +/* + * LFSR is linear feedback shift register. The reason we have this is + * because the display controller needs to minimize the clock depth of + * various counters used in the display path. So this code reverses the + * provided value into the lfsr16 value by counting backwards to get + * the value that needs to be set in the hardware comparator to get the + * same actual count. This makes sense once you read above a couple of + * times and think about it from a hardware perspective. + */ +static u16 lfsr16(u16 actual_count) +{ + u32 lv = 0xFFFF; /* This is the lfsr value that the hw starts with */ + + while (actual_count--) { + lv = ((lv << 1) | + (((lv >> 15) ^ (lv >> 4) ^ (lv >> 2) ^ (lv >> 1)) & 1)) + & 0xFFFF; } - vfree(mem); + + return (u16) lv; +} + +/* + * This does LFSR conversion on the value that is to be written. + * See LFSR explanation above for more detail. + */ +static char *insert_command_lfsr16(char *wrptr, u8 reg, u16 value) +{ + return insert_command_16(wrptr, reg, lfsr16(value)); +} + +/* + * This takes a standard fbdev screeninfo struct and all of its monitor mode + * details and converts them into the DisplayLink equivalent register commands. + */ +static char *insert_set_vid_cmds(char *wrptr, struct fb_var_screeninfo *var) +{ + u16 xds, yds; + u16 xde, yde; + u16 yec; + + + /* x display start */ + xds = var->left_margin + var->hsync_len; + wrptr = insert_command_lfsr16(wrptr, 0x01, xds); + /* x display end */ + xde = xds + var->xres; + wrptr = insert_command_lfsr16(wrptr, 0x03, xde); + + /* y display start */ + yds = var->upper_margin + var->vsync_len; + wrptr = insert_command_lfsr16(wrptr, 0x05, yds); + /* y display end */ + yde = yds + var->yres; + wrptr = insert_command_lfsr16(wrptr, 0x07, yde); + + /* x end count is active + blanking - 1 */ + wrptr = insert_command_lfsr16(wrptr, 0x09, xde + var->right_margin - 1); + + /* libdlo hardcodes hsync start to 1 */ + wrptr = insert_command_lfsr16(wrptr, 0x0B, 1); + + /* hsync end is width of sync pulse + 1 */ + wrptr = insert_command_lfsr16(wrptr, 0x0D, var->hsync_len + 1); + + /* hpixels is active pixels */ + wrptr = insert_command_16(wrptr, 0x0F, var->xres); + + /* yendcount is vertical active + vertical blanking */ + yec = var->yres + var->upper_margin + var->lower_margin + + var->vsync_len; + wrptr = insert_command_lfsr16(wrptr, 0x11, yec); + + /* libdlo hardcodes vsync start to 0 */ + wrptr = insert_command_lfsr16(wrptr, 0x13, 0); + + /* vsync end is width of vsync pulse */ + wrptr = insert_command_lfsr16(wrptr, 0x15, var->vsync_len); + + /* vpixels is active pixels */ + wrptr = insert_command_16(wrptr, 0x17, var->yres); + + /* convert picoseconds to 5kHz multiple for pclk5k = x * 1E12/5k */ + wrptr = insert_command_16be(wrptr, 0x1B, 200*1000*1000/var->pixclock); + + return wrptr; +} + +/* + * This takes a standard fbdev screeninfo struct that was fetched or prepared + * and then generates the appropriate command sequence that then drives the + * display controller. + */ +static int dlfb_set_video_mode(struct dlfb_data *dev, + struct fb_var_screeninfo *var) +{ + char *buf; + char *wrptr; + int retval = 0; + int writesize; + + buf = dev->buf; + + /* + * This first section has to do with setting the base address on the + * controller * associated with the display. There are 2 base + * pointers, currently, we only * use the 16 bpp segment. + */ + wrptr = insert_vidreg_lock(buf); + wrptr = insert_set_color_depth(wrptr, 0x00); + /* set base for 16bpp segment to 0 */ + wrptr = insert_set_base16bpp(wrptr, 0); + /* set base for 8bpp segment to end of fb */ + wrptr = insert_set_base8bpp(wrptr, dev->info->fix.smem_len); + + wrptr = insert_set_vid_cmds(wrptr, var); + wrptr = insert_enable_hvsync(wrptr); + wrptr = insert_vidreg_unlock(wrptr); + + writesize = wrptr - buf; + + mutex_lock(&dev->bulk_mutex); + if (!dev->interface) { /* disconnect() was called */ + mutex_unlock(&dev->bulk_mutex); + retval = -ENODEV; + goto error; + } + + retval = dlfb_bulk_msg(dev, writesize); + mutex_unlock(&dev->bulk_mutex); + if (retval) { + dev_err(&dev->udev->dev, "Problem %d with submit write bulk.\n", + retval); + goto error; + } + + return 0; + +error: + return retval; +} + +/* + * This is necessary before we can communicate with the display controller. + */ +static int dlfb_select_std_channel(struct dlfb_data *dev) +{ + int ret; + u8 set_def_chn[] = { 0x57, 0xCD, 0xDC, 0xA7, + 0x1C, 0x88, 0x5E, 0x15, + 0x60, 0xFE, 0xC6, 0x97, + 0x16, 0x3D, 0x47, 0xF2 }; + + ret = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0), + NR_USB_REQUEST_CHANNEL, + (USB_DIR_OUT | USB_TYPE_VENDOR), 0, 0, + set_def_chn, sizeof(set_def_chn), USB_CTRL_SET_TIMEOUT); + return ret; +} + + +/* + * Query EDID from the handware, then hand it off to fbdev's edid parse + * routine which should give us back a filled in screeninfo structure. + */ +static int dlfb_get_var_from_edid(struct dlfb_data *dev, + struct fb_var_screeninfo *var) +{ + int ret; + + dlfb_edid(dev); + ret = fb_parse_edid(dev->edid, var); + + return ret; } static int dlfb_mmap(struct fb_info *info, struct vm_area_struct *vma) @@ -106,12 +326,11 @@ struct dloarea { }; /* -static struct usb_device_id id_table [] = { - { USB_DEVICE(0x17e9, 0x023d) }, - { } -}; -*/ - + * There are many DisplayLink-based products, all with unique PIDs. We are able + * to support all volume ones (circa 2009) with a single driver, so we match + * globally on VID. TODO: Probe() needs to detect when we might be running + * "future" chips, and bail on those, so a compatible driver can match. + */ static struct usb_device_id id_table[] = { {.idVendor = 0x17e9, .match_flags = USB_DEVICE_ID_MATCH_VENDOR,}, {}, @@ -205,14 +424,21 @@ image_blit(struct dlfb_data *dev_info, int x, int y, int width, int height, if (thistime > 255) thistime = 255; - // find position of first pixel that has changed - firstdiff = -1; - for (j = 0; j < thistime * 2; j++) { - if (dev_info->backing_buffer - [base - dev_info->base16 + j] != data[j]) { - firstdiff = j / 2; - break; + if (dev_info->backing_buffer) { + /* find first pixel that has changed */ + firstdiff = -1; + for (j = 0; j < thistime * 2; j++) { + if (dev_info->backing_buffer + [base - dev_info->base16 + j] + != data[j]) { + firstdiff = j / 2; + break; + } } + + } else { + firstdiff = 0; + } if (firstdiff >= 0) { @@ -267,8 +493,10 @@ image_blit(struct dlfb_data *dev_info, int x, int y, int width, int height, rem -= thistime; } - memcpy(dev_info->backing_buffer + (base - dev_info->base16) - - (width * 2), data - (width * 2), width * 2); + if (dev_info->backing_buffer) + memcpy(dev_info->backing_buffer + + (base - dev_info->base16) - + (width * 2), data - (width * 2), width * 2); base += (dev_info->info->var.xres * 2) - (width * 2); data += (dev_info->info->var.xres * 2) - (width * 2); @@ -313,12 +541,17 @@ draw_rect(struct dlfb_data *dev_info, int x, int y, int width, int height, for (i = y; i < y + height; i++) { - for (j = 0; j < width * 2; j += 2) { - dev_info->backing_buffer[base - dev_info->base16 + j] = - (char)(col >> 8); - dev_info->backing_buffer[base - dev_info->base16 + j + - 1] = (char)(col); + if (dev_info->backing_buffer) { + for (j = 0; j < width * 2; j += 2) { + dev_info->backing_buffer + [base - dev_info->base16 + j] = + (char)(col >> 8); + dev_info->backing_buffer + [base - dev_info->base16 + j + 1] = + (char)(col); + } } + if (dev_info->bufend - bufptr < BUF_HIGH_WATER_MARK) { ret = dlfb_bulk_msg(dev_info, bufptr - dev_info->buf); bufptr = dev_info->buf; @@ -725,182 +958,196 @@ static struct fb_ops dlfb_ops = { .fb_blank = dlfb_blank, }; -static int -dlfb_probe(struct usb_interface *interface, const struct usb_device_id *id) +static int dlfb_probe(struct usb_interface *interface, + const struct usb_device_id *id) { - struct dlfb_data *dev_info; + struct device *mydev; + struct usb_device *usbdev; + struct dlfb_data *dev; struct fb_info *info; + int videomemorysize; + unsigned char *videomemory; + int retval = -ENOMEM; + struct fb_var_screeninfo *var; + struct fb_bitfield red = { 11, 5, 0 }; + struct fb_bitfield green = { 5, 6, 0 }; + struct fb_bitfield blue = { 0, 5, 0 }; - int ret; - char rbuf[4]; + usbdev = usb_get_dev(interface_to_usbdev(interface)); + mydev = &usbdev->dev; - dev_info = kzalloc(sizeof(*dev_info), GFP_KERNEL); - if (dev_info == NULL) { - printk("cannot allocate dev_info structure.\n"); - return -ENOMEM; + dev = kzalloc(sizeof(*dev), GFP_KERNEL); + if (dev == NULL) { + dev_err(mydev, "failed alloc of dev struct\n"); + goto err_devalloc; } - mutex_init(&dev_info->bulk_mutex); + mutex_init(&dev->bulk_mutex); + dev->udev = usbdev; + dev->interface = interface; + usb_set_intfdata(interface, dev); - dev_info->udev = usb_get_dev(interface_to_usbdev(interface)); - dev_info->interface = interface; + dev_info(mydev, "dlfb_probe: setting up DisplayLink device\n"); - printk("DisplayLink device attached\n"); - - /* add framebuffer info to usb interface */ - usb_set_intfdata(interface, dev_info); - - dev_info->buf = kmalloc(BUF_SIZE, GFP_KERNEL); - /* usb_buffer_alloc(dev_info->udev, BUF_SIZE , GFP_KERNEL, &dev_info->tx_urb->transfer_dma); */ - - if (dev_info->buf == NULL) { - printk("unable to allocate memory for dlfb commands\n"); - goto out; + /* + * TODO: replace single 64K buffer with buffer list + * and async dispatch + */ + dev->buf = kmalloc(BUF_SIZE, GFP_KERNEL); + if (dev->buf == NULL) { + dev_err(mydev, "unable to allocate memory for dlfb commands\n"); + goto err_usballoc; } - dev_info->bufend = dev_info->buf + BUF_SIZE; + dev->bufend = dev->buf + BUF_SIZE; - dev_info->tx_urb = usb_alloc_urb(0, GFP_KERNEL); - usb_fill_bulk_urb(dev_info->tx_urb, dev_info->udev, - usb_sndbulkpipe(dev_info->udev, 1), dev_info->buf, 0, - dlfb_bulk_callback, dev_info); + dev->tx_urb = usb_alloc_urb(0, GFP_KERNEL); + usb_fill_bulk_urb(dev->tx_urb, dev->udev, + usb_sndbulkpipe(dev->udev, 1), dev->buf, 0, + dlfb_bulk_callback, dev); - ret = - usb_control_msg(dev_info->udev, usb_rcvctrlpipe(dev_info->udev, 0), - (0x06), (0x80 | (0x02 << 5)), 0, 0, rbuf, 4, 0); - printk("ret control msg 0: %d %x%x%x%x\n", ret, rbuf[0], rbuf[1], - rbuf[2], rbuf[3]); + /* allocates framebuffer driver structure, not framebuffer memory */ + info = framebuffer_alloc(0, mydev); + if (!info) + goto err_fballoc; - dlfb_edid(dev_info); + dev->info = info; + info->par = dev; + info->pseudo_palette = dev->pseudo_palette; - info = framebuffer_alloc(sizeof(u32) * 256, &dev_info->udev->dev); - - if (!info) { - printk("non posso allocare il framebuffer displaylink"); - goto out; + var = &info->var; + retval = dlfb_get_var_from_edid(dev, var); + if (retval) { + /* had a problem getting edid. so fallback to 640x480 */ + dev_err(mydev, "Problem %d with EDID.\n", retval); + var->xres = 640; + var->yres = 480; } - fb_parse_edid(dev_info->edid, &info->var); + /* + * ok, now that we've got the size info, we can alloc our framebuffer. + * We are using 16bpp. + */ + info->var.bits_per_pixel = 16; + info->fix = dlfb_fix; + info->fix.line_length = var->xres * (var->bits_per_pixel / 8); + videomemorysize = info->fix.line_length * var->yres; - printk("EDID XRES %d YRES %d\n", info->var.xres, info->var.yres); - - if (dlfb_set_video_mode(dev_info, info->var.xres, info->var.yres) != 0) { - info->var.xres = 1280; - info->var.yres = 1024; - if (dlfb_set_video_mode - (dev_info, info->var.xres, info->var.yres) != 0) { - goto out; - } - } - - printk("found valid mode...%d\n", info->var.pixclock); - - info->pseudo_palette = info->par; - info->par = dev_info; - - dev_info->info = info; + /* + * The big chunk of system memory we use as a virtual framebuffer. + * Pages don't need to be set RESERVED (non-swap) immediately on 2.6 + * remap_pfn_page() syscall in our mmap and/or defio will handle. + */ + videomemory = vmalloc(videomemorysize); + if (!videomemory) + goto err_vidmem; + memset(videomemory, 0, videomemorysize); + info->screen_base = videomemory; + info->fix.smem_len = PAGE_ALIGN(videomemorysize); + info->fix.smem_start = (unsigned long) videomemory; info->flags = FBINFO_DEFAULT | FBINFO_READS_FAST | FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT; + + /* + * Second framebuffer copy, mirroring the state of the framebuffer + * on the physical USB device. We can function without this. + * But with imperfect damage info we may end up sending pixels over USB + * that were, in fact, unchanged -- wasting limited USB bandwidth + */ + dev->backing_buffer = vmalloc(dev->screen_size); + if (!dev->backing_buffer) + dev_info(mydev, "No backing buffer allocated!\n"); + info->fbops = &dlfb_ops; - info->screen_base = rvmalloc(dev_info->screen_size); - if (info->screen_base == NULL) { - printk - ("cannot allocate framebuffer virtual memory of %d bytes\n", - dev_info->screen_size); - goto out0; + var->vmode = FB_VMODE_NONINTERLACED; + var->red = red; + var->green = green; + var->blue = blue; + + /* + * TODO: Enable FB_CONFIG_DEFIO support + + info->fbdefio = &dlfb_defio; + fb_deferred_io_init(info); + + */ + + retval = fb_alloc_cmap(&info->cmap, 256, 0); + if (retval < 0) { + dev_err(mydev, "Failed to allocate colormap\n"); + goto err_cmap; } - printk("screen base allocated !!!\n"); + dlfb_select_std_channel(dev); + dlfb_set_video_mode(dev, var); + /* TODO: dlfb_dpy_update(dev); */ - dev_info->backing_buffer = kzalloc(dev_info->screen_size, GFP_KERNEL); + retval = register_framebuffer(info); + if (retval < 0) + goto err_regfb; - if (!dev_info->backing_buffer) - printk("non posso allocare il backing buffer\n"); - - /* info->var = dev_info->si; */ - - info->var.bits_per_pixel = 16; - info->var.activate = FB_ACTIVATE_TEST; - info->var.vmode = FB_VMODE_NONINTERLACED; - - info->var.red.offset = 11; - info->var.red.length = 5; - info->var.red.msb_right = 0; - - info->var.green.offset = 5; - info->var.green.length = 6; - info->var.green.msb_right = 0; - - info->var.blue.offset = 0; - info->var.blue.length = 5; - info->var.blue.msb_right = 0; - - /* info->var.pixclock = (10000000 / FB_W * 1000 / FB_H)/2 ; */ - - info->fix.smem_start = (unsigned long)info->screen_base; - info->fix.smem_len = PAGE_ALIGN(dev_info->screen_size); - if (strlen(dev_info->udev->product) > 15) { - memcpy(info->fix.id, dev_info->udev->product, 15); - } else { - memcpy(info->fix.id, dev_info->udev->product, - strlen(dev_info->udev->product)); - } - info->fix.type = FB_TYPE_PACKED_PIXELS; - info->fix.visual = FB_VISUAL_TRUECOLOR; - info->fix.accel = info->flags; - info->fix.line_length = dev_info->line_length; - - if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) - goto out1; - - printk("colormap allocated\n"); - if (register_framebuffer(info) < 0) - goto out2; - - draw_rect(dev_info, 0, 0, dev_info->info->var.xres, - dev_info->info->var.yres, 0x30, 0xff, 0x30); + /* paint "successful" green screen */ + draw_rect(dev, 0, 0, dev->info->var.xres, + dev->info->var.yres, 0x30, 0xff, 0x30); + dev_info(mydev, "DisplayLink USB device %d now attached, " + "using %dK of memory\n", info->node, + ((dev->backing_buffer) ? + videomemorysize * 2 : videomemorysize) >> 10); return 0; -out2: +err_regfb: fb_dealloc_cmap(&info->cmap); -out1: - rvfree(info->screen_base, dev_info->screen_size); -out0: +err_cmap: + /* TODO: fb_deferred_io_cleanup(info); */ + vfree(videomemory); +err_vidmem: framebuffer_release(info); -out: +err_fballoc: + kfree(dev->buf); +err_usballoc: usb_set_intfdata(interface, NULL); - usb_put_dev(dev_info->udev); - kfree(dev_info); - return -ENOMEM; - + usb_put_dev(dev->udev); + kfree(dev); +err_devalloc: + return retval; } static void dlfb_disconnect(struct usb_interface *interface) { - struct dlfb_data *dev_info = usb_get_intfdata(interface); + struct dlfb_data *dev; + struct fb_info *info; - mutex_unlock(&dev_info->bulk_mutex); - - usb_kill_urb(dev_info->tx_urb); - usb_free_urb(dev_info->tx_urb); + dev = usb_get_intfdata(interface); usb_set_intfdata(interface, NULL); - usb_put_dev(dev_info->udev); + usb_put_dev(dev->udev); - if (dev_info->info) { - unregister_framebuffer(dev_info->info); - fb_dealloc_cmap(&dev_info->info->cmap); - rvfree(dev_info->info->screen_base, dev_info->screen_size); - kfree(dev_info->backing_buffer); - framebuffer_release(dev_info->info); + /* + * TODO: since, upon usb disconnect(), usb will cancel in-flight urbs + * and error out any new ones, look at eliminating need for mutex + */ + mutex_lock(&dev->bulk_mutex); + dev->interface = NULL; + info = dev->info; + mutex_unlock(&dev->bulk_mutex); + if (info) { + dev_info(&interface->dev, "Detaching DisplayLink device %d.\n", + info->node); + unregister_framebuffer(info); + fb_dealloc_cmap(&info->cmap); + /* TODO: fb_deferred_io_cleanup(info); */ + fb_dealloc_cmap(&info->cmap); + vfree((void __force *)info->screen_base); + framebuffer_release(info); } - kfree(dev_info); + if (dev->backing_buffer) + vfree(dev->backing_buffer); - printk("DisplayLink device disconnected\n"); + kfree(dev); } static struct usb_driver dlfb_driver = { @@ -914,8 +1161,6 @@ static int __init dlfb_init(void) { int res; - dlfb_init_modes(); - res = usb_register(&dlfb_driver); if (res) err("usb_register failed. Error number %d", res); @@ -933,6 +1178,7 @@ static void __exit dlfb_exit(void) module_init(dlfb_init); module_exit(dlfb_exit); -MODULE_AUTHOR("Roberto De Ioris "); +MODULE_AUTHOR("Roberto De Ioris , " + "Jaya Kumar "); MODULE_DESCRIPTION(DRIVER_VERSION); MODULE_LICENSE("GPL"); diff --git a/drivers/staging/udlfb/udlfb.h b/drivers/staging/udlfb/udlfb.h index 40ad85ea8e67..cdf91d0d4389 100644 --- a/drivers/staging/udlfb/udlfb.h +++ b/drivers/staging/udlfb/udlfb.h @@ -1,12 +1,6 @@ #ifndef UDLFB_H #define UDLFB_H -#define MAX_VMODES 4 -#define FB_BPP 16 - -#define STD_CHANNEL "\x57\xCD\xDC\xA7\x1C\x88\x5E\x15" \ - "\x60\xFE\xC6\x97\x16\x3D\x47\xF2" - /* as libdlo */ #define BUF_HIGH_WATER_MARK 1024 #define BUF_SIZE (64*1024) @@ -29,21 +23,9 @@ struct dlfb_data { int base16d; int base8; int base8d; + u32 pseudo_palette[256]; }; -struct dlfb_video_mode { - uint8_t col; - uint32_t hclock; - uint32_t vclock; - uint8_t unknown1[6]; - uint16_t xres; - uint8_t unknown2[6]; - uint16_t yres; - uint8_t unknown3[4]; -} __attribute__ ((__packed__)); - -static struct dlfb_video_mode dlfb_video_modes[MAX_VMODES]; - static void dlfb_bulk_callback(struct urb *urb) { struct dlfb_data *dev_info = urb->context; @@ -86,140 +68,6 @@ static int dlfb_bulk_msg(struct dlfb_data *dev_info, int len) return dev_info->tx_urb->actual_length; } -static void dlfb_init_modes(void) -{ - dlfb_video_modes[0].col = 0; - memcpy(&dlfb_video_modes[0].hclock, "\x20\x3C\x7A\xC9", 4); - memcpy(&dlfb_video_modes[0].vclock, "\xF2\x6C\x48\xF9", 4); - memcpy(&dlfb_video_modes[0].unknown1, "\x70\x53\xFF\xFF\x21\x27", 6); - dlfb_video_modes[0].xres = 800; - memcpy(&dlfb_video_modes[0].unknown2, "\x91\xF3\xFF\xFF\xFF\xF9", 6); - dlfb_video_modes[0].yres = 480; - memcpy(&dlfb_video_modes[0].unknown3, "\x01\x02\xC8\x19", 4); - - dlfb_video_modes[1].col = 0; - memcpy(&dlfb_video_modes[1].hclock, "\x36\x18\xD5\x10", 4); - memcpy(&dlfb_video_modes[1].vclock, "\x60\xA9\x7B\x33", 4); - memcpy(&dlfb_video_modes[1].unknown1, "\xA1\x2B\x27\x32\xFF\xFF", 6); - dlfb_video_modes[1].xres = 1024; - memcpy(&dlfb_video_modes[1].unknown2, "\xD9\x9A\xFF\xCA\xFF\xFF", 6); - dlfb_video_modes[1].yres = 768; - memcpy(&dlfb_video_modes[1].unknown3, "\x04\x03\xC8\x32", 4); - - dlfb_video_modes[2].col = 0; - memcpy(&dlfb_video_modes[2].hclock, "\x98\xF8\x0D\x57", 4); - memcpy(&dlfb_video_modes[2].vclock, "\x2A\x55\x4D\x54", 4); - memcpy(&dlfb_video_modes[2].unknown1, "\xCA\x0D\xFF\xFF\x94\x43", 6); - dlfb_video_modes[2].xres = 1280; - memcpy(&dlfb_video_modes[2].unknown2, "\x9A\xA8\xFF\xFF\xFF\xF9", 6); - dlfb_video_modes[2].yres = 1024; - memcpy(&dlfb_video_modes[2].unknown3, "\x04\x02\x60\x54", 4); - - dlfb_video_modes[3].col = 0; - memcpy(&dlfb_video_modes[3].hclock, "\x42\x24\x38\x36", 4); - memcpy(&dlfb_video_modes[3].vclock, "\xC1\x52\xD9\x29", 4); - memcpy(&dlfb_video_modes[3].unknown1, "\xEA\xB8\x32\x60\xFF\xFF", 6); - dlfb_video_modes[3].xres = 1400; - memcpy(&dlfb_video_modes[3].unknown2, "\xC9\x4E\xFF\xFF\xFF\xF2", 6); - dlfb_video_modes[3].yres = 1050; - memcpy(&dlfb_video_modes[3].unknown3, "\x04\x02\x1E\x5F", 4); -} - -static char *dlfb_set_register(char *bufptr, uint8_t reg, uint8_t val) -{ - *bufptr++ = 0xAF; - *bufptr++ = 0x20; - *bufptr++ = reg; - *bufptr++ = val; - - return bufptr; -} - -static int dlfb_set_video_mode(struct dlfb_data *dev_info, int width, int height) -{ - int i, ret; - unsigned char j; - char *bufptr = dev_info->buf; - uint8_t *vdata; - - for (i = 0; i < MAX_VMODES; i++) { - printk("INIT VIDEO %d %d %d\n", i, dlfb_video_modes[i].xres, - dlfb_video_modes[i].yres); - if (dlfb_video_modes[i].xres == width - && dlfb_video_modes[i].yres == height) { - - dev_info->base16 = 0; - dev_info->base16d = width * height * (FB_BPP / 8); - - //dev_info->base8 = width * height * (FB_BPP / 8); - - dev_info->base8 = dev_info->base16; - dev_info->base8d = dev_info->base16d; - - /* set encryption key (null) */ - memcpy(dev_info->buf, STD_CHANNEL, 16); - ret = - usb_control_msg(dev_info->udev, - usb_sndctrlpipe(dev_info->udev, 0), - 0x12, (0x02 << 5), 0, 0, - dev_info->buf, 16, 0); - printk("ret control msg 1 (STD_CHANNEL): %d\n", ret); - - /* set registers */ - bufptr = dlfb_set_register(bufptr, 0xFF, 0x00); - - /* set color depth */ - bufptr = dlfb_set_register(bufptr, 0x00, 0x00); - - /* set addresses */ - bufptr = - dlfb_set_register(bufptr, 0x20, - (char)(dev_info->base16 >> 16)); - bufptr = - dlfb_set_register(bufptr, 0x21, - (char)(dev_info->base16 >> 8)); - bufptr = - dlfb_set_register(bufptr, 0x22, - (char)(dev_info->base16)); - - bufptr = - dlfb_set_register(bufptr, 0x26, - (char)(dev_info->base8 >> 16)); - bufptr = - dlfb_set_register(bufptr, 0x27, - (char)(dev_info->base8 >> 8)); - bufptr = - dlfb_set_register(bufptr, 0x28, - (char)(dev_info->base8)); - - /* set video mode */ - vdata = (uint8_t *)&dlfb_video_modes[i]; - for (j = 0; j < 29; j++) - bufptr = dlfb_set_register(bufptr, j, vdata[j]); - - /* blank */ - bufptr = dlfb_set_register(bufptr, 0x1F, 0x00); - - /* end registers */ - bufptr = dlfb_set_register(bufptr, 0xFF, 0xFF); - - /* send */ - ret = dlfb_bulk_msg(dev_info, bufptr - dev_info->buf); - printk("ret bulk 2: %d %td\n", ret, - bufptr - dev_info->buf); - - /* flush */ - ret = dlfb_bulk_msg(dev_info, 0); - printk("ret bulk 3: %d\n", ret); - - dev_info->screen_size = width * height * (FB_BPP / 8); - dev_info->line_length = width * (FB_BPP / 8); - - return 0; - } - } - - return -1; -} +#define dlfb_set_register insert_command #endif From 2ed71d5a14c887b7632aa21579ff7fc5770381d8 Mon Sep 17 00:00:00 2001 From: Adam Buchbinder Date: Fri, 18 Dec 2009 15:43:50 -0500 Subject: [PATCH 048/367] staging: Fix misspelling of "successful" and variants. Some comments and one message misspell "successful" or variants of the word; this fixes them. No change in functionality. Signed-off-by: Adam Buchbinder Signed-off-by: Greg Kroah-Hartman --- drivers/staging/altpciechdma/altpciechdma.c | 2 +- drivers/staging/rt2860/sta/connect.c | 4 ++-- drivers/staging/wlags49_h2/wl_netdev.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/altpciechdma/altpciechdma.c b/drivers/staging/altpciechdma/altpciechdma.c index 2f07dd4563ac..2a02f8e625f7 100644 --- a/drivers/staging/altpciechdma/altpciechdma.c +++ b/drivers/staging/altpciechdma/altpciechdma.c @@ -894,7 +894,7 @@ static int __devinit probe(struct pci_dev *dev, const struct pci_device_id *id) } /* remember which irq we allocated */ ape->irq_line = (int)irq_line; - printk(KERN_DEBUG "Succesfully requested IRQ #%d with dev_id 0x%p\n", irq_line, ape); + printk(KERN_DEBUG "Successfully requested IRQ #%d with dev_id 0x%p\n", irq_line, ape); #endif /* show BARs */ scan_bars(ape, dev); diff --git a/drivers/staging/rt2860/sta/connect.c b/drivers/staging/rt2860/sta/connect.c index 17e59ba3d807..55732b10062d 100644 --- a/drivers/staging/rt2860/sta/connect.c +++ b/drivers/staging/rt2860/sta/connect.c @@ -62,8 +62,8 @@ u8 CipherSuiteWpaNoneAes[] = { u8 CipherSuiteWpaNoneAesLen = (sizeof(CipherSuiteWpaNoneAes) / sizeof(u8)); -/* The following MACRO is called after 1. starting an new IBSS, 2. succesfully JOIN an IBSS, */ -/* or 3. succesfully ASSOCIATE to a BSS, 4. successfully RE_ASSOCIATE to a BSS */ +/* The following MACRO is called after 1. starting an new IBSS, 2. successfully JOIN an IBSS, */ +/* or 3. successfully ASSOCIATE to a BSS, 4. successfully RE_ASSOCIATE to a BSS */ /* All settings successfuly negotiated furing MLME state machines become final settings */ /* and are copied to pAd->StaActive */ #define COPY_SETTINGS_FROM_MLME_AUX_TO_ACTIVE_CFG(_pAd) \ diff --git a/drivers/staging/wlags49_h2/wl_netdev.c b/drivers/staging/wlags49_h2/wl_netdev.c index ac3890247965..6d4019160ebe 100644 --- a/drivers/staging/wlags49_h2/wl_netdev.c +++ b/drivers/staging/wlags49_h2/wl_netdev.c @@ -360,7 +360,7 @@ int wl_open(struct net_device *dev) wl_lock( lp, &flags ); if( status != HCF_SUCCESS ) { - // Unsuccesfull, try reset of the card to recover + // Unsuccessful, try reset of the card to recover status = wl_reset( dev ); } From 39cfb97b0d89a99c8e50782b17e65114b89c2e59 Mon Sep 17 00:00:00 2001 From: Adam Buchbinder Date: Fri, 18 Dec 2009 15:43:51 -0500 Subject: [PATCH 049/367] staging: Fix misspelling of "should" and "shouldn't" in comments. Some comments misspell "should" or "shouldn't"; this fixes them. No code changes. Signed-off-by: Adam Buchbinder Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.c | 2 +- drivers/staging/comedi/drivers/addi-data/APCI1710_Dig_io.c | 2 +- drivers/staging/comedi/drivers/addi-data/APCI1710_INCCPT.c | 2 +- drivers/staging/comedi/drivers/addi-data/APCI1710_Inp_cpt.c | 2 +- drivers/staging/comedi/drivers/addi-data/APCI1710_Pwm.c | 2 +- drivers/staging/comedi/drivers/addi-data/APCI1710_Ssi.c | 2 +- drivers/staging/comedi/drivers/addi-data/APCI1710_Tor.c | 2 +- drivers/staging/comedi/drivers/addi-data/APCI1710_Ttl.c | 2 +- drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c | 2 +- drivers/staging/comedi/drivers/addi-data/addi_common.c | 2 +- drivers/staging/comedi/drivers/addi-data/addi_eeprom.c | 2 +- drivers/staging/comedi/drivers/addi-data/hwdrv_APCI1710.c | 2 +- drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c | 2 +- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c | 2 +- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c | 2 +- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.c | 2 +- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c | 2 +- drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.c | 2 +- drivers/staging/comedi/drivers/addi-data/hwdrv_apci2016.c | 2 +- drivers/staging/comedi/drivers/addi-data/hwdrv_apci2032.c | 2 +- drivers/staging/comedi/drivers/addi-data/hwdrv_apci2200.c | 2 +- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 2 +- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c | 2 +- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c | 2 +- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c | 2 +- drivers/staging/rtl8192e/ieee80211/rtl819x_HTProc.c | 2 +- drivers/staging/rtl8192e/r8192E_core.c | 4 ++-- drivers/staging/rtl8192su/ieee80211/rtl819x_HTProc.c | 2 +- drivers/staging/rtl8192su/r8192U_core.c | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 2 +- drivers/staging/rtl8192u/r8192U_core.c | 2 +- 31 files changed, 32 insertions(+), 32 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.c b/drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.c index 0af12fd2a40a..fbc26a027de4 100644 --- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.c +++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Dig_io.c b/drivers/staging/comedi/drivers/addi-data/APCI1710_Dig_io.c index f3e47e5791db..a6898e4bbb62 100644 --- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Dig_io.c +++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Dig_io.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_INCCPT.c b/drivers/staging/comedi/drivers/addi-data/APCI1710_INCCPT.c index a15c952c0fab..0e498e9eb080 100644 --- a/drivers/staging/comedi/drivers/addi-data/APCI1710_INCCPT.c +++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_INCCPT.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Inp_cpt.c b/drivers/staging/comedi/drivers/addi-data/APCI1710_Inp_cpt.c index 0fc2285c9ef8..204d7987700a 100644 --- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Inp_cpt.c +++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Inp_cpt.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Pwm.c b/drivers/staging/comedi/drivers/addi-data/APCI1710_Pwm.c index 138a84f572c8..148ce6f67f0d 100644 --- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Pwm.c +++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Pwm.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Ssi.c b/drivers/staging/comedi/drivers/addi-data/APCI1710_Ssi.c index a445dab50eac..6360de59e0e9 100644 --- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Ssi.c +++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Ssi.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Tor.c b/drivers/staging/comedi/drivers/addi-data/APCI1710_Tor.c index 7e1254475792..344df9462198 100644 --- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Tor.c +++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Tor.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Ttl.c b/drivers/staging/comedi/drivers/addi-data/APCI1710_Ttl.c index d3d78d37de5c..de6f77246890 100644 --- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Ttl.c +++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Ttl.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c b/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c index 6e9e7ed4dba9..bd7e4619b3df 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c +++ b/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.c b/drivers/staging/comedi/drivers/addi-data/addi_common.c index a56535fbcd3e..8db5ab63e363 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_common.c +++ b/drivers/staging/comedi/drivers/addi-data/addi_common.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c b/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c index 69b427390e53..bea329f44d80 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c +++ b/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_APCI1710.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_APCI1710.c index 47517a938ec5..d7d768ee7c23 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_APCI1710.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_APCI1710.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c index 016721efdbfb..791297266fc0 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c index 723a97bab44c..27c68aac32d1 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c index 36b929ffecbd..d5e06ad6acc2 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.c index 866eb8d75820..7948c41f60f5 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c index 3ae663bc754e..4413279c880b 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.c index 988e3fc2b857..8bc88adfbb59 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2016.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2016.c index d348cd5687aa..89783b1eb0bd 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2016.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2016.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2032.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2032.c index ec817082d170..2d325163c169 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2032.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2032.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2200.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2200.c index aa159dccc36a..e01889c3c4fc 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2200.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2200.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c index 172fba8dbfe5..07123fd766a3 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c index 98c23872e374..560c848f6258 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c index 7b38d177394b..4ed441a1adc8 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c index 1d1e5fc2ea9a..eec71c3efe5e 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c @@ -17,7 +17,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -You shoud also find the complete GPL in the COPYING file accompanying this source code. +You should also find the complete GPL in the COPYING file accompanying this source code. @endverbatim */ diff --git a/drivers/staging/rtl8192e/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192e/ieee80211/rtl819x_HTProc.c index c93247362fe8..4c4b1df350ac 100644 --- a/drivers/staging/rtl8192e/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192e/ieee80211/rtl819x_HTProc.c @@ -42,7 +42,7 @@ static u8 DLINK_ATHEROS[3] = {0x00, 0x1c, 0xf0}; static u8 CISCO_BROADCOM[3] = {0x00, 0x17, 0x94}; static u8 LINKSYS_MARVELL_4400N[3] = {0x00, 0x14, 0xa4}; -// 2008/04/01 MH For Cisco G mode RX TP We need to change FW duration. Shoud we put the +// 2008/04/01 MH For Cisco G mode RX TP We need to change FW duration. Should we put the // code in other place?? //static u8 WIFI_CISCO_G_AP[3] = {0x00, 0x40, 0x96}; /******************************************************************************************************************** diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c index 662231968724..d3105281d31e 100644 --- a/drivers/staging/rtl8192e/r8192E_core.c +++ b/drivers/staging/rtl8192e/r8192E_core.c @@ -2313,7 +2313,7 @@ static void rtl8192_SetWirelessMode(struct net_device* dev, u8 wireless_mode) wireless_mode = WIRELESS_MODE_B; } } -#ifdef TO_DO_LIST //// TODO: this function doesn't work well at this time, we shoud wait for FPGA +#ifdef TO_DO_LIST //// TODO: this function doesn't work well at this time, we should wait for FPGA ActUpdateChannelAccessSetting( pAdapter, pHalData->CurrentWirelessMode, &pAdapter->MgntInfo.Info8185.ChannelAccessSetting ); #endif priv->ieee80211->mode = wireless_mode; @@ -6520,7 +6520,7 @@ void rtl8192_cancel_deferred_work(struct r8192_priv* priv) /* call cancel_work_sync instead of cancel_delayed_work if and only if Linux_version_code * is or is newer than 2.6.20 and work structure is defined to be struct work_struct. * Otherwise call cancel_delayed_work is enough. - * FIXME (2.6.20 shoud 2.6.22, work_struct shoud not cancel) + * FIXME (2.6.20 should 2.6.22, work_struct should not cancel) * */ cancel_delayed_work(&priv->watch_dog_wq); cancel_delayed_work(&priv->update_beacon_wq); diff --git a/drivers/staging/rtl8192su/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192su/ieee80211/rtl819x_HTProc.c index 33c7fa7edc8b..01114c5181bb 100644 --- a/drivers/staging/rtl8192su/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192su/ieee80211/rtl819x_HTProc.c @@ -42,7 +42,7 @@ static u8 DLINK_ATHEROS_1[3] = {0x00, 0x1c, 0xf0}; static u8 DLINK_ATHEROS_2[3] = {0x00, 0x21, 0x91}; static u8 CISCO_BROADCOM[3] = {0x00, 0x17, 0x94}; static u8 LINKSYS_MARVELL_4400N[3] = {0x00, 0x14, 0xa4}; -// 2008/04/01 MH For Cisco G mode RX TP We need to change FW duration. Shoud we put the +// 2008/04/01 MH For Cisco G mode RX TP We need to change FW duration. Should we put the // code in other place?? //static u8 WIFI_CISCO_G_AP[3] = {0x00, 0x40, 0x96}; /******************************************************************************************************************** diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c index 7fa02ac8e500..ecfa91b56c8d 100644 --- a/drivers/staging/rtl8192su/r8192U_core.c +++ b/drivers/staging/rtl8192su/r8192U_core.c @@ -2952,7 +2952,7 @@ void rtl8192_SetWirelessMode(struct net_device* dev, u8 wireless_mode) wireless_mode = WIRELESS_MODE_B; } } -#ifdef TO_DO_LIST //// TODO: this function doesn't work well at this time, we shoud wait for FPGA +#ifdef TO_DO_LIST //// TODO: this function doesn't work well at this time, we should wait for FPGA ActUpdateChannelAccessSetting( pAdapter, pHalData->CurrentWirelessMode, &pAdapter->MgntInfo.Info8185.ChannelAccessSetting ); #endif //LZM 090306 usb crash here, mark it temp diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index 2c4eb38c89a8..3a5eaa59b21d 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -41,7 +41,7 @@ static u8 AIRLINK_RALINK[3] = {0x00, 0x18, 0x02}; //static u8 DLINK_ATHEROS[3] = {0x00, 0x1c, 0xf0}; static u8 CISCO_BROADCOM[3] = {0x00, 0x17, 0x94}; -// 2008/04/01 MH For Cisco G mode RX TP We need to change FW duration. Shoud we put the +// 2008/04/01 MH For Cisco G mode RX TP We need to change FW duration. Should we put the // code in other place?? //static u8 WIFI_CISCO_G_AP[3] = {0x00, 0x40, 0x96}; /******************************************************************************************************************** diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 5afc73751043..7cf7ea703bba 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -2719,7 +2719,7 @@ void rtl8192_SetWirelessMode(struct net_device* dev, u8 wireless_mode) wireless_mode = WIRELESS_MODE_B; } } -#ifdef TO_DO_LIST //// TODO: this function doesn't work well at this time, we shoud wait for FPGA +#ifdef TO_DO_LIST //// TODO: this function doesn't work well at this time, we should wait for FPGA ActUpdateChannelAccessSetting( pAdapter, pHalData->CurrentWirelessMode, &pAdapter->MgntInfo.Info8185.ChannelAccessSetting ); #endif priv->ieee80211->mode = wireless_mode; From 3fc0d278e3198c8aa9baa71c49a8364d31686ba9 Mon Sep 17 00:00:00 2001 From: Adam Buchbinder Date: Fri, 18 Dec 2009 15:43:52 -0500 Subject: [PATCH 050/367] staging: Fix misspelling of "invocation" in comment. A comment misspells "invocation"; this fixes it. No code changes. Signed-off-by: Adam Buchbinder Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/hfa384x_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 925678babd9e..c6a9e17ec79b 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -52,7 +52,7 @@ * around the register accesses. The next higher level represents C-callable * prism2 API functions that match the Intersil documentation as closely * as is reasonable. The next higher layer implements common sequences -* of invokations of the API layer (e.g. write to bap, followed by cmd). +* of invocations of the API layer (e.g. write to bap, followed by cmd). * * Common sequences: * hfa384x_drvr_xxx Highest level abstractions provided by the From 1bc5e651295ab35fc7d396d940cf9a1e530c0a7e Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Fri, 18 Dec 2009 23:08:15 +0200 Subject: [PATCH 051/367] Staging: w35und: Convert typedef LOCAL_PARA to struct wb_local_para Acked-by: Pavel Machek Signed-off-by: Pekka Enberg Signed-off-by: Greg Kroah-Hartman --- drivers/staging/winbond/core.h | 2 +- drivers/staging/winbond/localpara.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/winbond/core.h b/drivers/staging/winbond/core.h index 7d4bd5e8f69b..0a2060bf4f94 100644 --- a/drivers/staging/winbond/core.h +++ b/drivers/staging/winbond/core.h @@ -14,7 +14,7 @@ struct wbsoft_priv { u32 adapterIndex; // 20060703.4 Add for using padapterContext global adapter point - WB_LOCALDESCRIPT sLocalPara; // Myself connected parameters + struct wb_local_para sLocalPara; // Myself connected parameters MLME_FRAME sMlmeFrame; // connect to peerSTA parameters diff --git a/drivers/staging/winbond/localpara.h b/drivers/staging/winbond/localpara.h index 5626a76d69a4..b731875f80f5 100644 --- a/drivers/staging/winbond/localpara.h +++ b/drivers/staging/winbond/localpara.h @@ -136,7 +136,7 @@ typedef struct _RadioOff } RadioOff, *psRadioOff; //=========================================================================== -typedef struct LOCAL_PARA +struct wb_local_para { u8 PermanentAddress[ MAC_ADDR_LENGTH + 2 ]; // read from EPROM, manufacture set for each NetCard u8 ThisMacAddress[ MAC_ADDR_LENGTH + 2 ]; // the driver will use actually. @@ -274,6 +274,6 @@ typedef struct LOCAL_PARA u16 IE_Append_size; u16 reserved_7; -} WB_LOCALDESCRIPT, *PWB_LOCALDESCRIPT; +}; #endif From 92ce4703920dc1bb380c12498a2f6bb825effbc7 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Fri, 18 Dec 2009 23:08:16 +0200 Subject: [PATCH 052/367] Staging: w35und: Convert typedef RadioOff to struct radio_off Acked-by: Pavel Machek Signed-off-by: Pekka Enberg Signed-off-by: Greg Kroah-Hartman --- drivers/staging/winbond/localpara.h | 6 +++--- drivers/staging/winbond/sme_api.h | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging/winbond/localpara.h b/drivers/staging/winbond/localpara.h index b731875f80f5..b82d5ce4b1bd 100644 --- a/drivers/staging/winbond/localpara.h +++ b/drivers/staging/winbond/localpara.h @@ -129,11 +129,11 @@ typedef struct _CHAN_LIST ChanInfo Channel[50]; // 100B } CHAN_LIST, *psCHAN_LIST; -typedef struct _RadioOff +struct radio_off { u8 boHwRadioOff; u8 boSwRadioOff; -} RadioOff, *psRadioOff; +}; //=========================================================================== struct wb_local_para @@ -186,7 +186,7 @@ struct wb_local_para u16 ListenInterval; // The listen interval when SME invoking MLME_ // (Re)Associate_Request(). - RadioOff RadioOffStatus; + struct radio_off RadioOffStatus; u8 Reserved0[2]; u8 boMsRadioOff; // Ndis demands to be true when set Disassoc. OID and be false when set SSID OID. diff --git a/drivers/staging/winbond/sme_api.h b/drivers/staging/winbond/sme_api.h index 549878302288..62c256499bc4 100644 --- a/drivers/staging/winbond/sme_api.h +++ b/drivers/staging/winbond/sme_api.h @@ -193,8 +193,6 @@ s8 sme_get_cwmin_value(void *pcore_data, u8 *cwmin); s8 sme_get_cwmax_value(void *pcore_data, u16 *cwmax); s8 sme_get_ms_radio_mode(void *pcore_data, u8 * pMsRadioOff); s8 sme_set_ms_radio_mode(void *pcore_data, u8 boMsRadioOff); -s8 sme_get_radio_mode(void *pcore_data, psRadioOff pRadioOffData); -s8 sme_set_radio_mode(void *pcore_data, RadioOff RadioOffData); void sme_get_tx_power_level(void *pcore_data, u32 *TxPower); u8 sme_set_tx_power_level(void *pcore_data, u32 TxPower); From 395af561825095b2df30ed2ee86c3ed898783e8f Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Fri, 18 Dec 2009 23:08:17 +0200 Subject: [PATCH 053/367] Staging: w35und: Remove unused typedef _EVENTLOG Acked-by: Pavel Machek Signed-off-by: Pekka Enberg Signed-off-by: Greg Kroah-Hartman --- drivers/staging/winbond/localpara.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/staging/winbond/localpara.h b/drivers/staging/winbond/localpara.h index b82d5ce4b1bd..6b29b56cf5d7 100644 --- a/drivers/staging/winbond/localpara.h +++ b/drivers/staging/winbond/localpara.h @@ -110,13 +110,6 @@ // 20061108 WPS IE buffer #define MAX_IE_APPEND_SIZE 256 + 4 // Due to [E id][Length][OUI][Data] may 257 bytes -typedef struct _EVENTLOG -{ - u16 Count; //Total count from start - u16 index; //Buffer index, 0 ~ 63 - u32 EventValue[64]; //BYTE 3~2 : count, BYTE 1 : Event, BYTE 0 : reason -} Event_Log, *pEvent_Log; - typedef struct _ChanInfo { u8 band; @@ -264,8 +257,6 @@ struct wb_local_para u32 bToSelfPacketReceived; u32 WepKeyDetectTimerCount; - Event_Log EventLog; - u16 SignalLostTh; u16 SignalRoamTh; From 440a233db4c117f34397abd3722d5802fe1b8c30 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Fri, 18 Dec 2009 23:08:18 +0200 Subject: [PATCH 054/367] Staging: w35und: Convert typedef ChanInfo to struct chan_info Acked-by: Pavel Machek Signed-off-by: Pekka Enberg Signed-off-by: Greg Kroah-Hartman --- drivers/staging/winbond/localpara.h | 10 +++++----- drivers/staging/winbond/reg.c | 10 +++++----- drivers/staging/winbond/sme_api.h | 2 +- drivers/staging/winbond/wb35reg_f.h | 2 +- drivers/staging/winbond/wbusb.c | 8 ++++---- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/staging/winbond/localpara.h b/drivers/staging/winbond/localpara.h index 6b29b56cf5d7..7ca58d020578 100644 --- a/drivers/staging/winbond/localpara.h +++ b/drivers/staging/winbond/localpara.h @@ -110,16 +110,16 @@ // 20061108 WPS IE buffer #define MAX_IE_APPEND_SIZE 256 + 4 // Due to [E id][Length][OUI][Data] may 257 bytes -typedef struct _ChanInfo +struct chan_info { u8 band; u8 ChanNo; -} ChanInfo, *pChanInfo; +}; typedef struct _CHAN_LIST { u16 Count; - ChanInfo Channel[50]; // 100B + struct chan_info Channel[50]; // 100B } CHAN_LIST, *psCHAN_LIST; struct radio_off @@ -189,7 +189,7 @@ struct wb_local_para u8 RoamStatus; u8 reserved7[3]; - ChanInfo CurrentChan; //Current channel no. and channel band. It may be changed by scanning. + struct chan_info CurrentChan; //Current channel no. and channel band. It may be changed by scanning. u8 boHandover; // Roaming, Hnadover to other AP. u8 boCCAbusy; @@ -246,7 +246,7 @@ struct wb_local_para u32 _dot11WEPUndecryptableCount; u32 _dot11FrameDuplicateCount; - ChanInfo IbssChanSetting; // 2B. Start IBSS Channel setting by registry or WWU. + struct chan_info IbssChanSetting; // 2B. Start IBSS Channel setting by registry or WWU. u8 reserved_5[2]; //It may not be used after considering RF type, //region and modulation type. diff --git a/drivers/staging/winbond/reg.c b/drivers/staging/winbond/reg.c index d915cbdd38ed..5f5048af26a5 100644 --- a/drivers/staging/winbond/reg.c +++ b/drivers/staging/winbond/reg.c @@ -1823,12 +1823,12 @@ BBProcessor_initial( struct hw_data * pHwData ) reg->SQ3_filter[i] = 0x2f; // half of Bit 0 ~ 6 } -void set_tx_power_per_channel_max2829( struct hw_data * pHwData, ChanInfo Channel) +void set_tx_power_per_channel_max2829( struct hw_data * pHwData, struct chan_info Channel) { RFSynthesizer_SetPowerIndex( pHwData, 100 ); // 20060620.1 Modify } -void set_tx_power_per_channel_al2230( struct hw_data * pHwData, ChanInfo Channel ) +void set_tx_power_per_channel_al2230( struct hw_data * pHwData, struct chan_info Channel ) { u8 index = 100; @@ -1838,7 +1838,7 @@ void set_tx_power_per_channel_al2230( struct hw_data * pHwData, ChanInfo Chann RFSynthesizer_SetPowerIndex( pHwData, index ); } -void set_tx_power_per_channel_al7230( struct hw_data * pHwData, ChanInfo Channel) +void set_tx_power_per_channel_al7230( struct hw_data * pHwData, struct chan_info Channel) { u8 i, index = 100; @@ -1868,7 +1868,7 @@ void set_tx_power_per_channel_al7230( struct hw_data * pHwData, ChanInfo Chann RFSynthesizer_SetPowerIndex( pHwData, index ); } -void set_tx_power_per_channel_wb242( struct hw_data * pHwData, ChanInfo Channel) +void set_tx_power_per_channel_wb242( struct hw_data * pHwData, struct chan_info Channel) { u8 index = 100; @@ -1901,7 +1901,7 @@ void set_tx_power_per_channel_wb242( struct hw_data * pHwData, ChanInfo Channe // None. //============================================================================================================= void -RFSynthesizer_SwitchingChannel( struct hw_data * pHwData, ChanInfo Channel ) +RFSynthesizer_SwitchingChannel( struct hw_data * pHwData, struct chan_info Channel ) { struct wb35_reg *reg = &pHwData->reg; u32 pltmp[16]; // The 16 is the maximum capability of hardware diff --git a/drivers/staging/winbond/sme_api.h b/drivers/staging/winbond/sme_api.h index 62c256499bc4..b5898294eb8a 100644 --- a/drivers/staging/winbond/sme_api.h +++ b/drivers/staging/winbond/sme_api.h @@ -201,7 +201,7 @@ void sme_get_rx_antenna(void *pcore_data, u32 *RxAntenna); u8 sme_set_rx_antenna(void *pcore_data, u32 RxAntenna); void sme_get_tx_antenna(void *pcore_data, u32 *TxAntenna); s8 sme_set_tx_antenna(void *pcore_data, u32 TxAntenna); -s8 sme_set_IBSS_chan(void *pcore_data, ChanInfo chan); +s8 sme_set_IBSS_chan(void *pcore_data, struct chan_info chan); //20061108 WPS s8 sme_set_IE_append(void *pcore_data, u8 *buffer, u16 buf_len); diff --git a/drivers/staging/winbond/wb35reg_f.h b/drivers/staging/winbond/wb35reg_f.h index 30f5b5ad63ad..d352bce5c171 100644 --- a/drivers/staging/winbond/wb35reg_f.h +++ b/drivers/staging/winbond/wb35reg_f.h @@ -14,7 +14,7 @@ void Dxx_initial( struct hw_data * pHwData ); void Mxx_initial( struct hw_data * pHwData ); void RFSynthesizer_initial( struct hw_data * pHwData ); //void RFSynthesizer_SwitchingChannel( struct hw_data * pHwData, s8 Channel ); -void RFSynthesizer_SwitchingChannel( struct hw_data * pHwData, ChanInfo Channel ); +void RFSynthesizer_SwitchingChannel( struct hw_data * pHwData, struct chan_info Channel ); void BBProcessor_initial( struct hw_data * pHwData ); void BBProcessor_RateChanging( struct hw_data * pHwData, u8 rate ); // 20060613.1 //void RF_RateChanging( struct hw_data * pHwData, u8 rate ); // 20060626.5.c Add diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c index 067082a7d759..1c5876359491 100644 --- a/drivers/staging/winbond/wbusb.c +++ b/drivers/staging/winbond/wbusb.c @@ -161,7 +161,7 @@ static void hal_set_radio_mode(struct hw_data *pHwData, unsigned char radio_off) } static void -hal_set_current_channel_ex(struct hw_data *pHwData, ChanInfo channel) +hal_set_current_channel_ex(struct hw_data *pHwData, struct chan_info channel) { struct wb35_reg *reg = &pHwData->reg; @@ -180,10 +180,10 @@ hal_set_current_channel_ex(struct hw_data *pHwData, ChanInfo channel) reg->M28_MacControl &= ~0xff; // Clean channel information field reg->M28_MacControl |= channel.ChanNo; Wb35Reg_WriteWithCallbackValue(pHwData, 0x0828, reg->M28_MacControl, - (s8 *) & channel, sizeof(ChanInfo)); + (s8 *) & channel, sizeof(struct chan_info)); } -static void hal_set_current_channel(struct hw_data *pHwData, ChanInfo channel) +static void hal_set_current_channel(struct hw_data *pHwData, struct chan_info channel) { hal_set_current_channel_ex(pHwData, channel); } @@ -253,7 +253,7 @@ static void hal_set_accept_beacon(struct hw_data *pHwData, u8 enable) static int wbsoft_config(struct ieee80211_hw *dev, u32 changed) { struct wbsoft_priv *priv = dev->priv; - ChanInfo ch; + struct chan_info ch; printk("wbsoft_config called\n"); From 23b0dce239426ff8a7068b8d617d0c6eb4544cf7 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Fri, 18 Dec 2009 23:08:19 +0200 Subject: [PATCH 055/367] Staging: w35und: Remove unused typedef CHAN_LIST Acked-by: Pavel Machek Signed-off-by: Pekka Enberg Signed-off-by: Greg Kroah-Hartman --- drivers/staging/winbond/localpara.h | 7 ------- drivers/staging/winbond/scan_s.h | 1 - 2 files changed, 8 deletions(-) diff --git a/drivers/staging/winbond/localpara.h b/drivers/staging/winbond/localpara.h index 7ca58d020578..fcf6a0442dc2 100644 --- a/drivers/staging/winbond/localpara.h +++ b/drivers/staging/winbond/localpara.h @@ -116,12 +116,6 @@ struct chan_info u8 ChanNo; }; -typedef struct _CHAN_LIST -{ - u16 Count; - struct chan_info Channel[50]; // 100B -} CHAN_LIST, *psCHAN_LIST; - struct radio_off { u8 boHwRadioOff; @@ -250,7 +244,6 @@ struct wb_local_para u8 reserved_5[2]; //It may not be used after considering RF type, //region and modulation type. - CHAN_LIST sSupportChanList; // 86B. It will be obtained according to RF type and region u8 reserved_6[2]; //two variables are for wep key error detection added by ws 02/02/04 u32 bWepKeyError; diff --git a/drivers/staging/winbond/scan_s.h b/drivers/staging/winbond/scan_s.h index 775bb81f23cc..209717f5d47d 100644 --- a/drivers/staging/winbond/scan_s.h +++ b/drivers/staging/winbond/scan_s.h @@ -35,7 +35,6 @@ typedef struct _SCAN_REQ_PARA //mandatory parameters for SCAN request { u32 ScanType; //passive/active scan - CHAN_LIST sChannelList; // 86B u8 reserved_1[2]; struct SSID_Element sSSID; // 34B. scan only for this SSID From 2b6e6df4d911e5ef1f438b84ee00cfc48865aff3 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Fri, 18 Dec 2009 23:08:20 +0200 Subject: [PATCH 056/367] Staging: w35und: Remove unused typedef TXRETRY_REC Acked-by: Pavel Machek Signed-off-by: Pekka Enberg Signed-off-by: Greg Kroah-Hartman --- drivers/staging/winbond/mto.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/staging/winbond/mto.h b/drivers/staging/winbond/mto.h index 4fe24b0f2791..fb4781d5781b 100644 --- a/drivers/staging/winbond/mto.h +++ b/drivers/staging/winbond/mto.h @@ -141,11 +141,6 @@ extern u16 MTO_Frag_Th_Tbl[]; #define MTO_DATA_RATE() MTO_Data_Rate_Tbl[MTO_RATE_LEVEL()] #define MTO_FRAG_TH() MTO_Frag_Th_Tbl[MTO_FRAG_TH_LEVEL()] -typedef struct { - u8 tx_rate; - u8 tx_retry_rate; -} TXRETRY_REC; - extern void MTO_Init(struct wbsoft_priv *); extern void MTO_PeriodicTimerExpired(struct wbsoft_priv *); extern void MTO_SetDTORateRange(struct wbsoft_priv *, u8 *, u8); From 8fab4020fa1aa5ee3ad4e409323be9edfbd6c20e Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Fri, 18 Dec 2009 23:08:21 +0200 Subject: [PATCH 057/367] Staging: w35und: Remove unused typedef RXLAYER1 Acked-by: Pavel Machek Signed-off-by: Pekka Enberg Signed-off-by: Greg Kroah-Hartman --- drivers/staging/winbond/mds_f.h | 3 --- drivers/staging/winbond/mds_s.h | 28 ---------------------------- 2 files changed, 31 deletions(-) diff --git a/drivers/staging/winbond/mds_f.h b/drivers/staging/winbond/mds_f.h index ab1ea535f7db..e09dd4b879d4 100644 --- a/drivers/staging/winbond/mds_f.h +++ b/drivers/staging/winbond/mds_f.h @@ -11,9 +11,6 @@ void Mds_SendComplete( struct wbsoft_priv *adapter, PT02_DESCRIPTOR pT02 ); void Mds_MpduProcess( struct wbsoft_priv *adapter, struct wb35_descriptor *pRxDes ); extern void DataDmp(u8 *pdata, u32 len, u32 offset); -// For Asynchronous indicating. The routine collocates with USB. -void Mds_MsduProcess( struct wbsoft_priv *adapter, PRXLAYER1 pRxLayer1, u8 SlotIndex); - // For data frame sending 20060802 u16 MDS_GetPacketSize( struct wbsoft_priv *adapter ); void MDS_GetNextPacket( struct wbsoft_priv *adapter, struct wb35_descriptor *pDes ); diff --git a/drivers/staging/winbond/mds_s.h b/drivers/staging/winbond/mds_s.h index e8e13bde4744..217ff0819a93 100644 --- a/drivers/staging/winbond/mds_s.h +++ b/drivers/staging/winbond/mds_s.h @@ -133,32 +133,4 @@ struct wb35_mds { }; -// -// Reveive Layer 1 Format. -//---------------------------- -typedef struct _RXLAYER1 -{ - u16 SequenceNumber; // The sequence number of the last received packet. - u16 BufferTotalSize; - - u32 InUsed; - u32 DecryptionMethod; // The desired defragment number of the next incoming packet. - - u8 DeFragmentNumber; - u8 FrameType; - u8 TypeEncapsulated; - u8 BufferNumber; - - u32 FirstFrameArrivedTime; - - u8 LastFrameType; // 20061004 for fix intel 3945 's bug - u8 RESERVED[3]; //@@ anson - - ///////////////////////////////////////////////////////////////////////////////////////////// - // For brand-new Rx system - u8 ReservedBuffer[ 2400 ];//If Buffer ID is reserved one, it must copy the data into this area - u8 *ReservedBufferPoint;// Point to the next availabe address of reserved buffer - -}RXLAYER1, * PRXLAYER1; - #endif From 096417e087a391dc78780cc1843369a521635522 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Fri, 18 Dec 2009 23:08:22 +0200 Subject: [PATCH 058/367] Staging: w35und: Remove unused typedefs MLME_DEAUTHREQ_PARA and MLME_DISASSOCREQ_PARA Acked-by: Pavel Machek Signed-off-by: Pekka Enberg Signed-off-by: Greg Kroah-Hartman --- drivers/staging/winbond/mlme_s.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/staging/winbond/mlme_s.h b/drivers/staging/winbond/mlme_s.h index ea12684a2b1d..1217a1c025e5 100644 --- a/drivers/staging/winbond/mlme_s.h +++ b/drivers/staging/winbond/mlme_s.h @@ -165,14 +165,6 @@ typedef struct _AUTHREQ { } MLME_AUTHREQ_PARA, *psMLME_AUTHREQ_PARA; -struct _Reason_Code { - - u8 peerMACaddr[MAC_ADDR_LENGTH]; - u16 wReasonCode; -}; -typedef struct _Reason_Code MLME_DEAUTHREQ_PARA, *psMLME_DEAUTHREQ_PARA; -typedef struct _Reason_Code MLME_DISASSOCREQ_PARA, *psMLME_DISASSOCREQ_PARA; - typedef struct _ASSOCREQ { u8 PeerSTAAddr[MAC_ADDR_LENGTH]; u16 CapabilityInfo; From 8c172dde41db666f7a5f3bb62205da017e23c0ec Mon Sep 17 00:00:00 2001 From: Justin Madru Date: Fri, 18 Dec 2009 15:52:53 -0800 Subject: [PATCH 059/367] Staging: s5k3e2fx.c: simplify complexity by factoring the code was looping, setting s_move[i] to the following calculations if (actual_step>= 0) s_move[i] = ((((i + 1) * gain + 0x200) - (i * gain + 0x200)) / 0x400); else s_move[i] = ((((i + 1) * gain - 0x200) - (i * gain - 0x200)) / 0x400); but, this code reduces to the expression s_move[i] = gain>> 10; The reason for the complexity was to generate a step function with integer division and rounding to land on specific values. But these calculations can be simplified to the following code: gain = ((actual_step<< 10) / 5)>> 10; for (i = 0; i<= 4; i++) s_move[i] = gain; Signed-off-by: Justin Madru Reviewed-by: Ray Lee Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dream/camera/s5k3e2fx.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/staging/dream/camera/s5k3e2fx.c b/drivers/staging/dream/camera/s5k3e2fx.c index edba19889b0f..66582af5a586 100644 --- a/drivers/staging/dream/camera/s5k3e2fx.c +++ b/drivers/staging/dream/camera/s5k3e2fx.c @@ -1093,14 +1093,10 @@ static int32_t s5k3e2fx_move_focus(int direction, int32_t num_steps) actual_step = step_direction * (int16_t)num_steps; pos_offset = init_code + s5k3e2fx_ctrl->curr_lens_pos; - gain = actual_step * 0x400 / 5; + gain = ((actual_step << 10) / 5) >> 10; - for (i = 0; i <= 4; i++) { - if (actual_step >= 0) - s_move[i] = ((((i+1)*gain+0x200) - (i*gain+0x200))/0x400); - else - s_move[i] = ((((i+1)*gain-0x200) - (i*gain-0x200))/0x400); - } + for (i = 0; i <= 4; i++) + s_move[i] = gain; /* Ring Damping Code */ for (i = 0; i <= 4; i++) { From 784d3119475652d34a8d8ec3911e39c5e3d3036f Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Mon, 21 Dec 2009 15:07:10 +1100 Subject: [PATCH 060/367] Staging: rtl8192su: Build should select WIRELESS_EXT The prevailing idiom is to select WIRELESS_EXT not depend on it. Depending leaves this driver in a situation where it can only be built if another driver that selects WIRELESS_EXT has been enabled. Signed-off-by: Simon Horman Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192su/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192su/Kconfig b/drivers/staging/rtl8192su/Kconfig index 123fa6d6a93b..b72a96206f58 100644 --- a/drivers/staging/rtl8192su/Kconfig +++ b/drivers/staging/rtl8192su/Kconfig @@ -1,6 +1,7 @@ config RTL8192SU tristate "RealTek RTL8192SU Wireless LAN NIC driver" depends on PCI && WLAN && USB - depends on WIRELESS_EXT + select WIRELESS_EXT + select WEXT_PRIV default N ---help--- From d512a142f0a3d5ce138880fb2a70462542d5f711 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Mon, 21 Dec 2009 15:07:50 +1100 Subject: [PATCH 061/367] Staging: rtl8192su: Use z format qualifier for output of sizeof() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit $ gcc --version gcc (Debian 4.4.2-5) 4.4.2 Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ make ... drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c: In function ‘ieee80211_rx_ADDBAReq’: drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c:342: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘unsigned int’ drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c: In function ‘ieee80211_rx_ADDBARsp’: drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c:443: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘unsigned int’ drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c: In function ‘ieee80211_rx_DELBA’: drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c:573: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘unsigned int’ ... Also some style fixes for these lines: + Fix excessively long lines + Remove leading space before struct + Remove unnecessary parentheses Signed-off-by: Simon Horman Signed-off-by: Greg Kroah-Hartman --- .../staging/rtl8192su/ieee80211/rtl819x_BAProc.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c index 6eb1096866af..5a3888450ab3 100644 --- a/drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c @@ -339,7 +339,10 @@ int ieee80211_rx_ADDBAReq( struct ieee80211_device* ieee, struct sk_buff *skb) if (skb->len < sizeof( struct ieee80211_hdr_3addr) + 9) { - IEEE80211_DEBUG(IEEE80211_DL_ERR, " Invalid skb len in BAREQ(%d / %ld)\n", skb->len, (sizeof( struct ieee80211_hdr_3addr) + 9)); + IEEE80211_DEBUG(IEEE80211_DL_ERR, + " Invalid skb len in BAREQ(%d / %zd)\n", + skb->len, + sizeof(struct ieee80211_hdr_3addr) + 9); return -1; } @@ -440,7 +443,10 @@ int ieee80211_rx_ADDBARsp( struct ieee80211_device* ieee, struct sk_buff *skb) if (skb->len < sizeof( struct ieee80211_hdr_3addr) + 9) { - IEEE80211_DEBUG(IEEE80211_DL_ERR, " Invalid skb len in BARSP(%d / %ld)\n", skb->len, (sizeof( struct ieee80211_hdr_3addr) + 9)); + IEEE80211_DEBUG(IEEE80211_DL_ERR, + " Invalid skb len in BARSP(%d / %zd)\n", + skb->len, + sizeof(struct ieee80211_hdr_3addr) + 9); return -1; } rsp = ( struct ieee80211_hdr_3addr*)skb->data; @@ -570,7 +576,10 @@ int ieee80211_rx_DELBA(struct ieee80211_device* ieee,struct sk_buff *skb) if (skb->len < sizeof( struct ieee80211_hdr_3addr) + 6) { - IEEE80211_DEBUG(IEEE80211_DL_ERR, " Invalid skb len in DELBA(%d / %ld)\n", skb->len, (sizeof( struct ieee80211_hdr_3addr) + 6)); + IEEE80211_DEBUG(IEEE80211_DL_ERR, + " Invalid skb len in DELBA(%d / %zd)\n", + skb->len, + sizeof(struct ieee80211_hdr_3addr) + 6); return -1; } From e8ffaa3a06a71a5a02373cfcb5f474f9a181ec68 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Mon, 21 Dec 2009 15:08:15 +1100 Subject: [PATCH 062/367] Staging: prism2-usb: Build should select WIRELESS_EXT The prevailing idiom is to select WIRELESS_EXT not depend on it. Depending leaves this driver in a situation where it can only be built if another driver that selects WIRELESS_EXT has been enabled. Signed-off-by: Simon Horman Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wlan-ng/Kconfig b/drivers/staging/wlan-ng/Kconfig index f44294b0d8dc..704ebd26e628 100644 --- a/drivers/staging/wlan-ng/Kconfig +++ b/drivers/staging/wlan-ng/Kconfig @@ -1,6 +1,7 @@ config PRISM2_USB tristate "Prism2.5/3 USB driver" - depends on WLAN && USB && WIRELESS_EXT + depends on WLAN && USB + select WIRELESS_EXT default n ---help--- This is the wlan-ng prism 2.5/3 USB driver for a wide range of From 8125e2f66800f9e16e632df20fa3195c07f6aaf9 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Mon, 21 Dec 2009 15:09:53 +1100 Subject: [PATCH 063/367] Staging: wlan-ng: initialise mibitem MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit $ gcc --version gcc (Debian 4.4.2-5) 4.4.2 Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ make ... drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_dorequest’: drivers/staging/wlan-ng/p80211wext.c:139: warning: ‘mibitem.len’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:139: warning: ‘mibitem.status’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_giwretry’: drivers/staging/wlan-ng/p80211wext.c:967: warning: ‘mibitem.len’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:967: warning: ‘mibitem.status’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:967: warning: ‘mibitem.data’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_siwretry’: drivers/staging/wlan-ng/p80211wext.c:1057: warning: ‘mibitem.len’ may be used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:1057: warning: ‘mibitem.status’ may be used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_giwtxpow’: drivers/staging/wlan-ng/p80211wext.c:1149: warning: ‘mibitem.len’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:1149: warning: ‘mibitem.status’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:1149: warning: ‘mibitem.data’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_siwtxpow’: drivers/staging/wlan-ng/p80211wext.c:1123: warning: ‘mibitem.len’ may be used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:1123: warning: ‘mibitem.status’ may be used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_giwfrag’: drivers/staging/wlan-ng/p80211wext.c:891: warning: ‘mibitem.len’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:891: warning: ‘mibitem.status’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:891: warning: ‘mibitem.data’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_siwfrag’: drivers/staging/wlan-ng/p80211wext.c:933: warning: ‘mibitem.len’ may be used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:933: warning: ‘mibitem.status’ may be used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_giwrts’: drivers/staging/wlan-ng/p80211wext.c:826: warning: ‘mibitem.len’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:826: warning: ‘mibitem.status’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:826: warning: ‘mibitem.data’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_siwrts’: drivers/staging/wlan-ng/p80211wext.c:866: warning: ‘mibitem.len’ may be used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:866: warning: ‘mibitem.status’ may be used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_giwrate’: drivers/staging/wlan-ng/p80211wext.c:775: warning: ‘mibitem.len’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:775: warning: ‘mibitem.status’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:775: warning: ‘mibitem.data’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_giwfreq’: drivers/staging/wlan-ng/p80211wext.c:273: warning: ‘mibitem.len’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:273: warning: ‘mibitem.status’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:273: warning: ‘mibitem.data’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_siwfreq’: drivers/staging/wlan-ng/p80211wext.c:320: warning: ‘mibitem.len’ may be used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_siwmode’: drivers/staging/wlan-ng/p80211wext.c:401: warning: ‘mibitem.len’ may be used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:401: warning: ‘mibitem.status’ may be used uninitialized in this function ... Signed-off-by: Simon Horman Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/p80211wext.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c index 74d8022adb24..63bdaaa7a7aa 100644 --- a/drivers/staging/wlan-ng/p80211wext.c +++ b/drivers/staging/wlan-ng/p80211wext.c @@ -134,6 +134,7 @@ static int p80211wext_dorequest(wlandevice_t *wlandev, u32 did, u32 data) int result; msg.msgcode = DIDmsg_dot11req_mibset; + memset(&mibitem, 0, sizeof(mibitem)); mibitem.did = did; mibitem.data = data; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); @@ -269,6 +270,7 @@ static int p80211wext_giwfreq(netdevice_t *dev, int err = 0; msg.msgcode = DIDmsg_dot11req_mibget; + memset(&mibitem, 0, sizeof(mibitem)); mibitem.did = DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); result = p80211req_dorequest(wlandev, (u8 *) & msg); @@ -309,6 +311,7 @@ static int p80211wext_siwfreq(netdevice_t *dev, } msg.msgcode = DIDmsg_dot11req_mibset; + memset(&mibitem, 0, sizeof(mibitem)); mibitem.did = DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel; mibitem.status = P80211ENUM_msgitem_status_data_ok; @@ -396,6 +399,7 @@ static int p80211wext_siwmode(netdevice_t *dev, /* Set Operation mode to the PORT TYPE RID */ msg.msgcode = DIDmsg_dot11req_mibset; + memset(&mibitem, 0, sizeof(mibitem)); mibitem.did = DIDmib_p2_p2Static_p2CnfPortType; mibitem.data = (*mode == IW_MODE_ADHOC) ? 0 : 1; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); @@ -771,6 +775,7 @@ static int p80211wext_giwrate(netdevice_t *dev, int err = 0; msg.msgcode = DIDmsg_dot11req_mibget; + memset(&mibitem, 0, sizeof(mibitem)); mibitem.did = DIDmib_p2_p2MAC_p2CurrentTxRate; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); result = p80211req_dorequest(wlandev, (u8 *) & msg); @@ -822,6 +827,7 @@ static int p80211wext_giwrts(netdevice_t *dev, int err = 0; msg.msgcode = DIDmsg_dot11req_mibget; + memset(&mibitem, 0, sizeof(mibitem)); mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); result = p80211req_dorequest(wlandev, (u8 *) & msg); @@ -857,6 +863,7 @@ static int p80211wext_siwrts(netdevice_t *dev, } msg.msgcode = DIDmsg_dot11req_mibget; + memset(&mibitem, 0, sizeof(mibitem)); mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold; if (rts->disabled) mibitem.data = 2347; @@ -886,6 +893,7 @@ static int p80211wext_giwfrag(netdevice_t *dev, int err = 0; msg.msgcode = DIDmsg_dot11req_mibget; + memset(&mibitem, 0, sizeof(mibitem)); mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); @@ -922,6 +930,7 @@ static int p80211wext_siwfrag(netdevice_t *dev, } msg.msgcode = DIDmsg_dot11req_mibset; + memset(&mibitem, 0, sizeof(mibitem)); mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold; @@ -962,6 +971,7 @@ static int p80211wext_giwretry(netdevice_t *dev, u16 shortretry, longretry, lifetime; msg.msgcode = DIDmsg_dot11req_mibget; + memset(&mibitem, 0, sizeof(mibitem)); mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11ShortRetryLimit; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); @@ -1037,6 +1047,8 @@ static int p80211wext_siwretry(netdevice_t *dev, int result; int err = 0; + memset(&mibitem, 0, sizeof(mibitem)); + if (!wlan_wext_write) { err = (-EOPNOTSUPP); goto exit; @@ -1114,6 +1126,7 @@ static int p80211wext_siwtxpow(netdevice_t *dev, } msg.msgcode = DIDmsg_dot11req_mibset; + memset(&mibitem, 0, sizeof(mibitem)); mibitem.did = DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel; if (rrq->fixed == 0) @@ -1143,6 +1156,8 @@ static int p80211wext_giwtxpow(netdevice_t *dev, int err = 0; msg.msgcode = DIDmsg_dot11req_mibget; + + memset(&mibitem, 0, sizeof(mibitem)); mibitem.did = DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel; From 1769fd86e13eadeca64881fb8494a17afeccbbbf Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 22 Dec 2009 15:18:28 -0800 Subject: [PATCH 064/367] Staging: dt3155: coding style cleanups for allocator code This fixes up the worst of the coding style errors for the allocator code. Cc: Scott Smedley Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dt3155/allocator.c | 284 ++++++++++++++--------------- drivers/staging/dt3155/allocator.h | 2 +- 2 files changed, 143 insertions(+), 143 deletions(-) diff --git a/drivers/staging/dt3155/allocator.c b/drivers/staging/dt3155/allocator.c index 90429db1c5f7..c1b85447c0e0 100644 --- a/drivers/staging/dt3155/allocator.c +++ b/drivers/staging/dt3155/allocator.c @@ -26,7 +26,7 @@ Date Programmer Description of changes made ------------------------------------------------------------------- 02-Aug-2002 NJC allocator now steps in 1MB increments, rather - than doubling its size each time. + than doubling its size each time. Also, allocator_init(u_int *) now returns (in the first arg) the size of the free space. This is no longer consistent with @@ -68,7 +68,7 @@ # define DUMP_LIST() dump_list() # ifdef __KERNEL__ /* This one if debugging is on, and kernel space */ -# define PDEBUG(fmt, args...) printk( KERN_DEBUG ALL_MSG fmt, ## args) +# define PDEBUG(fmt, args...) printk(KERN_DEBUG ALL_MSG fmt, ## args) # else /* This one for user space */ # define PDEBUG(fmt, args...) fprintf(stderr, fmt, ## args) @@ -88,8 +88,8 @@ int allocator_himem = 1; /* 0 = probe, pos. = megs, neg. = disable */ int allocator_step = 1; /* This is the step size in MB */ int allocator_probe = 1; /* This is a flag -- 1=probe, 0=don't probe */ -static unsigned long allocator_buffer = 0; /* physical address */ -static unsigned long allocator_buffer_size = 0; /* kilobytes */ +static unsigned long allocator_buffer; /* physical address */ +static unsigned long allocator_buffer_size; /* kilobytes */ /* * The allocator keeps a list of DMA areas, so multiple devices @@ -97,24 +97,23 @@ static unsigned long allocator_buffer_size = 0; /* kilobytes */ */ struct allocator_struct { - unsigned long address; - unsigned long size; - struct allocator_struct *next; + unsigned long address; + unsigned long size; + struct allocator_struct *next; }; -struct allocator_struct *allocator_list = NULL; +struct allocator_struct *allocator_list; #ifdef ALL_DEBUG static int dump_list(void) { - struct allocator_struct *ptr; + struct allocator_struct *ptr; - PDEBUG("Current list:\n"); - for (ptr = allocator_list; ptr; ptr = ptr->next) { - PDEBUG("0x%08lx (size %likB)\n",ptr->address,ptr->size>>10); - } - return 0; + PDEBUG("Current list:\n"); + for (ptr = allocator_list; ptr; ptr = ptr->next) + PDEBUG("0x%08lx (size %likB)\n", ptr->address, ptr->size>>10); + return 0; } #endif @@ -126,68 +125,69 @@ static int dump_list(void) * be used straight ahead for DMA, but needs remapping for program use). */ -unsigned long allocator_allocate_dma (unsigned long kilobytes, int prio) +unsigned long allocator_allocate_dma(unsigned long kilobytes, int prio) { - struct allocator_struct *ptr = allocator_list, *newptr; - unsigned long bytes = kilobytes << 10; + struct allocator_struct *ptr = allocator_list, *newptr; + unsigned long bytes = kilobytes << 10; - /* check if high memory is available */ - if (!allocator_buffer) - return 0; + /* check if high memory is available */ + if (!allocator_buffer) + return 0; - /* Round it to a multiple of the pagesize */ - bytes = PAGE_ALIGN(bytes); - PDEBUG("request for %li bytes\n", bytes); + /* Round it to a multiple of the pagesize */ + bytes = PAGE_ALIGN(bytes); + PDEBUG("request for %li bytes\n", bytes); - while (ptr && ptr->next) { - if (ptr->next->address - (ptr->address + ptr->size) >= bytes) - break; /* enough space */ - ptr = ptr->next; - } - if (!ptr->next) { - DUMP_LIST(); - PDEBUG("alloc failed\n"); - return 0; /* end of list */ - } - newptr = kmalloc(sizeof(struct allocator_struct),prio); - if (!newptr) - return 0; + while (ptr && ptr->next) { + if (ptr->next->address - (ptr->address + ptr->size) >= bytes) + break; /* enough space */ + ptr = ptr->next; + } + if (!ptr->next) { + DUMP_LIST(); + PDEBUG("alloc failed\n"); + return 0; /* end of list */ + } + newptr = kmalloc(sizeof(struct allocator_struct), prio); + if (!newptr) + return 0; - /* ok, now stick it after ptr */ - newptr->address = ptr->address + ptr->size; - newptr->size = bytes; - newptr->next = ptr->next; - ptr->next = newptr; + /* ok, now stick it after ptr */ + newptr->address = ptr->address + ptr->size; + newptr->size = bytes; + newptr->next = ptr->next; + ptr->next = newptr; - DUMP_LIST(); - PDEBUG("returning 0x%08lx\n",newptr->address); - return newptr->address; + DUMP_LIST(); + PDEBUG("returning 0x%08lx\n", newptr->address); + return newptr->address; } -int allocator_free_dma (unsigned long address) +int allocator_free_dma(unsigned long address) { - struct allocator_struct *ptr = allocator_list, *prev; + struct allocator_struct *ptr = allocator_list, *prev; - while (ptr && ptr->next) { - if (ptr->next->address == address) - break; - ptr = ptr->next; + while (ptr && ptr->next) { + if (ptr->next->address == address) + break; + ptr = ptr->next; } - /* the one being freed is ptr->next */ - prev = ptr; ptr = ptr->next; + /* the one being freed is ptr->next */ + prev = ptr; ptr = ptr->next; - if (!ptr) { - printk(KERN_ERR ALL_MSG "free_dma(0x%08lx) but add. not allocated\n", - ptr->address); - return -EINVAL; - } - PDEBUGG("freeing: %08lx (%li) next %08lx\n",ptr->address,ptr->size, - ptr->next->address); - prev->next = ptr->next; - kfree(ptr); + if (!ptr) { + printk(KERN_ERR ALL_MSG + "free_dma(0x%08lx) but add. not allocated\n", + ptr->address); + return -EINVAL; + } + PDEBUGG("freeing: %08lx (%li) next %08lx\n", ptr->address, ptr->size, + ptr->next->address); + prev->next = ptr->next; + kfree(ptr); - /* dump_list(); */ - return 0; + /* dump_list(); */ + return 0; } /* ======================================================================== @@ -198,99 +198,99 @@ int allocator_free_dma (unsigned long address) */ int allocator_init(u_long *allocator_max) { - /* check how much free memory is there */ + /* check how much free memory is there */ + void *remapped; + unsigned long max; + unsigned long trial_size = allocator_himem<<20; + unsigned long last_trial = 0; + unsigned long step = allocator_step<<20; + unsigned long i = 0; + struct allocator_struct *head, *tail; + char test_string[] = "0123456789abcde"; /* 16 bytes */ - volatile void *remapped; - unsigned long max; - unsigned long trial_size = allocator_himem<<20; - unsigned long last_trial = 0; - unsigned long step = allocator_step<<20; - unsigned long i=0; - struct allocator_struct *head, *tail; - char test_string[]="0123456789abcde"; /* 16 bytes */ + PDEBUGG("himem = %i\n", allocator_himem); + if (allocator_himem < 0) /* don't even try */ + return -EINVAL; - PDEBUGG("himem = %i\n",allocator_himem); - if (allocator_himem < 0) /* don't even try */ - return -EINVAL; + if (!trial_size) + trial_size = 1<<20; /* not specified: try one meg */ - if (!trial_size) trial_size = 1<<20; /* not specified: try one meg */ + while (1) { + remapped = ioremap(__pa(high_memory), trial_size); + if (!remapped) { + PDEBUGG("%li megs failed!\n", trial_size>>20); + break; + } + PDEBUGG("Trying %li megs (at %p, %p)\n", trial_size>>20, + (void *)__pa(high_memory), remapped); + for (i = last_trial; i < trial_size; i += 16) { + strcpy((char *)(remapped)+i, test_string); + if (strcmp((char *)(remapped)+i, test_string)) + break; + } + iounmap((void *)remapped); + schedule(); + last_trial = trial_size; + if (i == trial_size) + trial_size += step; /* increment, if all went well */ + else { + PDEBUGG("%li megs copy test failed!\n", trial_size>>20); + break; + } + if (!allocator_probe) + break; + } + PDEBUG("%li megs (%li k, %li b)\n", i>>20, i>>10, i); + allocator_buffer_size = i>>10; /* kilobytes */ + allocator_buffer = __pa(high_memory); + if (!allocator_buffer_size) { + printk(KERN_WARNING ALL_MSG "no free high memory to use\n"); + return -ENOMEM; + } - while (1) { - remapped = ioremap(__pa(high_memory), trial_size); - if (!remapped) - { - PDEBUGG("%li megs failed!\n",trial_size>>20); - break; - } - PDEBUGG("Trying %li megs (at %p, %p)\n",trial_size>>20, - (void *)__pa(high_memory), remapped); - for (i=last_trial; i>20); - break; - } - if (!allocator_probe) break; - } - PDEBUG("%li megs (%li k, %li b)\n",i>>20,i>>10,i); - allocator_buffer_size = i>>10; /* kilobytes */ - allocator_buffer = __pa(high_memory); - if (!allocator_buffer_size) { - printk(KERN_WARNING ALL_MSG "no free high memory to use\n"); - return -ENOMEM; - } + /* + * to simplify things, always have two cells in the list: + * the first and the last. This avoids some conditionals and + * extra code when allocating and deallocating: we only play + * in the middle of the list + */ + head = kmalloc(sizeof(struct allocator_struct), GFP_KERNEL); + if (!head) + return -ENOMEM; + tail = kmalloc(sizeof(struct allocator_struct), GFP_KERNEL); + if (!tail) { + kfree(head); + return -ENOMEM; + } - /* - * to simplify things, always have two cells in the list: - * the first and the last. This avoids some conditionals and - * extra code when allocating and deallocating: we only play - * in the middle of the list - */ - head = kmalloc(sizeof(struct allocator_struct),GFP_KERNEL); - if (!head) - return -ENOMEM; - tail = kmalloc(sizeof(struct allocator_struct),GFP_KERNEL); - if (!tail) { - kfree(head); - return -ENOMEM; - } + max = allocator_buffer_size<<10; - max = allocator_buffer_size<<10; + head->size = tail->size = 0; + head->address = allocator_buffer; + tail->address = allocator_buffer + max; + head->next = tail; + tail->next = NULL; + allocator_list = head; - head->size = tail->size = 0; - head->address = allocator_buffer; - tail->address = allocator_buffer + max; - head->next = tail; - tail->next = NULL; - allocator_list = head; + /* Back to the user code, in KB */ + *allocator_max = allocator_buffer_size; - *allocator_max = allocator_buffer_size; /* Back to the user code, in KB */ - - return 0; /* ok, ready */ + return 0; /* ok, ready */ } void allocator_cleanup(void) { - struct allocator_struct *ptr, *next; + struct allocator_struct *ptr, *next; - for (ptr = allocator_list; ptr; ptr = next) { - next = ptr->next; - PDEBUG("freeing list: 0x%08lx\n",ptr->address); - kfree(ptr); - } + for (ptr = allocator_list; ptr; ptr = next) { + next = ptr->next; + PDEBUG("freeing list: 0x%08lx\n", ptr->address); + kfree(ptr); + } - allocator_buffer = 0; - allocator_buffer_size = 0; - allocator_list = NULL; + allocator_buffer = 0; + allocator_buffer_size = 0; + allocator_list = NULL; } diff --git a/drivers/staging/dt3155/allocator.h b/drivers/staging/dt3155/allocator.h index ecc8680e7d45..a2f90ffa3d10 100644 --- a/drivers/staging/dt3155/allocator.h +++ b/drivers/staging/dt3155/allocator.h @@ -23,6 +23,6 @@ */ void allocator_free_dma(unsigned long address); -unsigned long allocator_allocate_dma (unsigned long kilobytes, int priority); +unsigned long allocator_allocate_dma(unsigned long kilobytes, int priority); int allocator_init(u_long *); void allocator_cleanup(void); From 8c6356e2a57044614799de3f1e7f40561724893a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 22 Dec 2009 15:19:21 -0800 Subject: [PATCH 065/367] Staging: dt3155: coding style cleanups for the .h files This cleans up some of the coding style issues in the .h files. More remains to be done. Cc: Scott Smedley Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dt3155/dt3155.h | 148 ++++++++++++++-------------- drivers/staging/dt3155/dt3155_drv.h | 6 +- drivers/staging/dt3155/dt3155_io.h | 73 +++++++------- drivers/staging/dt3155/dt3155_isr.h | 20 ++-- 4 files changed, 120 insertions(+), 127 deletions(-) diff --git a/drivers/staging/dt3155/dt3155.h b/drivers/staging/dt3155/dt3155.h index 2e158151a755..2a01e017d5fe 100644 --- a/drivers/staging/dt3155/dt3155.h +++ b/drivers/staging/dt3155/dt3155.h @@ -1,7 +1,7 @@ /* Copyright 1996,2002,2005 Gregory D. Hager, Alfred A. Rizzi, Noah J. Cowan, - Jason Lapenta, Scott Smedley + Jason Lapenta, Scott Smedley This file is part of the DT3155 Device Driver. @@ -20,8 +20,6 @@ along with the DT3155 Device Driver; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - $Id: dt3155.h,v 1.11 2005/08/09 06:08:51 ssmedley Exp $ - -- Changes -- Date Programmer Description of changes made @@ -56,120 +54,118 @@ MA 02111-1307 USA /* Can be 1 or 2 */ #define MAXBOARDS 1 -#define BOARD_MAX_BUFFS 3 -#define MAXBUFFERS BOARD_MAX_BUFFS*MAXBOARDS +#define BOARD_MAX_BUFFS 3 +#define MAXBUFFERS (BOARD_MAX_BUFFS*MAXBOARDS) -#define PCI_PAGE_SIZE (1 << 12) +#define PCI_PAGE_SIZE (1 << 12) #ifdef CCIR -#define DT3155_MAX_ROWS 576 -#define DT3155_MAX_COLS 768 -#define FORMAT50HZ TRUE +#define DT3155_MAX_ROWS 576 +#define DT3155_MAX_COLS 768 +#define FORMAT50HZ TRUE #else -#define DT3155_MAX_ROWS 480 -#define DT3155_MAX_COLS 640 -#define FORMAT50HZ FALSE +#define DT3155_MAX_ROWS 480 +#define DT3155_MAX_COLS 640 +#define FORMAT50HZ FALSE #endif /* Configuration structure */ struct dt3155_config_s { - u_int acq_mode; - u_int cols, rows; - u_int continuous; + u_int acq_mode; + u_int cols, rows; + u_int continuous; }; /* hold data for each frame */ -typedef struct -{ - u_long addr; /* address of the buffer with the frame */ - u_long tag; /* unique number for the frame */ - struct timeval time; /* time that capture took place */ +typedef struct { + u_long addr; /* address of the buffer with the frame */ + u_long tag; /* unique number for the frame */ + struct timeval time; /* time that capture took place */ } frame_info_t; -/* Structure for interrupt and buffer handling. */ -/* This is the setup for 1 card */ +/* + * Structure for interrupt and buffer handling. + * This is the setup for 1 card + */ struct dt3155_fbuffer_s { - int nbuffers; + int nbuffers; - frame_info_t frame_info[ BOARD_MAX_BUFFS ]; + frame_info_t frame_info[BOARD_MAX_BUFFS]; - int empty_buffers[ BOARD_MAX_BUFFS ]; /* indexes empty frames */ - int empty_len; /* Number of empty buffers */ - /* Zero means empty */ + int empty_buffers[BOARD_MAX_BUFFS]; /* indexes empty frames */ + int empty_len; /* Number of empty buffers */ + /* Zero means empty */ - int active_buf; /* Where data is currently dma'ing */ - int locked_buf; /* Buffers used by user */ + int active_buf; /* Where data is currently dma'ing */ + int locked_buf; /* Buffers used by user */ - int ready_que[ BOARD_MAX_BUFFS ]; - u_long ready_head; /* The most recent buffer located here */ - u_long ready_len; /* The number of ready buffers */ + int ready_que[BOARD_MAX_BUFFS]; + u_long ready_head; /* The most recent buffer located here */ + u_long ready_len; /* The number of ready buffers */ - int even_happened; - int even_stopped; - - int stop_acquire; /* Flag to stop interrupts */ - u_long frame_count; /* Counter for frames acquired by this card */ + int even_happened; + int even_stopped; + int stop_acquire; /* Flag to stop interrupts */ + u_long frame_count; /* Counter for frames acquired by this card */ }; -#define DT3155_MODE_FRAME 1 -#define DT3155_MODE_FIELD 2 +#define DT3155_MODE_FRAME 1 +#define DT3155_MODE_FIELD 2 -#define DT3155_SNAP 1 -#define DT3155_ACQ 2 +#define DT3155_SNAP 1 +#define DT3155_ACQ 2 /* There is one status structure for each card. */ -typedef struct dt3155_status_s -{ - int fixed_mode; /* if 1, we are in fixed frame mode */ - u_long reg_addr; /* Register address for a single card */ - u_long mem_addr; /* Buffer start addr for this card */ - u_long mem_size; /* This is the amount of mem available */ - u_int irq; /* this card's irq */ - struct dt3155_config_s config; /* configuration struct */ - struct dt3155_fbuffer_s fbuffer;/* frame buffer state struct */ - u_long state; /* this card's state */ - u_int device_installed; /* Flag if installed. 1=installed */ +typedef struct dt3155_status_s { + int fixed_mode; /* if 1, we are in fixed frame mode */ + u_long reg_addr; /* Register address for a single card */ + u_long mem_addr; /* Buffer start addr for this card */ + u_long mem_size; /* This is the amount of mem available */ + u_int irq; /* this card's irq */ + struct dt3155_config_s config; /* configuration struct */ + struct dt3155_fbuffer_s fbuffer; /* frame buffer state struct */ + u_long state; /* this card's state */ + u_int device_installed; /* Flag if installed. 1=installed */ } dt3155_status_t; /* Reference to global status structure */ extern struct dt3155_status_s dt3155_status[MAXBOARDS]; -#define DT3155_STATE_IDLE 0x00 -#define DT3155_STATE_FRAME 0x01 -#define DT3155_STATE_FLD 0x02 -#define DT3155_STATE_STOP 0x100 -#define DT3155_STATE_ERROR 0x200 -#define DT3155_STATE_MODE 0x0ff +#define DT3155_STATE_IDLE 0x00 +#define DT3155_STATE_FRAME 0x01 +#define DT3155_STATE_FLD 0x02 +#define DT3155_STATE_STOP 0x100 +#define DT3155_STATE_ERROR 0x200 +#define DT3155_STATE_MODE 0x0ff -#define DT3155_IOC_MAGIC '!' +#define DT3155_IOC_MAGIC '!' -#define DT3155_SET_CONFIG _IOW( DT3155_IOC_MAGIC, 1, struct dt3155_config_s ) -#define DT3155_GET_CONFIG _IOR( DT3155_IOC_MAGIC, 2, struct dt3155_status_s ) -#define DT3155_STOP _IO( DT3155_IOC_MAGIC, 3 ) -#define DT3155_START _IO( DT3155_IOC_MAGIC, 4 ) -#define DT3155_FLUSH _IO( DT3155_IOC_MAGIC, 5 ) -#define DT3155_IOC_MAXNR 5 +#define DT3155_SET_CONFIG _IOW(DT3155_IOC_MAGIC, 1, struct dt3155_config_s) +#define DT3155_GET_CONFIG _IOR(DT3155_IOC_MAGIC, 2, struct dt3155_status_s) +#define DT3155_STOP _IO(DT3155_IOC_MAGIC, 3) +#define DT3155_START _IO(DT3155_IOC_MAGIC, 4) +#define DT3155_FLUSH _IO(DT3155_IOC_MAGIC, 5) +#define DT3155_IOC_MAXNR 5 /* Error codes */ -#define DT_ERR_NO_BUFFERS 0x10000 /* not used but it might be one day - SS */ -#define DT_ERR_CORRUPT 0x20000 -#define DT_ERR_OVERRUN 0x30000 -#define DT_ERR_I2C_TIMEOUT 0x40000 -#define DT_ERR_MASK 0xff0000/* not used but it might be one day - SS */ +#define DT_ERR_NO_BUFFERS 0x10000 /* not used but it might be one day */ +#define DT_ERR_CORRUPT 0x20000 +#define DT_ERR_OVERRUN 0x30000 +#define DT_ERR_I2C_TIMEOUT 0x40000 +#define DT_ERR_MASK 0xff0000/* not used but it might be one day */ /* User code will probably want to declare one of these for each card */ -typedef struct dt3155_read_s -{ - u_long offset; - u_long frame_seq; - u_long state; +typedef struct dt3155_read_s { + u_long offset; + u_long frame_seq; + u_long state; - frame_info_t frame_info; + frame_info_t frame_info; } dt3155_read_t; #endif /* _DT3155_inc */ diff --git a/drivers/staging/dt3155/dt3155_drv.h b/drivers/staging/dt3155/dt3155_drv.h index 92a92dc2736c..dc110b76e463 100644 --- a/drivers/staging/dt3155/dt3155_drv.h +++ b/drivers/staging/dt3155/dt3155_drv.h @@ -1,7 +1,7 @@ /* Copyright 1996,2002 Gregory D. Hager, Alfred A. Rizzi, Noah J. Cowan, - Scott Smedley + Scott Smedley This file is part of the DT3155 Device Driver. @@ -25,7 +25,7 @@ MA 02111-1307 USA #define DT3155_DRV_INC /* kernel logical address of the frame grabbers */ -extern u_char *dt3155_lbase[ MAXBOARDS ]; +extern u_char *dt3155_lbase[MAXBOARDS]; /* kernel logical address of ram buffer */ extern u_char *dt3155_bbase; @@ -35,7 +35,7 @@ extern u_char *dt3155_bbase; #include /* need access to LINUX_VERSION_CODE */ /* wait queue for reads */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,1) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 3, 1) extern wait_queue_head_t dt3155_read_wait_queue[MAXBOARDS]; #else extern struct wait_queue *dt3155_read_wait_queue[MAXBOARDS]; diff --git a/drivers/staging/dt3155/dt3155_io.h b/drivers/staging/dt3155/dt3155_io.h index c1174ab7eac5..67df27fc6a8a 100644 --- a/drivers/staging/dt3155/dt3155_io.h +++ b/drivers/staging/dt3155/dt3155_io.h @@ -1,7 +1,7 @@ /* Copyright 1996,2002 Gregory D. Hager, Alfred A. Rizzi, Noah J. Cowan, - Jason Lapenta, Scott Smedley + Jason Lapenta, Scott Smedley This file is part of the DT3155 Device Driver. @@ -36,8 +36,8 @@ MA 02111-1307 USA /* macros to access registers */ -#define WriteMReg(Address, Data) * ((u_long *) (Address)) = Data -#define ReadMReg(Address, Data) Data = * ((u_long *) (Address)) +#define WriteMReg(Address, Data) (*((u_long *)(Address)) = Data) +#define ReadMReg(Address, Data) (Data = *((u_long *)(Address))) /***************** 32 bit register globals **************/ @@ -240,12 +240,11 @@ typedef union iic_csr2_tag { * dma_upper_lmt_tag */ typedef union dma_upper_lmt_tag { - u_long reg; - struct - { - u_long DMA_UPPER_LMT_VAL : 24; - u_long : 8; - } fld; + u_long reg; + struct { + u_long DMA_UPPER_LMT_VAL:24; + u_long :8; + } fld; } DMA_UPPER_LMT_R; @@ -253,12 +252,12 @@ typedef union dma_upper_lmt_tag { * Global declarations of local copies * of boards' 32 bit registers ***************************************/ -extern u_long even_dma_start_r; /* bit 0 should always be 0 */ -extern u_long odd_dma_start_r; /* .. */ -extern u_long even_dma_stride_r; /* bits 0&1 should always be 0 */ -extern u_long odd_dma_stride_r; /* .. */ -extern u_long even_pixel_fmt_r; -extern u_long odd_pixel_fmt_r; +extern u_long even_dma_start_r; /* bit 0 should always be 0 */ +extern u_long odd_dma_start_r; /* .. */ +extern u_long even_dma_stride_r; /* bits 0&1 should always be 0 */ +extern u_long odd_dma_stride_r; /* .. */ +extern u_long even_pixel_fmt_r; +extern u_long odd_pixel_fmt_r; extern FIFO_TRIGGER_R fifo_trigger_r; extern XFER_MODE_R xfer_mode_r; @@ -266,8 +265,8 @@ extern CSR1_R csr1_r; extern RETRY_WAIT_CNT_R retry_wait_cnt_r; extern INT_CSR_R int_csr_r; -extern u_long even_fld_mask_r; -extern u_long odd_fld_mask_r; +extern u_long even_fld_mask_r; +extern u_long odd_fld_mask_r; extern MASK_LENGTH_R mask_length_r; extern FIFO_FLAG_CNT_R fifo_flag_cnt_r; @@ -301,28 +300,26 @@ extern DMA_UPPER_LMT_R odd_dma_upper_lmt_r; /******** Assignments and Typedefs for 8 bit I2C Registers********************/ typedef union i2c_csr2_tag { - u_char reg; - struct - { - u_char CHROM_FIL : 1; - u_char SYNC_SNTL : 1; - u_char HZ50 : 1; - u_char SYNC_PRESENT : 1; - u_char BUSY_EVE : 1; - u_char BUSY_ODD : 1; - u_char DISP_PASS : 1; - } fld; + u_char reg; + struct { + u_char CHROM_FIL:1; + u_char SYNC_SNTL:1; + u_char HZ50:1; + u_char SYNC_PRESENT:1; + u_char BUSY_EVE:1; + u_char BUSY_ODD:1; + u_char DISP_PASS:1; + } fld; } I2C_CSR2; typedef union i2c_even_csr_tag { - u_char reg; - struct - { - u_char DONE_EVE : 1; - u_char SNGL_EVE : 1; - u_char ERROR_EVE : 1; - u_char : 5; - } fld; + u_char reg; + struct { + u_char DONE_EVE:1; + u_char SNGL_EVE:1; + u_char ERROR_EVE:1; + u_char :5; + } fld; } I2C_EVEN_CSR; typedef union i2c_odd_csr_tag { @@ -394,7 +391,7 @@ extern u_char i2c_pm_lut_data; /* access 8-bit IIC registers */ -extern int ReadI2C (u_char * lpReg, u_short wIregIndex, u_char * byVal); -extern int WriteI2C (u_char * lpReg, u_short wIregIndex, u_char byVal); +extern int ReadI2C(u_char *lpReg, u_short wIregIndex, u_char *byVal); +extern int WriteI2C(u_char *lpReg, u_short wIregIndex, u_char byVal); #endif diff --git a/drivers/staging/dt3155/dt3155_isr.h b/drivers/staging/dt3155/dt3155_isr.h index b117b504e277..c77a1008c09c 100644 --- a/drivers/staging/dt3155/dt3155_isr.h +++ b/drivers/staging/dt3155/dt3155_isr.h @@ -1,7 +1,7 @@ /* Copyright 1996,2002 Gregory D. Hager, Alfred A. Rizzi, Noah J. Cowan, - Jason Lapenta, Scott Smedley + Jason Lapenta, Scott Smedley This file is part of the DT3155 Device Driver. @@ -33,8 +33,8 @@ MA 02111-1307 USA */ -#ifndef DT3155_ISR_H -#define DT3155_ISR_H +#ifndef DT3155_ISR_H +#define DT3155_ISR_H extern struct dt3155_fbuffer_s *dt3155_fbuffer[MAXBOARDS]; @@ -62,16 +62,16 @@ int dt3155_flush(int minor); * Simple array based que struct **********************************/ -bool are_empty_buffers( int minor ); -void push_empty( int index, int minor ); +bool are_empty_buffers(int minor); +void push_empty(int index, int minor); -int pop_empty( int minor ); +int pop_empty(int minor); -bool is_ready_buf_empty( int minor ); -bool is_ready_buf_full( int minor ); +bool is_ready_buf_empty(int minor); +bool is_ready_buf_full(int minor); -void push_ready( int minor, int index ); -int pop_ready( int minor ); +void push_ready(int minor, int index); +int pop_ready(int minor); #endif From a945db65436a2666927b555d752e67a1bd193a9c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 22 Dec 2009 16:29:26 -0800 Subject: [PATCH 066/367] staging: remove the b3dfg driver It has no users, and no developers to maintain it to get it merged into mainline. So sad. Cc: Daniel Drake Cc: Justin Bronder Cc: Duane Griffin Signed-off-by: Greg Kroah-Hartman --- drivers/staging/Kconfig | 2 - drivers/staging/Makefile | 1 - drivers/staging/b3dfg/Kconfig | 10 - drivers/staging/b3dfg/Makefile | 1 - drivers/staging/b3dfg/TODO | 4 - drivers/staging/b3dfg/b3dfg.c | 1100 -------------------------------- 6 files changed, 1118 deletions(-) delete mode 100644 drivers/staging/b3dfg/Kconfig delete mode 100644 drivers/staging/b3dfg/Makefile delete mode 100644 drivers/staging/b3dfg/TODO delete mode 100644 drivers/staging/b3dfg/b3dfg.c diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig index 02cde3989c5c..a1dee5c59775 100644 --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig @@ -89,8 +89,6 @@ source "drivers/staging/dream/Kconfig" source "drivers/staging/pohmelfs/Kconfig" -source "drivers/staging/b3dfg/Kconfig" - source "drivers/staging/phison/Kconfig" source "drivers/staging/p9auth/Kconfig" diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile index 9d47d42e73ce..f7d34eec6740 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile @@ -27,7 +27,6 @@ obj-$(CONFIG_INPUT_MIMIO) += mimio/ obj-$(CONFIG_TRANZPORT) += frontier/ obj-$(CONFIG_DREAM) += dream/ obj-$(CONFIG_POHMELFS) += pohmelfs/ -obj-$(CONFIG_B3DFG) += b3dfg/ obj-$(CONFIG_IDE_PHISON) += phison/ obj-$(CONFIG_PLAN9AUTH) += p9auth/ obj-$(CONFIG_LINE6_USB) += line6/ diff --git a/drivers/staging/b3dfg/Kconfig b/drivers/staging/b3dfg/Kconfig deleted file mode 100644 index 9e6573cf97d3..000000000000 --- a/drivers/staging/b3dfg/Kconfig +++ /dev/null @@ -1,10 +0,0 @@ -config B3DFG - tristate "Brontes 3d Frame Framegrabber" - depends on PCI - default n - ---help--- - This driver provides support for the Brontes 3d Framegrabber - PCI card. - - To compile this driver as a module, choose M here. The module - will be called b3dfg. diff --git a/drivers/staging/b3dfg/Makefile b/drivers/staging/b3dfg/Makefile deleted file mode 100644 index 91f439ffc174..000000000000 --- a/drivers/staging/b3dfg/Makefile +++ /dev/null @@ -1 +0,0 @@ -obj-$(CONFIG_B3DFG) += b3dfg.o diff --git a/drivers/staging/b3dfg/TODO b/drivers/staging/b3dfg/TODO deleted file mode 100644 index f5a9298b9ac1..000000000000 --- a/drivers/staging/b3dfg/TODO +++ /dev/null @@ -1,4 +0,0 @@ - - - queue/wait buffer presents filltime results for each frame? - - counting of dropped frames - - review endianness diff --git a/drivers/staging/b3dfg/b3dfg.c b/drivers/staging/b3dfg/b3dfg.c deleted file mode 100644 index 4a43c51c172a..000000000000 --- a/drivers/staging/b3dfg/b3dfg.c +++ /dev/null @@ -1,1100 +0,0 @@ - /* - * Brontes PCI frame grabber driver - * - * Copyright (C) 2008 3M Company - * Contact: Justin Bronder - * Original Authors: Daniel Drake - * Duane Griffin - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static unsigned int b3dfg_nbuf = 2; - -module_param_named(buffer_count, b3dfg_nbuf, uint, 0444); - -MODULE_PARM_DESC(buffer_count, "Number of buffers (min 2, default 2)"); - -MODULE_AUTHOR("Daniel Drake "); -MODULE_DESCRIPTION("Brontes frame grabber driver"); -MODULE_LICENSE("GPL"); - -#define DRIVER_NAME "b3dfg" -#define B3DFG_MAX_DEVS 4 -#define B3DFG_FRAMES_PER_BUFFER 3 - -#define B3DFG_BAR_REGS 0 -#define B3DFG_REGS_LENGTH 0x10000 - -#define B3DFG_IOC_MAGIC 0xb3 /* dfg :-) */ -#define B3DFG_IOCGFRMSZ _IOR(B3DFG_IOC_MAGIC, 1, int) -#define B3DFG_IOCTNUMBUFS _IO(B3DFG_IOC_MAGIC, 2) -#define B3DFG_IOCTTRANS _IO(B3DFG_IOC_MAGIC, 3) -#define B3DFG_IOCTQUEUEBUF _IO(B3DFG_IOC_MAGIC, 4) -#define B3DFG_IOCTPOLLBUF _IOWR(B3DFG_IOC_MAGIC, 5, struct b3dfg_poll) -#define B3DFG_IOCTWAITBUF _IOWR(B3DFG_IOC_MAGIC, 6, struct b3dfg_wait) -#define B3DFG_IOCGWANDSTAT _IOR(B3DFG_IOC_MAGIC, 7, int) - -enum { - /* number of 4kb pages per frame */ - B3D_REG_FRM_SIZE = 0x0, - - /* bit 0: set to enable interrupts - * bit 1: set to enable cable status change interrupts */ - B3D_REG_HW_CTRL = 0x4, - - /* bit 0-1 - 1-based ID of next pending frame transfer (0 = none) - * bit 2 indicates the previous DMA transfer has completed - * bit 3 indicates wand cable status change - * bit 8:15 - counter of number of discarded triplets */ - B3D_REG_DMA_STS = 0x8, - - /* bit 0: wand status (1 = present, 0 = disconnected) */ - B3D_REG_WAND_STS = 0xc, - - /* bus address for DMA transfers. lower 2 bits must be zero because DMA - * works with 32 bit word size. */ - B3D_REG_EC220_DMA_ADDR = 0x8000, - - /* bit 20:0 - number of 32 bit words to be transferred - * bit 21:31 - reserved */ - B3D_REG_EC220_TRF_SIZE = 0x8004, - - /* bit 0 - error bit - * bit 1 - interrupt bit (set to generate interrupt at end of transfer) - * bit 2 - start bit (set to start transfer) - * bit 3 - direction (0 = DMA_TO_DEVICE, 1 = DMA_FROM_DEVICE - * bit 4:31 - reserved */ - B3D_REG_EC220_DMA_STS = 0x8008, -}; - -enum b3dfg_buffer_state { - B3DFG_BUFFER_POLLED = 0, - B3DFG_BUFFER_PENDING, - B3DFG_BUFFER_POPULATED, -}; - -struct b3dfg_buffer { - unsigned char *frame[B3DFG_FRAMES_PER_BUFFER]; - struct list_head list; - u8 state; -}; - -struct b3dfg_dev { - - /* no protection needed: all finalized at initialization time */ - struct pci_dev *pdev; - struct cdev chardev; - struct device *dev; - void __iomem *regs; - unsigned int frame_size; - - /* - * Protects buffer state, including buffer_queue, triplet_ready, - * cur_dma_frame_idx & cur_dma_frame_addr. - */ - spinlock_t buffer_lock; - struct b3dfg_buffer *buffers; - struct list_head buffer_queue; - - /* Last frame in triplet transferred (-1 if none). */ - int cur_dma_frame_idx; - - /* Current frame's address for DMA. */ - dma_addr_t cur_dma_frame_addr; - - /* - * Protects cstate_tstamp. - * Nests inside buffer_lock. - */ - spinlock_t cstate_lock; - unsigned long cstate_tstamp; - - /* - * Protects triplets_dropped. - * Nests inside buffers_lock. - */ - spinlock_t triplets_dropped_lock; - unsigned int triplets_dropped; - - wait_queue_head_t buffer_waitqueue; - - unsigned int transmission_enabled:1; - unsigned int triplet_ready:1; -}; - -static u8 b3dfg_devices[B3DFG_MAX_DEVS]; - -static struct class *b3dfg_class; -static dev_t b3dfg_devt; - -static const struct pci_device_id b3dfg_ids[] __devinitdata = { - { PCI_DEVICE(0x0b3d, 0x0001) }, - { }, -}; - -MODULE_DEVICE_TABLE(pci, b3dfg_ids); - -/***** user-visible types *****/ - -struct b3dfg_poll { - int buffer_idx; - unsigned int triplets_dropped; -}; - -struct b3dfg_wait { - int buffer_idx; - unsigned int timeout; - unsigned int triplets_dropped; -}; - -/**** register I/O ****/ - -static u32 b3dfg_read32(struct b3dfg_dev *fgdev, u16 reg) -{ - return ioread32(fgdev->regs + reg); -} - -static void b3dfg_write32(struct b3dfg_dev *fgdev, u16 reg, u32 value) -{ - iowrite32(value, fgdev->regs + reg); -} - -/**** buffer management ****/ - -/* - * Program EC220 for transfer of a specific frame. - * Called with buffer_lock held. - */ -static int setup_frame_transfer(struct b3dfg_dev *fgdev, - struct b3dfg_buffer *buf, int frame) -{ - unsigned char *frm_addr; - dma_addr_t frm_addr_dma; - unsigned int frm_size = fgdev->frame_size; - - frm_addr = buf->frame[frame]; - frm_addr_dma = pci_map_single(fgdev->pdev, frm_addr, - frm_size, PCI_DMA_FROMDEVICE); - if (pci_dma_mapping_error(fgdev->pdev, frm_addr_dma)) - return -ENOMEM; - - fgdev->cur_dma_frame_addr = frm_addr_dma; - fgdev->cur_dma_frame_idx = frame; - - b3dfg_write32(fgdev, B3D_REG_EC220_DMA_ADDR, - cpu_to_le32(frm_addr_dma)); - b3dfg_write32(fgdev, B3D_REG_EC220_TRF_SIZE, - cpu_to_le32(frm_size >> 2)); - b3dfg_write32(fgdev, B3D_REG_EC220_DMA_STS, 0xf); - - return 0; -} - -/* Caller should hold buffer lock */ -static void dequeue_all_buffers(struct b3dfg_dev *fgdev) -{ - int i; - for (i = 0; i < b3dfg_nbuf; i++) { - struct b3dfg_buffer *buf = &fgdev->buffers[i]; - buf->state = B3DFG_BUFFER_POLLED; - list_del_init(&buf->list); - } -} - -/* queue a buffer to receive data */ -static int queue_buffer(struct b3dfg_dev *fgdev, int bufidx) -{ - struct device *dev = &fgdev->pdev->dev; - struct b3dfg_buffer *buf; - unsigned long flags; - int r = 0; - - spin_lock_irqsave(&fgdev->buffer_lock, flags); - if (bufidx < 0 || bufidx >= b3dfg_nbuf) { - dev_dbg(dev, "Invalid buffer index, %d\n", bufidx); - r = -ENOENT; - goto out; - } - buf = &fgdev->buffers[bufidx]; - - if (unlikely(buf->state == B3DFG_BUFFER_PENDING)) { - dev_dbg(dev, "buffer %d is already queued\n", bufidx); - r = -EINVAL; - goto out; - } - - buf->state = B3DFG_BUFFER_PENDING; - list_add_tail(&buf->list, &fgdev->buffer_queue); - - if (fgdev->transmission_enabled && fgdev->triplet_ready) { - dev_dbg(dev, "triplet is ready, pushing immediately\n"); - fgdev->triplet_ready = 0; - r = setup_frame_transfer(fgdev, buf, 0); - if (r) - dev_err(dev, "unable to map DMA buffer\n"); - } - -out: - spin_unlock_irqrestore(&fgdev->buffer_lock, flags); - return r; -} - -/* non-blocking buffer poll. returns 1 if data is present in the buffer, - * 0 otherwise */ -static int poll_buffer(struct b3dfg_dev *fgdev, void __user *arg) -{ - struct device *dev = &fgdev->pdev->dev; - struct b3dfg_poll p; - struct b3dfg_buffer *buf; - unsigned long flags; - int r = 1; - int arg_out = 0; - - if (copy_from_user(&p, arg, sizeof(p))) - return -EFAULT; - - if (unlikely(!fgdev->transmission_enabled)) { - dev_dbg(dev, "cannot poll, transmission disabled\n"); - return -EINVAL; - } - - if (p.buffer_idx < 0 || p.buffer_idx >= b3dfg_nbuf) - return -ENOENT; - - buf = &fgdev->buffers[p.buffer_idx]; - - spin_lock_irqsave(&fgdev->buffer_lock, flags); - - if (likely(buf->state == B3DFG_BUFFER_POPULATED)) { - arg_out = 1; - buf->state = B3DFG_BUFFER_POLLED; - - /* IRQs already disabled by spin_lock_irqsave above. */ - spin_lock(&fgdev->triplets_dropped_lock); - p.triplets_dropped = fgdev->triplets_dropped; - fgdev->triplets_dropped = 0; - spin_unlock(&fgdev->triplets_dropped_lock); - } else { - r = 0; - } - - spin_unlock_irqrestore(&fgdev->buffer_lock, flags); - - if (arg_out && copy_to_user(arg, &p, sizeof(p))) - r = -EFAULT; - - return r; -} - -static unsigned long get_cstate_change(struct b3dfg_dev *fgdev) -{ - unsigned long flags, when; - - spin_lock_irqsave(&fgdev->cstate_lock, flags); - when = fgdev->cstate_tstamp; - spin_unlock_irqrestore(&fgdev->cstate_lock, flags); - return when; -} - -static int is_event_ready(struct b3dfg_dev *fgdev, struct b3dfg_buffer *buf, - unsigned long when) -{ - int result; - unsigned long flags; - - spin_lock_irqsave(&fgdev->buffer_lock, flags); - spin_lock(&fgdev->cstate_lock); - result = (!fgdev->transmission_enabled || - buf->state == B3DFG_BUFFER_POPULATED || - when != fgdev->cstate_tstamp); - spin_unlock(&fgdev->cstate_lock); - spin_unlock_irqrestore(&fgdev->buffer_lock, flags); - - return result; -} - -/* sleep until a specific buffer becomes populated */ -static int wait_buffer(struct b3dfg_dev *fgdev, void __user *arg) -{ - struct device *dev = &fgdev->pdev->dev; - struct b3dfg_wait w; - struct b3dfg_buffer *buf; - unsigned long flags, when; - int r; - - if (copy_from_user(&w, arg, sizeof(w))) - return -EFAULT; - - if (!fgdev->transmission_enabled) { - dev_dbg(dev, "cannot wait, transmission disabled\n"); - return -EINVAL; - } - - if (w.buffer_idx < 0 || w.buffer_idx >= b3dfg_nbuf) - return -ENOENT; - - buf = &fgdev->buffers[w.buffer_idx]; - - spin_lock_irqsave(&fgdev->buffer_lock, flags); - - if (buf->state == B3DFG_BUFFER_POPULATED) { - r = w.timeout; - goto out_triplets_dropped; - } - - spin_unlock_irqrestore(&fgdev->buffer_lock, flags); - - when = get_cstate_change(fgdev); - if (w.timeout > 0) { - r = wait_event_interruptible_timeout(fgdev->buffer_waitqueue, - is_event_ready(fgdev, buf, when), - (w.timeout * HZ) / 1000); - - if (unlikely(r < 0)) - goto out; - - w.timeout = r * 1000 / HZ; - } else { - r = wait_event_interruptible(fgdev->buffer_waitqueue, - is_event_ready(fgdev, buf, when)); - - if (unlikely(r)) { - r = -ERESTARTSYS; - goto out; - } - } - - /* TODO: Inform the user via field(s) in w? */ - if (!fgdev->transmission_enabled || when != get_cstate_change(fgdev)) { - r = -EINVAL; - goto out; - } - - spin_lock_irqsave(&fgdev->buffer_lock, flags); - - if (buf->state != B3DFG_BUFFER_POPULATED) { - r = -ETIMEDOUT; - goto out_unlock; - } - - buf->state = B3DFG_BUFFER_POLLED; - -out_triplets_dropped: - - /* IRQs already disabled by spin_lock_irqsave above. */ - spin_lock(&fgdev->triplets_dropped_lock); - w.triplets_dropped = fgdev->triplets_dropped; - fgdev->triplets_dropped = 0; - spin_unlock(&fgdev->triplets_dropped_lock); - -out_unlock: - spin_unlock_irqrestore(&fgdev->buffer_lock, flags); - if (copy_to_user(arg, &w, sizeof(w))) - r = -EFAULT; -out: - return r; -} - -/* mmap page fault handler */ -static int b3dfg_vma_fault(struct vm_area_struct *vma, - struct vm_fault *vmf) -{ - struct b3dfg_dev *fgdev = vma->vm_file->private_data; - unsigned long off = vmf->pgoff << PAGE_SHIFT; - unsigned int frame_size = fgdev->frame_size; - unsigned int buf_size = frame_size * B3DFG_FRAMES_PER_BUFFER; - unsigned char *addr; - - /* determine which buffer the offset lies within */ - unsigned int buf_idx = off / buf_size; - /* and the offset into the buffer */ - unsigned int buf_off = off % buf_size; - - /* determine which frame inside the buffer the offset lies in */ - unsigned int frm_idx = buf_off / frame_size; - /* and the offset into the frame */ - unsigned int frm_off = buf_off % frame_size; - - if (unlikely(buf_idx >= b3dfg_nbuf)) - return VM_FAULT_SIGBUS; - - addr = fgdev->buffers[buf_idx].frame[frm_idx] + frm_off; - vm_insert_pfn(vma, (unsigned long)vmf->virtual_address, - virt_to_phys(addr) >> PAGE_SHIFT); - - return VM_FAULT_NOPAGE; -} - -static struct vm_operations_struct b3dfg_vm_ops = { - .fault = b3dfg_vma_fault, -}; - -static int get_wand_status(struct b3dfg_dev *fgdev, int __user *arg) -{ - u32 wndstat = b3dfg_read32(fgdev, B3D_REG_WAND_STS); - dev_dbg(&fgdev->pdev->dev, "wand status %x\n", wndstat); - return __put_user(wndstat & 0x1, arg); -} - -static int enable_transmission(struct b3dfg_dev *fgdev) -{ - unsigned long flags; - struct device *dev = &fgdev->pdev->dev; - - dev_dbg(dev, "enable transmission\n"); - - /* check the cable is plugged in. */ - if (!b3dfg_read32(fgdev, B3D_REG_WAND_STS)) { - dev_dbg(dev, "cannot start transmission without wand\n"); - return -EINVAL; - } - - spin_lock_irqsave(&fgdev->buffer_lock, flags); - - /* Handle racing enable_transmission calls. */ - if (fgdev->transmission_enabled) { - spin_unlock_irqrestore(&fgdev->buffer_lock, flags); - goto out; - } - - spin_lock(&fgdev->triplets_dropped_lock); - fgdev->triplets_dropped = 0; - spin_unlock(&fgdev->triplets_dropped_lock); - - fgdev->triplet_ready = 0; - fgdev->cur_dma_frame_idx = -1; - fgdev->transmission_enabled = 1; - - spin_unlock_irqrestore(&fgdev->buffer_lock, flags); - - /* Enable DMA and cable status interrupts. */ - b3dfg_write32(fgdev, B3D_REG_HW_CTRL, 0x03); - -out: - return 0; -} - -static void disable_transmission(struct b3dfg_dev *fgdev) -{ - struct device *dev = &fgdev->pdev->dev; - unsigned long flags; - u32 tmp; - - dev_dbg(dev, "disable transmission\n"); - - /* guarantee that no more interrupts will be serviced */ - spin_lock_irqsave(&fgdev->buffer_lock, flags); - fgdev->transmission_enabled = 0; - - b3dfg_write32(fgdev, B3D_REG_HW_CTRL, 0); - - /* FIXME: temporary debugging only. if the board stops transmitting, - * hitting ctrl+c and seeing this message is useful for determining - * the state of the board. */ - tmp = b3dfg_read32(fgdev, B3D_REG_DMA_STS); - dev_dbg(dev, "DMA_STS reads %x after TX stopped\n", tmp); - - dequeue_all_buffers(fgdev); - spin_unlock_irqrestore(&fgdev->buffer_lock, flags); - - wake_up_interruptible(&fgdev->buffer_waitqueue); -} - -static int set_transmission(struct b3dfg_dev *fgdev, int enabled) -{ - int res = 0; - - if (enabled && !fgdev->transmission_enabled) - res = enable_transmission(fgdev); - else if (!enabled && fgdev->transmission_enabled) - disable_transmission(fgdev); - - return res; -} - -/* Called in interrupt context. */ -static void handle_cstate_unplug(struct b3dfg_dev *fgdev) -{ - /* Disable all interrupts. */ - b3dfg_write32(fgdev, B3D_REG_HW_CTRL, 0); - - /* Stop transmission. */ - spin_lock(&fgdev->buffer_lock); - fgdev->transmission_enabled = 0; - - fgdev->cur_dma_frame_idx = -1; - fgdev->triplet_ready = 0; - if (fgdev->cur_dma_frame_addr) { - pci_unmap_single(fgdev->pdev, fgdev->cur_dma_frame_addr, - fgdev->frame_size, PCI_DMA_FROMDEVICE); - fgdev->cur_dma_frame_addr = 0; - } - dequeue_all_buffers(fgdev); - spin_unlock(&fgdev->buffer_lock); -} - -/* Called in interrupt context. */ -static void handle_cstate_change(struct b3dfg_dev *fgdev) -{ - u32 cstate = b3dfg_read32(fgdev, B3D_REG_WAND_STS); - unsigned long when; - struct device *dev = &fgdev->pdev->dev; - - dev_dbg(dev, "cable state change: %u\n", cstate); - - /* - * When the wand is unplugged we reset our state. The hardware will - * have done the same internally. - * - * Note we should never see a cable *plugged* event, as interrupts - * should only be enabled when transmitting, which requires the cable - * to be plugged. If we do see one it probably means the cable has been - * unplugged and re-plugged very rapidly. Possibly because it has a - * broken wire and is momentarily losing contact. - * - * TODO: At the moment if you plug in the cable then enable transmission - * the hardware will raise a couple of spurious interrupts, so - * just ignore them for now. - * - * Once the hardware is fixed we should complain and treat it as an - * unplug. Or at least track how frequently it is happening and do - * so if too many come in. - */ - if (cstate) { - dev_warn(dev, "ignoring unexpected plug event\n"); - return; - } - handle_cstate_unplug(fgdev); - - /* - * Record cable state change timestamp & wake anyone waiting - * on a cable state change. Be paranoid about ensuring events - * are not missed if we somehow get two interrupts in a jiffy. - */ - spin_lock(&fgdev->cstate_lock); - when = jiffies_64; - if (when <= fgdev->cstate_tstamp) - when = fgdev->cstate_tstamp + 1; - fgdev->cstate_tstamp = when; - wake_up_interruptible(&fgdev->buffer_waitqueue); - spin_unlock(&fgdev->cstate_lock); -} - -/* Called with buffer_lock held. */ -static void transfer_complete(struct b3dfg_dev *fgdev) -{ - struct b3dfg_buffer *buf; - struct device *dev = &fgdev->pdev->dev; - - pci_unmap_single(fgdev->pdev, fgdev->cur_dma_frame_addr, - fgdev->frame_size, PCI_DMA_FROMDEVICE); - fgdev->cur_dma_frame_addr = 0; - - buf = list_entry(fgdev->buffer_queue.next, struct b3dfg_buffer, list); - - dev_dbg(dev, "handle frame completion\n"); - if (fgdev->cur_dma_frame_idx == B3DFG_FRAMES_PER_BUFFER - 1) { - - /* last frame of that triplet completed */ - dev_dbg(dev, "triplet completed\n"); - buf->state = B3DFG_BUFFER_POPULATED; - list_del_init(&buf->list); - wake_up_interruptible(&fgdev->buffer_waitqueue); - } -} - -/* - * Called with buffer_lock held. - * - * Note that idx is the (1-based) *next* frame to be transferred, while - * cur_dma_frame_idx is the (0-based) *last* frame to have been transferred (or - * -1 if none). Thus there should be a difference of 2 between them. - */ -static bool setup_next_frame_transfer(struct b3dfg_dev *fgdev, int idx) -{ - struct b3dfg_buffer *buf; - struct device *dev = &fgdev->pdev->dev; - bool need_ack = 1; - - dev_dbg(dev, "program DMA transfer for next frame: %d\n", idx); - - buf = list_entry(fgdev->buffer_queue.next, struct b3dfg_buffer, list); - if (idx == fgdev->cur_dma_frame_idx + 2) { - if (setup_frame_transfer(fgdev, buf, idx - 1)) - dev_err(dev, "unable to map DMA buffer\n"); - need_ack = 0; - } else { - dev_err(dev, "frame mismatch, got %d, expected %d\n", - idx, fgdev->cur_dma_frame_idx + 2); - - /* FIXME: handle dropped triplets here */ - } - - return need_ack; -} - -static irqreturn_t b3dfg_intr(int irq, void *dev_id) -{ - struct b3dfg_dev *fgdev = dev_id; - struct device *dev = &fgdev->pdev->dev; - u32 sts; - u8 dropped; - bool need_ack = 1; - irqreturn_t res = IRQ_HANDLED; - - sts = b3dfg_read32(fgdev, B3D_REG_DMA_STS); - if (unlikely(sts == 0)) { - dev_warn(dev, "ignore interrupt, DMA status is 0\n"); - res = IRQ_NONE; - goto out; - } - - if (unlikely(!fgdev->transmission_enabled)) { - dev_warn(dev, "ignore interrupt, TX disabled\n"); - res = IRQ_HANDLED; - goto out; - } - - /* Handle dropped frames, as reported by the hardware. */ - dropped = (sts >> 8) & 0xff; - dev_dbg(dev, "intr: DMA_STS=%08x (drop=%d comp=%d next=%d)\n", - sts, dropped, !!(sts & 0x4), sts & 0x3); - if (unlikely(dropped > 0)) { - spin_lock(&fgdev->triplets_dropped_lock); - fgdev->triplets_dropped += dropped; - spin_unlock(&fgdev->triplets_dropped_lock); - } - - /* Handle a cable state change (i.e. the wand being unplugged). */ - if (sts & 0x08) { - handle_cstate_change(fgdev); - goto out; - } - - spin_lock(&fgdev->buffer_lock); - if (unlikely(list_empty(&fgdev->buffer_queue))) { - - /* FIXME need more sanity checking here */ - dev_info(dev, "buffer not ready for next transfer\n"); - fgdev->triplet_ready = 1; - goto out_unlock; - } - - /* Has a frame transfer been completed? */ - if (sts & 0x4) { - u32 dma_status = b3dfg_read32(fgdev, B3D_REG_EC220_DMA_STS); - - /* Check for DMA errors reported by the hardware. */ - if (unlikely(dma_status & 0x1)) { - dev_err(dev, "EC220 error: %08x\n", dma_status); - - /* FIXME flesh out error handling */ - goto out_unlock; - } - - /* Sanity check, we should have a frame index at this point. */ - if (unlikely(fgdev->cur_dma_frame_idx == -1)) { - dev_err(dev, "completed but no last idx?\n"); - - /* FIXME flesh out error handling */ - goto out_unlock; - } - - transfer_complete(fgdev); - } - - /* Is there another frame transfer pending? */ - if (sts & 0x3) - need_ack = setup_next_frame_transfer(fgdev, sts & 0x3); - else - fgdev->cur_dma_frame_idx = -1; - -out_unlock: - spin_unlock(&fgdev->buffer_lock); -out: - if (need_ack) { - dev_dbg(dev, "acknowledging interrupt\n"); - b3dfg_write32(fgdev, B3D_REG_EC220_DMA_STS, 0x0b); - } - return res; -} - -static int b3dfg_open(struct inode *inode, struct file *filp) -{ - struct b3dfg_dev *fgdev = - container_of(inode->i_cdev, struct b3dfg_dev, chardev); - - dev_dbg(&fgdev->pdev->dev, "open\n"); - filp->private_data = fgdev; - return 0; -} - -static int b3dfg_release(struct inode *inode, struct file *filp) -{ - struct b3dfg_dev *fgdev = filp->private_data; - dev_dbg(&fgdev->pdev->dev, "release\n"); - disable_transmission(fgdev); - return 0; -} - -static long b3dfg_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) -{ - struct b3dfg_dev *fgdev = filp->private_data; - - switch (cmd) { - case B3DFG_IOCGFRMSZ: - return __put_user(fgdev->frame_size, (int __user *) arg); - case B3DFG_IOCGWANDSTAT: - return get_wand_status(fgdev, (int __user *) arg); - case B3DFG_IOCTTRANS: - return set_transmission(fgdev, (int) arg); - case B3DFG_IOCTQUEUEBUF: - return queue_buffer(fgdev, (int) arg); - case B3DFG_IOCTPOLLBUF: - return poll_buffer(fgdev, (void __user *) arg); - case B3DFG_IOCTWAITBUF: - return wait_buffer(fgdev, (void __user *) arg); - default: - dev_dbg(&fgdev->pdev->dev, "unrecognised ioctl %x\n", cmd); - return -EINVAL; - } -} - -static unsigned int b3dfg_poll(struct file *filp, poll_table *poll_table) -{ - struct b3dfg_dev *fgdev = filp->private_data; - unsigned long flags, when; - int i; - int r = 0; - - when = get_cstate_change(fgdev); - poll_wait(filp, &fgdev->buffer_waitqueue, poll_table); - - spin_lock_irqsave(&fgdev->buffer_lock, flags); - for (i = 0; i < b3dfg_nbuf; i++) { - if (fgdev->buffers[i].state == B3DFG_BUFFER_POPULATED) { - r = POLLIN | POLLRDNORM; - break; - } - } - spin_unlock_irqrestore(&fgdev->buffer_lock, flags); - - /* TODO: Confirm this is how we want to communicate the change. */ - if (!fgdev->transmission_enabled || when != get_cstate_change(fgdev)) - r = POLLERR; - - return r; -} - -static int b3dfg_mmap(struct file *filp, struct vm_area_struct *vma) -{ - struct b3dfg_dev *fgdev = filp->private_data; - unsigned long offset = vma->vm_pgoff << PAGE_SHIFT; - unsigned long vsize = vma->vm_end - vma->vm_start; - unsigned long bufdatalen = b3dfg_nbuf * fgdev->frame_size * 3; - unsigned long psize = bufdatalen - offset; - int r = 0; - - if (vsize <= psize) { - vma->vm_flags |= VM_IO | VM_RESERVED | VM_CAN_NONLINEAR | - VM_PFNMAP; - vma->vm_ops = &b3dfg_vm_ops; - } else { - r = -EINVAL; - } - - return r; -} - -static struct file_operations b3dfg_fops = { - .owner = THIS_MODULE, - .open = b3dfg_open, - .release = b3dfg_release, - .unlocked_ioctl = b3dfg_ioctl, - .poll = b3dfg_poll, - .mmap = b3dfg_mmap, -}; - -static void free_all_frame_buffers(struct b3dfg_dev *fgdev) -{ - int i, j; - for (i = 0; i < b3dfg_nbuf; i++) - for (j = 0; j < B3DFG_FRAMES_PER_BUFFER; j++) - kfree(fgdev->buffers[i].frame[j]); - kfree(fgdev->buffers); -} - -/* initialize device and any data structures. called before any interrupts - * are enabled. */ -static int b3dfg_init_dev(struct b3dfg_dev *fgdev) -{ - int i, j; - u32 frm_size = b3dfg_read32(fgdev, B3D_REG_FRM_SIZE); - - /* Disable interrupts. In abnormal circumstances (e.g. after a crash) - * the board may still be transmitting from the previous session. If we - * ensure that interrupts are disabled before we later enable them, we - * are sure to capture a triplet from the start, rather than starting - * from frame 2 or 3. Disabling interrupts causes the FG to throw away - * all buffered data and stop buffering more until interrupts are - * enabled again. - */ - b3dfg_write32(fgdev, B3D_REG_HW_CTRL, 0); - - fgdev->frame_size = frm_size * 4096; - fgdev->buffers = kzalloc(sizeof(struct b3dfg_buffer) * b3dfg_nbuf, - GFP_KERNEL); - if (!fgdev->buffers) - goto err_no_buf; - for (i = 0; i < b3dfg_nbuf; i++) { - struct b3dfg_buffer *buf = &fgdev->buffers[i]; - for (j = 0; j < B3DFG_FRAMES_PER_BUFFER; j++) { - buf->frame[j] = kmalloc(fgdev->frame_size, GFP_KERNEL); - if (!buf->frame[j]) - goto err_no_mem; - } - INIT_LIST_HEAD(&buf->list); - } - - INIT_LIST_HEAD(&fgdev->buffer_queue); - init_waitqueue_head(&fgdev->buffer_waitqueue); - spin_lock_init(&fgdev->buffer_lock); - spin_lock_init(&fgdev->cstate_lock); - spin_lock_init(&fgdev->triplets_dropped_lock); - return 0; - -err_no_mem: - free_all_frame_buffers(fgdev); -err_no_buf: - return -ENOMEM; -} - -/* find next free minor number, returns -1 if none are availabile */ -static int get_free_minor(void) -{ - int i; - for (i = 0; i < B3DFG_MAX_DEVS; i++) { - if (b3dfg_devices[i] == 0) - return i; - } - return -1; -} - -static int __devinit b3dfg_probe(struct pci_dev *pdev, - const struct pci_device_id *id) -{ - struct b3dfg_dev *fgdev = kzalloc(sizeof(*fgdev), GFP_KERNEL); - int r = 0; - int minor = get_free_minor(); - dev_t devno = MKDEV(MAJOR(b3dfg_devt), minor); - unsigned long res_len; - resource_size_t res_base; - - if (fgdev == NULL) - return -ENOMEM; - - if (minor < 0) { - dev_err(&pdev->dev, "too many devices found!\n"); - r = -EIO; - goto err_free; - } - - b3dfg_devices[minor] = 1; - dev_info(&pdev->dev, "probe device with IRQ %d\n", pdev->irq); - - cdev_init(&fgdev->chardev, &b3dfg_fops); - fgdev->chardev.owner = THIS_MODULE; - - r = cdev_add(&fgdev->chardev, devno, 1); - if (r) { - dev_err(&pdev->dev, "cannot add char device\n"); - goto err_release_minor; - } - - fgdev->dev = device_create( - b3dfg_class, - &pdev->dev, - devno, - dev_get_drvdata(&pdev->dev), - DRIVER_NAME "%d", minor); - - if (IS_ERR(fgdev->dev)) { - dev_err(&pdev->dev, "cannot create device\n"); - r = PTR_ERR(fgdev->dev); - goto err_del_cdev; - } - - r = pci_enable_device(pdev); - if (r) { - dev_err(&pdev->dev, "cannot enable PCI device\n"); - goto err_dev_unreg; - } - - res_len = pci_resource_len(pdev, B3DFG_BAR_REGS); - if (res_len != B3DFG_REGS_LENGTH) { - dev_err(&pdev->dev, "invalid register resource size\n"); - r = -EIO; - goto err_disable; - } - - if (pci_resource_flags(pdev, B3DFG_BAR_REGS) - != (IORESOURCE_MEM | IORESOURCE_SIZEALIGN)) { - dev_err(&pdev->dev, "invalid resource flags\n"); - r = -EIO; - goto err_disable; - } - r = pci_request_regions(pdev, DRIVER_NAME); - if (r) { - dev_err(&pdev->dev, "cannot obtain PCI resources\n"); - goto err_disable; - } - - pci_set_master(pdev); - - r = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); - if (r) { - dev_err(&pdev->dev, "no usable DMA configuration\n"); - goto err_free_res; - } - - res_base = pci_resource_start(pdev, B3DFG_BAR_REGS); - fgdev->regs = ioremap_nocache(res_base, res_len); - if (!fgdev->regs) { - dev_err(&pdev->dev, "regs ioremap failed\n"); - r = -EIO; - goto err_free_res; - } - - fgdev->pdev = pdev; - pci_set_drvdata(pdev, fgdev); - r = b3dfg_init_dev(fgdev); - if (r < 0) { - dev_err(&pdev->dev, "failed to initalize device\n"); - goto err_unmap; - } - - r = request_irq(pdev->irq, b3dfg_intr, IRQF_SHARED, DRIVER_NAME, fgdev); - if (r) { - dev_err(&pdev->dev, "couldn't request irq %d\n", pdev->irq); - goto err_free_bufs; - } - - return 0; - -err_free_bufs: - free_all_frame_buffers(fgdev); -err_unmap: - iounmap(fgdev->regs); -err_free_res: - pci_release_regions(pdev); -err_disable: - pci_disable_device(pdev); -err_dev_unreg: - device_destroy(b3dfg_class, devno); -err_del_cdev: - cdev_del(&fgdev->chardev); -err_release_minor: - b3dfg_devices[minor] = 0; -err_free: - kfree(fgdev); - return r; -} - -static void __devexit b3dfg_remove(struct pci_dev *pdev) -{ - struct b3dfg_dev *fgdev = pci_get_drvdata(pdev); - unsigned int minor = MINOR(fgdev->chardev.dev); - - dev_dbg(&pdev->dev, "remove\n"); - - free_irq(pdev->irq, fgdev); - iounmap(fgdev->regs); - pci_release_regions(pdev); - pci_disable_device(pdev); - device_destroy(b3dfg_class, MKDEV(MAJOR(b3dfg_devt), minor)); - cdev_del(&fgdev->chardev); - free_all_frame_buffers(fgdev); - kfree(fgdev); - b3dfg_devices[minor] = 0; -} - -static struct pci_driver b3dfg_driver = { - .name = DRIVER_NAME, - .id_table = b3dfg_ids, - .probe = b3dfg_probe, - .remove = __devexit_p(b3dfg_remove), -}; - -static int __init b3dfg_module_init(void) -{ - int r; - - if (b3dfg_nbuf < 2) { - printk(KERN_ERR DRIVER_NAME - ": buffer_count is out of range (must be >= 2)"); - return -EINVAL; - } - - printk(KERN_INFO DRIVER_NAME ": loaded\n"); - - b3dfg_class = class_create(THIS_MODULE, DRIVER_NAME); - if (IS_ERR(b3dfg_class)) - return PTR_ERR(b3dfg_class); - - r = alloc_chrdev_region(&b3dfg_devt, 0, B3DFG_MAX_DEVS, DRIVER_NAME); - if (r) - goto err1; - - r = pci_register_driver(&b3dfg_driver); - if (r) - goto err2; - - return r; - -err2: - unregister_chrdev_region(b3dfg_devt, B3DFG_MAX_DEVS); -err1: - class_destroy(b3dfg_class); - return r; -} - -static void __exit b3dfg_module_exit(void) -{ - printk(KERN_INFO DRIVER_NAME ": unloaded\n"); - pci_unregister_driver(&b3dfg_driver); - unregister_chrdev_region(b3dfg_devt, B3DFG_MAX_DEVS); - class_destroy(b3dfg_class); -} - -module_init(b3dfg_module_init); -module_exit(b3dfg_module_exit); From 2d629030ca649bd4a7356befedbe7bbefa840b21 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 22 Dec 2009 16:35:21 -0800 Subject: [PATCH 067/367] Staging: p9auth: remove driver from tree No one seems to be maintaining this anymore, and it is not on any track to be merged to mainline. Cc: Ashwin Ganti Signed-off-by: Greg Kroah-Hartman --- drivers/staging/Kconfig | 2 - drivers/staging/Makefile | 1 - drivers/staging/p9auth/Kconfig | 9 - drivers/staging/p9auth/Makefile | 1 - drivers/staging/p9auth/p9auth.c | 408 -------------------------------- 5 files changed, 421 deletions(-) delete mode 100644 drivers/staging/p9auth/Kconfig delete mode 100644 drivers/staging/p9auth/Makefile delete mode 100644 drivers/staging/p9auth/p9auth.c diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig index a1dee5c59775..e43cab46e2cb 100644 --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig @@ -91,8 +91,6 @@ source "drivers/staging/pohmelfs/Kconfig" source "drivers/staging/phison/Kconfig" -source "drivers/staging/p9auth/Kconfig" - source "drivers/staging/line6/Kconfig" source "drivers/gpu/drm/vmwgfx/Kconfig" diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile index f7d34eec6740..c2f0ca9a7a15 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile @@ -28,7 +28,6 @@ obj-$(CONFIG_TRANZPORT) += frontier/ obj-$(CONFIG_DREAM) += dream/ obj-$(CONFIG_POHMELFS) += pohmelfs/ obj-$(CONFIG_IDE_PHISON) += phison/ -obj-$(CONFIG_PLAN9AUTH) += p9auth/ obj-$(CONFIG_LINE6_USB) += line6/ obj-$(CONFIG_USB_SERIAL_QUATECH2) += serqt_usb2/ obj-$(CONFIG_USB_SERIAL_QUATECH_USB2) += quatech_usb2/ diff --git a/drivers/staging/p9auth/Kconfig b/drivers/staging/p9auth/Kconfig deleted file mode 100644 index d1c66d262020..000000000000 --- a/drivers/staging/p9auth/Kconfig +++ /dev/null @@ -1,9 +0,0 @@ -config PLAN9AUTH - tristate "Plan 9 style capability device implementation" - default n - depends on CRYPTO - help - This module implements the Plan 9 style capability device. - - To compile this driver as a module, choose - M here: the module will be called p9auth. diff --git a/drivers/staging/p9auth/Makefile b/drivers/staging/p9auth/Makefile deleted file mode 100644 index 3ebf6ff0eef2..000000000000 --- a/drivers/staging/p9auth/Makefile +++ /dev/null @@ -1 +0,0 @@ -obj-$(CONFIG_PLAN9AUTH) += p9auth.o diff --git a/drivers/staging/p9auth/p9auth.c b/drivers/staging/p9auth/p9auth.c deleted file mode 100644 index db7962621210..000000000000 --- a/drivers/staging/p9auth/p9auth.c +++ /dev/null @@ -1,408 +0,0 @@ -/* - * Plan 9 style capability device implementation for the Linux Kernel - * - * Copyright 2008, 2009 Ashwin Ganti - * - * Released under the GPLv2 - * - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef CAP_MAJOR -#define CAP_MAJOR 0 -#endif - -#ifndef CAP_NR_DEVS -#define CAP_NR_DEVS 2 /* caphash and capuse */ -#endif - -#ifndef CAP_NODE_SIZE -#define CAP_NODE_SIZE 20 -#endif - -#define MAX_DIGEST_SIZE 20 - -struct cap_node { - char data[CAP_NODE_SIZE]; - struct list_head list; -}; - -struct cap_dev { - struct cap_node *head; - int node_size; - unsigned long size; - struct semaphore sem; - struct cdev cdev; -}; - -static int cap_major = CAP_MAJOR; -static int cap_minor; -static int cap_nr_devs = CAP_NR_DEVS; -static int cap_node_size = CAP_NODE_SIZE; - -module_param(cap_major, int, S_IRUGO); -module_param(cap_minor, int, S_IRUGO); -module_param(cap_nr_devs, int, S_IRUGO); - -MODULE_AUTHOR("Ashwin Ganti"); -MODULE_LICENSE("GPL"); - -static struct cap_dev *cap_devices; - -static void hexdump(unsigned char *buf, unsigned int len) -{ - while (len--) - printk("%02x", *buf++); - printk("\n"); -} - -static char *cap_hash(char *plain_text, unsigned int plain_text_size, - char *key, unsigned int key_size) -{ - struct scatterlist sg; - char *result; - struct crypto_hash *tfm; - struct hash_desc desc; - int ret; - - tfm = crypto_alloc_hash("hmac(sha1)", 0, CRYPTO_ALG_ASYNC); - if (IS_ERR(tfm)) { - printk(KERN_ERR - "failed to load transform for hmac(sha1): %ld\n", - PTR_ERR(tfm)); - return NULL; - } - - desc.tfm = tfm; - desc.flags = 0; - - result = kzalloc(MAX_DIGEST_SIZE, GFP_KERNEL); - if (!result) { - printk(KERN_ERR "out of memory!\n"); - goto out; - } - - sg_set_buf(&sg, plain_text, plain_text_size); - - ret = crypto_hash_setkey(tfm, key, key_size); - if (ret) { - printk(KERN_ERR "setkey() failed ret=%d\n", ret); - kfree(result); - result = NULL; - goto out; - } - - ret = crypto_hash_digest(&desc, &sg, plain_text_size, result); - if (ret) { - printk(KERN_ERR "digest () failed ret=%d\n", ret); - kfree(result); - result = NULL; - goto out; - } - - printk(KERN_DEBUG "crypto hash digest size %d\n", - crypto_hash_digestsize(tfm)); - hexdump(result, MAX_DIGEST_SIZE); - -out: - crypto_free_hash(tfm); - return result; -} - -static int cap_trim(struct cap_dev *dev) -{ - struct cap_node *tmp; - struct list_head *pos, *q; - if (dev->head != NULL) { - list_for_each_safe(pos, q, &(dev->head->list)) { - tmp = list_entry(pos, struct cap_node, list); - list_del(pos); - kfree(tmp); - } - } - return 0; -} - -static int cap_open(struct inode *inode, struct file *filp) -{ - struct cap_dev *dev; - dev = container_of(inode->i_cdev, struct cap_dev, cdev); - filp->private_data = dev; - - /* trim to 0 the length of the device if open was write-only */ - if ((filp->f_flags & O_ACCMODE) == O_WRONLY) { - if (down_interruptible(&dev->sem)) - return -ERESTARTSYS; - cap_trim(dev); - up(&dev->sem); - } - /* initialise the head if it is NULL */ - if (dev->head == NULL) { - dev->head = kmalloc(sizeof(struct cap_node), GFP_KERNEL); - INIT_LIST_HEAD(&(dev->head->list)); - } - return 0; -} - -static int cap_release(struct inode *inode, struct file *filp) -{ - return 0; -} - -static ssize_t cap_write(struct file *filp, const char __user *buf, - size_t count, loff_t *f_pos) -{ - struct cap_node *node_ptr, *tmp; - struct list_head *pos; - struct cap_dev *dev = filp->private_data; - ssize_t retval = -ENOMEM; - struct cred *new; - int len, target_int, source_int, flag = 0; - char *user_buf, *user_buf_running, *source_user, *target_user, - *rand_str, *hash_str, *result; - - if (down_interruptible(&dev->sem)) - return -ERESTARTSYS; - - user_buf_running = NULL; - hash_str = NULL; - node_ptr = kmalloc(sizeof(struct cap_node), GFP_KERNEL); - user_buf = kzalloc(count+1, GFP_KERNEL); - if (!node_ptr || !user_buf) - goto out; - - if (copy_from_user(user_buf, buf, count)) { - retval = -EFAULT; - goto out; - } - - /* - * If the minor number is 0 ( /dev/caphash ) then simply add the - * hashed capability supplied by the user to the list of hashes - */ - if (0 == iminor(filp->f_dentry->d_inode)) { - if (count > CAP_NODE_SIZE) { - retval = -EINVAL; - goto out; - } - printk(KERN_INFO "Capability being written to /dev/caphash : \n"); - hexdump(user_buf, count); - memcpy(node_ptr->data, user_buf, count); - list_add(&(node_ptr->list), &(dev->head->list)); - node_ptr = NULL; - } else { - char *tmpu; - if (!cap_devices[0].head || - list_empty(&(cap_devices[0].head->list))) { - retval = -EINVAL; - goto out; - } - /* - * break the supplied string into tokens with @ as the - * delimiter If the string is "user1@user2@randomstring" we - * need to split it and hash 'user1@user2' using 'randomstring' - * as the key. - */ - tmpu = user_buf_running = kstrdup(user_buf, GFP_KERNEL); - source_user = strsep(&tmpu, "@"); - target_user = strsep(&tmpu, "@"); - rand_str = tmpu; - if (!source_user || !target_user || !rand_str) { - retval = -EINVAL; - goto out; - } - - /* hash the string user1@user2 with rand_str as the key */ - len = strlen(source_user) + strlen(target_user) + 1; - /* src, @, len, \0 */ - hash_str = kzalloc(len+1, GFP_KERNEL); - strcat(hash_str, source_user); - strcat(hash_str, "@"); - strcat(hash_str, target_user); - - printk(KERN_ALERT "the source user is %s \n", source_user); - printk(KERN_ALERT "the target user is %s \n", target_user); - - result = cap_hash(hash_str, len, rand_str, strlen(rand_str)); - if (NULL == result) { - retval = -EFAULT; - goto out; - } - memcpy(node_ptr->data, result, CAP_NODE_SIZE); /* why? */ - /* Change the process's uid if the hash is present in the - * list of hashes - */ - list_for_each(pos, &(cap_devices->head->list)) { - /* - * Change the user id of the process if the hashes - * match - */ - if (0 == - memcmp(result, - list_entry(pos, struct cap_node, - list)->data, - CAP_NODE_SIZE)) { - target_int = (unsigned int) - simple_strtol(target_user, NULL, 0); - source_int = (unsigned int) - simple_strtol(source_user, NULL, 0); - flag = 1; - - /* - * Check whether the process writing to capuse - * is actually owned by the source owner - */ - if (source_int != current_uid()) { - printk(KERN_ALERT - "Process is not owned by the source user of the capability.\n"); - retval = -EFAULT; - goto out; - } - /* - * What all id's need to be changed here? uid, - * euid, fsid, savedids ?? Currently I am - * changing the effective user id since most of - * the authorisation decisions are based on it - */ - new = prepare_creds(); - if (!new) { - retval = -ENOMEM; - goto out; - } - new->uid = (uid_t) target_int; - new->euid = (uid_t) target_int; - retval = commit_creds(new); - if (retval) - goto out; - - /* - * Remove the capability from the list and - * break - */ - tmp = list_entry(pos, struct cap_node, list); - list_del(pos); - kfree(tmp); - break; - } - } - if (0 == flag) { - /* - * The capability is not present in the list of the - * hashes stored, hence return failure - */ - printk(KERN_ALERT - "Invalid capabiliy written to /dev/capuse \n"); - retval = -EFAULT; - goto out; - } - } - *f_pos += count; - retval = count; - /* update the size */ - if (dev->size < *f_pos) - dev->size = *f_pos; - -out: - kfree(node_ptr); - kfree(user_buf); - kfree(user_buf_running); - kfree(hash_str); - up(&dev->sem); - return retval; -} - -static const struct file_operations cap_fops = { - .owner = THIS_MODULE, - .write = cap_write, - .open = cap_open, - .release = cap_release, -}; - -/* no __exit here because it can be called by the init function */ -static void cap_cleanup_module(void) -{ - int i; - dev_t devno = MKDEV(cap_major, cap_minor); - if (cap_devices) { - for (i = 0; i < cap_nr_devs; i++) { - cap_trim(cap_devices + i); - cdev_del(&cap_devices[i].cdev); - } - kfree(cap_devices); - } - unregister_chrdev_region(devno, cap_nr_devs); - -} - -static void cap_setup_cdev(struct cap_dev *dev, int index) -{ - int err, devno = MKDEV(cap_major, cap_minor + index); - cdev_init(&dev->cdev, &cap_fops); - dev->cdev.owner = THIS_MODULE; - dev->cdev.ops = &cap_fops; - err = cdev_add(&dev->cdev, devno, 1); - if (err) - printk(KERN_NOTICE "Error %d adding cap%d", err, index); -} - -static int __init cap_init_module(void) -{ - int result, i; - dev_t dev = 0; - - if (cap_major) { - dev = MKDEV(cap_major, cap_minor); - result = register_chrdev_region(dev, cap_nr_devs, "cap"); - } else { - result = alloc_chrdev_region(&dev, cap_minor, cap_nr_devs, - "cap"); - cap_major = MAJOR(dev); - } - - if (result < 0) { - printk(KERN_WARNING "cap: can't get major %d\n", - cap_major); - return result; - } - - cap_devices = kzalloc(cap_nr_devs * sizeof(struct cap_dev), - GFP_KERNEL); - if (!cap_devices) { - result = -ENOMEM; - goto fail; - } - - /* Initialize each device. */ - for (i = 0; i < cap_nr_devs; i++) { - cap_devices[i].node_size = cap_node_size; - init_MUTEX(&cap_devices[i].sem); - cap_setup_cdev(&cap_devices[i], i); - } - - return 0; - -fail: - cap_cleanup_module(); - return result; -} - -module_init(cap_init_module); -module_exit(cap_cleanup_module); - - From ca1f29c01aaa37d522dc6ce311769731f5f1919e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 22 Dec 2009 16:38:10 -0800 Subject: [PATCH 068/367] Staging: altpciechdma: remove driver No one seems to be able to maintain this, or merge it into mainline, so remove it. Acked-by: Leon Woestenberg Signed-off-by: Greg Kroah-Hartman --- drivers/staging/Kconfig | 2 - drivers/staging/Makefile | 1 - drivers/staging/altpciechdma/Kconfig | 10 - drivers/staging/altpciechdma/Makefile | 2 - drivers/staging/altpciechdma/TODO | 15 - drivers/staging/altpciechdma/altpciechdma.c | 1182 ------------------- 6 files changed, 1212 deletions(-) delete mode 100644 drivers/staging/altpciechdma/Kconfig delete mode 100644 drivers/staging/altpciechdma/Makefile delete mode 100644 drivers/staging/altpciechdma/TODO delete mode 100644 drivers/staging/altpciechdma/altpciechdma.c diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig index e43cab46e2cb..9543174360bf 100644 --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig @@ -71,8 +71,6 @@ source "drivers/staging/asus_oled/Kconfig" source "drivers/staging/panel/Kconfig" -source "drivers/staging/altpciechdma/Kconfig" - source "drivers/staging/rtl8187se/Kconfig" source "drivers/staging/rtl8192su/Kconfig" diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile index c2f0ca9a7a15..394327a1f789 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile @@ -18,7 +18,6 @@ obj-$(CONFIG_RT2870) += rt2870/ obj-$(CONFIG_COMEDI) += comedi/ obj-$(CONFIG_ASUS_OLED) += asus_oled/ obj-$(CONFIG_PANEL) += panel/ -obj-$(CONFIG_ALTERA_PCIE_CHDMA) += altpciechdma/ obj-$(CONFIG_R8187SE) += rtl8187se/ obj-$(CONFIG_RTL8192SU) += rtl8192su/ obj-$(CONFIG_RTL8192U) += rtl8192u/ diff --git a/drivers/staging/altpciechdma/Kconfig b/drivers/staging/altpciechdma/Kconfig deleted file mode 100644 index 0f4bf92cbbfb..000000000000 --- a/drivers/staging/altpciechdma/Kconfig +++ /dev/null @@ -1,10 +0,0 @@ -config ALTERA_PCIE_CHDMA - tristate "Altera PCI Express Chaining DMA driver" - depends on PCI - default N - ---help--- - A reference driver that exercises the Chaining DMA logic reference - design generated along the Altera FPGA PCI Express soft or hard core, - only if instantiated using the MegaWizard, not the SOPC builder, of - Quartus 8.1. - diff --git a/drivers/staging/altpciechdma/Makefile b/drivers/staging/altpciechdma/Makefile deleted file mode 100644 index c08c8437f4db..000000000000 --- a/drivers/staging/altpciechdma/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -obj-$(CONFIG_ALTERA_PCIE_CHDMA) += altpciechdma.o - diff --git a/drivers/staging/altpciechdma/TODO b/drivers/staging/altpciechdma/TODO deleted file mode 100644 index 12c945fd61e1..000000000000 --- a/drivers/staging/altpciechdma/TODO +++ /dev/null @@ -1,15 +0,0 @@ -DONE: - - functionality similar to logic testbench - -TODO: - - checkpatch.pl cleanups. - - keep state of DMA engines. - - keep data structure that keeps state of each transfer. - - interrupt handler should iterate over outstanding descriptor tables. - - complete userspace cdev to read/write using the DMA engines. - - split off the DMA support functions in a module, re-usable by custom - drivers. - -Please coordinate work with, and send patches to -Leon Woestenberg - diff --git a/drivers/staging/altpciechdma/altpciechdma.c b/drivers/staging/altpciechdma/altpciechdma.c deleted file mode 100644 index 2a02f8e625f7..000000000000 --- a/drivers/staging/altpciechdma/altpciechdma.c +++ /dev/null @@ -1,1182 +0,0 @@ -/** - * Driver for Altera PCIe core chaining DMA reference design. - * - * Copyright (C) 2008 Leon Woestenberg - * Copyright (C) 2008 Nickolas Heppermann - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * - * Rationale: This driver exercises the chaining DMA read and write engine - * in the reference design. It is meant as a complementary reference - * driver that can be used for testing early designs as well as a basis to - * write your custom driver. - * - * Status: Test results from Leon Woestenberg : - * - * Sendero Board w/ Cyclone II EP2C35F672C6N, PX1011A PCIe x1 PHY on a - * Dell Precision 370 PC, x86, kernel 2.6.20 from Ubuntu 7.04. - * - * Sendero Board w/ Cyclone II EP2C35F672C6N, PX1011A PCIe x1 PHY on a - * Freescale MPC8313E-RDB board, PowerPC, 2.6.24 w/ Freescale patches. - * - * Driver tests passed with PCIe Compiler 8.1. With PCIe 8.0 the DMA - * loopback test had reproducable compare errors. I assume a change - * in the compiler or reference design, but could not find evidence nor - * documentation on a change or fix in that direction. - * - * The reference design does not have readable locations and thus a - * dummy read, used to flush PCI posted writes, cannot be performed. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -/* by default do not build the character device interface */ -/* XXX It is non-functional yet */ -#ifndef ALTPCIECHDMA_CDEV -# define ALTPCIECHDMA_CDEV 0 -#endif - -/* build the character device interface? */ -#if ALTPCIECHDMA_CDEV -# define MAX_CHDMA_SIZE (8 * 1024 * 1024) -# include "mapper_user_to_sg.h" -#endif - -/** driver name, mimicks Altera naming of the reference design */ -#define DRV_NAME "altpciechdma" -/** number of BARs on the device */ -#define APE_BAR_NUM (6) -/** BAR number where the RCSLAVE memory sits */ -#define APE_BAR_RCSLAVE (0) -/** BAR number where the Descriptor Header sits */ -#define APE_BAR_HEADER (2) - -/** maximum size in bytes of the descriptor table, chdma logic limit */ -#define APE_CHDMA_TABLE_SIZE (4096) -/* single transfer must not exceed 255 table entries. worst case this can be - * achieved by 255 scattered pages, with only a single byte in the head and - * tail pages. 253 * PAGE_SIZE is a safe upper bound for the transfer size. - */ -#define APE_CHDMA_MAX_TRANSFER_LEN (253 * PAGE_SIZE) - -/** - * Specifies those BARs to be mapped and the length of each mapping. - * - * Zero (0) means do not map, otherwise specifies the BAR lengths to be mapped. - * If the actual BAR length is less, this is considered an error; then - * reconfigure your PCIe core. - * - * @see ug_pci_express 8.0, table 7-2 at page 7-13. - */ -static const unsigned long bar_min_len[APE_BAR_NUM] = - { 32768, 0, 256, 0, 32768, 0 }; - -/** - * Descriptor Header, controls the DMA read engine or write engine. - * - * The descriptor header is the main data structure for starting DMA transfers. - * - * It sits in End Point (FPGA) memory BAR[2] for 32-bit or BAR[3:2] for 64-bit. - * It references a descriptor table which exists in Root Complex (PC) memory. - * Writing the rclast field starts the DMA operation, thus all other structures - * and fields must be setup before doing so. - * - * @see ug_pci_express 8.0, tables 7-3, 7-4 and 7-5 at page 7-14. - * @note This header must be written in four 32-bit (PCI DWORD) writes. - */ -struct ape_chdma_header { - /** - * w0 consists of two 16-bit fields: - * lsb u16 number; number of descriptors in ape_chdma_table - * msb u16 control; global control flags - */ - u32 w0; - /* bus address to ape_chdma_table in Root Complex memory */ - u32 bdt_addr_h; - u32 bdt_addr_l; - /** - * w3 consists of two 16-bit fields: - * - lsb u16 rclast; last descriptor number available in Root Complex - * - zero (0) means the first descriptor is ready, - * - one (1) means two descriptors are ready, etc. - * - msb u16 reserved; - * - * @note writing to this memory location starts the DMA operation! - */ - u32 w3; -} __attribute__ ((packed)); - -/** - * Descriptor Entry, describing a (non-scattered) single memory block transfer. - * - * There is one descriptor for each memory block involved in the transfer, a - * block being a contiguous address range on the bus. - * - * Multiple descriptors are chained by means of the ape_chdma_table data - * structure. - * - * @see ug_pci_express 8.0, tables 7-6, 7-7 and 7-8 at page 7-14 and page 7-15. - */ -struct ape_chdma_desc { - /** - * w0 consists of two 16-bit fields: - * number of DWORDS to transfer - * - lsb u16 length; - * global control - * - msb u16 control; - */ - u32 w0; - /* address of memory in the End Point */ - u32 ep_addr; - /* bus address of source or destination memory in the Root Complex */ - u32 rc_addr_h; - u32 rc_addr_l; -} __attribute__ ((packed)); - -/** - * Descriptor Table, an array of descriptors describing a chained transfer. - * - * An array of descriptors, preceded by workspace for the End Point. - * It exists in Root Complex memory. - * - * The End Point can update its last completed descriptor number in the - * eplast field if requested by setting the EPLAST_ENA bit either - * globally in the header's or locally in any descriptor's control field. - * - * @note this structure may not exceed 4096 bytes. This results in a - * maximum of 4096 / (4 * 4) - 1 = 255 descriptors per chained transfer. - * - * @see ug_pci_express 8.0, tables 7-9, 7-10 and 7-11 at page 7-17 and page 7-18. - */ -struct ape_chdma_table { - /* workspace 0x00-0x0b, reserved */ - u32 reserved1[3]; - /* workspace 0x0c-0x0f, last descriptor handled by End Point */ - u32 w3; - /* the actual array of descriptors - * 0x10-0x1f, 0x20-0x2f, ... 0xff0-0xfff (255 entries) - */ - struct ape_chdma_desc desc[255]; -} __attribute__ ((packed)); - -/** - * Altera PCI Express ('ape') board specific book keeping data - * - * Keeps state of the PCIe core and the Chaining DMA controller - * application. - */ -struct ape_dev { - /** the kernel pci device data structure provided by probe() */ - struct pci_dev *pci_dev; - /** - * kernel virtual address of the mapped BAR memory and IO regions of - * the End Point. Used by map_bars()/unmap_bars(). - */ - void * __iomem bar[APE_BAR_NUM]; - /** kernel virtual address for Descriptor Table in Root Complex memory */ - struct ape_chdma_table *table_virt; - /** - * bus address for the Descriptor Table in Root Complex memory, in - * CPU-native endianess - */ - dma_addr_t table_bus; - /* if the device regions could not be allocated, assume and remember it - * is in use by another driver; this driver must not disable the device. - */ - int in_use; - /* whether this driver enabled msi for the device */ - int msi_enabled; - /* whether this driver could obtain the regions */ - int got_regions; - /* irq line successfully requested by this driver, -1 otherwise */ - int irq_line; - /* board revision */ - u8 revision; - /* interrupt count, incremented by the interrupt handler */ - int irq_count; -#if ALTPCIECHDMA_CDEV - /* character device */ - dev_t cdevno; - struct cdev cdev; - /* user space scatter gather mapper */ - struct sg_mapping_t *sgm; -#endif -}; - -/** - * Using the subsystem vendor id and subsystem id, it is possible to - * distinguish between different cards bases around the same - * (third-party) logic core. - * - * Default Altera vendor and device ID's, and some (non-reserved) - * ID's are now used here that are used amongst the testers/developers. - */ -static const struct pci_device_id ids[] = { - { PCI_DEVICE(0x1172, 0xE001), }, - { PCI_DEVICE(0x2071, 0x2071), }, - { 0, } -}; -MODULE_DEVICE_TABLE(pci, ids); - -#if ALTPCIECHDMA_CDEV -/* prototypes for character device */ -static int sg_init(struct ape_dev *ape); -static void sg_exit(struct ape_dev *ape); -#endif - -/** - * altpciechdma_isr() - Interrupt handler - * - */ -static irqreturn_t altpciechdma_isr(int irq, void *dev_id) -{ - struct ape_dev *ape = (struct ape_dev *)dev_id; - if (!ape) - return IRQ_NONE; - ape->irq_count++; - return IRQ_HANDLED; -} - -static int __devinit scan_bars(struct ape_dev *ape, struct pci_dev *dev) -{ - int i; - for (i = 0; i < APE_BAR_NUM; i++) { - unsigned long bar_start = pci_resource_start(dev, i); - if (bar_start) { - unsigned long bar_end = pci_resource_end(dev, i); - unsigned long bar_flags = pci_resource_flags(dev, i); - printk(KERN_DEBUG "BAR%d 0x%08lx-0x%08lx flags 0x%08lx\n", - i, bar_start, bar_end, bar_flags); - } - } - return 0; -} - -/** - * Unmap the BAR regions that had been mapped earlier using map_bars() - */ -static void unmap_bars(struct ape_dev *ape, struct pci_dev *dev) -{ - int i; - for (i = 0; i < APE_BAR_NUM; i++) { - /* is this BAR mapped? */ - if (ape->bar[i]) { - /* unmap BAR */ - pci_iounmap(dev, ape->bar[i]); - ape->bar[i] = NULL; - } - } -} - -/** - * Map the device memory regions into kernel virtual address space after - * verifying their sizes respect the minimum sizes needed, given by the - * bar_min_len[] array. - */ -static int __devinit map_bars(struct ape_dev *ape, struct pci_dev *dev) -{ - int rc; - int i; - /* iterate through all the BARs */ - for (i = 0; i < APE_BAR_NUM; i++) { - unsigned long bar_start = pci_resource_start(dev, i); - unsigned long bar_end = pci_resource_end(dev, i); - unsigned long bar_length = bar_end - bar_start + 1; - ape->bar[i] = NULL; - /* do not map, and skip, BARs with length 0 */ - if (!bar_min_len[i]) - continue; - /* do not map BARs with address 0 */ - if (!bar_start || !bar_end) { - printk(KERN_DEBUG "BAR #%d is not present?!\n", i); - rc = -1; - goto fail; - } - bar_length = bar_end - bar_start + 1; - /* BAR length is less than driver requires? */ - if (bar_length < bar_min_len[i]) { - printk(KERN_DEBUG "BAR #%d length = %lu bytes but driver " - "requires at least %lu bytes\n", - i, bar_length, bar_min_len[i]); - rc = -1; - goto fail; - } - /* map the device memory or IO region into kernel virtual - * address space */ - ape->bar[i] = pci_iomap(dev, i, bar_min_len[i]); - if (!ape->bar[i]) { - printk(KERN_DEBUG "Could not map BAR #%d.\n", i); - rc = -1; - goto fail; - } - printk(KERN_DEBUG "BAR[%d] mapped at 0x%p with length %lu(/%lu).\n", i, - ape->bar[i], bar_min_len[i], bar_length); - } - /* successfully mapped all required BAR regions */ - rc = 0; - goto success; -fail: - /* unmap any BARs that we did map */ - unmap_bars(ape, dev); -success: - return rc; -} - -#if 0 /* not yet implemented fully FIXME add opcode */ -static void __devinit rcslave_test(struct ape_dev *ape, struct pci_dev *dev) -{ - u32 *rcslave_mem = (u32 *)ape->bar[APE_BAR_RCSLAVE]; - u32 result = 0; - /** this number is assumed to be different each time this test runs */ - u32 seed = (u32)jiffies; - u32 value = seed; - int i; - - /* write loop */ - value = seed; - for (i = 1024; i < 32768 / 4 ; i++) { - printk(KERN_DEBUG "Writing 0x%08x to 0x%p.\n", - (u32)value, (void *)rcslave_mem + i); - iowrite32(value, rcslave_mem + i); - value++; - } - /* read-back loop */ - value = seed; - for (i = 1024; i < 32768 / 4; i++) { - result = ioread32(rcslave_mem + i); - if (result != value) { - printk(KERN_DEBUG "Wrote 0x%08x to 0x%p, but read back 0x%08x.\n", - (u32)value, (void *)rcslave_mem + i, (u32)result); - break; - } - value++; - } -} -#endif - -/* obtain the 32 most significant (high) bits of a 32-bit or 64-bit address */ -#define pci_dma_h(addr) ((addr >> 16) >> 16) -/* obtain the 32 least significant (low) bits of a 32-bit or 64-bit address */ -#define pci_dma_l(addr) (addr & 0xffffffffUL) - -/* ape_fill_chdma_desc() - Fill a Altera PCI Express Chaining DMA descriptor - * - * @desc pointer to descriptor to be filled - * @addr root complex address - * @ep_addr end point address - * @len number of bytes, must be a multiple of 4. - */ -static inline void ape_chdma_desc_set(struct ape_chdma_desc *desc, dma_addr_t addr, u32 ep_addr, int len) -{ - BUG_ON(len & 3); - desc->w0 = cpu_to_le32(len / 4); - desc->ep_addr = cpu_to_le32(ep_addr); - desc->rc_addr_h = cpu_to_le32(pci_dma_h(addr)); - desc->rc_addr_l = cpu_to_le32(pci_dma_l(addr)); -} - -#if ALTPCIECHDMA_CDEV -/* - * ape_sg_to_chdma_table() - Create a device descriptor table from a scatterlist. - * - * The scatterlist must have been mapped by pci_map_sg(sgm->sgl). - * - * @sgl scatterlist. - * @nents Number of entries in the scatterlist. - * @first Start index in the scatterlist sgm->sgl. - * @ep_addr End Point address for the scatter/gather transfer. - * @desc pointer to first descriptor - * - * Returns Number of entries in the table on success, -1 on error. - */ -static int ape_sg_to_chdma_table(struct scatterlist *sgl, int nents, int first, struct ape_chdma_desc *desc, u32 ep_addr) -{ - int i = first, j = 0; - /* inspect first entry */ - dma_addr_t addr = sg_dma_address(&sgl[i]); - unsigned int len = sg_dma_len(&sgl[i]); - /* contiguous block */ - dma_addr_t cont_addr = addr; - unsigned int cont_len = len; - /* iterate over remaining entries */ - for (; j < 25 && i < nents - 1; i++) { - /* bus address of next entry i + 1 */ - dma_addr_t next = sg_dma_address(&sgl[i + 1]); - /* length of this entry i */ - len = sg_dma_len(&sgl[i]); - printk(KERN_DEBUG "%04d: addr=0x%Lx length=0x%08x\n", i, - (unsigned long long)addr, len); - /* entry i + 1 is non-contiguous with entry i? */ - if (next != addr + len) { - /* TODO create entry here (we could overwrite i) */ - printk(KERN_DEBUG "%4d: cont_addr=0x%Lx cont_len=0x%08x\n", j, - (unsigned long long)cont_addr, cont_len); - /* set descriptor for contiguous transfer */ - ape_chdma_desc_set(&desc[j], cont_addr, ep_addr, cont_len); - /* next end point memory address */ - ep_addr += cont_len; - /* start new contiguous block */ - cont_addr = next; - cont_len = 0; - j++; - } - /* add entry i + 1 to current contiguous block */ - cont_len += len; - /* goto entry i + 1 */ - addr = next; - } - /* TODO create entry here (we could overwrite i) */ - printk(KERN_DEBUG "%04d: addr=0x%Lx length=0x%08x\n", i, - (unsigned long long)addr, len); - printk(KERN_DEBUG "%4d: cont_addr=0x%Lx length=0x%08x\n", j, - (unsigned long long)cont_addr, cont_len); - j++; - return j; -} -#endif - -/* compare buffers */ -static inline int compare(u32 *p, u32 *q, int len) -{ - int result = -1; - int fail = 0; - int i; - for (i = 0; i < len / 4; i++) { - if (*p == *q) { - /* every so many u32 words, show equals */ - if ((i & 255) == 0) - printk(KERN_DEBUG "[%p] = 0x%08x [%p] = 0x%08x\n", p, *p, q, *q); - } else { - fail++; - /* show the first few miscompares */ - if (fail < 10) - printk(KERN_DEBUG "[%p] = 0x%08x != [%p] = 0x%08x ?!\n", p, *p, q, *q); - /* but stop after a while */ - else if (fail == 10) - printk(KERN_DEBUG "---more errors follow! not printed---\n"); - else - /* stop compare after this many errors */ - break; - } - p++; - q++; - } - if (!fail) - result = 0; - return result; -} - -/* dma_test() - Perform DMA loop back test to end point and back to root complex. - * - * Allocate a cache-coherent buffer in host memory, consisting of four pages. - * - * Fill the four memory pages such that each 32-bit word contains its own address. - * - * Now perform a loop back test, have the end point device copy the first buffer - * half to end point memory, then have it copy back into the second half. - * - * Create a descriptor table to copy the first buffer half into End Point - * memory. Instruct the End Point to do a DMA read using that table. - * - * Create a descriptor table to copy End Point memory to the second buffer - * half. Instruct the End Point to do a DMA write using that table. - * - * Compare results, fail or pass. - * - */ -static int __devinit dma_test(struct ape_dev *ape, struct pci_dev *dev) -{ - /* test result; guilty until proven innocent */ - int result = -1; - /* the DMA read header sits at address 0x00 of the DMA engine BAR */ - struct ape_chdma_header *write_header = (struct ape_chdma_header *)ape->bar[APE_BAR_HEADER]; - /* the write DMA header sits after the read header at address 0x10 */ - struct ape_chdma_header *read_header = write_header + 1; - /* virtual address of the allocated buffer */ - u8 *buffer_virt = 0; - /* bus address of the allocated buffer */ - dma_addr_t buffer_bus = 0; - int i, n = 0, irq_count; - - /* temporary value used to construct 32-bit data words */ - u32 w; - - printk(KERN_DEBUG "bar_tests(), PAGE_SIZE = 0x%0x\n", (int)PAGE_SIZE); - printk(KERN_DEBUG "write_header = 0x%p.\n", write_header); - printk(KERN_DEBUG "read_header = 0x%p.\n", read_header); - printk(KERN_DEBUG "&write_header->w3 = 0x%p\n", &write_header->w3); - printk(KERN_DEBUG "&read_header->w3 = 0x%p\n", &read_header->w3); - printk(KERN_DEBUG "ape->table_virt = 0x%p.\n", ape->table_virt); - - if (!write_header || !read_header || !ape->table_virt) - goto fail; - - /* allocate and map coherently-cached memory for a DMA-able buffer */ - /* @see Documentation/PCI/PCI-DMA-mapping.txt, near line 318 */ - buffer_virt = (u8 *)pci_alloc_consistent(dev, PAGE_SIZE * 4, &buffer_bus); - if (!buffer_virt) { - printk(KERN_DEBUG "Could not allocate coherent DMA buffer.\n"); - goto fail; - } - printk(KERN_DEBUG "Allocated cache-coherent DMA buffer (virtual address = %p, bus address = 0x%016llx).\n", - buffer_virt, (u64)buffer_bus); - - /* fill first half of buffer with its virtual address as data */ - for (i = 0; i < 4 * PAGE_SIZE; i += 4) -#if 0 - *(u32 *)(buffer_virt + i) = i / PAGE_SIZE + 1; -#else - *(u32 *)(buffer_virt + i) = (u32)(unsigned long)(buffer_virt + i); -#endif -#if 0 - compare((u32 *)buffer_virt, (u32 *)(buffer_virt + 2 * PAGE_SIZE), 8192); -#endif - -#if 0 - /* fill second half of buffer with zeroes */ - for (i = 2 * PAGE_SIZE; i < 4 * PAGE_SIZE; i += 4) - *(u32 *)(buffer_virt + i) = 0; -#endif - - /* invalidate EPLAST, outside 0-255, 0xFADE is from the testbench */ - ape->table_virt->w3 = cpu_to_le32(0x0000FADE); - - /* fill in first descriptor */ - n = 0; - /* read 8192 bytes from RC buffer to EP address 4096 */ - ape_chdma_desc_set(&ape->table_virt->desc[n], buffer_bus, 4096, 2 * PAGE_SIZE); -#if 1 - for (i = 0; i < 255; i++) - ape_chdma_desc_set(&ape->table_virt->desc[i], buffer_bus, 4096, 2 * PAGE_SIZE); - /* index of last descriptor */ - n = i - 1; -#endif -#if 0 - /* fill in next descriptor */ - n++; - /* read 1024 bytes from RC buffer to EP address 4096 + 1024 */ - ape_chdma_desc_set(&ape->table_virt->desc[n], buffer_bus + 1024, 4096 + 1024, 1024); -#endif - -#if 1 - /* enable MSI after the last descriptor is completed */ - if (ape->msi_enabled) - ape->table_virt->desc[n].w0 |= cpu_to_le32(1UL << 16)/*local MSI*/; -#endif -#if 0 - /* dump descriptor table for debugging */ - printk(KERN_DEBUG "Descriptor Table (Read, in Root Complex Memory, # = %d)\n", n + 1); - for (i = 0; i < 4 + (n + 1) * 4; i += 4) { - u32 *p = (u32 *)ape->table_virt; - p += i; - printk(KERN_DEBUG "0x%08x/0x%02x: 0x%08x (LEN=0x%x)\n", (u32)p, (u32)p & 15, *p, 4 * le32_to_cpu(*p)); - p++; - printk(KERN_DEBUG "0x%08x/0x%02x: 0x%08x (EPA=0x%x)\n", (u32)p, (u32)p & 15, *p, le32_to_cpu(*p)); - p++; - printk(KERN_DEBUG "0x%08x/0x%02x: 0x%08x (RCH=0x%x)\n", (u32)p, (u32)p & 15, *p, le32_to_cpu(*p)); - p++; - printk(KERN_DEBUG "0x%08x/0x%02x: 0x%08x (RCL=0x%x)\n", (u32)p, (u32)p & 15, *p, le32_to_cpu(*p)); - } -#endif - /* set available number of descriptors in table */ - w = (u32)(n + 1); - w |= (1UL << 18)/*global EPLAST_EN*/; -#if 0 - if (ape->msi_enabled) - w |= (1UL << 17)/*global MSI*/; -#endif - printk(KERN_DEBUG "writing 0x%08x to 0x%p\n", w, (void *)&read_header->w0); - iowrite32(w, &read_header->w0); - - /* write table address (higher 32-bits) */ - printk(KERN_DEBUG "writing 0x%08x to 0x%p\n", (u32)((ape->table_bus >> 16) >> 16), (void *)&read_header->bdt_addr_h); - iowrite32(pci_dma_h(ape->table_bus), &read_header->bdt_addr_h); - - /* write table address (lower 32-bits) */ - printk(KERN_DEBUG "writing 0x%08x to 0x%p\n", (u32)(ape->table_bus & 0xffffffffUL), (void *)&read_header->bdt_addr_l); - iowrite32(pci_dma_l(ape->table_bus), &read_header->bdt_addr_l); - - /* memory write barrier */ - wmb(); - printk(KERN_DEBUG "Flush posted writes\n"); - /** FIXME Add dummy read to flush posted writes but need a readable location! */ -#if 0 - (void)ioread32(); -#endif - - /* remember IRQ count before the transfer */ - irq_count = ape->irq_count; - /* write number of descriptors - this starts the DMA */ - printk(KERN_DEBUG "\nStart DMA read\n"); - printk(KERN_DEBUG "writing 0x%08x to 0x%p\n", (u32)n, (void *)&read_header->w3); - iowrite32(n, &read_header->w3); - printk(KERN_DEBUG "EPLAST = %lu\n", le32_to_cpu(*(u32 *)&ape->table_virt->w3) & 0xffffUL); - - /** memory write barrier */ - wmb(); - /* dummy read to flush posted writes */ - /* FIXME Need a readable location! */ -#if 0 - (void)ioread32(); -#endif - printk(KERN_DEBUG "POLL FOR READ:\n"); - /* poll for chain completion, 1000 times 1 millisecond */ - for (i = 0; i < 100; i++) { - volatile u32 *p = &ape->table_virt->w3; - u32 eplast = le32_to_cpu(*p) & 0xffffUL; - printk(KERN_DEBUG "EPLAST = %u, n = %d\n", eplast, n); - if (eplast == n) { - printk(KERN_DEBUG "DONE\n"); - /* print IRQ count before the transfer */ - printk(KERN_DEBUG "#IRQs during transfer: %d\n", ape->irq_count - irq_count); - break; - } - udelay(100); - } - - /* invalidate EPLAST, outside 0-255, 0xFADE is from the testbench */ - ape->table_virt->w3 = cpu_to_le32(0x0000FADE); - - /* setup first descriptor */ - n = 0; - ape_chdma_desc_set(&ape->table_virt->desc[n], buffer_bus + 8192, 4096, 2 * PAGE_SIZE); -#if 1 - for (i = 0; i < 255; i++) - ape_chdma_desc_set(&ape->table_virt->desc[i], buffer_bus + 8192, 4096, 2 * PAGE_SIZE); - - /* index of last descriptor */ - n = i - 1; -#endif -#if 1 /* test variable, make a module option later */ - if (ape->msi_enabled) - ape->table_virt->desc[n].w0 |= cpu_to_le32(1UL << 16)/*local MSI*/; -#endif -#if 0 - /* dump descriptor table for debugging */ - printk(KERN_DEBUG "Descriptor Table (Write, in Root Complex Memory, # = %d)\n", n + 1); - for (i = 0; i < 4 + (n + 1) * 4; i += 4) { - u32 *p = (u32 *)ape->table_virt; - p += i; - printk(KERN_DEBUG "0x%08x/0x%02x: 0x%08x (LEN=0x%x)\n", (u32)p, (u32)p & 15, *p, 4 * le32_to_cpu(*p)); - p++; - printk(KERN_DEBUG "0x%08x/0x%02x: 0x%08x (EPA=0x%x)\n", (u32)p, (u32)p & 15, *p, le32_to_cpu(*p)); - p++; - printk(KERN_DEBUG "0x%08x/0x%02x: 0x%08x (RCH=0x%x)\n", (u32)p, (u32)p & 15, *p, le32_to_cpu(*p)); - p++; - printk(KERN_DEBUG "0x%08x/0x%02x: 0x%08x (RCL=0x%x)\n", (u32)p, (u32)p & 15, *p, le32_to_cpu(*p)); - } -#endif - - /* set number of available descriptors in the table */ - w = (u32)(n + 1); - /* enable updates of eplast for each descriptor completion */ - w |= (u32)(1UL << 18)/*global EPLAST_EN*/; -#if 0 /* test variable, make a module option later */ - /* enable MSI for each descriptor completion */ - if (ape->msi_enabled) - w |= (1UL << 17)/*global MSI*/; -#endif - iowrite32(w, &write_header->w0); - iowrite32(pci_dma_h(ape->table_bus), &write_header->bdt_addr_h); - iowrite32(pci_dma_l(ape->table_bus), &write_header->bdt_addr_l); - - /** memory write barrier and flush posted writes */ - wmb(); - /* dummy read to flush posted writes */ - /* FIXME Need a readable location! */ -#if 0 - (void)ioread32(); -#endif - irq_count = ape->irq_count; - - printk(KERN_DEBUG "\nStart DMA write\n"); - iowrite32(n, &write_header->w3); - - /** memory write barrier */ - wmb(); - /** dummy read to flush posted writes */ - /* (void) ioread32(); */ - - printk(KERN_DEBUG "POLL FOR WRITE:\n"); - /* poll for completion, 1000 times 1 millisecond */ - for (i = 0; i < 100; i++) { - volatile u32 *p = &ape->table_virt->w3; - u32 eplast = le32_to_cpu(*p) & 0xffffUL; - printk(KERN_DEBUG "EPLAST = %u, n = %d\n", eplast, n); - if (eplast == n) { - printk(KERN_DEBUG "DONE\n"); - /* print IRQ count before the transfer */ - printk(KERN_DEBUG "#IRQs during transfer: %d\n", ape->irq_count - irq_count); - break; - } - udelay(100); - } - /* soft-reset DMA write engine */ - iowrite32(0x0000ffffUL, &write_header->w0); - /* soft-reset DMA read engine */ - iowrite32(0x0000ffffUL, &read_header->w0); - - /** memory write barrier */ - wmb(); - /* dummy read to flush posted writes */ - /* FIXME Need a readable location! */ -#if 0 - (void)ioread32(); -#endif - /* compare first half of buffer with second half, should be identical */ - result = compare((u32 *)buffer_virt, (u32 *)(buffer_virt + 2 * PAGE_SIZE), 8192); - printk(KERN_DEBUG "DMA loop back test %s.\n", result ? "FAILED" : "PASSED"); - - pci_free_consistent(dev, 4 * PAGE_SIZE, buffer_virt, buffer_bus); -fail: - printk(KERN_DEBUG "bar_tests() end, result %d\n", result); - return result; -} - -/* Called when the PCI sub system thinks we can control the given device. - * Inspect if we can support the device and if so take control of it. - * - * Return 0 when we have taken control of the given device. - * - * - allocate board specific bookkeeping - * - allocate coherently-mapped memory for the descriptor table - * - enable the board - * - verify board revision - * - request regions - * - query DMA mask - * - obtain and request irq - * - map regions into kernel address space - */ -static int __devinit probe(struct pci_dev *dev, const struct pci_device_id *id) -{ - int rc = 0; - struct ape_dev *ape = NULL; - u8 irq_pin, irq_line; - printk(KERN_DEBUG "probe(dev = 0x%p, pciid = 0x%p)\n", dev, id); - - /* allocate memory for per-board book keeping */ - ape = kzalloc(sizeof(struct ape_dev), GFP_KERNEL); - if (!ape) { - printk(KERN_DEBUG "Could not kzalloc()ate memory.\n"); - goto err_ape; - } - ape->pci_dev = dev; - dev_set_drvdata(&dev->dev, ape); - printk(KERN_DEBUG "probe() ape = 0x%p\n", ape); - - printk(KERN_DEBUG "sizeof(struct ape_chdma_table) = %d.\n", - (int)sizeof(struct ape_chdma_table)); - /* the reference design has a size restriction on the table size */ - BUG_ON(sizeof(struct ape_chdma_table) > APE_CHDMA_TABLE_SIZE); - - /* allocate and map coherently-cached memory for a descriptor table */ - /* @see LDD3 page 446 */ - ape->table_virt = (struct ape_chdma_table *)pci_alloc_consistent(dev, - APE_CHDMA_TABLE_SIZE, &ape->table_bus); - /* could not allocate table? */ - if (!ape->table_virt) { - printk(KERN_DEBUG "Could not dma_alloc()ate_coherent memory.\n"); - goto err_table; - } - - printk(KERN_DEBUG "table_virt = %p, table_bus = 0x%16llx.\n", - ape->table_virt, (u64)ape->table_bus); - - /* enable device */ - rc = pci_enable_device(dev); - if (rc) { - printk(KERN_DEBUG "pci_enable_device() failed\n"); - goto err_enable; - } - - /* enable bus master capability on device */ - pci_set_master(dev); - /* enable message signaled interrupts */ - rc = pci_enable_msi(dev); - /* could not use MSI? */ - if (rc) { - /* resort to legacy interrupts */ - printk(KERN_DEBUG "Could not enable MSI interrupting.\n"); - ape->msi_enabled = 0; - /* MSI enabled, remember for cleanup */ - } else { - printk(KERN_DEBUG "Enabled MSI interrupting.\n"); - ape->msi_enabled = 1; - } - - pci_read_config_byte(dev, PCI_REVISION_ID, &ape->revision); -#if 0 /* example */ - /* (for example) this driver does not support revision 0x42 */ - if (ape->revision == 0x42) { - printk(KERN_DEBUG "Revision 0x42 is not supported by this driver.\n"); - rc = -ENODEV; - goto err_rev; - } -#endif - /** XXX check for native or legacy PCIe endpoint? */ - - rc = pci_request_regions(dev, DRV_NAME); - /* could not request all regions? */ - if (rc) { - /* assume device is in use (and do not disable it later!) */ - ape->in_use = 1; - goto err_regions; - } - ape->got_regions = 1; - -#if 1 /* @todo For now, disable 64-bit, because I do not understand the implications (DAC!) */ - /* query for DMA transfer */ - /* @see Documentation/PCI/PCI-DMA-mapping.txt */ - if (!pci_set_dma_mask(dev, DMA_BIT_MASK(64))) { - pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(64)); - /* use 64-bit DMA */ - printk(KERN_DEBUG "Using a 64-bit DMA mask.\n"); - } else -#endif - if (!pci_set_dma_mask(dev, DMA_BIT_MASK(32))) { - printk(KERN_DEBUG "Could not set 64-bit DMA mask.\n"); - pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(32)); - /* use 32-bit DMA */ - printk(KERN_DEBUG "Using a 32-bit DMA mask.\n"); - } else { - printk(KERN_DEBUG "No suitable DMA possible.\n"); - /** @todo Choose proper error return code */ - rc = -1; - goto err_mask; - } - - rc = pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &irq_pin); - /* could not read? */ - if (rc) - goto err_irq; - printk(KERN_DEBUG "IRQ pin #%d (0=none, 1=INTA#...4=INTD#).\n", irq_pin); - - /* @see LDD3, page 318 */ - rc = pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq_line); - /* could not read? */ - if (rc) { - printk(KERN_DEBUG "Could not query PCI_INTERRUPT_LINE, error %d\n", rc); - goto err_irq; - } - printk(KERN_DEBUG "IRQ line #%d.\n", irq_line); -#if 1 - irq_line = dev->irq; - /* @see LDD3, page 259 */ - rc = request_irq(irq_line, altpciechdma_isr, IRQF_SHARED, DRV_NAME, (void *)ape); - if (rc) { - printk(KERN_DEBUG "Could not request IRQ #%d, error %d\n", irq_line, rc); - ape->irq_line = -1; - goto err_irq; - } - /* remember which irq we allocated */ - ape->irq_line = (int)irq_line; - printk(KERN_DEBUG "Successfully requested IRQ #%d with dev_id 0x%p\n", irq_line, ape); -#endif - /* show BARs */ - scan_bars(ape, dev); - /* map BARs */ - rc = map_bars(ape, dev); - if (rc) - goto err_map; -#if ALTPCIECHDMA_CDEV - /* initialize character device */ - rc = sg_init(ape); - if (rc) - goto err_cdev; -#endif - /* perform DMA engines loop back test */ - rc = dma_test(ape, dev); - (void)rc; - /* successfully took the device */ - rc = 0; - printk(KERN_DEBUG "probe() successful.\n"); - goto end; -#if ALTPCIECHDMA_CDEV -err_cdev: - /* unmap the BARs */ - unmap_bars(ape, dev); -#endif -err_map: - /* free allocated irq */ - if (ape->irq_line >= 0) - free_irq(ape->irq_line, (void *)ape); -err_irq: - if (ape->msi_enabled) - pci_disable_msi(dev); - /* disable the device iff it is not in use */ - if (!ape->in_use) - pci_disable_device(dev); - if (ape->got_regions) - pci_release_regions(dev); -err_mask: -err_regions: -/*err_rev:*/ -/* clean up everything before device enable() */ -err_enable: - if (ape->table_virt) - pci_free_consistent(dev, APE_CHDMA_TABLE_SIZE, ape->table_virt, ape->table_bus); -/* clean up everything before allocating descriptor table */ -err_table: - if (ape) - kfree(ape); -err_ape: -end: - return rc; -} - -static void __devexit remove(struct pci_dev *dev) -{ - struct ape_dev *ape = dev_get_drvdata(&dev->dev); - - printk(KERN_DEBUG "remove(0x%p)\n", dev); - printk(KERN_DEBUG "remove(dev = 0x%p) where ape = 0x%p\n", dev, ape); - - /* remove character device */ -#if ALTPCIECHDMA_CDEV - sg_exit(ape); -#endif - - if (ape->table_virt) - pci_free_consistent(dev, APE_CHDMA_TABLE_SIZE, ape->table_virt, ape->table_bus); - - /* free IRQ - * @see LDD3 page 279 - */ - if (ape->irq_line >= 0) { - printk(KERN_DEBUG "Freeing IRQ #%d for dev_id 0x%08lx.\n", - ape->irq_line, (unsigned long)ape); - free_irq(ape->irq_line, (void *)ape); - } - /* MSI was enabled? */ - if (ape->msi_enabled) { - /* Disable MSI @see Documentation/MSI-HOWTO.txt */ - pci_disable_msi(dev); - ape->msi_enabled = 0; - } - /* unmap the BARs */ - unmap_bars(ape, dev); - if (!ape->in_use) - pci_disable_device(dev); - if (ape->got_regions) - /* to be called after device disable */ - pci_release_regions(dev); -} - -#if ALTPCIECHDMA_CDEV - -/* - * Called when the device goes from unused to used. - */ -static int sg_open(struct inode *inode, struct file *file) -{ - struct ape_dev *ape; - printk(KERN_DEBUG DRV_NAME "_open()\n"); - /* pointer to containing data structure of the character device inode */ - ape = container_of(inode->i_cdev, struct ape_dev, cdev); - /* create a reference to our device state in the opened file */ - file->private_data = ape; - /* create virtual memory mapper */ - ape->sgm = sg_create_mapper(MAX_CHDMA_SIZE); - return 0; -} - -/* - * Called when the device goes from used to unused. - */ -static int sg_close(struct inode *inode, struct file *file) -{ - /* fetch device specific data stored earlier during open */ - struct ape_dev *ape = (struct ape_dev *)file->private_data; - printk(KERN_DEBUG DRV_NAME "_close()\n"); - /* destroy virtual memory mapper */ - sg_destroy_mapper(ape->sgm); - return 0; -} - -static ssize_t sg_read(struct file *file, char __user *buf, size_t count, loff_t *pos) -{ - /* fetch device specific data stored earlier during open */ - struct ape_dev *ape = (struct ape_dev *)file->private_data; - (void)ape; - printk(KERN_DEBUG DRV_NAME "_read(buf=0x%p, count=%lld, pos=%llu)\n", buf, (s64)count, (u64)*pos); - return count; -} - -/* sg_write() - Write to the device - * - * @buf userspace buffer - * @count number of bytes in the userspace buffer - * - * Iterate over the userspace buffer, taking at most 255 * PAGE_SIZE bytes for - * each DMA transfer. - * For each transfer, get the user pages, build a sglist, map, build a - * descriptor table. submit the transfer. wait for the interrupt handler - * to wake us on completion. - */ -static ssize_t sg_write(struct file *file, const char __user *buf, size_t count, loff_t *pos) -{ - int hwnents, tents; - size_t transfer_len, remaining = count, done = 0; - u64 transfer_addr = (u64)buf; - /* fetch device specific data stored earlier during open */ - struct ape_dev *ape = (struct ape_dev *)file->private_data; - printk(KERN_DEBUG DRV_NAME "_write(buf=0x%p, count=%lld, pos=%llu)\n", - buf, (s64)count, (u64)*pos); - /* TODO transfer boundaries at PAGE_SIZE granularity */ - while (remaining > 0) { - /* limit DMA transfer size */ - transfer_len = (remaining < APE_CHDMA_MAX_TRANSFER_LEN) ? remaining : - APE_CHDMA_MAX_TRANSFER_LEN; - /* get all user space buffer pages and create a scattergather list */ - sgm_map_user_pages(ape->sgm, transfer_addr, transfer_len, 0/*read from userspace*/); - printk(KERN_DEBUG DRV_NAME "mapped_pages=%d\n", ape->sgm->mapped_pages); - /* map all entries in the scattergather list */ - hwnents = pci_map_sg(ape->pci_dev, ape->sgm->sgl, ape->sgm->mapped_pages, DMA_TO_DEVICE); - printk(KERN_DEBUG DRV_NAME "hwnents=%d\n", hwnents); - /* build device descriptor tables and submit them to the DMA engine */ - tents = ape_sg_to_chdma_table(ape->sgm->sgl, hwnents, 0, &ape->table_virt->desc[0], 4096); - printk(KERN_DEBUG DRV_NAME "tents=%d\n", hwnents); -#if 0 - while (tables) { - /* TODO build table */ - /* TODO submit table to the device */ - /* if engine stopped and unfinished work then start engine */ - } - put ourselves on wait queue -#endif - - dma_unmap_sg(NULL, ape->sgm->sgl, ape->sgm->mapped_pages, DMA_TO_DEVICE); - /* dirty and free the pages */ - sgm_unmap_user_pages(ape->sgm, 1/*dirtied*/); - /* book keeping */ - transfer_addr += transfer_len; - remaining -= transfer_len; - done += transfer_len; - } - return done; -} - -/* - * character device file operations - */ -static const struct file_operations sg_fops = { - .owner = THIS_MODULE, - .open = sg_open, - .release = sg_close, - .read = sg_read, - .write = sg_write, -}; - -/* sg_init() - Initialize character device - * - * XXX Should ideally be tied to the device, on device probe, not module init. - */ -static int sg_init(struct ape_dev *ape) -{ - int rc; - printk(KERN_DEBUG DRV_NAME " sg_init()\n"); - /* allocate a dynamically allocated character device node */ - rc = alloc_chrdev_region(&ape->cdevno, 0/*requested minor*/, 1/*count*/, DRV_NAME); - /* allocation failed? */ - if (rc < 0) { - printk("alloc_chrdev_region() = %d\n", rc); - goto fail_alloc; - } - /* couple the device file operations to the character device */ - cdev_init(&ape->cdev, &sg_fops); - ape->cdev.owner = THIS_MODULE; - /* bring character device live */ - rc = cdev_add(&ape->cdev, ape->cdevno, 1/*count*/); - if (rc < 0) { - printk("cdev_add() = %d\n", rc); - goto fail_add; - } - printk(KERN_DEBUG "altpciechdma = %d:%d\n", MAJOR(ape->cdevno), MINOR(ape->cdevno)); - return 0; -fail_add: - /* free the dynamically allocated character device node */ - unregister_chrdev_region(ape->cdevno, 1/*count*/); -fail_alloc: - return -1; -} - -/* sg_exit() - Cleanup character device - * - * XXX Should ideally be tied to the device, on device remove, not module exit. - */ - -static void sg_exit(struct ape_dev *ape) -{ - printk(KERN_DEBUG DRV_NAME " sg_exit()\n"); - /* remove the character device */ - cdev_del(&ape->cdev); - /* free the dynamically allocated character device node */ - unregister_chrdev_region(ape->cdevno, 1/*count*/); -} - -#endif /* ALTPCIECHDMA_CDEV */ - -/* used to register the driver with the PCI kernel sub system - * @see LDD3 page 311 - */ -static struct pci_driver pci_driver = { - .name = DRV_NAME, - .id_table = ids, - .probe = probe, - .remove = __devexit_p(remove), - /* resume, suspend are optional */ -}; - -/** - * alterapciechdma_init() - Module initialization, registers devices. - */ -static int __init alterapciechdma_init(void) -{ - int rc = 0; - printk(KERN_DEBUG DRV_NAME " init(), built at " __DATE__ " " __TIME__ "\n"); - /* register this driver with the PCI bus driver */ - rc = pci_register_driver(&pci_driver); - if (rc < 0) - return rc; - return 0; -} - -/** - * alterapciechdma_init() - Module cleanup, unregisters devices. - */ -static void __exit alterapciechdma_exit(void) -{ - printk(KERN_DEBUG DRV_NAME " exit(), built at " __DATE__ " " __TIME__ "\n"); - /* unregister this driver from the PCI bus driver */ - pci_unregister_driver(&pci_driver); -} - -MODULE_LICENSE("GPL"); - -module_init(alterapciechdma_init); -module_exit(alterapciechdma_exit); - From 7963eb432be2ebbf7e740bcdf6b385cc68fb7627 Mon Sep 17 00:00:00 2001 From: Jarod Wilson Date: Mon, 4 Jan 2010 18:02:27 -0500 Subject: [PATCH 069/367] staging: add Broadcom Crystal HD driver This patch supersedes the earlier ones sent by Manu Abraham to add the Broadcom Crystal HD driver to the staging tree, per discussion with him about it. I've been working with Broadcom's Naren Sankar on this driver for a number of months, and had already talked Naren about submitting this on Broadcom's behalf, didn't expect anyone else to jump on submitting it as quickly as Manu did. ;) This version is a one-shot deal, incorporating the original driver, Manu's coding style clean-ups, udev device creation support from Edgar 'gimli' Hucek, and a number of other small tweaks from myself and Scott Davilla, the other individual who has been working closely on this code with Naren and I. I've tested this iteration of the code lightly on a mini pci-e board in a ThinkPad T61p running x86_64 Fedora 12, with the expected results, and will test further on other systems with other variants of the card (I have three varieties of this device currently in hand). Scott has also tested on assorted primarily i686 varieties of Ubuntu, and Naren has tested with both Fedora and Ubuntu, iirc. Note: only the 70012 is currently supported by this driver, 70015 support will follow later. Also note that Blu-Ray support isn't enabled (at the firmware level), due to misc fun related to the BD encryption scheme, DRM, etc. :\ I *do* have a git tree containing the driver, lib, gst plugin and firmware that I'm working from at the moment[*], as there are inter- dependencies between the driver and lib, and the driver can be used with kernels going a ways back (I've only tested back to 2.6.18 as it exists in Red Hat Enterprise Linux 5). I'm exporting from there, into a linux-next tree, then generating patches from there. The goal is to feed everything upstream as quickly as possible, but there are users who want this code for earlier kernels too... The firmware will be submitted for inclusion in dwmw2's linux-firmware tree once there is a suitable redistribution-no-modification type of license on it (I believe Naren is working with Broadcom legal to get that in place). Changelog from initial Broadcom release to here: commit d20475d444610c5683d09e63f707f5bb22359062 Author: Jarod Wilson Date: Mon Jan 4 13:55:16 2010 -0500 include: lib doesn't build w/o the removed stdint include So add it back... Signed-off-by: Jarod Wilson commit c181070a330530b792d2b80e3ec6ab12a5a57394 Author: Scott Davilla Date: Mon Jan 4 13:38:37 2010 -0500 include: don't define VOID if its already defined Signed-off-by: Scott Davilla Signed-off-by: Jarod Wilson commit 33d8a2b691e81212e398f53770578d79650bf0bc Author: Jarod Wilson Date: Mon Jan 4 13:12:10 2010 -0500 driver: create crystalhd device using udev Based on: http://sourceforge.net/apps/trac/archvdr/browser/trunk/archvdr/crystalhd/use_udev.patch Signed-off-by: Edgar ( gimli ) Hucek Formatting tweaks, error-handling path fixups and any bugs added by Jarod. Signed-off-by: Jarod Wilson commit c44c64dea5537814796fcbe2d9db0209383c78b9 Author: Manu Abraham Date: Mon Jan 4 10:32:47 2010 -0500 crystalhd: coding style cleanups Signed-off-by: Manu Abraham Signed-off-by: Jarod Wilson commit cffa6da7467ff697a656d1dfff54bb0513a053dc Author: Jarod Wilson Date: Mon Jan 4 10:17:27 2010 -0500 crystalhd: run dos2unix over everything, this is linux source... Signed-off-by: Jarod Wilson commit 7fa38a282db7af5a5746055f7c6cef8a9b8ee138 Author: Jarod Wilson Date: Mon Jan 4 10:02:33 2010 -0500 crystalhd: initial import of released Broadcom code Straight import of: http://www.broadcom.com/docs/support/crystalhd/crystalhd_linux_20091229.zip Unfortunately, we're unable to publicly publish all the history that got us from the initial internal code to what was released here, but such is life, we can just be happy we've got this open-sourced now. :) Signed-off-by: Jarod Wilson Signed-off-by: Naren Sankar Signed-off-by: Scott Davilla Signed-off-by: Manu Abraham Signed-off-by: Jarod Wilson Signed-off-by: Greg Kroah-Hartman --- drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/crystalhd/Kconfig | 6 + drivers/staging/crystalhd/Makefile | 6 + drivers/staging/crystalhd/TODO | 16 + drivers/staging/crystalhd/bc_dts_defs.h | 498 + drivers/staging/crystalhd/bc_dts_glob_lnx.h | 299 + drivers/staging/crystalhd/bc_dts_types.h | 115 + drivers/staging/crystalhd/bcm_70012_regs.h | 12299 ++++++++++++++++++ drivers/staging/crystalhd/crystalhd_cmds.c | 1058 ++ drivers/staging/crystalhd/crystalhd_cmds.h | 88 + drivers/staging/crystalhd/crystalhd_fw_if.h | 369 + drivers/staging/crystalhd/crystalhd_hw.c | 2395 ++++ drivers/staging/crystalhd/crystalhd_hw.h | 398 + drivers/staging/crystalhd/crystalhd_lnx.c | 780 ++ drivers/staging/crystalhd/crystalhd_lnx.h | 95 + drivers/staging/crystalhd/crystalhd_misc.c | 1029 ++ drivers/staging/crystalhd/crystalhd_misc.h | 229 + 18 files changed, 19683 insertions(+) create mode 100644 drivers/staging/crystalhd/Kconfig create mode 100644 drivers/staging/crystalhd/Makefile create mode 100644 drivers/staging/crystalhd/TODO create mode 100644 drivers/staging/crystalhd/bc_dts_defs.h create mode 100644 drivers/staging/crystalhd/bc_dts_glob_lnx.h create mode 100644 drivers/staging/crystalhd/bc_dts_types.h create mode 100644 drivers/staging/crystalhd/bcm_70012_regs.h create mode 100644 drivers/staging/crystalhd/crystalhd_cmds.c create mode 100644 drivers/staging/crystalhd/crystalhd_cmds.h create mode 100644 drivers/staging/crystalhd/crystalhd_fw_if.h create mode 100644 drivers/staging/crystalhd/crystalhd_hw.c create mode 100644 drivers/staging/crystalhd/crystalhd_hw.h create mode 100644 drivers/staging/crystalhd/crystalhd_lnx.c create mode 100644 drivers/staging/crystalhd/crystalhd_lnx.h create mode 100644 drivers/staging/crystalhd/crystalhd_misc.c create mode 100644 drivers/staging/crystalhd/crystalhd_misc.h diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig index 9543174360bf..4a2afe7d0078 100644 --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig @@ -139,5 +139,7 @@ source "drivers/staging/sm7xx/Kconfig" source "drivers/staging/dt3155/Kconfig" +source "drivers/staging/crystalhd/Kconfig" + endif # !STAGING_EXCLUDE_BUILD endif # STAGING diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile index 394327a1f789..dc404936a862 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile @@ -51,3 +51,4 @@ obj-$(CONFIG_PCMCIA_WAVELAN) += wavelan/ obj-$(CONFIG_PCMCIA_NETWAVE) += netwave/ obj-$(CONFIG_FB_SM7XX) += sm7xx/ obj-$(CONFIG_DT3155) += dt3155/ +obj-$(CONFIG_CRYSTALHD) += crystalhd/ diff --git a/drivers/staging/crystalhd/Kconfig b/drivers/staging/crystalhd/Kconfig new file mode 100644 index 000000000000..56b414bca1a1 --- /dev/null +++ b/drivers/staging/crystalhd/Kconfig @@ -0,0 +1,6 @@ +config CRYSTALHD + tristate "Broadcom Crystal HD video decoder support" + depends on PCI + default n + help + Support for the Broadcom Crystal HD video decoder chipset diff --git a/drivers/staging/crystalhd/Makefile b/drivers/staging/crystalhd/Makefile new file mode 100644 index 000000000000..e2af0ce2e792 --- /dev/null +++ b/drivers/staging/crystalhd/Makefile @@ -0,0 +1,6 @@ +obj-$(CONFIG_CRYSTALHD) += crystalhd.o + +crystalhd-objs := crystalhd_cmds.o \ + crystalhd_hw.o \ + crystalhd_lnx.o \ + crystalhd_misc.o diff --git a/drivers/staging/crystalhd/TODO b/drivers/staging/crystalhd/TODO new file mode 100644 index 000000000000..69be5d0cb80c --- /dev/null +++ b/drivers/staging/crystalhd/TODO @@ -0,0 +1,16 @@ +- Testing +- Cleanup return codes +- Cleanup typedefs +- Cleanup all WIN* references +- Allocate an Accelerator device class specific Major number, + since we don't have any other open sourced accelerators, it is the only + one in that category for now. + A somewhat similar device is the DXR2/3 + +Please send patches to: +Greg Kroah-Hartman +Naren Sankar +Jarod Wilson +Scott Davilla +Manu Abraham + diff --git a/drivers/staging/crystalhd/bc_dts_defs.h b/drivers/staging/crystalhd/bc_dts_defs.h new file mode 100644 index 000000000000..c34cc07127b8 --- /dev/null +++ b/drivers/staging/crystalhd/bc_dts_defs.h @@ -0,0 +1,498 @@ +/******************************************************************** + * Copyright(c) 2006-2009 Broadcom Corporation. + * + * Name: bc_dts_defs.h + * + * Description: Common definitions for all components. Only types + * is allowed to be included from this file. + * + * AU + * + * HISTORY: + * + ******************************************************************** + * This header is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 2.1 of the License. + * + * This header is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * You should have received a copy of the GNU Lesser General Public License + * along with this header. If not, see . + *******************************************************************/ + +#ifndef _BC_DTS_DEFS_H_ +#define _BC_DTS_DEFS_H_ + +#include "bc_dts_types.h" + +/* BIT Mask */ +#define BC_BIT(_x) (1 << (_x)) + +typedef enum _BC_STATUS { + BC_STS_SUCCESS = 0, + BC_STS_INV_ARG = 1, + BC_STS_BUSY = 2, + BC_STS_NOT_IMPL = 3, + BC_STS_PGM_QUIT = 4, + BC_STS_NO_ACCESS = 5, + BC_STS_INSUFF_RES = 6, + BC_STS_IO_ERROR = 7, + BC_STS_NO_DATA = 8, + BC_STS_VER_MISMATCH = 9, + BC_STS_TIMEOUT = 10, + BC_STS_FW_CMD_ERR = 11, + BC_STS_DEC_NOT_OPEN = 12, + BC_STS_ERR_USAGE = 13, + BC_STS_IO_USER_ABORT = 14, + BC_STS_IO_XFR_ERROR = 15, + BC_STS_DEC_NOT_STARTED = 16, + BC_STS_FWHEX_NOT_FOUND = 17, + BC_STS_FMT_CHANGE = 18, + BC_STS_HIF_ACCESS = 19, + BC_STS_CMD_CANCELLED = 20, + BC_STS_FW_AUTH_FAILED = 21, + BC_STS_BOOTLOADER_FAILED = 22, + BC_STS_CERT_VERIFY_ERROR = 23, + BC_STS_DEC_EXIST_OPEN = 24, + BC_STS_PENDING = 25, + BC_STS_CLK_NOCHG = 26, + + /* Must be the last one.*/ + BC_STS_ERROR = -1 +} BC_STATUS; + +/*------------------------------------------------------* + * Registry Key Definitions * + *------------------------------------------------------*/ +#define BC_REG_KEY_MAIN_PATH "Software\\Broadcom\\MediaPC\\70010" +#define BC_REG_KEY_FWPATH "FirmwareFilePath" +#define BC_REG_KEY_SEC_OPT "DbgOptions" + +/* + * Options: + * + * b[5] = Enable RSA KEY in EEPROM Support + * b[6] = Enable Old PIB scheme. (0 = Use PIB with video scheme) + * + * b[12] = Enable send message to NotifyIcon + * + */ + +typedef enum _BC_SW_OPTIONS { + BC_OPT_DOSER_OUT_ENCRYPT = BC_BIT(3), + BC_OPT_LINK_OUT_ENCRYPT = BC_BIT(29), +} BC_SW_OPTIONS; + +typedef struct _BC_REG_CONFIG{ + uint32_t DbgOptions; +} BC_REG_CONFIG; + +#if defined(__KERNEL__) || defined(__LINUX_USER__) +#else +/* Align data structures */ +#define ALIGN(x) __declspec(align(x)) +#endif + +/* mode + * b[0]..b[7] = _DtsDeviceOpenMode + * b[8] = Load new FW + * b[9] = Load file play back FW + * b[10] = Disk format (0 for HD DVD and 1 for BLU ray) + * b[11]-b[15] = default output resolution + * b[16] = Skip TX CPB Buffer Check + * b[17] = Adaptive Output Encrypt/Scramble Scheme + * b[18]-b[31] = reserved for future use + */ + +/* To allow multiple apps to open the device. */ +enum _DtsDeviceOpenMode { + DTS_PLAYBACK_MODE = 0, + DTS_DIAG_MODE, + DTS_MONITOR_MODE, + DTS_HWINIT_MODE +}; + +/* To enable the filter to selectively enable/disable fixes or erratas */ +enum _DtsDeviceFixMode { + DTS_LOAD_NEW_FW = BC_BIT(8), + DTS_LOAD_FILE_PLAY_FW = BC_BIT(9), + DTS_DISK_FMT_BD = BC_BIT(10), + /* b[11]-b[15] : Default output resolution */ + DTS_SKIP_TX_CHK_CPB = BC_BIT(16), + DTS_ADAPTIVE_OUTPUT_PER = BC_BIT(17), + DTS_INTELLIMAP = BC_BIT(18), + /* b[19]-b[21] : select clock frequency */ + DTS_PLAYBACK_DROP_RPT_MODE = BC_BIT(22) +}; + +#define DTS_DFLT_RESOLUTION(x) (x<<11) + +#define DTS_DFLT_CLOCK(x) (x<<19) + +/* F/W File Version corresponding to S/W Releases */ +enum _FW_FILE_VER { + /* S/W release: 02.04.02 F/W release 2.12.2.0 */ + BC_FW_VER_020402 = ((12<<16) | (2<<8) | (0)) +}; + +/*------------------------------------------------------* + * Stream Types for DtsOpenDecoder() * + *------------------------------------------------------*/ +enum _DtsOpenDecStreamTypes { + BC_STREAM_TYPE_ES = 0, + BC_STREAM_TYPE_PES = 1, + BC_STREAM_TYPE_TS = 2, + BC_STREAM_TYPE_ES_TSTAMP = 6, +}; + +/*------------------------------------------------------* + * Video Algorithms for DtsSetVideoParams() * + *------------------------------------------------------*/ +enum _DtsSetVideoParamsAlgo { + BC_VID_ALGO_H264 = 0, + BC_VID_ALGO_MPEG2 = 1, + BC_VID_ALGO_VC1 = 4, + BC_VID_ALGO_VC1MP = 7, +}; + +/*------------------------------------------------------* + * MPEG Extension to the PPB * + *------------------------------------------------------*/ +#define BC_MPEG_VALID_PANSCAN (1) + +typedef struct _BC_PIB_EXT_MPEG { + uint32_t valid; + /* Always valid, defaults to picture size if no + * sequence display extension in the stream. */ + uint32_t display_horizontal_size; + uint32_t display_vertical_size; + + /* MPEG_VALID_PANSCAN + * Offsets are a copy values from the MPEG stream. */ + uint32_t offset_count; + int32_t horizontal_offset[3]; + int32_t vertical_offset[3]; + +} BC_PIB_EXT_MPEG; + +/*------------------------------------------------------* + * H.264 Extension to the PPB * + *------------------------------------------------------*/ +/* Bit definitions for 'other.h264.valid' field */ +#define H264_VALID_PANSCAN (1) +#define H264_VALID_SPS_CROP (2) +#define H264_VALID_VUI (4) + +typedef struct _BC_PIB_EXT_H264 { + /* 'valid' specifies which fields (or sets of + * fields) below are valid. If the corresponding + * bit in 'valid' is NOT set then that field(s) + * is (are) not initialized. */ + uint32_t valid; + + /* H264_VALID_PANSCAN */ + uint32_t pan_scan_count; + int32_t pan_scan_left[3]; + int32_t pan_scan_right[3]; + int32_t pan_scan_top[3]; + int32_t pan_scan_bottom[3]; + + /* H264_VALID_SPS_CROP */ + int32_t sps_crop_left; + int32_t sps_crop_right; + int32_t sps_crop_top; + int32_t sps_crop_bottom; + + /* H264_VALID_VUI */ + uint32_t chroma_top; + uint32_t chroma_bottom; + +} BC_PIB_EXT_H264; + +/*------------------------------------------------------* + * VC1 Extension to the PPB * + *------------------------------------------------------*/ +#define VC1_VALID_PANSCAN (1) + +typedef struct _BC_PIB_EXT_VC1 { + uint32_t valid; + + /* Always valid, defaults to picture size if no + * sequence display extension in the stream. */ + uint32_t display_horizontal_size; + uint32_t display_vertical_size; + + /* VC1 pan scan windows */ + uint32_t num_panscan_windows; + int32_t ps_horiz_offset[4]; + int32_t ps_vert_offset[4]; + int32_t ps_width[4]; + int32_t ps_height[4]; + +} BC_PIB_EXT_VC1; + + +/*------------------------------------------------------* + * Picture Information Block * + *------------------------------------------------------*/ +#if defined(_WIN32) || defined(_WIN64) || defined(__LINUX_USER__) +/* Values for 'pulldown' field. '0' means no pulldown information + * was present for this picture. */ +enum { + vdecNoPulldownInfo = 0, + vdecTop = 1, + vdecBottom = 2, + vdecTopBottom = 3, + vdecBottomTop = 4, + vdecTopBottomTop = 5, + vdecBottomTopBottom = 6, + vdecFrame_X2 = 7, + vdecFrame_X3 = 8, + vdecFrame_X1 = 9, + vdecFrame_X4 = 10, +}; + +/* Values for the 'frame_rate' field. */ +enum { + vdecFrameRateUnknown = 0, + vdecFrameRate23_97, + vdecFrameRate24, + vdecFrameRate25, + vdecFrameRate29_97, + vdecFrameRate30, + vdecFrameRate50, + vdecFrameRate59_94, + vdecFrameRate60, +}; + +/* Values for the 'aspect_ratio' field. */ +enum { + vdecAspectRatioUnknown = 0, + vdecAspectRatioSquare, + vdecAspectRatio12_11, + vdecAspectRatio10_11, + vdecAspectRatio16_11, + vdecAspectRatio40_33, + vdecAspectRatio24_11, + vdecAspectRatio20_11, + vdecAspectRatio32_11, + vdecAspectRatio80_33, + vdecAspectRatio18_11, + vdecAspectRatio15_11, + vdecAspectRatio64_33, + vdecAspectRatio160_99, + vdecAspectRatio4_3, + vdecAspectRatio16_9, + vdecAspectRatio221_1, + vdecAspectRatioOther = 255, +}; + +/* Values for the 'colour_primaries' field. */ +enum { + vdecColourPrimariesUnknown = 0, + vdecColourPrimariesBT709, + vdecColourPrimariesUnspecified, + vdecColourPrimariesReserved, + vdecColourPrimariesBT470_2M = 4, + vdecColourPrimariesBT470_2BG, + vdecColourPrimariesSMPTE170M, + vdecColourPrimariesSMPTE240M, + vdecColourPrimariesGenericFilm, +}; + +enum { + vdecRESOLUTION_CUSTOM = 0x00000000, /* custom */ + vdecRESOLUTION_480i = 0x00000001, /* 480i */ + vdecRESOLUTION_1080i = 0x00000002, /* 1080i (1920x1080, 60i) */ + vdecRESOLUTION_NTSC = 0x00000003, /* NTSC (720x483, 60i) */ + vdecRESOLUTION_480p = 0x00000004, /* 480p (720x480, 60p) */ + vdecRESOLUTION_720p = 0x00000005, /* 720p (1280x720, 60p) */ + vdecRESOLUTION_PAL1 = 0x00000006, /* PAL_1 (720x576, 50i) */ + vdecRESOLUTION_1080i25 = 0x00000007, /* 1080i25 (1920x1080, 50i) */ + vdecRESOLUTION_720p50 = 0x00000008, /* 720p50 (1280x720, 50p) */ + vdecRESOLUTION_576p = 0x00000009, /* 576p (720x576, 50p) */ + vdecRESOLUTION_1080i29_97 = 0x0000000A, /* 1080i (1920x1080, 59.94i) */ + vdecRESOLUTION_720p59_94 = 0x0000000B, /* 720p (1280x720, 59.94p) */ + vdecRESOLUTION_SD_DVD = 0x0000000C, /* SD DVD (720x483, 60i) */ + vdecRESOLUTION_480p656 = 0x0000000D, /* 480p (720x480, 60p), output bus width 8 bit, clock 74.25MHz */ + vdecRESOLUTION_1080p23_976 = 0x0000000E, /* 1080p23_976 (1920x1080, 23.976p) */ + vdecRESOLUTION_720p23_976 = 0x0000000F, /* 720p23_976 (1280x720p, 23.976p) */ + vdecRESOLUTION_240p29_97 = 0x00000010, /* 240p (1440x240, 29.97p ) */ + vdecRESOLUTION_240p30 = 0x00000011, /* 240p (1440x240, 30p) */ + vdecRESOLUTION_288p25 = 0x00000012, /* 288p (1440x288p, 25p) */ + vdecRESOLUTION_1080p29_97 = 0x00000013, /* 1080p29_97 (1920x1080, 29.97p) */ + vdecRESOLUTION_1080p30 = 0x00000014, /* 1080p30 (1920x1080, 30p) */ + vdecRESOLUTION_1080p24 = 0x00000015, /* 1080p24 (1920x1080, 24p) */ + vdecRESOLUTION_1080p25 = 0x00000016, /* 1080p25 (1920x1080, 25p) */ + vdecRESOLUTION_720p24 = 0x00000017, /* 720p24 (1280x720, 25p) */ + vdecRESOLUTION_720p29_97 = 0x00000018, /* 720p29.97 (1280x720, 29.97p) */ + vdecRESOLUTION_480p23_976 = 0x00000019, /* 480p23.976 (720*480, 23.976) */ + vdecRESOLUTION_480p29_97 = 0x0000001A, /* 480p29.976 (720*480, 29.97p) */ + vdecRESOLUTION_576p25 = 0x0000001B, /* 576p25 (720*576, 25p) */ + /* For Zero Frame Rate */ + vdecRESOLUTION_480p0 = 0x0000001C, /* 480p (720x480, 0p) */ + vdecRESOLUTION_480i0 = 0x0000001D, /* 480i (720x480, 0i) */ + vdecRESOLUTION_576p0 = 0x0000001E, /* 576p (720x576, 0p) */ + vdecRESOLUTION_720p0 = 0x0000001F, /* 720p (1280x720, 0p) */ + vdecRESOLUTION_1080p0 = 0x00000020, /* 1080p (1920x1080, 0p) */ + vdecRESOLUTION_1080i0 = 0x00000021, /* 1080i (1920x1080, 0i) */ +}; + +/* Bit definitions for 'flags' field */ +#define VDEC_FLAG_EOS (0x0004) + +#define VDEC_FLAG_FRAME (0x0000) +#define VDEC_FLAG_FIELDPAIR (0x0008) +#define VDEC_FLAG_TOPFIELD (0x0010) +#define VDEC_FLAG_BOTTOMFIELD (0x0018) + +#define VDEC_FLAG_PROGRESSIVE_SRC (0x0000) +#define VDEC_FLAG_INTERLACED_SRC (0x0020) +#define VDEC_FLAG_UNKNOWN_SRC (0x0040) + +#define VDEC_FLAG_BOTTOM_FIRST (0x0080) +#define VDEC_FLAG_LAST_PICTURE (0x0100) + +#define VDEC_FLAG_PICTURE_META_DATA_PRESENT (0x40000) + +#endif /* _WIN32 || _WIN64 */ + +enum _BC_OUTPUT_FORMAT { + MODE420 = 0x0, + MODE422_YUY2 = 0x1, + MODE422_UYVY = 0x2, +}; + +typedef struct _BC_PIC_INFO_BLOCK { + /* Common fields. */ + uint64_t timeStamp; /* Timestamp */ + uint32_t picture_number; /* Ordinal display number */ + uint32_t width; /* pixels */ + uint32_t height; /* pixels */ + uint32_t chroma_format; /* 0x420, 0x422 or 0x444 */ + uint32_t pulldown; + uint32_t flags; + uint32_t frame_rate; + uint32_t aspect_ratio; + uint32_t colour_primaries; + uint32_t picture_meta_payload; + uint32_t sess_num; + uint32_t ycom; + uint32_t custom_aspect_ratio_width_height; + uint32_t n_drop; /* number of non-reference frames remaining to be dropped */ + + /* Protocol-specific extensions. */ + union { + BC_PIB_EXT_H264 h264; + BC_PIB_EXT_MPEG mpeg; + BC_PIB_EXT_VC1 vc1; + } other; + +} BC_PIC_INFO_BLOCK, *PBC_PIC_INFO_BLOCK; + +/*------------------------------------------------------* + * ProcOut Info * + *------------------------------------------------------*/ +/* Optional flags for ProcOut Interface.*/ +enum _POUT_OPTIONAL_IN_FLAGS_{ + /* Flags from App to Device */ + BC_POUT_FLAGS_YV12 = 0x01, /* Copy Data in YV12 format */ + BC_POUT_FLAGS_STRIDE = 0x02, /* Stride size is valid. */ + BC_POUT_FLAGS_SIZE = 0x04, /* Take size information from Application */ + BC_POUT_FLAGS_INTERLACED = 0x08, /* copy only half the bytes */ + BC_POUT_FLAGS_INTERLEAVED = 0x10, /* interleaved frame */ + + /* Flags from Device to APP */ + BC_POUT_FLAGS_FMT_CHANGE = 0x10000, /* Data is not VALID when this flag is set */ + BC_POUT_FLAGS_PIB_VALID = 0x20000, /* PIB Information valid */ + BC_POUT_FLAGS_ENCRYPTED = 0x40000, /* Data is encrypted. */ + BC_POUT_FLAGS_FLD_BOT = 0x80000, /* Bottom Field data */ +}; + +#if defined(__KERNEL__) || defined(__LINUX_USER__) +typedef BC_STATUS(*dts_pout_callback)(void *shnd, uint32_t width, uint32_t height, uint32_t stride, void *pOut); +#else +typedef BC_STATUS(*dts_pout_callback)(void *shnd, uint32_t width, uint32_t height, uint32_t stride, struct _BC_DTS_PROC_OUT *pOut); +#endif + +/* Line 21 Closed Caption */ +/* User Data */ +#define MAX_UD_SIZE 1792 /* 1920 - 128 */ + +typedef struct _BC_DTS_PROC_OUT { + uint8_t *Ybuff; /* Caller Supplied buffer for Y data */ + uint32_t YbuffSz; /* Caller Supplied Y buffer size */ + uint32_t YBuffDoneSz; /* Transferred Y datasize */ + + uint8_t *UVbuff; /* Caller Supplied buffer for UV data */ + uint32_t UVbuffSz; /* Caller Supplied UV buffer size */ + uint32_t UVBuffDoneSz; /* Transferred UV data size */ + + uint32_t StrideSz; /* Caller supplied Stride Size */ + uint32_t PoutFlags; /* Call IN Flags */ + + uint32_t discCnt; /* Picture discontinuity count */ + + BC_PIC_INFO_BLOCK PicInfo; /* Picture Information Block Data */ + + /* Line 21 Closed Caption */ + /* User Data */ + uint32_t UserDataSz; + uint8_t UserData[MAX_UD_SIZE]; + + void *hnd; + dts_pout_callback AppCallBack; + uint8_t DropFrames; + uint8_t b422Mode; /* Picture output Mode */ + uint8_t bPibEnc; /* PIB encrypted */ + uint8_t bRevertScramble; + +} BC_DTS_PROC_OUT; + +typedef struct _BC_DTS_STATUS { + uint8_t ReadyListCount; /* Number of frames in ready list (reported by driver) */ + uint8_t FreeListCount; /* Number of frame buffers free. (reported by driver) */ + uint8_t PowerStateChange; /* Number of active state power transitions (reported by driver) */ + uint8_t reserved_[1]; + + uint32_t FramesDropped; /* Number of frames dropped. (reported by DIL) */ + uint32_t FramesCaptured; /* Number of frames captured. (reported by DIL) */ + uint32_t FramesRepeated; /* Number of frames repeated. (reported by DIL) */ + + uint32_t InputCount; /* Times compressed video has been sent to the HW. + * i.e. Successful DtsProcInput() calls (reported by DIL) */ + uint64_t InputTotalSize; /* Amount of compressed video that has been sent to the HW. + * (reported by DIL) */ + uint32_t InputBusyCount; /* Times compressed video has attempted to be sent to the HW + * but the input FIFO was full. (reported by DIL) */ + + uint32_t PIBMissCount; /* Amount of times a PIB is invalid. (reported by DIL) */ + + uint32_t cpbEmptySize; /* supported only for H.264, specifically changed for + * Adobe. Report size of CPB buffer available. + * Reported by DIL */ + uint64_t NextTimeStamp; /* TimeStamp of the next picture that will be returned + * by a call to ProcOutput. Added for Adobe. Reported + * back from the driver */ + uint8_t reserved__[16]; + +} BC_DTS_STATUS; + +#define BC_SWAP32(_v) \ + ((((_v) & 0xFF000000)>>24)| \ + (((_v) & 0x00FF0000)>>8)| \ + (((_v) & 0x0000FF00)<<8)| \ + (((_v) & 0x000000FF)<<24)) + +#define WM_AGENT_TRAYICON_DECODER_OPEN 10001 +#define WM_AGENT_TRAYICON_DECODER_CLOSE 10002 +#define WM_AGENT_TRAYICON_DECODER_START 10003 +#define WM_AGENT_TRAYICON_DECODER_STOP 10004 +#define WM_AGENT_TRAYICON_DECODER_RUN 10005 +#define WM_AGENT_TRAYICON_DECODER_PAUSE 10006 + + +#endif /* _BC_DTS_DEFS_H_ */ diff --git a/drivers/staging/crystalhd/bc_dts_glob_lnx.h b/drivers/staging/crystalhd/bc_dts_glob_lnx.h new file mode 100644 index 000000000000..b3125e3e0372 --- /dev/null +++ b/drivers/staging/crystalhd/bc_dts_glob_lnx.h @@ -0,0 +1,299 @@ +/******************************************************************** + * Copyright(c) 2006-2009 Broadcom Corporation. + * + * Name: bc_dts_glob_lnx.h + * + * Description: Wrapper to Windows dts_glob.h for Link-Linux usage. + * The idea is to define additional Linux related defs + * in this file to avoid changes to existing Windows + * glob file. + * + * AU + * + * HISTORY: + * + ******************************************************************** + * This header is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 2.1 of the License. + * + * This header is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * You should have received a copy of the GNU Lesser General Public License + * along with this header. If not, see . + *******************************************************************/ + +#ifndef _BC_DTS_GLOB_LNX_H_ +#define _BC_DTS_GLOB_LNX_H_ + +#ifdef __LINUX_USER__ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define DRVIFLIB_INT_API + +#endif + +#include "bc_dts_defs.h" +#include "bcm_70012_regs.h" /* Link Register defs */ + +#define CRYSTALHD_API_NAME "crystalhd" +#define CRYSTALHD_API_DEV_NAME "/dev/crystalhd" + +/* + * These are SW stack tunable parameters shared + * between the driver and the application. + */ +enum _BC_DTS_GLOBALS { + BC_MAX_FW_CMD_BUFF_SZ = 0x40, /* FW passthrough cmd/rsp buffer size */ + PCI_CFG_SIZE = 256, /* PCI config size buffer */ + BC_IOCTL_DATA_POOL_SIZE = 8, /* BC_IOCTL_DATA Pool size */ + BC_LINK_MAX_OPENS = 3, /* Maximum simultaneous opens*/ + BC_LINK_MAX_SGLS = 1024, /* Maximum SG elements 4M/4K */ + BC_TX_LIST_CNT = 2, /* Max Tx DMA Rings */ + BC_RX_LIST_CNT = 8, /* Max Rx DMA Rings*/ + BC_PROC_OUTPUT_TIMEOUT = 3000, /* Milliseconds */ + BC_INFIFO_THRESHOLD = 0x10000, +}; + +typedef struct _BC_CMD_REG_ACC { + uint32_t Offset; + uint32_t Value; +} BC_CMD_REG_ACC; + +typedef struct _BC_CMD_DEV_MEM { + uint32_t StartOff; + uint32_t NumDwords; + uint32_t Rsrd; +} BC_CMD_DEV_MEM; + +/* FW Passthrough command structure */ +enum _bc_fw_cmd_flags { + BC_FW_CMD_FLAGS_NONE = 0, + BC_FW_CMD_PIB_QS = 0x01, +}; + +typedef struct _BC_FW_CMD { + uint32_t cmd[BC_MAX_FW_CMD_BUFF_SZ]; + uint32_t rsp[BC_MAX_FW_CMD_BUFF_SZ]; + uint32_t flags; + uint32_t add_data; +} BC_FW_CMD, *PBC_FW_CMD; + +typedef struct _BC_HW_TYPE { + uint16_t PciDevId; + uint16_t PciVenId; + uint8_t HwRev; + uint8_t Align[3]; +} BC_HW_TYPE; + +typedef struct _BC_PCI_CFG { + uint32_t Size; + uint32_t Offset; + uint8_t pci_cfg_space[PCI_CFG_SIZE]; +} BC_PCI_CFG; + +typedef struct _BC_VERSION_INFO_ { + uint8_t DriverMajor; + uint8_t DriverMinor; + uint16_t DriverRevision; +} BC_VERSION_INFO; + +typedef struct _BC_START_RX_CAP_ { + uint32_t Rsrd; + uint32_t StartDeliveryThsh; + uint32_t PauseThsh; + uint32_t ResumeThsh; +} BC_START_RX_CAP; + +typedef struct _BC_FLUSH_RX_CAP_ { + uint32_t Rsrd; + uint32_t bDiscardOnly; +} BC_FLUSH_RX_CAP; + +typedef struct _BC_DTS_STATS { + uint8_t drvRLL; + uint8_t drvFLL; + uint8_t eosDetected; + uint8_t pwr_state_change; + + /* Stats from App */ + uint32_t opFrameDropped; + uint32_t opFrameCaptured; + uint32_t ipSampleCnt; + uint64_t ipTotalSize; + uint32_t reptdFrames; + uint32_t pauseCount; + uint32_t pibMisses; + uint32_t discCounter; + + /* Stats from Driver */ + uint32_t TxFifoBsyCnt; + uint32_t intCount; + uint32_t DrvIgnIntrCnt; + uint32_t DrvTotalFrmDropped; + uint32_t DrvTotalHWErrs; + uint32_t DrvTotalPIBFlushCnt; + uint32_t DrvTotalFrmCaptured; + uint32_t DrvPIBMisses; + uint32_t DrvPauseTime; + uint32_t DrvRepeatedFrms; + uint32_t res1[13]; + +} BC_DTS_STATS; + +typedef struct _BC_PROC_INPUT_ { + uint8_t *pDmaBuff; + uint32_t BuffSz; + uint8_t Mapped; + uint8_t Encrypted; + uint8_t Rsrd[2]; + uint32_t DramOffset; /* For debug use only */ +} BC_PROC_INPUT, *PBC_PROC_INPUT; + +typedef struct _BC_DEC_YUV_BUFFS { + uint32_t b422Mode; + uint8_t *YuvBuff; + uint32_t YuvBuffSz; + uint32_t UVbuffOffset; + uint32_t YBuffDoneSz; + uint32_t UVBuffDoneSz; + uint32_t RefCnt; +} BC_DEC_YUV_BUFFS; + +enum _DECOUT_COMPLETION_FLAGS{ + COMP_FLAG_NO_INFO = 0x00, + COMP_FLAG_FMT_CHANGE = 0x01, + COMP_FLAG_PIB_VALID = 0x02, + COMP_FLAG_DATA_VALID = 0x04, + COMP_FLAG_DATA_ENC = 0x08, + COMP_FLAG_DATA_BOT = 0x10, +}; + +typedef struct _BC_DEC_OUT_BUFF{ + BC_DEC_YUV_BUFFS OutPutBuffs; + BC_PIC_INFO_BLOCK PibInfo; + uint32_t Flags; + uint32_t BadFrCnt; +} BC_DEC_OUT_BUFF; + +typedef struct _BC_NOTIFY_MODE { + uint32_t Mode; + uint32_t Rsvr[3]; +} BC_NOTIFY_MODE; + +typedef struct _BC_CLOCK { + uint32_t clk; + uint32_t Rsvr[3]; +} BC_CLOCK; + +typedef struct _BC_IOCTL_DATA { + BC_STATUS RetSts; + uint32_t IoctlDataSz; + uint32_t Timeout; + union { + BC_CMD_REG_ACC regAcc; + BC_CMD_DEV_MEM devMem; + BC_FW_CMD fwCmd; + BC_HW_TYPE hwType; + BC_PCI_CFG pciCfg; + BC_VERSION_INFO VerInfo; + BC_PROC_INPUT ProcInput; + BC_DEC_YUV_BUFFS RxBuffs; + BC_DEC_OUT_BUFF DecOutData; + BC_START_RX_CAP RxCap; + BC_FLUSH_RX_CAP FlushRxCap; + BC_DTS_STATS drvStat; + BC_NOTIFY_MODE NotifyMode; + BC_CLOCK clockValue; + } u; + struct _BC_IOCTL_DATA *next; +} BC_IOCTL_DATA; + +typedef enum _BC_DRV_CMD{ + DRV_CMD_VERSION = 0, /* Get SW version */ + DRV_CMD_GET_HWTYPE, /* Get HW version and type Dozer/Tank */ + DRV_CMD_REG_RD, /* Read Device Register */ + DRV_CMD_REG_WR, /* Write Device Register */ + DRV_CMD_FPGA_RD, /* Read FPGA Register */ + DRV_CMD_FPGA_WR, /* Wrtie FPGA Reister */ + DRV_CMD_MEM_RD, /* Read Device Memory */ + DRV_CMD_MEM_WR, /* Write Device Memory */ + DRV_CMD_RD_PCI_CFG, /* Read PCI Config Space */ + DRV_CMD_WR_PCI_CFG, /* Write the PCI Configuration Space*/ + DRV_CMD_FW_DOWNLOAD, /* Download Firmware */ + DRV_ISSUE_FW_CMD, /* Issue FW Cmd (pass through mode) */ + DRV_CMD_PROC_INPUT, /* Process Input Sample */ + DRV_CMD_ADD_RXBUFFS, /* Add Rx side buffers to driver pool */ + DRV_CMD_FETCH_RXBUFF, /* Get Rx DMAed buffer */ + DRV_CMD_START_RX_CAP, /* Start Rx Buffer Capture */ + DRV_CMD_FLUSH_RX_CAP, /* Stop the capture for now...we will enhance this later*/ + DRV_CMD_GET_DRV_STAT, /* Get Driver Internal Statistics */ + DRV_CMD_RST_DRV_STAT, /* Reset Driver Internal Statistics */ + DRV_CMD_NOTIFY_MODE, /* Notify the Mode to driver in which the application is Operating*/ + DRV_CMD_CHANGE_CLOCK, /* Change the core clock to either save power or improve performance */ + + /* MUST be the last one.. */ + DRV_CMD_END, /* End of the List.. */ +} BC_DRV_CMD; + +#define BC_IOC_BASE 'b' +#define BC_IOC_VOID _IOC_NONE +#define BC_IOC_IOWR(nr, type) _IOWR(BC_IOC_BASE, nr, type) +#define BC_IOCTL_MB BC_IOCTL_DATA + +#define BCM_IOC_GET_VERSION BC_IOC_IOWR(DRV_CMD_VERSION, BC_IOCTL_MB) +#define BCM_IOC_GET_HWTYPE BC_IOC_IOWR(DRV_CMD_GET_HWTYPE, BC_IOCTL_MB) +#define BCM_IOC_REG_RD BC_IOC_IOWR(DRV_CMD_REG_RD, BC_IOCTL_MB) +#define BCM_IOC_REG_WR BC_IOC_IOWR(DRV_CMD_REG_WR, BC_IOCTL_MB) +#define BCM_IOC_MEM_RD BC_IOC_IOWR(DRV_CMD_MEM_RD, BC_IOCTL_MB) +#define BCM_IOC_MEM_WR BC_IOC_IOWR(DRV_CMD_MEM_WR, BC_IOCTL_MB) +#define BCM_IOC_FPGA_RD BC_IOC_IOWR(DRV_CMD_FPGA_RD, BC_IOCTL_MB) +#define BCM_IOC_FPGA_WR BC_IOC_IOWR(DRV_CMD_FPGA_WR, BC_IOCTL_MB) +#define BCM_IOC_RD_PCI_CFG BC_IOC_IOWR(DRV_CMD_RD_PCI_CFG, BC_IOCTL_MB) +#define BCM_IOC_WR_PCI_CFG BC_IOC_IOWR(DRV_CMD_WR_PCI_CFG, BC_IOCTL_MB) +#define BCM_IOC_PROC_INPUT BC_IOC_IOWR(DRV_CMD_PROC_INPUT, BC_IOCTL_MB) +#define BCM_IOC_ADD_RXBUFFS BC_IOC_IOWR(DRV_CMD_ADD_RXBUFFS, BC_IOCTL_MB) +#define BCM_IOC_FETCH_RXBUFF BC_IOC_IOWR(DRV_CMD_FETCH_RXBUFF, BC_IOCTL_MB) +#define BCM_IOC_FW_CMD BC_IOC_IOWR(DRV_ISSUE_FW_CMD, BC_IOCTL_MB) +#define BCM_IOC_START_RX_CAP BC_IOC_IOWR(DRV_CMD_START_RX_CAP, BC_IOCTL_MB) +#define BCM_IOC_FLUSH_RX_CAP BC_IOC_IOWR(DRV_CMD_FLUSH_RX_CAP, BC_IOCTL_MB) +#define BCM_IOC_GET_DRV_STAT BC_IOC_IOWR(DRV_CMD_GET_DRV_STAT, BC_IOCTL_MB) +#define BCM_IOC_RST_DRV_STAT BC_IOC_IOWR(DRV_CMD_RST_DRV_STAT, BC_IOCTL_MB) +#define BCM_IOC_NOTIFY_MODE BC_IOC_IOWR(DRV_CMD_NOTIFY_MODE, BC_IOCTL_MB) +#define BCM_IOC_FW_DOWNLOAD BC_IOC_IOWR(DRV_CMD_FW_DOWNLOAD, BC_IOCTL_MB) +#define BCM_IOC_CHG_CLK BC_IOC_IOWR(DRV_CMD_CHANGE_CLOCK, BC_IOCTL_MB) +#define BCM_IOC_END BC_IOC_VOID + +/* Wrapper for main IOCTL data */ +typedef struct _crystalhd_ioctl_data { + BC_IOCTL_DATA udata; /* IOCTL from App..*/ + uint32_t u_id; /* Driver specific user ID */ + uint32_t cmd; /* Cmd ID for driver's use. */ + void *add_cdata; /* Additional command specific data..*/ + uint32_t add_cdata_sz; /* Additional command specific data size */ + struct _crystalhd_ioctl_data *next; /* List/Fifo management */ +} crystalhd_ioctl_data; + + +enum _crystalhd_kmod_ver{ + crystalhd_kmod_major = 0, + crystalhd_kmod_minor = 9, + crystalhd_kmod_rev = 27, +}; + +#endif diff --git a/drivers/staging/crystalhd/bc_dts_types.h b/drivers/staging/crystalhd/bc_dts_types.h new file mode 100644 index 000000000000..e073d7450c16 --- /dev/null +++ b/drivers/staging/crystalhd/bc_dts_types.h @@ -0,0 +1,115 @@ +/******************************************************************** + * Copyright(c) 2006-2009 Broadcom Corporation. + * + * Name: bc_dts_types.h + * + * Description: Data types + * + * AU + * + * HISTORY: + * + ******************************************************************** + * This header is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 2.1 of the License. + * + * This header is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * You should have received a copy of the GNU Lesser General Public License + * along with this header. If not, see . + *******************************************************************/ + +#ifndef _BC_DTS_TYPES_H_ +#define _BC_DTS_TYPES_H_ + +#if defined(_WIN64) || defined(_WIN32) +typedef uint32_t U32; +typedef int32_t S32; +typedef uint16_t U16; +typedef int16_t S16; +typedef unsigned char U8; +typedef char S8; +#endif + +#ifndef PVOID +typedef void *PVOID; +#endif + +#ifndef BOOL +typedef int BOOL; +#endif + +#ifdef WIN32 + typedef unsigned __int64 U64; +#elif defined(_WIN64) + typedef uint64_t U64; +#endif + +#ifdef _WIN64 +#if !(defined(POINTER_32)) +#define POINTER_32 __ptr32 +#endif +#else /* _WIN32 */ +#define POINTER_32 +#endif + +#if defined(__KERNEL__) || defined(__LINUX_USER__) + +#ifdef __LINUX_USER__ /* Don't include these for KERNEL */ +typedef uint32_t ULONG; +typedef int32_t LONG; +typedef void *HANDLE; +typedef void VOID; +typedef void *LPVOID; +typedef uint32_t DWORD; +typedef uint32_t UINT32; +typedef uint32_t *LPDWORD; +typedef unsigned char *PUCHAR; + +#ifndef TRUE + #define TRUE 1 +#endif + +#ifndef FALSE + #define FALSE 0 +#endif + +#define TEXT + +#else + +/* For Kernel usage.. */ +typedef bool bc_bool_t; +#endif + +#else + +#ifndef uint64_t +typedef struct _uint64_t { + uint32_t low_dw; + uint32_t hi_dw; +} uint64_t; +#endif + +#ifndef int32_t +typedef signed long int32_t; +#endif + +#ifndef uint32_t +typedef unsigned long uint32_t; +#endif + +#ifndef uint16_t +typedef unsigned short uint16_t; +#endif + +#ifndef uint8_t +typedef unsigned char uint8_t; +#endif +#endif + +#endif + diff --git a/drivers/staging/crystalhd/bcm_70012_regs.h b/drivers/staging/crystalhd/bcm_70012_regs.h new file mode 100644 index 000000000000..b3b255769641 --- /dev/null +++ b/drivers/staging/crystalhd/bcm_70012_regs.h @@ -0,0 +1,12299 @@ +/*************************************************************************** + * Copyright (c) 1999-2009, Broadcom Corporation. + * + * Name: bcm_70012_regs.h + * + * Description: BCM70012 registers + * + ******************************************************************** + * This header is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 2.1 of the License. + * + * This header is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * You should have received a copy of the GNU Lesser General Public License + * along with this header. If not, see . + ***************************************************************************/ + +#ifndef MACFILE_H__ +#define MACFILE_H__ + +/** + * m = memory, c = core, r = register, f = field, d = data. + */ +#if !defined(GET_FIELD) && !defined(SET_FIELD) +#define BRCM_ALIGN(c,r,f) c##_##r##_##f##_ALIGN +#define BRCM_BITS(c,r,f) c##_##r##_##f##_BITS +#define BRCM_MASK(c,r,f) c##_##r##_##f##_MASK +#define BRCM_SHIFT(c,r,f) c##_##r##_##f##_SHIFT + +#define GET_FIELD(m,c,r,f) \ + ((((m) & BRCM_MASK(c,r,f)) >> BRCM_SHIFT(c,r,f)) << BRCM_ALIGN(c,r,f)) + +#define SET_FIELD(m,c,r,f,d) \ + ((m) = (((m) & ~BRCM_MASK(c,r,f)) | ((((d) >> BRCM_ALIGN(c,r,f)) << \ + BRCM_SHIFT(c,r,f)) & BRCM_MASK(c,r,f))) \ + ) + +#define SET_TYPE_FIELD(m,c,r,f,d) SET_FIELD(m,c,r,f,c##_##d) +#define SET_NAME_FIELD(m,c,r,f,d) SET_FIELD(m,c,r,f,c##_##r##_##f##_##d) +#define SET_VALUE_FIELD(m,c,r,f,d) SET_FIELD(m,c,r,f,d) + +#endif /* GET & SET */ + +/**************************************************************************** + * Core Enums. + ***************************************************************************/ +/**************************************************************************** + * Enums: AES_RGR_BRIDGE_RESET_CTRL + ***************************************************************************/ +#define AES_RGR_BRIDGE_RESET_CTRL_DEASSERT 0 +#define AES_RGR_BRIDGE_RESET_CTRL_ASSERT 1 + +/**************************************************************************** + * Enums: CCE_RGR_BRIDGE_RESET_CTRL + ***************************************************************************/ +#define CCE_RGR_BRIDGE_RESET_CTRL_DEASSERT 0 +#define CCE_RGR_BRIDGE_RESET_CTRL_ASSERT 1 + +/**************************************************************************** + * Enums: DBU_RGR_BRIDGE_RESET_CTRL + ***************************************************************************/ +#define DBU_RGR_BRIDGE_RESET_CTRL_DEASSERT 0 +#define DBU_RGR_BRIDGE_RESET_CTRL_ASSERT 1 + +/**************************************************************************** + * Enums: DCI_RGR_BRIDGE_RESET_CTRL + ***************************************************************************/ +#define DCI_RGR_BRIDGE_RESET_CTRL_DEASSERT 0 +#define DCI_RGR_BRIDGE_RESET_CTRL_ASSERT 1 + +/**************************************************************************** + * Enums: GISB_ARBITER_DEASSERT_ASSERT + ***************************************************************************/ +#define GISB_ARBITER_DEASSERT_ASSERT_DEASSERT 0 +#define GISB_ARBITER_DEASSERT_ASSERT_ASSERT 1 + +/**************************************************************************** + * Enums: GISB_ARBITER_UNMASK_MASK + ***************************************************************************/ +#define GISB_ARBITER_UNMASK_MASK_UNMASK 0 +#define GISB_ARBITER_UNMASK_MASK_MASK 1 + +/**************************************************************************** + * Enums: GISB_ARBITER_DISABLE_ENABLE + ***************************************************************************/ +#define GISB_ARBITER_DISABLE_ENABLE_DISABLE 0 +#define GISB_ARBITER_DISABLE_ENABLE_ENABLE 1 + +/**************************************************************************** + * Enums: I2C_GR_BRIDGE_RESET_CTRL + ***************************************************************************/ +#define I2C_GR_BRIDGE_RESET_CTRL_DEASSERT 0 +#define I2C_GR_BRIDGE_RESET_CTRL_ASSERT 1 + +/**************************************************************************** + * Enums: MISC_GR_BRIDGE_RESET_CTRL + ***************************************************************************/ +#define MISC_GR_BRIDGE_RESET_CTRL_DEASSERT 0 +#define MISC_GR_BRIDGE_RESET_CTRL_ASSERT 1 + +/**************************************************************************** + * Enums: OTP_GR_BRIDGE_RESET_CTRL + ***************************************************************************/ +#define OTP_GR_BRIDGE_RESET_CTRL_DEASSERT 0 +#define OTP_GR_BRIDGE_RESET_CTRL_ASSERT 1 + +/**************************************************************************** + * BCM70012_TGT_TOP_PCIE_CFG + ***************************************************************************/ +#define PCIE_CFG_DEVICE_VENDOR_ID 0x00000000 /* DEVICE_VENDOR_ID Register */ +#define PCIE_CFG_STATUS_COMMAND 0x00000004 /* STATUS_COMMAND Register */ +#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID 0x00000008 /* PCI_CLASSCODE_AND_REVISION_ID Register */ +#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE 0x0000000c /* BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE Register */ +#define PCIE_CFG_BASE_ADDRESS_1 0x00000010 /* BASE_ADDRESS_1 Register */ +#define PCIE_CFG_BASE_ADDRESS_2 0x00000014 /* BASE_ADDRESS_2 Register */ +#define PCIE_CFG_BASE_ADDRESS_3 0x00000018 /* BASE_ADDRESS_3 Register */ +#define PCIE_CFG_BASE_ADDRESS_4 0x0000001c /* BASE_ADDRESS_4 Register */ +#define PCIE_CFG_CARDBUS_CIS_POINTER 0x00000028 /* CARDBUS_CIS_POINTER Register */ +#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID 0x0000002c /* SUBSYSTEM_DEVICE_VENDOR_ID Register */ +#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS 0x00000030 /* EXPANSION_ROM_BASE_ADDRESS Register */ +#define PCIE_CFG_CAPABILITIES_POINTER 0x00000034 /* CAPABILITIES_POINTER Register */ +#define PCIE_CFG_INTERRUPT 0x0000003c /* INTERRUPT Register */ +#define PCIE_CFG_VPD_CAPABILITIES 0x00000040 /* VPD_CAPABILITIES Register */ +#define PCIE_CFG_VPD_DATA 0x00000044 /* VPD_DATA Register */ +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY 0x00000048 /* POWER_MANAGEMENT_CAPABILITY Register */ +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS 0x0000004c /* POWER_MANAGEMENT_CONTROL_STATUS Register */ +#define PCIE_CFG_MSI_CAPABILITY_HEADER 0x00000050 /* MSI_CAPABILITY_HEADER Register */ +#define PCIE_CFG_MSI_LOWER_ADDRESS 0x00000054 /* MSI_LOWER_ADDRESS Register */ +#define PCIE_CFG_MSI_UPPER_ADDRESS_REGISTER 0x00000058 /* MSI_UPPER_ADDRESS_REGISTER Register */ +#define PCIE_CFG_MSI_DATA 0x0000005c /* MSI_DATA Register */ +#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER 0x00000060 /* BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER Register */ +#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES 0x00000064 /* RESET_COUNTERS_INITIAL_VALUES Register */ +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL 0x00000068 /* MISCELLANEOUS_HOST_CONTROL Register */ +#define PCIE_CFG_SPARE 0x0000006c /* SPARE Register */ +#define PCIE_CFG_PCI_STATE 0x00000070 /* PCI_STATE Register */ +#define PCIE_CFG_CLOCK_CONTROL 0x00000074 /* CLOCK_CONTROL Register */ +#define PCIE_CFG_REGISTER_BASE 0x00000078 /* REGISTER_BASE Register */ +#define PCIE_CFG_MEMORY_BASE 0x0000007c /* MEMORY_BASE Register */ +#define PCIE_CFG_REGISTER_DATA 0x00000080 /* REGISTER_DATA Register */ +#define PCIE_CFG_MEMORY_DATA 0x00000084 /* MEMORY_DATA Register */ +#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE 0x00000088 /* EXPANSION_ROM_BAR_SIZE Register */ +#define PCIE_CFG_EXPANSION_ROM_ADDRESS 0x0000008c /* EXPANSION_ROM_ADDRESS Register */ +#define PCIE_CFG_EXPANSION_ROM_DATA 0x00000090 /* EXPANSION_ROM_DATA Register */ +#define PCIE_CFG_VPD_INTERFACE 0x00000094 /* VPD_INTERFACE Register */ +#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_UPPER 0x00000098 /* UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_UPPER Register */ +#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_LOWER 0x0000009c /* UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_LOWER Register */ +#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_UPPER 0x000000a0 /* UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_UPPER Register */ +#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_LOWER 0x000000a4 /* UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_LOWER Register */ +#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_UPPER 0x000000a8 /* UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_UPPER Register */ +#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_LOWER 0x000000ac /* UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_LOWER Register */ +#define PCIE_CFG_INT_MAILBOX_UPPER 0x000000b0 /* INT_MAILBOX_UPPER Register */ +#define PCIE_CFG_INT_MAILBOX_LOWER 0x000000b4 /* INT_MAILBOX_LOWER Register */ +#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION 0x000000bc /* PRODUCT_ID_AND_ASIC_REVISION Register */ +#define PCIE_CFG_FUNCTION_EVENT 0x000000c0 /* FUNCTION_EVENT Register */ +#define PCIE_CFG_FUNCTION_EVENT_MASK 0x000000c4 /* FUNCTION_EVENT_MASK Register */ +#define PCIE_CFG_FUNCTION_PRESENT 0x000000c8 /* FUNCTION_PRESENT Register */ +#define PCIE_CFG_PCIE_CAPABILITIES 0x000000cc /* PCIE_CAPABILITIES Register */ +#define PCIE_CFG_DEVICE_CAPABILITIES 0x000000d0 /* DEVICE_CAPABILITIES Register */ +#define PCIE_CFG_DEVICE_STATUS_CONTROL 0x000000d4 /* DEVICE_STATUS_CONTROL Register */ +#define PCIE_CFG_LINK_CAPABILITY 0x000000d8 /* LINK_CAPABILITY Register */ +#define PCIE_CFG_LINK_STATUS_CONTROL 0x000000dc /* LINK_STATUS_CONTROL Register */ +#define PCIE_CFG_DEVICE_CAPABILITIES_2 0x000000f0 /* DEVICE_CAPABILITIES_2 Register */ +#define PCIE_CFG_DEVICE_STATUS_CONTROL_2 0x000000f4 /* DEVICE_STATUS_CONTROL_2 Register */ +#define PCIE_CFG_LINK_CAPABILITIES_2 0x000000f8 /* LINK_CAPABILITIES_2 Register */ +#define PCIE_CFG_LINK_STATUS_CONTROL_2 0x000000fc /* LINK_STATUS_CONTROL_2 Register */ +#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER 0x00000100 /* ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER Register */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS 0x00000104 /* UNCORRECTABLE_ERROR_STATUS Register */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK 0x00000108 /* UNCORRECTABLE_ERROR_MASK Register */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY 0x0000010c /* UNCORRECTABLE_ERROR_SEVERITY Register */ +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS 0x00000110 /* CORRECTABLE_ERROR_STATUS Register */ +#define PCIE_CFG_CORRECTABLE_ERROR_MASK 0x00000114 /* CORRECTABLE_ERROR_MASK Register */ +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL 0x00000118 /* ADVANCED_ERROR_CAPABILITIES_AND_CONTROL Register */ +#define PCIE_CFG_HEADER_LOG_1 0x0000011c /* HEADER_LOG_1 Register */ +#define PCIE_CFG_HEADER_LOG_2 0x00000120 /* HEADER_LOG_2 Register */ +#define PCIE_CFG_HEADER_LOG_3 0x00000124 /* HEADER_LOG_3 Register */ +#define PCIE_CFG_HEADER_LOG_4 0x00000128 /* HEADER_LOG_4 Register */ +#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER 0x0000013c /* VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER Register */ +#define PCIE_CFG_PORT_VC_CAPABILITY 0x00000140 /* PORT_VC_CAPABILITY Register */ +#define PCIE_CFG_PORT_VC_CAPABILITY_2 0x00000144 /* PORT_VC_CAPABILITY_2 Register */ +#define PCIE_CFG_PORT_VC_STATUS_CONTROL 0x00000148 /* PORT_VC_STATUS_CONTROL Register */ +#define PCIE_CFG_VC_RESOURCE_CAPABILITY 0x0000014c /* VC_RESOURCE_CAPABILITY Register */ +#define PCIE_CFG_VC_RESOURCE_CONTROL 0x00000150 /* VC_RESOURCE_CONTROL Register */ +#define PCIE_CFG_VC_RESOURCE_STATUS 0x00000154 /* VC_RESOURCE_STATUS Register */ +#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER 0x00000160 /* DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER Register */ +#define PCIE_CFG_DEVICE_SERIAL_NO_LOWER_DW 0x00000164 /* DEVICE_SERIAL_NO_LOWER_DW Register */ +#define PCIE_CFG_DEVICE_SERIAL_NO_UPPER_DW 0x00000168 /* DEVICE_SERIAL_NO_UPPER_DW Register */ +#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER 0x0000016c /* POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER Register */ +#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT 0x00000170 /* POWER_BUDGETING_DATA_SELECT Register */ +#define PCIE_CFG_POWER_BUDGETING_DATA 0x00000174 /* POWER_BUDGETING_DATA Register */ +#define PCIE_CFG_POWER_BUDGETING_CAPABILITY 0x00000178 /* POWER_BUDGETING_CAPABILITY Register */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1 0x0000017c /* FIRMWARE_POWER_BUDGETING_2_1 Register */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3 0x00000180 /* FIRMWARE_POWER_BUDGETING_4_3 Register */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5 0x00000184 /* FIRMWARE_POWER_BUDGETING_6_5 Register */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7 0x00000188 /* FIRMWARE_POWER_BUDGETING_8_7 Register */ +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING 0x0000018c /* PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING Register */ + + +/**************************************************************************** + * BCM70012_TGT_TOP_PCIE_TL + ***************************************************************************/ +#define PCIE_TL_TL_CONTROL 0x00000400 /* TL_CONTROL Register */ +#define PCIE_TL_TRANSACTION_CONFIGURATION 0x00000404 /* TRANSACTION_CONFIGURATION Register */ +#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC 0x00000408 /* WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC Register */ +#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2 0x0000040c /* WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2 Register */ +#define PCIE_TL_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC 0x00000410 /* DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC Register */ +#define PCIE_TL_DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2 0x00000414 /* DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2 Register */ +#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC 0x00000418 /* DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC Register */ +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC 0x0000041c /* DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC Register */ +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC 0x00000420 /* READ_DMA_SPLIT_IDS_DIAGNOSTIC Register */ +#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC 0x00000424 /* READ_DMA_SPLIT_LENGTH_DIAGNOSTIC Register */ +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC 0x0000043c /* XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC Register */ +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC 0x00000458 /* DMA_COMPLETION_MISC__DIAGNOSTIC Register */ +#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC 0x0000045c /* SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC Register */ +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC 0x00000460 /* SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC Register */ +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC 0x00000464 /* SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC Register */ +#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO 0x00000468 /* TL_BUS_NO_DEV__NO__FUNC__NO Register */ +#define PCIE_TL_TL_DEBUG 0x0000046c /* TL_DEBUG Register */ + + +/**************************************************************************** + * BCM70012_TGT_TOP_PCIE_DLL + ***************************************************************************/ +#define PCIE_DLL_DATA_LINK_CONTROL 0x00000500 /* DATA_LINK_CONTROL Register */ +#define PCIE_DLL_DATA_LINK_STATUS 0x00000504 /* DATA_LINK_STATUS Register */ +#define PCIE_DLL_DATA_LINK_ATTENTION 0x00000508 /* DATA_LINK_ATTENTION Register */ +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK 0x0000050c /* DATA_LINK_ATTENTION_MASK Register */ +#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG 0x00000510 /* NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG Register */ +#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG 0x00000514 /* ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG Register */ +#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG 0x00000518 /* PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG Register */ +#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG 0x0000051c /* RECEIVE_SEQUENCE_NUMBER_DEBUG Register */ +#define PCIE_DLL_DATA_LINK_REPLAY 0x00000520 /* DATA_LINK_REPLAY Register */ +#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT 0x00000524 /* DATA_LINK_ACK_TIMEOUT Register */ +#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD 0x00000528 /* POWER_MANAGEMENT_THRESHOLD Register */ +#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG 0x0000052c /* RETRY_BUFFER_WRITE_POINTER_DEBUG Register */ +#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG 0x00000530 /* RETRY_BUFFER_READ_POINTER_DEBUG Register */ +#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG 0x00000534 /* RETRY_BUFFER_PURGED_POINTER_DEBUG Register */ +#define PCIE_DLL_RETRY_BUFFER_READ_WRITE_DEBUG_PORT 0x00000538 /* RETRY_BUFFER_READ_WRITE_DEBUG_PORT Register */ +#define PCIE_DLL_ERROR_COUNT_THRESHOLD 0x0000053c /* ERROR_COUNT_THRESHOLD Register */ +#define PCIE_DLL_TL_ERROR_COUNTER 0x00000540 /* TL_ERROR_COUNTER Register */ +#define PCIE_DLL_DLLP_ERROR_COUNTER 0x00000544 /* DLLP_ERROR_COUNTER Register */ +#define PCIE_DLL_NAK_RECEIVED_COUNTER 0x00000548 /* NAK_RECEIVED_COUNTER Register */ +#define PCIE_DLL_DATA_LINK_TEST 0x0000054c /* DATA_LINK_TEST Register */ +#define PCIE_DLL_PACKET_BIST 0x00000550 /* PACKET_BIST Register */ +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL 0x00000554 /* LINK_PCIE_1_1_CONTROL Register */ + + +/**************************************************************************** + * BCM70012_TGT_TOP_PCIE_PHY + ***************************************************************************/ +#define PCIE_PHY_PHY_MODE 0x00000600 /* TYPE_PHY_MODE Register */ +#define PCIE_PHY_PHY_LINK_STATUS 0x00000604 /* TYPE_PHY_LINK_STATUS Register */ +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL 0x00000608 /* TYPE_PHY_LINK_LTSSM_CONTROL Register */ +#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER 0x0000060c /* TYPE_PHY_LINK_TRAINING_LINK_NUMBER Register */ +#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER 0x00000610 /* TYPE_PHY_LINK_TRAINING_LANE_NUMBER Register */ +#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS 0x00000614 /* TYPE_PHY_LINK_TRAINING_N_FTS Register */ +#define PCIE_PHY_PHY_ATTENTION 0x00000618 /* TYPE_PHY_ATTENTION Register */ +#define PCIE_PHY_PHY_ATTENTION_MASK 0x0000061c /* TYPE_PHY_ATTENTION_MASK Register */ +#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER 0x00000620 /* TYPE_PHY_RECEIVE_ERROR_COUNTER Register */ +#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER 0x00000624 /* TYPE_PHY_RECEIVE_FRAMING_ERROR_COUNTER Register */ +#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD 0x00000628 /* TYPE_PHY_RECEIVE_ERROR_THRESHOLD Register */ +#define PCIE_PHY_PHY_TEST_CONTROL 0x0000062c /* TYPE_PHY_TEST_CONTROL Register */ +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE 0x00000630 /* TYPE_PHY_SERDES_CONTROL_OVERRIDE Register */ +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE 0x00000634 /* TYPE_PHY_TIMING_PARAMETER_OVERRIDE Register */ +#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES 0x00000638 /* TYPE_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES Register */ +#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC2_LTSSM_STATES 0x0000063c /* TYPE_PHY_HARDWARE_DIAGNOSTIC2_LTSSM_STATES Register */ + + +/**************************************************************************** + * BCM70012_TGT_TOP_INTR + ***************************************************************************/ +#define INTR_INTR_STATUS 0x00000700 /* Interrupt Status Register */ +#define INTR_INTR_SET 0x00000704 /* Interrupt Set Register */ +#define INTR_INTR_CLR_REG 0x00000708 /* Interrupt Clear Register */ +#define INTR_INTR_MSK_STS_REG 0x0000070c /* Interrupt Mask Status Register */ +#define INTR_INTR_MSK_SET_REG 0x00000710 /* Interrupt Mask Set Register */ +#define INTR_INTR_MSK_CLR_REG 0x00000714 /* Interrupt Mask Clear Register */ +#define INTR_EOI_CTRL 0x00000720 /* End of interrupt control register */ + + +/**************************************************************************** + * BCM70012_TGT_TOP_MDIO + ***************************************************************************/ +#define MDIO_CTRL0 0x00000730 /* PCIE Serdes MDIO Control Register 0 */ +#define MDIO_CTRL1 0x00000734 /* PCIE Serdes MDIO Control Register 1 */ +#define MDIO_CTRL2 0x00000738 /* PCIE Serdes MDIO Control Register 2 */ + + +/**************************************************************************** + * BCM70012_TGT_TOP_TGT_RGR_BRIDGE + ***************************************************************************/ +#define TGT_RGR_BRIDGE_REVISION 0x00000740 /* PCIE RGR Bridge Revision Register */ +#define TGT_RGR_BRIDGE_CTRL 0x00000744 /* RGR Bridge Control Register */ +#define TGT_RGR_BRIDGE_RBUS_TIMER 0x00000748 /* RGR Bridge RBUS Timer Register */ +#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0 0x0000074c /* RGR Bridge Spare Software Reset 0 Register */ +#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1 0x00000750 /* RGR Bridge Spare Software Reset 1 Register */ + + +/**************************************************************************** + * BCM70012_I2C_TOP_I2C + ***************************************************************************/ +#define I2C_CHIP_ADDRESS 0x00000800 /* I2C Chip Address And Read/Write Control */ +#define I2C_DATA_IN0 0x00000804 /* I2C Write Data Byte 0 */ +#define I2C_DATA_IN1 0x00000808 /* I2C Write Data Byte 1 */ +#define I2C_DATA_IN2 0x0000080c /* I2C Write Data Byte 2 */ +#define I2C_DATA_IN3 0x00000810 /* I2C Write Data Byte 3 */ +#define I2C_DATA_IN4 0x00000814 /* I2C Write Data Byte 4 */ +#define I2C_DATA_IN5 0x00000818 /* I2C Write Data Byte 5 */ +#define I2C_DATA_IN6 0x0000081c /* I2C Write Data Byte 6 */ +#define I2C_DATA_IN7 0x00000820 /* I2C Write Data Byte 7 */ +#define I2C_CNT_REG 0x00000824 /* I2C Transfer Count Register */ +#define I2C_CTL_REG 0x00000828 /* I2C Control Register */ +#define I2C_IIC_ENABLE 0x0000082c /* I2C Read/Write Enable And Interrupt */ +#define I2C_DATA_OUT0 0x00000830 /* I2C Read Data Byte 0 */ +#define I2C_DATA_OUT1 0x00000834 /* I2C Read Data Byte 1 */ +#define I2C_DATA_OUT2 0x00000838 /* I2C Read Data Byte 2 */ +#define I2C_DATA_OUT3 0x0000083c /* I2C Read Data Byte 3 */ +#define I2C_DATA_OUT4 0x00000840 /* I2C Read Data Byte 4 */ +#define I2C_DATA_OUT5 0x00000844 /* I2C Read Data Byte 5 */ +#define I2C_DATA_OUT6 0x00000848 /* I2C Read Data Byte 6 */ +#define I2C_DATA_OUT7 0x0000084c /* I2C Read Data Byte 7 */ +#define I2C_CTLHI_REG 0x00000850 /* I2C Control Register */ +#define I2C_SCL_PARAM 0x00000854 /* I2C SCL Parameter Register */ + + +/**************************************************************************** + * BCM70012_I2C_TOP_I2C_GR_BRIDGE + ***************************************************************************/ +#define I2C_GR_BRIDGE_REVISION 0x00000be0 /* GR Bridge Revision */ +#define I2C_GR_BRIDGE_CTRL 0x00000be4 /* GR Bridge Control Register */ +#define I2C_GR_BRIDGE_SPARE_SW_RESET_0 0x00000be8 /* GR Bridge Software Reset 0 Register */ +#define I2C_GR_BRIDGE_SPARE_SW_RESET_1 0x00000bec /* GR Bridge Software Reset 1 Register */ + + +/**************************************************************************** + * BCM70012_MISC_TOP_MISC1 + ***************************************************************************/ +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0 0x00000c00 /* Tx DMA Descriptor List0 First Descriptor lower Address */ +#define MISC1_TX_FIRST_DESC_U_ADDR_LIST0 0x00000c04 /* Tx DMA Descriptor List0 First Descriptor Upper Address */ +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1 0x00000c08 /* Tx DMA Descriptor List1 First Descriptor Lower Address */ +#define MISC1_TX_FIRST_DESC_U_ADDR_LIST1 0x00000c0c /* Tx DMA Descriptor List1 First Descriptor Upper Address */ +#define MISC1_TX_SW_DESC_LIST_CTRL_STS 0x00000c10 /* Tx DMA Software Descriptor List Control and Status */ +#define MISC1_TX_DMA_ERROR_STATUS 0x00000c18 /* Tx DMA Engine Error Status */ +#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR 0x00000c1c /* Tx DMA List0 Current Descriptor Lower Address */ +#define MISC1_TX_DMA_LIST0_CUR_DESC_U_ADDR 0x00000c20 /* Tx DMA List0 Current Descriptor Upper Address */ +#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM 0x00000c24 /* Tx DMA List0 Current Descriptor Upper Address */ +#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR 0x00000c28 /* Tx DMA List1 Current Descriptor Lower Address */ +#define MISC1_TX_DMA_LIST1_CUR_DESC_U_ADDR 0x00000c2c /* Tx DMA List1 Current Descriptor Upper Address */ +#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM 0x00000c30 /* Tx DMA List1 Current Descriptor Upper Address */ +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0 0x00000c34 /* Y Rx Descriptor List0 First Descriptor Lower Address */ +#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST0 0x00000c38 /* Y Rx Descriptor List0 First Descriptor Upper Address */ +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1 0x00000c3c /* Y Rx Descriptor List1 First Descriptor Lower Address */ +#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST1 0x00000c40 /* Y Rx Descriptor List1 First Descriptor Upper Address */ +#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS 0x00000c44 /* Y Rx Software Descriptor List Control and Status */ +#define MISC1_Y_RX_ERROR_STATUS 0x00000c4c /* Y Rx Engine Error Status */ +#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR 0x00000c50 /* Y Rx List0 Current Descriptor Lower Address */ +#define MISC1_Y_RX_LIST0_CUR_DESC_U_ADDR 0x00000c54 /* Y Rx List0 Current Descriptor Upper Address */ +#define MISC1_Y_RX_LIST0_CUR_BYTE_CNT 0x00000c58 /* Y Rx List0 Current Descriptor Byte Count */ +#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR 0x00000c5c /* Y Rx List1 Current Descriptor Lower address */ +#define MISC1_Y_RX_LIST1_CUR_DESC_U_ADDR 0x00000c60 /* Y Rx List1 Current Descriptor Upper address */ +#define MISC1_Y_RX_LIST1_CUR_BYTE_CNT 0x00000c64 /* Y Rx List1 Current Descriptor Byte Count */ +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0 0x00000c68 /* UV Rx Descriptor List0 First Descriptor lower Address */ +#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST0 0x00000c6c /* UV Rx Descriptor List0 First Descriptor Upper Address */ +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1 0x00000c70 /* UV Rx Descriptor List1 First Descriptor Lower Address */ +#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST1 0x00000c74 /* UV Rx Descriptor List1 First Descriptor Upper Address */ +#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS 0x00000c78 /* UV Rx Software Descriptor List Control and Status */ +#define MISC1_UV_RX_ERROR_STATUS 0x00000c7c /* UV Rx Engine Error Status */ +#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR 0x00000c80 /* UV Rx List0 Current Descriptor Lower Address */ +#define MISC1_UV_RX_LIST0_CUR_DESC_U_ADDR 0x00000c84 /* UV Rx List0 Current Descriptor Upper Address */ +#define MISC1_UV_RX_LIST0_CUR_BYTE_CNT 0x00000c88 /* UV Rx List0 Current Descriptor Byte Count */ +#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR 0x00000c8c /* UV Rx List1 Current Descriptor Lower Address */ +#define MISC1_UV_RX_LIST1_CUR_DESC_U_ADDR 0x00000c90 /* UV Rx List1 Current Descriptor Upper Address */ +#define MISC1_UV_RX_LIST1_CUR_BYTE_CNT 0x00000c94 /* UV Rx List1 Current Descriptor Byte Count */ +#define MISC1_DMA_DEBUG_OPTIONS_REG 0x00000c98 /* DMA Debug Options Register */ +#define MISC1_READ_CHANNEL_ERROR_STATUS 0x00000c9c /* Read Channel Error Status */ +#define MISC1_PCIE_DMA_CTRL 0x00000ca0 /* PCIE DMA Control Register */ + + +/**************************************************************************** + * BCM70012_MISC_TOP_MISC2 + ***************************************************************************/ +#define MISC2_GLOBAL_CTRL 0x00000d00 /* Global Control Register */ +#define MISC2_INTERNAL_STATUS 0x00000d04 /* Internal Status Register */ +#define MISC2_INTERNAL_STATUS_MUX_CTRL 0x00000d08 /* Internal Debug Mux Control */ +#define MISC2_DEBUG_FIFO_LENGTH 0x00000d0c /* Debug FIFO Length */ + + +/**************************************************************************** + * BCM70012_MISC_TOP_MISC3 + ***************************************************************************/ +#define MISC3_RESET_CTRL 0x00000e00 /* Reset Control Register */ +#define MISC3_BIST_CTRL 0x00000e04 /* BIST Control Register */ +#define MISC3_BIST_STATUS 0x00000e08 /* BIST Status Register */ +#define MISC3_RX_CHECKSUM 0x00000e0c /* Receive Checksum */ +#define MISC3_TX_CHECKSUM 0x00000e10 /* Transmit Checksum */ +#define MISC3_ECO_CTRL_CORE 0x00000e14 /* ECO Core Reset Control Register */ +#define MISC3_CSI_TEST_CTRL 0x00000e18 /* CSI Test Control Register */ +#define MISC3_HD_DVI_TEST_CTRL 0x00000e1c /* HD DVI Test Control Register */ + + +/**************************************************************************** + * BCM70012_MISC_TOP_MISC_PERST + ***************************************************************************/ +#define MISC_PERST_ECO_CTRL_PERST 0x00000e80 /* ECO PCIE Reset Control Register */ +#define MISC_PERST_DECODER_CTRL 0x00000e84 /* Decoder Control Register */ +#define MISC_PERST_CCE_STATUS 0x00000e88 /* Config Copy Engine Status */ +#define MISC_PERST_PCIE_DEBUG 0x00000e8c /* PCIE Debug Control Register */ +#define MISC_PERST_PCIE_DEBUG_STATUS 0x00000e90 /* PCIE Debug Status Register */ +#define MISC_PERST_VREG_CTRL 0x00000e94 /* Voltage Regulator Control Register */ +#define MISC_PERST_MEM_CTRL 0x00000e98 /* Memory Control Register */ +#define MISC_PERST_CLOCK_CTRL 0x00000e9c /* Clock Control Register */ + + +/**************************************************************************** + * BCM70012_MISC_TOP_GISB_ARBITER + ***************************************************************************/ +#define GISB_ARBITER_REVISION 0x00000f00 /* GISB ARBITER REVISION */ +#define GISB_ARBITER_SCRATCH 0x00000f04 /* GISB ARBITER Scratch Register */ +#define GISB_ARBITER_REQ_MASK 0x00000f08 /* GISB ARBITER Master Request Mask Register */ +#define GISB_ARBITER_TIMER 0x00000f0c /* GISB ARBITER Timer Value Register */ +#define GISB_ARBITER_BP_CTRL 0x00000f10 /* GISB ARBITER Breakpoint Control Register */ +#define GISB_ARBITER_BP_CAP_CLR 0x00000f14 /* GISB ARBITER Breakpoint Capture Clear Register */ +#define GISB_ARBITER_BP_START_ADDR_0 0x00000f18 /* GISB ARBITER Breakpoint Start Address 0 Register */ +#define GISB_ARBITER_BP_END_ADDR_0 0x00000f1c /* GISB ARBITER Breakpoint End Address 0 Register */ +#define GISB_ARBITER_BP_READ_0 0x00000f20 /* GISB ARBITER Breakpoint Master Read Control 0 Register */ +#define GISB_ARBITER_BP_WRITE_0 0x00000f24 /* GISB ARBITER Breakpoint Master Write Control 0 Register */ +#define GISB_ARBITER_BP_ENABLE_0 0x00000f28 /* GISB ARBITER Breakpoint Enable 0 Register */ +#define GISB_ARBITER_BP_START_ADDR_1 0x00000f2c /* GISB ARBITER Breakpoint Start Address 1 Register */ +#define GISB_ARBITER_BP_END_ADDR_1 0x00000f30 /* GISB ARBITER Breakpoint End Address 1 Register */ +#define GISB_ARBITER_BP_READ_1 0x00000f34 /* GISB ARBITER Breakpoint Master Read Control 1 Register */ +#define GISB_ARBITER_BP_WRITE_1 0x00000f38 /* GISB ARBITER Breakpoint Master Write Control 1 Register */ +#define GISB_ARBITER_BP_ENABLE_1 0x00000f3c /* GISB ARBITER Breakpoint Enable 1 Register */ +#define GISB_ARBITER_BP_START_ADDR_2 0x00000f40 /* GISB ARBITER Breakpoint Start Address 2 Register */ +#define GISB_ARBITER_BP_END_ADDR_2 0x00000f44 /* GISB ARBITER Breakpoint End Address 2 Register */ +#define GISB_ARBITER_BP_READ_2 0x00000f48 /* GISB ARBITER Breakpoint Master Read Control 2 Register */ +#define GISB_ARBITER_BP_WRITE_2 0x00000f4c /* GISB ARBITER Breakpoint Master Write Control 2 Register */ +#define GISB_ARBITER_BP_ENABLE_2 0x00000f50 /* GISB ARBITER Breakpoint Enable 2 Register */ +#define GISB_ARBITER_BP_START_ADDR_3 0x00000f54 /* GISB ARBITER Breakpoint Start Address 3 Register */ +#define GISB_ARBITER_BP_END_ADDR_3 0x00000f58 /* GISB ARBITER Breakpoint End Address 3 Register */ +#define GISB_ARBITER_BP_READ_3 0x00000f5c /* GISB ARBITER Breakpoint Master Read Control 3 Register */ +#define GISB_ARBITER_BP_WRITE_3 0x00000f60 /* GISB ARBITER Breakpoint Master Write Control 3 Register */ +#define GISB_ARBITER_BP_ENABLE_3 0x00000f64 /* GISB ARBITER Breakpoint Enable 3 Register */ +#define GISB_ARBITER_BP_START_ADDR_4 0x00000f68 /* GISB ARBITER Breakpoint Start Address 4 Register */ +#define GISB_ARBITER_BP_END_ADDR_4 0x00000f6c /* GISB ARBITER Breakpoint End Address 4 Register */ +#define GISB_ARBITER_BP_READ_4 0x00000f70 /* GISB ARBITER Breakpoint Master Read Control 4 Register */ +#define GISB_ARBITER_BP_WRITE_4 0x00000f74 /* GISB ARBITER Breakpoint Master Write Control 4 Register */ +#define GISB_ARBITER_BP_ENABLE_4 0x00000f78 /* GISB ARBITER Breakpoint Enable 4 Register */ +#define GISB_ARBITER_BP_START_ADDR_5 0x00000f7c /* GISB ARBITER Breakpoint Start Address 5 Register */ +#define GISB_ARBITER_BP_END_ADDR_5 0x00000f80 /* GISB ARBITER Breakpoint End Address 5 Register */ +#define GISB_ARBITER_BP_READ_5 0x00000f84 /* GISB ARBITER Breakpoint Master Read Control 5 Register */ +#define GISB_ARBITER_BP_WRITE_5 0x00000f88 /* GISB ARBITER Breakpoint Master Write Control 5 Register */ +#define GISB_ARBITER_BP_ENABLE_5 0x00000f8c /* GISB ARBITER Breakpoint Enable 5 Register */ +#define GISB_ARBITER_BP_START_ADDR_6 0x00000f90 /* GISB ARBITER Breakpoint Start Address 6 Register */ +#define GISB_ARBITER_BP_END_ADDR_6 0x00000f94 /* GISB ARBITER Breakpoint End Address 6 Register */ +#define GISB_ARBITER_BP_READ_6 0x00000f98 /* GISB ARBITER Breakpoint Master Read Control 6 Register */ +#define GISB_ARBITER_BP_WRITE_6 0x00000f9c /* GISB ARBITER Breakpoint Master Write Control 6 Register */ +#define GISB_ARBITER_BP_ENABLE_6 0x00000fa0 /* GISB ARBITER Breakpoint Enable 6 Register */ +#define GISB_ARBITER_BP_START_ADDR_7 0x00000fa4 /* GISB ARBITER Breakpoint Start Address 7 Register */ +#define GISB_ARBITER_BP_END_ADDR_7 0x00000fa8 /* GISB ARBITER Breakpoint End Address 7 Register */ +#define GISB_ARBITER_BP_READ_7 0x00000fac /* GISB ARBITER Breakpoint Master Read Control 7 Register */ +#define GISB_ARBITER_BP_WRITE_7 0x00000fb0 /* GISB ARBITER Breakpoint Master Write Control 7 Register */ +#define GISB_ARBITER_BP_ENABLE_7 0x00000fb4 /* GISB ARBITER Breakpoint Enable 7 Register */ +#define GISB_ARBITER_BP_CAP_ADDR 0x00000fb8 /* GISB ARBITER Breakpoint Capture Address Register */ +#define GISB_ARBITER_BP_CAP_DATA 0x00000fbc /* GISB ARBITER Breakpoint Capture Data Register */ +#define GISB_ARBITER_BP_CAP_STATUS 0x00000fc0 /* GISB ARBITER Breakpoint Capture Status Register */ +#define GISB_ARBITER_BP_CAP_MASTER 0x00000fc4 /* GISB ARBITER Breakpoint Capture GISB MASTER Register */ +#define GISB_ARBITER_ERR_CAP_CLR 0x00000fc8 /* GISB ARBITER Error Capture Clear Register */ +#define GISB_ARBITER_ERR_CAP_ADDR 0x00000fcc /* GISB ARBITER Error Capture Address Register */ +#define GISB_ARBITER_ERR_CAP_DATA 0x00000fd0 /* GISB ARBITER Error Capture Data Register */ +#define GISB_ARBITER_ERR_CAP_STATUS 0x00000fd4 /* GISB ARBITER Error Capture Status Register */ +#define GISB_ARBITER_ERR_CAP_MASTER 0x00000fd8 /* GISB ARBITER Error Capture GISB MASTER Register */ + + +/**************************************************************************** + * BCM70012_MISC_TOP_MISC_GR_BRIDGE + ***************************************************************************/ +#define MISC_GR_BRIDGE_REVISION 0x00000fe0 /* GR Bridge Revision */ +#define MISC_GR_BRIDGE_CTRL 0x00000fe4 /* GR Bridge Control Register */ +#define MISC_GR_BRIDGE_SPARE_SW_RESET_0 0x00000fe8 /* GR Bridge Software Reset 0 Register */ +#define MISC_GR_BRIDGE_SPARE_SW_RESET_1 0x00000fec /* GR Bridge Software Reset 1 Register */ + + +/**************************************************************************** + * BCM70012_DBU_TOP_DBU + ***************************************************************************/ +#define DBU_DBU_CMD 0x00001000 /* DBU (Debug UART) command register */ +#define DBU_DBU_STATUS 0x00001004 /* DBU (Debug UART) status register */ +#define DBU_DBU_CONFIG 0x00001008 /* DBU (Debug UART) configuration register */ +#define DBU_DBU_TIMING 0x0000100c /* DBU (Debug UART) timing register */ +#define DBU_DBU_RXDATA 0x00001010 /* DBU (Debug UART) recieve data register */ +#define DBU_DBU_TXDATA 0x00001014 /* DBU (Debug UART) transmit data register */ + + +/**************************************************************************** + * BCM70012_DBU_TOP_DBU_RGR_BRIDGE + ***************************************************************************/ +#define DBU_RGR_BRIDGE_REVISION 0x000013e0 /* RGR Bridge Revision */ +#define DBU_RGR_BRIDGE_CTRL 0x000013e4 /* RGR Bridge Control Register */ +#define DBU_RGR_BRIDGE_RBUS_TIMER 0x000013e8 /* RGR Bridge RBUS Timer Register */ +#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0 0x000013ec /* RGR Bridge Software Reset 0 Register */ +#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1 0x000013f0 /* RGR Bridge Software Reset 1 Register */ + + +/**************************************************************************** + * BCM70012_OTP_TOP_OTP + ***************************************************************************/ +#define OTP_CONFIG_INFO 0x00001400 /* OTP Configuration Register */ +#define OTP_CMD 0x00001404 /* OTP Command Register */ +#define OTP_STATUS 0x00001408 /* OTP Status Register */ +#define OTP_CONTENT_MISC 0x0000140c /* Content : Miscellaneous Register */ +#define OTP_CONTENT_AES_0 0x00001410 /* Content : AES Key 0 Register */ +#define OTP_CONTENT_AES_1 0x00001414 /* Content : AES Key 1 Register */ +#define OTP_CONTENT_AES_2 0x00001418 /* Content : AES Key 2 Register */ +#define OTP_CONTENT_AES_3 0x0000141c /* Content : AES Key 3 Register */ +#define OTP_CONTENT_SHA_0 0x00001420 /* Content : SHA Key 0 Register */ +#define OTP_CONTENT_SHA_1 0x00001424 /* Content : SHA Key 1 Register */ +#define OTP_CONTENT_SHA_2 0x00001428 /* Content : SHA Key 2 Register */ +#define OTP_CONTENT_SHA_3 0x0000142c /* Content : SHA Key 3 Register */ +#define OTP_CONTENT_SHA_4 0x00001430 /* Content : SHA Key 4 Register */ +#define OTP_CONTENT_SHA_5 0x00001434 /* Content : SHA Key 5 Register */ +#define OTP_CONTENT_SHA_6 0x00001438 /* Content : SHA Key 6 Register */ +#define OTP_CONTENT_SHA_7 0x0000143c /* Content : SHA Key 7 Register */ +#define OTP_CONTENT_CHECKSUM 0x00001440 /* Content : Checksum Register */ +#define OTP_PROG_CTRL 0x00001444 /* Programming Control Register */ +#define OTP_PROG_STATUS 0x00001448 /* Programming Status Register */ +#define OTP_PROG_PULSE 0x0000144c /* Program Pulse Width Register */ +#define OTP_VERIFY_PULSE 0x00001450 /* Verify Pulse Width Register */ +#define OTP_PROG_MASK 0x00001454 /* Program Mask Register */ +#define OTP_DATA_INPUT 0x00001458 /* Data Input Register */ +#define OTP_DATA_OUTPUT 0x0000145c /* Data Output Register */ + + +/**************************************************************************** + * BCM70012_OTP_TOP_OTP_GR_BRIDGE + ***************************************************************************/ +#define OTP_GR_BRIDGE_REVISION 0x000017e0 /* GR Bridge Revision */ +#define OTP_GR_BRIDGE_CTRL 0x000017e4 /* GR Bridge Control Register */ +#define OTP_GR_BRIDGE_SPARE_SW_RESET_0 0x000017e8 /* GR Bridge Software Reset 0 Register */ +#define OTP_GR_BRIDGE_SPARE_SW_RESET_1 0x000017ec /* GR Bridge Software Reset 1 Register */ + + +/**************************************************************************** + * BCM70012_AES_TOP_AES + ***************************************************************************/ +#define AES_CONFIG_INFO 0x00001800 /* AES Configuration Information Register */ +#define AES_CMD 0x00001804 /* AES Command Register */ +#define AES_STATUS 0x00001808 /* AES Status Register */ +#define AES_EEPROM_CONFIG 0x0000180c /* AES EEPROM Configuration Register */ +#define AES_EEPROM_DATA_0 0x00001810 /* AES EEPROM Data Register 0 */ +#define AES_EEPROM_DATA_1 0x00001814 /* AES EEPROM Data Register 1 */ +#define AES_EEPROM_DATA_2 0x00001818 /* AES EEPROM Data Register 2 */ +#define AES_EEPROM_DATA_3 0x0000181c /* AES EEPROM Data Register 3 */ + + +/**************************************************************************** + * BCM70012_AES_TOP_AES_RGR_BRIDGE + ***************************************************************************/ +#define AES_RGR_BRIDGE_REVISION 0x00001be0 /* RGR Bridge Revision */ +#define AES_RGR_BRIDGE_CTRL 0x00001be4 /* RGR Bridge Control Register */ +#define AES_RGR_BRIDGE_RBUS_TIMER 0x00001be8 /* RGR Bridge RBUS Timer Register */ +#define AES_RGR_BRIDGE_SPARE_SW_RESET_0 0x00001bec /* RGR Bridge Software Reset 0 Register */ +#define AES_RGR_BRIDGE_SPARE_SW_RESET_1 0x00001bf0 /* RGR Bridge Software Reset 1 Register */ + + +/**************************************************************************** + * BCM70012_DCI_TOP_DCI + ***************************************************************************/ +#define DCI_CMD 0x00001c00 /* DCI Command Register */ +#define DCI_STATUS 0x00001c04 /* DCI Status Register */ +#define DCI_DRAM_BASE_ADDR 0x00001c08 /* DRAM Base Address Register */ +#define DCI_FIRMWARE_ADDR 0x00001c0c /* Firmware Address Register */ +#define DCI_FIRMWARE_DATA 0x00001c10 /* Firmware Data Register */ +#define DCI_SIGNATURE_DATA_0 0x00001c14 /* Signature Data Register 0 */ +#define DCI_SIGNATURE_DATA_1 0x00001c18 /* Signature Data Register 1 */ +#define DCI_SIGNATURE_DATA_2 0x00001c1c /* Signature Data Register 2 */ +#define DCI_SIGNATURE_DATA_3 0x00001c20 /* Signature Data Register 3 */ +#define DCI_SIGNATURE_DATA_4 0x00001c24 /* Signature Data Register 4 */ +#define DCI_SIGNATURE_DATA_5 0x00001c28 /* Signature Data Register 5 */ +#define DCI_SIGNATURE_DATA_6 0x00001c2c /* Signature Data Register 6 */ +#define DCI_SIGNATURE_DATA_7 0x00001c30 /* Signature Data Register 7 */ + + +/**************************************************************************** + * BCM70012_DCI_TOP_DCI_RGR_BRIDGE + ***************************************************************************/ +#define DCI_RGR_BRIDGE_REVISION 0x00001fe0 /* RGR Bridge Revision */ +#define DCI_RGR_BRIDGE_CTRL 0x00001fe4 /* RGR Bridge Control Register */ +#define DCI_RGR_BRIDGE_RBUS_TIMER 0x00001fe8 /* RGR Bridge RBUS Timer Register */ +#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0 0x00001fec /* RGR Bridge Software Reset 0 Register */ +#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1 0x00001ff0 /* RGR Bridge Software Reset 1 Register */ + + +/**************************************************************************** + * BCM70012_CCE_TOP_CCE_RGR_BRIDGE + ***************************************************************************/ +#define CCE_RGR_BRIDGE_REVISION 0x000023e0 /* RGR Bridge Revision */ +#define CCE_RGR_BRIDGE_CTRL 0x000023e4 /* RGR Bridge Control Register */ +#define CCE_RGR_BRIDGE_RBUS_TIMER 0x000023e8 /* RGR Bridge RBUS Timer Register */ +#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0 0x000023ec /* RGR Bridge Software Reset 0 Register */ +#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1 0x000023f0 /* RGR Bridge Software Reset 1 Register */ + + +/**************************************************************************** + * BCM70012_TGT_TOP_PCIE_CFG + ***************************************************************************/ +/**************************************************************************** + * PCIE_CFG :: DEVICE_VENDOR_ID + ***************************************************************************/ +/* PCIE_CFG :: DEVICE_VENDOR_ID :: DEVICE_ID [31:16] */ +#define PCIE_CFG_DEVICE_VENDOR_ID_DEVICE_ID_MASK 0xffff0000 +#define PCIE_CFG_DEVICE_VENDOR_ID_DEVICE_ID_ALIGN 0 +#define PCIE_CFG_DEVICE_VENDOR_ID_DEVICE_ID_BITS 16 +#define PCIE_CFG_DEVICE_VENDOR_ID_DEVICE_ID_SHIFT 16 + +/* PCIE_CFG :: DEVICE_VENDOR_ID :: VENDOR_ID [15:00] */ +#define PCIE_CFG_DEVICE_VENDOR_ID_VENDOR_ID_MASK 0x0000ffff +#define PCIE_CFG_DEVICE_VENDOR_ID_VENDOR_ID_ALIGN 0 +#define PCIE_CFG_DEVICE_VENDOR_ID_VENDOR_ID_BITS 16 +#define PCIE_CFG_DEVICE_VENDOR_ID_VENDOR_ID_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: STATUS_COMMAND + ***************************************************************************/ +/* PCIE_CFG :: STATUS_COMMAND :: DETECTED_PARITY_ERROR [31:31] */ +#define PCIE_CFG_STATUS_COMMAND_DETECTED_PARITY_ERROR_MASK 0x80000000 +#define PCIE_CFG_STATUS_COMMAND_DETECTED_PARITY_ERROR_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_DETECTED_PARITY_ERROR_BITS 1 +#define PCIE_CFG_STATUS_COMMAND_DETECTED_PARITY_ERROR_SHIFT 31 + +/* PCIE_CFG :: STATUS_COMMAND :: SIGNALED_SYSTEM_ERROR [30:30] */ +#define PCIE_CFG_STATUS_COMMAND_SIGNALED_SYSTEM_ERROR_MASK 0x40000000 +#define PCIE_CFG_STATUS_COMMAND_SIGNALED_SYSTEM_ERROR_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_SIGNALED_SYSTEM_ERROR_BITS 1 +#define PCIE_CFG_STATUS_COMMAND_SIGNALED_SYSTEM_ERROR_SHIFT 30 + +/* PCIE_CFG :: STATUS_COMMAND :: RECEIVED_MASTER_ABORT [29:29] */ +#define PCIE_CFG_STATUS_COMMAND_RECEIVED_MASTER_ABORT_MASK 0x20000000 +#define PCIE_CFG_STATUS_COMMAND_RECEIVED_MASTER_ABORT_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_RECEIVED_MASTER_ABORT_BITS 1 +#define PCIE_CFG_STATUS_COMMAND_RECEIVED_MASTER_ABORT_SHIFT 29 + +/* PCIE_CFG :: STATUS_COMMAND :: RECEIVED_TARGET_ABORT [28:28] */ +#define PCIE_CFG_STATUS_COMMAND_RECEIVED_TARGET_ABORT_MASK 0x10000000 +#define PCIE_CFG_STATUS_COMMAND_RECEIVED_TARGET_ABORT_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_RECEIVED_TARGET_ABORT_BITS 1 +#define PCIE_CFG_STATUS_COMMAND_RECEIVED_TARGET_ABORT_SHIFT 28 + +/* PCIE_CFG :: STATUS_COMMAND :: SIGNALED_TARGET_ABORT [27:27] */ +#define PCIE_CFG_STATUS_COMMAND_SIGNALED_TARGET_ABORT_MASK 0x08000000 +#define PCIE_CFG_STATUS_COMMAND_SIGNALED_TARGET_ABORT_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_SIGNALED_TARGET_ABORT_BITS 1 +#define PCIE_CFG_STATUS_COMMAND_SIGNALED_TARGET_ABORT_SHIFT 27 + +/* PCIE_CFG :: STATUS_COMMAND :: DEVSEL_TIMING [26:25] */ +#define PCIE_CFG_STATUS_COMMAND_DEVSEL_TIMING_MASK 0x06000000 +#define PCIE_CFG_STATUS_COMMAND_DEVSEL_TIMING_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_DEVSEL_TIMING_BITS 2 +#define PCIE_CFG_STATUS_COMMAND_DEVSEL_TIMING_SHIFT 25 + +/* PCIE_CFG :: STATUS_COMMAND :: MASTER_DATA_PARITY_ERROR [24:24] */ +#define PCIE_CFG_STATUS_COMMAND_MASTER_DATA_PARITY_ERROR_MASK 0x01000000 +#define PCIE_CFG_STATUS_COMMAND_MASTER_DATA_PARITY_ERROR_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_MASTER_DATA_PARITY_ERROR_BITS 1 +#define PCIE_CFG_STATUS_COMMAND_MASTER_DATA_PARITY_ERROR_SHIFT 24 + +/* PCIE_CFG :: STATUS_COMMAND :: FAST_BACK_TO_BACK_CAPABLE [23:23] */ +#define PCIE_CFG_STATUS_COMMAND_FAST_BACK_TO_BACK_CAPABLE_MASK 0x00800000 +#define PCIE_CFG_STATUS_COMMAND_FAST_BACK_TO_BACK_CAPABLE_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_FAST_BACK_TO_BACK_CAPABLE_BITS 1 +#define PCIE_CFG_STATUS_COMMAND_FAST_BACK_TO_BACK_CAPABLE_SHIFT 23 + +/* PCIE_CFG :: STATUS_COMMAND :: RESERVED_0 [22:22] */ +#define PCIE_CFG_STATUS_COMMAND_RESERVED_0_MASK 0x00400000 +#define PCIE_CFG_STATUS_COMMAND_RESERVED_0_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_RESERVED_0_BITS 1 +#define PCIE_CFG_STATUS_COMMAND_RESERVED_0_SHIFT 22 + +/* PCIE_CFG :: STATUS_COMMAND :: CAPABLE_66MHZ [21:21] */ +#define PCIE_CFG_STATUS_COMMAND_CAPABLE_66MHZ_MASK 0x00200000 +#define PCIE_CFG_STATUS_COMMAND_CAPABLE_66MHZ_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_CAPABLE_66MHZ_BITS 1 +#define PCIE_CFG_STATUS_COMMAND_CAPABLE_66MHZ_SHIFT 21 + +/* PCIE_CFG :: STATUS_COMMAND :: CAPABILITIES_LIST [20:20] */ +#define PCIE_CFG_STATUS_COMMAND_CAPABILITIES_LIST_MASK 0x00100000 +#define PCIE_CFG_STATUS_COMMAND_CAPABILITIES_LIST_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_CAPABILITIES_LIST_BITS 1 +#define PCIE_CFG_STATUS_COMMAND_CAPABILITIES_LIST_SHIFT 20 + +/* PCIE_CFG :: STATUS_COMMAND :: INTERRUPT_STATUS [19:19] */ +#define PCIE_CFG_STATUS_COMMAND_INTERRUPT_STATUS_MASK 0x00080000 +#define PCIE_CFG_STATUS_COMMAND_INTERRUPT_STATUS_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_INTERRUPT_STATUS_BITS 1 +#define PCIE_CFG_STATUS_COMMAND_INTERRUPT_STATUS_SHIFT 19 + +/* PCIE_CFG :: STATUS_COMMAND :: RESERVED_1 [18:16] */ +#define PCIE_CFG_STATUS_COMMAND_RESERVED_1_MASK 0x00070000 +#define PCIE_CFG_STATUS_COMMAND_RESERVED_1_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_RESERVED_1_BITS 3 +#define PCIE_CFG_STATUS_COMMAND_RESERVED_1_SHIFT 16 + +/* PCIE_CFG :: STATUS_COMMAND :: RESERVED_2 [15:11] */ +#define PCIE_CFG_STATUS_COMMAND_RESERVED_2_MASK 0x0000f800 +#define PCIE_CFG_STATUS_COMMAND_RESERVED_2_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_RESERVED_2_BITS 5 +#define PCIE_CFG_STATUS_COMMAND_RESERVED_2_SHIFT 11 + +/* PCIE_CFG :: STATUS_COMMAND :: INTERRUPT_DISABLE [10:10] */ +#define PCIE_CFG_STATUS_COMMAND_INTERRUPT_DISABLE_MASK 0x00000400 +#define PCIE_CFG_STATUS_COMMAND_INTERRUPT_DISABLE_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_INTERRUPT_DISABLE_BITS 1 +#define PCIE_CFG_STATUS_COMMAND_INTERRUPT_DISABLE_SHIFT 10 + +/* PCIE_CFG :: STATUS_COMMAND :: FAST_BACK_TO_BACK_ENABLE [09:09] */ +#define PCIE_CFG_STATUS_COMMAND_FAST_BACK_TO_BACK_ENABLE_MASK 0x00000200 +#define PCIE_CFG_STATUS_COMMAND_FAST_BACK_TO_BACK_ENABLE_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_FAST_BACK_TO_BACK_ENABLE_BITS 1 +#define PCIE_CFG_STATUS_COMMAND_FAST_BACK_TO_BACK_ENABLE_SHIFT 9 + +/* PCIE_CFG :: STATUS_COMMAND :: SYSTEM_ERROR_ENABLE [08:08] */ +#define PCIE_CFG_STATUS_COMMAND_SYSTEM_ERROR_ENABLE_MASK 0x00000100 +#define PCIE_CFG_STATUS_COMMAND_SYSTEM_ERROR_ENABLE_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_SYSTEM_ERROR_ENABLE_BITS 1 +#define PCIE_CFG_STATUS_COMMAND_SYSTEM_ERROR_ENABLE_SHIFT 8 + +/* PCIE_CFG :: STATUS_COMMAND :: STEPPING_CONTROL [07:07] */ +#define PCIE_CFG_STATUS_COMMAND_STEPPING_CONTROL_MASK 0x00000080 +#define PCIE_CFG_STATUS_COMMAND_STEPPING_CONTROL_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_STEPPING_CONTROL_BITS 1 +#define PCIE_CFG_STATUS_COMMAND_STEPPING_CONTROL_SHIFT 7 + +/* PCIE_CFG :: STATUS_COMMAND :: PARITY_ERROR_ENABLE [06:06] */ +#define PCIE_CFG_STATUS_COMMAND_PARITY_ERROR_ENABLE_MASK 0x00000040 +#define PCIE_CFG_STATUS_COMMAND_PARITY_ERROR_ENABLE_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_PARITY_ERROR_ENABLE_BITS 1 +#define PCIE_CFG_STATUS_COMMAND_PARITY_ERROR_ENABLE_SHIFT 6 + +/* PCIE_CFG :: STATUS_COMMAND :: VGA_PALETTE_SNOOP [05:05] */ +#define PCIE_CFG_STATUS_COMMAND_VGA_PALETTE_SNOOP_MASK 0x00000020 +#define PCIE_CFG_STATUS_COMMAND_VGA_PALETTE_SNOOP_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_VGA_PALETTE_SNOOP_BITS 1 +#define PCIE_CFG_STATUS_COMMAND_VGA_PALETTE_SNOOP_SHIFT 5 + +/* PCIE_CFG :: STATUS_COMMAND :: MEMORY_WRITE_AND_INVALIDATE [04:04] */ +#define PCIE_CFG_STATUS_COMMAND_MEMORY_WRITE_AND_INVALIDATE_MASK 0x00000010 +#define PCIE_CFG_STATUS_COMMAND_MEMORY_WRITE_AND_INVALIDATE_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_MEMORY_WRITE_AND_INVALIDATE_BITS 1 +#define PCIE_CFG_STATUS_COMMAND_MEMORY_WRITE_AND_INVALIDATE_SHIFT 4 + +/* PCIE_CFG :: STATUS_COMMAND :: SPECIAL_CYCLES [03:03] */ +#define PCIE_CFG_STATUS_COMMAND_SPECIAL_CYCLES_MASK 0x00000008 +#define PCIE_CFG_STATUS_COMMAND_SPECIAL_CYCLES_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_SPECIAL_CYCLES_BITS 1 +#define PCIE_CFG_STATUS_COMMAND_SPECIAL_CYCLES_SHIFT 3 + +/* PCIE_CFG :: STATUS_COMMAND :: BUS_MASTER [02:02] */ +#define PCIE_CFG_STATUS_COMMAND_BUS_MASTER_MASK 0x00000004 +#define PCIE_CFG_STATUS_COMMAND_BUS_MASTER_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_BUS_MASTER_BITS 1 +#define PCIE_CFG_STATUS_COMMAND_BUS_MASTER_SHIFT 2 + +/* PCIE_CFG :: STATUS_COMMAND :: MEMORY_SPACE [01:01] */ +#define PCIE_CFG_STATUS_COMMAND_MEMORY_SPACE_MASK 0x00000002 +#define PCIE_CFG_STATUS_COMMAND_MEMORY_SPACE_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_MEMORY_SPACE_BITS 1 +#define PCIE_CFG_STATUS_COMMAND_MEMORY_SPACE_SHIFT 1 + +/* PCIE_CFG :: STATUS_COMMAND :: I_O_SPACE [00:00] */ +#define PCIE_CFG_STATUS_COMMAND_I_O_SPACE_MASK 0x00000001 +#define PCIE_CFG_STATUS_COMMAND_I_O_SPACE_ALIGN 0 +#define PCIE_CFG_STATUS_COMMAND_I_O_SPACE_BITS 1 +#define PCIE_CFG_STATUS_COMMAND_I_O_SPACE_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: PCI_CLASSCODE_AND_REVISION_ID + ***************************************************************************/ +/* PCIE_CFG :: PCI_CLASSCODE_AND_REVISION_ID :: PCI_CLASSCODE [31:08] */ +#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID_PCI_CLASSCODE_MASK 0xffffff00 +#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID_PCI_CLASSCODE_ALIGN 0 +#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID_PCI_CLASSCODE_BITS 24 +#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID_PCI_CLASSCODE_SHIFT 8 + +/* PCIE_CFG :: PCI_CLASSCODE_AND_REVISION_ID :: REVISION_ID [07:00] */ +#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID_REVISION_ID_MASK 0x000000ff +#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID_REVISION_ID_ALIGN 0 +#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID_REVISION_ID_BITS 8 +#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID_REVISION_ID_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE + ***************************************************************************/ +/* PCIE_CFG :: BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE :: BIST [31:24] */ +#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_BIST_MASK 0xff000000 +#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_BIST_ALIGN 0 +#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_BIST_BITS 8 +#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_BIST_SHIFT 24 + +/* PCIE_CFG :: BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE :: HEADER_TYPE [23:16] */ +#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_HEADER_TYPE_MASK 0x00ff0000 +#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_HEADER_TYPE_ALIGN 0 +#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_HEADER_TYPE_BITS 8 +#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_HEADER_TYPE_SHIFT 16 + +/* PCIE_CFG :: BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE :: LATENCY_TIMER [15:08] */ +#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_LATENCY_TIMER_MASK 0x0000ff00 +#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_LATENCY_TIMER_ALIGN 0 +#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_LATENCY_TIMER_BITS 8 +#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_LATENCY_TIMER_SHIFT 8 + +/* PCIE_CFG :: BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE :: CACHE_LINE_SIZE [07:00] */ +#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_CACHE_LINE_SIZE_MASK 0x000000ff +#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_CACHE_LINE_SIZE_ALIGN 0 +#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_CACHE_LINE_SIZE_BITS 8 +#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_CACHE_LINE_SIZE_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: BASE_ADDRESS_1 + ***************************************************************************/ +/* PCIE_CFG :: BASE_ADDRESS_1 :: BASE_ADDRESS [31:16] */ +#define PCIE_CFG_BASE_ADDRESS_1_BASE_ADDRESS_MASK 0xffff0000 +#define PCIE_CFG_BASE_ADDRESS_1_BASE_ADDRESS_ALIGN 0 +#define PCIE_CFG_BASE_ADDRESS_1_BASE_ADDRESS_BITS 16 +#define PCIE_CFG_BASE_ADDRESS_1_BASE_ADDRESS_SHIFT 16 + +/* PCIE_CFG :: BASE_ADDRESS_1 :: RESERVED_0 [15:04] */ +#define PCIE_CFG_BASE_ADDRESS_1_RESERVED_0_MASK 0x0000fff0 +#define PCIE_CFG_BASE_ADDRESS_1_RESERVED_0_ALIGN 0 +#define PCIE_CFG_BASE_ADDRESS_1_RESERVED_0_BITS 12 +#define PCIE_CFG_BASE_ADDRESS_1_RESERVED_0_SHIFT 4 + +/* PCIE_CFG :: BASE_ADDRESS_1 :: PREFETCHABLE [03:03] */ +#define PCIE_CFG_BASE_ADDRESS_1_PREFETCHABLE_MASK 0x00000008 +#define PCIE_CFG_BASE_ADDRESS_1_PREFETCHABLE_ALIGN 0 +#define PCIE_CFG_BASE_ADDRESS_1_PREFETCHABLE_BITS 1 +#define PCIE_CFG_BASE_ADDRESS_1_PREFETCHABLE_SHIFT 3 + +/* PCIE_CFG :: BASE_ADDRESS_1 :: TYPE [02:01] */ +#define PCIE_CFG_BASE_ADDRESS_1_TYPE_MASK 0x00000006 +#define PCIE_CFG_BASE_ADDRESS_1_TYPE_ALIGN 0 +#define PCIE_CFG_BASE_ADDRESS_1_TYPE_BITS 2 +#define PCIE_CFG_BASE_ADDRESS_1_TYPE_SHIFT 1 + +/* PCIE_CFG :: BASE_ADDRESS_1 :: MEMORY_SPACE_INDICATOR [00:00] */ +#define PCIE_CFG_BASE_ADDRESS_1_MEMORY_SPACE_INDICATOR_MASK 0x00000001 +#define PCIE_CFG_BASE_ADDRESS_1_MEMORY_SPACE_INDICATOR_ALIGN 0 +#define PCIE_CFG_BASE_ADDRESS_1_MEMORY_SPACE_INDICATOR_BITS 1 +#define PCIE_CFG_BASE_ADDRESS_1_MEMORY_SPACE_INDICATOR_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: BASE_ADDRESS_2 + ***************************************************************************/ +/* PCIE_CFG :: BASE_ADDRESS_2 :: EXTENDED_BASE_ADDRESS [31:00] */ +#define PCIE_CFG_BASE_ADDRESS_2_EXTENDED_BASE_ADDRESS_MASK 0xffffffff +#define PCIE_CFG_BASE_ADDRESS_2_EXTENDED_BASE_ADDRESS_ALIGN 0 +#define PCIE_CFG_BASE_ADDRESS_2_EXTENDED_BASE_ADDRESS_BITS 32 +#define PCIE_CFG_BASE_ADDRESS_2_EXTENDED_BASE_ADDRESS_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: BASE_ADDRESS_3 + ***************************************************************************/ +/* PCIE_CFG :: BASE_ADDRESS_3 :: BASE_ADDRESS_2 [31:22] */ +#define PCIE_CFG_BASE_ADDRESS_3_BASE_ADDRESS_2_MASK 0xffc00000 +#define PCIE_CFG_BASE_ADDRESS_3_BASE_ADDRESS_2_ALIGN 0 +#define PCIE_CFG_BASE_ADDRESS_3_BASE_ADDRESS_2_BITS 10 +#define PCIE_CFG_BASE_ADDRESS_3_BASE_ADDRESS_2_SHIFT 22 + +/* PCIE_CFG :: BASE_ADDRESS_3 :: RESERVED_0 [21:04] */ +#define PCIE_CFG_BASE_ADDRESS_3_RESERVED_0_MASK 0x003ffff0 +#define PCIE_CFG_BASE_ADDRESS_3_RESERVED_0_ALIGN 0 +#define PCIE_CFG_BASE_ADDRESS_3_RESERVED_0_BITS 18 +#define PCIE_CFG_BASE_ADDRESS_3_RESERVED_0_SHIFT 4 + +/* PCIE_CFG :: BASE_ADDRESS_3 :: PREFETCHABLE [03:03] */ +#define PCIE_CFG_BASE_ADDRESS_3_PREFETCHABLE_MASK 0x00000008 +#define PCIE_CFG_BASE_ADDRESS_3_PREFETCHABLE_ALIGN 0 +#define PCIE_CFG_BASE_ADDRESS_3_PREFETCHABLE_BITS 1 +#define PCIE_CFG_BASE_ADDRESS_3_PREFETCHABLE_SHIFT 3 + +/* PCIE_CFG :: BASE_ADDRESS_3 :: TYPE [02:01] */ +#define PCIE_CFG_BASE_ADDRESS_3_TYPE_MASK 0x00000006 +#define PCIE_CFG_BASE_ADDRESS_3_TYPE_ALIGN 0 +#define PCIE_CFG_BASE_ADDRESS_3_TYPE_BITS 2 +#define PCIE_CFG_BASE_ADDRESS_3_TYPE_SHIFT 1 + +/* PCIE_CFG :: BASE_ADDRESS_3 :: MEMORY_SPACE_INDICATOR [00:00] */ +#define PCIE_CFG_BASE_ADDRESS_3_MEMORY_SPACE_INDICATOR_MASK 0x00000001 +#define PCIE_CFG_BASE_ADDRESS_3_MEMORY_SPACE_INDICATOR_ALIGN 0 +#define PCIE_CFG_BASE_ADDRESS_3_MEMORY_SPACE_INDICATOR_BITS 1 +#define PCIE_CFG_BASE_ADDRESS_3_MEMORY_SPACE_INDICATOR_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: BASE_ADDRESS_4 + ***************************************************************************/ +/* PCIE_CFG :: BASE_ADDRESS_4 :: EXTENDED_BASE_ADDRESS_2 [31:00] */ +#define PCIE_CFG_BASE_ADDRESS_4_EXTENDED_BASE_ADDRESS_2_MASK 0xffffffff +#define PCIE_CFG_BASE_ADDRESS_4_EXTENDED_BASE_ADDRESS_2_ALIGN 0 +#define PCIE_CFG_BASE_ADDRESS_4_EXTENDED_BASE_ADDRESS_2_BITS 32 +#define PCIE_CFG_BASE_ADDRESS_4_EXTENDED_BASE_ADDRESS_2_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: CARDBUS_CIS_POINTER + ***************************************************************************/ +/* PCIE_CFG :: CARDBUS_CIS_POINTER :: CARDBUS_CIS_POINTER [31:00] */ +#define PCIE_CFG_CARDBUS_CIS_POINTER_CARDBUS_CIS_POINTER_MASK 0xffffffff +#define PCIE_CFG_CARDBUS_CIS_POINTER_CARDBUS_CIS_POINTER_ALIGN 0 +#define PCIE_CFG_CARDBUS_CIS_POINTER_CARDBUS_CIS_POINTER_BITS 32 +#define PCIE_CFG_CARDBUS_CIS_POINTER_CARDBUS_CIS_POINTER_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: SUBSYSTEM_DEVICE_VENDOR_ID + ***************************************************************************/ +/* PCIE_CFG :: SUBSYSTEM_DEVICE_VENDOR_ID :: SUBSYSTEM_DEVICE_ID [31:16] */ +#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID_SUBSYSTEM_DEVICE_ID_MASK 0xffff0000 +#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID_SUBSYSTEM_DEVICE_ID_ALIGN 0 +#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID_SUBSYSTEM_DEVICE_ID_BITS 16 +#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID_SUBSYSTEM_DEVICE_ID_SHIFT 16 + +/* PCIE_CFG :: SUBSYSTEM_DEVICE_VENDOR_ID :: SUBSYSTEM_VENDOR_ID [15:00] */ +#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID_SUBSYSTEM_VENDOR_ID_MASK 0x0000ffff +#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID_SUBSYSTEM_VENDOR_ID_ALIGN 0 +#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID_SUBSYSTEM_VENDOR_ID_BITS 16 +#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID_SUBSYSTEM_VENDOR_ID_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: EXPANSION_ROM_BASE_ADDRESS + ***************************************************************************/ +/* PCIE_CFG :: EXPANSION_ROM_BASE_ADDRESS :: ROM_BASE_ADDRESS [31:16] */ +#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_ROM_BASE_ADDRESS_MASK 0xffff0000 +#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_ROM_BASE_ADDRESS_ALIGN 0 +#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_ROM_BASE_ADDRESS_BITS 16 +#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_ROM_BASE_ADDRESS_SHIFT 16 + +/* PCIE_CFG :: EXPANSION_ROM_BASE_ADDRESS :: ROM_SIZE_INDICATION [15:11] */ +#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_ROM_SIZE_INDICATION_MASK 0x0000f800 +#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_ROM_SIZE_INDICATION_ALIGN 0 +#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_ROM_SIZE_INDICATION_BITS 5 +#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_ROM_SIZE_INDICATION_SHIFT 11 + +/* PCIE_CFG :: EXPANSION_ROM_BASE_ADDRESS :: RESERVED_0 [10:01] */ +#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_RESERVED_0_MASK 0x000007fe +#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_RESERVED_0_ALIGN 0 +#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_RESERVED_0_BITS 10 +#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_RESERVED_0_SHIFT 1 + +/* PCIE_CFG :: EXPANSION_ROM_BASE_ADDRESS :: EXPANSION_ROM_ENABLE [00:00] */ +#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_EXPANSION_ROM_ENABLE_MASK 0x00000001 +#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_EXPANSION_ROM_ENABLE_ALIGN 0 +#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_EXPANSION_ROM_ENABLE_BITS 1 +#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_EXPANSION_ROM_ENABLE_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: CAPABILITIES_POINTER + ***************************************************************************/ +/* PCIE_CFG :: CAPABILITIES_POINTER :: CAPABILITIES_POINTER [31:00] */ +#define PCIE_CFG_CAPABILITIES_POINTER_CAPABILITIES_POINTER_MASK 0xffffffff +#define PCIE_CFG_CAPABILITIES_POINTER_CAPABILITIES_POINTER_ALIGN 0 +#define PCIE_CFG_CAPABILITIES_POINTER_CAPABILITIES_POINTER_BITS 32 +#define PCIE_CFG_CAPABILITIES_POINTER_CAPABILITIES_POINTER_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: INTERRUPT + ***************************************************************************/ +/* PCIE_CFG :: INTERRUPT :: RESERVED_0 [31:16] */ +#define PCIE_CFG_INTERRUPT_RESERVED_0_MASK 0xffff0000 +#define PCIE_CFG_INTERRUPT_RESERVED_0_ALIGN 0 +#define PCIE_CFG_INTERRUPT_RESERVED_0_BITS 16 +#define PCIE_CFG_INTERRUPT_RESERVED_0_SHIFT 16 + +/* PCIE_CFG :: INTERRUPT :: INTERRUPT_PIN [15:08] */ +#define PCIE_CFG_INTERRUPT_INTERRUPT_PIN_MASK 0x0000ff00 +#define PCIE_CFG_INTERRUPT_INTERRUPT_PIN_ALIGN 0 +#define PCIE_CFG_INTERRUPT_INTERRUPT_PIN_BITS 8 +#define PCIE_CFG_INTERRUPT_INTERRUPT_PIN_SHIFT 8 + +/* PCIE_CFG :: INTERRUPT :: INTERRUPT_LINE [07:00] */ +#define PCIE_CFG_INTERRUPT_INTERRUPT_LINE_MASK 0x000000ff +#define PCIE_CFG_INTERRUPT_INTERRUPT_LINE_ALIGN 0 +#define PCIE_CFG_INTERRUPT_INTERRUPT_LINE_BITS 8 +#define PCIE_CFG_INTERRUPT_INTERRUPT_LINE_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: VPD_CAPABILITIES + ***************************************************************************/ +/* PCIE_CFG :: VPD_CAPABILITIES :: RESERVED_0 [31:00] */ +#define PCIE_CFG_VPD_CAPABILITIES_RESERVED_0_MASK 0xffffffff +#define PCIE_CFG_VPD_CAPABILITIES_RESERVED_0_ALIGN 0 +#define PCIE_CFG_VPD_CAPABILITIES_RESERVED_0_BITS 32 +#define PCIE_CFG_VPD_CAPABILITIES_RESERVED_0_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: VPD_DATA + ***************************************************************************/ +/* PCIE_CFG :: VPD_DATA :: RESERVED_0 [31:00] */ +#define PCIE_CFG_VPD_DATA_RESERVED_0_MASK 0xffffffff +#define PCIE_CFG_VPD_DATA_RESERVED_0_ALIGN 0 +#define PCIE_CFG_VPD_DATA_RESERVED_0_BITS 32 +#define PCIE_CFG_VPD_DATA_RESERVED_0_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY + ***************************************************************************/ +/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: PME_SUPPORT [31:27] */ +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_PME_SUPPORT_MASK 0xf8000000 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_PME_SUPPORT_ALIGN 0 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_PME_SUPPORT_BITS 5 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_PME_SUPPORT_SHIFT 27 + +/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: D2_SUPPORT [26:26] */ +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_D2_SUPPORT_MASK 0x04000000 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_D2_SUPPORT_ALIGN 0 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_D2_SUPPORT_BITS 1 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_D2_SUPPORT_SHIFT 26 + +/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: D1_SUPPORT [25:25] */ +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_D1_SUPPORT_MASK 0x02000000 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_D1_SUPPORT_ALIGN 0 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_D1_SUPPORT_BITS 1 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_D1_SUPPORT_SHIFT 25 + +/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: AUX_CURRENT [24:22] */ +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_AUX_CURRENT_MASK 0x01c00000 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_AUX_CURRENT_ALIGN 0 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_AUX_CURRENT_BITS 3 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_AUX_CURRENT_SHIFT 22 + +/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: DSI [21:21] */ +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_DSI_MASK 0x00200000 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_DSI_ALIGN 0 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_DSI_BITS 1 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_DSI_SHIFT 21 + +/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: RESERVED_0 [20:20] */ +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_RESERVED_0_MASK 0x00100000 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_RESERVED_0_ALIGN 0 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_RESERVED_0_BITS 1 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_RESERVED_0_SHIFT 20 + +/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: PME_CLOCK [19:19] */ +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_PME_CLOCK_MASK 0x00080000 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_PME_CLOCK_ALIGN 0 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_PME_CLOCK_BITS 1 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_PME_CLOCK_SHIFT 19 + +/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: VERSION [18:16] */ +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_VERSION_MASK 0x00070000 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_VERSION_ALIGN 0 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_VERSION_BITS 3 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_VERSION_SHIFT 16 + +/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: NEXT_POINTER [15:08] */ +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_NEXT_POINTER_MASK 0x0000ff00 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_NEXT_POINTER_ALIGN 0 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_NEXT_POINTER_BITS 8 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_NEXT_POINTER_SHIFT 8 + +/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: CAPABILITY_ID [07:00] */ +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_CAPABILITY_ID_MASK 0x000000ff +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_CAPABILITY_ID_ALIGN 0 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_CAPABILITY_ID_BITS 8 +#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_CAPABILITY_ID_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS + ***************************************************************************/ +/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: PM_DATA [31:24] */ +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PM_DATA_MASK 0xff000000 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PM_DATA_ALIGN 0 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PM_DATA_BITS 8 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PM_DATA_SHIFT 24 + +/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: RESERVED_0 [23:16] */ +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_0_MASK 0x00ff0000 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_0_ALIGN 0 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_0_BITS 8 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_0_SHIFT 16 + +/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: PME_STATUS [15:15] */ +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PME_STATUS_MASK 0x00008000 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PME_STATUS_ALIGN 0 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PME_STATUS_BITS 1 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PME_STATUS_SHIFT 15 + +/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: DATA_SCALE [14:13] */ +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_DATA_SCALE_MASK 0x00006000 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_DATA_SCALE_ALIGN 0 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_DATA_SCALE_BITS 2 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_DATA_SCALE_SHIFT 13 + +/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: DATA_SELECT [12:09] */ +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_DATA_SELECT_MASK 0x00001e00 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_DATA_SELECT_ALIGN 0 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_DATA_SELECT_BITS 4 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_DATA_SELECT_SHIFT 9 + +/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: PME_ENABLE [08:08] */ +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PME_ENABLE_MASK 0x00000100 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PME_ENABLE_ALIGN 0 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PME_ENABLE_BITS 1 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PME_ENABLE_SHIFT 8 + +/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: RESERVED_1 [07:04] */ +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_1_MASK 0x000000f0 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_1_ALIGN 0 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_1_BITS 4 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_1_SHIFT 4 + +/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: NO_SOFT_RESET [03:03] */ +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_NO_SOFT_RESET_MASK 0x00000008 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_NO_SOFT_RESET_ALIGN 0 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_NO_SOFT_RESET_BITS 1 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_NO_SOFT_RESET_SHIFT 3 + +/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: RESERVED_2 [02:02] */ +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_2_MASK 0x00000004 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_2_ALIGN 0 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_2_BITS 1 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_2_SHIFT 2 + +/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: POWER_STATE [01:00] */ +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_POWER_STATE_MASK 0x00000003 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_POWER_STATE_ALIGN 0 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_POWER_STATE_BITS 2 +#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_POWER_STATE_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: MSI_CAPABILITY_HEADER + ***************************************************************************/ +/* PCIE_CFG :: MSI_CAPABILITY_HEADER :: MSI_CONTROL [31:24] */ +#define PCIE_CFG_MSI_CAPABILITY_HEADER_MSI_CONTROL_MASK 0xff000000 +#define PCIE_CFG_MSI_CAPABILITY_HEADER_MSI_CONTROL_ALIGN 0 +#define PCIE_CFG_MSI_CAPABILITY_HEADER_MSI_CONTROL_BITS 8 +#define PCIE_CFG_MSI_CAPABILITY_HEADER_MSI_CONTROL_SHIFT 24 + +/* PCIE_CFG :: MSI_CAPABILITY_HEADER :: ADDRESS_CAPABLE_64_BIT [23:23] */ +#define PCIE_CFG_MSI_CAPABILITY_HEADER_ADDRESS_CAPABLE_64_BIT_MASK 0x00800000 +#define PCIE_CFG_MSI_CAPABILITY_HEADER_ADDRESS_CAPABLE_64_BIT_ALIGN 0 +#define PCIE_CFG_MSI_CAPABILITY_HEADER_ADDRESS_CAPABLE_64_BIT_BITS 1 +#define PCIE_CFG_MSI_CAPABILITY_HEADER_ADDRESS_CAPABLE_64_BIT_SHIFT 23 + +/* PCIE_CFG :: MSI_CAPABILITY_HEADER :: MULTIPLE_MESSAGE_ENABLE [22:20] */ +#define PCIE_CFG_MSI_CAPABILITY_HEADER_MULTIPLE_MESSAGE_ENABLE_MASK 0x00700000 +#define PCIE_CFG_MSI_CAPABILITY_HEADER_MULTIPLE_MESSAGE_ENABLE_ALIGN 0 +#define PCIE_CFG_MSI_CAPABILITY_HEADER_MULTIPLE_MESSAGE_ENABLE_BITS 3 +#define PCIE_CFG_MSI_CAPABILITY_HEADER_MULTIPLE_MESSAGE_ENABLE_SHIFT 20 + +/* PCIE_CFG :: MSI_CAPABILITY_HEADER :: MULTIPLE_MESSAGE_CAPABLE [19:17] */ +#define PCIE_CFG_MSI_CAPABILITY_HEADER_MULTIPLE_MESSAGE_CAPABLE_MASK 0x000e0000 +#define PCIE_CFG_MSI_CAPABILITY_HEADER_MULTIPLE_MESSAGE_CAPABLE_ALIGN 0 +#define PCIE_CFG_MSI_CAPABILITY_HEADER_MULTIPLE_MESSAGE_CAPABLE_BITS 3 +#define PCIE_CFG_MSI_CAPABILITY_HEADER_MULTIPLE_MESSAGE_CAPABLE_SHIFT 17 + +/* PCIE_CFG :: MSI_CAPABILITY_HEADER :: MSI_ENABLE [16:16] */ +#define PCIE_CFG_MSI_CAPABILITY_HEADER_MSI_ENABLE_MASK 0x00010000 +#define PCIE_CFG_MSI_CAPABILITY_HEADER_MSI_ENABLE_ALIGN 0 +#define PCIE_CFG_MSI_CAPABILITY_HEADER_MSI_ENABLE_BITS 1 +#define PCIE_CFG_MSI_CAPABILITY_HEADER_MSI_ENABLE_SHIFT 16 + +/* PCIE_CFG :: MSI_CAPABILITY_HEADER :: NEXT_POINTER [15:08] */ +#define PCIE_CFG_MSI_CAPABILITY_HEADER_NEXT_POINTER_MASK 0x0000ff00 +#define PCIE_CFG_MSI_CAPABILITY_HEADER_NEXT_POINTER_ALIGN 0 +#define PCIE_CFG_MSI_CAPABILITY_HEADER_NEXT_POINTER_BITS 8 +#define PCIE_CFG_MSI_CAPABILITY_HEADER_NEXT_POINTER_SHIFT 8 + +/* PCIE_CFG :: MSI_CAPABILITY_HEADER :: CAPABILITY_ID [07:00] */ +#define PCIE_CFG_MSI_CAPABILITY_HEADER_CAPABILITY_ID_MASK 0x000000ff +#define PCIE_CFG_MSI_CAPABILITY_HEADER_CAPABILITY_ID_ALIGN 0 +#define PCIE_CFG_MSI_CAPABILITY_HEADER_CAPABILITY_ID_BITS 8 +#define PCIE_CFG_MSI_CAPABILITY_HEADER_CAPABILITY_ID_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: MSI_LOWER_ADDRESS + ***************************************************************************/ +/* PCIE_CFG :: MSI_LOWER_ADDRESS :: MSI_LOWER_ADDRESS [31:02] */ +#define PCIE_CFG_MSI_LOWER_ADDRESS_MSI_LOWER_ADDRESS_MASK 0xfffffffc +#define PCIE_CFG_MSI_LOWER_ADDRESS_MSI_LOWER_ADDRESS_ALIGN 0 +#define PCIE_CFG_MSI_LOWER_ADDRESS_MSI_LOWER_ADDRESS_BITS 30 +#define PCIE_CFG_MSI_LOWER_ADDRESS_MSI_LOWER_ADDRESS_SHIFT 2 + +/* PCIE_CFG :: MSI_LOWER_ADDRESS :: RESERVED_0 [01:00] */ +#define PCIE_CFG_MSI_LOWER_ADDRESS_RESERVED_0_MASK 0x00000003 +#define PCIE_CFG_MSI_LOWER_ADDRESS_RESERVED_0_ALIGN 0 +#define PCIE_CFG_MSI_LOWER_ADDRESS_RESERVED_0_BITS 2 +#define PCIE_CFG_MSI_LOWER_ADDRESS_RESERVED_0_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: MSI_UPPER_ADDRESS_REGISTER + ***************************************************************************/ +/* PCIE_CFG :: MSI_UPPER_ADDRESS_REGISTER :: MSI_UPPER_ADDRESS [31:00] */ +#define PCIE_CFG_MSI_UPPER_ADDRESS_REGISTER_MSI_UPPER_ADDRESS_MASK 0xffffffff +#define PCIE_CFG_MSI_UPPER_ADDRESS_REGISTER_MSI_UPPER_ADDRESS_ALIGN 0 +#define PCIE_CFG_MSI_UPPER_ADDRESS_REGISTER_MSI_UPPER_ADDRESS_BITS 32 +#define PCIE_CFG_MSI_UPPER_ADDRESS_REGISTER_MSI_UPPER_ADDRESS_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: MSI_DATA + ***************************************************************************/ +/* PCIE_CFG :: MSI_DATA :: RESERVED_0 [31:16] */ +#define PCIE_CFG_MSI_DATA_RESERVED_0_MASK 0xffff0000 +#define PCIE_CFG_MSI_DATA_RESERVED_0_ALIGN 0 +#define PCIE_CFG_MSI_DATA_RESERVED_0_BITS 16 +#define PCIE_CFG_MSI_DATA_RESERVED_0_SHIFT 16 + +/* PCIE_CFG :: MSI_DATA :: MSI_DATA [15:00] */ +#define PCIE_CFG_MSI_DATA_MSI_DATA_MASK 0x0000ffff +#define PCIE_CFG_MSI_DATA_MSI_DATA_ALIGN 0 +#define PCIE_CFG_MSI_DATA_MSI_DATA_BITS 16 +#define PCIE_CFG_MSI_DATA_MSI_DATA_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER + ***************************************************************************/ +/* PCIE_CFG :: BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER :: RESERVED_0 [31:24] */ +#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_RESERVED_0_MASK 0xff000000 +#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_RESERVED_0_ALIGN 0 +#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_RESERVED_0_BITS 8 +#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_RESERVED_0_SHIFT 24 + +/* PCIE_CFG :: BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER :: VENDOR_SPECIFIC_CAPABILITY_LENGTH [23:16] */ +#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_VENDOR_SPECIFIC_CAPABILITY_LENGTH_MASK 0x00ff0000 +#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_VENDOR_SPECIFIC_CAPABILITY_LENGTH_ALIGN 0 +#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_VENDOR_SPECIFIC_CAPABILITY_LENGTH_BITS 8 +#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_VENDOR_SPECIFIC_CAPABILITY_LENGTH_SHIFT 16 + +/* PCIE_CFG :: BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER :: NEXT_POINTER [15:08] */ +#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_NEXT_POINTER_MASK 0x0000ff00 +#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_NEXT_POINTER_ALIGN 0 +#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_NEXT_POINTER_BITS 8 +#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_NEXT_POINTER_SHIFT 8 + +/* PCIE_CFG :: BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER :: CAPABILITY_ID [07:00] */ +#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_CAPABILITY_ID_MASK 0x000000ff +#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_CAPABILITY_ID_ALIGN 0 +#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_CAPABILITY_ID_BITS 8 +#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_CAPABILITY_ID_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: RESET_COUNTERS_INITIAL_VALUES + ***************************************************************************/ +/* PCIE_CFG :: RESET_COUNTERS_INITIAL_VALUES :: POR_RESET_COUNTER [31:28] */ +#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_POR_RESET_COUNTER_MASK 0xf0000000 +#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_POR_RESET_COUNTER_ALIGN 0 +#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_POR_RESET_COUNTER_BITS 4 +#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_POR_RESET_COUNTER_SHIFT 28 + +/* PCIE_CFG :: RESET_COUNTERS_INITIAL_VALUES :: HOT_RESET_COUNTER [27:24] */ +#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_HOT_RESET_COUNTER_MASK 0x0f000000 +#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_HOT_RESET_COUNTER_ALIGN 0 +#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_HOT_RESET_COUNTER_BITS 4 +#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_HOT_RESET_COUNTER_SHIFT 24 + +/* PCIE_CFG :: RESET_COUNTERS_INITIAL_VALUES :: GRC_RESET_COUNTER [23:16] */ +#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_GRC_RESET_COUNTER_MASK 0x00ff0000 +#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_GRC_RESET_COUNTER_ALIGN 0 +#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_GRC_RESET_COUNTER_BITS 8 +#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_GRC_RESET_COUNTER_SHIFT 16 + +/* PCIE_CFG :: RESET_COUNTERS_INITIAL_VALUES :: PERST_RESET_COUNTER [15:08] */ +#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_PERST_RESET_COUNTER_MASK 0x0000ff00 +#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_PERST_RESET_COUNTER_ALIGN 0 +#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_PERST_RESET_COUNTER_BITS 8 +#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_PERST_RESET_COUNTER_SHIFT 8 + +/* PCIE_CFG :: RESET_COUNTERS_INITIAL_VALUES :: LINKDOWN_RESET_COUNTER [07:00] */ +#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_LINKDOWN_RESET_COUNTER_MASK 0x000000ff +#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_LINKDOWN_RESET_COUNTER_ALIGN 0 +#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_LINKDOWN_RESET_COUNTER_BITS 8 +#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_LINKDOWN_RESET_COUNTER_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL + ***************************************************************************/ +/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: PRODUCT_ID [31:24] */ +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_PRODUCT_ID_MASK 0xff000000 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_PRODUCT_ID_ALIGN 0 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_PRODUCT_ID_BITS 8 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_PRODUCT_ID_SHIFT 24 + +/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ASIC_REVISION_ID [23:16] */ +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ASIC_REVISION_ID_MASK 0x00ff0000 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ASIC_REVISION_ID_ALIGN 0 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ASIC_REVISION_ID_BITS 8 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ASIC_REVISION_ID_SHIFT 16 + +/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ENABLE_TLP_MINOR_ERROR_TOLERANCE [15:15] */ +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_TLP_MINOR_ERROR_TOLERANCE_MASK 0x00008000 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_TLP_MINOR_ERROR_TOLERANCE_ALIGN 0 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_TLP_MINOR_ERROR_TOLERANCE_BITS 1 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_TLP_MINOR_ERROR_TOLERANCE_SHIFT 15 + +/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: LOG_HEADER_OVERFLOW [14:14] */ +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_LOG_HEADER_OVERFLOW_MASK 0x00004000 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_LOG_HEADER_OVERFLOW_ALIGN 0 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_LOG_HEADER_OVERFLOW_BITS 1 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_LOG_HEADER_OVERFLOW_SHIFT 14 + +/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: BOUNDARY_CHECK [13:13] */ +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_BOUNDARY_CHECK_MASK 0x00002000 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_BOUNDARY_CHECK_ALIGN 0 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_BOUNDARY_CHECK_BITS 1 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_BOUNDARY_CHECK_SHIFT 13 + +/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: BYTE_ENABLE_RULE_CHECK [12:12] */ +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_BYTE_ENABLE_RULE_CHECK_MASK 0x00001000 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_BYTE_ENABLE_RULE_CHECK_ALIGN 0 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_BYTE_ENABLE_RULE_CHECK_BITS 1 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_BYTE_ENABLE_RULE_CHECK_SHIFT 12 + +/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: INTERRUPT_CHECK [11:11] */ +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_INTERRUPT_CHECK_MASK 0x00000800 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_INTERRUPT_CHECK_ALIGN 0 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_INTERRUPT_CHECK_BITS 1 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_INTERRUPT_CHECK_SHIFT 11 + +/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: RCB_CHECK [10:10] */ +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_RCB_CHECK_MASK 0x00000400 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_RCB_CHECK_ALIGN 0 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_RCB_CHECK_BITS 1 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_RCB_CHECK_SHIFT 10 + +/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ENABLE_TAGGED_STATUS_MODE [09:09] */ +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_TAGGED_STATUS_MODE_MASK 0x00000200 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_TAGGED_STATUS_MODE_ALIGN 0 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_TAGGED_STATUS_MODE_BITS 1 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_TAGGED_STATUS_MODE_SHIFT 9 + +/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: MASK_INTERRUPT_MODE [08:08] */ +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_MASK_INTERRUPT_MODE_MASK 0x00000100 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_MASK_INTERRUPT_MODE_ALIGN 0 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_MASK_INTERRUPT_MODE_BITS 1 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_MASK_INTERRUPT_MODE_SHIFT 8 + +/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ENABLE_INDIRECT_ACCESS [07:07] */ +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_INDIRECT_ACCESS_MASK 0x00000080 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_INDIRECT_ACCESS_ALIGN 0 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_INDIRECT_ACCESS_BITS 1 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_INDIRECT_ACCESS_SHIFT 7 + +/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ENABLE_REGISTER_WORD_SWAP [06:06] */ +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_REGISTER_WORD_SWAP_MASK 0x00000040 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_REGISTER_WORD_SWAP_ALIGN 0 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_REGISTER_WORD_SWAP_BITS 1 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_REGISTER_WORD_SWAP_SHIFT 6 + +/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ENABLE_CLOCK_CONTROL_REGISTER_READ_WRITE_CAPABILITY [05:05] */ +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_CLOCK_CONTROL_REGISTER_READ_WRITE_CAPABILITY_MASK 0x00000020 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_CLOCK_CONTROL_REGISTER_READ_WRITE_CAPABILITY_ALIGN 0 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_CLOCK_CONTROL_REGISTER_READ_WRITE_CAPABILITY_BITS 1 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_CLOCK_CONTROL_REGISTER_READ_WRITE_CAPABILITY_SHIFT 5 + +/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ENABLE_PCI_STATE_REGISTER_READ_WRITE_CAPABILITY [04:04] */ +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_PCI_STATE_REGISTER_READ_WRITE_CAPABILITY_MASK 0x00000010 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_PCI_STATE_REGISTER_READ_WRITE_CAPABILITY_ALIGN 0 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_PCI_STATE_REGISTER_READ_WRITE_CAPABILITY_BITS 1 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_PCI_STATE_REGISTER_READ_WRITE_CAPABILITY_SHIFT 4 + +/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ENABLE_ENDIAN_WORD_SWAP [03:03] */ +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_ENDIAN_WORD_SWAP_MASK 0x00000008 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_ENDIAN_WORD_SWAP_ALIGN 0 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_ENDIAN_WORD_SWAP_BITS 1 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_ENDIAN_WORD_SWAP_SHIFT 3 + +/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ENABLE_ENDIAN_BYTE_SWAP [02:02] */ +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_ENDIAN_BYTE_SWAP_MASK 0x00000004 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_ENDIAN_BYTE_SWAP_ALIGN 0 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_ENDIAN_BYTE_SWAP_BITS 1 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_ENDIAN_BYTE_SWAP_SHIFT 2 + +/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: MASK_INTERRUPT [01:01] */ +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_MASK_INTERRUPT_MASK 0x00000002 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_MASK_INTERRUPT_ALIGN 0 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_MASK_INTERRUPT_BITS 1 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_MASK_INTERRUPT_SHIFT 1 + +/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: CLEAR_INTERRUPT [00:00] */ +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_CLEAR_INTERRUPT_MASK 0x00000001 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_CLEAR_INTERRUPT_ALIGN 0 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_CLEAR_INTERRUPT_BITS 1 +#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_CLEAR_INTERRUPT_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: SPARE + ***************************************************************************/ +/* PCIE_CFG :: SPARE :: UNUSED_0 [31:16] */ +#define PCIE_CFG_SPARE_UNUSED_0_MASK 0xffff0000 +#define PCIE_CFG_SPARE_UNUSED_0_ALIGN 0 +#define PCIE_CFG_SPARE_UNUSED_0_BITS 16 +#define PCIE_CFG_SPARE_UNUSED_0_SHIFT 16 + +/* PCIE_CFG :: SPARE :: RESERVED_0 [15:15] */ +#define PCIE_CFG_SPARE_RESERVED_0_MASK 0x00008000 +#define PCIE_CFG_SPARE_RESERVED_0_ALIGN 0 +#define PCIE_CFG_SPARE_RESERVED_0_BITS 1 +#define PCIE_CFG_SPARE_RESERVED_0_SHIFT 15 + +/* PCIE_CFG :: SPARE :: UNUSED_1 [14:02] */ +#define PCIE_CFG_SPARE_UNUSED_1_MASK 0x00007ffc +#define PCIE_CFG_SPARE_UNUSED_1_ALIGN 0 +#define PCIE_CFG_SPARE_UNUSED_1_BITS 13 +#define PCIE_CFG_SPARE_UNUSED_1_SHIFT 2 + +/* PCIE_CFG :: SPARE :: BAR2_TARGET_WORD_SWAP [01:01] */ +#define PCIE_CFG_SPARE_BAR2_TARGET_WORD_SWAP_MASK 0x00000002 +#define PCIE_CFG_SPARE_BAR2_TARGET_WORD_SWAP_ALIGN 0 +#define PCIE_CFG_SPARE_BAR2_TARGET_WORD_SWAP_BITS 1 +#define PCIE_CFG_SPARE_BAR2_TARGET_WORD_SWAP_SHIFT 1 + +/* PCIE_CFG :: SPARE :: BAR2_TARGET_BYTE_SWAP [00:00] */ +#define PCIE_CFG_SPARE_BAR2_TARGET_BYTE_SWAP_MASK 0x00000001 +#define PCIE_CFG_SPARE_BAR2_TARGET_BYTE_SWAP_ALIGN 0 +#define PCIE_CFG_SPARE_BAR2_TARGET_BYTE_SWAP_BITS 1 +#define PCIE_CFG_SPARE_BAR2_TARGET_BYTE_SWAP_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: PCI_STATE + ***************************************************************************/ +/* PCIE_CFG :: PCI_STATE :: RESERVED_0 [31:16] */ +#define PCIE_CFG_PCI_STATE_RESERVED_0_MASK 0xffff0000 +#define PCIE_CFG_PCI_STATE_RESERVED_0_ALIGN 0 +#define PCIE_CFG_PCI_STATE_RESERVED_0_BITS 16 +#define PCIE_CFG_PCI_STATE_RESERVED_0_SHIFT 16 + +/* PCIE_CFG :: PCI_STATE :: CONFIG_RETRY [15:15] */ +#define PCIE_CFG_PCI_STATE_CONFIG_RETRY_MASK 0x00008000 +#define PCIE_CFG_PCI_STATE_CONFIG_RETRY_ALIGN 0 +#define PCIE_CFG_PCI_STATE_CONFIG_RETRY_BITS 1 +#define PCIE_CFG_PCI_STATE_CONFIG_RETRY_SHIFT 15 + +/* PCIE_CFG :: PCI_STATE :: RESERVED_1 [14:12] */ +#define PCIE_CFG_PCI_STATE_RESERVED_1_MASK 0x00007000 +#define PCIE_CFG_PCI_STATE_RESERVED_1_ALIGN 0 +#define PCIE_CFG_PCI_STATE_RESERVED_1_BITS 3 +#define PCIE_CFG_PCI_STATE_RESERVED_1_SHIFT 12 + +/* PCIE_CFG :: PCI_STATE :: MAX_PCI_TARGET_RETRY [11:09] */ +#define PCIE_CFG_PCI_STATE_MAX_PCI_TARGET_RETRY_MASK 0x00000e00 +#define PCIE_CFG_PCI_STATE_MAX_PCI_TARGET_RETRY_ALIGN 0 +#define PCIE_CFG_PCI_STATE_MAX_PCI_TARGET_RETRY_BITS 3 +#define PCIE_CFG_PCI_STATE_MAX_PCI_TARGET_RETRY_SHIFT 9 + +/* PCIE_CFG :: PCI_STATE :: FLAT_VIEW [08:08] */ +#define PCIE_CFG_PCI_STATE_FLAT_VIEW_MASK 0x00000100 +#define PCIE_CFG_PCI_STATE_FLAT_VIEW_ALIGN 0 +#define PCIE_CFG_PCI_STATE_FLAT_VIEW_BITS 1 +#define PCIE_CFG_PCI_STATE_FLAT_VIEW_SHIFT 8 + +/* PCIE_CFG :: PCI_STATE :: VPD_AVAILABLE [07:07] */ +#define PCIE_CFG_PCI_STATE_VPD_AVAILABLE_MASK 0x00000080 +#define PCIE_CFG_PCI_STATE_VPD_AVAILABLE_ALIGN 0 +#define PCIE_CFG_PCI_STATE_VPD_AVAILABLE_BITS 1 +#define PCIE_CFG_PCI_STATE_VPD_AVAILABLE_SHIFT 7 + +/* PCIE_CFG :: PCI_STATE :: PCI_EXPANSION_ROM_RETRY [06:06] */ +#define PCIE_CFG_PCI_STATE_PCI_EXPANSION_ROM_RETRY_MASK 0x00000040 +#define PCIE_CFG_PCI_STATE_PCI_EXPANSION_ROM_RETRY_ALIGN 0 +#define PCIE_CFG_PCI_STATE_PCI_EXPANSION_ROM_RETRY_BITS 1 +#define PCIE_CFG_PCI_STATE_PCI_EXPANSION_ROM_RETRY_SHIFT 6 + +/* PCIE_CFG :: PCI_STATE :: PCI_EXPANSION_ROM_DESIRED [05:05] */ +#define PCIE_CFG_PCI_STATE_PCI_EXPANSION_ROM_DESIRED_MASK 0x00000020 +#define PCIE_CFG_PCI_STATE_PCI_EXPANSION_ROM_DESIRED_ALIGN 0 +#define PCIE_CFG_PCI_STATE_PCI_EXPANSION_ROM_DESIRED_BITS 1 +#define PCIE_CFG_PCI_STATE_PCI_EXPANSION_ROM_DESIRED_SHIFT 5 + +/* PCIE_CFG :: PCI_STATE :: RESERVED_2 [04:00] */ +#define PCIE_CFG_PCI_STATE_RESERVED_2_MASK 0x0000001f +#define PCIE_CFG_PCI_STATE_RESERVED_2_ALIGN 0 +#define PCIE_CFG_PCI_STATE_RESERVED_2_BITS 5 +#define PCIE_CFG_PCI_STATE_RESERVED_2_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: CLOCK_CONTROL + ***************************************************************************/ +/* PCIE_CFG :: CLOCK_CONTROL :: PL_CLOCK_DISABLE [31:31] */ +#define PCIE_CFG_CLOCK_CONTROL_PL_CLOCK_DISABLE_MASK 0x80000000 +#define PCIE_CFG_CLOCK_CONTROL_PL_CLOCK_DISABLE_ALIGN 0 +#define PCIE_CFG_CLOCK_CONTROL_PL_CLOCK_DISABLE_BITS 1 +#define PCIE_CFG_CLOCK_CONTROL_PL_CLOCK_DISABLE_SHIFT 31 + +/* PCIE_CFG :: CLOCK_CONTROL :: DLL_CLOCK_DISABLE [30:30] */ +#define PCIE_CFG_CLOCK_CONTROL_DLL_CLOCK_DISABLE_MASK 0x40000000 +#define PCIE_CFG_CLOCK_CONTROL_DLL_CLOCK_DISABLE_ALIGN 0 +#define PCIE_CFG_CLOCK_CONTROL_DLL_CLOCK_DISABLE_BITS 1 +#define PCIE_CFG_CLOCK_CONTROL_DLL_CLOCK_DISABLE_SHIFT 30 + +/* PCIE_CFG :: CLOCK_CONTROL :: TL_CLOCK_DISABLE [29:29] */ +#define PCIE_CFG_CLOCK_CONTROL_TL_CLOCK_DISABLE_MASK 0x20000000 +#define PCIE_CFG_CLOCK_CONTROL_TL_CLOCK_DISABLE_ALIGN 0 +#define PCIE_CFG_CLOCK_CONTROL_TL_CLOCK_DISABLE_BITS 1 +#define PCIE_CFG_CLOCK_CONTROL_TL_CLOCK_DISABLE_SHIFT 29 + +/* PCIE_CFG :: CLOCK_CONTROL :: PCI_EXPRESS_CLOCK_TO_CORE_CLOCK [28:28] */ +#define PCIE_CFG_CLOCK_CONTROL_PCI_EXPRESS_CLOCK_TO_CORE_CLOCK_MASK 0x10000000 +#define PCIE_CFG_CLOCK_CONTROL_PCI_EXPRESS_CLOCK_TO_CORE_CLOCK_ALIGN 0 +#define PCIE_CFG_CLOCK_CONTROL_PCI_EXPRESS_CLOCK_TO_CORE_CLOCK_BITS 1 +#define PCIE_CFG_CLOCK_CONTROL_PCI_EXPRESS_CLOCK_TO_CORE_CLOCK_SHIFT 28 + +/* PCIE_CFG :: CLOCK_CONTROL :: UNUSED_0 [27:21] */ +#define PCIE_CFG_CLOCK_CONTROL_UNUSED_0_MASK 0x0fe00000 +#define PCIE_CFG_CLOCK_CONTROL_UNUSED_0_ALIGN 0 +#define PCIE_CFG_CLOCK_CONTROL_UNUSED_0_BITS 7 +#define PCIE_CFG_CLOCK_CONTROL_UNUSED_0_SHIFT 21 + +/* PCIE_CFG :: CLOCK_CONTROL :: SELECT_FINAL_ALT_CLOCK_SOURCE [20:20] */ +#define PCIE_CFG_CLOCK_CONTROL_SELECT_FINAL_ALT_CLOCK_SOURCE_MASK 0x00100000 +#define PCIE_CFG_CLOCK_CONTROL_SELECT_FINAL_ALT_CLOCK_SOURCE_ALIGN 0 +#define PCIE_CFG_CLOCK_CONTROL_SELECT_FINAL_ALT_CLOCK_SOURCE_BITS 1 +#define PCIE_CFG_CLOCK_CONTROL_SELECT_FINAL_ALT_CLOCK_SOURCE_SHIFT 20 + +/* PCIE_CFG :: CLOCK_CONTROL :: UNUSED_1 [19:13] */ +#define PCIE_CFG_CLOCK_CONTROL_UNUSED_1_MASK 0x000fe000 +#define PCIE_CFG_CLOCK_CONTROL_UNUSED_1_ALIGN 0 +#define PCIE_CFG_CLOCK_CONTROL_UNUSED_1_BITS 7 +#define PCIE_CFG_CLOCK_CONTROL_UNUSED_1_SHIFT 13 + +/* PCIE_CFG :: CLOCK_CONTROL :: SELECT_ALT_CLOCK [12:12] */ +#define PCIE_CFG_CLOCK_CONTROL_SELECT_ALT_CLOCK_MASK 0x00001000 +#define PCIE_CFG_CLOCK_CONTROL_SELECT_ALT_CLOCK_ALIGN 0 +#define PCIE_CFG_CLOCK_CONTROL_SELECT_ALT_CLOCK_BITS 1 +#define PCIE_CFG_CLOCK_CONTROL_SELECT_ALT_CLOCK_SHIFT 12 + +/* PCIE_CFG :: CLOCK_CONTROL :: UNUSED_2 [11:08] */ +#define PCIE_CFG_CLOCK_CONTROL_UNUSED_2_MASK 0x00000f00 +#define PCIE_CFG_CLOCK_CONTROL_UNUSED_2_ALIGN 0 +#define PCIE_CFG_CLOCK_CONTROL_UNUSED_2_BITS 4 +#define PCIE_CFG_CLOCK_CONTROL_UNUSED_2_SHIFT 8 + +/* PCIE_CFG :: CLOCK_CONTROL :: UNUSED_3 [07:00] */ +#define PCIE_CFG_CLOCK_CONTROL_UNUSED_3_MASK 0x000000ff +#define PCIE_CFG_CLOCK_CONTROL_UNUSED_3_ALIGN 0 +#define PCIE_CFG_CLOCK_CONTROL_UNUSED_3_BITS 8 +#define PCIE_CFG_CLOCK_CONTROL_UNUSED_3_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: REGISTER_BASE + ***************************************************************************/ +/* PCIE_CFG :: REGISTER_BASE :: RESERVED_0 [31:18] */ +#define PCIE_CFG_REGISTER_BASE_RESERVED_0_MASK 0xfffc0000 +#define PCIE_CFG_REGISTER_BASE_RESERVED_0_ALIGN 0 +#define PCIE_CFG_REGISTER_BASE_RESERVED_0_BITS 14 +#define PCIE_CFG_REGISTER_BASE_RESERVED_0_SHIFT 18 + +/* PCIE_CFG :: REGISTER_BASE :: REGISTER_BASE_REGISTER [17:02] */ +#define PCIE_CFG_REGISTER_BASE_REGISTER_BASE_REGISTER_MASK 0x0003fffc +#define PCIE_CFG_REGISTER_BASE_REGISTER_BASE_REGISTER_ALIGN 0 +#define PCIE_CFG_REGISTER_BASE_REGISTER_BASE_REGISTER_BITS 16 +#define PCIE_CFG_REGISTER_BASE_REGISTER_BASE_REGISTER_SHIFT 2 + +/* PCIE_CFG :: REGISTER_BASE :: RESERVED_1 [01:00] */ +#define PCIE_CFG_REGISTER_BASE_RESERVED_1_MASK 0x00000003 +#define PCIE_CFG_REGISTER_BASE_RESERVED_1_ALIGN 0 +#define PCIE_CFG_REGISTER_BASE_RESERVED_1_BITS 2 +#define PCIE_CFG_REGISTER_BASE_RESERVED_1_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: MEMORY_BASE + ***************************************************************************/ +/* PCIE_CFG :: MEMORY_BASE :: RESERVED_0 [31:24] */ +#define PCIE_CFG_MEMORY_BASE_RESERVED_0_MASK 0xff000000 +#define PCIE_CFG_MEMORY_BASE_RESERVED_0_ALIGN 0 +#define PCIE_CFG_MEMORY_BASE_RESERVED_0_BITS 8 +#define PCIE_CFG_MEMORY_BASE_RESERVED_0_SHIFT 24 + +/* PCIE_CFG :: MEMORY_BASE :: MEMORY_BASE_REGISTER [23:02] */ +#define PCIE_CFG_MEMORY_BASE_MEMORY_BASE_REGISTER_MASK 0x00fffffc +#define PCIE_CFG_MEMORY_BASE_MEMORY_BASE_REGISTER_ALIGN 0 +#define PCIE_CFG_MEMORY_BASE_MEMORY_BASE_REGISTER_BITS 22 +#define PCIE_CFG_MEMORY_BASE_MEMORY_BASE_REGISTER_SHIFT 2 + +/* PCIE_CFG :: MEMORY_BASE :: RESERVED_1 [01:00] */ +#define PCIE_CFG_MEMORY_BASE_RESERVED_1_MASK 0x00000003 +#define PCIE_CFG_MEMORY_BASE_RESERVED_1_ALIGN 0 +#define PCIE_CFG_MEMORY_BASE_RESERVED_1_BITS 2 +#define PCIE_CFG_MEMORY_BASE_RESERVED_1_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: REGISTER_DATA + ***************************************************************************/ +/* PCIE_CFG :: REGISTER_DATA :: REGISTER_DATA_REGISTER [31:00] */ +#define PCIE_CFG_REGISTER_DATA_REGISTER_DATA_REGISTER_MASK 0xffffffff +#define PCIE_CFG_REGISTER_DATA_REGISTER_DATA_REGISTER_ALIGN 0 +#define PCIE_CFG_REGISTER_DATA_REGISTER_DATA_REGISTER_BITS 32 +#define PCIE_CFG_REGISTER_DATA_REGISTER_DATA_REGISTER_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: MEMORY_DATA + ***************************************************************************/ +/* PCIE_CFG :: MEMORY_DATA :: MEMORY_DATA_REGISTER [31:00] */ +#define PCIE_CFG_MEMORY_DATA_MEMORY_DATA_REGISTER_MASK 0xffffffff +#define PCIE_CFG_MEMORY_DATA_MEMORY_DATA_REGISTER_ALIGN 0 +#define PCIE_CFG_MEMORY_DATA_MEMORY_DATA_REGISTER_BITS 32 +#define PCIE_CFG_MEMORY_DATA_MEMORY_DATA_REGISTER_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: EXPANSION_ROM_BAR_SIZE + ***************************************************************************/ +/* PCIE_CFG :: EXPANSION_ROM_BAR_SIZE :: RESERVED_0 [31:04] */ +#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE_RESERVED_0_MASK 0xfffffff0 +#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE_RESERVED_0_ALIGN 0 +#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE_RESERVED_0_BITS 28 +#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE_RESERVED_0_SHIFT 4 + +/* PCIE_CFG :: EXPANSION_ROM_BAR_SIZE :: BAR_SIZE [03:00] */ +#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE_BAR_SIZE_MASK 0x0000000f +#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE_BAR_SIZE_ALIGN 0 +#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE_BAR_SIZE_BITS 4 +#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE_BAR_SIZE_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: EXPANSION_ROM_ADDRESS + ***************************************************************************/ +/* PCIE_CFG :: EXPANSION_ROM_ADDRESS :: ROM_CTL_ADDR [31:00] */ +#define PCIE_CFG_EXPANSION_ROM_ADDRESS_ROM_CTL_ADDR_MASK 0xffffffff +#define PCIE_CFG_EXPANSION_ROM_ADDRESS_ROM_CTL_ADDR_ALIGN 0 +#define PCIE_CFG_EXPANSION_ROM_ADDRESS_ROM_CTL_ADDR_BITS 32 +#define PCIE_CFG_EXPANSION_ROM_ADDRESS_ROM_CTL_ADDR_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: EXPANSION_ROM_DATA + ***************************************************************************/ +/* PCIE_CFG :: EXPANSION_ROM_DATA :: ROM_DATA [31:00] */ +#define PCIE_CFG_EXPANSION_ROM_DATA_ROM_DATA_MASK 0xffffffff +#define PCIE_CFG_EXPANSION_ROM_DATA_ROM_DATA_ALIGN 0 +#define PCIE_CFG_EXPANSION_ROM_DATA_ROM_DATA_BITS 32 +#define PCIE_CFG_EXPANSION_ROM_DATA_ROM_DATA_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: VPD_INTERFACE + ***************************************************************************/ +/* PCIE_CFG :: VPD_INTERFACE :: RESERVED_0 [31:01] */ +#define PCIE_CFG_VPD_INTERFACE_RESERVED_0_MASK 0xfffffffe +#define PCIE_CFG_VPD_INTERFACE_RESERVED_0_ALIGN 0 +#define PCIE_CFG_VPD_INTERFACE_RESERVED_0_BITS 31 +#define PCIE_CFG_VPD_INTERFACE_RESERVED_0_SHIFT 1 + +/* PCIE_CFG :: VPD_INTERFACE :: VPD_REQUEST [00:00] */ +#define PCIE_CFG_VPD_INTERFACE_VPD_REQUEST_MASK 0x00000001 +#define PCIE_CFG_VPD_INTERFACE_VPD_REQUEST_ALIGN 0 +#define PCIE_CFG_VPD_INTERFACE_VPD_REQUEST_BITS 1 +#define PCIE_CFG_VPD_INTERFACE_VPD_REQUEST_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_UPPER + ***************************************************************************/ +/* PCIE_CFG :: UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_UPPER :: UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX [31:00] */ +#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_UPPER_UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX_MASK 0xffffffff +#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_UPPER_UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX_ALIGN 0 +#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_UPPER_UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX_BITS 32 +#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_UPPER_UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_LOWER + ***************************************************************************/ +/* PCIE_CFG :: UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_LOWER :: UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX [31:00] */ +#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_LOWER_UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX_MASK 0xffffffff +#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_LOWER_UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX_ALIGN 0 +#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_LOWER_UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX_BITS 32 +#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_LOWER_UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_UPPER + ***************************************************************************/ +/* PCIE_CFG :: UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_UPPER :: UNDI_RECEIVE_RETURN_C_IDX [31:00] */ +#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_UPPER_UNDI_RECEIVE_RETURN_C_IDX_MASK 0xffffffff +#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_UPPER_UNDI_RECEIVE_RETURN_C_IDX_ALIGN 0 +#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_UPPER_UNDI_RECEIVE_RETURN_C_IDX_BITS 32 +#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_UPPER_UNDI_RECEIVE_RETURN_C_IDX_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_LOWER + ***************************************************************************/ +/* PCIE_CFG :: UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_LOWER :: UNDI_RECEIVE_RETURN_C_IDX [31:00] */ +#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_LOWER_UNDI_RECEIVE_RETURN_C_IDX_MASK 0xffffffff +#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_LOWER_UNDI_RECEIVE_RETURN_C_IDX_ALIGN 0 +#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_LOWER_UNDI_RECEIVE_RETURN_C_IDX_BITS 32 +#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_LOWER_UNDI_RECEIVE_RETURN_C_IDX_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_UPPER + ***************************************************************************/ +/* PCIE_CFG :: UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_UPPER :: UNDI_SEND_BD_NIC_P_IDX [31:00] */ +#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_UPPER_UNDI_SEND_BD_NIC_P_IDX_MASK 0xffffffff +#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_UPPER_UNDI_SEND_BD_NIC_P_IDX_ALIGN 0 +#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_UPPER_UNDI_SEND_BD_NIC_P_IDX_BITS 32 +#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_UPPER_UNDI_SEND_BD_NIC_P_IDX_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_LOWER + ***************************************************************************/ +/* PCIE_CFG :: UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_LOWER :: UNDI_SEND_BD_NIC_P_IDX [31:00] */ +#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_LOWER_UNDI_SEND_BD_NIC_P_IDX_MASK 0xffffffff +#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_LOWER_UNDI_SEND_BD_NIC_P_IDX_ALIGN 0 +#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_LOWER_UNDI_SEND_BD_NIC_P_IDX_BITS 32 +#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_LOWER_UNDI_SEND_BD_NIC_P_IDX_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: INT_MAILBOX_UPPER + ***************************************************************************/ +/* PCIE_CFG :: INT_MAILBOX_UPPER :: INDIRECT_INTERRUPT_MAIL_BOX [31:00] */ +#define PCIE_CFG_INT_MAILBOX_UPPER_INDIRECT_INTERRUPT_MAIL_BOX_MASK 0xffffffff +#define PCIE_CFG_INT_MAILBOX_UPPER_INDIRECT_INTERRUPT_MAIL_BOX_ALIGN 0 +#define PCIE_CFG_INT_MAILBOX_UPPER_INDIRECT_INTERRUPT_MAIL_BOX_BITS 32 +#define PCIE_CFG_INT_MAILBOX_UPPER_INDIRECT_INTERRUPT_MAIL_BOX_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: INT_MAILBOX_LOWER + ***************************************************************************/ +/* PCIE_CFG :: INT_MAILBOX_LOWER :: INDIRECT_INTERRUPT_MAIL_BOX [31:00] */ +#define PCIE_CFG_INT_MAILBOX_LOWER_INDIRECT_INTERRUPT_MAIL_BOX_MASK 0xffffffff +#define PCIE_CFG_INT_MAILBOX_LOWER_INDIRECT_INTERRUPT_MAIL_BOX_ALIGN 0 +#define PCIE_CFG_INT_MAILBOX_LOWER_INDIRECT_INTERRUPT_MAIL_BOX_BITS 32 +#define PCIE_CFG_INT_MAILBOX_LOWER_INDIRECT_INTERRUPT_MAIL_BOX_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: PRODUCT_ID_AND_ASIC_REVISION + ***************************************************************************/ +/* PCIE_CFG :: PRODUCT_ID_AND_ASIC_REVISION :: RESERVED_0 [31:28] */ +#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_RESERVED_0_MASK 0xf0000000 +#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_RESERVED_0_ALIGN 0 +#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_RESERVED_0_BITS 4 +#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_RESERVED_0_SHIFT 28 + +/* PCIE_CFG :: PRODUCT_ID_AND_ASIC_REVISION :: PRODUCT_ID [27:08] */ +#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_PRODUCT_ID_MASK 0x0fffff00 +#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_PRODUCT_ID_ALIGN 0 +#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_PRODUCT_ID_BITS 20 +#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_PRODUCT_ID_SHIFT 8 + +/* PCIE_CFG :: PRODUCT_ID_AND_ASIC_REVISION :: ASIC_REVISION_ID [07:00] */ +#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_ASIC_REVISION_ID_MASK 0x000000ff +#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_ASIC_REVISION_ID_ALIGN 0 +#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_ASIC_REVISION_ID_BITS 8 +#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_ASIC_REVISION_ID_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: FUNCTION_EVENT + ***************************************************************************/ +/* PCIE_CFG :: FUNCTION_EVENT :: RESERVED_0 [31:16] */ +#define PCIE_CFG_FUNCTION_EVENT_RESERVED_0_MASK 0xffff0000 +#define PCIE_CFG_FUNCTION_EVENT_RESERVED_0_ALIGN 0 +#define PCIE_CFG_FUNCTION_EVENT_RESERVED_0_BITS 16 +#define PCIE_CFG_FUNCTION_EVENT_RESERVED_0_SHIFT 16 + +/* PCIE_CFG :: FUNCTION_EVENT :: INTA_EVENT [15:15] */ +#define PCIE_CFG_FUNCTION_EVENT_INTA_EVENT_MASK 0x00008000 +#define PCIE_CFG_FUNCTION_EVENT_INTA_EVENT_ALIGN 0 +#define PCIE_CFG_FUNCTION_EVENT_INTA_EVENT_BITS 1 +#define PCIE_CFG_FUNCTION_EVENT_INTA_EVENT_SHIFT 15 + +/* PCIE_CFG :: FUNCTION_EVENT :: RESERVED_1 [14:05] */ +#define PCIE_CFG_FUNCTION_EVENT_RESERVED_1_MASK 0x00007fe0 +#define PCIE_CFG_FUNCTION_EVENT_RESERVED_1_ALIGN 0 +#define PCIE_CFG_FUNCTION_EVENT_RESERVED_1_BITS 10 +#define PCIE_CFG_FUNCTION_EVENT_RESERVED_1_SHIFT 5 + +/* PCIE_CFG :: FUNCTION_EVENT :: GWAKE_EVENT [04:04] */ +#define PCIE_CFG_FUNCTION_EVENT_GWAKE_EVENT_MASK 0x00000010 +#define PCIE_CFG_FUNCTION_EVENT_GWAKE_EVENT_ALIGN 0 +#define PCIE_CFG_FUNCTION_EVENT_GWAKE_EVENT_BITS 1 +#define PCIE_CFG_FUNCTION_EVENT_GWAKE_EVENT_SHIFT 4 + +/* PCIE_CFG :: FUNCTION_EVENT :: RESERVED_2 [03:00] */ +#define PCIE_CFG_FUNCTION_EVENT_RESERVED_2_MASK 0x0000000f +#define PCIE_CFG_FUNCTION_EVENT_RESERVED_2_ALIGN 0 +#define PCIE_CFG_FUNCTION_EVENT_RESERVED_2_BITS 4 +#define PCIE_CFG_FUNCTION_EVENT_RESERVED_2_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: FUNCTION_EVENT_MASK + ***************************************************************************/ +/* PCIE_CFG :: FUNCTION_EVENT_MASK :: RESERVED_0 [31:16] */ +#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_0_MASK 0xffff0000 +#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_0_ALIGN 0 +#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_0_BITS 16 +#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_0_SHIFT 16 + +/* PCIE_CFG :: FUNCTION_EVENT_MASK :: INTA_MASK [15:15] */ +#define PCIE_CFG_FUNCTION_EVENT_MASK_INTA_MASK_MASK 0x00008000 +#define PCIE_CFG_FUNCTION_EVENT_MASK_INTA_MASK_ALIGN 0 +#define PCIE_CFG_FUNCTION_EVENT_MASK_INTA_MASK_BITS 1 +#define PCIE_CFG_FUNCTION_EVENT_MASK_INTA_MASK_SHIFT 15 + +/* PCIE_CFG :: FUNCTION_EVENT_MASK :: WAKE_UP_MASK [14:14] */ +#define PCIE_CFG_FUNCTION_EVENT_MASK_WAKE_UP_MASK_MASK 0x00004000 +#define PCIE_CFG_FUNCTION_EVENT_MASK_WAKE_UP_MASK_ALIGN 0 +#define PCIE_CFG_FUNCTION_EVENT_MASK_WAKE_UP_MASK_BITS 1 +#define PCIE_CFG_FUNCTION_EVENT_MASK_WAKE_UP_MASK_SHIFT 14 + +/* PCIE_CFG :: FUNCTION_EVENT_MASK :: RESERVED_1 [13:05] */ +#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_1_MASK 0x00003fe0 +#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_1_ALIGN 0 +#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_1_BITS 9 +#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_1_SHIFT 5 + +/* PCIE_CFG :: FUNCTION_EVENT_MASK :: GWAKE_MASK [04:04] */ +#define PCIE_CFG_FUNCTION_EVENT_MASK_GWAKE_MASK_MASK 0x00000010 +#define PCIE_CFG_FUNCTION_EVENT_MASK_GWAKE_MASK_ALIGN 0 +#define PCIE_CFG_FUNCTION_EVENT_MASK_GWAKE_MASK_BITS 1 +#define PCIE_CFG_FUNCTION_EVENT_MASK_GWAKE_MASK_SHIFT 4 + +/* PCIE_CFG :: FUNCTION_EVENT_MASK :: RESERVED_2 [03:00] */ +#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_2_MASK 0x0000000f +#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_2_ALIGN 0 +#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_2_BITS 4 +#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_2_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: FUNCTION_PRESENT + ***************************************************************************/ +/* PCIE_CFG :: FUNCTION_PRESENT :: RESERVED_0 [31:16] */ +#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_0_MASK 0xffff0000 +#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_0_ALIGN 0 +#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_0_BITS 16 +#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_0_SHIFT 16 + +/* PCIE_CFG :: FUNCTION_PRESENT :: INTA_STATUS [15:15] */ +#define PCIE_CFG_FUNCTION_PRESENT_INTA_STATUS_MASK 0x00008000 +#define PCIE_CFG_FUNCTION_PRESENT_INTA_STATUS_ALIGN 0 +#define PCIE_CFG_FUNCTION_PRESENT_INTA_STATUS_BITS 1 +#define PCIE_CFG_FUNCTION_PRESENT_INTA_STATUS_SHIFT 15 + +/* PCIE_CFG :: FUNCTION_PRESENT :: RESERVED_1 [14:05] */ +#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_1_MASK 0x00007fe0 +#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_1_ALIGN 0 +#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_1_BITS 10 +#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_1_SHIFT 5 + +/* PCIE_CFG :: FUNCTION_PRESENT :: PME_STATUS [04:04] */ +#define PCIE_CFG_FUNCTION_PRESENT_PME_STATUS_MASK 0x00000010 +#define PCIE_CFG_FUNCTION_PRESENT_PME_STATUS_ALIGN 0 +#define PCIE_CFG_FUNCTION_PRESENT_PME_STATUS_BITS 1 +#define PCIE_CFG_FUNCTION_PRESENT_PME_STATUS_SHIFT 4 + +/* PCIE_CFG :: FUNCTION_PRESENT :: RESERVED_2 [03:00] */ +#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_2_MASK 0x0000000f +#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_2_ALIGN 0 +#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_2_BITS 4 +#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_2_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: PCIE_CAPABILITIES + ***************************************************************************/ +/* PCIE_CFG :: PCIE_CAPABILITIES :: RESERVED_0 [31:30] */ +#define PCIE_CFG_PCIE_CAPABILITIES_RESERVED_0_MASK 0xc0000000 +#define PCIE_CFG_PCIE_CAPABILITIES_RESERVED_0_ALIGN 0 +#define PCIE_CFG_PCIE_CAPABILITIES_RESERVED_0_BITS 2 +#define PCIE_CFG_PCIE_CAPABILITIES_RESERVED_0_SHIFT 30 + +/* PCIE_CFG :: PCIE_CAPABILITIES :: INTERRUPT_MESSAGE_NUMBER [29:25] */ +#define PCIE_CFG_PCIE_CAPABILITIES_INTERRUPT_MESSAGE_NUMBER_MASK 0x3e000000 +#define PCIE_CFG_PCIE_CAPABILITIES_INTERRUPT_MESSAGE_NUMBER_ALIGN 0 +#define PCIE_CFG_PCIE_CAPABILITIES_INTERRUPT_MESSAGE_NUMBER_BITS 5 +#define PCIE_CFG_PCIE_CAPABILITIES_INTERRUPT_MESSAGE_NUMBER_SHIFT 25 + +/* PCIE_CFG :: PCIE_CAPABILITIES :: SLOT_IMPLEMENTED [24:24] */ +#define PCIE_CFG_PCIE_CAPABILITIES_SLOT_IMPLEMENTED_MASK 0x01000000 +#define PCIE_CFG_PCIE_CAPABILITIES_SLOT_IMPLEMENTED_ALIGN 0 +#define PCIE_CFG_PCIE_CAPABILITIES_SLOT_IMPLEMENTED_BITS 1 +#define PCIE_CFG_PCIE_CAPABILITIES_SLOT_IMPLEMENTED_SHIFT 24 + +/* PCIE_CFG :: PCIE_CAPABILITIES :: DEVICE_PORT_TYPE [23:20] */ +#define PCIE_CFG_PCIE_CAPABILITIES_DEVICE_PORT_TYPE_MASK 0x00f00000 +#define PCIE_CFG_PCIE_CAPABILITIES_DEVICE_PORT_TYPE_ALIGN 0 +#define PCIE_CFG_PCIE_CAPABILITIES_DEVICE_PORT_TYPE_BITS 4 +#define PCIE_CFG_PCIE_CAPABILITIES_DEVICE_PORT_TYPE_SHIFT 20 + +/* PCIE_CFG :: PCIE_CAPABILITIES :: CAPABILITY_VERSION [19:16] */ +#define PCIE_CFG_PCIE_CAPABILITIES_CAPABILITY_VERSION_MASK 0x000f0000 +#define PCIE_CFG_PCIE_CAPABILITIES_CAPABILITY_VERSION_ALIGN 0 +#define PCIE_CFG_PCIE_CAPABILITIES_CAPABILITY_VERSION_BITS 4 +#define PCIE_CFG_PCIE_CAPABILITIES_CAPABILITY_VERSION_SHIFT 16 + +/* PCIE_CFG :: PCIE_CAPABILITIES :: NEXT_POINTER [15:08] */ +#define PCIE_CFG_PCIE_CAPABILITIES_NEXT_POINTER_MASK 0x0000ff00 +#define PCIE_CFG_PCIE_CAPABILITIES_NEXT_POINTER_ALIGN 0 +#define PCIE_CFG_PCIE_CAPABILITIES_NEXT_POINTER_BITS 8 +#define PCIE_CFG_PCIE_CAPABILITIES_NEXT_POINTER_SHIFT 8 + +/* PCIE_CFG :: PCIE_CAPABILITIES :: CAPABILITY_ID [07:00] */ +#define PCIE_CFG_PCIE_CAPABILITIES_CAPABILITY_ID_MASK 0x000000ff +#define PCIE_CFG_PCIE_CAPABILITIES_CAPABILITY_ID_ALIGN 0 +#define PCIE_CFG_PCIE_CAPABILITIES_CAPABILITY_ID_BITS 8 +#define PCIE_CFG_PCIE_CAPABILITIES_CAPABILITY_ID_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: DEVICE_CAPABILITIES + ***************************************************************************/ +/* PCIE_CFG :: DEVICE_CAPABILITIES :: RESERVED_0 [31:28] */ +#define PCIE_CFG_DEVICE_CAPABILITIES_RESERVED_0_MASK 0xf0000000 +#define PCIE_CFG_DEVICE_CAPABILITIES_RESERVED_0_ALIGN 0 +#define PCIE_CFG_DEVICE_CAPABILITIES_RESERVED_0_BITS 4 +#define PCIE_CFG_DEVICE_CAPABILITIES_RESERVED_0_SHIFT 28 + +/* PCIE_CFG :: DEVICE_CAPABILITIES :: CAPTURED_SLOT_POWER_LIMIT_SCALE [27:26] */ +#define PCIE_CFG_DEVICE_CAPABILITIES_CAPTURED_SLOT_POWER_LIMIT_SCALE_MASK 0x0c000000 +#define PCIE_CFG_DEVICE_CAPABILITIES_CAPTURED_SLOT_POWER_LIMIT_SCALE_ALIGN 0 +#define PCIE_CFG_DEVICE_CAPABILITIES_CAPTURED_SLOT_POWER_LIMIT_SCALE_BITS 2 +#define PCIE_CFG_DEVICE_CAPABILITIES_CAPTURED_SLOT_POWER_LIMIT_SCALE_SHIFT 26 + +/* PCIE_CFG :: DEVICE_CAPABILITIES :: CAPTURED_SLOT_POWER_LIMIT_VALUE [25:18] */ +#define PCIE_CFG_DEVICE_CAPABILITIES_CAPTURED_SLOT_POWER_LIMIT_VALUE_MASK 0x03fc0000 +#define PCIE_CFG_DEVICE_CAPABILITIES_CAPTURED_SLOT_POWER_LIMIT_VALUE_ALIGN 0 +#define PCIE_CFG_DEVICE_CAPABILITIES_CAPTURED_SLOT_POWER_LIMIT_VALUE_BITS 8 +#define PCIE_CFG_DEVICE_CAPABILITIES_CAPTURED_SLOT_POWER_LIMIT_VALUE_SHIFT 18 + +/* PCIE_CFG :: DEVICE_CAPABILITIES :: RESERVED_1 [17:16] */ +#define PCIE_CFG_DEVICE_CAPABILITIES_RESERVED_1_MASK 0x00030000 +#define PCIE_CFG_DEVICE_CAPABILITIES_RESERVED_1_ALIGN 0 +#define PCIE_CFG_DEVICE_CAPABILITIES_RESERVED_1_BITS 2 +#define PCIE_CFG_DEVICE_CAPABILITIES_RESERVED_1_SHIFT 16 + +/* PCIE_CFG :: DEVICE_CAPABILITIES :: ROLE_BASED_ERROR_SUPPORT [15:15] */ +#define PCIE_CFG_DEVICE_CAPABILITIES_ROLE_BASED_ERROR_SUPPORT_MASK 0x00008000 +#define PCIE_CFG_DEVICE_CAPABILITIES_ROLE_BASED_ERROR_SUPPORT_ALIGN 0 +#define PCIE_CFG_DEVICE_CAPABILITIES_ROLE_BASED_ERROR_SUPPORT_BITS 1 +#define PCIE_CFG_DEVICE_CAPABILITIES_ROLE_BASED_ERROR_SUPPORT_SHIFT 15 + +/* PCIE_CFG :: DEVICE_CAPABILITIES :: POWER_INDICATOR_PRESENT [14:14] */ +#define PCIE_CFG_DEVICE_CAPABILITIES_POWER_INDICATOR_PRESENT_MASK 0x00004000 +#define PCIE_CFG_DEVICE_CAPABILITIES_POWER_INDICATOR_PRESENT_ALIGN 0 +#define PCIE_CFG_DEVICE_CAPABILITIES_POWER_INDICATOR_PRESENT_BITS 1 +#define PCIE_CFG_DEVICE_CAPABILITIES_POWER_INDICATOR_PRESENT_SHIFT 14 + +/* PCIE_CFG :: DEVICE_CAPABILITIES :: ATTENTION_INDICATOR_PRESENT [13:13] */ +#define PCIE_CFG_DEVICE_CAPABILITIES_ATTENTION_INDICATOR_PRESENT_MASK 0x00002000 +#define PCIE_CFG_DEVICE_CAPABILITIES_ATTENTION_INDICATOR_PRESENT_ALIGN 0 +#define PCIE_CFG_DEVICE_CAPABILITIES_ATTENTION_INDICATOR_PRESENT_BITS 1 +#define PCIE_CFG_DEVICE_CAPABILITIES_ATTENTION_INDICATOR_PRESENT_SHIFT 13 + +/* PCIE_CFG :: DEVICE_CAPABILITIES :: ATTENTION_BUTTON_PRESENT [12:12] */ +#define PCIE_CFG_DEVICE_CAPABILITIES_ATTENTION_BUTTON_PRESENT_MASK 0x00001000 +#define PCIE_CFG_DEVICE_CAPABILITIES_ATTENTION_BUTTON_PRESENT_ALIGN 0 +#define PCIE_CFG_DEVICE_CAPABILITIES_ATTENTION_BUTTON_PRESENT_BITS 1 +#define PCIE_CFG_DEVICE_CAPABILITIES_ATTENTION_BUTTON_PRESENT_SHIFT 12 + +/* PCIE_CFG :: DEVICE_CAPABILITIES :: ENDPOINT_L1_ACCEPTABLE_LATENCY [11:09] */ +#define PCIE_CFG_DEVICE_CAPABILITIES_ENDPOINT_L1_ACCEPTABLE_LATENCY_MASK 0x00000e00 +#define PCIE_CFG_DEVICE_CAPABILITIES_ENDPOINT_L1_ACCEPTABLE_LATENCY_ALIGN 0 +#define PCIE_CFG_DEVICE_CAPABILITIES_ENDPOINT_L1_ACCEPTABLE_LATENCY_BITS 3 +#define PCIE_CFG_DEVICE_CAPABILITIES_ENDPOINT_L1_ACCEPTABLE_LATENCY_SHIFT 9 + +/* PCIE_CFG :: DEVICE_CAPABILITIES :: ENDPOINT_L0S_ACCEPTABLE_LATENCY [08:06] */ +#define PCIE_CFG_DEVICE_CAPABILITIES_ENDPOINT_L0S_ACCEPTABLE_LATENCY_MASK 0x000001c0 +#define PCIE_CFG_DEVICE_CAPABILITIES_ENDPOINT_L0S_ACCEPTABLE_LATENCY_ALIGN 0 +#define PCIE_CFG_DEVICE_CAPABILITIES_ENDPOINT_L0S_ACCEPTABLE_LATENCY_BITS 3 +#define PCIE_CFG_DEVICE_CAPABILITIES_ENDPOINT_L0S_ACCEPTABLE_LATENCY_SHIFT 6 + +/* PCIE_CFG :: DEVICE_CAPABILITIES :: EXTENDED_TAG_FIELD_SUPPORTED [05:05] */ +#define PCIE_CFG_DEVICE_CAPABILITIES_EXTENDED_TAG_FIELD_SUPPORTED_MASK 0x00000020 +#define PCIE_CFG_DEVICE_CAPABILITIES_EXTENDED_TAG_FIELD_SUPPORTED_ALIGN 0 +#define PCIE_CFG_DEVICE_CAPABILITIES_EXTENDED_TAG_FIELD_SUPPORTED_BITS 1 +#define PCIE_CFG_DEVICE_CAPABILITIES_EXTENDED_TAG_FIELD_SUPPORTED_SHIFT 5 + +/* PCIE_CFG :: DEVICE_CAPABILITIES :: PHANTOM_FUNCTIONS_SUPPORTED [04:03] */ +#define PCIE_CFG_DEVICE_CAPABILITIES_PHANTOM_FUNCTIONS_SUPPORTED_MASK 0x00000018 +#define PCIE_CFG_DEVICE_CAPABILITIES_PHANTOM_FUNCTIONS_SUPPORTED_ALIGN 0 +#define PCIE_CFG_DEVICE_CAPABILITIES_PHANTOM_FUNCTIONS_SUPPORTED_BITS 2 +#define PCIE_CFG_DEVICE_CAPABILITIES_PHANTOM_FUNCTIONS_SUPPORTED_SHIFT 3 + +/* PCIE_CFG :: DEVICE_CAPABILITIES :: MAX_PAYLOAD_SIZE_SUPPORTED [02:00] */ +#define PCIE_CFG_DEVICE_CAPABILITIES_MAX_PAYLOAD_SIZE_SUPPORTED_MASK 0x00000007 +#define PCIE_CFG_DEVICE_CAPABILITIES_MAX_PAYLOAD_SIZE_SUPPORTED_ALIGN 0 +#define PCIE_CFG_DEVICE_CAPABILITIES_MAX_PAYLOAD_SIZE_SUPPORTED_BITS 3 +#define PCIE_CFG_DEVICE_CAPABILITIES_MAX_PAYLOAD_SIZE_SUPPORTED_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: DEVICE_STATUS_CONTROL + ***************************************************************************/ +/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: RESERVED_0 [31:22] */ +#define PCIE_CFG_DEVICE_STATUS_CONTROL_RESERVED_0_MASK 0xffc00000 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_RESERVED_0_ALIGN 0 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_RESERVED_0_BITS 10 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_RESERVED_0_SHIFT 22 + +/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: TRANSACTION_PENDING [21:21] */ +#define PCIE_CFG_DEVICE_STATUS_CONTROL_TRANSACTION_PENDING_MASK 0x00200000 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_TRANSACTION_PENDING_ALIGN 0 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_TRANSACTION_PENDING_BITS 1 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_TRANSACTION_PENDING_SHIFT 21 + +/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: AUX_POWER_DETECTED [20:20] */ +#define PCIE_CFG_DEVICE_STATUS_CONTROL_AUX_POWER_DETECTED_MASK 0x00100000 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_AUX_POWER_DETECTED_ALIGN 0 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_AUX_POWER_DETECTED_BITS 1 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_AUX_POWER_DETECTED_SHIFT 20 + +/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: UNSUPPORTED_REQUEST_DETECTED [19:19] */ +#define PCIE_CFG_DEVICE_STATUS_CONTROL_UNSUPPORTED_REQUEST_DETECTED_MASK 0x00080000 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_UNSUPPORTED_REQUEST_DETECTED_ALIGN 0 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_UNSUPPORTED_REQUEST_DETECTED_BITS 1 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_UNSUPPORTED_REQUEST_DETECTED_SHIFT 19 + +/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: FATAL_ERROR_DETECTED [18:18] */ +#define PCIE_CFG_DEVICE_STATUS_CONTROL_FATAL_ERROR_DETECTED_MASK 0x00040000 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_FATAL_ERROR_DETECTED_ALIGN 0 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_FATAL_ERROR_DETECTED_BITS 1 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_FATAL_ERROR_DETECTED_SHIFT 18 + +/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: NON_FATAL_ERROR_DETECTED [17:17] */ +#define PCIE_CFG_DEVICE_STATUS_CONTROL_NON_FATAL_ERROR_DETECTED_MASK 0x00020000 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_NON_FATAL_ERROR_DETECTED_ALIGN 0 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_NON_FATAL_ERROR_DETECTED_BITS 1 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_NON_FATAL_ERROR_DETECTED_SHIFT 17 + +/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: CORRECTABLE_ERROR_DETECTED [16:16] */ +#define PCIE_CFG_DEVICE_STATUS_CONTROL_CORRECTABLE_ERROR_DETECTED_MASK 0x00010000 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_CORRECTABLE_ERROR_DETECTED_ALIGN 0 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_CORRECTABLE_ERROR_DETECTED_BITS 1 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_CORRECTABLE_ERROR_DETECTED_SHIFT 16 + +/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: RESERVED_1 [15:15] */ +#define PCIE_CFG_DEVICE_STATUS_CONTROL_RESERVED_1_MASK 0x00008000 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_RESERVED_1_ALIGN 0 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_RESERVED_1_BITS 1 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_RESERVED_1_SHIFT 15 + +/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: MAX_READ_REQUEST_SIZE [14:12] */ +#define PCIE_CFG_DEVICE_STATUS_CONTROL_MAX_READ_REQUEST_SIZE_MASK 0x00007000 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_MAX_READ_REQUEST_SIZE_ALIGN 0 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_MAX_READ_REQUEST_SIZE_BITS 3 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_MAX_READ_REQUEST_SIZE_SHIFT 12 + +/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: ENABLE_NO_SNOOP [11:11] */ +#define PCIE_CFG_DEVICE_STATUS_CONTROL_ENABLE_NO_SNOOP_MASK 0x00000800 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_ENABLE_NO_SNOOP_ALIGN 0 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_ENABLE_NO_SNOOP_BITS 1 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_ENABLE_NO_SNOOP_SHIFT 11 + +/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: AUX_POWER_PM_ENABLE [10:10] */ +#define PCIE_CFG_DEVICE_STATUS_CONTROL_AUX_POWER_PM_ENABLE_MASK 0x00000400 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_AUX_POWER_PM_ENABLE_ALIGN 0 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_AUX_POWER_PM_ENABLE_BITS 1 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_AUX_POWER_PM_ENABLE_SHIFT 10 + +/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: PHANTOM_FUNCTIONS_ENABLE [09:09] */ +#define PCIE_CFG_DEVICE_STATUS_CONTROL_PHANTOM_FUNCTIONS_ENABLE_MASK 0x00000200 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_PHANTOM_FUNCTIONS_ENABLE_ALIGN 0 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_PHANTOM_FUNCTIONS_ENABLE_BITS 1 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_PHANTOM_FUNCTIONS_ENABLE_SHIFT 9 + +/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: EXTENDED_TAG_FIELD_ENABLE [08:08] */ +#define PCIE_CFG_DEVICE_STATUS_CONTROL_EXTENDED_TAG_FIELD_ENABLE_MASK 0x00000100 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_EXTENDED_TAG_FIELD_ENABLE_ALIGN 0 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_EXTENDED_TAG_FIELD_ENABLE_BITS 1 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_EXTENDED_TAG_FIELD_ENABLE_SHIFT 8 + +/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: MAX_PAYLOAD_SIZE [07:05] */ +#define PCIE_CFG_DEVICE_STATUS_CONTROL_MAX_PAYLOAD_SIZE_MASK 0x000000e0 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_MAX_PAYLOAD_SIZE_ALIGN 0 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_MAX_PAYLOAD_SIZE_BITS 3 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_MAX_PAYLOAD_SIZE_SHIFT 5 + +/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: ENABLED_RELAXED_ORDERING [04:04] */ +#define PCIE_CFG_DEVICE_STATUS_CONTROL_ENABLED_RELAXED_ORDERING_MASK 0x00000010 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_ENABLED_RELAXED_ORDERING_ALIGN 0 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_ENABLED_RELAXED_ORDERING_BITS 1 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_ENABLED_RELAXED_ORDERING_SHIFT 4 + +/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: UNSUPPORTED_REQUEST_REPORTING_ENABLE [03:03] */ +#define PCIE_CFG_DEVICE_STATUS_CONTROL_UNSUPPORTED_REQUEST_REPORTING_ENABLE_MASK 0x00000008 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_UNSUPPORTED_REQUEST_REPORTING_ENABLE_ALIGN 0 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_UNSUPPORTED_REQUEST_REPORTING_ENABLE_BITS 1 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_UNSUPPORTED_REQUEST_REPORTING_ENABLE_SHIFT 3 + +/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: FATAL_ERROR_REPORTING_ENABLED [02:02] */ +#define PCIE_CFG_DEVICE_STATUS_CONTROL_FATAL_ERROR_REPORTING_ENABLED_MASK 0x00000004 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_FATAL_ERROR_REPORTING_ENABLED_ALIGN 0 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_FATAL_ERROR_REPORTING_ENABLED_BITS 1 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_FATAL_ERROR_REPORTING_ENABLED_SHIFT 2 + +/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: NON_FATAL_ERROR_REPORTING_ENABLED [01:01] */ +#define PCIE_CFG_DEVICE_STATUS_CONTROL_NON_FATAL_ERROR_REPORTING_ENABLED_MASK 0x00000002 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_NON_FATAL_ERROR_REPORTING_ENABLED_ALIGN 0 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_NON_FATAL_ERROR_REPORTING_ENABLED_BITS 1 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_NON_FATAL_ERROR_REPORTING_ENABLED_SHIFT 1 + +/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: CORRECTABLE_ERROR_REPORTING_ENABLED [00:00] */ +#define PCIE_CFG_DEVICE_STATUS_CONTROL_CORRECTABLE_ERROR_REPORTING_ENABLED_MASK 0x00000001 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_CORRECTABLE_ERROR_REPORTING_ENABLED_ALIGN 0 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_CORRECTABLE_ERROR_REPORTING_ENABLED_BITS 1 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_CORRECTABLE_ERROR_REPORTING_ENABLED_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: LINK_CAPABILITY + ***************************************************************************/ +/* PCIE_CFG :: LINK_CAPABILITY :: PORT_NUMBER [31:24] */ +#define PCIE_CFG_LINK_CAPABILITY_PORT_NUMBER_MASK 0xff000000 +#define PCIE_CFG_LINK_CAPABILITY_PORT_NUMBER_ALIGN 0 +#define PCIE_CFG_LINK_CAPABILITY_PORT_NUMBER_BITS 8 +#define PCIE_CFG_LINK_CAPABILITY_PORT_NUMBER_SHIFT 24 + +/* PCIE_CFG :: LINK_CAPABILITY :: RESERVED_0 [23:19] */ +#define PCIE_CFG_LINK_CAPABILITY_RESERVED_0_MASK 0x00f80000 +#define PCIE_CFG_LINK_CAPABILITY_RESERVED_0_ALIGN 0 +#define PCIE_CFG_LINK_CAPABILITY_RESERVED_0_BITS 5 +#define PCIE_CFG_LINK_CAPABILITY_RESERVED_0_SHIFT 19 + +/* PCIE_CFG :: LINK_CAPABILITY :: CLOCK_POWER_MANAGEMENT [18:18] */ +#define PCIE_CFG_LINK_CAPABILITY_CLOCK_POWER_MANAGEMENT_MASK 0x00040000 +#define PCIE_CFG_LINK_CAPABILITY_CLOCK_POWER_MANAGEMENT_ALIGN 0 +#define PCIE_CFG_LINK_CAPABILITY_CLOCK_POWER_MANAGEMENT_BITS 1 +#define PCIE_CFG_LINK_CAPABILITY_CLOCK_POWER_MANAGEMENT_SHIFT 18 + +/* PCIE_CFG :: LINK_CAPABILITY :: L1_EXIT_LATENCY [17:15] */ +#define PCIE_CFG_LINK_CAPABILITY_L1_EXIT_LATENCY_MASK 0x00038000 +#define PCIE_CFG_LINK_CAPABILITY_L1_EXIT_LATENCY_ALIGN 0 +#define PCIE_CFG_LINK_CAPABILITY_L1_EXIT_LATENCY_BITS 3 +#define PCIE_CFG_LINK_CAPABILITY_L1_EXIT_LATENCY_SHIFT 15 + +/* PCIE_CFG :: LINK_CAPABILITY :: L0S_EXIT_LATENCY [14:12] */ +#define PCIE_CFG_LINK_CAPABILITY_L0S_EXIT_LATENCY_MASK 0x00007000 +#define PCIE_CFG_LINK_CAPABILITY_L0S_EXIT_LATENCY_ALIGN 0 +#define PCIE_CFG_LINK_CAPABILITY_L0S_EXIT_LATENCY_BITS 3 +#define PCIE_CFG_LINK_CAPABILITY_L0S_EXIT_LATENCY_SHIFT 12 + +/* PCIE_CFG :: LINK_CAPABILITY :: ACTIVE_STATE_POWER_MANAGEMENT_SUPPORT [11:10] */ +#define PCIE_CFG_LINK_CAPABILITY_ACTIVE_STATE_POWER_MANAGEMENT_SUPPORT_MASK 0x00000c00 +#define PCIE_CFG_LINK_CAPABILITY_ACTIVE_STATE_POWER_MANAGEMENT_SUPPORT_ALIGN 0 +#define PCIE_CFG_LINK_CAPABILITY_ACTIVE_STATE_POWER_MANAGEMENT_SUPPORT_BITS 2 +#define PCIE_CFG_LINK_CAPABILITY_ACTIVE_STATE_POWER_MANAGEMENT_SUPPORT_SHIFT 10 + +/* PCIE_CFG :: LINK_CAPABILITY :: MAXIMUM_LINK_WIDTH [09:04] */ +#define PCIE_CFG_LINK_CAPABILITY_MAXIMUM_LINK_WIDTH_MASK 0x000003f0 +#define PCIE_CFG_LINK_CAPABILITY_MAXIMUM_LINK_WIDTH_ALIGN 0 +#define PCIE_CFG_LINK_CAPABILITY_MAXIMUM_LINK_WIDTH_BITS 6 +#define PCIE_CFG_LINK_CAPABILITY_MAXIMUM_LINK_WIDTH_SHIFT 4 + +/* PCIE_CFG :: LINK_CAPABILITY :: MAXIMUM_LINK_SPEED [03:00] */ +#define PCIE_CFG_LINK_CAPABILITY_MAXIMUM_LINK_SPEED_MASK 0x0000000f +#define PCIE_CFG_LINK_CAPABILITY_MAXIMUM_LINK_SPEED_ALIGN 0 +#define PCIE_CFG_LINK_CAPABILITY_MAXIMUM_LINK_SPEED_BITS 4 +#define PCIE_CFG_LINK_CAPABILITY_MAXIMUM_LINK_SPEED_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: LINK_STATUS_CONTROL + ***************************************************************************/ +/* PCIE_CFG :: LINK_STATUS_CONTROL :: RESERVED_0 [31:29] */ +#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_0_MASK 0xe0000000 +#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_0_ALIGN 0 +#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_0_BITS 3 +#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_0_SHIFT 29 + +/* PCIE_CFG :: LINK_STATUS_CONTROL :: SLOT_CLOCK_CONFIGURATION [28:28] */ +#define PCIE_CFG_LINK_STATUS_CONTROL_SLOT_CLOCK_CONFIGURATION_MASK 0x10000000 +#define PCIE_CFG_LINK_STATUS_CONTROL_SLOT_CLOCK_CONFIGURATION_ALIGN 0 +#define PCIE_CFG_LINK_STATUS_CONTROL_SLOT_CLOCK_CONFIGURATION_BITS 1 +#define PCIE_CFG_LINK_STATUS_CONTROL_SLOT_CLOCK_CONFIGURATION_SHIFT 28 + +/* PCIE_CFG :: LINK_STATUS_CONTROL :: RESERVED_1 [27:26] */ +#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_1_MASK 0x0c000000 +#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_1_ALIGN 0 +#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_1_BITS 2 +#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_1_SHIFT 26 + +/* PCIE_CFG :: LINK_STATUS_CONTROL :: NEGOTIATED_LINK_WIDTH [25:20] */ +#define PCIE_CFG_LINK_STATUS_CONTROL_NEGOTIATED_LINK_WIDTH_MASK 0x03f00000 +#define PCIE_CFG_LINK_STATUS_CONTROL_NEGOTIATED_LINK_WIDTH_ALIGN 0 +#define PCIE_CFG_LINK_STATUS_CONTROL_NEGOTIATED_LINK_WIDTH_BITS 6 +#define PCIE_CFG_LINK_STATUS_CONTROL_NEGOTIATED_LINK_WIDTH_SHIFT 20 + +/* PCIE_CFG :: LINK_STATUS_CONTROL :: LINK_SPEED [19:16] */ +#define PCIE_CFG_LINK_STATUS_CONTROL_LINK_SPEED_MASK 0x000f0000 +#define PCIE_CFG_LINK_STATUS_CONTROL_LINK_SPEED_ALIGN 0 +#define PCIE_CFG_LINK_STATUS_CONTROL_LINK_SPEED_BITS 4 +#define PCIE_CFG_LINK_STATUS_CONTROL_LINK_SPEED_SHIFT 16 + +/* PCIE_CFG :: LINK_STATUS_CONTROL :: RESERVED_2 [15:09] */ +#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_2_MASK 0x0000fe00 +#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_2_ALIGN 0 +#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_2_BITS 7 +#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_2_SHIFT 9 + +/* PCIE_CFG :: LINK_STATUS_CONTROL :: CLOCK_REQUEST_ENABLE [08:08] */ +#define PCIE_CFG_LINK_STATUS_CONTROL_CLOCK_REQUEST_ENABLE_MASK 0x00000100 +#define PCIE_CFG_LINK_STATUS_CONTROL_CLOCK_REQUEST_ENABLE_ALIGN 0 +#define PCIE_CFG_LINK_STATUS_CONTROL_CLOCK_REQUEST_ENABLE_BITS 1 +#define PCIE_CFG_LINK_STATUS_CONTROL_CLOCK_REQUEST_ENABLE_SHIFT 8 + +/* PCIE_CFG :: LINK_STATUS_CONTROL :: EXTENDED_SYNCH [07:07] */ +#define PCIE_CFG_LINK_STATUS_CONTROL_EXTENDED_SYNCH_MASK 0x00000080 +#define PCIE_CFG_LINK_STATUS_CONTROL_EXTENDED_SYNCH_ALIGN 0 +#define PCIE_CFG_LINK_STATUS_CONTROL_EXTENDED_SYNCH_BITS 1 +#define PCIE_CFG_LINK_STATUS_CONTROL_EXTENDED_SYNCH_SHIFT 7 + +/* PCIE_CFG :: LINK_STATUS_CONTROL :: COMMON_CLOCK_CONFIGURATION [06:06] */ +#define PCIE_CFG_LINK_STATUS_CONTROL_COMMON_CLOCK_CONFIGURATION_MASK 0x00000040 +#define PCIE_CFG_LINK_STATUS_CONTROL_COMMON_CLOCK_CONFIGURATION_ALIGN 0 +#define PCIE_CFG_LINK_STATUS_CONTROL_COMMON_CLOCK_CONFIGURATION_BITS 1 +#define PCIE_CFG_LINK_STATUS_CONTROL_COMMON_CLOCK_CONFIGURATION_SHIFT 6 + +/* PCIE_CFG :: LINK_STATUS_CONTROL :: RESERVED_3 [05:05] */ +#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_3_MASK 0x00000020 +#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_3_ALIGN 0 +#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_3_BITS 1 +#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_3_SHIFT 5 + +/* PCIE_CFG :: LINK_STATUS_CONTROL :: RESERVED_4 [04:04] */ +#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_4_MASK 0x00000010 +#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_4_ALIGN 0 +#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_4_BITS 1 +#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_4_SHIFT 4 + +/* PCIE_CFG :: LINK_STATUS_CONTROL :: READ_COMPLETION_BOUNDARY [03:03] */ +#define PCIE_CFG_LINK_STATUS_CONTROL_READ_COMPLETION_BOUNDARY_MASK 0x00000008 +#define PCIE_CFG_LINK_STATUS_CONTROL_READ_COMPLETION_BOUNDARY_ALIGN 0 +#define PCIE_CFG_LINK_STATUS_CONTROL_READ_COMPLETION_BOUNDARY_BITS 1 +#define PCIE_CFG_LINK_STATUS_CONTROL_READ_COMPLETION_BOUNDARY_SHIFT 3 + +/* PCIE_CFG :: LINK_STATUS_CONTROL :: RESERVED_5 [02:02] */ +#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_5_MASK 0x00000004 +#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_5_ALIGN 0 +#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_5_BITS 1 +#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_5_SHIFT 2 + +/* PCIE_CFG :: LINK_STATUS_CONTROL :: ACTIVE_STATE_POWER_MANAGEMENT_CONTROL [01:00] */ +#define PCIE_CFG_LINK_STATUS_CONTROL_ACTIVE_STATE_POWER_MANAGEMENT_CONTROL_MASK 0x00000003 +#define PCIE_CFG_LINK_STATUS_CONTROL_ACTIVE_STATE_POWER_MANAGEMENT_CONTROL_ALIGN 0 +#define PCIE_CFG_LINK_STATUS_CONTROL_ACTIVE_STATE_POWER_MANAGEMENT_CONTROL_BITS 2 +#define PCIE_CFG_LINK_STATUS_CONTROL_ACTIVE_STATE_POWER_MANAGEMENT_CONTROL_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: DEVICE_CAPABILITIES_2 + ***************************************************************************/ +/* PCIE_CFG :: DEVICE_CAPABILITIES_2 :: RESERVED_0 [31:05] */ +#define PCIE_CFG_DEVICE_CAPABILITIES_2_RESERVED_0_MASK 0xffffffe0 +#define PCIE_CFG_DEVICE_CAPABILITIES_2_RESERVED_0_ALIGN 0 +#define PCIE_CFG_DEVICE_CAPABILITIES_2_RESERVED_0_BITS 27 +#define PCIE_CFG_DEVICE_CAPABILITIES_2_RESERVED_0_SHIFT 5 + +/* PCIE_CFG :: DEVICE_CAPABILITIES_2 :: CPL_DISABLE_SUPPORTED [04:04] */ +#define PCIE_CFG_DEVICE_CAPABILITIES_2_CPL_DISABLE_SUPPORTED_MASK 0x00000010 +#define PCIE_CFG_DEVICE_CAPABILITIES_2_CPL_DISABLE_SUPPORTED_ALIGN 0 +#define PCIE_CFG_DEVICE_CAPABILITIES_2_CPL_DISABLE_SUPPORTED_BITS 1 +#define PCIE_CFG_DEVICE_CAPABILITIES_2_CPL_DISABLE_SUPPORTED_SHIFT 4 + +/* PCIE_CFG :: DEVICE_CAPABILITIES_2 :: CPL_TIMEOUT_RANGE_SUPPORTED [03:00] */ +#define PCIE_CFG_DEVICE_CAPABILITIES_2_CPL_TIMEOUT_RANGE_SUPPORTED_MASK 0x0000000f +#define PCIE_CFG_DEVICE_CAPABILITIES_2_CPL_TIMEOUT_RANGE_SUPPORTED_ALIGN 0 +#define PCIE_CFG_DEVICE_CAPABILITIES_2_CPL_TIMEOUT_RANGE_SUPPORTED_BITS 4 +#define PCIE_CFG_DEVICE_CAPABILITIES_2_CPL_TIMEOUT_RANGE_SUPPORTED_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: DEVICE_STATUS_CONTROL_2 + ***************************************************************************/ +/* PCIE_CFG :: DEVICE_STATUS_CONTROL_2 :: RESERVED_0 [31:05] */ +#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_RESERVED_0_MASK 0xffffffe0 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_RESERVED_0_ALIGN 0 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_RESERVED_0_BITS 27 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_RESERVED_0_SHIFT 5 + +/* PCIE_CFG :: DEVICE_STATUS_CONTROL_2 :: CPL_TIMEOUT_DISABLE [04:04] */ +#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_CPL_TIMEOUT_DISABLE_MASK 0x00000010 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_CPL_TIMEOUT_DISABLE_ALIGN 0 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_CPL_TIMEOUT_DISABLE_BITS 1 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_CPL_TIMEOUT_DISABLE_SHIFT 4 + +/* PCIE_CFG :: DEVICE_STATUS_CONTROL_2 :: CPL_TIMEOUT_VALUE [03:00] */ +#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_CPL_TIMEOUT_VALUE_MASK 0x0000000f +#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_CPL_TIMEOUT_VALUE_ALIGN 0 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_CPL_TIMEOUT_VALUE_BITS 4 +#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_CPL_TIMEOUT_VALUE_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: LINK_CAPABILITIES_2 + ***************************************************************************/ +/* PCIE_CFG :: LINK_CAPABILITIES_2 :: RESERVED_0 [31:00] */ +#define PCIE_CFG_LINK_CAPABILITIES_2_RESERVED_0_MASK 0xffffffff +#define PCIE_CFG_LINK_CAPABILITIES_2_RESERVED_0_ALIGN 0 +#define PCIE_CFG_LINK_CAPABILITIES_2_RESERVED_0_BITS 32 +#define PCIE_CFG_LINK_CAPABILITIES_2_RESERVED_0_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: LINK_STATUS_CONTROL_2 + ***************************************************************************/ +/* PCIE_CFG :: LINK_STATUS_CONTROL_2 :: RESERVED_0 [31:00] */ +#define PCIE_CFG_LINK_STATUS_CONTROL_2_RESERVED_0_MASK 0xffffffff +#define PCIE_CFG_LINK_STATUS_CONTROL_2_RESERVED_0_ALIGN 0 +#define PCIE_CFG_LINK_STATUS_CONTROL_2_RESERVED_0_BITS 32 +#define PCIE_CFG_LINK_STATUS_CONTROL_2_RESERVED_0_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER + ***************************************************************************/ +/* PCIE_CFG :: ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER :: NEXT_CAPABILITY_OFFSET [31:20] */ +#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_MASK 0xfff00000 +#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_ALIGN 0 +#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_BITS 12 +#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_SHIFT 20 + +/* PCIE_CFG :: ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER :: CAPABILITY_VERSION [19:16] */ +#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_MASK 0x000f0000 +#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_ALIGN 0 +#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_BITS 4 +#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_SHIFT 16 + +/* PCIE_CFG :: ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER :: PCIE_EXTENDED_CAPABILITY_ID [15:00] */ +#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_MASK 0x0000ffff +#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_ALIGN 0 +#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_BITS 16 +#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS + ***************************************************************************/ +/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: RESERVED_0 [31:21] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_0_MASK 0xffe00000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_0_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_0_BITS 11 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_0_SHIFT 21 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: UNSUPPORTED_REQUEST_ERROR_STATUS [20:20] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_UNSUPPORTED_REQUEST_ERROR_STATUS_MASK 0x00100000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_UNSUPPORTED_REQUEST_ERROR_STATUS_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_UNSUPPORTED_REQUEST_ERROR_STATUS_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_UNSUPPORTED_REQUEST_ERROR_STATUS_SHIFT 20 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: ECRC_ERROR_STATUS [19:19] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_ECRC_ERROR_STATUS_MASK 0x00080000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_ECRC_ERROR_STATUS_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_ECRC_ERROR_STATUS_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_ECRC_ERROR_STATUS_SHIFT 19 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: MALFORMED_TLP_STATUS [18:18] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_MALFORMED_TLP_STATUS_MASK 0x00040000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_MALFORMED_TLP_STATUS_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_MALFORMED_TLP_STATUS_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_MALFORMED_TLP_STATUS_SHIFT 18 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: RECEIVER_OVERFLOW_STATUS [17:17] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RECEIVER_OVERFLOW_STATUS_MASK 0x00020000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RECEIVER_OVERFLOW_STATUS_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RECEIVER_OVERFLOW_STATUS_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RECEIVER_OVERFLOW_STATUS_SHIFT 17 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: UNEXPECTED_COMPLETION_STATUS [16:16] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_UNEXPECTED_COMPLETION_STATUS_MASK 0x00010000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_UNEXPECTED_COMPLETION_STATUS_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_UNEXPECTED_COMPLETION_STATUS_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_UNEXPECTED_COMPLETION_STATUS_SHIFT 16 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: COMPLETER_ABORT_STATUS [15:15] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_COMPLETER_ABORT_STATUS_MASK 0x00008000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_COMPLETER_ABORT_STATUS_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_COMPLETER_ABORT_STATUS_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_COMPLETER_ABORT_STATUS_SHIFT 15 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: COMPLETION_TIMEOUT_STATUS [14:14] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_COMPLETION_TIMEOUT_STATUS_MASK 0x00004000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_COMPLETION_TIMEOUT_STATUS_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_COMPLETION_TIMEOUT_STATUS_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_COMPLETION_TIMEOUT_STATUS_SHIFT 14 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: FLOW_CONTROL_PROTOCOL_ERROR_STATUS [13:13] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_FLOW_CONTROL_PROTOCOL_ERROR_STATUS_MASK 0x00002000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_FLOW_CONTROL_PROTOCOL_ERROR_STATUS_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_FLOW_CONTROL_PROTOCOL_ERROR_STATUS_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_FLOW_CONTROL_PROTOCOL_ERROR_STATUS_SHIFT 13 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: POISONED_TLP_STATUS [12:12] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_POISONED_TLP_STATUS_MASK 0x00001000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_POISONED_TLP_STATUS_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_POISONED_TLP_STATUS_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_POISONED_TLP_STATUS_SHIFT 12 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: RESERVED_1 [11:05] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_1_MASK 0x00000fe0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_1_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_1_BITS 7 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_1_SHIFT 5 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: DATA_LINK_PROTOCOL_ERROR_STATUS [04:04] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_DATA_LINK_PROTOCOL_ERROR_STATUS_MASK 0x00000010 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_DATA_LINK_PROTOCOL_ERROR_STATUS_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_DATA_LINK_PROTOCOL_ERROR_STATUS_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_DATA_LINK_PROTOCOL_ERROR_STATUS_SHIFT 4 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: RESERVED_2 [03:01] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_2_MASK 0x0000000e +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_2_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_2_BITS 3 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_2_SHIFT 1 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: TRAINING_ERROR_STATUS [00:00] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_TRAINING_ERROR_STATUS_MASK 0x00000001 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_TRAINING_ERROR_STATUS_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_TRAINING_ERROR_STATUS_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_TRAINING_ERROR_STATUS_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: UNCORRECTABLE_ERROR_MASK + ***************************************************************************/ +/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: RESERVED_0 [31:21] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_0_MASK 0xffe00000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_0_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_0_BITS 11 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_0_SHIFT 21 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: UNSUPPORTED_REQUEST_ERROR_MASK [20:20] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_UNSUPPORTED_REQUEST_ERROR_MASK_MASK 0x00100000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_UNSUPPORTED_REQUEST_ERROR_MASK_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_UNSUPPORTED_REQUEST_ERROR_MASK_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_UNSUPPORTED_REQUEST_ERROR_MASK_SHIFT 20 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: ECRC_ERROR_MASK [19:19] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_ECRC_ERROR_MASK_MASK 0x00080000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_ECRC_ERROR_MASK_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_ECRC_ERROR_MASK_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_ECRC_ERROR_MASK_SHIFT 19 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: MALFORMED_TLP_MASK [18:18] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_MALFORMED_TLP_MASK_MASK 0x00040000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_MALFORMED_TLP_MASK_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_MALFORMED_TLP_MASK_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_MALFORMED_TLP_MASK_SHIFT 18 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: RECEIVER_OVERFLOW_MASK [17:17] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RECEIVER_OVERFLOW_MASK_MASK 0x00020000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RECEIVER_OVERFLOW_MASK_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RECEIVER_OVERFLOW_MASK_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RECEIVER_OVERFLOW_MASK_SHIFT 17 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: UNEXPECTED_COMPLETION_MASK [16:16] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_UNEXPECTED_COMPLETION_MASK_MASK 0x00010000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_UNEXPECTED_COMPLETION_MASK_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_UNEXPECTED_COMPLETION_MASK_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_UNEXPECTED_COMPLETION_MASK_SHIFT 16 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: COMPLETER_ABORT_MASK [15:15] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_COMPLETER_ABORT_MASK_MASK 0x00008000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_COMPLETER_ABORT_MASK_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_COMPLETER_ABORT_MASK_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_COMPLETER_ABORT_MASK_SHIFT 15 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: COMPLETION_TIMEOUT_MASK [14:14] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_COMPLETION_TIMEOUT_MASK_MASK 0x00004000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_COMPLETION_TIMEOUT_MASK_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_COMPLETION_TIMEOUT_MASK_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_COMPLETION_TIMEOUT_MASK_SHIFT 14 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: FLOW_CONTROL_PROTOCOL_ERROR_MASK [13:13] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_FLOW_CONTROL_PROTOCOL_ERROR_MASK_MASK 0x00002000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_FLOW_CONTROL_PROTOCOL_ERROR_MASK_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_FLOW_CONTROL_PROTOCOL_ERROR_MASK_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_FLOW_CONTROL_PROTOCOL_ERROR_MASK_SHIFT 13 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: POISONED_TLP_MASK [12:12] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_POISONED_TLP_MASK_MASK 0x00001000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_POISONED_TLP_MASK_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_POISONED_TLP_MASK_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_POISONED_TLP_MASK_SHIFT 12 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: RESERVED_1 [11:05] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_1_MASK 0x00000fe0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_1_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_1_BITS 7 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_1_SHIFT 5 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: DATA_LINK_PROTOCOL_ERROR_MASK [04:04] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_DATA_LINK_PROTOCOL_ERROR_MASK_MASK 0x00000010 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_DATA_LINK_PROTOCOL_ERROR_MASK_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_DATA_LINK_PROTOCOL_ERROR_MASK_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_DATA_LINK_PROTOCOL_ERROR_MASK_SHIFT 4 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: RESERVED_2 [03:01] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_2_MASK 0x0000000e +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_2_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_2_BITS 3 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_2_SHIFT 1 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: TRAINING_ERROR_MASK [00:00] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_TRAINING_ERROR_MASK_MASK 0x00000001 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_TRAINING_ERROR_MASK_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_TRAINING_ERROR_MASK_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_TRAINING_ERROR_MASK_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY + ***************************************************************************/ +/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: RESERVED_0 [31:21] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_0_MASK 0xffe00000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_0_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_0_BITS 11 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_0_SHIFT 21 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: UNSUPPORTED_REQUEST_ERROR_SEVERITY [20:20] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_UNSUPPORTED_REQUEST_ERROR_SEVERITY_MASK 0x00100000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_UNSUPPORTED_REQUEST_ERROR_SEVERITY_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_UNSUPPORTED_REQUEST_ERROR_SEVERITY_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_UNSUPPORTED_REQUEST_ERROR_SEVERITY_SHIFT 20 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: ECRC_ERROR_SEVERITY [19:19] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_ECRC_ERROR_SEVERITY_MASK 0x00080000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_ECRC_ERROR_SEVERITY_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_ECRC_ERROR_SEVERITY_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_ECRC_ERROR_SEVERITY_SHIFT 19 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: MALFORMED_TLP_SEVERITY [18:18] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_MALFORMED_TLP_SEVERITY_MASK 0x00040000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_MALFORMED_TLP_SEVERITY_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_MALFORMED_TLP_SEVERITY_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_MALFORMED_TLP_SEVERITY_SHIFT 18 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: RECEIVER_OVERFLOW_ERROR_SEVERITY [17:17] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RECEIVER_OVERFLOW_ERROR_SEVERITY_MASK 0x00020000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RECEIVER_OVERFLOW_ERROR_SEVERITY_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RECEIVER_OVERFLOW_ERROR_SEVERITY_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RECEIVER_OVERFLOW_ERROR_SEVERITY_SHIFT 17 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: UNEXPECTED_COMPLETION_ERROR_SEVERITY [16:16] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_UNEXPECTED_COMPLETION_ERROR_SEVERITY_MASK 0x00010000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_UNEXPECTED_COMPLETION_ERROR_SEVERITY_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_UNEXPECTED_COMPLETION_ERROR_SEVERITY_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_UNEXPECTED_COMPLETION_ERROR_SEVERITY_SHIFT 16 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: COMPLETER_ABORT_ERROR_SEVERITY [15:15] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_COMPLETER_ABORT_ERROR_SEVERITY_MASK 0x00008000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_COMPLETER_ABORT_ERROR_SEVERITY_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_COMPLETER_ABORT_ERROR_SEVERITY_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_COMPLETER_ABORT_ERROR_SEVERITY_SHIFT 15 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: COMPLETION_TIMEOUT_ERROR_SEVERITY [14:14] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_COMPLETION_TIMEOUT_ERROR_SEVERITY_MASK 0x00004000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_COMPLETION_TIMEOUT_ERROR_SEVERITY_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_COMPLETION_TIMEOUT_ERROR_SEVERITY_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_COMPLETION_TIMEOUT_ERROR_SEVERITY_SHIFT 14 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: FLOW_CONTROL_PROTOCOL_ERROR_SEVERITY [13:13] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_FLOW_CONTROL_PROTOCOL_ERROR_SEVERITY_MASK 0x00002000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_FLOW_CONTROL_PROTOCOL_ERROR_SEVERITY_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_FLOW_CONTROL_PROTOCOL_ERROR_SEVERITY_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_FLOW_CONTROL_PROTOCOL_ERROR_SEVERITY_SHIFT 13 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: POISONED_TLP_SEVERITY [12:12] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_POISONED_TLP_SEVERITY_MASK 0x00001000 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_POISONED_TLP_SEVERITY_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_POISONED_TLP_SEVERITY_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_POISONED_TLP_SEVERITY_SHIFT 12 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: RESERVED_1 [11:05] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_1_MASK 0x00000fe0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_1_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_1_BITS 7 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_1_SHIFT 5 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: DATA_LINK_PROTOCOL_ERROR_SEVERITY [04:04] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_DATA_LINK_PROTOCOL_ERROR_SEVERITY_MASK 0x00000010 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_DATA_LINK_PROTOCOL_ERROR_SEVERITY_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_DATA_LINK_PROTOCOL_ERROR_SEVERITY_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_DATA_LINK_PROTOCOL_ERROR_SEVERITY_SHIFT 4 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: RESERVED_2 [03:01] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_2_MASK 0x0000000e +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_2_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_2_BITS 3 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_2_SHIFT 1 + +/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: TRAINING_ERROR_SEVERITY [00:00] */ +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_TRAINING_ERROR_SEVERITY_MASK 0x00000001 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_TRAINING_ERROR_SEVERITY_ALIGN 0 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_TRAINING_ERROR_SEVERITY_BITS 1 +#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_TRAINING_ERROR_SEVERITY_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: CORRECTABLE_ERROR_STATUS + ***************************************************************************/ +/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: RESERVED_0 [31:14] */ +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_0_MASK 0xffffc000 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_0_ALIGN 0 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_0_BITS 18 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_0_SHIFT 14 + +/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: ADVISORY_NON_FATAL_ERROR_STATUS [13:13] */ +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_ADVISORY_NON_FATAL_ERROR_STATUS_MASK 0x00002000 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_ADVISORY_NON_FATAL_ERROR_STATUS_ALIGN 0 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_ADVISORY_NON_FATAL_ERROR_STATUS_BITS 1 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_ADVISORY_NON_FATAL_ERROR_STATUS_SHIFT 13 + +/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: REPLAY_TIMER_TIMEOUT_STATUS [12:12] */ +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_REPLAY_TIMER_TIMEOUT_STATUS_MASK 0x00001000 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_REPLAY_TIMER_TIMEOUT_STATUS_ALIGN 0 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_REPLAY_TIMER_TIMEOUT_STATUS_BITS 1 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_REPLAY_TIMER_TIMEOUT_STATUS_SHIFT 12 + +/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: RESERVED_1 [11:09] */ +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_1_MASK 0x00000e00 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_1_ALIGN 0 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_1_BITS 3 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_1_SHIFT 9 + +/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: REPLAY_NUM_ROLLOVER_STATUS [08:08] */ +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_REPLAY_NUM_ROLLOVER_STATUS_MASK 0x00000100 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_REPLAY_NUM_ROLLOVER_STATUS_ALIGN 0 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_REPLAY_NUM_ROLLOVER_STATUS_BITS 1 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_REPLAY_NUM_ROLLOVER_STATUS_SHIFT 8 + +/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: BAD_DLLP_STATUS [07:07] */ +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_BAD_DLLP_STATUS_MASK 0x00000080 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_BAD_DLLP_STATUS_ALIGN 0 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_BAD_DLLP_STATUS_BITS 1 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_BAD_DLLP_STATUS_SHIFT 7 + +/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: BAD_TLP_STATUS [06:06] */ +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_BAD_TLP_STATUS_MASK 0x00000040 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_BAD_TLP_STATUS_ALIGN 0 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_BAD_TLP_STATUS_BITS 1 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_BAD_TLP_STATUS_SHIFT 6 + +/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: RESERVED_2 [05:01] */ +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_2_MASK 0x0000003e +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_2_ALIGN 0 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_2_BITS 5 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_2_SHIFT 1 + +/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: RECEIVER_ERROR_STATUS [00:00] */ +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RECEIVER_ERROR_STATUS_MASK 0x00000001 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RECEIVER_ERROR_STATUS_ALIGN 0 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RECEIVER_ERROR_STATUS_BITS 1 +#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RECEIVER_ERROR_STATUS_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: CORRECTABLE_ERROR_MASK + ***************************************************************************/ +/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: RESERVED_0 [31:14] */ +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_0_MASK 0xffffc000 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_0_ALIGN 0 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_0_BITS 18 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_0_SHIFT 14 + +/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: ADVISORY_NON_FATAL_ERROR_MASK [13:13] */ +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_ADVISORY_NON_FATAL_ERROR_MASK_MASK 0x00002000 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_ADVISORY_NON_FATAL_ERROR_MASK_ALIGN 0 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_ADVISORY_NON_FATAL_ERROR_MASK_BITS 1 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_ADVISORY_NON_FATAL_ERROR_MASK_SHIFT 13 + +/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: REPLAY_TIMER_TIMEOUT_MASK [12:12] */ +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_REPLAY_TIMER_TIMEOUT_MASK_MASK 0x00001000 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_REPLAY_TIMER_TIMEOUT_MASK_ALIGN 0 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_REPLAY_TIMER_TIMEOUT_MASK_BITS 1 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_REPLAY_TIMER_TIMEOUT_MASK_SHIFT 12 + +/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: RESERVED_1 [11:09] */ +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_1_MASK 0x00000e00 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_1_ALIGN 0 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_1_BITS 3 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_1_SHIFT 9 + +/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: REPLAY_NUM_ROLLOVER_MASK [08:08] */ +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_REPLAY_NUM_ROLLOVER_MASK_MASK 0x00000100 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_REPLAY_NUM_ROLLOVER_MASK_ALIGN 0 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_REPLAY_NUM_ROLLOVER_MASK_BITS 1 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_REPLAY_NUM_ROLLOVER_MASK_SHIFT 8 + +/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: BAD_DLLP_MASK [07:07] */ +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_BAD_DLLP_MASK_MASK 0x00000080 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_BAD_DLLP_MASK_ALIGN 0 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_BAD_DLLP_MASK_BITS 1 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_BAD_DLLP_MASK_SHIFT 7 + +/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: BAD_TLP_MASK [06:06] */ +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_BAD_TLP_MASK_MASK 0x00000040 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_BAD_TLP_MASK_ALIGN 0 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_BAD_TLP_MASK_BITS 1 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_BAD_TLP_MASK_SHIFT 6 + +/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: RESERVED_2 [05:01] */ +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_2_MASK 0x0000003e +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_2_ALIGN 0 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_2_BITS 5 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_2_SHIFT 1 + +/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: RECEIVER_ERROR_MASK [00:00] */ +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RECEIVER_ERROR_MASK_MASK 0x00000001 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RECEIVER_ERROR_MASK_ALIGN 0 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RECEIVER_ERROR_MASK_BITS 1 +#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RECEIVER_ERROR_MASK_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: ADVANCED_ERROR_CAPABILITIES_AND_CONTROL + ***************************************************************************/ +/* PCIE_CFG :: ADVANCED_ERROR_CAPABILITIES_AND_CONTROL :: RESERVED_0 [31:09] */ +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_RESERVED_0_MASK 0xfffffe00 +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_RESERVED_0_ALIGN 0 +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_RESERVED_0_BITS 23 +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_RESERVED_0_SHIFT 9 + +/* PCIE_CFG :: ADVANCED_ERROR_CAPABILITIES_AND_CONTROL :: ECRC_CHECK_ENABLE [08:08] */ +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_CHECK_ENABLE_MASK 0x00000100 +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_CHECK_ENABLE_ALIGN 0 +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_CHECK_ENABLE_BITS 1 +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_CHECK_ENABLE_SHIFT 8 + +/* PCIE_CFG :: ADVANCED_ERROR_CAPABILITIES_AND_CONTROL :: ECRC_CHECK_CAPABLE [07:07] */ +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_CHECK_CAPABLE_MASK 0x00000080 +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_CHECK_CAPABLE_ALIGN 0 +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_CHECK_CAPABLE_BITS 1 +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_CHECK_CAPABLE_SHIFT 7 + +/* PCIE_CFG :: ADVANCED_ERROR_CAPABILITIES_AND_CONTROL :: ECRC_GENERATION_ENABLE [06:06] */ +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_GENERATION_ENABLE_MASK 0x00000040 +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_GENERATION_ENABLE_ALIGN 0 +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_GENERATION_ENABLE_BITS 1 +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_GENERATION_ENABLE_SHIFT 6 + +/* PCIE_CFG :: ADVANCED_ERROR_CAPABILITIES_AND_CONTROL :: ECRC_GENERATION_CAPABLE [05:05] */ +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_GENERATION_CAPABLE_MASK 0x00000020 +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_GENERATION_CAPABLE_ALIGN 0 +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_GENERATION_CAPABLE_BITS 1 +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_GENERATION_CAPABLE_SHIFT 5 + +/* PCIE_CFG :: ADVANCED_ERROR_CAPABILITIES_AND_CONTROL :: FIRST_ERROR_POINTER [04:00] */ +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_FIRST_ERROR_POINTER_MASK 0x0000001f +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_FIRST_ERROR_POINTER_ALIGN 0 +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_FIRST_ERROR_POINTER_BITS 5 +#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_FIRST_ERROR_POINTER_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: HEADER_LOG_1 + ***************************************************************************/ +/* PCIE_CFG :: HEADER_LOG_1 :: HEADER_BYTE_0 [31:24] */ +#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_0_MASK 0xff000000 +#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_0_ALIGN 0 +#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_0_BITS 8 +#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_0_SHIFT 24 + +/* PCIE_CFG :: HEADER_LOG_1 :: HEADER_BYTE_1 [23:16] */ +#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_1_MASK 0x00ff0000 +#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_1_ALIGN 0 +#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_1_BITS 8 +#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_1_SHIFT 16 + +/* PCIE_CFG :: HEADER_LOG_1 :: HEADER_BYTE_2 [15:08] */ +#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_2_MASK 0x0000ff00 +#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_2_ALIGN 0 +#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_2_BITS 8 +#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_2_SHIFT 8 + +/* PCIE_CFG :: HEADER_LOG_1 :: HEADER_BYTE_3 [07:00] */ +#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_3_MASK 0x000000ff +#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_3_ALIGN 0 +#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_3_BITS 8 +#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_3_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: HEADER_LOG_2 + ***************************************************************************/ +/* PCIE_CFG :: HEADER_LOG_2 :: HEADER_BYTE_4 [31:24] */ +#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_4_MASK 0xff000000 +#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_4_ALIGN 0 +#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_4_BITS 8 +#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_4_SHIFT 24 + +/* PCIE_CFG :: HEADER_LOG_2 :: HEADER_BYTE_5 [23:16] */ +#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_5_MASK 0x00ff0000 +#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_5_ALIGN 0 +#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_5_BITS 8 +#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_5_SHIFT 16 + +/* PCIE_CFG :: HEADER_LOG_2 :: HEADER_BYTE_6 [15:08] */ +#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_6_MASK 0x0000ff00 +#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_6_ALIGN 0 +#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_6_BITS 8 +#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_6_SHIFT 8 + +/* PCIE_CFG :: HEADER_LOG_2 :: HEADER_BYTE_7 [07:00] */ +#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_7_MASK 0x000000ff +#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_7_ALIGN 0 +#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_7_BITS 8 +#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_7_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: HEADER_LOG_3 + ***************************************************************************/ +/* PCIE_CFG :: HEADER_LOG_3 :: HEADER_BYTE_8 [31:24] */ +#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_8_MASK 0xff000000 +#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_8_ALIGN 0 +#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_8_BITS 8 +#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_8_SHIFT 24 + +/* PCIE_CFG :: HEADER_LOG_3 :: HEADER_BYTE_9 [23:16] */ +#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_9_MASK 0x00ff0000 +#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_9_ALIGN 0 +#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_9_BITS 8 +#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_9_SHIFT 16 + +/* PCIE_CFG :: HEADER_LOG_3 :: HEADER_BYTE_10 [15:08] */ +#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_10_MASK 0x0000ff00 +#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_10_ALIGN 0 +#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_10_BITS 8 +#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_10_SHIFT 8 + +/* PCIE_CFG :: HEADER_LOG_3 :: HEADER_BYTE_11 [07:00] */ +#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_11_MASK 0x000000ff +#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_11_ALIGN 0 +#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_11_BITS 8 +#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_11_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: HEADER_LOG_4 + ***************************************************************************/ +/* PCIE_CFG :: HEADER_LOG_4 :: HEADER_BYTE_12 [31:24] */ +#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_12_MASK 0xff000000 +#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_12_ALIGN 0 +#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_12_BITS 8 +#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_12_SHIFT 24 + +/* PCIE_CFG :: HEADER_LOG_4 :: HEADER_BYTE_13 [23:16] */ +#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_13_MASK 0x00ff0000 +#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_13_ALIGN 0 +#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_13_BITS 8 +#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_13_SHIFT 16 + +/* PCIE_CFG :: HEADER_LOG_4 :: HEADER_BYTE_14 [15:08] */ +#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_14_MASK 0x0000ff00 +#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_14_ALIGN 0 +#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_14_BITS 8 +#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_14_SHIFT 8 + +/* PCIE_CFG :: HEADER_LOG_4 :: HEADER_BYTE_15 [07:00] */ +#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_15_MASK 0x000000ff +#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_15_ALIGN 0 +#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_15_BITS 8 +#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_15_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER + ***************************************************************************/ +/* PCIE_CFG :: VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER :: NEXT_CAPABILITY_OFFSET [31:20] */ +#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_MASK 0xfff00000 +#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_ALIGN 0 +#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_BITS 12 +#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_SHIFT 20 + +/* PCIE_CFG :: VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER :: CAPABILITY_VERSION [19:16] */ +#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_MASK 0x000f0000 +#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_ALIGN 0 +#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_BITS 4 +#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_SHIFT 16 + +/* PCIE_CFG :: VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER :: PCIE_EXTENDED_CAPABILITY_ID [15:00] */ +#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_MASK 0x0000ffff +#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_ALIGN 0 +#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_BITS 16 +#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: PORT_VC_CAPABILITY + ***************************************************************************/ +/* PCIE_CFG :: PORT_VC_CAPABILITY :: RESERVED_0 [31:12] */ +#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_0_MASK 0xfffff000 +#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_0_ALIGN 0 +#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_0_BITS 20 +#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_0_SHIFT 12 + +/* PCIE_CFG :: PORT_VC_CAPABILITY :: PORT_ARBITRATION_TABLE_ENTRY_SIZE [11:10] */ +#define PCIE_CFG_PORT_VC_CAPABILITY_PORT_ARBITRATION_TABLE_ENTRY_SIZE_MASK 0x00000c00 +#define PCIE_CFG_PORT_VC_CAPABILITY_PORT_ARBITRATION_TABLE_ENTRY_SIZE_ALIGN 0 +#define PCIE_CFG_PORT_VC_CAPABILITY_PORT_ARBITRATION_TABLE_ENTRY_SIZE_BITS 2 +#define PCIE_CFG_PORT_VC_CAPABILITY_PORT_ARBITRATION_TABLE_ENTRY_SIZE_SHIFT 10 + +/* PCIE_CFG :: PORT_VC_CAPABILITY :: REFERENCE_CLOCK [09:08] */ +#define PCIE_CFG_PORT_VC_CAPABILITY_REFERENCE_CLOCK_MASK 0x00000300 +#define PCIE_CFG_PORT_VC_CAPABILITY_REFERENCE_CLOCK_ALIGN 0 +#define PCIE_CFG_PORT_VC_CAPABILITY_REFERENCE_CLOCK_BITS 2 +#define PCIE_CFG_PORT_VC_CAPABILITY_REFERENCE_CLOCK_SHIFT 8 + +/* PCIE_CFG :: PORT_VC_CAPABILITY :: RESERVED_1 [07:07] */ +#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_1_MASK 0x00000080 +#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_1_ALIGN 0 +#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_1_BITS 1 +#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_1_SHIFT 7 + +/* PCIE_CFG :: PORT_VC_CAPABILITY :: LOW_PRIORITY_EXTENDED_VC_COUNT [06:04] */ +#define PCIE_CFG_PORT_VC_CAPABILITY_LOW_PRIORITY_EXTENDED_VC_COUNT_MASK 0x00000070 +#define PCIE_CFG_PORT_VC_CAPABILITY_LOW_PRIORITY_EXTENDED_VC_COUNT_ALIGN 0 +#define PCIE_CFG_PORT_VC_CAPABILITY_LOW_PRIORITY_EXTENDED_VC_COUNT_BITS 3 +#define PCIE_CFG_PORT_VC_CAPABILITY_LOW_PRIORITY_EXTENDED_VC_COUNT_SHIFT 4 + +/* PCIE_CFG :: PORT_VC_CAPABILITY :: RESERVED_2 [03:03] */ +#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_2_MASK 0x00000008 +#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_2_ALIGN 0 +#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_2_BITS 1 +#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_2_SHIFT 3 + +/* PCIE_CFG :: PORT_VC_CAPABILITY :: EXTENDED_VC_COUNT [02:00] */ +#define PCIE_CFG_PORT_VC_CAPABILITY_EXTENDED_VC_COUNT_MASK 0x00000007 +#define PCIE_CFG_PORT_VC_CAPABILITY_EXTENDED_VC_COUNT_ALIGN 0 +#define PCIE_CFG_PORT_VC_CAPABILITY_EXTENDED_VC_COUNT_BITS 3 +#define PCIE_CFG_PORT_VC_CAPABILITY_EXTENDED_VC_COUNT_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: PORT_VC_CAPABILITY_2 + ***************************************************************************/ +/* PCIE_CFG :: PORT_VC_CAPABILITY_2 :: VC_ARBITRATION_TABLE_OFFSET [31:24] */ +#define PCIE_CFG_PORT_VC_CAPABILITY_2_VC_ARBITRATION_TABLE_OFFSET_MASK 0xff000000 +#define PCIE_CFG_PORT_VC_CAPABILITY_2_VC_ARBITRATION_TABLE_OFFSET_ALIGN 0 +#define PCIE_CFG_PORT_VC_CAPABILITY_2_VC_ARBITRATION_TABLE_OFFSET_BITS 8 +#define PCIE_CFG_PORT_VC_CAPABILITY_2_VC_ARBITRATION_TABLE_OFFSET_SHIFT 24 + +/* PCIE_CFG :: PORT_VC_CAPABILITY_2 :: RESERVED_0 [23:08] */ +#define PCIE_CFG_PORT_VC_CAPABILITY_2_RESERVED_0_MASK 0x00ffff00 +#define PCIE_CFG_PORT_VC_CAPABILITY_2_RESERVED_0_ALIGN 0 +#define PCIE_CFG_PORT_VC_CAPABILITY_2_RESERVED_0_BITS 16 +#define PCIE_CFG_PORT_VC_CAPABILITY_2_RESERVED_0_SHIFT 8 + +/* PCIE_CFG :: PORT_VC_CAPABILITY_2 :: VC_ARBITRATION_CAPABILITY [07:00] */ +#define PCIE_CFG_PORT_VC_CAPABILITY_2_VC_ARBITRATION_CAPABILITY_MASK 0x000000ff +#define PCIE_CFG_PORT_VC_CAPABILITY_2_VC_ARBITRATION_CAPABILITY_ALIGN 0 +#define PCIE_CFG_PORT_VC_CAPABILITY_2_VC_ARBITRATION_CAPABILITY_BITS 8 +#define PCIE_CFG_PORT_VC_CAPABILITY_2_VC_ARBITRATION_CAPABILITY_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: PORT_VC_STATUS_CONTROL + ***************************************************************************/ +/* PCIE_CFG :: PORT_VC_STATUS_CONTROL :: RESERVED_0 [31:17] */ +#define PCIE_CFG_PORT_VC_STATUS_CONTROL_RESERVED_0_MASK 0xfffe0000 +#define PCIE_CFG_PORT_VC_STATUS_CONTROL_RESERVED_0_ALIGN 0 +#define PCIE_CFG_PORT_VC_STATUS_CONTROL_RESERVED_0_BITS 15 +#define PCIE_CFG_PORT_VC_STATUS_CONTROL_RESERVED_0_SHIFT 17 + +/* PCIE_CFG :: PORT_VC_STATUS_CONTROL :: VC_ARBITRATION_TABLE_STATUS [16:16] */ +#define PCIE_CFG_PORT_VC_STATUS_CONTROL_VC_ARBITRATION_TABLE_STATUS_MASK 0x00010000 +#define PCIE_CFG_PORT_VC_STATUS_CONTROL_VC_ARBITRATION_TABLE_STATUS_ALIGN 0 +#define PCIE_CFG_PORT_VC_STATUS_CONTROL_VC_ARBITRATION_TABLE_STATUS_BITS 1 +#define PCIE_CFG_PORT_VC_STATUS_CONTROL_VC_ARBITRATION_TABLE_STATUS_SHIFT 16 + +/* PCIE_CFG :: PORT_VC_STATUS_CONTROL :: RESERVED_1 [15:04] */ +#define PCIE_CFG_PORT_VC_STATUS_CONTROL_RESERVED_1_MASK 0x0000fff0 +#define PCIE_CFG_PORT_VC_STATUS_CONTROL_RESERVED_1_ALIGN 0 +#define PCIE_CFG_PORT_VC_STATUS_CONTROL_RESERVED_1_BITS 12 +#define PCIE_CFG_PORT_VC_STATUS_CONTROL_RESERVED_1_SHIFT 4 + +/* PCIE_CFG :: PORT_VC_STATUS_CONTROL :: VC_ARBITRATION_SELECT [03:01] */ +#define PCIE_CFG_PORT_VC_STATUS_CONTROL_VC_ARBITRATION_SELECT_MASK 0x0000000e +#define PCIE_CFG_PORT_VC_STATUS_CONTROL_VC_ARBITRATION_SELECT_ALIGN 0 +#define PCIE_CFG_PORT_VC_STATUS_CONTROL_VC_ARBITRATION_SELECT_BITS 3 +#define PCIE_CFG_PORT_VC_STATUS_CONTROL_VC_ARBITRATION_SELECT_SHIFT 1 + +/* PCIE_CFG :: PORT_VC_STATUS_CONTROL :: LOAD_VC_ARBITRATION_TABLE [00:00] */ +#define PCIE_CFG_PORT_VC_STATUS_CONTROL_LOAD_VC_ARBITRATION_TABLE_MASK 0x00000001 +#define PCIE_CFG_PORT_VC_STATUS_CONTROL_LOAD_VC_ARBITRATION_TABLE_ALIGN 0 +#define PCIE_CFG_PORT_VC_STATUS_CONTROL_LOAD_VC_ARBITRATION_TABLE_BITS 1 +#define PCIE_CFG_PORT_VC_STATUS_CONTROL_LOAD_VC_ARBITRATION_TABLE_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: VC_RESOURCE_CAPABILITY + ***************************************************************************/ +/* PCIE_CFG :: VC_RESOURCE_CAPABILITY :: PORT_ARBITRATION_TABLE_OFFSET [31:24] */ +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_PORT_ARBITRATION_TABLE_OFFSET_MASK 0xff000000 +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_PORT_ARBITRATION_TABLE_OFFSET_ALIGN 0 +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_PORT_ARBITRATION_TABLE_OFFSET_BITS 8 +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_PORT_ARBITRATION_TABLE_OFFSET_SHIFT 24 + +/* PCIE_CFG :: VC_RESOURCE_CAPABILITY :: RESERVED_0 [23:23] */ +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_RESERVED_0_MASK 0x00800000 +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_RESERVED_0_ALIGN 0 +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_RESERVED_0_BITS 1 +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_RESERVED_0_SHIFT 23 + +/* PCIE_CFG :: VC_RESOURCE_CAPABILITY :: MAXIMUM_TIME_SLOTS [22:16] */ +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_MAXIMUM_TIME_SLOTS_MASK 0x007f0000 +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_MAXIMUM_TIME_SLOTS_ALIGN 0 +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_MAXIMUM_TIME_SLOTS_BITS 7 +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_MAXIMUM_TIME_SLOTS_SHIFT 16 + +/* PCIE_CFG :: VC_RESOURCE_CAPABILITY :: REJECT_SNOOP_TRANSACTIONS [15:15] */ +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_REJECT_SNOOP_TRANSACTIONS_MASK 0x00008000 +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_REJECT_SNOOP_TRANSACTIONS_ALIGN 0 +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_REJECT_SNOOP_TRANSACTIONS_BITS 1 +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_REJECT_SNOOP_TRANSACTIONS_SHIFT 15 + +/* PCIE_CFG :: VC_RESOURCE_CAPABILITY :: ADVANCED_PACKET_SWITCHING [14:14] */ +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_ADVANCED_PACKET_SWITCHING_MASK 0x00004000 +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_ADVANCED_PACKET_SWITCHING_ALIGN 0 +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_ADVANCED_PACKET_SWITCHING_BITS 1 +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_ADVANCED_PACKET_SWITCHING_SHIFT 14 + +/* PCIE_CFG :: VC_RESOURCE_CAPABILITY :: RESERVED_1 [13:08] */ +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_RESERVED_1_MASK 0x00003f00 +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_RESERVED_1_ALIGN 0 +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_RESERVED_1_BITS 6 +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_RESERVED_1_SHIFT 8 + +/* PCIE_CFG :: VC_RESOURCE_CAPABILITY :: PORT_ARBITRATION_CAPABILITY [07:00] */ +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_PORT_ARBITRATION_CAPABILITY_MASK 0x000000ff +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_PORT_ARBITRATION_CAPABILITY_ALIGN 0 +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_PORT_ARBITRATION_CAPABILITY_BITS 8 +#define PCIE_CFG_VC_RESOURCE_CAPABILITY_PORT_ARBITRATION_CAPABILITY_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: VC_RESOURCE_CONTROL + ***************************************************************************/ +/* PCIE_CFG :: VC_RESOURCE_CONTROL :: VC_ENABLE [31:31] */ +#define PCIE_CFG_VC_RESOURCE_CONTROL_VC_ENABLE_MASK 0x80000000 +#define PCIE_CFG_VC_RESOURCE_CONTROL_VC_ENABLE_ALIGN 0 +#define PCIE_CFG_VC_RESOURCE_CONTROL_VC_ENABLE_BITS 1 +#define PCIE_CFG_VC_RESOURCE_CONTROL_VC_ENABLE_SHIFT 31 + +/* PCIE_CFG :: VC_RESOURCE_CONTROL :: RESERVED_0 [30:27] */ +#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_0_MASK 0x78000000 +#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_0_ALIGN 0 +#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_0_BITS 4 +#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_0_SHIFT 27 + +/* PCIE_CFG :: VC_RESOURCE_CONTROL :: VC_ID [26:24] */ +#define PCIE_CFG_VC_RESOURCE_CONTROL_VC_ID_MASK 0x07000000 +#define PCIE_CFG_VC_RESOURCE_CONTROL_VC_ID_ALIGN 0 +#define PCIE_CFG_VC_RESOURCE_CONTROL_VC_ID_BITS 3 +#define PCIE_CFG_VC_RESOURCE_CONTROL_VC_ID_SHIFT 24 + +/* PCIE_CFG :: VC_RESOURCE_CONTROL :: RESERVED_1 [23:20] */ +#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_1_MASK 0x00f00000 +#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_1_ALIGN 0 +#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_1_BITS 4 +#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_1_SHIFT 20 + +/* PCIE_CFG :: VC_RESOURCE_CONTROL :: PORT_ARBITRATION_SELECT [19:17] */ +#define PCIE_CFG_VC_RESOURCE_CONTROL_PORT_ARBITRATION_SELECT_MASK 0x000e0000 +#define PCIE_CFG_VC_RESOURCE_CONTROL_PORT_ARBITRATION_SELECT_ALIGN 0 +#define PCIE_CFG_VC_RESOURCE_CONTROL_PORT_ARBITRATION_SELECT_BITS 3 +#define PCIE_CFG_VC_RESOURCE_CONTROL_PORT_ARBITRATION_SELECT_SHIFT 17 + +/* PCIE_CFG :: VC_RESOURCE_CONTROL :: LOAD_PORT_ARBITRATION_TABLE [16:16] */ +#define PCIE_CFG_VC_RESOURCE_CONTROL_LOAD_PORT_ARBITRATION_TABLE_MASK 0x00010000 +#define PCIE_CFG_VC_RESOURCE_CONTROL_LOAD_PORT_ARBITRATION_TABLE_ALIGN 0 +#define PCIE_CFG_VC_RESOURCE_CONTROL_LOAD_PORT_ARBITRATION_TABLE_BITS 1 +#define PCIE_CFG_VC_RESOURCE_CONTROL_LOAD_PORT_ARBITRATION_TABLE_SHIFT 16 + +/* PCIE_CFG :: VC_RESOURCE_CONTROL :: RESERVED_2 [15:08] */ +#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_2_MASK 0x0000ff00 +#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_2_ALIGN 0 +#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_2_BITS 8 +#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_2_SHIFT 8 + +/* PCIE_CFG :: VC_RESOURCE_CONTROL :: TC_VC_MAP [07:00] */ +#define PCIE_CFG_VC_RESOURCE_CONTROL_TC_VC_MAP_MASK 0x000000ff +#define PCIE_CFG_VC_RESOURCE_CONTROL_TC_VC_MAP_ALIGN 0 +#define PCIE_CFG_VC_RESOURCE_CONTROL_TC_VC_MAP_BITS 8 +#define PCIE_CFG_VC_RESOURCE_CONTROL_TC_VC_MAP_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: VC_RESOURCE_STATUS + ***************************************************************************/ +/* PCIE_CFG :: VC_RESOURCE_STATUS :: RESERVED_0 [31:18] */ +#define PCIE_CFG_VC_RESOURCE_STATUS_RESERVED_0_MASK 0xfffc0000 +#define PCIE_CFG_VC_RESOURCE_STATUS_RESERVED_0_ALIGN 0 +#define PCIE_CFG_VC_RESOURCE_STATUS_RESERVED_0_BITS 14 +#define PCIE_CFG_VC_RESOURCE_STATUS_RESERVED_0_SHIFT 18 + +/* PCIE_CFG :: VC_RESOURCE_STATUS :: VC_NEGOTIATION_PENDING [17:17] */ +#define PCIE_CFG_VC_RESOURCE_STATUS_VC_NEGOTIATION_PENDING_MASK 0x00020000 +#define PCIE_CFG_VC_RESOURCE_STATUS_VC_NEGOTIATION_PENDING_ALIGN 0 +#define PCIE_CFG_VC_RESOURCE_STATUS_VC_NEGOTIATION_PENDING_BITS 1 +#define PCIE_CFG_VC_RESOURCE_STATUS_VC_NEGOTIATION_PENDING_SHIFT 17 + +/* PCIE_CFG :: VC_RESOURCE_STATUS :: PORT_ARBITRATION_TABLE_STATUS [16:16] */ +#define PCIE_CFG_VC_RESOURCE_STATUS_PORT_ARBITRATION_TABLE_STATUS_MASK 0x00010000 +#define PCIE_CFG_VC_RESOURCE_STATUS_PORT_ARBITRATION_TABLE_STATUS_ALIGN 0 +#define PCIE_CFG_VC_RESOURCE_STATUS_PORT_ARBITRATION_TABLE_STATUS_BITS 1 +#define PCIE_CFG_VC_RESOURCE_STATUS_PORT_ARBITRATION_TABLE_STATUS_SHIFT 16 + +/* PCIE_CFG :: VC_RESOURCE_STATUS :: RESERVED_1 [15:00] */ +#define PCIE_CFG_VC_RESOURCE_STATUS_RESERVED_1_MASK 0x0000ffff +#define PCIE_CFG_VC_RESOURCE_STATUS_RESERVED_1_ALIGN 0 +#define PCIE_CFG_VC_RESOURCE_STATUS_RESERVED_1_BITS 16 +#define PCIE_CFG_VC_RESOURCE_STATUS_RESERVED_1_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER + ***************************************************************************/ +/* PCIE_CFG :: DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER :: NEXT_CAPABILITY_OFFSET [31:20] */ +#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_MASK 0xfff00000 +#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_ALIGN 0 +#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_BITS 12 +#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_SHIFT 20 + +/* PCIE_CFG :: DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER :: CAPABILITY_VERSION [19:16] */ +#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_MASK 0x000f0000 +#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_ALIGN 0 +#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_BITS 4 +#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_SHIFT 16 + +/* PCIE_CFG :: DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER :: PCIE_EXTENDED_CAPABILITY_ID [15:00] */ +#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_MASK 0x0000ffff +#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_ALIGN 0 +#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_BITS 16 +#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: DEVICE_SERIAL_NO_LOWER_DW + ***************************************************************************/ +/* PCIE_CFG :: DEVICE_SERIAL_NO_LOWER_DW :: SERIAL_NO_LOWER [31:00] */ +#define PCIE_CFG_DEVICE_SERIAL_NO_LOWER_DW_SERIAL_NO_LOWER_MASK 0xffffffff +#define PCIE_CFG_DEVICE_SERIAL_NO_LOWER_DW_SERIAL_NO_LOWER_ALIGN 0 +#define PCIE_CFG_DEVICE_SERIAL_NO_LOWER_DW_SERIAL_NO_LOWER_BITS 32 +#define PCIE_CFG_DEVICE_SERIAL_NO_LOWER_DW_SERIAL_NO_LOWER_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: DEVICE_SERIAL_NO_UPPER_DW + ***************************************************************************/ +/* PCIE_CFG :: DEVICE_SERIAL_NO_UPPER_DW :: SERIAL_NO_UPPER [31:00] */ +#define PCIE_CFG_DEVICE_SERIAL_NO_UPPER_DW_SERIAL_NO_UPPER_MASK 0xffffffff +#define PCIE_CFG_DEVICE_SERIAL_NO_UPPER_DW_SERIAL_NO_UPPER_ALIGN 0 +#define PCIE_CFG_DEVICE_SERIAL_NO_UPPER_DW_SERIAL_NO_UPPER_BITS 32 +#define PCIE_CFG_DEVICE_SERIAL_NO_UPPER_DW_SERIAL_NO_UPPER_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER + ***************************************************************************/ +/* PCIE_CFG :: POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER :: NEXT_CAPABILITY_OFFSET [31:20] */ +#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_MASK 0xfff00000 +#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_ALIGN 0 +#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_BITS 12 +#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_SHIFT 20 + +/* PCIE_CFG :: POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER :: CAPABILITY_VERSION [19:16] */ +#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_MASK 0x000f0000 +#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_ALIGN 0 +#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_BITS 4 +#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_SHIFT 16 + +/* PCIE_CFG :: POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER :: PCIE_EXTENDED_CAPABILITY_ID [15:00] */ +#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_MASK 0x0000ffff +#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_ALIGN 0 +#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_BITS 16 +#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: POWER_BUDGETING_DATA_SELECT + ***************************************************************************/ +/* PCIE_CFG :: POWER_BUDGETING_DATA_SELECT :: RESERVED_0 [31:08] */ +#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT_RESERVED_0_MASK 0xffffff00 +#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT_RESERVED_0_ALIGN 0 +#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT_RESERVED_0_BITS 24 +#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT_RESERVED_0_SHIFT 8 + +/* PCIE_CFG :: POWER_BUDGETING_DATA_SELECT :: DATA_SELECT [07:00] */ +#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT_DATA_SELECT_MASK 0x000000ff +#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT_DATA_SELECT_ALIGN 0 +#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT_DATA_SELECT_BITS 8 +#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT_DATA_SELECT_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: POWER_BUDGETING_DATA + ***************************************************************************/ +/* PCIE_CFG :: POWER_BUDGETING_DATA :: RESERVED_0 [31:21] */ +#define PCIE_CFG_POWER_BUDGETING_DATA_RESERVED_0_MASK 0xffe00000 +#define PCIE_CFG_POWER_BUDGETING_DATA_RESERVED_0_ALIGN 0 +#define PCIE_CFG_POWER_BUDGETING_DATA_RESERVED_0_BITS 11 +#define PCIE_CFG_POWER_BUDGETING_DATA_RESERVED_0_SHIFT 21 + +/* PCIE_CFG :: POWER_BUDGETING_DATA :: POWER_RAIL [20:18] */ +#define PCIE_CFG_POWER_BUDGETING_DATA_POWER_RAIL_MASK 0x001c0000 +#define PCIE_CFG_POWER_BUDGETING_DATA_POWER_RAIL_ALIGN 0 +#define PCIE_CFG_POWER_BUDGETING_DATA_POWER_RAIL_BITS 3 +#define PCIE_CFG_POWER_BUDGETING_DATA_POWER_RAIL_SHIFT 18 + +/* PCIE_CFG :: POWER_BUDGETING_DATA :: TYPE [17:15] */ +#define PCIE_CFG_POWER_BUDGETING_DATA_TYPE_MASK 0x00038000 +#define PCIE_CFG_POWER_BUDGETING_DATA_TYPE_ALIGN 0 +#define PCIE_CFG_POWER_BUDGETING_DATA_TYPE_BITS 3 +#define PCIE_CFG_POWER_BUDGETING_DATA_TYPE_SHIFT 15 + +/* PCIE_CFG :: POWER_BUDGETING_DATA :: PM_STATE [14:13] */ +#define PCIE_CFG_POWER_BUDGETING_DATA_PM_STATE_MASK 0x00006000 +#define PCIE_CFG_POWER_BUDGETING_DATA_PM_STATE_ALIGN 0 +#define PCIE_CFG_POWER_BUDGETING_DATA_PM_STATE_BITS 2 +#define PCIE_CFG_POWER_BUDGETING_DATA_PM_STATE_SHIFT 13 + +/* PCIE_CFG :: POWER_BUDGETING_DATA :: PM_SUB_STATE [12:10] */ +#define PCIE_CFG_POWER_BUDGETING_DATA_PM_SUB_STATE_MASK 0x00001c00 +#define PCIE_CFG_POWER_BUDGETING_DATA_PM_SUB_STATE_ALIGN 0 +#define PCIE_CFG_POWER_BUDGETING_DATA_PM_SUB_STATE_BITS 3 +#define PCIE_CFG_POWER_BUDGETING_DATA_PM_SUB_STATE_SHIFT 10 + +/* PCIE_CFG :: POWER_BUDGETING_DATA :: DATA_SCALE [09:08] */ +#define PCIE_CFG_POWER_BUDGETING_DATA_DATA_SCALE_MASK 0x00000300 +#define PCIE_CFG_POWER_BUDGETING_DATA_DATA_SCALE_ALIGN 0 +#define PCIE_CFG_POWER_BUDGETING_DATA_DATA_SCALE_BITS 2 +#define PCIE_CFG_POWER_BUDGETING_DATA_DATA_SCALE_SHIFT 8 + +/* PCIE_CFG :: POWER_BUDGETING_DATA :: BASE_POWER [07:00] */ +#define PCIE_CFG_POWER_BUDGETING_DATA_BASE_POWER_MASK 0x000000ff +#define PCIE_CFG_POWER_BUDGETING_DATA_BASE_POWER_ALIGN 0 +#define PCIE_CFG_POWER_BUDGETING_DATA_BASE_POWER_BITS 8 +#define PCIE_CFG_POWER_BUDGETING_DATA_BASE_POWER_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: POWER_BUDGETING_CAPABILITY + ***************************************************************************/ +/* PCIE_CFG :: POWER_BUDGETING_CAPABILITY :: RESERVED_0 [31:01] */ +#define PCIE_CFG_POWER_BUDGETING_CAPABILITY_RESERVED_0_MASK 0xfffffffe +#define PCIE_CFG_POWER_BUDGETING_CAPABILITY_RESERVED_0_ALIGN 0 +#define PCIE_CFG_POWER_BUDGETING_CAPABILITY_RESERVED_0_BITS 31 +#define PCIE_CFG_POWER_BUDGETING_CAPABILITY_RESERVED_0_SHIFT 1 + +/* PCIE_CFG :: POWER_BUDGETING_CAPABILITY :: LOM_CONFIGURATION [00:00] */ +#define PCIE_CFG_POWER_BUDGETING_CAPABILITY_LOM_CONFIGURATION_MASK 0x00000001 +#define PCIE_CFG_POWER_BUDGETING_CAPABILITY_LOM_CONFIGURATION_ALIGN 0 +#define PCIE_CFG_POWER_BUDGETING_CAPABILITY_LOM_CONFIGURATION_BITS 1 +#define PCIE_CFG_POWER_BUDGETING_CAPABILITY_LOM_CONFIGURATION_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 + ***************************************************************************/ +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 :: POWER_RAIL_2 [31:29] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_POWER_RAIL_2_MASK 0xe0000000 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_POWER_RAIL_2_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_POWER_RAIL_2_BITS 3 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_POWER_RAIL_2_SHIFT 29 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 :: TYPE_2 [28:26] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_TYPE_2_MASK 0x1c000000 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_TYPE_2_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_TYPE_2_BITS 3 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_TYPE_2_SHIFT 26 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 :: PM_STATE_2 [25:24] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_PM_STATE_2_MASK 0x03000000 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_PM_STATE_2_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_PM_STATE_2_BITS 2 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_PM_STATE_2_SHIFT 24 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 :: BASE_POWER_2 [23:16] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_BASE_POWER_2_MASK 0x00ff0000 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_BASE_POWER_2_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_BASE_POWER_2_BITS 8 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_BASE_POWER_2_SHIFT 16 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 :: POWER_RAIL_1 [15:13] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_POWER_RAIL_1_MASK 0x0000e000 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_POWER_RAIL_1_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_POWER_RAIL_1_BITS 3 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_POWER_RAIL_1_SHIFT 13 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 :: TYPE_1 [12:10] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_TYPE_1_MASK 0x00001c00 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_TYPE_1_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_TYPE_1_BITS 3 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_TYPE_1_SHIFT 10 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 :: PM_STATE_1 [09:08] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_PM_STATE_1_MASK 0x00000300 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_PM_STATE_1_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_PM_STATE_1_BITS 2 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_PM_STATE_1_SHIFT 8 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 :: BASE_POWER_1 [07:00] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_BASE_POWER_1_MASK 0x000000ff +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_BASE_POWER_1_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_BASE_POWER_1_BITS 8 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_BASE_POWER_1_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 + ***************************************************************************/ +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 :: POWER_RAIL_4 [31:29] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_POWER_RAIL_4_MASK 0xe0000000 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_POWER_RAIL_4_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_POWER_RAIL_4_BITS 3 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_POWER_RAIL_4_SHIFT 29 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 :: TYPE_4 [28:26] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_TYPE_4_MASK 0x1c000000 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_TYPE_4_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_TYPE_4_BITS 3 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_TYPE_4_SHIFT 26 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 :: PM_STATE_4 [25:24] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_PM_STATE_4_MASK 0x03000000 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_PM_STATE_4_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_PM_STATE_4_BITS 2 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_PM_STATE_4_SHIFT 24 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 :: BASE_POWER_4 [23:16] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_BASE_POWER_4_MASK 0x00ff0000 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_BASE_POWER_4_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_BASE_POWER_4_BITS 8 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_BASE_POWER_4_SHIFT 16 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 :: POWER_RAIL_3 [15:13] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_POWER_RAIL_3_MASK 0x0000e000 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_POWER_RAIL_3_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_POWER_RAIL_3_BITS 3 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_POWER_RAIL_3_SHIFT 13 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 :: TYPE_3 [12:10] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_TYPE_3_MASK 0x00001c00 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_TYPE_3_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_TYPE_3_BITS 3 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_TYPE_3_SHIFT 10 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 :: PM_STATE_3 [09:08] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_PM_STATE_3_MASK 0x00000300 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_PM_STATE_3_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_PM_STATE_3_BITS 2 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_PM_STATE_3_SHIFT 8 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 :: BASE_POWER_3 [07:00] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_BASE_POWER_3_MASK 0x000000ff +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_BASE_POWER_3_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_BASE_POWER_3_BITS 8 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_BASE_POWER_3_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 + ***************************************************************************/ +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 :: POWER_RAIL_6 [31:29] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_POWER_RAIL_6_MASK 0xe0000000 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_POWER_RAIL_6_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_POWER_RAIL_6_BITS 3 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_POWER_RAIL_6_SHIFT 29 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 :: TYPE_6 [28:26] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_TYPE_6_MASK 0x1c000000 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_TYPE_6_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_TYPE_6_BITS 3 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_TYPE_6_SHIFT 26 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 :: PM_STATE_6 [25:24] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_PM_STATE_6_MASK 0x03000000 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_PM_STATE_6_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_PM_STATE_6_BITS 2 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_PM_STATE_6_SHIFT 24 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 :: BASE_POWER_6 [23:16] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_BASE_POWER_6_MASK 0x00ff0000 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_BASE_POWER_6_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_BASE_POWER_6_BITS 8 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_BASE_POWER_6_SHIFT 16 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 :: POWER_RAIL_5 [15:13] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_POWER_RAIL_5_MASK 0x0000e000 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_POWER_RAIL_5_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_POWER_RAIL_5_BITS 3 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_POWER_RAIL_5_SHIFT 13 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 :: TYPE_5 [12:10] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_TYPE_5_MASK 0x00001c00 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_TYPE_5_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_TYPE_5_BITS 3 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_TYPE_5_SHIFT 10 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 :: PM_STATE_5 [09:08] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_PM_STATE_5_MASK 0x00000300 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_PM_STATE_5_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_PM_STATE_5_BITS 2 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_PM_STATE_5_SHIFT 8 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 :: BASE_POWER_5 [07:00] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_BASE_POWER_5_MASK 0x000000ff +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_BASE_POWER_5_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_BASE_POWER_5_BITS 8 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_BASE_POWER_5_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 + ***************************************************************************/ +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 :: POWER_RAIL_8 [31:29] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_POWER_RAIL_8_MASK 0xe0000000 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_POWER_RAIL_8_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_POWER_RAIL_8_BITS 3 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_POWER_RAIL_8_SHIFT 29 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 :: TYPE_8 [28:26] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_TYPE_8_MASK 0x1c000000 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_TYPE_8_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_TYPE_8_BITS 3 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_TYPE_8_SHIFT 26 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 :: PM_STATE_8 [25:24] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_PM_STATE_8_MASK 0x03000000 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_PM_STATE_8_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_PM_STATE_8_BITS 2 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_PM_STATE_8_SHIFT 24 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 :: BASE_POWER_8 [23:16] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_BASE_POWER_8_MASK 0x00ff0000 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_BASE_POWER_8_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_BASE_POWER_8_BITS 8 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_BASE_POWER_8_SHIFT 16 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 :: POWER_RAIL_7 [15:13] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_POWER_RAIL_7_MASK 0x0000e000 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_POWER_RAIL_7_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_POWER_RAIL_7_BITS 3 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_POWER_RAIL_7_SHIFT 13 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 :: TYPE_7 [12:10] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_TYPE_7_MASK 0x00001c00 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_TYPE_7_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_TYPE_7_BITS 3 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_TYPE_7_SHIFT 10 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 :: PM_STATE_7 [09:08] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_PM_STATE_7_MASK 0x00000300 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_PM_STATE_7_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_PM_STATE_7_BITS 2 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_PM_STATE_7_SHIFT 8 + +/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 :: BASE_POWER_7 [07:00] */ +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_BASE_POWER_7_MASK 0x000000ff +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_BASE_POWER_7_ALIGN 0 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_BASE_POWER_7_BITS 8 +#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_BASE_POWER_7_SHIFT 0 + + +/**************************************************************************** + * PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING + ***************************************************************************/ +/* PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING :: UNUSED_0 [31:07] */ +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_UNUSED_0_MASK 0xffffff80 +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_UNUSED_0_ALIGN 0 +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_UNUSED_0_BITS 25 +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_UNUSED_0_SHIFT 7 + +/* PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING :: D3HOT_MEMORY_READ_ADVISORY_NON_FATAL [06:06] */ +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_D3HOT_MEMORY_READ_ADVISORY_NON_FATAL_MASK 0x00000040 +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_D3HOT_MEMORY_READ_ADVISORY_NON_FATAL_ALIGN 0 +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_D3HOT_MEMORY_READ_ADVISORY_NON_FATAL_BITS 1 +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_D3HOT_MEMORY_READ_ADVISORY_NON_FATAL_SHIFT 6 + +/* PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING :: RETRY_POISON_ENABLE [05:05] */ +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_RETRY_POISON_ENABLE_MASK 0x00000020 +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_RETRY_POISON_ENABLE_ALIGN 0 +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_RETRY_POISON_ENABLE_BITS 1 +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_RETRY_POISON_ENABLE_SHIFT 5 + +/* PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING :: POISON_ADVISORY_NON_FATAL_ENABLE [04:04] */ +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_POISON_ADVISORY_NON_FATAL_ENABLE_MASK 0x00000010 +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_POISON_ADVISORY_NON_FATAL_ENABLE_ALIGN 0 +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_POISON_ADVISORY_NON_FATAL_ENABLE_BITS 1 +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_POISON_ADVISORY_NON_FATAL_ENABLE_SHIFT 4 + +/* PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING :: UNEXPECTED_ADVISORY_NON_FATAL_ENABLE [03:03] */ +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_UNEXPECTED_ADVISORY_NON_FATAL_ENABLE_MASK 0x00000008 +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_UNEXPECTED_ADVISORY_NON_FATAL_ENABLE_ALIGN 0 +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_UNEXPECTED_ADVISORY_NON_FATAL_ENABLE_BITS 1 +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_UNEXPECTED_ADVISORY_NON_FATAL_ENABLE_SHIFT 3 + +/* PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING :: NON_POSTED_CFG_ADVISORY_NON_FATAL_ENABLE [02:02] */ +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_NON_POSTED_CFG_ADVISORY_NON_FATAL_ENABLE_MASK 0x00000004 +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_NON_POSTED_CFG_ADVISORY_NON_FATAL_ENABLE_ALIGN 0 +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_NON_POSTED_CFG_ADVISORY_NON_FATAL_ENABLE_BITS 1 +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_NON_POSTED_CFG_ADVISORY_NON_FATAL_ENABLE_SHIFT 2 + +/* PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING :: NP_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE [01:01] */ +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_NP_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE_MASK 0x00000002 +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_NP_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE_ALIGN 0 +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_NP_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE_BITS 1 +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_NP_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE_SHIFT 1 + +/* PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING :: COMPLETION_ABORT_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE [00:00] */ +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_COMPLETION_ABORT_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE_MASK 0x00000001 +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_COMPLETION_ABORT_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE_ALIGN 0 +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_COMPLETION_ABORT_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE_BITS 1 +#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_COMPLETION_ABORT_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE_SHIFT 0 + + +/**************************************************************************** + * BCM70012_TGT_TOP_PCIE_TL + ***************************************************************************/ +/**************************************************************************** + * PCIE_TL :: TL_CONTROL + ***************************************************************************/ +/* PCIE_TL :: TL_CONTROL :: RESERVED_0 [31:31] */ +#define PCIE_TL_TL_CONTROL_RESERVED_0_MASK 0x80000000 +#define PCIE_TL_TL_CONTROL_RESERVED_0_ALIGN 0 +#define PCIE_TL_TL_CONTROL_RESERVED_0_BITS 1 +#define PCIE_TL_TL_CONTROL_RESERVED_0_SHIFT 31 + +/* PCIE_TL :: TL_CONTROL :: CQ14298_FIX_ENA_N [30:30] */ +#define PCIE_TL_TL_CONTROL_CQ14298_FIX_ENA_N_MASK 0x40000000 +#define PCIE_TL_TL_CONTROL_CQ14298_FIX_ENA_N_ALIGN 0 +#define PCIE_TL_TL_CONTROL_CQ14298_FIX_ENA_N_BITS 1 +#define PCIE_TL_TL_CONTROL_CQ14298_FIX_ENA_N_SHIFT 30 + +/* PCIE_TL :: TL_CONTROL :: RESERVED_1 [29:29] */ +#define PCIE_TL_TL_CONTROL_RESERVED_1_MASK 0x20000000 +#define PCIE_TL_TL_CONTROL_RESERVED_1_ALIGN 0 +#define PCIE_TL_TL_CONTROL_RESERVED_1_BITS 1 +#define PCIE_TL_TL_CONTROL_RESERVED_1_SHIFT 29 + +/* PCIE_TL :: TL_CONTROL :: INTA_WAKEUP_LINK_CLKREQ_DA [28:28] */ +#define PCIE_TL_TL_CONTROL_INTA_WAKEUP_LINK_CLKREQ_DA_MASK 0x10000000 +#define PCIE_TL_TL_CONTROL_INTA_WAKEUP_LINK_CLKREQ_DA_ALIGN 0 +#define PCIE_TL_TL_CONTROL_INTA_WAKEUP_LINK_CLKREQ_DA_BITS 1 +#define PCIE_TL_TL_CONTROL_INTA_WAKEUP_LINK_CLKREQ_DA_SHIFT 28 + +/* PCIE_TL :: TL_CONTROL :: RESERVED_2 [27:27] */ +#define PCIE_TL_TL_CONTROL_RESERVED_2_MASK 0x08000000 +#define PCIE_TL_TL_CONTROL_RESERVED_2_ALIGN 0 +#define PCIE_TL_TL_CONTROL_RESERVED_2_BITS 1 +#define PCIE_TL_TL_CONTROL_RESERVED_2_SHIFT 27 + +/* PCIE_TL :: TL_CONTROL :: CQ9583_TYPE_1_VENDOR_DEFINED_MESSAGE_FIX [26:26] */ +#define PCIE_TL_TL_CONTROL_CQ9583_TYPE_1_VENDOR_DEFINED_MESSAGE_FIX_MASK 0x04000000 +#define PCIE_TL_TL_CONTROL_CQ9583_TYPE_1_VENDOR_DEFINED_MESSAGE_FIX_ALIGN 0 +#define PCIE_TL_TL_CONTROL_CQ9583_TYPE_1_VENDOR_DEFINED_MESSAGE_FIX_BITS 1 +#define PCIE_TL_TL_CONTROL_CQ9583_TYPE_1_VENDOR_DEFINED_MESSAGE_FIX_SHIFT 26 + +/* PCIE_TL :: TL_CONTROL :: RESERVED_3 [25:25] */ +#define PCIE_TL_TL_CONTROL_RESERVED_3_MASK 0x02000000 +#define PCIE_TL_TL_CONTROL_RESERVED_3_ALIGN 0 +#define PCIE_TL_TL_CONTROL_RESERVED_3_BITS 1 +#define PCIE_TL_TL_CONTROL_RESERVED_3_SHIFT 25 + +/* PCIE_TL :: TL_CONTROL :: RESERVED_4 [24:24] */ +#define PCIE_TL_TL_CONTROL_RESERVED_4_MASK 0x01000000 +#define PCIE_TL_TL_CONTROL_RESERVED_4_ALIGN 0 +#define PCIE_TL_TL_CONTROL_RESERVED_4_BITS 1 +#define PCIE_TL_TL_CONTROL_RESERVED_4_SHIFT 24 + +/* PCIE_TL :: TL_CONTROL :: RESERVED_5 [23:23] */ +#define PCIE_TL_TL_CONTROL_RESERVED_5_MASK 0x00800000 +#define PCIE_TL_TL_CONTROL_RESERVED_5_ALIGN 0 +#define PCIE_TL_TL_CONTROL_RESERVED_5_BITS 1 +#define PCIE_TL_TL_CONTROL_RESERVED_5_SHIFT 23 + +/* PCIE_TL :: TL_CONTROL :: CRC_SWAP [22:22] */ +#define PCIE_TL_TL_CONTROL_CRC_SWAP_MASK 0x00400000 +#define PCIE_TL_TL_CONTROL_CRC_SWAP_ALIGN 0 +#define PCIE_TL_TL_CONTROL_CRC_SWAP_BITS 1 +#define PCIE_TL_TL_CONTROL_CRC_SWAP_SHIFT 22 + +/* PCIE_TL :: TL_CONTROL :: SLV_CMP_DIS_CA_ERROR [21:21] */ +#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_CA_ERROR_MASK 0x00200000 +#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_CA_ERROR_ALIGN 0 +#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_CA_ERROR_BITS 1 +#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_CA_ERROR_SHIFT 21 + +/* PCIE_TL :: TL_CONTROL :: SLV_CMP_DIS_UR_ERROR [20:20] */ +#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_UR_ERROR_MASK 0x00100000 +#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_UR_ERROR_ALIGN 0 +#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_UR_ERROR_BITS 1 +#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_UR_ERROR_SHIFT 20 + +/* PCIE_TL :: TL_CONTROL :: SLV_CMP_DIS_RSV_ERROR [19:19] */ +#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_RSV_ERROR_MASK 0x00080000 +#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_RSV_ERROR_ALIGN 0 +#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_RSV_ERROR_BITS 1 +#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_RSV_ERROR_SHIFT 19 + +/* PCIE_TL :: TL_CONTROL :: RESERVED_6 [18:18] */ +#define PCIE_TL_TL_CONTROL_RESERVED_6_MASK 0x00040000 +#define PCIE_TL_TL_CONTROL_RESERVED_6_ALIGN 0 +#define PCIE_TL_TL_CONTROL_RESERVED_6_BITS 1 +#define PCIE_TL_TL_CONTROL_RESERVED_6_SHIFT 18 + +/* PCIE_TL :: TL_CONTROL :: SLV_CMP_DIS_EP_ERROR [17:17] */ +#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_EP_ERROR_MASK 0x00020000 +#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_EP_ERROR_ALIGN 0 +#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_EP_ERROR_BITS 1 +#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_EP_ERROR_SHIFT 17 + +/* PCIE_TL :: TL_CONTROL :: ENABLE_BYTECOUNT_CHECK [16:16] */ +#define PCIE_TL_TL_CONTROL_ENABLE_BYTECOUNT_CHECK_MASK 0x00010000 +#define PCIE_TL_TL_CONTROL_ENABLE_BYTECOUNT_CHECK_ALIGN 0 +#define PCIE_TL_TL_CONTROL_ENABLE_BYTECOUNT_CHECK_BITS 1 +#define PCIE_TL_TL_CONTROL_ENABLE_BYTECOUNT_CHECK_SHIFT 16 + +/* PCIE_TL :: TL_CONTROL :: NOT_USED [15:14] */ +#define PCIE_TL_TL_CONTROL_NOT_USED_MASK 0x0000c000 +#define PCIE_TL_TL_CONTROL_NOT_USED_ALIGN 0 +#define PCIE_TL_TL_CONTROL_NOT_USED_BITS 2 +#define PCIE_TL_TL_CONTROL_NOT_USED_SHIFT 14 + +/* PCIE_TL :: TL_CONTROL :: TRAFFIC_CLASS_DR [13:11] */ +#define PCIE_TL_TL_CONTROL_TRAFFIC_CLASS_DR_MASK 0x00003800 +#define PCIE_TL_TL_CONTROL_TRAFFIC_CLASS_DR_ALIGN 0 +#define PCIE_TL_TL_CONTROL_TRAFFIC_CLASS_DR_BITS 3 +#define PCIE_TL_TL_CONTROL_TRAFFIC_CLASS_DR_SHIFT 11 + +/* PCIE_TL :: TL_CONTROL :: TRAFFIC_CLASS_DW [10:08] */ +#define PCIE_TL_TL_CONTROL_TRAFFIC_CLASS_DW_MASK 0x00000700 +#define PCIE_TL_TL_CONTROL_TRAFFIC_CLASS_DW_ALIGN 0 +#define PCIE_TL_TL_CONTROL_TRAFFIC_CLASS_DW_BITS 3 +#define PCIE_TL_TL_CONTROL_TRAFFIC_CLASS_DW_SHIFT 8 + +/* PCIE_TL :: TL_CONTROL :: NOT_USED_0 [07:06] */ +#define PCIE_TL_TL_CONTROL_NOT_USED_0_MASK 0x000000c0 +#define PCIE_TL_TL_CONTROL_NOT_USED_0_ALIGN 0 +#define PCIE_TL_TL_CONTROL_NOT_USED_0_BITS 2 +#define PCIE_TL_TL_CONTROL_NOT_USED_0_SHIFT 6 + +/* PCIE_TL :: TL_CONTROL :: NOT_USED_1 [05:00] */ +#define PCIE_TL_TL_CONTROL_NOT_USED_1_MASK 0x0000003f +#define PCIE_TL_TL_CONTROL_NOT_USED_1_ALIGN 0 +#define PCIE_TL_TL_CONTROL_NOT_USED_1_BITS 6 +#define PCIE_TL_TL_CONTROL_NOT_USED_1_SHIFT 0 + + +/**************************************************************************** + * PCIE_TL :: TRANSACTION_CONFIGURATION + ***************************************************************************/ +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_RETRY_BUFFER_TIMING_MOD [31:31] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_RETRY_BUFFER_TIMING_MOD_MASK 0x80000000 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_RETRY_BUFFER_TIMING_MOD_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_RETRY_BUFFER_TIMING_MOD_BITS 1 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_RETRY_BUFFER_TIMING_MOD_SHIFT 31 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: RESERVED_0 [30:30] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_0_MASK 0x40000000 +#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_0_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_0_BITS 1 +#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_0_SHIFT 30 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: MSI_SINGLE_SHOT_ENABLE [29:29] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_MSI_SINGLE_SHOT_ENABLE_MASK 0x20000000 +#define PCIE_TL_TRANSACTION_CONFIGURATION_MSI_SINGLE_SHOT_ENABLE_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_MSI_SINGLE_SHOT_ENABLE_BITS 1 +#define PCIE_TL_TRANSACTION_CONFIGURATION_MSI_SINGLE_SHOT_ENABLE_SHIFT 29 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: RESERVED_1 [28:28] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_1_MASK 0x10000000 +#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_1_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_1_BITS 1 +#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_1_SHIFT 28 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: SELECT_CORE_CLOCK_OVERRIDE [27:27] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_SELECT_CORE_CLOCK_OVERRIDE_MASK 0x08000000 +#define PCIE_TL_TRANSACTION_CONFIGURATION_SELECT_CORE_CLOCK_OVERRIDE_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_SELECT_CORE_CLOCK_OVERRIDE_BITS 1 +#define PCIE_TL_TRANSACTION_CONFIGURATION_SELECT_CORE_CLOCK_OVERRIDE_SHIFT 27 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: CQ9139_FIX_ENABLE [26:26] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_CQ9139_FIX_ENABLE_MASK 0x04000000 +#define PCIE_TL_TRANSACTION_CONFIGURATION_CQ9139_FIX_ENABLE_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_CQ9139_FIX_ENABLE_BITS 1 +#define PCIE_TL_TRANSACTION_CONFIGURATION_CQ9139_FIX_ENABLE_SHIFT 26 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_CMPT_PWR_CHECK [25:25] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CMPT_PWR_CHECK_MASK 0x02000000 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CMPT_PWR_CHECK_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CMPT_PWR_CHECK_BITS 1 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CMPT_PWR_CHECK_SHIFT 25 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_CQ12696_FIX [24:24] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CQ12696_FIX_MASK 0x01000000 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CQ12696_FIX_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CQ12696_FIX_BITS 1 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CQ12696_FIX_SHIFT 24 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: DEVICE_SERIAL_NO_OVERRIDE [23:23] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_DEVICE_SERIAL_NO_OVERRIDE_MASK 0x00800000 +#define PCIE_TL_TRANSACTION_CONFIGURATION_DEVICE_SERIAL_NO_OVERRIDE_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_DEVICE_SERIAL_NO_OVERRIDE_BITS 1 +#define PCIE_TL_TRANSACTION_CONFIGURATION_DEVICE_SERIAL_NO_OVERRIDE_SHIFT 23 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_CQ12455_FIX [22:22] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CQ12455_FIX_MASK 0x00400000 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CQ12455_FIX_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CQ12455_FIX_BITS 1 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CQ12455_FIX_SHIFT 22 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_TC_VC_FILTERING_CHECK [21:21] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_TC_VC_FILTERING_CHECK_MASK 0x00200000 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_TC_VC_FILTERING_CHECK_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_TC_VC_FILTERING_CHECK_BITS 1 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_TC_VC_FILTERING_CHECK_SHIFT 21 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: DONT_GEN_HOT_PLUG_MSG [20:20] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_DONT_GEN_HOT_PLUG_MSG_MASK 0x00100000 +#define PCIE_TL_TRANSACTION_CONFIGURATION_DONT_GEN_HOT_PLUG_MSG_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_DONT_GEN_HOT_PLUG_MSG_BITS 1 +#define PCIE_TL_TRANSACTION_CONFIGURATION_DONT_GEN_HOT_PLUG_MSG_SHIFT 20 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: IGNORE_HOTPLUG_MSG [19:19] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_IGNORE_HOTPLUG_MSG_MASK 0x00080000 +#define PCIE_TL_TRANSACTION_CONFIGURATION_IGNORE_HOTPLUG_MSG_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_IGNORE_HOTPLUG_MSG_BITS 1 +#define PCIE_TL_TRANSACTION_CONFIGURATION_IGNORE_HOTPLUG_MSG_SHIFT 19 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: MSI_MULTMSG_CAPABLE [18:16] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_MSI_MULTMSG_CAPABLE_MASK 0x00070000 +#define PCIE_TL_TRANSACTION_CONFIGURATION_MSI_MULTMSG_CAPABLE_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_MSI_MULTMSG_CAPABLE_BITS 3 +#define PCIE_TL_TRANSACTION_CONFIGURATION_MSI_MULTMSG_CAPABLE_SHIFT 16 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: DATA_SELECT_LIMIT [15:12] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_DATA_SELECT_LIMIT_MASK 0x0000f000 +#define PCIE_TL_TRANSACTION_CONFIGURATION_DATA_SELECT_LIMIT_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_DATA_SELECT_LIMIT_BITS 4 +#define PCIE_TL_TRANSACTION_CONFIGURATION_DATA_SELECT_LIMIT_SHIFT 12 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_PCIE_1_1_PL [11:11] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_PL_MASK 0x00000800 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_PL_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_PL_BITS 1 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_PL_SHIFT 11 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_PCIE_1_1_DL [10:10] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_DL_MASK 0x00000400 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_DL_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_DL_BITS 1 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_DL_SHIFT 10 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_PCIE_1_1_TL [09:09] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_TL_MASK 0x00000200 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_TL_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_TL_BITS 1 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_TL_SHIFT 9 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: RESERVED_2 [08:07] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_2_MASK 0x00000180 +#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_2_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_2_BITS 2 +#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_2_SHIFT 7 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: PCIE_POWER_BUDGET_CAP_ENABLE [06:06] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_PCIE_POWER_BUDGET_CAP_ENABLE_MASK 0x00000040 +#define PCIE_TL_TRANSACTION_CONFIGURATION_PCIE_POWER_BUDGET_CAP_ENABLE_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_PCIE_POWER_BUDGET_CAP_ENABLE_BITS 1 +#define PCIE_TL_TRANSACTION_CONFIGURATION_PCIE_POWER_BUDGET_CAP_ENABLE_SHIFT 6 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: LOM_CONFIGURATION [05:05] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_LOM_CONFIGURATION_MASK 0x00000020 +#define PCIE_TL_TRANSACTION_CONFIGURATION_LOM_CONFIGURATION_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_LOM_CONFIGURATION_BITS 1 +#define PCIE_TL_TRANSACTION_CONFIGURATION_LOM_CONFIGURATION_SHIFT 5 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: CONCATE_SELECT [04:04] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_CONCATE_SELECT_MASK 0x00000010 +#define PCIE_TL_TRANSACTION_CONFIGURATION_CONCATE_SELECT_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_CONCATE_SELECT_BITS 1 +#define PCIE_TL_TRANSACTION_CONFIGURATION_CONCATE_SELECT_SHIFT 4 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: RESERVED_3 [03:03] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_3_MASK 0x00000008 +#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_3_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_3_BITS 1 +#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_3_SHIFT 3 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_9468_FIX [02:02] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_9468_FIX_MASK 0x00000004 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_9468_FIX_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_9468_FIX_BITS 1 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_9468_FIX_SHIFT 2 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: POWER_STATE_WRITE_MEM_ENABLE [01:01] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_POWER_STATE_WRITE_MEM_ENABLE_MASK 0x00000002 +#define PCIE_TL_TRANSACTION_CONFIGURATION_POWER_STATE_WRITE_MEM_ENABLE_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_POWER_STATE_WRITE_MEM_ENABLE_BITS 1 +#define PCIE_TL_TRANSACTION_CONFIGURATION_POWER_STATE_WRITE_MEM_ENABLE_SHIFT 1 + +/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_9709_ENABLE [00:00] */ +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_9709_ENABLE_MASK 0x00000001 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_9709_ENABLE_ALIGN 0 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_9709_ENABLE_BITS 1 +#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_9709_ENABLE_SHIFT 0 + + +/**************************************************************************** + * PCIE_TL :: WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC + ***************************************************************************/ +/* PCIE_TL :: WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC :: RESERVED_0 [31:00] */ +#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_RESERVED_0_MASK 0xffffffff +#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_RESERVED_0_ALIGN 0 +#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_RESERVED_0_BITS 32 +#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_RESERVED_0_SHIFT 0 + + +/**************************************************************************** + * PCIE_TL :: WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2 + ***************************************************************************/ +/* PCIE_TL :: WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2 :: RESERVED_0 [31:00] */ +#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2_RESERVED_0_MASK 0xffffffff +#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2_RESERVED_0_ALIGN 0 +#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2_RESERVED_0_BITS 32 +#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2_RESERVED_0_SHIFT 0 + + +/**************************************************************************** + * PCIE_TL :: DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC + ***************************************************************************/ +/* PCIE_TL :: DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC :: REG_MADDR_UPR [31:00] */ +#define PCIE_TL_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_REG_MADDR_UPR_MASK 0xffffffff +#define PCIE_TL_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_REG_MADDR_UPR_ALIGN 0 +#define PCIE_TL_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_REG_MADDR_UPR_BITS 32 +#define PCIE_TL_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_REG_MADDR_UPR_SHIFT 0 + + +/**************************************************************************** + * PCIE_TL :: DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2 + ***************************************************************************/ +/* PCIE_TL :: DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2 :: REG_MADDR_LWR [31:00] */ +#define PCIE_TL_DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2_REG_MADDR_LWR_MASK 0xffffffff +#define PCIE_TL_DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2_REG_MADDR_LWR_ALIGN 0 +#define PCIE_TL_DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2_REG_MADDR_LWR_BITS 32 +#define PCIE_TL_DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2_REG_MADDR_LWR_SHIFT 0 + + +/**************************************************************************** + * PCIE_TL :: DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC + ***************************************************************************/ +/* PCIE_TL :: DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC :: REG_MLEN_BE [31:24] */ +#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_REG_MLEN_BE_MASK 0xff000000 +#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_REG_MLEN_BE_ALIGN 0 +#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_REG_MLEN_BE_BITS 8 +#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_REG_MLEN_BE_SHIFT 24 + +/* PCIE_TL :: DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC :: DMA_REQUEST_FIRST_DW_BYTE_ENABLES [23:20] */ +#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_FIRST_DW_BYTE_ENABLES_MASK 0x00f00000 +#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_FIRST_DW_BYTE_ENABLES_ALIGN 0 +#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_FIRST_DW_BYTE_ENABLES_BITS 4 +#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_FIRST_DW_BYTE_ENABLES_SHIFT 20 + +/* PCIE_TL :: DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC :: DMA_REQUEST_LAST_DW_BYTE_ENABLES [19:16] */ +#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_LAST_DW_BYTE_ENABLES_MASK 0x000f0000 +#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_LAST_DW_BYTE_ENABLES_ALIGN 0 +#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_LAST_DW_BYTE_ENABLES_BITS 4 +#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_LAST_DW_BYTE_ENABLES_SHIFT 16 + +/* PCIE_TL :: DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC :: RESERVED_0 [15:11] */ +#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_RESERVED_0_MASK 0x0000f800 +#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_RESERVED_0_ALIGN 0 +#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_RESERVED_0_BITS 5 +#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_RESERVED_0_SHIFT 11 + +/* PCIE_TL :: DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC :: DMA_REQUEST_DW_LENGTH [10:00] */ +#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_DW_LENGTH_MASK 0x000007ff +#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_DW_LENGTH_ALIGN 0 +#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_DW_LENGTH_BITS 11 +#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_DW_LENGTH_SHIFT 0 + + +/**************************************************************************** + * PCIE_TL :: DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC + ***************************************************************************/ +/* PCIE_TL :: DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC :: REG_MTAG_ATTR [31:19] */ +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_REG_MTAG_ATTR_MASK 0xfff80000 +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_REG_MTAG_ATTR_ALIGN 0 +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_REG_MTAG_ATTR_BITS 13 +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_REG_MTAG_ATTR_SHIFT 19 + +/* PCIE_TL :: DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC :: DMA_REQUEST_FUNCTION [18:16] */ +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_FUNCTION_MASK 0x00070000 +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_FUNCTION_ALIGN 0 +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_FUNCTION_BITS 3 +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_FUNCTION_SHIFT 16 + +/* PCIE_TL :: DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC :: RESERVED_0 [15:13] */ +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_RESERVED_0_MASK 0x0000e000 +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_RESERVED_0_ALIGN 0 +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_RESERVED_0_BITS 3 +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_RESERVED_0_SHIFT 13 + +/* PCIE_TL :: DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC :: DMA_REQUEST_ATTRIBUTES [12:08] */ +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_ATTRIBUTES_MASK 0x00001f00 +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_ATTRIBUTES_ALIGN 0 +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_ATTRIBUTES_BITS 5 +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_ATTRIBUTES_SHIFT 8 + +/* PCIE_TL :: DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC :: RESERVED_1 [07:05] */ +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_RESERVED_1_MASK 0x000000e0 +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_RESERVED_1_ALIGN 0 +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_RESERVED_1_BITS 3 +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_RESERVED_1_SHIFT 5 + +/* PCIE_TL :: DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC :: DMA_REQUEST_TAG [04:00] */ +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_TAG_MASK 0x0000001f +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_TAG_ALIGN 0 +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_TAG_BITS 5 +#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_TAG_SHIFT 0 + + +/**************************************************************************** + * PCIE_TL :: READ_DMA_SPLIT_IDS_DIAGNOSTIC + ***************************************************************************/ +/* PCIE_TL :: READ_DMA_SPLIT_IDS_DIAGNOSTIC :: REG_SPLIT_ID [31:16] */ +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_REG_SPLIT_ID_MASK 0xffff0000 +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_REG_SPLIT_ID_ALIGN 0 +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_REG_SPLIT_ID_BITS 16 +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_REG_SPLIT_ID_SHIFT 16 + +/* PCIE_TL :: READ_DMA_SPLIT_IDS_DIAGNOSTIC :: RESERVED_0 [15:13] */ +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_RESERVED_0_MASK 0x0000e000 +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_RESERVED_0_ALIGN 0 +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_RESERVED_0_BITS 3 +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_RESERVED_0_SHIFT 13 + +/* PCIE_TL :: READ_DMA_SPLIT_IDS_DIAGNOSTIC :: READ_DMA_SPLIT_ATTRIBUTES [12:11] */ +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_ATTRIBUTES_MASK 0x00001800 +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_ATTRIBUTES_ALIGN 0 +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_ATTRIBUTES_BITS 2 +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_ATTRIBUTES_SHIFT 11 + +/* PCIE_TL :: READ_DMA_SPLIT_IDS_DIAGNOSTIC :: READ_DMA_SPLIT_TC [10:08] */ +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_TC_MASK 0x00000700 +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_TC_ALIGN 0 +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_TC_BITS 3 +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_TC_SHIFT 8 + +/* PCIE_TL :: READ_DMA_SPLIT_IDS_DIAGNOSTIC :: RESERVED_1 [07:05] */ +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_RESERVED_1_MASK 0x000000e0 +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_RESERVED_1_ALIGN 0 +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_RESERVED_1_BITS 3 +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_RESERVED_1_SHIFT 5 + +/* PCIE_TL :: READ_DMA_SPLIT_IDS_DIAGNOSTIC :: READ_DMA_SPLIT_TAG [04:00] */ +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_TAG_MASK 0x0000001f +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_TAG_ALIGN 0 +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_TAG_BITS 5 +#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_TAG_SHIFT 0 + + +/**************************************************************************** + * PCIE_TL :: READ_DMA_SPLIT_LENGTH_DIAGNOSTIC + ***************************************************************************/ +/* PCIE_TL :: READ_DMA_SPLIT_LENGTH_DIAGNOSTIC :: REG_SPLIT_LEN [31:13] */ +#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC_REG_SPLIT_LEN_MASK 0xffffe000 +#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC_REG_SPLIT_LEN_ALIGN 0 +#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC_REG_SPLIT_LEN_BITS 19 +#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC_REG_SPLIT_LEN_SHIFT 13 + +/* PCIE_TL :: READ_DMA_SPLIT_LENGTH_DIAGNOSTIC :: READ_DMA_SPLIT_INITIAL_BYTE_COUNT [12:00] */ +#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC_READ_DMA_SPLIT_INITIAL_BYTE_COUNT_MASK 0x00001fff +#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC_READ_DMA_SPLIT_INITIAL_BYTE_COUNT_ALIGN 0 +#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC_READ_DMA_SPLIT_INITIAL_BYTE_COUNT_BITS 13 +#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC_READ_DMA_SPLIT_INITIAL_BYTE_COUNT_SHIFT 0 + + +/**************************************************************************** + * PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC + ***************************************************************************/ +/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: REG_SM_R0_R3 [31:31] */ +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_REG_SM_R0_R3_MASK 0x80000000 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_REG_SM_R0_R3_ALIGN 0 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_REG_SM_R0_R3_BITS 1 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_REG_SM_R0_R3_SHIFT 31 + +/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: TLP_TRANSMITTER_DATA_STATE_MACHINE [30:28] */ +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TLP_TRANSMITTER_DATA_STATE_MACHINE_MASK 0x70000000 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TLP_TRANSMITTER_DATA_STATE_MACHINE_ALIGN 0 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TLP_TRANSMITTER_DATA_STATE_MACHINE_BITS 3 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TLP_TRANSMITTER_DATA_STATE_MACHINE_SHIFT 28 + +/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: TLP_TRANSMITTER_ARBITRATION_STATE_MACHINE [27:23] */ +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TLP_TRANSMITTER_ARBITRATION_STATE_MACHINE_MASK 0x0f800000 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TLP_TRANSMITTER_ARBITRATION_STATE_MACHINE_ALIGN 0 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TLP_TRANSMITTER_ARBITRATION_STATE_MACHINE_BITS 5 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TLP_TRANSMITTER_ARBITRATION_STATE_MACHINE_SHIFT 23 + +/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: RESERVED_0 [22:07] */ +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_RESERVED_0_MASK 0x007fff80 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_RESERVED_0_ALIGN 0 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_RESERVED_0_BITS 16 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_RESERVED_0_SHIFT 7 + +/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: READ_DMA_RAW_REQUEST [06:06] */ +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_READ_DMA_RAW_REQUEST_MASK 0x00000040 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_READ_DMA_RAW_REQUEST_ALIGN 0 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_READ_DMA_RAW_REQUEST_BITS 1 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_READ_DMA_RAW_REQUEST_SHIFT 6 + +/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: WRITE_DMA_RAW_REQUEST [05:05] */ +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_WRITE_DMA_RAW_REQUEST_MASK 0x00000020 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_WRITE_DMA_RAW_REQUEST_ALIGN 0 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_WRITE_DMA_RAW_REQUEST_BITS 1 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_WRITE_DMA_RAW_REQUEST_SHIFT 5 + +/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: INTERRUPT_MSG_GATED_REQUEST [04:04] */ +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_INTERRUPT_MSG_GATED_REQUEST_MASK 0x00000010 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_INTERRUPT_MSG_GATED_REQUEST_ALIGN 0 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_INTERRUPT_MSG_GATED_REQUEST_BITS 1 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_INTERRUPT_MSG_GATED_REQUEST_SHIFT 4 + +/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: MSI_DMA_GATED_REQUEST [03:03] */ +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_MSI_DMA_GATED_REQUEST_MASK 0x00000008 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_MSI_DMA_GATED_REQUEST_ALIGN 0 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_MSI_DMA_GATED_REQUEST_BITS 1 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_MSI_DMA_GATED_REQUEST_SHIFT 3 + +/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: TARGET_COMPLETION_OR_MSG_GATED_REQUEST [02:02] */ +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TARGET_COMPLETION_OR_MSG_GATED_REQUEST_MASK 0x00000004 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TARGET_COMPLETION_OR_MSG_GATED_REQUEST_ALIGN 0 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TARGET_COMPLETION_OR_MSG_GATED_REQUEST_BITS 1 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TARGET_COMPLETION_OR_MSG_GATED_REQUEST_SHIFT 2 + +/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: READ_DMA_GATED_REQUEST [01:01] */ +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_READ_DMA_GATED_REQUEST_MASK 0x00000002 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_READ_DMA_GATED_REQUEST_ALIGN 0 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_READ_DMA_GATED_REQUEST_BITS 1 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_READ_DMA_GATED_REQUEST_SHIFT 1 + +/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: WRITE_DMA_GATED_REQUEST [00:00] */ +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_WRITE_DMA_GATED_REQUEST_MASK 0x00000001 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_WRITE_DMA_GATED_REQUEST_ALIGN 0 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_WRITE_DMA_GATED_REQUEST_BITS 1 +#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_WRITE_DMA_GATED_REQUEST_SHIFT 0 + + +/**************************************************************************** + * PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC + ***************************************************************************/ +/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: REG_DMA_CMPT_MISC2 [31:29] */ +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_REG_DMA_CMPT_MISC2_MASK 0xe0000000 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_REG_DMA_CMPT_MISC2_ALIGN 0 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_REG_DMA_CMPT_MISC2_BITS 3 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_REG_DMA_CMPT_MISC2_SHIFT 29 + +/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: SPLIT_BYTE_LENGTH_REMAINING [28:16] */ +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_BYTE_LENGTH_REMAINING_MASK 0x1fff0000 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_BYTE_LENGTH_REMAINING_ALIGN 0 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_BYTE_LENGTH_REMAINING_BITS 13 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_BYTE_LENGTH_REMAINING_SHIFT 16 + +/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: NOT_USED [15:15] */ +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_NOT_USED_MASK 0x00008000 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_NOT_USED_ALIGN 0 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_NOT_USED_BITS 1 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_NOT_USED_SHIFT 15 + +/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: LAST_COMPLETION_TLP_INDICATOR_SPLITCTL_GENERATED [14:14] */ +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_LAST_COMPLETION_TLP_INDICATOR_SPLITCTL_GENERATED_MASK 0x00004000 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_LAST_COMPLETION_TLP_INDICATOR_SPLITCTL_GENERATED_ALIGN 0 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_LAST_COMPLETION_TLP_INDICATOR_SPLITCTL_GENERATED_BITS 1 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_LAST_COMPLETION_TLP_INDICATOR_SPLITCTL_GENERATED_SHIFT 14 + +/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: LAST_COMPLETION_TLP_INDICATOR_DMA_CMPT_GENERATED [13:13] */ +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_LAST_COMPLETION_TLP_INDICATOR_DMA_CMPT_GENERATED_MASK 0x00002000 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_LAST_COMPLETION_TLP_INDICATOR_DMA_CMPT_GENERATED_ALIGN 0 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_LAST_COMPLETION_TLP_INDICATOR_DMA_CMPT_GENERATED_BITS 1 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_LAST_COMPLETION_TLP_INDICATOR_DMA_CMPT_GENERATED_SHIFT 13 + +/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: DW_LENGTH_REMAINING_IN_CURRENT_COMPLETION_TLP_IS_GREATER_THAN_1 [12:12] */ +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_DW_LENGTH_REMAINING_IN_CURRENT_COMPLETION_TLP_IS_GREATER_THAN_1_MASK 0x00001000 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_DW_LENGTH_REMAINING_IN_CURRENT_COMPLETION_TLP_IS_GREATER_THAN_1_ALIGN 0 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_DW_LENGTH_REMAINING_IN_CURRENT_COMPLETION_TLP_IS_GREATER_THAN_1_BITS 1 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_DW_LENGTH_REMAINING_IN_CURRENT_COMPLETION_TLP_IS_GREATER_THAN_1_SHIFT 12 + +/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: SPLIT_TRANSACTION_ACTIVE_SPLIT_PENDING_BLOCK_REQUEST [11:11] */ +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_TRANSACTION_ACTIVE_SPLIT_PENDING_BLOCK_REQUEST_MASK 0x00000800 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_TRANSACTION_ACTIVE_SPLIT_PENDING_BLOCK_REQUEST_ALIGN 0 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_TRANSACTION_ACTIVE_SPLIT_PENDING_BLOCK_REQUEST_BITS 1 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_TRANSACTION_ACTIVE_SPLIT_PENDING_BLOCK_REQUEST_SHIFT 11 + +/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: COMPLETION_TLP_MATCHES_REQUEST_WITHOUT_BC_LADDR_CHECKS [10:10] */ +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TLP_MATCHES_REQUEST_WITHOUT_BC_LADDR_CHECKS_MASK 0x00000400 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TLP_MATCHES_REQUEST_WITHOUT_BC_LADDR_CHECKS_ALIGN 0 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TLP_MATCHES_REQUEST_WITHOUT_BC_LADDR_CHECKS_BITS 1 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TLP_MATCHES_REQUEST_WITHOUT_BC_LADDR_CHECKS_SHIFT 10 + +/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: COMPLETION_TLP_MATCHES_REQUEST_FULLY [09:09] */ +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TLP_MATCHES_REQUEST_FULLY_MASK 0x00000200 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TLP_MATCHES_REQUEST_FULLY_ALIGN 0 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TLP_MATCHES_REQUEST_FULLY_BITS 1 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TLP_MATCHES_REQUEST_FULLY_SHIFT 9 + +/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: SPLIT_DW_DATA_VALID_ADDRESS_ACK [08:08] */ +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_DW_DATA_VALID_ADDRESS_ACK_MASK 0x00000100 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_DW_DATA_VALID_ADDRESS_ACK_ALIGN 0 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_DW_DATA_VALID_ADDRESS_ACK_BITS 1 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_DW_DATA_VALID_ADDRESS_ACK_SHIFT 8 + +/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: COMPLETION_TOO_MUCH_DATA_ERROR_COUNTER [07:04] */ +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TOO_MUCH_DATA_ERROR_COUNTER_MASK 0x000000f0 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TOO_MUCH_DATA_ERROR_COUNTER_ALIGN 0 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TOO_MUCH_DATA_ERROR_COUNTER_BITS 4 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TOO_MUCH_DATA_ERROR_COUNTER_SHIFT 4 + +/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: FRAME_DEAD_TIME_ERROR_COUNTER [03:00] */ +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_FRAME_DEAD_TIME_ERROR_COUNTER_MASK 0x0000000f +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_FRAME_DEAD_TIME_ERROR_COUNTER_ALIGN 0 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_FRAME_DEAD_TIME_ERROR_COUNTER_BITS 4 +#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_FRAME_DEAD_TIME_ERROR_COUNTER_SHIFT 0 + + +/**************************************************************************** + * PCIE_TL :: SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC + ***************************************************************************/ +/* PCIE_TL :: SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC :: REG_SPLITCTL_MISC0 [31:29] */ +#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_REG_SPLITCTL_MISC0_MASK 0xe0000000 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_REG_SPLITCTL_MISC0_ALIGN 0 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_REG_SPLITCTL_MISC0_BITS 3 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_REG_SPLITCTL_MISC0_SHIFT 29 + +/* PCIE_TL :: SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC :: LOOKUP_RESULT_FOR_EXPECTED_BYTE_COUNT_REMAINING [28:16] */ +#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_BYTE_COUNT_REMAINING_MASK 0x1fff0000 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_BYTE_COUNT_REMAINING_ALIGN 0 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_BYTE_COUNT_REMAINING_BITS 13 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_BYTE_COUNT_REMAINING_SHIFT 16 + +/* PCIE_TL :: SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC :: LOOKUP_RESULT_FOR_EXPECTED_REQUESTER_ID [15:00] */ +#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_REQUESTER_ID_MASK 0x0000ffff +#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_REQUESTER_ID_ALIGN 0 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_REQUESTER_ID_BITS 16 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_REQUESTER_ID_SHIFT 0 + + +/**************************************************************************** + * PCIE_TL :: SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC + ***************************************************************************/ +/* PCIE_TL :: SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC :: REG_SPLITCTL_MISC1 [31:16] */ +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_REG_SPLITCTL_MISC1_MASK 0xffff0000 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_REG_SPLITCTL_MISC1_ALIGN 0 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_REG_SPLITCTL_MISC1_BITS 16 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_REG_SPLITCTL_MISC1_SHIFT 16 + +/* PCIE_TL :: SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC :: RESERVED_0 [15:15] */ +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_RESERVED_0_MASK 0x00008000 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_RESERVED_0_ALIGN 0 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_RESERVED_0_BITS 1 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_RESERVED_0_SHIFT 15 + +/* PCIE_TL :: SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC :: LOOKUP_RESULT_FOR_EXPECTED_LOWER_ADDRESS [14:08] */ +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_LOWER_ADDRESS_MASK 0x00007f00 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_LOWER_ADDRESS_ALIGN 0 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_LOWER_ADDRESS_BITS 7 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_LOWER_ADDRESS_SHIFT 8 + +/* PCIE_TL :: SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC :: RESERVED_1 [07:07] */ +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_RESERVED_1_MASK 0x00000080 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_RESERVED_1_ALIGN 0 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_RESERVED_1_BITS 1 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_RESERVED_1_SHIFT 7 + +/* PCIE_TL :: SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC :: LOOKUP_RESULT_FOR_EXPECTED_ATTRIBUTE [06:05] */ +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_ATTRIBUTE_MASK 0x00000060 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_ATTRIBUTE_ALIGN 0 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_ATTRIBUTE_BITS 2 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_ATTRIBUTE_SHIFT 5 + +/* PCIE_TL :: SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC :: LOOKUP_TAG [04:00] */ +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_TAG_MASK 0x0000001f +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_TAG_ALIGN 0 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_TAG_BITS 5 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_TAG_SHIFT 0 + + +/**************************************************************************** + * PCIE_TL :: SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC + ***************************************************************************/ +/* PCIE_TL :: SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC :: REG_SPLITCTL_MISC2 [31:31] */ +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_REG_SPLITCTL_MISC2_MASK 0x80000000 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_REG_SPLITCTL_MISC2_ALIGN 0 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_REG_SPLITCTL_MISC2_BITS 1 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_REG_SPLITCTL_MISC2_SHIFT 31 + +/* PCIE_TL :: SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC :: COMPLETION_TLP_MATCHES_EXPECTED_LOWER_ADDRESS [30:30] */ +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_COMPLETION_TLP_MATCHES_EXPECTED_LOWER_ADDRESS_MASK 0x40000000 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_COMPLETION_TLP_MATCHES_EXPECTED_LOWER_ADDRESS_ALIGN 0 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_COMPLETION_TLP_MATCHES_EXPECTED_LOWER_ADDRESS_BITS 1 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_COMPLETION_TLP_MATCHES_EXPECTED_LOWER_ADDRESS_SHIFT 30 + +/* PCIE_TL :: SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC :: COMPLETION_TLP_MATCHES_VALID_TAG [29:29] */ +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_COMPLETION_TLP_MATCHES_VALID_TAG_MASK 0x20000000 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_COMPLETION_TLP_MATCHES_VALID_TAG_ALIGN 0 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_COMPLETION_TLP_MATCHES_VALID_TAG_BITS 1 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_COMPLETION_TLP_MATCHES_VALID_TAG_SHIFT 29 + +/* PCIE_TL :: SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC :: UPDATED_BYTE_COUNT [28:16] */ +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_UPDATED_BYTE_COUNT_MASK 0x1fff0000 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_UPDATED_BYTE_COUNT_ALIGN 0 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_UPDATED_BYTE_COUNT_BITS 13 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_UPDATED_BYTE_COUNT_SHIFT 16 + +/* PCIE_TL :: SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC :: RESERVED_0 [15:08] */ +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_RESERVED_0_MASK 0x0000ff00 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_RESERVED_0_ALIGN 0 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_RESERVED_0_BITS 8 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_RESERVED_0_SHIFT 8 + +/* PCIE_TL :: SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC :: SPLIT_TABLE_VALID_ARRAY [07:00] */ +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_SPLIT_TABLE_VALID_ARRAY_MASK 0x000000ff +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_SPLIT_TABLE_VALID_ARRAY_ALIGN 0 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_SPLIT_TABLE_VALID_ARRAY_BITS 8 +#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_SPLIT_TABLE_VALID_ARRAY_SHIFT 0 + + +/**************************************************************************** + * PCIE_TL :: TL_BUS_NO_DEV__NO__FUNC__NO + ***************************************************************************/ +/* PCIE_TL :: TL_BUS_NO_DEV__NO__FUNC__NO :: RESERVED_0 [31:17] */ +#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_RESERVED_0_MASK 0xfffe0000 +#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_RESERVED_0_ALIGN 0 +#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_RESERVED_0_BITS 15 +#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_RESERVED_0_SHIFT 17 + +/* PCIE_TL :: TL_BUS_NO_DEV__NO__FUNC__NO :: CONFIG_WRITE_INDICATER [16:16] */ +#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_CONFIG_WRITE_INDICATER_MASK 0x00010000 +#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_CONFIG_WRITE_INDICATER_ALIGN 0 +#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_CONFIG_WRITE_INDICATER_BITS 1 +#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_CONFIG_WRITE_INDICATER_SHIFT 16 + +/* PCIE_TL :: TL_BUS_NO_DEV__NO__FUNC__NO :: BUS_NUMBER [15:08] */ +#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_BUS_NUMBER_MASK 0x0000ff00 +#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_BUS_NUMBER_ALIGN 0 +#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_BUS_NUMBER_BITS 8 +#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_BUS_NUMBER_SHIFT 8 + +/* PCIE_TL :: TL_BUS_NO_DEV__NO__FUNC__NO :: DEVICE_NUMBER [07:03] */ +#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_DEVICE_NUMBER_MASK 0x000000f8 +#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_DEVICE_NUMBER_ALIGN 0 +#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_DEVICE_NUMBER_BITS 5 +#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_DEVICE_NUMBER_SHIFT 3 + +/* PCIE_TL :: TL_BUS_NO_DEV__NO__FUNC__NO :: FUNCTION_NUMBER [02:00] */ +#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_FUNCTION_NUMBER_MASK 0x00000007 +#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_FUNCTION_NUMBER_ALIGN 0 +#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_FUNCTION_NUMBER_BITS 3 +#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_FUNCTION_NUMBER_SHIFT 0 + + +/**************************************************************************** + * PCIE_TL :: TL_DEBUG + ***************************************************************************/ +/* PCIE_TL :: TL_DEBUG :: A4_DEVICE_INDICATION_BIT [31:31] */ +#define PCIE_TL_TL_DEBUG_A4_DEVICE_INDICATION_BIT_MASK 0x80000000 +#define PCIE_TL_TL_DEBUG_A4_DEVICE_INDICATION_BIT_ALIGN 0 +#define PCIE_TL_TL_DEBUG_A4_DEVICE_INDICATION_BIT_BITS 1 +#define PCIE_TL_TL_DEBUG_A4_DEVICE_INDICATION_BIT_SHIFT 31 + +/* PCIE_TL :: TL_DEBUG :: B1_DEVICE_INDICATION_BIT [30:30] */ +#define PCIE_TL_TL_DEBUG_B1_DEVICE_INDICATION_BIT_MASK 0x40000000 +#define PCIE_TL_TL_DEBUG_B1_DEVICE_INDICATION_BIT_ALIGN 0 +#define PCIE_TL_TL_DEBUG_B1_DEVICE_INDICATION_BIT_BITS 1 +#define PCIE_TL_TL_DEBUG_B1_DEVICE_INDICATION_BIT_SHIFT 30 + +/* PCIE_TL :: TL_DEBUG :: RESERVED_0 [29:00] */ +#define PCIE_TL_TL_DEBUG_RESERVED_0_MASK 0x3fffffff +#define PCIE_TL_TL_DEBUG_RESERVED_0_ALIGN 0 +#define PCIE_TL_TL_DEBUG_RESERVED_0_BITS 30 +#define PCIE_TL_TL_DEBUG_RESERVED_0_SHIFT 0 + + +/**************************************************************************** + * BCM70012_TGT_TOP_PCIE_DLL + ***************************************************************************/ +/**************************************************************************** + * PCIE_DLL :: DATA_LINK_CONTROL + ***************************************************************************/ +/* PCIE_DLL :: DATA_LINK_CONTROL :: RESERVED_0 [31:30] */ +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_0_MASK 0xc0000000 +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_0_ALIGN 0 +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_0_BITS 2 +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_0_SHIFT 30 + +/* PCIE_DLL :: DATA_LINK_CONTROL :: CQ28001_FIX_ENABLE [29:29] */ +#define PCIE_DLL_DATA_LINK_CONTROL_CQ28001_FIX_ENABLE_MASK 0x20000000 +#define PCIE_DLL_DATA_LINK_CONTROL_CQ28001_FIX_ENABLE_ALIGN 0 +#define PCIE_DLL_DATA_LINK_CONTROL_CQ28001_FIX_ENABLE_BITS 1 +#define PCIE_DLL_DATA_LINK_CONTROL_CQ28001_FIX_ENABLE_SHIFT 29 + +/* PCIE_DLL :: DATA_LINK_CONTROL :: CQ27820_FIX_ENABLE [28:28] */ +#define PCIE_DLL_DATA_LINK_CONTROL_CQ27820_FIX_ENABLE_MASK 0x10000000 +#define PCIE_DLL_DATA_LINK_CONTROL_CQ27820_FIX_ENABLE_ALIGN 0 +#define PCIE_DLL_DATA_LINK_CONTROL_CQ27820_FIX_ENABLE_BITS 1 +#define PCIE_DLL_DATA_LINK_CONTROL_CQ27820_FIX_ENABLE_SHIFT 28 + +/* PCIE_DLL :: DATA_LINK_CONTROL :: ASPM_L1_ENABLE [27:27] */ +#define PCIE_DLL_DATA_LINK_CONTROL_ASPM_L1_ENABLE_MASK 0x08000000 +#define PCIE_DLL_DATA_LINK_CONTROL_ASPM_L1_ENABLE_ALIGN 0 +#define PCIE_DLL_DATA_LINK_CONTROL_ASPM_L1_ENABLE_BITS 1 +#define PCIE_DLL_DATA_LINK_CONTROL_ASPM_L1_ENABLE_SHIFT 27 + +/* PCIE_DLL :: DATA_LINK_CONTROL :: RESERVED_1 [26:25] */ +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_1_MASK 0x06000000 +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_1_ALIGN 0 +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_1_BITS 2 +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_1_SHIFT 25 + +/* PCIE_DLL :: DATA_LINK_CONTROL :: CQ11211 [24:24] */ +#define PCIE_DLL_DATA_LINK_CONTROL_CQ11211_MASK 0x01000000 +#define PCIE_DLL_DATA_LINK_CONTROL_CQ11211_ALIGN 0 +#define PCIE_DLL_DATA_LINK_CONTROL_CQ11211_BITS 1 +#define PCIE_DLL_DATA_LINK_CONTROL_CQ11211_SHIFT 24 + +/* PCIE_DLL :: DATA_LINK_CONTROL :: RESERVED_2 [23:23] */ +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_2_MASK 0x00800000 +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_2_ALIGN 0 +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_2_BITS 1 +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_2_SHIFT 23 + +/* PCIE_DLL :: DATA_LINK_CONTROL :: RESERVED_3 [22:22] */ +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_3_MASK 0x00400000 +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_3_ALIGN 0 +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_3_BITS 1 +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_3_SHIFT 22 + +/* PCIE_DLL :: DATA_LINK_CONTROL :: RESERVED_4 [21:21] */ +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_4_MASK 0x00200000 +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_4_ALIGN 0 +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_4_BITS 1 +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_4_SHIFT 21 + +/* PCIE_DLL :: DATA_LINK_CONTROL :: RESERVED_5 [20:20] */ +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_5_MASK 0x00100000 +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_5_ALIGN 0 +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_5_BITS 1 +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_5_SHIFT 20 + +/* PCIE_DLL :: DATA_LINK_CONTROL :: RESERVED_6 [19:19] */ +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_6_MASK 0x00080000 +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_6_ALIGN 0 +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_6_BITS 1 +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_6_SHIFT 19 + +/* PCIE_DLL :: DATA_LINK_CONTROL :: PLL_REFSEL_SWITCH_CONTROL_CQ11011 [18:18] */ +#define PCIE_DLL_DATA_LINK_CONTROL_PLL_REFSEL_SWITCH_CONTROL_CQ11011_MASK 0x00040000 +#define PCIE_DLL_DATA_LINK_CONTROL_PLL_REFSEL_SWITCH_CONTROL_CQ11011_ALIGN 0 +#define PCIE_DLL_DATA_LINK_CONTROL_PLL_REFSEL_SWITCH_CONTROL_CQ11011_BITS 1 +#define PCIE_DLL_DATA_LINK_CONTROL_PLL_REFSEL_SWITCH_CONTROL_CQ11011_SHIFT 18 + +/* PCIE_DLL :: DATA_LINK_CONTROL :: RESERVED_7 [17:17] */ +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_7_MASK 0x00020000 +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_7_ALIGN 0 +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_7_BITS 1 +#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_7_SHIFT 17 + +/* PCIE_DLL :: DATA_LINK_CONTROL :: POWER_MANAGEMENT_CONTROL [16:16] */ +#define PCIE_DLL_DATA_LINK_CONTROL_POWER_MANAGEMENT_CONTROL_MASK 0x00010000 +#define PCIE_DLL_DATA_LINK_CONTROL_POWER_MANAGEMENT_CONTROL_ALIGN 0 +#define PCIE_DLL_DATA_LINK_CONTROL_POWER_MANAGEMENT_CONTROL_BITS 1 +#define PCIE_DLL_DATA_LINK_CONTROL_POWER_MANAGEMENT_CONTROL_SHIFT 16 + +/* PCIE_DLL :: DATA_LINK_CONTROL :: POWER_DOWN_SERDES_TRANSMITTER [15:15] */ +#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_TRANSMITTER_MASK 0x00008000 +#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_TRANSMITTER_ALIGN 0 +#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_TRANSMITTER_BITS 1 +#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_TRANSMITTER_SHIFT 15 + +/* PCIE_DLL :: DATA_LINK_CONTROL :: POWER_DOWN_SERDES_PLL [14:14] */ +#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_PLL_MASK 0x00004000 +#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_PLL_ALIGN 0 +#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_PLL_BITS 1 +#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_PLL_SHIFT 14 + +/* PCIE_DLL :: DATA_LINK_CONTROL :: POWER_DOWN_SERDES_RECEIVER [13:13] */ +#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_RECEIVER_MASK 0x00002000 +#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_RECEIVER_ALIGN 0 +#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_RECEIVER_BITS 1 +#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_RECEIVER_SHIFT 13 + +/* PCIE_DLL :: DATA_LINK_CONTROL :: ENABLE_BEACON [12:12] */ +#define PCIE_DLL_DATA_LINK_CONTROL_ENABLE_BEACON_MASK 0x00001000 +#define PCIE_DLL_DATA_LINK_CONTROL_ENABLE_BEACON_ALIGN 0 +#define PCIE_DLL_DATA_LINK_CONTROL_ENABLE_BEACON_BITS 1 +#define PCIE_DLL_DATA_LINK_CONTROL_ENABLE_BEACON_SHIFT 12 + +/* PCIE_DLL :: DATA_LINK_CONTROL :: AUTOMATIC_TIMER_THRESHOLD_ENABLE [11:11] */ +#define PCIE_DLL_DATA_LINK_CONTROL_AUTOMATIC_TIMER_THRESHOLD_ENABLE_MASK 0x00000800 +#define PCIE_DLL_DATA_LINK_CONTROL_AUTOMATIC_TIMER_THRESHOLD_ENABLE_ALIGN 0 +#define PCIE_DLL_DATA_LINK_CONTROL_AUTOMATIC_TIMER_THRESHOLD_ENABLE_BITS 1 +#define PCIE_DLL_DATA_LINK_CONTROL_AUTOMATIC_TIMER_THRESHOLD_ENABLE_SHIFT 11 + +/* PCIE_DLL :: DATA_LINK_CONTROL :: ENABLE_DLLP_TIMEOUT_MECHANISM [10:10] */ +#define PCIE_DLL_DATA_LINK_CONTROL_ENABLE_DLLP_TIMEOUT_MECHANISM_MASK 0x00000400 +#define PCIE_DLL_DATA_LINK_CONTROL_ENABLE_DLLP_TIMEOUT_MECHANISM_ALIGN 0 +#define PCIE_DLL_DATA_LINK_CONTROL_ENABLE_DLLP_TIMEOUT_MECHANISM_BITS 1 +#define PCIE_DLL_DATA_LINK_CONTROL_ENABLE_DLLP_TIMEOUT_MECHANISM_SHIFT 10 + +/* PCIE_DLL :: DATA_LINK_CONTROL :: CHECK_RECEIVE_FLOW_CONTROL_CREDITS [09:09] */ +#define PCIE_DLL_DATA_LINK_CONTROL_CHECK_RECEIVE_FLOW_CONTROL_CREDITS_MASK 0x00000200 +#define PCIE_DLL_DATA_LINK_CONTROL_CHECK_RECEIVE_FLOW_CONTROL_CREDITS_ALIGN 0 +#define PCIE_DLL_DATA_LINK_CONTROL_CHECK_RECEIVE_FLOW_CONTROL_CREDITS_BITS 1 +#define PCIE_DLL_DATA_LINK_CONTROL_CHECK_RECEIVE_FLOW_CONTROL_CREDITS_SHIFT 9 + +/* PCIE_DLL :: DATA_LINK_CONTROL :: LINK_ENABLE [08:08] */ +#define PCIE_DLL_DATA_LINK_CONTROL_LINK_ENABLE_MASK 0x00000100 +#define PCIE_DLL_DATA_LINK_CONTROL_LINK_ENABLE_ALIGN 0 +#define PCIE_DLL_DATA_LINK_CONTROL_LINK_ENABLE_BITS 1 +#define PCIE_DLL_DATA_LINK_CONTROL_LINK_ENABLE_SHIFT 8 + +/* PCIE_DLL :: DATA_LINK_CONTROL :: POWER_MANAGEMENT_CONTROL_2 [07:00] */ +#define PCIE_DLL_DATA_LINK_CONTROL_POWER_MANAGEMENT_CONTROL_2_MASK 0x000000ff +#define PCIE_DLL_DATA_LINK_CONTROL_POWER_MANAGEMENT_CONTROL_2_ALIGN 0 +#define PCIE_DLL_DATA_LINK_CONTROL_POWER_MANAGEMENT_CONTROL_2_BITS 8 +#define PCIE_DLL_DATA_LINK_CONTROL_POWER_MANAGEMENT_CONTROL_2_SHIFT 0 + + +/**************************************************************************** + * PCIE_DLL :: DATA_LINK_STATUS + ***************************************************************************/ +/* PCIE_DLL :: DATA_LINK_STATUS :: RESERVED_0 [31:26] */ +#define PCIE_DLL_DATA_LINK_STATUS_RESERVED_0_MASK 0xfc000000 +#define PCIE_DLL_DATA_LINK_STATUS_RESERVED_0_ALIGN 0 +#define PCIE_DLL_DATA_LINK_STATUS_RESERVED_0_BITS 6 +#define PCIE_DLL_DATA_LINK_STATUS_RESERVED_0_SHIFT 26 + +/* PCIE_DLL :: DATA_LINK_STATUS :: PHY_LINK_STATE [25:23] */ +#define PCIE_DLL_DATA_LINK_STATUS_PHY_LINK_STATE_MASK 0x03800000 +#define PCIE_DLL_DATA_LINK_STATUS_PHY_LINK_STATE_ALIGN 0 +#define PCIE_DLL_DATA_LINK_STATUS_PHY_LINK_STATE_BITS 3 +#define PCIE_DLL_DATA_LINK_STATUS_PHY_LINK_STATE_SHIFT 23 + +/* PCIE_DLL :: DATA_LINK_STATUS :: POWER_MANAGEMENT_STATE [22:19] */ +#define PCIE_DLL_DATA_LINK_STATUS_POWER_MANAGEMENT_STATE_MASK 0x00780000 +#define PCIE_DLL_DATA_LINK_STATUS_POWER_MANAGEMENT_STATE_ALIGN 0 +#define PCIE_DLL_DATA_LINK_STATUS_POWER_MANAGEMENT_STATE_BITS 4 +#define PCIE_DLL_DATA_LINK_STATUS_POWER_MANAGEMENT_STATE_SHIFT 19 + +/* PCIE_DLL :: DATA_LINK_STATUS :: POWER_MANAGEMENT_SUB_STATE [18:17] */ +#define PCIE_DLL_DATA_LINK_STATUS_POWER_MANAGEMENT_SUB_STATE_MASK 0x00060000 +#define PCIE_DLL_DATA_LINK_STATUS_POWER_MANAGEMENT_SUB_STATE_ALIGN 0 +#define PCIE_DLL_DATA_LINK_STATUS_POWER_MANAGEMENT_SUB_STATE_BITS 2 +#define PCIE_DLL_DATA_LINK_STATUS_POWER_MANAGEMENT_SUB_STATE_SHIFT 17 + +/* PCIE_DLL :: DATA_LINK_STATUS :: DATA_LINK_UP [16:16] */ +#define PCIE_DLL_DATA_LINK_STATUS_DATA_LINK_UP_MASK 0x00010000 +#define PCIE_DLL_DATA_LINK_STATUS_DATA_LINK_UP_ALIGN 0 +#define PCIE_DLL_DATA_LINK_STATUS_DATA_LINK_UP_BITS 1 +#define PCIE_DLL_DATA_LINK_STATUS_DATA_LINK_UP_SHIFT 16 + +/* PCIE_DLL :: DATA_LINK_STATUS :: RESERVED_1 [15:11] */ +#define PCIE_DLL_DATA_LINK_STATUS_RESERVED_1_MASK 0x0000f800 +#define PCIE_DLL_DATA_LINK_STATUS_RESERVED_1_ALIGN 0 +#define PCIE_DLL_DATA_LINK_STATUS_RESERVED_1_BITS 5 +#define PCIE_DLL_DATA_LINK_STATUS_RESERVED_1_SHIFT 11 + +/* PCIE_DLL :: DATA_LINK_STATUS :: PME_TURN_OFF_STATUS_IN_D0 [10:10] */ +#define PCIE_DLL_DATA_LINK_STATUS_PME_TURN_OFF_STATUS_IN_D0_MASK 0x00000400 +#define PCIE_DLL_DATA_LINK_STATUS_PME_TURN_OFF_STATUS_IN_D0_ALIGN 0 +#define PCIE_DLL_DATA_LINK_STATUS_PME_TURN_OFF_STATUS_IN_D0_BITS 1 +#define PCIE_DLL_DATA_LINK_STATUS_PME_TURN_OFF_STATUS_IN_D0_SHIFT 10 + +/* PCIE_DLL :: DATA_LINK_STATUS :: FLOW_CONTROL_UPDATE_TIMEOUT [09:09] */ +#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_UPDATE_TIMEOUT_MASK 0x00000200 +#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_UPDATE_TIMEOUT_ALIGN 0 +#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_UPDATE_TIMEOUT_BITS 1 +#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_UPDATE_TIMEOUT_SHIFT 9 + +/* PCIE_DLL :: DATA_LINK_STATUS :: FLOW_CONTROL_RECEIVE_OVERFLOW [08:08] */ +#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_RECEIVE_OVERFLOW_MASK 0x00000100 +#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_RECEIVE_OVERFLOW_ALIGN 0 +#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_RECEIVE_OVERFLOW_BITS 1 +#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_RECEIVE_OVERFLOW_SHIFT 8 + +/* PCIE_DLL :: DATA_LINK_STATUS :: FLOW_CONTROL_PROTOCOL_ERROR [07:07] */ +#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_PROTOCOL_ERROR_MASK 0x00000080 +#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_PROTOCOL_ERROR_ALIGN 0 +#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_PROTOCOL_ERROR_BITS 1 +#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_PROTOCOL_ERROR_SHIFT 7 + +/* PCIE_DLL :: DATA_LINK_STATUS :: DATA_LINK_PROTOCOL_ERROR [06:06] */ +#define PCIE_DLL_DATA_LINK_STATUS_DATA_LINK_PROTOCOL_ERROR_MASK 0x00000040 +#define PCIE_DLL_DATA_LINK_STATUS_DATA_LINK_PROTOCOL_ERROR_ALIGN 0 +#define PCIE_DLL_DATA_LINK_STATUS_DATA_LINK_PROTOCOL_ERROR_BITS 1 +#define PCIE_DLL_DATA_LINK_STATUS_DATA_LINK_PROTOCOL_ERROR_SHIFT 6 + +/* PCIE_DLL :: DATA_LINK_STATUS :: REPLAY_ROLLOVER [05:05] */ +#define PCIE_DLL_DATA_LINK_STATUS_REPLAY_ROLLOVER_MASK 0x00000020 +#define PCIE_DLL_DATA_LINK_STATUS_REPLAY_ROLLOVER_ALIGN 0 +#define PCIE_DLL_DATA_LINK_STATUS_REPLAY_ROLLOVER_BITS 1 +#define PCIE_DLL_DATA_LINK_STATUS_REPLAY_ROLLOVER_SHIFT 5 + +/* PCIE_DLL :: DATA_LINK_STATUS :: REPLAY_TIMEOUT [04:04] */ +#define PCIE_DLL_DATA_LINK_STATUS_REPLAY_TIMEOUT_MASK 0x00000010 +#define PCIE_DLL_DATA_LINK_STATUS_REPLAY_TIMEOUT_ALIGN 0 +#define PCIE_DLL_DATA_LINK_STATUS_REPLAY_TIMEOUT_BITS 1 +#define PCIE_DLL_DATA_LINK_STATUS_REPLAY_TIMEOUT_SHIFT 4 + +/* PCIE_DLL :: DATA_LINK_STATUS :: NAK_RECEIVED [03:03] */ +#define PCIE_DLL_DATA_LINK_STATUS_NAK_RECEIVED_MASK 0x00000008 +#define PCIE_DLL_DATA_LINK_STATUS_NAK_RECEIVED_ALIGN 0 +#define PCIE_DLL_DATA_LINK_STATUS_NAK_RECEIVED_BITS 1 +#define PCIE_DLL_DATA_LINK_STATUS_NAK_RECEIVED_SHIFT 3 + +/* PCIE_DLL :: DATA_LINK_STATUS :: DLLP_ERROR [02:02] */ +#define PCIE_DLL_DATA_LINK_STATUS_DLLP_ERROR_MASK 0x00000004 +#define PCIE_DLL_DATA_LINK_STATUS_DLLP_ERROR_ALIGN 0 +#define PCIE_DLL_DATA_LINK_STATUS_DLLP_ERROR_BITS 1 +#define PCIE_DLL_DATA_LINK_STATUS_DLLP_ERROR_SHIFT 2 + +/* PCIE_DLL :: DATA_LINK_STATUS :: BAD_TLP_SEQUENCE_NUMBER [01:01] */ +#define PCIE_DLL_DATA_LINK_STATUS_BAD_TLP_SEQUENCE_NUMBER_MASK 0x00000002 +#define PCIE_DLL_DATA_LINK_STATUS_BAD_TLP_SEQUENCE_NUMBER_ALIGN 0 +#define PCIE_DLL_DATA_LINK_STATUS_BAD_TLP_SEQUENCE_NUMBER_BITS 1 +#define PCIE_DLL_DATA_LINK_STATUS_BAD_TLP_SEQUENCE_NUMBER_SHIFT 1 + +/* PCIE_DLL :: DATA_LINK_STATUS :: TLP_ERROR [00:00] */ +#define PCIE_DLL_DATA_LINK_STATUS_TLP_ERROR_MASK 0x00000001 +#define PCIE_DLL_DATA_LINK_STATUS_TLP_ERROR_ALIGN 0 +#define PCIE_DLL_DATA_LINK_STATUS_TLP_ERROR_BITS 1 +#define PCIE_DLL_DATA_LINK_STATUS_TLP_ERROR_SHIFT 0 + + +/**************************************************************************** + * PCIE_DLL :: DATA_LINK_ATTENTION + ***************************************************************************/ +/* PCIE_DLL :: DATA_LINK_ATTENTION :: RESERVED_0 [31:06] */ +#define PCIE_DLL_DATA_LINK_ATTENTION_RESERVED_0_MASK 0xffffffc0 +#define PCIE_DLL_DATA_LINK_ATTENTION_RESERVED_0_ALIGN 0 +#define PCIE_DLL_DATA_LINK_ATTENTION_RESERVED_0_BITS 26 +#define PCIE_DLL_DATA_LINK_ATTENTION_RESERVED_0_SHIFT 6 + +/* PCIE_DLL :: DATA_LINK_ATTENTION :: DATA_LINK_LAYER_PACKET_TEST_INDICATOR [05:05] */ +#define PCIE_DLL_DATA_LINK_ATTENTION_DATA_LINK_LAYER_PACKET_TEST_INDICATOR_MASK 0x00000020 +#define PCIE_DLL_DATA_LINK_ATTENTION_DATA_LINK_LAYER_PACKET_TEST_INDICATOR_ALIGN 0 +#define PCIE_DLL_DATA_LINK_ATTENTION_DATA_LINK_LAYER_PACKET_TEST_INDICATOR_BITS 1 +#define PCIE_DLL_DATA_LINK_ATTENTION_DATA_LINK_LAYER_PACKET_TEST_INDICATOR_SHIFT 5 + +/* PCIE_DLL :: DATA_LINK_ATTENTION :: DATA_LINK_LAYER_ERROR_ATTENTION_INDICATOR [04:04] */ +#define PCIE_DLL_DATA_LINK_ATTENTION_DATA_LINK_LAYER_ERROR_ATTENTION_INDICATOR_MASK 0x00000010 +#define PCIE_DLL_DATA_LINK_ATTENTION_DATA_LINK_LAYER_ERROR_ATTENTION_INDICATOR_ALIGN 0 +#define PCIE_DLL_DATA_LINK_ATTENTION_DATA_LINK_LAYER_ERROR_ATTENTION_INDICATOR_BITS 1 +#define PCIE_DLL_DATA_LINK_ATTENTION_DATA_LINK_LAYER_ERROR_ATTENTION_INDICATOR_SHIFT 4 + +/* PCIE_DLL :: DATA_LINK_ATTENTION :: NAK_RECEIVED_COUNTER_ATTENTION_INDICATOR [03:03] */ +#define PCIE_DLL_DATA_LINK_ATTENTION_NAK_RECEIVED_COUNTER_ATTENTION_INDICATOR_MASK 0x00000008 +#define PCIE_DLL_DATA_LINK_ATTENTION_NAK_RECEIVED_COUNTER_ATTENTION_INDICATOR_ALIGN 0 +#define PCIE_DLL_DATA_LINK_ATTENTION_NAK_RECEIVED_COUNTER_ATTENTION_INDICATOR_BITS 1 +#define PCIE_DLL_DATA_LINK_ATTENTION_NAK_RECEIVED_COUNTER_ATTENTION_INDICATOR_SHIFT 3 + +/* PCIE_DLL :: DATA_LINK_ATTENTION :: DLLP_ERROR_COUNTER_ATTENTION_INDICATOR [02:02] */ +#define PCIE_DLL_DATA_LINK_ATTENTION_DLLP_ERROR_COUNTER_ATTENTION_INDICATOR_MASK 0x00000004 +#define PCIE_DLL_DATA_LINK_ATTENTION_DLLP_ERROR_COUNTER_ATTENTION_INDICATOR_ALIGN 0 +#define PCIE_DLL_DATA_LINK_ATTENTION_DLLP_ERROR_COUNTER_ATTENTION_INDICATOR_BITS 1 +#define PCIE_DLL_DATA_LINK_ATTENTION_DLLP_ERROR_COUNTER_ATTENTION_INDICATOR_SHIFT 2 + +/* PCIE_DLL :: DATA_LINK_ATTENTION :: TLP_BAD_SEQUENCE_COUNTER_ATTENTION_INDICATOR [01:01] */ +#define PCIE_DLL_DATA_LINK_ATTENTION_TLP_BAD_SEQUENCE_COUNTER_ATTENTION_INDICATOR_MASK 0x00000002 +#define PCIE_DLL_DATA_LINK_ATTENTION_TLP_BAD_SEQUENCE_COUNTER_ATTENTION_INDICATOR_ALIGN 0 +#define PCIE_DLL_DATA_LINK_ATTENTION_TLP_BAD_SEQUENCE_COUNTER_ATTENTION_INDICATOR_BITS 1 +#define PCIE_DLL_DATA_LINK_ATTENTION_TLP_BAD_SEQUENCE_COUNTER_ATTENTION_INDICATOR_SHIFT 1 + +/* PCIE_DLL :: DATA_LINK_ATTENTION :: TLP_ERROR_COUNTER_ATTENTION_INDICATOR [00:00] */ +#define PCIE_DLL_DATA_LINK_ATTENTION_TLP_ERROR_COUNTER_ATTENTION_INDICATOR_MASK 0x00000001 +#define PCIE_DLL_DATA_LINK_ATTENTION_TLP_ERROR_COUNTER_ATTENTION_INDICATOR_ALIGN 0 +#define PCIE_DLL_DATA_LINK_ATTENTION_TLP_ERROR_COUNTER_ATTENTION_INDICATOR_BITS 1 +#define PCIE_DLL_DATA_LINK_ATTENTION_TLP_ERROR_COUNTER_ATTENTION_INDICATOR_SHIFT 0 + + +/**************************************************************************** + * PCIE_DLL :: DATA_LINK_ATTENTION_MASK + ***************************************************************************/ +/* PCIE_DLL :: DATA_LINK_ATTENTION_MASK :: RESERVED_0 [31:08] */ +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_RESERVED_0_MASK 0xffffff00 +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_RESERVED_0_ALIGN 0 +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_RESERVED_0_BITS 24 +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_RESERVED_0_SHIFT 8 + +/* PCIE_DLL :: DATA_LINK_ATTENTION_MASK :: UNUSED_0 [07:06] */ +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_UNUSED_0_MASK 0x000000c0 +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_UNUSED_0_ALIGN 0 +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_UNUSED_0_BITS 2 +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_UNUSED_0_SHIFT 6 + +/* PCIE_DLL :: DATA_LINK_ATTENTION_MASK :: DATA_LINK_LAYER_PACKET_TEST_ATTENTION_MASK [05:05] */ +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DATA_LINK_LAYER_PACKET_TEST_ATTENTION_MASK_MASK 0x00000020 +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DATA_LINK_LAYER_PACKET_TEST_ATTENTION_MASK_ALIGN 0 +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DATA_LINK_LAYER_PACKET_TEST_ATTENTION_MASK_BITS 1 +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DATA_LINK_LAYER_PACKET_TEST_ATTENTION_MASK_SHIFT 5 + +/* PCIE_DLL :: DATA_LINK_ATTENTION_MASK :: DATA_LINK_LAYER_ERROR_ATTENTION_MASK [04:04] */ +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DATA_LINK_LAYER_ERROR_ATTENTION_MASK_MASK 0x00000010 +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DATA_LINK_LAYER_ERROR_ATTENTION_MASK_ALIGN 0 +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DATA_LINK_LAYER_ERROR_ATTENTION_MASK_BITS 1 +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DATA_LINK_LAYER_ERROR_ATTENTION_MASK_SHIFT 4 + +/* PCIE_DLL :: DATA_LINK_ATTENTION_MASK :: NAK_RECEIVED_COUNTER_ATTENTION_MASK [03:03] */ +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_NAK_RECEIVED_COUNTER_ATTENTION_MASK_MASK 0x00000008 +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_NAK_RECEIVED_COUNTER_ATTENTION_MASK_ALIGN 0 +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_NAK_RECEIVED_COUNTER_ATTENTION_MASK_BITS 1 +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_NAK_RECEIVED_COUNTER_ATTENTION_MASK_SHIFT 3 + +/* PCIE_DLL :: DATA_LINK_ATTENTION_MASK :: DLLP_ERROR_COUNTER_ATTENTION_MASK [02:02] */ +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DLLP_ERROR_COUNTER_ATTENTION_MASK_MASK 0x00000004 +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DLLP_ERROR_COUNTER_ATTENTION_MASK_ALIGN 0 +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DLLP_ERROR_COUNTER_ATTENTION_MASK_BITS 1 +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DLLP_ERROR_COUNTER_ATTENTION_MASK_SHIFT 2 + +/* PCIE_DLL :: DATA_LINK_ATTENTION_MASK :: TLP_BAD_SEQUENCE_COUNTER_ATTENTION_MASK [01:01] */ +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_TLP_BAD_SEQUENCE_COUNTER_ATTENTION_MASK_MASK 0x00000002 +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_TLP_BAD_SEQUENCE_COUNTER_ATTENTION_MASK_ALIGN 0 +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_TLP_BAD_SEQUENCE_COUNTER_ATTENTION_MASK_BITS 1 +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_TLP_BAD_SEQUENCE_COUNTER_ATTENTION_MASK_SHIFT 1 + +/* PCIE_DLL :: DATA_LINK_ATTENTION_MASK :: TLP_ERROR_COUNTER_ATTENTION_MASK [00:00] */ +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_TLP_ERROR_COUNTER_ATTENTION_MASK_MASK 0x00000001 +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_TLP_ERROR_COUNTER_ATTENTION_MASK_ALIGN 0 +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_TLP_ERROR_COUNTER_ATTENTION_MASK_BITS 1 +#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_TLP_ERROR_COUNTER_ATTENTION_MASK_SHIFT 0 + + +/**************************************************************************** + * PCIE_DLL :: NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG + ***************************************************************************/ +/* PCIE_DLL :: NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG :: RESERVED_0 [31:12] */ +#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_MASK 0xfffff000 +#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_ALIGN 0 +#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_BITS 20 +#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_SHIFT 12 + +/* PCIE_DLL :: NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG :: NEXT_TRANSMIT_SEQUENCE_NUMBER [11:00] */ +#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG_NEXT_TRANSMIT_SEQUENCE_NUMBER_MASK 0x00000fff +#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG_NEXT_TRANSMIT_SEQUENCE_NUMBER_ALIGN 0 +#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG_NEXT_TRANSMIT_SEQUENCE_NUMBER_BITS 12 +#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG_NEXT_TRANSMIT_SEQUENCE_NUMBER_SHIFT 0 + + +/**************************************************************************** + * PCIE_DLL :: ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG + ***************************************************************************/ +/* PCIE_DLL :: ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG :: RESERVED_0 [31:12] */ +#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_MASK 0xfffff000 +#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_ALIGN 0 +#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_BITS 20 +#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_SHIFT 12 + +/* PCIE_DLL :: ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG :: ACK_ED_TRANSMIT_SEQUENCE_NUMBER [11:00] */ +#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_MASK 0x00000fff +#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_ALIGN 0 +#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_BITS 12 +#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_SHIFT 0 + + +/**************************************************************************** + * PCIE_DLL :: PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG + ***************************************************************************/ +/* PCIE_DLL :: PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG :: RESERVED_0 [31:12] */ +#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_MASK 0xfffff000 +#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_ALIGN 0 +#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_BITS 20 +#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_SHIFT 12 + +/* PCIE_DLL :: PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG :: PURGED_TRANSMIT_SEQUENCE_NUMBER [11:00] */ +#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_PURGED_TRANSMIT_SEQUENCE_NUMBER_MASK 0x00000fff +#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_PURGED_TRANSMIT_SEQUENCE_NUMBER_ALIGN 0 +#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_PURGED_TRANSMIT_SEQUENCE_NUMBER_BITS 12 +#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_PURGED_TRANSMIT_SEQUENCE_NUMBER_SHIFT 0 + + +/**************************************************************************** + * PCIE_DLL :: RECEIVE_SEQUENCE_NUMBER_DEBUG + ***************************************************************************/ +/* PCIE_DLL :: RECEIVE_SEQUENCE_NUMBER_DEBUG :: RESERVED_0 [31:12] */ +#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG_RESERVED_0_MASK 0xfffff000 +#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG_RESERVED_0_ALIGN 0 +#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG_RESERVED_0_BITS 20 +#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG_RESERVED_0_SHIFT 12 + +/* PCIE_DLL :: RECEIVE_SEQUENCE_NUMBER_DEBUG :: RECEIVE_SEQUENCE_NUMBER [11:00] */ +#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG_RECEIVE_SEQUENCE_NUMBER_MASK 0x00000fff +#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG_RECEIVE_SEQUENCE_NUMBER_ALIGN 0 +#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG_RECEIVE_SEQUENCE_NUMBER_BITS 12 +#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG_RECEIVE_SEQUENCE_NUMBER_SHIFT 0 + + +/**************************************************************************** + * PCIE_DLL :: DATA_LINK_REPLAY + ***************************************************************************/ +/* PCIE_DLL :: DATA_LINK_REPLAY :: RESERVED_0 [31:23] */ +#define PCIE_DLL_DATA_LINK_REPLAY_RESERVED_0_MASK 0xff800000 +#define PCIE_DLL_DATA_LINK_REPLAY_RESERVED_0_ALIGN 0 +#define PCIE_DLL_DATA_LINK_REPLAY_RESERVED_0_BITS 9 +#define PCIE_DLL_DATA_LINK_REPLAY_RESERVED_0_SHIFT 23 + +/* PCIE_DLL :: DATA_LINK_REPLAY :: REPLAY_TIMEOUT_VALUE [22:10] */ +#define PCIE_DLL_DATA_LINK_REPLAY_REPLAY_TIMEOUT_VALUE_MASK 0x007ffc00 +#define PCIE_DLL_DATA_LINK_REPLAY_REPLAY_TIMEOUT_VALUE_ALIGN 0 +#define PCIE_DLL_DATA_LINK_REPLAY_REPLAY_TIMEOUT_VALUE_BITS 13 +#define PCIE_DLL_DATA_LINK_REPLAY_REPLAY_TIMEOUT_VALUE_SHIFT 10 + +/* PCIE_DLL :: DATA_LINK_REPLAY :: REPLAY_BUFFER_SIZE [09:00] */ +#define PCIE_DLL_DATA_LINK_REPLAY_REPLAY_BUFFER_SIZE_MASK 0x000003ff +#define PCIE_DLL_DATA_LINK_REPLAY_REPLAY_BUFFER_SIZE_ALIGN 0 +#define PCIE_DLL_DATA_LINK_REPLAY_REPLAY_BUFFER_SIZE_BITS 10 +#define PCIE_DLL_DATA_LINK_REPLAY_REPLAY_BUFFER_SIZE_SHIFT 0 + + +/**************************************************************************** + * PCIE_DLL :: DATA_LINK_ACK_TIMEOUT + ***************************************************************************/ +/* PCIE_DLL :: DATA_LINK_ACK_TIMEOUT :: RESERVED_0 [31:11] */ +#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT_RESERVED_0_MASK 0xfffff800 +#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT_RESERVED_0_ALIGN 0 +#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT_RESERVED_0_BITS 21 +#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT_RESERVED_0_SHIFT 11 + +/* PCIE_DLL :: DATA_LINK_ACK_TIMEOUT :: ACK_LATENCY_TIMEOUT_VALUE [10:00] */ +#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT_ACK_LATENCY_TIMEOUT_VALUE_MASK 0x000007ff +#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT_ACK_LATENCY_TIMEOUT_VALUE_ALIGN 0 +#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT_ACK_LATENCY_TIMEOUT_VALUE_BITS 11 +#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT_ACK_LATENCY_TIMEOUT_VALUE_SHIFT 0 + + +/**************************************************************************** + * PCIE_DLL :: POWER_MANAGEMENT_THRESHOLD + ***************************************************************************/ +/* PCIE_DLL :: POWER_MANAGEMENT_THRESHOLD :: RESERVED_0 [31:24] */ +#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_RESERVED_0_MASK 0xff000000 +#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_RESERVED_0_ALIGN 0 +#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_RESERVED_0_BITS 8 +#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_RESERVED_0_SHIFT 24 + +/* PCIE_DLL :: POWER_MANAGEMENT_THRESHOLD :: L0_STAY_TIME [23:20] */ +#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L0_STAY_TIME_MASK 0x00f00000 +#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L0_STAY_TIME_ALIGN 0 +#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L0_STAY_TIME_BITS 4 +#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L0_STAY_TIME_SHIFT 20 + +/* PCIE_DLL :: POWER_MANAGEMENT_THRESHOLD :: L1_STAY_TIME [19:16] */ +#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L1_STAY_TIME_MASK 0x000f0000 +#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L1_STAY_TIME_ALIGN 0 +#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L1_STAY_TIME_BITS 4 +#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L1_STAY_TIME_SHIFT 16 + +/* PCIE_DLL :: POWER_MANAGEMENT_THRESHOLD :: L1_THRESHOLD [15:08] */ +#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L1_THRESHOLD_MASK 0x0000ff00 +#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L1_THRESHOLD_ALIGN 0 +#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L1_THRESHOLD_BITS 8 +#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L1_THRESHOLD_SHIFT 8 + +/* PCIE_DLL :: POWER_MANAGEMENT_THRESHOLD :: L0S_THRESHOLD [07:00] */ +#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L0S_THRESHOLD_MASK 0x000000ff +#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L0S_THRESHOLD_ALIGN 0 +#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L0S_THRESHOLD_BITS 8 +#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L0S_THRESHOLD_SHIFT 0 + + +/**************************************************************************** + * PCIE_DLL :: RETRY_BUFFER_WRITE_POINTER_DEBUG + ***************************************************************************/ +/* PCIE_DLL :: RETRY_BUFFER_WRITE_POINTER_DEBUG :: RESERVED_0 [31:11] */ +#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG_RESERVED_0_MASK 0xfffff800 +#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG_RESERVED_0_ALIGN 0 +#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG_RESERVED_0_BITS 21 +#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG_RESERVED_0_SHIFT 11 + +/* PCIE_DLL :: RETRY_BUFFER_WRITE_POINTER_DEBUG :: RETRY_BUFFER_WRITE_POINTER [10:00] */ +#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG_RETRY_BUFFER_WRITE_POINTER_MASK 0x000007ff +#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG_RETRY_BUFFER_WRITE_POINTER_ALIGN 0 +#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG_RETRY_BUFFER_WRITE_POINTER_BITS 11 +#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG_RETRY_BUFFER_WRITE_POINTER_SHIFT 0 + + +/**************************************************************************** + * PCIE_DLL :: RETRY_BUFFER_READ_POINTER_DEBUG + ***************************************************************************/ +/* PCIE_DLL :: RETRY_BUFFER_READ_POINTER_DEBUG :: RESERVED_0 [31:11] */ +#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG_RESERVED_0_MASK 0xfffff800 +#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG_RESERVED_0_ALIGN 0 +#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG_RESERVED_0_BITS 21 +#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG_RESERVED_0_SHIFT 11 + +/* PCIE_DLL :: RETRY_BUFFER_READ_POINTER_DEBUG :: RETRY_BUFFER_READ_POINTER [10:00] */ +#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG_RETRY_BUFFER_READ_POINTER_MASK 0x000007ff +#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG_RETRY_BUFFER_READ_POINTER_ALIGN 0 +#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG_RETRY_BUFFER_READ_POINTER_BITS 11 +#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG_RETRY_BUFFER_READ_POINTER_SHIFT 0 + + +/**************************************************************************** + * PCIE_DLL :: RETRY_BUFFER_PURGED_POINTER_DEBUG + ***************************************************************************/ +/* PCIE_DLL :: RETRY_BUFFER_PURGED_POINTER_DEBUG :: RESERVED_0 [31:11] */ +#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG_RESERVED_0_MASK 0xfffff800 +#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG_RESERVED_0_ALIGN 0 +#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG_RESERVED_0_BITS 21 +#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG_RESERVED_0_SHIFT 11 + +/* PCIE_DLL :: RETRY_BUFFER_PURGED_POINTER_DEBUG :: RETRY_BUFFER_PURGED_POINTER [10:00] */ +#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG_RETRY_BUFFER_PURGED_POINTER_MASK 0x000007ff +#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG_RETRY_BUFFER_PURGED_POINTER_ALIGN 0 +#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG_RETRY_BUFFER_PURGED_POINTER_BITS 11 +#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG_RETRY_BUFFER_PURGED_POINTER_SHIFT 0 + + +/**************************************************************************** + * PCIE_DLL :: RETRY_BUFFER_READ_WRITE_DEBUG_PORT + ***************************************************************************/ +/* PCIE_DLL :: RETRY_BUFFER_READ_WRITE_DEBUG_PORT :: RETRY_BUFFER_DATA [31:00] */ +#define PCIE_DLL_RETRY_BUFFER_READ_WRITE_DEBUG_PORT_RETRY_BUFFER_DATA_MASK 0xffffffff +#define PCIE_DLL_RETRY_BUFFER_READ_WRITE_DEBUG_PORT_RETRY_BUFFER_DATA_ALIGN 0 +#define PCIE_DLL_RETRY_BUFFER_READ_WRITE_DEBUG_PORT_RETRY_BUFFER_DATA_BITS 32 +#define PCIE_DLL_RETRY_BUFFER_READ_WRITE_DEBUG_PORT_RETRY_BUFFER_DATA_SHIFT 0 + + +/**************************************************************************** + * PCIE_DLL :: ERROR_COUNT_THRESHOLD + ***************************************************************************/ +/* PCIE_DLL :: ERROR_COUNT_THRESHOLD :: RESERVED_0 [31:15] */ +#define PCIE_DLL_ERROR_COUNT_THRESHOLD_RESERVED_0_MASK 0xffff8000 +#define PCIE_DLL_ERROR_COUNT_THRESHOLD_RESERVED_0_ALIGN 0 +#define PCIE_DLL_ERROR_COUNT_THRESHOLD_RESERVED_0_BITS 17 +#define PCIE_DLL_ERROR_COUNT_THRESHOLD_RESERVED_0_SHIFT 15 + +/* PCIE_DLL :: ERROR_COUNT_THRESHOLD :: BAD_SEQUENCE_NUMBER_COUNT_THRESHOLD [14:12] */ +#define PCIE_DLL_ERROR_COUNT_THRESHOLD_BAD_SEQUENCE_NUMBER_COUNT_THRESHOLD_MASK 0x00007000 +#define PCIE_DLL_ERROR_COUNT_THRESHOLD_BAD_SEQUENCE_NUMBER_COUNT_THRESHOLD_ALIGN 0 +#define PCIE_DLL_ERROR_COUNT_THRESHOLD_BAD_SEQUENCE_NUMBER_COUNT_THRESHOLD_BITS 3 +#define PCIE_DLL_ERROR_COUNT_THRESHOLD_BAD_SEQUENCE_NUMBER_COUNT_THRESHOLD_SHIFT 12 + +/* PCIE_DLL :: ERROR_COUNT_THRESHOLD :: NAK_RECEIVED_COUNT_THRESHOLD [11:08] */ +#define PCIE_DLL_ERROR_COUNT_THRESHOLD_NAK_RECEIVED_COUNT_THRESHOLD_MASK 0x00000f00 +#define PCIE_DLL_ERROR_COUNT_THRESHOLD_NAK_RECEIVED_COUNT_THRESHOLD_ALIGN 0 +#define PCIE_DLL_ERROR_COUNT_THRESHOLD_NAK_RECEIVED_COUNT_THRESHOLD_BITS 4 +#define PCIE_DLL_ERROR_COUNT_THRESHOLD_NAK_RECEIVED_COUNT_THRESHOLD_SHIFT 8 + +/* PCIE_DLL :: ERROR_COUNT_THRESHOLD :: DLLP_ERROR_COUNT_THRESHOLD [07:04] */ +#define PCIE_DLL_ERROR_COUNT_THRESHOLD_DLLP_ERROR_COUNT_THRESHOLD_MASK 0x000000f0 +#define PCIE_DLL_ERROR_COUNT_THRESHOLD_DLLP_ERROR_COUNT_THRESHOLD_ALIGN 0 +#define PCIE_DLL_ERROR_COUNT_THRESHOLD_DLLP_ERROR_COUNT_THRESHOLD_BITS 4 +#define PCIE_DLL_ERROR_COUNT_THRESHOLD_DLLP_ERROR_COUNT_THRESHOLD_SHIFT 4 + +/* PCIE_DLL :: ERROR_COUNT_THRESHOLD :: TLP_ERROR_COUNT_THRESHOLD [03:00] */ +#define PCIE_DLL_ERROR_COUNT_THRESHOLD_TLP_ERROR_COUNT_THRESHOLD_MASK 0x0000000f +#define PCIE_DLL_ERROR_COUNT_THRESHOLD_TLP_ERROR_COUNT_THRESHOLD_ALIGN 0 +#define PCIE_DLL_ERROR_COUNT_THRESHOLD_TLP_ERROR_COUNT_THRESHOLD_BITS 4 +#define PCIE_DLL_ERROR_COUNT_THRESHOLD_TLP_ERROR_COUNT_THRESHOLD_SHIFT 0 + + +/**************************************************************************** + * PCIE_DLL :: TL_ERROR_COUNTER + ***************************************************************************/ +/* PCIE_DLL :: TL_ERROR_COUNTER :: RESERVED_0 [31:24] */ +#define PCIE_DLL_TL_ERROR_COUNTER_RESERVED_0_MASK 0xff000000 +#define PCIE_DLL_TL_ERROR_COUNTER_RESERVED_0_ALIGN 0 +#define PCIE_DLL_TL_ERROR_COUNTER_RESERVED_0_BITS 8 +#define PCIE_DLL_TL_ERROR_COUNTER_RESERVED_0_SHIFT 24 + +/* PCIE_DLL :: TL_ERROR_COUNTER :: TLP_BAD_SEQUENCE_NUMBER_COUNTER [23:16] */ +#define PCIE_DLL_TL_ERROR_COUNTER_TLP_BAD_SEQUENCE_NUMBER_COUNTER_MASK 0x00ff0000 +#define PCIE_DLL_TL_ERROR_COUNTER_TLP_BAD_SEQUENCE_NUMBER_COUNTER_ALIGN 0 +#define PCIE_DLL_TL_ERROR_COUNTER_TLP_BAD_SEQUENCE_NUMBER_COUNTER_BITS 8 +#define PCIE_DLL_TL_ERROR_COUNTER_TLP_BAD_SEQUENCE_NUMBER_COUNTER_SHIFT 16 + +/* PCIE_DLL :: TL_ERROR_COUNTER :: TLP_ERROR_COUNTER [15:00] */ +#define PCIE_DLL_TL_ERROR_COUNTER_TLP_ERROR_COUNTER_MASK 0x0000ffff +#define PCIE_DLL_TL_ERROR_COUNTER_TLP_ERROR_COUNTER_ALIGN 0 +#define PCIE_DLL_TL_ERROR_COUNTER_TLP_ERROR_COUNTER_BITS 16 +#define PCIE_DLL_TL_ERROR_COUNTER_TLP_ERROR_COUNTER_SHIFT 0 + + +/**************************************************************************** + * PCIE_DLL :: DLLP_ERROR_COUNTER + ***************************************************************************/ +/* PCIE_DLL :: DLLP_ERROR_COUNTER :: RESERVED_0 [31:16] */ +#define PCIE_DLL_DLLP_ERROR_COUNTER_RESERVED_0_MASK 0xffff0000 +#define PCIE_DLL_DLLP_ERROR_COUNTER_RESERVED_0_ALIGN 0 +#define PCIE_DLL_DLLP_ERROR_COUNTER_RESERVED_0_BITS 16 +#define PCIE_DLL_DLLP_ERROR_COUNTER_RESERVED_0_SHIFT 16 + +/* PCIE_DLL :: DLLP_ERROR_COUNTER :: DLLP_ERROR_COUNTER [15:00] */ +#define PCIE_DLL_DLLP_ERROR_COUNTER_DLLP_ERROR_COUNTER_MASK 0x0000ffff +#define PCIE_DLL_DLLP_ERROR_COUNTER_DLLP_ERROR_COUNTER_ALIGN 0 +#define PCIE_DLL_DLLP_ERROR_COUNTER_DLLP_ERROR_COUNTER_BITS 16 +#define PCIE_DLL_DLLP_ERROR_COUNTER_DLLP_ERROR_COUNTER_SHIFT 0 + + +/**************************************************************************** + * PCIE_DLL :: NAK_RECEIVED_COUNTER + ***************************************************************************/ +/* PCIE_DLL :: NAK_RECEIVED_COUNTER :: RESERVED_0 [31:16] */ +#define PCIE_DLL_NAK_RECEIVED_COUNTER_RESERVED_0_MASK 0xffff0000 +#define PCIE_DLL_NAK_RECEIVED_COUNTER_RESERVED_0_ALIGN 0 +#define PCIE_DLL_NAK_RECEIVED_COUNTER_RESERVED_0_BITS 16 +#define PCIE_DLL_NAK_RECEIVED_COUNTER_RESERVED_0_SHIFT 16 + +/* PCIE_DLL :: NAK_RECEIVED_COUNTER :: NAK_RECEIVED_COUNTER [15:00] */ +#define PCIE_DLL_NAK_RECEIVED_COUNTER_NAK_RECEIVED_COUNTER_MASK 0x0000ffff +#define PCIE_DLL_NAK_RECEIVED_COUNTER_NAK_RECEIVED_COUNTER_ALIGN 0 +#define PCIE_DLL_NAK_RECEIVED_COUNTER_NAK_RECEIVED_COUNTER_BITS 16 +#define PCIE_DLL_NAK_RECEIVED_COUNTER_NAK_RECEIVED_COUNTER_SHIFT 0 + + +/**************************************************************************** + * PCIE_DLL :: DATA_LINK_TEST + ***************************************************************************/ +/* PCIE_DLL :: DATA_LINK_TEST :: RESERVED_0 [31:16] */ +#define PCIE_DLL_DATA_LINK_TEST_RESERVED_0_MASK 0xffff0000 +#define PCIE_DLL_DATA_LINK_TEST_RESERVED_0_ALIGN 0 +#define PCIE_DLL_DATA_LINK_TEST_RESERVED_0_BITS 16 +#define PCIE_DLL_DATA_LINK_TEST_RESERVED_0_SHIFT 16 + +/* PCIE_DLL :: DATA_LINK_TEST :: STORE_RECEIVE_TLPS [15:15] */ +#define PCIE_DLL_DATA_LINK_TEST_STORE_RECEIVE_TLPS_MASK 0x00008000 +#define PCIE_DLL_DATA_LINK_TEST_STORE_RECEIVE_TLPS_ALIGN 0 +#define PCIE_DLL_DATA_LINK_TEST_STORE_RECEIVE_TLPS_BITS 1 +#define PCIE_DLL_DATA_LINK_TEST_STORE_RECEIVE_TLPS_SHIFT 15 + +/* PCIE_DLL :: DATA_LINK_TEST :: DISABLE_TLPS [14:14] */ +#define PCIE_DLL_DATA_LINK_TEST_DISABLE_TLPS_MASK 0x00004000 +#define PCIE_DLL_DATA_LINK_TEST_DISABLE_TLPS_ALIGN 0 +#define PCIE_DLL_DATA_LINK_TEST_DISABLE_TLPS_BITS 1 +#define PCIE_DLL_DATA_LINK_TEST_DISABLE_TLPS_SHIFT 14 + +/* PCIE_DLL :: DATA_LINK_TEST :: DISABLE_DLLPS [13:13] */ +#define PCIE_DLL_DATA_LINK_TEST_DISABLE_DLLPS_MASK 0x00002000 +#define PCIE_DLL_DATA_LINK_TEST_DISABLE_DLLPS_ALIGN 0 +#define PCIE_DLL_DATA_LINK_TEST_DISABLE_DLLPS_BITS 1 +#define PCIE_DLL_DATA_LINK_TEST_DISABLE_DLLPS_SHIFT 13 + +/* PCIE_DLL :: DATA_LINK_TEST :: FORCE_PHY_LINK_UP [12:12] */ +#define PCIE_DLL_DATA_LINK_TEST_FORCE_PHY_LINK_UP_MASK 0x00001000 +#define PCIE_DLL_DATA_LINK_TEST_FORCE_PHY_LINK_UP_ALIGN 0 +#define PCIE_DLL_DATA_LINK_TEST_FORCE_PHY_LINK_UP_BITS 1 +#define PCIE_DLL_DATA_LINK_TEST_FORCE_PHY_LINK_UP_SHIFT 12 + +/* PCIE_DLL :: DATA_LINK_TEST :: BYPASS_FLOW_CONTROL [11:11] */ +#define PCIE_DLL_DATA_LINK_TEST_BYPASS_FLOW_CONTROL_MASK 0x00000800 +#define PCIE_DLL_DATA_LINK_TEST_BYPASS_FLOW_CONTROL_ALIGN 0 +#define PCIE_DLL_DATA_LINK_TEST_BYPASS_FLOW_CONTROL_BITS 1 +#define PCIE_DLL_DATA_LINK_TEST_BYPASS_FLOW_CONTROL_SHIFT 11 + +/* PCIE_DLL :: DATA_LINK_TEST :: ENABLE_RAM_CORE_CLOCK_MARGIN_TEST_MODE [10:10] */ +#define PCIE_DLL_DATA_LINK_TEST_ENABLE_RAM_CORE_CLOCK_MARGIN_TEST_MODE_MASK 0x00000400 +#define PCIE_DLL_DATA_LINK_TEST_ENABLE_RAM_CORE_CLOCK_MARGIN_TEST_MODE_ALIGN 0 +#define PCIE_DLL_DATA_LINK_TEST_ENABLE_RAM_CORE_CLOCK_MARGIN_TEST_MODE_BITS 1 +#define PCIE_DLL_DATA_LINK_TEST_ENABLE_RAM_CORE_CLOCK_MARGIN_TEST_MODE_SHIFT 10 + +/* PCIE_DLL :: DATA_LINK_TEST :: ENABLE_RAM_OVERSTRESS_TEST_MODE [09:09] */ +#define PCIE_DLL_DATA_LINK_TEST_ENABLE_RAM_OVERSTRESS_TEST_MODE_MASK 0x00000200 +#define PCIE_DLL_DATA_LINK_TEST_ENABLE_RAM_OVERSTRESS_TEST_MODE_ALIGN 0 +#define PCIE_DLL_DATA_LINK_TEST_ENABLE_RAM_OVERSTRESS_TEST_MODE_BITS 1 +#define PCIE_DLL_DATA_LINK_TEST_ENABLE_RAM_OVERSTRESS_TEST_MODE_SHIFT 9 + +/* PCIE_DLL :: DATA_LINK_TEST :: SPEED_UP_SLOW_CLOCK [08:08] */ +#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_SLOW_CLOCK_MASK 0x00000100 +#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_SLOW_CLOCK_ALIGN 0 +#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_SLOW_CLOCK_BITS 1 +#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_SLOW_CLOCK_SHIFT 8 + +/* PCIE_DLL :: DATA_LINK_TEST :: SPEED_UP_COMPLETION_TIMER [07:07] */ +#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_COMPLETION_TIMER_MASK 0x00000080 +#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_COMPLETION_TIMER_ALIGN 0 +#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_COMPLETION_TIMER_BITS 1 +#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_COMPLETION_TIMER_SHIFT 7 + +/* PCIE_DLL :: DATA_LINK_TEST :: SPEED_UP_REPLAY_TIMER [06:06] */ +#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_REPLAY_TIMER_MASK 0x00000040 +#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_REPLAY_TIMER_ALIGN 0 +#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_REPLAY_TIMER_BITS 1 +#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_REPLAY_TIMER_SHIFT 6 + +/* PCIE_DLL :: DATA_LINK_TEST :: SPEED_UP_ACK_LATENCY_TIMER [05:05] */ +#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_ACK_LATENCY_TIMER_MASK 0x00000020 +#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_ACK_LATENCY_TIMER_ALIGN 0 +#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_ACK_LATENCY_TIMER_BITS 1 +#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_ACK_LATENCY_TIMER_SHIFT 5 + +/* PCIE_DLL :: DATA_LINK_TEST :: SPEED_UP_PME_SERVICE_TIMER [04:04] */ +#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_PME_SERVICE_TIMER_MASK 0x00000010 +#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_PME_SERVICE_TIMER_ALIGN 0 +#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_PME_SERVICE_TIMER_BITS 1 +#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_PME_SERVICE_TIMER_SHIFT 4 + +/* PCIE_DLL :: DATA_LINK_TEST :: FORCE_PURGE [03:03] */ +#define PCIE_DLL_DATA_LINK_TEST_FORCE_PURGE_MASK 0x00000008 +#define PCIE_DLL_DATA_LINK_TEST_FORCE_PURGE_ALIGN 0 +#define PCIE_DLL_DATA_LINK_TEST_FORCE_PURGE_BITS 1 +#define PCIE_DLL_DATA_LINK_TEST_FORCE_PURGE_SHIFT 3 + +/* PCIE_DLL :: DATA_LINK_TEST :: FORCE_RETRY [02:02] */ +#define PCIE_DLL_DATA_LINK_TEST_FORCE_RETRY_MASK 0x00000004 +#define PCIE_DLL_DATA_LINK_TEST_FORCE_RETRY_ALIGN 0 +#define PCIE_DLL_DATA_LINK_TEST_FORCE_RETRY_BITS 1 +#define PCIE_DLL_DATA_LINK_TEST_FORCE_RETRY_SHIFT 2 + +/* PCIE_DLL :: DATA_LINK_TEST :: INVERT_CRC [01:01] */ +#define PCIE_DLL_DATA_LINK_TEST_INVERT_CRC_MASK 0x00000002 +#define PCIE_DLL_DATA_LINK_TEST_INVERT_CRC_ALIGN 0 +#define PCIE_DLL_DATA_LINK_TEST_INVERT_CRC_BITS 1 +#define PCIE_DLL_DATA_LINK_TEST_INVERT_CRC_SHIFT 1 + +/* PCIE_DLL :: DATA_LINK_TEST :: SEND_BAD_CRC_BIT [00:00] */ +#define PCIE_DLL_DATA_LINK_TEST_SEND_BAD_CRC_BIT_MASK 0x00000001 +#define PCIE_DLL_DATA_LINK_TEST_SEND_BAD_CRC_BIT_ALIGN 0 +#define PCIE_DLL_DATA_LINK_TEST_SEND_BAD_CRC_BIT_BITS 1 +#define PCIE_DLL_DATA_LINK_TEST_SEND_BAD_CRC_BIT_SHIFT 0 + + +/**************************************************************************** + * PCIE_DLL :: PACKET_BIST + ***************************************************************************/ +/* PCIE_DLL :: PACKET_BIST :: RESERVED_0 [31:24] */ +#define PCIE_DLL_PACKET_BIST_RESERVED_0_MASK 0xff000000 +#define PCIE_DLL_PACKET_BIST_RESERVED_0_ALIGN 0 +#define PCIE_DLL_PACKET_BIST_RESERVED_0_BITS 8 +#define PCIE_DLL_PACKET_BIST_RESERVED_0_SHIFT 24 + +/* PCIE_DLL :: PACKET_BIST :: PACKET_CHECKER_LOCKED [23:23] */ +#define PCIE_DLL_PACKET_BIST_PACKET_CHECKER_LOCKED_MASK 0x00800000 +#define PCIE_DLL_PACKET_BIST_PACKET_CHECKER_LOCKED_ALIGN 0 +#define PCIE_DLL_PACKET_BIST_PACKET_CHECKER_LOCKED_BITS 1 +#define PCIE_DLL_PACKET_BIST_PACKET_CHECKER_LOCKED_SHIFT 23 + +/* PCIE_DLL :: PACKET_BIST :: RECEIVE_MISMATCH [22:22] */ +#define PCIE_DLL_PACKET_BIST_RECEIVE_MISMATCH_MASK 0x00400000 +#define PCIE_DLL_PACKET_BIST_RECEIVE_MISMATCH_ALIGN 0 +#define PCIE_DLL_PACKET_BIST_RECEIVE_MISMATCH_BITS 1 +#define PCIE_DLL_PACKET_BIST_RECEIVE_MISMATCH_SHIFT 22 + +/* PCIE_DLL :: PACKET_BIST :: ENABLE_RANDOM_TLP_LENGTH [21:21] */ +#define PCIE_DLL_PACKET_BIST_ENABLE_RANDOM_TLP_LENGTH_MASK 0x00200000 +#define PCIE_DLL_PACKET_BIST_ENABLE_RANDOM_TLP_LENGTH_ALIGN 0 +#define PCIE_DLL_PACKET_BIST_ENABLE_RANDOM_TLP_LENGTH_BITS 1 +#define PCIE_DLL_PACKET_BIST_ENABLE_RANDOM_TLP_LENGTH_SHIFT 21 + +/* PCIE_DLL :: PACKET_BIST :: TLP_LENGTH [20:10] */ +#define PCIE_DLL_PACKET_BIST_TLP_LENGTH_MASK 0x001ffc00 +#define PCIE_DLL_PACKET_BIST_TLP_LENGTH_ALIGN 0 +#define PCIE_DLL_PACKET_BIST_TLP_LENGTH_BITS 11 +#define PCIE_DLL_PACKET_BIST_TLP_LENGTH_SHIFT 10 + +/* PCIE_DLL :: PACKET_BIST :: ENABLE_RANDOM_IPG_LENGTH [09:09] */ +#define PCIE_DLL_PACKET_BIST_ENABLE_RANDOM_IPG_LENGTH_MASK 0x00000200 +#define PCIE_DLL_PACKET_BIST_ENABLE_RANDOM_IPG_LENGTH_ALIGN 0 +#define PCIE_DLL_PACKET_BIST_ENABLE_RANDOM_IPG_LENGTH_BITS 1 +#define PCIE_DLL_PACKET_BIST_ENABLE_RANDOM_IPG_LENGTH_SHIFT 9 + +/* PCIE_DLL :: PACKET_BIST :: IPG_LENGTH [08:02] */ +#define PCIE_DLL_PACKET_BIST_IPG_LENGTH_MASK 0x000001fc +#define PCIE_DLL_PACKET_BIST_IPG_LENGTH_ALIGN 0 +#define PCIE_DLL_PACKET_BIST_IPG_LENGTH_BITS 7 +#define PCIE_DLL_PACKET_BIST_IPG_LENGTH_SHIFT 2 + +/* PCIE_DLL :: PACKET_BIST :: TRANSMIT_START [01:01] */ +#define PCIE_DLL_PACKET_BIST_TRANSMIT_START_MASK 0x00000002 +#define PCIE_DLL_PACKET_BIST_TRANSMIT_START_ALIGN 0 +#define PCIE_DLL_PACKET_BIST_TRANSMIT_START_BITS 1 +#define PCIE_DLL_PACKET_BIST_TRANSMIT_START_SHIFT 1 + +/* PCIE_DLL :: PACKET_BIST :: ENABLE_PACKET_GENERATOR_TEST_MODE [00:00] */ +#define PCIE_DLL_PACKET_BIST_ENABLE_PACKET_GENERATOR_TEST_MODE_MASK 0x00000001 +#define PCIE_DLL_PACKET_BIST_ENABLE_PACKET_GENERATOR_TEST_MODE_ALIGN 0 +#define PCIE_DLL_PACKET_BIST_ENABLE_PACKET_GENERATOR_TEST_MODE_BITS 1 +#define PCIE_DLL_PACKET_BIST_ENABLE_PACKET_GENERATOR_TEST_MODE_SHIFT 0 + + +/**************************************************************************** + * PCIE_DLL :: LINK_PCIE_1_1_CONTROL + ***************************************************************************/ +/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: RTBF_CT_2_0 [31:29] */ +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_RTBF_CT_2_0_MASK 0xe0000000 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_RTBF_CT_2_0_ALIGN 0 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_RTBF_CT_2_0_BITS 3 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_RTBF_CT_2_0_SHIFT 29 + +/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: RTBF_SAM_1_0 [28:27] */ +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_RTBF_SAM_1_0_MASK 0x18000000 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_RTBF_SAM_1_0_ALIGN 0 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_RTBF_SAM_1_0_BITS 2 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_RTBF_SAM_1_0_SHIFT 27 + +/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: UNUSED_0 [26:10] */ +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_UNUSED_0_MASK 0x07fffc00 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_UNUSED_0_ALIGN 0 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_UNUSED_0_BITS 17 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_UNUSED_0_SHIFT 10 + +/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: SELOCALXTAL [09:09] */ +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_SELOCALXTAL_MASK 0x00000200 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_SELOCALXTAL_ALIGN 0 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_SELOCALXTAL_BITS 1 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_SELOCALXTAL_SHIFT 9 + +/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: L2_PLL_POWERDOWN_DISABLE [08:08] */ +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L2_PLL_POWERDOWN_DISABLE_MASK 0x00000100 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L2_PLL_POWERDOWN_DISABLE_ALIGN 0 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L2_PLL_POWERDOWN_DISABLE_BITS 1 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L2_PLL_POWERDOWN_DISABLE_SHIFT 8 + +/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: L1_PLL_POWERDOWN_DISABLE [07:07] */ +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_PLL_POWERDOWN_DISABLE_MASK 0x00000080 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_PLL_POWERDOWN_DISABLE_ALIGN 0 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_PLL_POWERDOWN_DISABLE_BITS 1 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_PLL_POWERDOWN_DISABLE_SHIFT 7 + +/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: L2_D3PM_CLKREQ_DISABLE [06:06] */ +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L2_D3PM_CLKREQ_DISABLE_MASK 0x00000040 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L2_D3PM_CLKREQ_DISABLE_ALIGN 0 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L2_D3PM_CLKREQ_DISABLE_BITS 1 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L2_D3PM_CLKREQ_DISABLE_SHIFT 6 + +/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: L1_D3PM_CLKREQ_DISABLE [05:05] */ +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_D3PM_CLKREQ_DISABLE_MASK 0x00000020 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_D3PM_CLKREQ_DISABLE_ALIGN 0 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_D3PM_CLKREQ_DISABLE_BITS 1 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_D3PM_CLKREQ_DISABLE_SHIFT 5 + +/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: L1_ASPM_CLKREQ_DISABLE [04:04] */ +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_ASPM_CLKREQ_DISABLE_MASK 0x00000010 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_ASPM_CLKREQ_DISABLE_ALIGN 0 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_ASPM_CLKREQ_DISABLE_BITS 1 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_ASPM_CLKREQ_DISABLE_SHIFT 4 + +/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: L1_PLL_PD_W_O_CLKREQ [03:03] */ +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_PLL_PD_W_O_CLKREQ_MASK 0x00000008 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_PLL_PD_W_O_CLKREQ_ALIGN 0 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_PLL_PD_W_O_CLKREQ_BITS 1 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_PLL_PD_W_O_CLKREQ_SHIFT 3 + +/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: DASPM10USTIMER [02:02] */ +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DASPM10USTIMER_MASK 0x00000004 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DASPM10USTIMER_ALIGN 0 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DASPM10USTIMER_BITS 1 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DASPM10USTIMER_SHIFT 2 + +/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: DFFU_EL1 [01:01] */ +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DFFU_EL1_MASK 0x00000002 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DFFU_EL1_ALIGN 0 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DFFU_EL1_BITS 1 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DFFU_EL1_SHIFT 1 + +/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: DFLOWCTLUPDATE1_1 [00:00] */ +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DFLOWCTLUPDATE1_1_MASK 0x00000001 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DFLOWCTLUPDATE1_1_ALIGN 0 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DFLOWCTLUPDATE1_1_BITS 1 +#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DFLOWCTLUPDATE1_1_SHIFT 0 + + +/**************************************************************************** + * BCM70012_TGT_TOP_PCIE_PHY + ***************************************************************************/ +/**************************************************************************** + * PCIE_PHY :: PHY_MODE + ***************************************************************************/ +/* PCIE_PHY :: PHY_MODE :: RESERVED_0 [31:04] */ +#define PCIE_PHY_PHY_MODE_RESERVED_0_MASK 0xfffffff0 +#define PCIE_PHY_PHY_MODE_RESERVED_0_ALIGN 0 +#define PCIE_PHY_PHY_MODE_RESERVED_0_BITS 28 +#define PCIE_PHY_PHY_MODE_RESERVED_0_SHIFT 4 + +/* PCIE_PHY :: PHY_MODE :: UPSTREAM_DEV [03:03] */ +#define PCIE_PHY_PHY_MODE_UPSTREAM_DEV_MASK 0x00000008 +#define PCIE_PHY_PHY_MODE_UPSTREAM_DEV_ALIGN 0 +#define PCIE_PHY_PHY_MODE_UPSTREAM_DEV_BITS 1 +#define PCIE_PHY_PHY_MODE_UPSTREAM_DEV_SHIFT 3 + +/* PCIE_PHY :: PHY_MODE :: SERDES_SA_MODE [02:02] */ +#define PCIE_PHY_PHY_MODE_SERDES_SA_MODE_MASK 0x00000004 +#define PCIE_PHY_PHY_MODE_SERDES_SA_MODE_ALIGN 0 +#define PCIE_PHY_PHY_MODE_SERDES_SA_MODE_BITS 1 +#define PCIE_PHY_PHY_MODE_SERDES_SA_MODE_SHIFT 2 + +/* PCIE_PHY :: PHY_MODE :: LINK_DISABLE [01:01] */ +#define PCIE_PHY_PHY_MODE_LINK_DISABLE_MASK 0x00000002 +#define PCIE_PHY_PHY_MODE_LINK_DISABLE_ALIGN 0 +#define PCIE_PHY_PHY_MODE_LINK_DISABLE_BITS 1 +#define PCIE_PHY_PHY_MODE_LINK_DISABLE_SHIFT 1 + +/* PCIE_PHY :: PHY_MODE :: SOFT_RESET [00:00] */ +#define PCIE_PHY_PHY_MODE_SOFT_RESET_MASK 0x00000001 +#define PCIE_PHY_PHY_MODE_SOFT_RESET_ALIGN 0 +#define PCIE_PHY_PHY_MODE_SOFT_RESET_BITS 1 +#define PCIE_PHY_PHY_MODE_SOFT_RESET_SHIFT 0 + + +/**************************************************************************** + * PCIE_PHY :: PHY_LINK_STATUS + ***************************************************************************/ +/* PCIE_PHY :: PHY_LINK_STATUS :: RESERVED_0 [31:10] */ +#define PCIE_PHY_PHY_LINK_STATUS_RESERVED_0_MASK 0xfffffc00 +#define PCIE_PHY_PHY_LINK_STATUS_RESERVED_0_ALIGN 0 +#define PCIE_PHY_PHY_LINK_STATUS_RESERVED_0_BITS 22 +#define PCIE_PHY_PHY_LINK_STATUS_RESERVED_0_SHIFT 10 + +/* PCIE_PHY :: PHY_LINK_STATUS :: BUFFER_OVERRUN [09:09] */ +#define PCIE_PHY_PHY_LINK_STATUS_BUFFER_OVERRUN_MASK 0x00000200 +#define PCIE_PHY_PHY_LINK_STATUS_BUFFER_OVERRUN_ALIGN 0 +#define PCIE_PHY_PHY_LINK_STATUS_BUFFER_OVERRUN_BITS 1 +#define PCIE_PHY_PHY_LINK_STATUS_BUFFER_OVERRUN_SHIFT 9 + +/* PCIE_PHY :: PHY_LINK_STATUS :: BUFFER_UNDERRUN [08:08] */ +#define PCIE_PHY_PHY_LINK_STATUS_BUFFER_UNDERRUN_MASK 0x00000100 +#define PCIE_PHY_PHY_LINK_STATUS_BUFFER_UNDERRUN_ALIGN 0 +#define PCIE_PHY_PHY_LINK_STATUS_BUFFER_UNDERRUN_BITS 1 +#define PCIE_PHY_PHY_LINK_STATUS_BUFFER_UNDERRUN_SHIFT 8 + +/* PCIE_PHY :: PHY_LINK_STATUS :: LINK_PARTNER_REQUEST_LOOPBACK [07:07] */ +#define PCIE_PHY_PHY_LINK_STATUS_LINK_PARTNER_REQUEST_LOOPBACK_MASK 0x00000080 +#define PCIE_PHY_PHY_LINK_STATUS_LINK_PARTNER_REQUEST_LOOPBACK_ALIGN 0 +#define PCIE_PHY_PHY_LINK_STATUS_LINK_PARTNER_REQUEST_LOOPBACK_BITS 1 +#define PCIE_PHY_PHY_LINK_STATUS_LINK_PARTNER_REQUEST_LOOPBACK_SHIFT 7 + +/* PCIE_PHY :: PHY_LINK_STATUS :: LINK_PARTNER_DISABLE_SCRAMBLER [06:06] */ +#define PCIE_PHY_PHY_LINK_STATUS_LINK_PARTNER_DISABLE_SCRAMBLER_MASK 0x00000040 +#define PCIE_PHY_PHY_LINK_STATUS_LINK_PARTNER_DISABLE_SCRAMBLER_ALIGN 0 +#define PCIE_PHY_PHY_LINK_STATUS_LINK_PARTNER_DISABLE_SCRAMBLER_BITS 1 +#define PCIE_PHY_PHY_LINK_STATUS_LINK_PARTNER_DISABLE_SCRAMBLER_SHIFT 6 + +/* PCIE_PHY :: PHY_LINK_STATUS :: EXTENDED_SYNCH [05:05] */ +#define PCIE_PHY_PHY_LINK_STATUS_EXTENDED_SYNCH_MASK 0x00000020 +#define PCIE_PHY_PHY_LINK_STATUS_EXTENDED_SYNCH_ALIGN 0 +#define PCIE_PHY_PHY_LINK_STATUS_EXTENDED_SYNCH_BITS 1 +#define PCIE_PHY_PHY_LINK_STATUS_EXTENDED_SYNCH_SHIFT 5 + +/* PCIE_PHY :: PHY_LINK_STATUS :: POLARITY_INVERTED [04:04] */ +#define PCIE_PHY_PHY_LINK_STATUS_POLARITY_INVERTED_MASK 0x00000010 +#define PCIE_PHY_PHY_LINK_STATUS_POLARITY_INVERTED_ALIGN 0 +#define PCIE_PHY_PHY_LINK_STATUS_POLARITY_INVERTED_BITS 1 +#define PCIE_PHY_PHY_LINK_STATUS_POLARITY_INVERTED_SHIFT 4 + +/* PCIE_PHY :: PHY_LINK_STATUS :: LINK_UP [03:03] */ +#define PCIE_PHY_PHY_LINK_STATUS_LINK_UP_MASK 0x00000008 +#define PCIE_PHY_PHY_LINK_STATUS_LINK_UP_ALIGN 0 +#define PCIE_PHY_PHY_LINK_STATUS_LINK_UP_BITS 1 +#define PCIE_PHY_PHY_LINK_STATUS_LINK_UP_SHIFT 3 + +/* PCIE_PHY :: PHY_LINK_STATUS :: LINK_TRAINING [02:02] */ +#define PCIE_PHY_PHY_LINK_STATUS_LINK_TRAINING_MASK 0x00000004 +#define PCIE_PHY_PHY_LINK_STATUS_LINK_TRAINING_ALIGN 0 +#define PCIE_PHY_PHY_LINK_STATUS_LINK_TRAINING_BITS 1 +#define PCIE_PHY_PHY_LINK_STATUS_LINK_TRAINING_SHIFT 2 + +/* PCIE_PHY :: PHY_LINK_STATUS :: RECEIVE_DATA_VALID [01:01] */ +#define PCIE_PHY_PHY_LINK_STATUS_RECEIVE_DATA_VALID_MASK 0x00000002 +#define PCIE_PHY_PHY_LINK_STATUS_RECEIVE_DATA_VALID_ALIGN 0 +#define PCIE_PHY_PHY_LINK_STATUS_RECEIVE_DATA_VALID_BITS 1 +#define PCIE_PHY_PHY_LINK_STATUS_RECEIVE_DATA_VALID_SHIFT 1 + +/* PCIE_PHY :: PHY_LINK_STATUS :: RESERVED_1 [00:00] */ +#define PCIE_PHY_PHY_LINK_STATUS_RESERVED_1_MASK 0x00000001 +#define PCIE_PHY_PHY_LINK_STATUS_RESERVED_1_ALIGN 0 +#define PCIE_PHY_PHY_LINK_STATUS_RESERVED_1_BITS 1 +#define PCIE_PHY_PHY_LINK_STATUS_RESERVED_1_SHIFT 0 + + +/**************************************************************************** + * PCIE_PHY :: PHY_LINK_LTSSM_CONTROL + ***************************************************************************/ +/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: RESERVED_0 [31:08] */ +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RESERVED_0_MASK 0xffffff00 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RESERVED_0_ALIGN 0 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RESERVED_0_BITS 24 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RESERVED_0_SHIFT 8 + +/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: DISABLESCRAMBLE [07:07] */ +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DISABLESCRAMBLE_MASK 0x00000080 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DISABLESCRAMBLE_ALIGN 0 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DISABLESCRAMBLE_BITS 1 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DISABLESCRAMBLE_SHIFT 7 + +/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: DETECTSTATE [06:06] */ +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DETECTSTATE_MASK 0x00000040 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DETECTSTATE_ALIGN 0 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DETECTSTATE_BITS 1 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DETECTSTATE_SHIFT 6 + +/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: POLLINGSTATE [05:05] */ +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_POLLINGSTATE_MASK 0x00000020 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_POLLINGSTATE_ALIGN 0 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_POLLINGSTATE_BITS 1 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_POLLINGSTATE_SHIFT 5 + +/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: CONFIGSTATE [04:04] */ +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_CONFIGSTATE_MASK 0x00000010 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_CONFIGSTATE_ALIGN 0 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_CONFIGSTATE_BITS 1 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_CONFIGSTATE_SHIFT 4 + +/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: RECOVSTATE [03:03] */ +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RECOVSTATE_MASK 0x00000008 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RECOVSTATE_ALIGN 0 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RECOVSTATE_BITS 1 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RECOVSTATE_SHIFT 3 + +/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: EXTLBSTATE [02:02] */ +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_EXTLBSTATE_MASK 0x00000004 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_EXTLBSTATE_ALIGN 0 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_EXTLBSTATE_BITS 1 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_EXTLBSTATE_SHIFT 2 + +/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: RESETSTATE [01:01] */ +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RESETSTATE_MASK 0x00000002 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RESETSTATE_ALIGN 0 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RESETSTATE_BITS 1 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RESETSTATE_SHIFT 1 + +/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: DISABLESTATE [00:00] */ +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DISABLESTATE_MASK 0x00000001 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DISABLESTATE_ALIGN 0 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DISABLESTATE_BITS 1 +#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DISABLESTATE_SHIFT 0 + + +/**************************************************************************** + * PCIE_PHY :: PHY_LINK_TRAINING_LINK_NUMBER + ***************************************************************************/ +/* PCIE_PHY :: PHY_LINK_TRAINING_LINK_NUMBER :: RESERVED_0 [31:08] */ +#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER_RESERVED_0_MASK 0xffffff00 +#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER_RESERVED_0_ALIGN 0 +#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER_RESERVED_0_BITS 24 +#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER_RESERVED_0_SHIFT 8 + +/* PCIE_PHY :: PHY_LINK_TRAINING_LINK_NUMBER :: LANE_NUMBER [07:00] */ +#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER_LANE_NUMBER_MASK 0x000000ff +#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER_LANE_NUMBER_ALIGN 0 +#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER_LANE_NUMBER_BITS 8 +#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER_LANE_NUMBER_SHIFT 0 + + +/**************************************************************************** + * PCIE_PHY :: PHY_LINK_TRAINING_LANE_NUMBER + ***************************************************************************/ +/* PCIE_PHY :: PHY_LINK_TRAINING_LANE_NUMBER :: RESERVED_0 [31:08] */ +#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER_RESERVED_0_MASK 0xffffff00 +#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER_RESERVED_0_ALIGN 0 +#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER_RESERVED_0_BITS 24 +#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER_RESERVED_0_SHIFT 8 + +/* PCIE_PHY :: PHY_LINK_TRAINING_LANE_NUMBER :: LANE_NUMBER [07:00] */ +#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER_LANE_NUMBER_MASK 0x000000ff +#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER_LANE_NUMBER_ALIGN 0 +#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER_LANE_NUMBER_BITS 8 +#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER_LANE_NUMBER_SHIFT 0 + + +/**************************************************************************** + * PCIE_PHY :: PHY_LINK_TRAINING_N_FTS + ***************************************************************************/ +/* PCIE_PHY :: PHY_LINK_TRAINING_N_FTS :: RESERVED_0 [31:25] */ +#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_RESERVED_0_MASK 0xfe000000 +#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_RESERVED_0_ALIGN 0 +#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_RESERVED_0_BITS 7 +#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_RESERVED_0_SHIFT 25 + +/* PCIE_PHY :: PHY_LINK_TRAINING_N_FTS :: TRANSMITTER_N_FTS_OVERRIDE [24:24] */ +#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_OVERRIDE_MASK 0x01000000 +#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_OVERRIDE_ALIGN 0 +#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_OVERRIDE_BITS 1 +#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_OVERRIDE_SHIFT 24 + +/* PCIE_PHY :: PHY_LINK_TRAINING_N_FTS :: TRANSMITTER_N_FTS_OVERRIDE_VALUE [23:16] */ +#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_OVERRIDE_VALUE_MASK 0x00ff0000 +#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_OVERRIDE_VALUE_ALIGN 0 +#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_OVERRIDE_VALUE_BITS 8 +#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_OVERRIDE_VALUE_SHIFT 16 + +/* PCIE_PHY :: PHY_LINK_TRAINING_N_FTS :: TRANSMITTER_N_FTS [15:08] */ +#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_MASK 0x0000ff00 +#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_ALIGN 0 +#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_BITS 8 +#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_SHIFT 8 + +/* PCIE_PHY :: PHY_LINK_TRAINING_N_FTS :: RECEIVER_N_FTS [07:00] */ +#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_RECEIVER_N_FTS_MASK 0x000000ff +#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_RECEIVER_N_FTS_ALIGN 0 +#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_RECEIVER_N_FTS_BITS 8 +#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_RECEIVER_N_FTS_SHIFT 0 + + +/**************************************************************************** + * PCIE_PHY :: PHY_ATTENTION + ***************************************************************************/ +/* PCIE_PHY :: PHY_ATTENTION :: RESERVED_0 [31:08] */ +#define PCIE_PHY_PHY_ATTENTION_RESERVED_0_MASK 0xffffff00 +#define PCIE_PHY_PHY_ATTENTION_RESERVED_0_ALIGN 0 +#define PCIE_PHY_PHY_ATTENTION_RESERVED_0_BITS 24 +#define PCIE_PHY_PHY_ATTENTION_RESERVED_0_SHIFT 8 + +/* PCIE_PHY :: PHY_ATTENTION :: HOT_RESET [07:07] */ +#define PCIE_PHY_PHY_ATTENTION_HOT_RESET_MASK 0x00000080 +#define PCIE_PHY_PHY_ATTENTION_HOT_RESET_ALIGN 0 +#define PCIE_PHY_PHY_ATTENTION_HOT_RESET_BITS 1 +#define PCIE_PHY_PHY_ATTENTION_HOT_RESET_SHIFT 7 + +/* PCIE_PHY :: PHY_ATTENTION :: LINK_DOWN [06:06] */ +#define PCIE_PHY_PHY_ATTENTION_LINK_DOWN_MASK 0x00000040 +#define PCIE_PHY_PHY_ATTENTION_LINK_DOWN_ALIGN 0 +#define PCIE_PHY_PHY_ATTENTION_LINK_DOWN_BITS 1 +#define PCIE_PHY_PHY_ATTENTION_LINK_DOWN_SHIFT 6 + +/* PCIE_PHY :: PHY_ATTENTION :: TRAINING_ERROR [05:05] */ +#define PCIE_PHY_PHY_ATTENTION_TRAINING_ERROR_MASK 0x00000020 +#define PCIE_PHY_PHY_ATTENTION_TRAINING_ERROR_ALIGN 0 +#define PCIE_PHY_PHY_ATTENTION_TRAINING_ERROR_BITS 1 +#define PCIE_PHY_PHY_ATTENTION_TRAINING_ERROR_SHIFT 5 + +/* PCIE_PHY :: PHY_ATTENTION :: BUFFER_OVERRUN [04:04] */ +#define PCIE_PHY_PHY_ATTENTION_BUFFER_OVERRUN_MASK 0x00000010 +#define PCIE_PHY_PHY_ATTENTION_BUFFER_OVERRUN_ALIGN 0 +#define PCIE_PHY_PHY_ATTENTION_BUFFER_OVERRUN_BITS 1 +#define PCIE_PHY_PHY_ATTENTION_BUFFER_OVERRUN_SHIFT 4 + +/* PCIE_PHY :: PHY_ATTENTION :: BUFFER_UNDERRUN [03:03] */ +#define PCIE_PHY_PHY_ATTENTION_BUFFER_UNDERRUN_MASK 0x00000008 +#define PCIE_PHY_PHY_ATTENTION_BUFFER_UNDERRUN_ALIGN 0 +#define PCIE_PHY_PHY_ATTENTION_BUFFER_UNDERRUN_BITS 1 +#define PCIE_PHY_PHY_ATTENTION_BUFFER_UNDERRUN_SHIFT 3 + +/* PCIE_PHY :: PHY_ATTENTION :: RECEIVE_FRAMING_ERROR [02:02] */ +#define PCIE_PHY_PHY_ATTENTION_RECEIVE_FRAMING_ERROR_MASK 0x00000004 +#define PCIE_PHY_PHY_ATTENTION_RECEIVE_FRAMING_ERROR_ALIGN 0 +#define PCIE_PHY_PHY_ATTENTION_RECEIVE_FRAMING_ERROR_BITS 1 +#define PCIE_PHY_PHY_ATTENTION_RECEIVE_FRAMING_ERROR_SHIFT 2 + +/* PCIE_PHY :: PHY_ATTENTION :: RECEIVE_DISPARITY_ERROR [01:01] */ +#define PCIE_PHY_PHY_ATTENTION_RECEIVE_DISPARITY_ERROR_MASK 0x00000002 +#define PCIE_PHY_PHY_ATTENTION_RECEIVE_DISPARITY_ERROR_ALIGN 0 +#define PCIE_PHY_PHY_ATTENTION_RECEIVE_DISPARITY_ERROR_BITS 1 +#define PCIE_PHY_PHY_ATTENTION_RECEIVE_DISPARITY_ERROR_SHIFT 1 + +/* PCIE_PHY :: PHY_ATTENTION :: RECEIVE_CODE_ERROR [00:00] */ +#define PCIE_PHY_PHY_ATTENTION_RECEIVE_CODE_ERROR_MASK 0x00000001 +#define PCIE_PHY_PHY_ATTENTION_RECEIVE_CODE_ERROR_ALIGN 0 +#define PCIE_PHY_PHY_ATTENTION_RECEIVE_CODE_ERROR_BITS 1 +#define PCIE_PHY_PHY_ATTENTION_RECEIVE_CODE_ERROR_SHIFT 0 + + +/**************************************************************************** + * PCIE_PHY :: PHY_ATTENTION_MASK + ***************************************************************************/ +/* PCIE_PHY :: PHY_ATTENTION_MASK :: RESERVED_0 [31:08] */ +#define PCIE_PHY_PHY_ATTENTION_MASK_RESERVED_0_MASK 0xffffff00 +#define PCIE_PHY_PHY_ATTENTION_MASK_RESERVED_0_ALIGN 0 +#define PCIE_PHY_PHY_ATTENTION_MASK_RESERVED_0_BITS 24 +#define PCIE_PHY_PHY_ATTENTION_MASK_RESERVED_0_SHIFT 8 + +/* PCIE_PHY :: PHY_ATTENTION_MASK :: HOT_RESET_MASK [07:07] */ +#define PCIE_PHY_PHY_ATTENTION_MASK_HOT_RESET_MASK_MASK 0x00000080 +#define PCIE_PHY_PHY_ATTENTION_MASK_HOT_RESET_MASK_ALIGN 0 +#define PCIE_PHY_PHY_ATTENTION_MASK_HOT_RESET_MASK_BITS 1 +#define PCIE_PHY_PHY_ATTENTION_MASK_HOT_RESET_MASK_SHIFT 7 + +/* PCIE_PHY :: PHY_ATTENTION_MASK :: LINK_DOWN_MASK [06:06] */ +#define PCIE_PHY_PHY_ATTENTION_MASK_LINK_DOWN_MASK_MASK 0x00000040 +#define PCIE_PHY_PHY_ATTENTION_MASK_LINK_DOWN_MASK_ALIGN 0 +#define PCIE_PHY_PHY_ATTENTION_MASK_LINK_DOWN_MASK_BITS 1 +#define PCIE_PHY_PHY_ATTENTION_MASK_LINK_DOWN_MASK_SHIFT 6 + +/* PCIE_PHY :: PHY_ATTENTION_MASK :: TRAINING_ERROR_MASK [05:05] */ +#define PCIE_PHY_PHY_ATTENTION_MASK_TRAINING_ERROR_MASK_MASK 0x00000020 +#define PCIE_PHY_PHY_ATTENTION_MASK_TRAINING_ERROR_MASK_ALIGN 0 +#define PCIE_PHY_PHY_ATTENTION_MASK_TRAINING_ERROR_MASK_BITS 1 +#define PCIE_PHY_PHY_ATTENTION_MASK_TRAINING_ERROR_MASK_SHIFT 5 + +/* PCIE_PHY :: PHY_ATTENTION_MASK :: BUFFER_OVERRUN_MASK [04:04] */ +#define PCIE_PHY_PHY_ATTENTION_MASK_BUFFER_OVERRUN_MASK_MASK 0x00000010 +#define PCIE_PHY_PHY_ATTENTION_MASK_BUFFER_OVERRUN_MASK_ALIGN 0 +#define PCIE_PHY_PHY_ATTENTION_MASK_BUFFER_OVERRUN_MASK_BITS 1 +#define PCIE_PHY_PHY_ATTENTION_MASK_BUFFER_OVERRUN_MASK_SHIFT 4 + +/* PCIE_PHY :: PHY_ATTENTION_MASK :: BUFFER_UNDERRUN_MASK [03:03] */ +#define PCIE_PHY_PHY_ATTENTION_MASK_BUFFER_UNDERRUN_MASK_MASK 0x00000008 +#define PCIE_PHY_PHY_ATTENTION_MASK_BUFFER_UNDERRUN_MASK_ALIGN 0 +#define PCIE_PHY_PHY_ATTENTION_MASK_BUFFER_UNDERRUN_MASK_BITS 1 +#define PCIE_PHY_PHY_ATTENTION_MASK_BUFFER_UNDERRUN_MASK_SHIFT 3 + +/* PCIE_PHY :: PHY_ATTENTION_MASK :: RECEIVE_FRAME_ERROR_MASK [02:02] */ +#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_FRAME_ERROR_MASK_MASK 0x00000004 +#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_FRAME_ERROR_MASK_ALIGN 0 +#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_FRAME_ERROR_MASK_BITS 1 +#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_FRAME_ERROR_MASK_SHIFT 2 + +/* PCIE_PHY :: PHY_ATTENTION_MASK :: RECEIVE_DISPARITY_ERROR_MASK [01:01] */ +#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_DISPARITY_ERROR_MASK_MASK 0x00000002 +#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_DISPARITY_ERROR_MASK_ALIGN 0 +#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_DISPARITY_ERROR_MASK_BITS 1 +#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_DISPARITY_ERROR_MASK_SHIFT 1 + +/* PCIE_PHY :: PHY_ATTENTION_MASK :: RECEIVE_CODE_ERROR_MASK [00:00] */ +#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_CODE_ERROR_MASK_MASK 0x00000001 +#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_CODE_ERROR_MASK_ALIGN 0 +#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_CODE_ERROR_MASK_BITS 1 +#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_CODE_ERROR_MASK_SHIFT 0 + + +/**************************************************************************** + * PCIE_PHY :: PHY_RECEIVE_ERROR_COUNTER + ***************************************************************************/ +/* PCIE_PHY :: PHY_RECEIVE_ERROR_COUNTER :: DISPARITY_ERROR_COUNT [31:16] */ +#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER_DISPARITY_ERROR_COUNT_MASK 0xffff0000 +#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER_DISPARITY_ERROR_COUNT_ALIGN 0 +#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER_DISPARITY_ERROR_COUNT_BITS 16 +#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER_DISPARITY_ERROR_COUNT_SHIFT 16 + +/* PCIE_PHY :: PHY_RECEIVE_ERROR_COUNTER :: CODE_ERROR_COUNT [15:00] */ +#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER_CODE_ERROR_COUNT_MASK 0x0000ffff +#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER_CODE_ERROR_COUNT_ALIGN 0 +#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER_CODE_ERROR_COUNT_BITS 16 +#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER_CODE_ERROR_COUNT_SHIFT 0 + + +/**************************************************************************** + * PCIE_PHY :: PHY_RECEIVE_FRAMING_ERROR_COUNTER + ***************************************************************************/ +/* PCIE_PHY :: PHY_RECEIVE_FRAMING_ERROR_COUNTER :: RESERVED_0 [31:16] */ +#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER_RESERVED_0_MASK 0xffff0000 +#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER_RESERVED_0_ALIGN 0 +#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER_RESERVED_0_BITS 16 +#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER_RESERVED_0_SHIFT 16 + +/* PCIE_PHY :: PHY_RECEIVE_FRAMING_ERROR_COUNTER :: FRAMING_ERROR_COUNT [15:00] */ +#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER_FRAMING_ERROR_COUNT_MASK 0x0000ffff +#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER_FRAMING_ERROR_COUNT_ALIGN 0 +#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER_FRAMING_ERROR_COUNT_BITS 16 +#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER_FRAMING_ERROR_COUNT_SHIFT 0 + + +/**************************************************************************** + * PCIE_PHY :: PHY_RECEIVE_ERROR_THRESHOLD + ***************************************************************************/ +/* PCIE_PHY :: PHY_RECEIVE_ERROR_THRESHOLD :: RESERVED_0 [31:12] */ +#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_RESERVED_0_MASK 0xfffff000 +#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_RESERVED_0_ALIGN 0 +#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_RESERVED_0_BITS 20 +#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_RESERVED_0_SHIFT 12 + +/* PCIE_PHY :: PHY_RECEIVE_ERROR_THRESHOLD :: FRAME_ERROR_THRESHOLD [11:08] */ +#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_FRAME_ERROR_THRESHOLD_MASK 0x00000f00 +#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_FRAME_ERROR_THRESHOLD_ALIGN 0 +#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_FRAME_ERROR_THRESHOLD_BITS 4 +#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_FRAME_ERROR_THRESHOLD_SHIFT 8 + +/* PCIE_PHY :: PHY_RECEIVE_ERROR_THRESHOLD :: DISPARITY_ERROR_THRESHOLD [07:04] */ +#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_DISPARITY_ERROR_THRESHOLD_MASK 0x000000f0 +#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_DISPARITY_ERROR_THRESHOLD_ALIGN 0 +#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_DISPARITY_ERROR_THRESHOLD_BITS 4 +#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_DISPARITY_ERROR_THRESHOLD_SHIFT 4 + +/* PCIE_PHY :: PHY_RECEIVE_ERROR_THRESHOLD :: CODE_ERROR_THRESHOLD [03:00] */ +#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_CODE_ERROR_THRESHOLD_MASK 0x0000000f +#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_CODE_ERROR_THRESHOLD_ALIGN 0 +#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_CODE_ERROR_THRESHOLD_BITS 4 +#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_CODE_ERROR_THRESHOLD_SHIFT 0 + + +/**************************************************************************** + * PCIE_PHY :: PHY_TEST_CONTROL + ***************************************************************************/ +/* PCIE_PHY :: PHY_TEST_CONTROL :: UNUSED_0 [31:31] */ +#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_0_MASK 0x80000000 +#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_0_ALIGN 0 +#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_0_BITS 1 +#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_0_SHIFT 31 + +/* PCIE_PHY :: PHY_TEST_CONTROL :: DELAY_HOTRESET_ENABLE [30:30] */ +#define PCIE_PHY_PHY_TEST_CONTROL_DELAY_HOTRESET_ENABLE_MASK 0x40000000 +#define PCIE_PHY_PHY_TEST_CONTROL_DELAY_HOTRESET_ENABLE_ALIGN 0 +#define PCIE_PHY_PHY_TEST_CONTROL_DELAY_HOTRESET_ENABLE_BITS 1 +#define PCIE_PHY_PHY_TEST_CONTROL_DELAY_HOTRESET_ENABLE_SHIFT 30 + +/* PCIE_PHY :: PHY_TEST_CONTROL :: CQ27039_TSX_MAJORITY_CHECK [29:29] */ +#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_TSX_MAJORITY_CHECK_MASK 0x20000000 +#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_TSX_MAJORITY_CHECK_ALIGN 0 +#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_TSX_MAJORITY_CHECK_BITS 1 +#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_TSX_MAJORITY_CHECK_SHIFT 29 + +/* PCIE_PHY :: PHY_TEST_CONTROL :: CQ27039_MASK_OFF_BOGUS [28:28] */ +#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_MASK_OFF_BOGUS_MASK 0x10000000 +#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_MASK_OFF_BOGUS_ALIGN 0 +#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_MASK_OFF_BOGUS_BITS 1 +#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_MASK_OFF_BOGUS_SHIFT 28 + +/* PCIE_PHY :: PHY_TEST_CONTROL :: CQ27039_POLARITY_CHECK [27:27] */ +#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_POLARITY_CHECK_MASK 0x08000000 +#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_POLARITY_CHECK_ALIGN 0 +#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_POLARITY_CHECK_BITS 1 +#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_POLARITY_CHECK_SHIFT 27 + +/* PCIE_PHY :: PHY_TEST_CONTROL :: CQ27039_STICKY_POLARITY_CHECK [26:26] */ +#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_STICKY_POLARITY_CHECK_MASK 0x04000000 +#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_STICKY_POLARITY_CHECK_ALIGN 0 +#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_STICKY_POLARITY_CHECK_BITS 1 +#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_STICKY_POLARITY_CHECK_SHIFT 26 + +/* PCIE_PHY :: PHY_TEST_CONTROL :: UNUSED_1 [25:23] */ +#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_1_MASK 0x03800000 +#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_1_ALIGN 0 +#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_1_BITS 3 +#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_1_SHIFT 23 + +/* PCIE_PHY :: PHY_TEST_CONTROL :: TWO_OS_RULE_RELAXING [22:22] */ +#define PCIE_PHY_PHY_TEST_CONTROL_TWO_OS_RULE_RELAXING_MASK 0x00400000 +#define PCIE_PHY_PHY_TEST_CONTROL_TWO_OS_RULE_RELAXING_ALIGN 0 +#define PCIE_PHY_PHY_TEST_CONTROL_TWO_OS_RULE_RELAXING_BITS 1 +#define PCIE_PHY_PHY_TEST_CONTROL_TWO_OS_RULE_RELAXING_SHIFT 22 + +/* PCIE_PHY :: PHY_TEST_CONTROL :: DISABLE_HOT_RESET [21:21] */ +#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_HOT_RESET_MASK 0x00200000 +#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_HOT_RESET_ALIGN 0 +#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_HOT_RESET_BITS 1 +#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_HOT_RESET_SHIFT 21 + +/* PCIE_PHY :: PHY_TEST_CONTROL :: DISABLE_LINK_DOWN_RESET [20:20] */ +#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_LINK_DOWN_RESET_MASK 0x00100000 +#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_LINK_DOWN_RESET_ALIGN 0 +#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_LINK_DOWN_RESET_BITS 1 +#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_LINK_DOWN_RESET_SHIFT 20 + +/* PCIE_PHY :: PHY_TEST_CONTROL :: DISABLE_EIDLE_SET_TRANSMITTING_AT_TIME_OUT_TO_DETECT_STATE [19:19] */ +#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_EIDLE_SET_TRANSMITTING_AT_TIME_OUT_TO_DETECT_STATE_MASK 0x00080000 +#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_EIDLE_SET_TRANSMITTING_AT_TIME_OUT_TO_DETECT_STATE_ALIGN 0 +#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_EIDLE_SET_TRANSMITTING_AT_TIME_OUT_TO_DETECT_STATE_BITS 1 +#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_EIDLE_SET_TRANSMITTING_AT_TIME_OUT_TO_DETECT_STATE_SHIFT 19 + +/* PCIE_PHY :: PHY_TEST_CONTROL :: DISABLE_ERROR_EXIT [18:18] */ +#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_EXIT_MASK 0x00040000 +#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_EXIT_ALIGN 0 +#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_EXIT_BITS 1 +#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_EXIT_SHIFT 18 + +/* PCIE_PHY :: PHY_TEST_CONTROL :: DISABLE_ERROR_MASK [17:17] */ +#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_MASK_MASK 0x00020000 +#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_MASK_ALIGN 0 +#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_MASK_BITS 1 +#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_MASK_SHIFT 17 + +/* PCIE_PHY :: PHY_TEST_CONTROL :: DISABLE_ERROR_RECOVERY [16:16] */ +#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_RECOVERY_MASK 0x00010000 +#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_RECOVERY_ALIGN 0 +#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_RECOVERY_BITS 1 +#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_RECOVERY_SHIFT 16 + +/* PCIE_PHY :: PHY_TEST_CONTROL :: RESERVED_0 [15:08] */ +#define PCIE_PHY_PHY_TEST_CONTROL_RESERVED_0_MASK 0x0000ff00 +#define PCIE_PHY_PHY_TEST_CONTROL_RESERVED_0_ALIGN 0 +#define PCIE_PHY_PHY_TEST_CONTROL_RESERVED_0_BITS 8 +#define PCIE_PHY_PHY_TEST_CONTROL_RESERVED_0_SHIFT 8 + +/* PCIE_PHY :: PHY_TEST_CONTROL :: UNUSED_2 [07:04] */ +#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_2_MASK 0x000000f0 +#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_2_ALIGN 0 +#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_2_BITS 4 +#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_2_SHIFT 4 + +/* PCIE_PHY :: PHY_TEST_CONTROL :: CQ22100_FIX_DISABLE [03:03] */ +#define PCIE_PHY_PHY_TEST_CONTROL_CQ22100_FIX_DISABLE_MASK 0x00000008 +#define PCIE_PHY_PHY_TEST_CONTROL_CQ22100_FIX_DISABLE_ALIGN 0 +#define PCIE_PHY_PHY_TEST_CONTROL_CQ22100_FIX_DISABLE_BITS 1 +#define PCIE_PHY_PHY_TEST_CONTROL_CQ22100_FIX_DISABLE_SHIFT 3 + +/* PCIE_PHY :: PHY_TEST_CONTROL :: TRAINING_BYPASS [02:02] */ +#define PCIE_PHY_PHY_TEST_CONTROL_TRAINING_BYPASS_MASK 0x00000004 +#define PCIE_PHY_PHY_TEST_CONTROL_TRAINING_BYPASS_ALIGN 0 +#define PCIE_PHY_PHY_TEST_CONTROL_TRAINING_BYPASS_BITS 1 +#define PCIE_PHY_PHY_TEST_CONTROL_TRAINING_BYPASS_SHIFT 2 + +/* PCIE_PHY :: PHY_TEST_CONTROL :: EXTERNAL_LOOPBACK [01:01] */ +#define PCIE_PHY_PHY_TEST_CONTROL_EXTERNAL_LOOPBACK_MASK 0x00000002 +#define PCIE_PHY_PHY_TEST_CONTROL_EXTERNAL_LOOPBACK_ALIGN 0 +#define PCIE_PHY_PHY_TEST_CONTROL_EXTERNAL_LOOPBACK_BITS 1 +#define PCIE_PHY_PHY_TEST_CONTROL_EXTERNAL_LOOPBACK_SHIFT 1 + +/* PCIE_PHY :: PHY_TEST_CONTROL :: INTERNAL_LOOPBACK [00:00] */ +#define PCIE_PHY_PHY_TEST_CONTROL_INTERNAL_LOOPBACK_MASK 0x00000001 +#define PCIE_PHY_PHY_TEST_CONTROL_INTERNAL_LOOPBACK_ALIGN 0 +#define PCIE_PHY_PHY_TEST_CONTROL_INTERNAL_LOOPBACK_BITS 1 +#define PCIE_PHY_PHY_TEST_CONTROL_INTERNAL_LOOPBACK_SHIFT 0 + + +/**************************************************************************** + * PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE + ***************************************************************************/ +/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: RESERVED_0 [31:18] */ +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RESERVED_0_MASK 0xfffc0000 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RESERVED_0_ALIGN 0 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RESERVED_0_BITS 14 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RESERVED_0_SHIFT 18 + +/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: OBSVELECIDLEVALUE [17:17] */ +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_OBSVELECIDLEVALUE_MASK 0x00020000 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_OBSVELECIDLEVALUE_ALIGN 0 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_OBSVELECIDLEVALUE_BITS 1 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_OBSVELECIDLEVALUE_SHIFT 17 + +/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: OBSVELECIDLEOVERRIDE [16:16] */ +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_OBSVELECIDLEOVERRIDE_MASK 0x00010000 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_OBSVELECIDLEOVERRIDE_ALIGN 0 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_OBSVELECIDLEOVERRIDE_BITS 1 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_OBSVELECIDLEOVERRIDE_SHIFT 16 + +/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: PLLISUPVALUE [15:15] */ +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_PLLISUPVALUE_MASK 0x00008000 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_PLLISUPVALUE_ALIGN 0 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_PLLISUPVALUE_BITS 1 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_PLLISUPVALUE_SHIFT 15 + +/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: PLLISUPOVERRIDE [14:14] */ +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_PLLISUPOVERRIDE_MASK 0x00004000 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_PLLISUPOVERRIDE_ALIGN 0 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_PLLISUPOVERRIDE_BITS 1 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_PLLISUPOVERRIDE_SHIFT 14 + +/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: RCVRDETVALUE [13:13] */ +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETVALUE_MASK 0x00002000 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETVALUE_ALIGN 0 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETVALUE_BITS 1 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETVALUE_SHIFT 13 + +/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: RCVRDETOVERRIDE [12:12] */ +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETOVERRIDE_MASK 0x00001000 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETOVERRIDE_ALIGN 0 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETOVERRIDE_BITS 1 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETOVERRIDE_SHIFT 12 + +/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: RCVRDETTIMECONTROL [11:10] */ +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETTIMECONTROL_MASK 0x00000c00 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETTIMECONTROL_ALIGN 0 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETTIMECONTROL_BITS 2 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETTIMECONTROL_SHIFT 10 + +/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: RCVRDETECTIONTIME [09:00] */ +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETECTIONTIME_MASK 0x000003ff +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETECTIONTIME_ALIGN 0 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETECTIONTIME_BITS 10 +#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETECTIONTIME_SHIFT 0 + + +/**************************************************************************** + * PCIE_PHY :: PHY_TIMING_PARAMETER_OVERRIDE + ***************************************************************************/ +/* PCIE_PHY :: PHY_TIMING_PARAMETER_OVERRIDE :: TS1NUMOVERRIDE [31:31] */ +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TS1NUMOVERRIDE_MASK 0x80000000 +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TS1NUMOVERRIDE_ALIGN 0 +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TS1NUMOVERRIDE_BITS 1 +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TS1NUMOVERRIDE_SHIFT 31 + +/* PCIE_PHY :: PHY_TIMING_PARAMETER_OVERRIDE :: TXIDLEMINOVERRIDE [30:30] */ +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLEMINOVERRIDE_MASK 0x40000000 +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLEMINOVERRIDE_ALIGN 0 +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLEMINOVERRIDE_BITS 1 +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLEMINOVERRIDE_SHIFT 30 + +/* PCIE_PHY :: PHY_TIMING_PARAMETER_OVERRIDE :: TXIDLE2IDLEOVERRIDE [29:29] */ +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLE2IDLEOVERRIDE_MASK 0x20000000 +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLE2IDLEOVERRIDE_ALIGN 0 +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLE2IDLEOVERRIDE_BITS 1 +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLE2IDLEOVERRIDE_SHIFT 29 + +/* PCIE_PHY :: PHY_TIMING_PARAMETER_OVERRIDE :: UNUSED_0 [28:28] */ +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_UNUSED_0_MASK 0x10000000 +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_UNUSED_0_ALIGN 0 +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_UNUSED_0_BITS 1 +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_UNUSED_0_SHIFT 28 + +/* PCIE_PHY :: PHY_TIMING_PARAMETER_OVERRIDE :: N_TS1INPOLLINGACTIVE [27:16] */ +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_N_TS1INPOLLINGACTIVE_MASK 0x0fff0000 +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_N_TS1INPOLLINGACTIVE_ALIGN 0 +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_N_TS1INPOLLINGACTIVE_BITS 12 +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_N_TS1INPOLLINGACTIVE_SHIFT 16 + +/* PCIE_PHY :: PHY_TIMING_PARAMETER_OVERRIDE :: TXIDLEMINTIME [15:08] */ +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLEMINTIME_MASK 0x0000ff00 +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLEMINTIME_ALIGN 0 +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLEMINTIME_BITS 8 +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLEMINTIME_SHIFT 8 + +/* PCIE_PHY :: PHY_TIMING_PARAMETER_OVERRIDE :: TXIDLESETTOIDLETIME [07:00] */ +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLESETTOIDLETIME_MASK 0x000000ff +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLESETTOIDLETIME_ALIGN 0 +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLESETTOIDLETIME_BITS 8 +#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLESETTOIDLETIME_SHIFT 0 + + +/**************************************************************************** + * PCIE_PHY :: PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES + ***************************************************************************/ +/* PCIE_PHY :: PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES :: RESERVED_0 [31:10] */ +#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_RESERVED_0_MASK 0xfffffc00 +#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_RESERVED_0_ALIGN 0 +#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_RESERVED_0_BITS 22 +#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_RESERVED_0_SHIFT 10 + +/* PCIE_PHY :: PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES :: TRANSMIT_STATE_MACHINE_STATE [09:04] */ +#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_TRANSMIT_STATE_MACHINE_STATE_MASK 0x000003f0 +#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_TRANSMIT_STATE_MACHINE_STATE_ALIGN 0 +#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_TRANSMIT_STATE_MACHINE_STATE_BITS 6 +#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_TRANSMIT_STATE_MACHINE_STATE_SHIFT 4 + +/* PCIE_PHY :: PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES :: RECEIVE_STATE_MACHINE_STATE [03:00] */ +#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_RECEIVE_STATE_MACHINE_STATE_MASK 0x0000000f +#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_RECEIVE_STATE_MACHINE_STATE_ALIGN 0 +#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_RECEIVE_STATE_MACHINE_STATE_BITS 4 +#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_RECEIVE_STATE_MACHINE_STATE_SHIFT 0 + + +/**************************************************************************** + * PCIE_PHY :: PHY_HARDWARE_DIAGNOSTIC2_LTSSM_STATES + ***************************************************************************/ +/* PCIE_PHY :: PHY_HARDWARE_DIAGNOSTIC2_LTSSM_STATES :: LTSSM_STATE_MACHINE_STATE [31:00] */ +#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC2_LTSSM_STATES_LTSSM_STATE_MACHINE_STATE_MASK 0xffffffff +#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC2_LTSSM_STATES_LTSSM_STATE_MACHINE_STATE_ALIGN 0 +#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC2_LTSSM_STATES_LTSSM_STATE_MACHINE_STATE_BITS 32 +#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC2_LTSSM_STATES_LTSSM_STATE_MACHINE_STATE_SHIFT 0 + + +/**************************************************************************** + * BCM70012_TGT_TOP_INTR + ***************************************************************************/ +/**************************************************************************** + * INTR :: INTR_STATUS + ***************************************************************************/ +/* INTR :: INTR_STATUS :: reserved0 [31:26] */ +#define INTR_INTR_STATUS_reserved0_MASK 0xfc000000 +#define INTR_INTR_STATUS_reserved0_ALIGN 0 +#define INTR_INTR_STATUS_reserved0_BITS 6 +#define INTR_INTR_STATUS_reserved0_SHIFT 26 + +/* INTR :: INTR_STATUS :: PCIE_TGT_CA_ATTN [25:25] */ +#define INTR_INTR_STATUS_PCIE_TGT_CA_ATTN_MASK 0x02000000 +#define INTR_INTR_STATUS_PCIE_TGT_CA_ATTN_ALIGN 0 +#define INTR_INTR_STATUS_PCIE_TGT_CA_ATTN_BITS 1 +#define INTR_INTR_STATUS_PCIE_TGT_CA_ATTN_SHIFT 25 + +/* INTR :: INTR_STATUS :: PCIE_TGT_UR_ATTN [24:24] */ +#define INTR_INTR_STATUS_PCIE_TGT_UR_ATTN_MASK 0x01000000 +#define INTR_INTR_STATUS_PCIE_TGT_UR_ATTN_ALIGN 0 +#define INTR_INTR_STATUS_PCIE_TGT_UR_ATTN_BITS 1 +#define INTR_INTR_STATUS_PCIE_TGT_UR_ATTN_SHIFT 24 + +/* INTR :: INTR_STATUS :: reserved1 [23:14] */ +#define INTR_INTR_STATUS_reserved1_MASK 0x00ffc000 +#define INTR_INTR_STATUS_reserved1_ALIGN 0 +#define INTR_INTR_STATUS_reserved1_BITS 10 +#define INTR_INTR_STATUS_reserved1_SHIFT 14 + +/* INTR :: INTR_STATUS :: L1_UV_RX_DMA_ERR_INTR [13:13] */ +#define INTR_INTR_STATUS_L1_UV_RX_DMA_ERR_INTR_MASK 0x00002000 +#define INTR_INTR_STATUS_L1_UV_RX_DMA_ERR_INTR_ALIGN 0 +#define INTR_INTR_STATUS_L1_UV_RX_DMA_ERR_INTR_BITS 1 +#define INTR_INTR_STATUS_L1_UV_RX_DMA_ERR_INTR_SHIFT 13 + +/* INTR :: INTR_STATUS :: L1_UV_RX_DMA_DONE_INTR [12:12] */ +#define INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_MASK 0x00001000 +#define INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_ALIGN 0 +#define INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_BITS 1 +#define INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_SHIFT 12 + +/* INTR :: INTR_STATUS :: L1_Y_RX_DMA_ERR_INTR [11:11] */ +#define INTR_INTR_STATUS_L1_Y_RX_DMA_ERR_INTR_MASK 0x00000800 +#define INTR_INTR_STATUS_L1_Y_RX_DMA_ERR_INTR_ALIGN 0 +#define INTR_INTR_STATUS_L1_Y_RX_DMA_ERR_INTR_BITS 1 +#define INTR_INTR_STATUS_L1_Y_RX_DMA_ERR_INTR_SHIFT 11 + +/* INTR :: INTR_STATUS :: L1_Y_RX_DMA_DONE_INTR [10:10] */ +#define INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_MASK 0x00000400 +#define INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_ALIGN 0 +#define INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_BITS 1 +#define INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_SHIFT 10 + +/* INTR :: INTR_STATUS :: L1_TX_DMA_ERR_INTR [09:09] */ +#define INTR_INTR_STATUS_L1_TX_DMA_ERR_INTR_MASK 0x00000200 +#define INTR_INTR_STATUS_L1_TX_DMA_ERR_INTR_ALIGN 0 +#define INTR_INTR_STATUS_L1_TX_DMA_ERR_INTR_BITS 1 +#define INTR_INTR_STATUS_L1_TX_DMA_ERR_INTR_SHIFT 9 + +/* INTR :: INTR_STATUS :: L1_TX_DMA_DONE_INTR [08:08] */ +#define INTR_INTR_STATUS_L1_TX_DMA_DONE_INTR_MASK 0x00000100 +#define INTR_INTR_STATUS_L1_TX_DMA_DONE_INTR_ALIGN 0 +#define INTR_INTR_STATUS_L1_TX_DMA_DONE_INTR_BITS 1 +#define INTR_INTR_STATUS_L1_TX_DMA_DONE_INTR_SHIFT 8 + +/* INTR :: INTR_STATUS :: reserved2 [07:06] */ +#define INTR_INTR_STATUS_reserved2_MASK 0x000000c0 +#define INTR_INTR_STATUS_reserved2_ALIGN 0 +#define INTR_INTR_STATUS_reserved2_BITS 2 +#define INTR_INTR_STATUS_reserved2_SHIFT 6 + +/* INTR :: INTR_STATUS :: L0_UV_RX_DMA_ERR_INTR [05:05] */ +#define INTR_INTR_STATUS_L0_UV_RX_DMA_ERR_INTR_MASK 0x00000020 +#define INTR_INTR_STATUS_L0_UV_RX_DMA_ERR_INTR_ALIGN 0 +#define INTR_INTR_STATUS_L0_UV_RX_DMA_ERR_INTR_BITS 1 +#define INTR_INTR_STATUS_L0_UV_RX_DMA_ERR_INTR_SHIFT 5 + +/* INTR :: INTR_STATUS :: L0_UV_RX_DMA_DONE_INTR [04:04] */ +#define INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_MASK 0x00000010 +#define INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_ALIGN 0 +#define INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_BITS 1 +#define INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_SHIFT 4 + +/* INTR :: INTR_STATUS :: L0_Y_RX_DMA_ERR_INTR [03:03] */ +#define INTR_INTR_STATUS_L0_Y_RX_DMA_ERR_INTR_MASK 0x00000008 +#define INTR_INTR_STATUS_L0_Y_RX_DMA_ERR_INTR_ALIGN 0 +#define INTR_INTR_STATUS_L0_Y_RX_DMA_ERR_INTR_BITS 1 +#define INTR_INTR_STATUS_L0_Y_RX_DMA_ERR_INTR_SHIFT 3 + +/* INTR :: INTR_STATUS :: L0_Y_RX_DMA_DONE_INTR [02:02] */ +#define INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_MASK 0x00000004 +#define INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_ALIGN 0 +#define INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_BITS 1 +#define INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_SHIFT 2 + +/* INTR :: INTR_STATUS :: L0_TX_DMA_ERR_INTR [01:01] */ +#define INTR_INTR_STATUS_L0_TX_DMA_ERR_INTR_MASK 0x00000002 +#define INTR_INTR_STATUS_L0_TX_DMA_ERR_INTR_ALIGN 0 +#define INTR_INTR_STATUS_L0_TX_DMA_ERR_INTR_BITS 1 +#define INTR_INTR_STATUS_L0_TX_DMA_ERR_INTR_SHIFT 1 + +/* INTR :: INTR_STATUS :: L0_TX_DMA_DONE_INTR [00:00] */ +#define INTR_INTR_STATUS_L0_TX_DMA_DONE_INTR_MASK 0x00000001 +#define INTR_INTR_STATUS_L0_TX_DMA_DONE_INTR_ALIGN 0 +#define INTR_INTR_STATUS_L0_TX_DMA_DONE_INTR_BITS 1 +#define INTR_INTR_STATUS_L0_TX_DMA_DONE_INTR_SHIFT 0 + + +/**************************************************************************** + * INTR :: INTR_SET + ***************************************************************************/ +/* INTR :: INTR_SET :: reserved0 [31:26] */ +#define INTR_INTR_SET_reserved0_MASK 0xfc000000 +#define INTR_INTR_SET_reserved0_ALIGN 0 +#define INTR_INTR_SET_reserved0_BITS 6 +#define INTR_INTR_SET_reserved0_SHIFT 26 + +/* INTR :: INTR_SET :: PCIE_TGT_CA_ATTN [25:25] */ +#define INTR_INTR_SET_PCIE_TGT_CA_ATTN_MASK 0x02000000 +#define INTR_INTR_SET_PCIE_TGT_CA_ATTN_ALIGN 0 +#define INTR_INTR_SET_PCIE_TGT_CA_ATTN_BITS 1 +#define INTR_INTR_SET_PCIE_TGT_CA_ATTN_SHIFT 25 + +/* INTR :: INTR_SET :: PCIE_TGT_UR_ATTN [24:24] */ +#define INTR_INTR_SET_PCIE_TGT_UR_ATTN_MASK 0x01000000 +#define INTR_INTR_SET_PCIE_TGT_UR_ATTN_ALIGN 0 +#define INTR_INTR_SET_PCIE_TGT_UR_ATTN_BITS 1 +#define INTR_INTR_SET_PCIE_TGT_UR_ATTN_SHIFT 24 + +/* INTR :: INTR_SET :: reserved1 [23:14] */ +#define INTR_INTR_SET_reserved1_MASK 0x00ffc000 +#define INTR_INTR_SET_reserved1_ALIGN 0 +#define INTR_INTR_SET_reserved1_BITS 10 +#define INTR_INTR_SET_reserved1_SHIFT 14 + +/* INTR :: INTR_SET :: UV_RX_DMA_L1_ERR_INTR [13:13] */ +#define INTR_INTR_SET_UV_RX_DMA_L1_ERR_INTR_MASK 0x00002000 +#define INTR_INTR_SET_UV_RX_DMA_L1_ERR_INTR_ALIGN 0 +#define INTR_INTR_SET_UV_RX_DMA_L1_ERR_INTR_BITS 1 +#define INTR_INTR_SET_UV_RX_DMA_L1_ERR_INTR_SHIFT 13 + +/* INTR :: INTR_SET :: UV_RX_DMA_L1_DONE_INTR [12:12] */ +#define INTR_INTR_SET_UV_RX_DMA_L1_DONE_INTR_MASK 0x00001000 +#define INTR_INTR_SET_UV_RX_DMA_L1_DONE_INTR_ALIGN 0 +#define INTR_INTR_SET_UV_RX_DMA_L1_DONE_INTR_BITS 1 +#define INTR_INTR_SET_UV_RX_DMA_L1_DONE_INTR_SHIFT 12 + +/* INTR :: INTR_SET :: Y_RX_DMA_L1_ERR_INTR [11:11] */ +#define INTR_INTR_SET_Y_RX_DMA_L1_ERR_INTR_MASK 0x00000800 +#define INTR_INTR_SET_Y_RX_DMA_L1_ERR_INTR_ALIGN 0 +#define INTR_INTR_SET_Y_RX_DMA_L1_ERR_INTR_BITS 1 +#define INTR_INTR_SET_Y_RX_DMA_L1_ERR_INTR_SHIFT 11 + +/* INTR :: INTR_SET :: Y_RX_DMA_L1_DONE_INTR [10:10] */ +#define INTR_INTR_SET_Y_RX_DMA_L1_DONE_INTR_MASK 0x00000400 +#define INTR_INTR_SET_Y_RX_DMA_L1_DONE_INTR_ALIGN 0 +#define INTR_INTR_SET_Y_RX_DMA_L1_DONE_INTR_BITS 1 +#define INTR_INTR_SET_Y_RX_DMA_L1_DONE_INTR_SHIFT 10 + +/* INTR :: INTR_SET :: TX_DMA_L1_ERR_INTR [09:09] */ +#define INTR_INTR_SET_TX_DMA_L1_ERR_INTR_MASK 0x00000200 +#define INTR_INTR_SET_TX_DMA_L1_ERR_INTR_ALIGN 0 +#define INTR_INTR_SET_TX_DMA_L1_ERR_INTR_BITS 1 +#define INTR_INTR_SET_TX_DMA_L1_ERR_INTR_SHIFT 9 + +/* INTR :: INTR_SET :: TX_DMA_L1_DONE_INTR [08:08] */ +#define INTR_INTR_SET_TX_DMA_L1_DONE_INTR_MASK 0x00000100 +#define INTR_INTR_SET_TX_DMA_L1_DONE_INTR_ALIGN 0 +#define INTR_INTR_SET_TX_DMA_L1_DONE_INTR_BITS 1 +#define INTR_INTR_SET_TX_DMA_L1_DONE_INTR_SHIFT 8 + +/* INTR :: INTR_SET :: reserved2 [07:06] */ +#define INTR_INTR_SET_reserved2_MASK 0x000000c0 +#define INTR_INTR_SET_reserved2_ALIGN 0 +#define INTR_INTR_SET_reserved2_BITS 2 +#define INTR_INTR_SET_reserved2_SHIFT 6 + +/* INTR :: INTR_SET :: UV_RX_DMA_L0_ERR_INTR [05:05] */ +#define INTR_INTR_SET_UV_RX_DMA_L0_ERR_INTR_MASK 0x00000020 +#define INTR_INTR_SET_UV_RX_DMA_L0_ERR_INTR_ALIGN 0 +#define INTR_INTR_SET_UV_RX_DMA_L0_ERR_INTR_BITS 1 +#define INTR_INTR_SET_UV_RX_DMA_L0_ERR_INTR_SHIFT 5 + +/* INTR :: INTR_SET :: UV_RX_DMA_L0_DONE_INTR [04:04] */ +#define INTR_INTR_SET_UV_RX_DMA_L0_DONE_INTR_MASK 0x00000010 +#define INTR_INTR_SET_UV_RX_DMA_L0_DONE_INTR_ALIGN 0 +#define INTR_INTR_SET_UV_RX_DMA_L0_DONE_INTR_BITS 1 +#define INTR_INTR_SET_UV_RX_DMA_L0_DONE_INTR_SHIFT 4 + +/* INTR :: INTR_SET :: Y_RX_DMA_L0_ERR_INTR [03:03] */ +#define INTR_INTR_SET_Y_RX_DMA_L0_ERR_INTR_MASK 0x00000008 +#define INTR_INTR_SET_Y_RX_DMA_L0_ERR_INTR_ALIGN 0 +#define INTR_INTR_SET_Y_RX_DMA_L0_ERR_INTR_BITS 1 +#define INTR_INTR_SET_Y_RX_DMA_L0_ERR_INTR_SHIFT 3 + +/* INTR :: INTR_SET :: Y_RX_DMA_L0_DONE_INTR [02:02] */ +#define INTR_INTR_SET_Y_RX_DMA_L0_DONE_INTR_MASK 0x00000004 +#define INTR_INTR_SET_Y_RX_DMA_L0_DONE_INTR_ALIGN 0 +#define INTR_INTR_SET_Y_RX_DMA_L0_DONE_INTR_BITS 1 +#define INTR_INTR_SET_Y_RX_DMA_L0_DONE_INTR_SHIFT 2 + +/* INTR :: INTR_SET :: TX_DMA_L0_ERR_INTR [01:01] */ +#define INTR_INTR_SET_TX_DMA_L0_ERR_INTR_MASK 0x00000002 +#define INTR_INTR_SET_TX_DMA_L0_ERR_INTR_ALIGN 0 +#define INTR_INTR_SET_TX_DMA_L0_ERR_INTR_BITS 1 +#define INTR_INTR_SET_TX_DMA_L0_ERR_INTR_SHIFT 1 + +/* INTR :: INTR_SET :: TX_DMA_L0_DONE_INTR [00:00] */ +#define INTR_INTR_SET_TX_DMA_L0_DONE_INTR_MASK 0x00000001 +#define INTR_INTR_SET_TX_DMA_L0_DONE_INTR_ALIGN 0 +#define INTR_INTR_SET_TX_DMA_L0_DONE_INTR_BITS 1 +#define INTR_INTR_SET_TX_DMA_L0_DONE_INTR_SHIFT 0 + + +/**************************************************************************** + * INTR :: INTR_CLR_REG + ***************************************************************************/ +/* INTR :: INTR_CLR_REG :: reserved0 [31:26] */ +#define INTR_INTR_CLR_REG_reserved0_MASK 0xfc000000 +#define INTR_INTR_CLR_REG_reserved0_ALIGN 0 +#define INTR_INTR_CLR_REG_reserved0_BITS 6 +#define INTR_INTR_CLR_REG_reserved0_SHIFT 26 + +/* INTR :: INTR_CLR_REG :: PCIE_TGT_CA_ATTN [25:25] */ +#define INTR_INTR_CLR_REG_PCIE_TGT_CA_ATTN_MASK 0x02000000 +#define INTR_INTR_CLR_REG_PCIE_TGT_CA_ATTN_ALIGN 0 +#define INTR_INTR_CLR_REG_PCIE_TGT_CA_ATTN_BITS 1 +#define INTR_INTR_CLR_REG_PCIE_TGT_CA_ATTN_SHIFT 25 + +/* INTR :: INTR_CLR_REG :: PCIE_TGT_UR_ATTN [24:24] */ +#define INTR_INTR_CLR_REG_PCIE_TGT_UR_ATTN_MASK 0x01000000 +#define INTR_INTR_CLR_REG_PCIE_TGT_UR_ATTN_ALIGN 0 +#define INTR_INTR_CLR_REG_PCIE_TGT_UR_ATTN_BITS 1 +#define INTR_INTR_CLR_REG_PCIE_TGT_UR_ATTN_SHIFT 24 + +/* INTR :: INTR_CLR_REG :: reserved1 [23:14] */ +#define INTR_INTR_CLR_REG_reserved1_MASK 0x00ffc000 +#define INTR_INTR_CLR_REG_reserved1_ALIGN 0 +#define INTR_INTR_CLR_REG_reserved1_BITS 10 +#define INTR_INTR_CLR_REG_reserved1_SHIFT 14 + +/* INTR :: INTR_CLR_REG :: L1_UV_RX_DMA_ERR_INTR_CLR [13:13] */ +#define INTR_INTR_CLR_REG_L1_UV_RX_DMA_ERR_INTR_CLR_MASK 0x00002000 +#define INTR_INTR_CLR_REG_L1_UV_RX_DMA_ERR_INTR_CLR_ALIGN 0 +#define INTR_INTR_CLR_REG_L1_UV_RX_DMA_ERR_INTR_CLR_BITS 1 +#define INTR_INTR_CLR_REG_L1_UV_RX_DMA_ERR_INTR_CLR_SHIFT 13 + +/* INTR :: INTR_CLR_REG :: L1_UV_RX_DMA_DONE_INTR_CLR [12:12] */ +#define INTR_INTR_CLR_REG_L1_UV_RX_DMA_DONE_INTR_CLR_MASK 0x00001000 +#define INTR_INTR_CLR_REG_L1_UV_RX_DMA_DONE_INTR_CLR_ALIGN 0 +#define INTR_INTR_CLR_REG_L1_UV_RX_DMA_DONE_INTR_CLR_BITS 1 +#define INTR_INTR_CLR_REG_L1_UV_RX_DMA_DONE_INTR_CLR_SHIFT 12 + +/* INTR :: INTR_CLR_REG :: L1_Y_RX_DMA_ERR_INTR_CLR [11:11] */ +#define INTR_INTR_CLR_REG_L1_Y_RX_DMA_ERR_INTR_CLR_MASK 0x00000800 +#define INTR_INTR_CLR_REG_L1_Y_RX_DMA_ERR_INTR_CLR_ALIGN 0 +#define INTR_INTR_CLR_REG_L1_Y_RX_DMA_ERR_INTR_CLR_BITS 1 +#define INTR_INTR_CLR_REG_L1_Y_RX_DMA_ERR_INTR_CLR_SHIFT 11 + +/* INTR :: INTR_CLR_REG :: L1_Y_RX_DMA_DONE_INTR_CLR [10:10] */ +#define INTR_INTR_CLR_REG_L1_Y_RX_DMA_DONE_INTR_CLR_MASK 0x00000400 +#define INTR_INTR_CLR_REG_L1_Y_RX_DMA_DONE_INTR_CLR_ALIGN 0 +#define INTR_INTR_CLR_REG_L1_Y_RX_DMA_DONE_INTR_CLR_BITS 1 +#define INTR_INTR_CLR_REG_L1_Y_RX_DMA_DONE_INTR_CLR_SHIFT 10 + +/* INTR :: INTR_CLR_REG :: L1_TX_DMA_ERR_INTR_CLR [09:09] */ +#define INTR_INTR_CLR_REG_L1_TX_DMA_ERR_INTR_CLR_MASK 0x00000200 +#define INTR_INTR_CLR_REG_L1_TX_DMA_ERR_INTR_CLR_ALIGN 0 +#define INTR_INTR_CLR_REG_L1_TX_DMA_ERR_INTR_CLR_BITS 1 +#define INTR_INTR_CLR_REG_L1_TX_DMA_ERR_INTR_CLR_SHIFT 9 + +/* INTR :: INTR_CLR_REG :: L1_TX_DMA_DONE_INTR_CLR [08:08] */ +#define INTR_INTR_CLR_REG_L1_TX_DMA_DONE_INTR_CLR_MASK 0x00000100 +#define INTR_INTR_CLR_REG_L1_TX_DMA_DONE_INTR_CLR_ALIGN 0 +#define INTR_INTR_CLR_REG_L1_TX_DMA_DONE_INTR_CLR_BITS 1 +#define INTR_INTR_CLR_REG_L1_TX_DMA_DONE_INTR_CLR_SHIFT 8 + +/* INTR :: INTR_CLR_REG :: reserved2 [07:06] */ +#define INTR_INTR_CLR_REG_reserved2_MASK 0x000000c0 +#define INTR_INTR_CLR_REG_reserved2_ALIGN 0 +#define INTR_INTR_CLR_REG_reserved2_BITS 2 +#define INTR_INTR_CLR_REG_reserved2_SHIFT 6 + +/* INTR :: INTR_CLR_REG :: L0_UV_RX_DMA_ERR_INTR_CLR [05:05] */ +#define INTR_INTR_CLR_REG_L0_UV_RX_DMA_ERR_INTR_CLR_MASK 0x00000020 +#define INTR_INTR_CLR_REG_L0_UV_RX_DMA_ERR_INTR_CLR_ALIGN 0 +#define INTR_INTR_CLR_REG_L0_UV_RX_DMA_ERR_INTR_CLR_BITS 1 +#define INTR_INTR_CLR_REG_L0_UV_RX_DMA_ERR_INTR_CLR_SHIFT 5 + +/* INTR :: INTR_CLR_REG :: L0_UV_RX_DMA_DONE_INTR_CLR [04:04] */ +#define INTR_INTR_CLR_REG_L0_UV_RX_DMA_DONE_INTR_CLR_MASK 0x00000010 +#define INTR_INTR_CLR_REG_L0_UV_RX_DMA_DONE_INTR_CLR_ALIGN 0 +#define INTR_INTR_CLR_REG_L0_UV_RX_DMA_DONE_INTR_CLR_BITS 1 +#define INTR_INTR_CLR_REG_L0_UV_RX_DMA_DONE_INTR_CLR_SHIFT 4 + +/* INTR :: INTR_CLR_REG :: L0_Y_RX_DMA_ERR_INTR_CLR [03:03] */ +#define INTR_INTR_CLR_REG_L0_Y_RX_DMA_ERR_INTR_CLR_MASK 0x00000008 +#define INTR_INTR_CLR_REG_L0_Y_RX_DMA_ERR_INTR_CLR_ALIGN 0 +#define INTR_INTR_CLR_REG_L0_Y_RX_DMA_ERR_INTR_CLR_BITS 1 +#define INTR_INTR_CLR_REG_L0_Y_RX_DMA_ERR_INTR_CLR_SHIFT 3 + +/* INTR :: INTR_CLR_REG :: L0_Y_RX_DMA_DONE_INTR_CLR [02:02] */ +#define INTR_INTR_CLR_REG_L0_Y_RX_DMA_DONE_INTR_CLR_MASK 0x00000004 +#define INTR_INTR_CLR_REG_L0_Y_RX_DMA_DONE_INTR_CLR_ALIGN 0 +#define INTR_INTR_CLR_REG_L0_Y_RX_DMA_DONE_INTR_CLR_BITS 1 +#define INTR_INTR_CLR_REG_L0_Y_RX_DMA_DONE_INTR_CLR_SHIFT 2 + +/* INTR :: INTR_CLR_REG :: L0_TX_DMA_ERR_INTR_CLR [01:01] */ +#define INTR_INTR_CLR_REG_L0_TX_DMA_ERR_INTR_CLR_MASK 0x00000002 +#define INTR_INTR_CLR_REG_L0_TX_DMA_ERR_INTR_CLR_ALIGN 0 +#define INTR_INTR_CLR_REG_L0_TX_DMA_ERR_INTR_CLR_BITS 1 +#define INTR_INTR_CLR_REG_L0_TX_DMA_ERR_INTR_CLR_SHIFT 1 + +/* INTR :: INTR_CLR_REG :: L0_TX_DMA_DONE_INTR_CLR [00:00] */ +#define INTR_INTR_CLR_REG_L0_TX_DMA_DONE_INTR_CLR_MASK 0x00000001 +#define INTR_INTR_CLR_REG_L0_TX_DMA_DONE_INTR_CLR_ALIGN 0 +#define INTR_INTR_CLR_REG_L0_TX_DMA_DONE_INTR_CLR_BITS 1 +#define INTR_INTR_CLR_REG_L0_TX_DMA_DONE_INTR_CLR_SHIFT 0 + + +/**************************************************************************** + * INTR :: INTR_MSK_STS_REG + ***************************************************************************/ +/* INTR :: INTR_MSK_STS_REG :: reserved0 [31:26] */ +#define INTR_INTR_MSK_STS_REG_reserved0_MASK 0xfc000000 +#define INTR_INTR_MSK_STS_REG_reserved0_ALIGN 0 +#define INTR_INTR_MSK_STS_REG_reserved0_BITS 6 +#define INTR_INTR_MSK_STS_REG_reserved0_SHIFT 26 + +/* INTR :: INTR_MSK_STS_REG :: PCIE_TGT_CA_ATTN [25:25] */ +#define INTR_INTR_MSK_STS_REG_PCIE_TGT_CA_ATTN_MASK 0x02000000 +#define INTR_INTR_MSK_STS_REG_PCIE_TGT_CA_ATTN_ALIGN 0 +#define INTR_INTR_MSK_STS_REG_PCIE_TGT_CA_ATTN_BITS 1 +#define INTR_INTR_MSK_STS_REG_PCIE_TGT_CA_ATTN_SHIFT 25 + +/* INTR :: INTR_MSK_STS_REG :: PCIE_TGT_UR_ATTN [24:24] */ +#define INTR_INTR_MSK_STS_REG_PCIE_TGT_UR_ATTN_MASK 0x01000000 +#define INTR_INTR_MSK_STS_REG_PCIE_TGT_UR_ATTN_ALIGN 0 +#define INTR_INTR_MSK_STS_REG_PCIE_TGT_UR_ATTN_BITS 1 +#define INTR_INTR_MSK_STS_REG_PCIE_TGT_UR_ATTN_SHIFT 24 + +/* INTR :: INTR_MSK_STS_REG :: reserved1 [23:14] */ +#define INTR_INTR_MSK_STS_REG_reserved1_MASK 0x00ffc000 +#define INTR_INTR_MSK_STS_REG_reserved1_ALIGN 0 +#define INTR_INTR_MSK_STS_REG_reserved1_BITS 10 +#define INTR_INTR_MSK_STS_REG_reserved1_SHIFT 14 + +/* INTR :: INTR_MSK_STS_REG :: L1_UV_RX_DMA_ERR_INTR_MSK [13:13] */ +#define INTR_INTR_MSK_STS_REG_L1_UV_RX_DMA_ERR_INTR_MSK_MASK 0x00002000 +#define INTR_INTR_MSK_STS_REG_L1_UV_RX_DMA_ERR_INTR_MSK_ALIGN 0 +#define INTR_INTR_MSK_STS_REG_L1_UV_RX_DMA_ERR_INTR_MSK_BITS 1 +#define INTR_INTR_MSK_STS_REG_L1_UV_RX_DMA_ERR_INTR_MSK_SHIFT 13 + +/* INTR :: INTR_MSK_STS_REG :: L1_UV_RX_DMA_DONE_INTR_MSK [12:12] */ +#define INTR_INTR_MSK_STS_REG_L1_UV_RX_DMA_DONE_INTR_MSK_MASK 0x00001000 +#define INTR_INTR_MSK_STS_REG_L1_UV_RX_DMA_DONE_INTR_MSK_ALIGN 0 +#define INTR_INTR_MSK_STS_REG_L1_UV_RX_DMA_DONE_INTR_MSK_BITS 1 +#define INTR_INTR_MSK_STS_REG_L1_UV_RX_DMA_DONE_INTR_MSK_SHIFT 12 + +/* INTR :: INTR_MSK_STS_REG :: LIST1_Y_RX_DMA_ERR_INTR_MSK [11:11] */ +#define INTR_INTR_MSK_STS_REG_LIST1_Y_RX_DMA_ERR_INTR_MSK_MASK 0x00000800 +#define INTR_INTR_MSK_STS_REG_LIST1_Y_RX_DMA_ERR_INTR_MSK_ALIGN 0 +#define INTR_INTR_MSK_STS_REG_LIST1_Y_RX_DMA_ERR_INTR_MSK_BITS 1 +#define INTR_INTR_MSK_STS_REG_LIST1_Y_RX_DMA_ERR_INTR_MSK_SHIFT 11 + +/* INTR :: INTR_MSK_STS_REG :: L1_Y_RX_DMA_DONE_INTR_MSK [10:10] */ +#define INTR_INTR_MSK_STS_REG_L1_Y_RX_DMA_DONE_INTR_MSK_MASK 0x00000400 +#define INTR_INTR_MSK_STS_REG_L1_Y_RX_DMA_DONE_INTR_MSK_ALIGN 0 +#define INTR_INTR_MSK_STS_REG_L1_Y_RX_DMA_DONE_INTR_MSK_BITS 1 +#define INTR_INTR_MSK_STS_REG_L1_Y_RX_DMA_DONE_INTR_MSK_SHIFT 10 + +/* INTR :: INTR_MSK_STS_REG :: L1_TX_DMA_ERR_INTR_MSK [09:09] */ +#define INTR_INTR_MSK_STS_REG_L1_TX_DMA_ERR_INTR_MSK_MASK 0x00000200 +#define INTR_INTR_MSK_STS_REG_L1_TX_DMA_ERR_INTR_MSK_ALIGN 0 +#define INTR_INTR_MSK_STS_REG_L1_TX_DMA_ERR_INTR_MSK_BITS 1 +#define INTR_INTR_MSK_STS_REG_L1_TX_DMA_ERR_INTR_MSK_SHIFT 9 + +/* INTR :: INTR_MSK_STS_REG :: L1_TX_DMA_DONE_INTR_MSK [08:08] */ +#define INTR_INTR_MSK_STS_REG_L1_TX_DMA_DONE_INTR_MSK_MASK 0x00000100 +#define INTR_INTR_MSK_STS_REG_L1_TX_DMA_DONE_INTR_MSK_ALIGN 0 +#define INTR_INTR_MSK_STS_REG_L1_TX_DMA_DONE_INTR_MSK_BITS 1 +#define INTR_INTR_MSK_STS_REG_L1_TX_DMA_DONE_INTR_MSK_SHIFT 8 + +/* INTR :: INTR_MSK_STS_REG :: reserved2 [07:06] */ +#define INTR_INTR_MSK_STS_REG_reserved2_MASK 0x000000c0 +#define INTR_INTR_MSK_STS_REG_reserved2_ALIGN 0 +#define INTR_INTR_MSK_STS_REG_reserved2_BITS 2 +#define INTR_INTR_MSK_STS_REG_reserved2_SHIFT 6 + +/* INTR :: INTR_MSK_STS_REG :: L0_UV_RX_DMA_ERR_INTR_MSK [05:05] */ +#define INTR_INTR_MSK_STS_REG_L0_UV_RX_DMA_ERR_INTR_MSK_MASK 0x00000020 +#define INTR_INTR_MSK_STS_REG_L0_UV_RX_DMA_ERR_INTR_MSK_ALIGN 0 +#define INTR_INTR_MSK_STS_REG_L0_UV_RX_DMA_ERR_INTR_MSK_BITS 1 +#define INTR_INTR_MSK_STS_REG_L0_UV_RX_DMA_ERR_INTR_MSK_SHIFT 5 + +/* INTR :: INTR_MSK_STS_REG :: L0_UV_RX_DMA_DONE_INTR_MSK [04:04] */ +#define INTR_INTR_MSK_STS_REG_L0_UV_RX_DMA_DONE_INTR_MSK_MASK 0x00000010 +#define INTR_INTR_MSK_STS_REG_L0_UV_RX_DMA_DONE_INTR_MSK_ALIGN 0 +#define INTR_INTR_MSK_STS_REG_L0_UV_RX_DMA_DONE_INTR_MSK_BITS 1 +#define INTR_INTR_MSK_STS_REG_L0_UV_RX_DMA_DONE_INTR_MSK_SHIFT 4 + +/* INTR :: INTR_MSK_STS_REG :: LIST0_Y_RX_DMA_ERR_INTR_MSK [03:03] */ +#define INTR_INTR_MSK_STS_REG_LIST0_Y_RX_DMA_ERR_INTR_MSK_MASK 0x00000008 +#define INTR_INTR_MSK_STS_REG_LIST0_Y_RX_DMA_ERR_INTR_MSK_ALIGN 0 +#define INTR_INTR_MSK_STS_REG_LIST0_Y_RX_DMA_ERR_INTR_MSK_BITS 1 +#define INTR_INTR_MSK_STS_REG_LIST0_Y_RX_DMA_ERR_INTR_MSK_SHIFT 3 + +/* INTR :: INTR_MSK_STS_REG :: L0_Y_RX_DMA_DONE_INTR_MSK [02:02] */ +#define INTR_INTR_MSK_STS_REG_L0_Y_RX_DMA_DONE_INTR_MSK_MASK 0x00000004 +#define INTR_INTR_MSK_STS_REG_L0_Y_RX_DMA_DONE_INTR_MSK_ALIGN 0 +#define INTR_INTR_MSK_STS_REG_L0_Y_RX_DMA_DONE_INTR_MSK_BITS 1 +#define INTR_INTR_MSK_STS_REG_L0_Y_RX_DMA_DONE_INTR_MSK_SHIFT 2 + +/* INTR :: INTR_MSK_STS_REG :: L0_TX_DMA_ERR_INTR_MSK [01:01] */ +#define INTR_INTR_MSK_STS_REG_L0_TX_DMA_ERR_INTR_MSK_MASK 0x00000002 +#define INTR_INTR_MSK_STS_REG_L0_TX_DMA_ERR_INTR_MSK_ALIGN 0 +#define INTR_INTR_MSK_STS_REG_L0_TX_DMA_ERR_INTR_MSK_BITS 1 +#define INTR_INTR_MSK_STS_REG_L0_TX_DMA_ERR_INTR_MSK_SHIFT 1 + +/* INTR :: INTR_MSK_STS_REG :: L0_TX_DMA_DONE_INTR_MSK [00:00] */ +#define INTR_INTR_MSK_STS_REG_L0_TX_DMA_DONE_INTR_MSK_MASK 0x00000001 +#define INTR_INTR_MSK_STS_REG_L0_TX_DMA_DONE_INTR_MSK_ALIGN 0 +#define INTR_INTR_MSK_STS_REG_L0_TX_DMA_DONE_INTR_MSK_BITS 1 +#define INTR_INTR_MSK_STS_REG_L0_TX_DMA_DONE_INTR_MSK_SHIFT 0 + + +/**************************************************************************** + * INTR :: INTR_MSK_SET_REG + ***************************************************************************/ +/* INTR :: INTR_MSK_SET_REG :: reserved0 [31:26] */ +#define INTR_INTR_MSK_SET_REG_reserved0_MASK 0xfc000000 +#define INTR_INTR_MSK_SET_REG_reserved0_ALIGN 0 +#define INTR_INTR_MSK_SET_REG_reserved0_BITS 6 +#define INTR_INTR_MSK_SET_REG_reserved0_SHIFT 26 + +/* INTR :: INTR_MSK_SET_REG :: PCIE_TGT_CA_ATTN [25:25] */ +#define INTR_INTR_MSK_SET_REG_PCIE_TGT_CA_ATTN_MASK 0x02000000 +#define INTR_INTR_MSK_SET_REG_PCIE_TGT_CA_ATTN_ALIGN 0 +#define INTR_INTR_MSK_SET_REG_PCIE_TGT_CA_ATTN_BITS 1 +#define INTR_INTR_MSK_SET_REG_PCIE_TGT_CA_ATTN_SHIFT 25 + +/* INTR :: INTR_MSK_SET_REG :: PCIE_TGT_UR_ATTN [24:24] */ +#define INTR_INTR_MSK_SET_REG_PCIE_TGT_UR_ATTN_MASK 0x01000000 +#define INTR_INTR_MSK_SET_REG_PCIE_TGT_UR_ATTN_ALIGN 0 +#define INTR_INTR_MSK_SET_REG_PCIE_TGT_UR_ATTN_BITS 1 +#define INTR_INTR_MSK_SET_REG_PCIE_TGT_UR_ATTN_SHIFT 24 + +/* INTR :: INTR_MSK_SET_REG :: reserved1 [23:14] */ +#define INTR_INTR_MSK_SET_REG_reserved1_MASK 0x00ffc000 +#define INTR_INTR_MSK_SET_REG_reserved1_ALIGN 0 +#define INTR_INTR_MSK_SET_REG_reserved1_BITS 10 +#define INTR_INTR_MSK_SET_REG_reserved1_SHIFT 14 + +/* INTR :: INTR_MSK_SET_REG :: L1_UV_RX_DMA_ERR_INTR_MSK_SET [13:13] */ +#define INTR_INTR_MSK_SET_REG_L1_UV_RX_DMA_ERR_INTR_MSK_SET_MASK 0x00002000 +#define INTR_INTR_MSK_SET_REG_L1_UV_RX_DMA_ERR_INTR_MSK_SET_ALIGN 0 +#define INTR_INTR_MSK_SET_REG_L1_UV_RX_DMA_ERR_INTR_MSK_SET_BITS 1 +#define INTR_INTR_MSK_SET_REG_L1_UV_RX_DMA_ERR_INTR_MSK_SET_SHIFT 13 + +/* INTR :: INTR_MSK_SET_REG :: L1_UV_RX_DMA_DONE_INTR_MSK_SET [12:12] */ +#define INTR_INTR_MSK_SET_REG_L1_UV_RX_DMA_DONE_INTR_MSK_SET_MASK 0x00001000 +#define INTR_INTR_MSK_SET_REG_L1_UV_RX_DMA_DONE_INTR_MSK_SET_ALIGN 0 +#define INTR_INTR_MSK_SET_REG_L1_UV_RX_DMA_DONE_INTR_MSK_SET_BITS 1 +#define INTR_INTR_MSK_SET_REG_L1_UV_RX_DMA_DONE_INTR_MSK_SET_SHIFT 12 + +/* INTR :: INTR_MSK_SET_REG :: L1_Y_RX_DMA_ERR_INTR_MSK_SET [11:11] */ +#define INTR_INTR_MSK_SET_REG_L1_Y_RX_DMA_ERR_INTR_MSK_SET_MASK 0x00000800 +#define INTR_INTR_MSK_SET_REG_L1_Y_RX_DMA_ERR_INTR_MSK_SET_ALIGN 0 +#define INTR_INTR_MSK_SET_REG_L1_Y_RX_DMA_ERR_INTR_MSK_SET_BITS 1 +#define INTR_INTR_MSK_SET_REG_L1_Y_RX_DMA_ERR_INTR_MSK_SET_SHIFT 11 + +/* INTR :: INTR_MSK_SET_REG :: L1_Y_RX_DMA_DONE_INTR_MSK_SET [10:10] */ +#define INTR_INTR_MSK_SET_REG_L1_Y_RX_DMA_DONE_INTR_MSK_SET_MASK 0x00000400 +#define INTR_INTR_MSK_SET_REG_L1_Y_RX_DMA_DONE_INTR_MSK_SET_ALIGN 0 +#define INTR_INTR_MSK_SET_REG_L1_Y_RX_DMA_DONE_INTR_MSK_SET_BITS 1 +#define INTR_INTR_MSK_SET_REG_L1_Y_RX_DMA_DONE_INTR_MSK_SET_SHIFT 10 + +/* INTR :: INTR_MSK_SET_REG :: L1_TX_DMA_ERR_INTR_MSK_SET [09:09] */ +#define INTR_INTR_MSK_SET_REG_L1_TX_DMA_ERR_INTR_MSK_SET_MASK 0x00000200 +#define INTR_INTR_MSK_SET_REG_L1_TX_DMA_ERR_INTR_MSK_SET_ALIGN 0 +#define INTR_INTR_MSK_SET_REG_L1_TX_DMA_ERR_INTR_MSK_SET_BITS 1 +#define INTR_INTR_MSK_SET_REG_L1_TX_DMA_ERR_INTR_MSK_SET_SHIFT 9 + +/* INTR :: INTR_MSK_SET_REG :: L1_TX_DMA_DONE_INTR_MSK_SET [08:08] */ +#define INTR_INTR_MSK_SET_REG_L1_TX_DMA_DONE_INTR_MSK_SET_MASK 0x00000100 +#define INTR_INTR_MSK_SET_REG_L1_TX_DMA_DONE_INTR_MSK_SET_ALIGN 0 +#define INTR_INTR_MSK_SET_REG_L1_TX_DMA_DONE_INTR_MSK_SET_BITS 1 +#define INTR_INTR_MSK_SET_REG_L1_TX_DMA_DONE_INTR_MSK_SET_SHIFT 8 + +/* INTR :: INTR_MSK_SET_REG :: reserved2 [07:06] */ +#define INTR_INTR_MSK_SET_REG_reserved2_MASK 0x000000c0 +#define INTR_INTR_MSK_SET_REG_reserved2_ALIGN 0 +#define INTR_INTR_MSK_SET_REG_reserved2_BITS 2 +#define INTR_INTR_MSK_SET_REG_reserved2_SHIFT 6 + +/* INTR :: INTR_MSK_SET_REG :: L0_UV_RX_DMA_ERR_INTR_MSK_SET [05:05] */ +#define INTR_INTR_MSK_SET_REG_L0_UV_RX_DMA_ERR_INTR_MSK_SET_MASK 0x00000020 +#define INTR_INTR_MSK_SET_REG_L0_UV_RX_DMA_ERR_INTR_MSK_SET_ALIGN 0 +#define INTR_INTR_MSK_SET_REG_L0_UV_RX_DMA_ERR_INTR_MSK_SET_BITS 1 +#define INTR_INTR_MSK_SET_REG_L0_UV_RX_DMA_ERR_INTR_MSK_SET_SHIFT 5 + +/* INTR :: INTR_MSK_SET_REG :: L0_UV_RX_DMA_DONE_INTR_MSK_SET [04:04] */ +#define INTR_INTR_MSK_SET_REG_L0_UV_RX_DMA_DONE_INTR_MSK_SET_MASK 0x00000010 +#define INTR_INTR_MSK_SET_REG_L0_UV_RX_DMA_DONE_INTR_MSK_SET_ALIGN 0 +#define INTR_INTR_MSK_SET_REG_L0_UV_RX_DMA_DONE_INTR_MSK_SET_BITS 1 +#define INTR_INTR_MSK_SET_REG_L0_UV_RX_DMA_DONE_INTR_MSK_SET_SHIFT 4 + +/* INTR :: INTR_MSK_SET_REG :: L0_Y_RX_DMA_ERR_INTR_MSK_SET [03:03] */ +#define INTR_INTR_MSK_SET_REG_L0_Y_RX_DMA_ERR_INTR_MSK_SET_MASK 0x00000008 +#define INTR_INTR_MSK_SET_REG_L0_Y_RX_DMA_ERR_INTR_MSK_SET_ALIGN 0 +#define INTR_INTR_MSK_SET_REG_L0_Y_RX_DMA_ERR_INTR_MSK_SET_BITS 1 +#define INTR_INTR_MSK_SET_REG_L0_Y_RX_DMA_ERR_INTR_MSK_SET_SHIFT 3 + +/* INTR :: INTR_MSK_SET_REG :: L0_Y_RX_DMA_DONE_INTR_MSK_SET [02:02] */ +#define INTR_INTR_MSK_SET_REG_L0_Y_RX_DMA_DONE_INTR_MSK_SET_MASK 0x00000004 +#define INTR_INTR_MSK_SET_REG_L0_Y_RX_DMA_DONE_INTR_MSK_SET_ALIGN 0 +#define INTR_INTR_MSK_SET_REG_L0_Y_RX_DMA_DONE_INTR_MSK_SET_BITS 1 +#define INTR_INTR_MSK_SET_REG_L0_Y_RX_DMA_DONE_INTR_MSK_SET_SHIFT 2 + +/* INTR :: INTR_MSK_SET_REG :: L0_TX_DMA_ERR_INTR_MSK_SET [01:01] */ +#define INTR_INTR_MSK_SET_REG_L0_TX_DMA_ERR_INTR_MSK_SET_MASK 0x00000002 +#define INTR_INTR_MSK_SET_REG_L0_TX_DMA_ERR_INTR_MSK_SET_ALIGN 0 +#define INTR_INTR_MSK_SET_REG_L0_TX_DMA_ERR_INTR_MSK_SET_BITS 1 +#define INTR_INTR_MSK_SET_REG_L0_TX_DMA_ERR_INTR_MSK_SET_SHIFT 1 + +/* INTR :: INTR_MSK_SET_REG :: L0_TX_DMA_DONE_INTR_MSK_SET [00:00] */ +#define INTR_INTR_MSK_SET_REG_L0_TX_DMA_DONE_INTR_MSK_SET_MASK 0x00000001 +#define INTR_INTR_MSK_SET_REG_L0_TX_DMA_DONE_INTR_MSK_SET_ALIGN 0 +#define INTR_INTR_MSK_SET_REG_L0_TX_DMA_DONE_INTR_MSK_SET_BITS 1 +#define INTR_INTR_MSK_SET_REG_L0_TX_DMA_DONE_INTR_MSK_SET_SHIFT 0 + + +/**************************************************************************** + * INTR :: INTR_MSK_CLR_REG + ***************************************************************************/ +/* INTR :: INTR_MSK_CLR_REG :: reserved0 [31:26] */ +#define INTR_INTR_MSK_CLR_REG_reserved0_MASK 0xfc000000 +#define INTR_INTR_MSK_CLR_REG_reserved0_ALIGN 0 +#define INTR_INTR_MSK_CLR_REG_reserved0_BITS 6 +#define INTR_INTR_MSK_CLR_REG_reserved0_SHIFT 26 + +/* INTR :: INTR_MSK_CLR_REG :: PCIE_TGT_CA_ATTN [25:25] */ +#define INTR_INTR_MSK_CLR_REG_PCIE_TGT_CA_ATTN_MASK 0x02000000 +#define INTR_INTR_MSK_CLR_REG_PCIE_TGT_CA_ATTN_ALIGN 0 +#define INTR_INTR_MSK_CLR_REG_PCIE_TGT_CA_ATTN_BITS 1 +#define INTR_INTR_MSK_CLR_REG_PCIE_TGT_CA_ATTN_SHIFT 25 + +/* INTR :: INTR_MSK_CLR_REG :: PCIE_TGT_UR_ATTN [24:24] */ +#define INTR_INTR_MSK_CLR_REG_PCIE_TGT_UR_ATTN_MASK 0x01000000 +#define INTR_INTR_MSK_CLR_REG_PCIE_TGT_UR_ATTN_ALIGN 0 +#define INTR_INTR_MSK_CLR_REG_PCIE_TGT_UR_ATTN_BITS 1 +#define INTR_INTR_MSK_CLR_REG_PCIE_TGT_UR_ATTN_SHIFT 24 + +/* INTR :: INTR_MSK_CLR_REG :: reserved1 [23:14] */ +#define INTR_INTR_MSK_CLR_REG_reserved1_MASK 0x00ffc000 +#define INTR_INTR_MSK_CLR_REG_reserved1_ALIGN 0 +#define INTR_INTR_MSK_CLR_REG_reserved1_BITS 10 +#define INTR_INTR_MSK_CLR_REG_reserved1_SHIFT 14 + +/* INTR :: INTR_MSK_CLR_REG :: L1_UV_RX_DMA_ERR_INTR_MSK_CLR [13:13] */ +#define INTR_INTR_MSK_CLR_REG_L1_UV_RX_DMA_ERR_INTR_MSK_CLR_MASK 0x00002000 +#define INTR_INTR_MSK_CLR_REG_L1_UV_RX_DMA_ERR_INTR_MSK_CLR_ALIGN 0 +#define INTR_INTR_MSK_CLR_REG_L1_UV_RX_DMA_ERR_INTR_MSK_CLR_BITS 1 +#define INTR_INTR_MSK_CLR_REG_L1_UV_RX_DMA_ERR_INTR_MSK_CLR_SHIFT 13 + +/* INTR :: INTR_MSK_CLR_REG :: L1_UV_RX_DMA_DONE_INTR_MSK_CLR [12:12] */ +#define INTR_INTR_MSK_CLR_REG_L1_UV_RX_DMA_DONE_INTR_MSK_CLR_MASK 0x00001000 +#define INTR_INTR_MSK_CLR_REG_L1_UV_RX_DMA_DONE_INTR_MSK_CLR_ALIGN 0 +#define INTR_INTR_MSK_CLR_REG_L1_UV_RX_DMA_DONE_INTR_MSK_CLR_BITS 1 +#define INTR_INTR_MSK_CLR_REG_L1_UV_RX_DMA_DONE_INTR_MSK_CLR_SHIFT 12 + +/* INTR :: INTR_MSK_CLR_REG :: L1_Y_RX_DMA_ERR_INTR_MSK_CLR [11:11] */ +#define INTR_INTR_MSK_CLR_REG_L1_Y_RX_DMA_ERR_INTR_MSK_CLR_MASK 0x00000800 +#define INTR_INTR_MSK_CLR_REG_L1_Y_RX_DMA_ERR_INTR_MSK_CLR_ALIGN 0 +#define INTR_INTR_MSK_CLR_REG_L1_Y_RX_DMA_ERR_INTR_MSK_CLR_BITS 1 +#define INTR_INTR_MSK_CLR_REG_L1_Y_RX_DMA_ERR_INTR_MSK_CLR_SHIFT 11 + +/* INTR :: INTR_MSK_CLR_REG :: L1_Y_RX_DMA_DONE_INTR_MSK_CLR [10:10] */ +#define INTR_INTR_MSK_CLR_REG_L1_Y_RX_DMA_DONE_INTR_MSK_CLR_MASK 0x00000400 +#define INTR_INTR_MSK_CLR_REG_L1_Y_RX_DMA_DONE_INTR_MSK_CLR_ALIGN 0 +#define INTR_INTR_MSK_CLR_REG_L1_Y_RX_DMA_DONE_INTR_MSK_CLR_BITS 1 +#define INTR_INTR_MSK_CLR_REG_L1_Y_RX_DMA_DONE_INTR_MSK_CLR_SHIFT 10 + +/* INTR :: INTR_MSK_CLR_REG :: L1_TX_DMA_ERR_INTR_MSK_CLR [09:09] */ +#define INTR_INTR_MSK_CLR_REG_L1_TX_DMA_ERR_INTR_MSK_CLR_MASK 0x00000200 +#define INTR_INTR_MSK_CLR_REG_L1_TX_DMA_ERR_INTR_MSK_CLR_ALIGN 0 +#define INTR_INTR_MSK_CLR_REG_L1_TX_DMA_ERR_INTR_MSK_CLR_BITS 1 +#define INTR_INTR_MSK_CLR_REG_L1_TX_DMA_ERR_INTR_MSK_CLR_SHIFT 9 + +/* INTR :: INTR_MSK_CLR_REG :: L1_TX_DMA_DONE_INTR_MSK_CLR [08:08] */ +#define INTR_INTR_MSK_CLR_REG_L1_TX_DMA_DONE_INTR_MSK_CLR_MASK 0x00000100 +#define INTR_INTR_MSK_CLR_REG_L1_TX_DMA_DONE_INTR_MSK_CLR_ALIGN 0 +#define INTR_INTR_MSK_CLR_REG_L1_TX_DMA_DONE_INTR_MSK_CLR_BITS 1 +#define INTR_INTR_MSK_CLR_REG_L1_TX_DMA_DONE_INTR_MSK_CLR_SHIFT 8 + +/* INTR :: INTR_MSK_CLR_REG :: reserved2 [07:06] */ +#define INTR_INTR_MSK_CLR_REG_reserved2_MASK 0x000000c0 +#define INTR_INTR_MSK_CLR_REG_reserved2_ALIGN 0 +#define INTR_INTR_MSK_CLR_REG_reserved2_BITS 2 +#define INTR_INTR_MSK_CLR_REG_reserved2_SHIFT 6 + +/* INTR :: INTR_MSK_CLR_REG :: L0_UV_RX_DMA_ERR_INTR_MSK_CLR [05:05] */ +#define INTR_INTR_MSK_CLR_REG_L0_UV_RX_DMA_ERR_INTR_MSK_CLR_MASK 0x00000020 +#define INTR_INTR_MSK_CLR_REG_L0_UV_RX_DMA_ERR_INTR_MSK_CLR_ALIGN 0 +#define INTR_INTR_MSK_CLR_REG_L0_UV_RX_DMA_ERR_INTR_MSK_CLR_BITS 1 +#define INTR_INTR_MSK_CLR_REG_L0_UV_RX_DMA_ERR_INTR_MSK_CLR_SHIFT 5 + +/* INTR :: INTR_MSK_CLR_REG :: L0_UV_RX_DMA_DONE_INTR_MSK_CLR [04:04] */ +#define INTR_INTR_MSK_CLR_REG_L0_UV_RX_DMA_DONE_INTR_MSK_CLR_MASK 0x00000010 +#define INTR_INTR_MSK_CLR_REG_L0_UV_RX_DMA_DONE_INTR_MSK_CLR_ALIGN 0 +#define INTR_INTR_MSK_CLR_REG_L0_UV_RX_DMA_DONE_INTR_MSK_CLR_BITS 1 +#define INTR_INTR_MSK_CLR_REG_L0_UV_RX_DMA_DONE_INTR_MSK_CLR_SHIFT 4 + +/* INTR :: INTR_MSK_CLR_REG :: L0_Y_RX_DMA_ERR_INTR_MSK_CLR [03:03] */ +#define INTR_INTR_MSK_CLR_REG_L0_Y_RX_DMA_ERR_INTR_MSK_CLR_MASK 0x00000008 +#define INTR_INTR_MSK_CLR_REG_L0_Y_RX_DMA_ERR_INTR_MSK_CLR_ALIGN 0 +#define INTR_INTR_MSK_CLR_REG_L0_Y_RX_DMA_ERR_INTR_MSK_CLR_BITS 1 +#define INTR_INTR_MSK_CLR_REG_L0_Y_RX_DMA_ERR_INTR_MSK_CLR_SHIFT 3 + +/* INTR :: INTR_MSK_CLR_REG :: L0_Y_RX_DMA_DONE_INTR_MSK_CLR [02:02] */ +#define INTR_INTR_MSK_CLR_REG_L0_Y_RX_DMA_DONE_INTR_MSK_CLR_MASK 0x00000004 +#define INTR_INTR_MSK_CLR_REG_L0_Y_RX_DMA_DONE_INTR_MSK_CLR_ALIGN 0 +#define INTR_INTR_MSK_CLR_REG_L0_Y_RX_DMA_DONE_INTR_MSK_CLR_BITS 1 +#define INTR_INTR_MSK_CLR_REG_L0_Y_RX_DMA_DONE_INTR_MSK_CLR_SHIFT 2 + +/* INTR :: INTR_MSK_CLR_REG :: L0_TX_DMA_ERR_INTR_MSK_CLR [01:01] */ +#define INTR_INTR_MSK_CLR_REG_L0_TX_DMA_ERR_INTR_MSK_CLR_MASK 0x00000002 +#define INTR_INTR_MSK_CLR_REG_L0_TX_DMA_ERR_INTR_MSK_CLR_ALIGN 0 +#define INTR_INTR_MSK_CLR_REG_L0_TX_DMA_ERR_INTR_MSK_CLR_BITS 1 +#define INTR_INTR_MSK_CLR_REG_L0_TX_DMA_ERR_INTR_MSK_CLR_SHIFT 1 + +/* INTR :: INTR_MSK_CLR_REG :: L0_TX_DMA_DONE_INTR_MSK_CLR [00:00] */ +#define INTR_INTR_MSK_CLR_REG_L0_TX_DMA_DONE_INTR_MSK_CLR_MASK 0x00000001 +#define INTR_INTR_MSK_CLR_REG_L0_TX_DMA_DONE_INTR_MSK_CLR_ALIGN 0 +#define INTR_INTR_MSK_CLR_REG_L0_TX_DMA_DONE_INTR_MSK_CLR_BITS 1 +#define INTR_INTR_MSK_CLR_REG_L0_TX_DMA_DONE_INTR_MSK_CLR_SHIFT 0 + + +/**************************************************************************** + * INTR :: EOI_CTRL + ***************************************************************************/ +/* INTR :: EOI_CTRL :: reserved0 [31:01] */ +#define INTR_EOI_CTRL_reserved0_MASK 0xfffffffe +#define INTR_EOI_CTRL_reserved0_ALIGN 0 +#define INTR_EOI_CTRL_reserved0_BITS 31 +#define INTR_EOI_CTRL_reserved0_SHIFT 1 + +/* INTR :: EOI_CTRL :: EOI [00:00] */ +#define INTR_EOI_CTRL_EOI_MASK 0x00000001 +#define INTR_EOI_CTRL_EOI_ALIGN 0 +#define INTR_EOI_CTRL_EOI_BITS 1 +#define INTR_EOI_CTRL_EOI_SHIFT 0 + + +/**************************************************************************** + * BCM70012_TGT_TOP_MDIO + ***************************************************************************/ +/**************************************************************************** + * MDIO :: CTRL0 + ***************************************************************************/ +/* MDIO :: CTRL0 :: reserved0 [31:22] */ +#define MDIO_CTRL0_reserved0_MASK 0xffc00000 +#define MDIO_CTRL0_reserved0_ALIGN 0 +#define MDIO_CTRL0_reserved0_BITS 10 +#define MDIO_CTRL0_reserved0_SHIFT 22 + +/* MDIO :: CTRL0 :: WRITE_READ_COMMAND [21:21] */ +#define MDIO_CTRL0_WRITE_READ_COMMAND_MASK 0x00200000 +#define MDIO_CTRL0_WRITE_READ_COMMAND_ALIGN 0 +#define MDIO_CTRL0_WRITE_READ_COMMAND_BITS 1 +#define MDIO_CTRL0_WRITE_READ_COMMAND_SHIFT 21 + +/* MDIO :: CTRL0 :: PHYAD [20:16] */ +#define MDIO_CTRL0_PHYAD_MASK 0x001f0000 +#define MDIO_CTRL0_PHYAD_ALIGN 0 +#define MDIO_CTRL0_PHYAD_BITS 5 +#define MDIO_CTRL0_PHYAD_SHIFT 16 + +/* MDIO :: CTRL0 :: reserved1 [15:05] */ +#define MDIO_CTRL0_reserved1_MASK 0x0000ffe0 +#define MDIO_CTRL0_reserved1_ALIGN 0 +#define MDIO_CTRL0_reserved1_BITS 11 +#define MDIO_CTRL0_reserved1_SHIFT 5 + +/* MDIO :: CTRL0 :: REGAD [04:00] */ +#define MDIO_CTRL0_REGAD_MASK 0x0000001f +#define MDIO_CTRL0_REGAD_ALIGN 0 +#define MDIO_CTRL0_REGAD_BITS 5 +#define MDIO_CTRL0_REGAD_SHIFT 0 + + +/**************************************************************************** + * MDIO :: CTRL1 + ***************************************************************************/ +/* MDIO :: CTRL1 :: WR_STATUS [31:31] */ +#define MDIO_CTRL1_WR_STATUS_MASK 0x80000000 +#define MDIO_CTRL1_WR_STATUS_ALIGN 0 +#define MDIO_CTRL1_WR_STATUS_BITS 1 +#define MDIO_CTRL1_WR_STATUS_SHIFT 31 + +/* MDIO :: CTRL1 :: reserved0 [30:16] */ +#define MDIO_CTRL1_reserved0_MASK 0x7fff0000 +#define MDIO_CTRL1_reserved0_ALIGN 0 +#define MDIO_CTRL1_reserved0_BITS 15 +#define MDIO_CTRL1_reserved0_SHIFT 16 + +/* MDIO :: CTRL1 :: Write_Data [15:00] */ +#define MDIO_CTRL1_Write_Data_MASK 0x0000ffff +#define MDIO_CTRL1_Write_Data_ALIGN 0 +#define MDIO_CTRL1_Write_Data_BITS 16 +#define MDIO_CTRL1_Write_Data_SHIFT 0 + + +/**************************************************************************** + * MDIO :: CTRL2 + ***************************************************************************/ +/* MDIO :: CTRL2 :: RD_STATUS [31:31] */ +#define MDIO_CTRL2_RD_STATUS_MASK 0x80000000 +#define MDIO_CTRL2_RD_STATUS_ALIGN 0 +#define MDIO_CTRL2_RD_STATUS_BITS 1 +#define MDIO_CTRL2_RD_STATUS_SHIFT 31 + +/* MDIO :: CTRL2 :: reserved0 [30:16] */ +#define MDIO_CTRL2_reserved0_MASK 0x7fff0000 +#define MDIO_CTRL2_reserved0_ALIGN 0 +#define MDIO_CTRL2_reserved0_BITS 15 +#define MDIO_CTRL2_reserved0_SHIFT 16 + +/* MDIO :: CTRL2 :: Read_Data [15:00] */ +#define MDIO_CTRL2_Read_Data_MASK 0x0000ffff +#define MDIO_CTRL2_Read_Data_ALIGN 0 +#define MDIO_CTRL2_Read_Data_BITS 16 +#define MDIO_CTRL2_Read_Data_SHIFT 0 + + +/**************************************************************************** + * BCM70012_TGT_TOP_TGT_RGR_BRIDGE + ***************************************************************************/ +/**************************************************************************** + * TGT_RGR_BRIDGE :: REVISION + ***************************************************************************/ +/* TGT_RGR_BRIDGE :: REVISION :: reserved0 [31:16] */ +#define TGT_RGR_BRIDGE_REVISION_reserved0_MASK 0xffff0000 +#define TGT_RGR_BRIDGE_REVISION_reserved0_ALIGN 0 +#define TGT_RGR_BRIDGE_REVISION_reserved0_BITS 16 +#define TGT_RGR_BRIDGE_REVISION_reserved0_SHIFT 16 + +/* TGT_RGR_BRIDGE :: REVISION :: MAJOR [15:08] */ +#define TGT_RGR_BRIDGE_REVISION_MAJOR_MASK 0x0000ff00 +#define TGT_RGR_BRIDGE_REVISION_MAJOR_ALIGN 0 +#define TGT_RGR_BRIDGE_REVISION_MAJOR_BITS 8 +#define TGT_RGR_BRIDGE_REVISION_MAJOR_SHIFT 8 + +/* TGT_RGR_BRIDGE :: REVISION :: MINOR [07:00] */ +#define TGT_RGR_BRIDGE_REVISION_MINOR_MASK 0x000000ff +#define TGT_RGR_BRIDGE_REVISION_MINOR_ALIGN 0 +#define TGT_RGR_BRIDGE_REVISION_MINOR_BITS 8 +#define TGT_RGR_BRIDGE_REVISION_MINOR_SHIFT 0 + + +/**************************************************************************** + * TGT_RGR_BRIDGE :: CTRL + ***************************************************************************/ +/* TGT_RGR_BRIDGE :: CTRL :: reserved0 [31:02] */ +#define TGT_RGR_BRIDGE_CTRL_reserved0_MASK 0xfffffffc +#define TGT_RGR_BRIDGE_CTRL_reserved0_ALIGN 0 +#define TGT_RGR_BRIDGE_CTRL_reserved0_BITS 30 +#define TGT_RGR_BRIDGE_CTRL_reserved0_SHIFT 2 + +/* TGT_RGR_BRIDGE :: CTRL :: RBUS_ERROR_INTR [01:01] */ +#define TGT_RGR_BRIDGE_CTRL_RBUS_ERROR_INTR_MASK 0x00000002 +#define TGT_RGR_BRIDGE_CTRL_RBUS_ERROR_INTR_ALIGN 0 +#define TGT_RGR_BRIDGE_CTRL_RBUS_ERROR_INTR_BITS 1 +#define TGT_RGR_BRIDGE_CTRL_RBUS_ERROR_INTR_SHIFT 1 + +/* TGT_RGR_BRIDGE :: CTRL :: GISB_ERROR_INTR [00:00] */ +#define TGT_RGR_BRIDGE_CTRL_GISB_ERROR_INTR_MASK 0x00000001 +#define TGT_RGR_BRIDGE_CTRL_GISB_ERROR_INTR_ALIGN 0 +#define TGT_RGR_BRIDGE_CTRL_GISB_ERROR_INTR_BITS 1 +#define TGT_RGR_BRIDGE_CTRL_GISB_ERROR_INTR_SHIFT 0 + + +/**************************************************************************** + * TGT_RGR_BRIDGE :: RBUS_TIMER + ***************************************************************************/ +/* TGT_RGR_BRIDGE :: RBUS_TIMER :: reserved0 [31:16] */ +#define TGT_RGR_BRIDGE_RBUS_TIMER_reserved0_MASK 0xffff0000 +#define TGT_RGR_BRIDGE_RBUS_TIMER_reserved0_ALIGN 0 +#define TGT_RGR_BRIDGE_RBUS_TIMER_reserved0_BITS 16 +#define TGT_RGR_BRIDGE_RBUS_TIMER_reserved0_SHIFT 16 + +/* TGT_RGR_BRIDGE :: RBUS_TIMER :: RBUS_TO_RBUS_TRANS_TIMER_CNT [15:00] */ +#define TGT_RGR_BRIDGE_RBUS_TIMER_RBUS_TO_RBUS_TRANS_TIMER_CNT_MASK 0x0000ffff +#define TGT_RGR_BRIDGE_RBUS_TIMER_RBUS_TO_RBUS_TRANS_TIMER_CNT_ALIGN 0 +#define TGT_RGR_BRIDGE_RBUS_TIMER_RBUS_TO_RBUS_TRANS_TIMER_CNT_BITS 16 +#define TGT_RGR_BRIDGE_RBUS_TIMER_RBUS_TO_RBUS_TRANS_TIMER_CNT_SHIFT 0 + + +/**************************************************************************** + * TGT_RGR_BRIDGE :: SPARE_SW_RESET_0 + ***************************************************************************/ +/* TGT_RGR_BRIDGE :: SPARE_SW_RESET_0 :: reserved0 [31:01] */ +#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_MASK 0xfffffffe +#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_ALIGN 0 +#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_BITS 31 +#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_SHIFT 1 + +/* TGT_RGR_BRIDGE :: SPARE_SW_RESET_0 :: SPARE_SW_RESET [00:00] */ +#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_MASK 0x00000001 +#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ALIGN 0 +#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_BITS 1 +#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_SHIFT 0 + + +/**************************************************************************** + * TGT_RGR_BRIDGE :: SPARE_SW_RESET_1 + ***************************************************************************/ +/* TGT_RGR_BRIDGE :: SPARE_SW_RESET_1 :: reserved0 [31:01] */ +#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_MASK 0xfffffffe +#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_ALIGN 0 +#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_BITS 31 +#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_SHIFT 1 + +/* TGT_RGR_BRIDGE :: SPARE_SW_RESET_1 :: SPARE_SW_RESET [00:00] */ +#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_MASK 0x00000001 +#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ALIGN 0 +#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_BITS 1 +#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_SHIFT 0 + + +/**************************************************************************** + * BCM70012_I2C_TOP_I2C + ***************************************************************************/ +/**************************************************************************** + * I2C :: CHIP_ADDRESS + ***************************************************************************/ +/* I2C :: CHIP_ADDRESS :: reserved0 [31:08] */ +#define I2C_CHIP_ADDRESS_reserved0_MASK 0xffffff00 +#define I2C_CHIP_ADDRESS_reserved0_ALIGN 0 +#define I2C_CHIP_ADDRESS_reserved0_BITS 24 +#define I2C_CHIP_ADDRESS_reserved0_SHIFT 8 + +/* I2C :: CHIP_ADDRESS :: CHIP_ADDRESS [07:01] */ +#define I2C_CHIP_ADDRESS_CHIP_ADDRESS_MASK 0x000000fe +#define I2C_CHIP_ADDRESS_CHIP_ADDRESS_ALIGN 0 +#define I2C_CHIP_ADDRESS_CHIP_ADDRESS_BITS 7 +#define I2C_CHIP_ADDRESS_CHIP_ADDRESS_SHIFT 1 + +/* I2C :: CHIP_ADDRESS :: RESERVED [00:00] */ +#define I2C_CHIP_ADDRESS_RESERVED_MASK 0x00000001 +#define I2C_CHIP_ADDRESS_RESERVED_ALIGN 0 +#define I2C_CHIP_ADDRESS_RESERVED_BITS 1 +#define I2C_CHIP_ADDRESS_RESERVED_SHIFT 0 + + +/**************************************************************************** + * I2C :: DATA_IN0 + ***************************************************************************/ +/* I2C :: DATA_IN0 :: reserved0 [31:08] */ +#define I2C_DATA_IN0_reserved0_MASK 0xffffff00 +#define I2C_DATA_IN0_reserved0_ALIGN 0 +#define I2C_DATA_IN0_reserved0_BITS 24 +#define I2C_DATA_IN0_reserved0_SHIFT 8 + +/* I2C :: DATA_IN0 :: DATA_IN0 [07:00] */ +#define I2C_DATA_IN0_DATA_IN0_MASK 0x000000ff +#define I2C_DATA_IN0_DATA_IN0_ALIGN 0 +#define I2C_DATA_IN0_DATA_IN0_BITS 8 +#define I2C_DATA_IN0_DATA_IN0_SHIFT 0 + + +/**************************************************************************** + * I2C :: DATA_IN1 + ***************************************************************************/ +/* I2C :: DATA_IN1 :: reserved0 [31:08] */ +#define I2C_DATA_IN1_reserved0_MASK 0xffffff00 +#define I2C_DATA_IN1_reserved0_ALIGN 0 +#define I2C_DATA_IN1_reserved0_BITS 24 +#define I2C_DATA_IN1_reserved0_SHIFT 8 + +/* I2C :: DATA_IN1 :: DATA_IN1 [07:00] */ +#define I2C_DATA_IN1_DATA_IN1_MASK 0x000000ff +#define I2C_DATA_IN1_DATA_IN1_ALIGN 0 +#define I2C_DATA_IN1_DATA_IN1_BITS 8 +#define I2C_DATA_IN1_DATA_IN1_SHIFT 0 + + +/**************************************************************************** + * I2C :: DATA_IN2 + ***************************************************************************/ +/* I2C :: DATA_IN2 :: reserved0 [31:08] */ +#define I2C_DATA_IN2_reserved0_MASK 0xffffff00 +#define I2C_DATA_IN2_reserved0_ALIGN 0 +#define I2C_DATA_IN2_reserved0_BITS 24 +#define I2C_DATA_IN2_reserved0_SHIFT 8 + +/* I2C :: DATA_IN2 :: DATA_IN2 [07:00] */ +#define I2C_DATA_IN2_DATA_IN2_MASK 0x000000ff +#define I2C_DATA_IN2_DATA_IN2_ALIGN 0 +#define I2C_DATA_IN2_DATA_IN2_BITS 8 +#define I2C_DATA_IN2_DATA_IN2_SHIFT 0 + + +/**************************************************************************** + * I2C :: DATA_IN3 + ***************************************************************************/ +/* I2C :: DATA_IN3 :: reserved0 [31:08] */ +#define I2C_DATA_IN3_reserved0_MASK 0xffffff00 +#define I2C_DATA_IN3_reserved0_ALIGN 0 +#define I2C_DATA_IN3_reserved0_BITS 24 +#define I2C_DATA_IN3_reserved0_SHIFT 8 + +/* I2C :: DATA_IN3 :: DATA_IN3 [07:00] */ +#define I2C_DATA_IN3_DATA_IN3_MASK 0x000000ff +#define I2C_DATA_IN3_DATA_IN3_ALIGN 0 +#define I2C_DATA_IN3_DATA_IN3_BITS 8 +#define I2C_DATA_IN3_DATA_IN3_SHIFT 0 + + +/**************************************************************************** + * I2C :: DATA_IN4 + ***************************************************************************/ +/* I2C :: DATA_IN4 :: reserved0 [31:08] */ +#define I2C_DATA_IN4_reserved0_MASK 0xffffff00 +#define I2C_DATA_IN4_reserved0_ALIGN 0 +#define I2C_DATA_IN4_reserved0_BITS 24 +#define I2C_DATA_IN4_reserved0_SHIFT 8 + +/* I2C :: DATA_IN4 :: DATA_IN4 [07:00] */ +#define I2C_DATA_IN4_DATA_IN4_MASK 0x000000ff +#define I2C_DATA_IN4_DATA_IN4_ALIGN 0 +#define I2C_DATA_IN4_DATA_IN4_BITS 8 +#define I2C_DATA_IN4_DATA_IN4_SHIFT 0 + + +/**************************************************************************** + * I2C :: DATA_IN5 + ***************************************************************************/ +/* I2C :: DATA_IN5 :: reserved0 [31:08] */ +#define I2C_DATA_IN5_reserved0_MASK 0xffffff00 +#define I2C_DATA_IN5_reserved0_ALIGN 0 +#define I2C_DATA_IN5_reserved0_BITS 24 +#define I2C_DATA_IN5_reserved0_SHIFT 8 + +/* I2C :: DATA_IN5 :: DATA_IN5 [07:00] */ +#define I2C_DATA_IN5_DATA_IN5_MASK 0x000000ff +#define I2C_DATA_IN5_DATA_IN5_ALIGN 0 +#define I2C_DATA_IN5_DATA_IN5_BITS 8 +#define I2C_DATA_IN5_DATA_IN5_SHIFT 0 + + +/**************************************************************************** + * I2C :: DATA_IN6 + ***************************************************************************/ +/* I2C :: DATA_IN6 :: reserved0 [31:08] */ +#define I2C_DATA_IN6_reserved0_MASK 0xffffff00 +#define I2C_DATA_IN6_reserved0_ALIGN 0 +#define I2C_DATA_IN6_reserved0_BITS 24 +#define I2C_DATA_IN6_reserved0_SHIFT 8 + +/* I2C :: DATA_IN6 :: DATA_IN6 [07:00] */ +#define I2C_DATA_IN6_DATA_IN6_MASK 0x000000ff +#define I2C_DATA_IN6_DATA_IN6_ALIGN 0 +#define I2C_DATA_IN6_DATA_IN6_BITS 8 +#define I2C_DATA_IN6_DATA_IN6_SHIFT 0 + + +/**************************************************************************** + * I2C :: DATA_IN7 + ***************************************************************************/ +/* I2C :: DATA_IN7 :: reserved0 [31:08] */ +#define I2C_DATA_IN7_reserved0_MASK 0xffffff00 +#define I2C_DATA_IN7_reserved0_ALIGN 0 +#define I2C_DATA_IN7_reserved0_BITS 24 +#define I2C_DATA_IN7_reserved0_SHIFT 8 + +/* I2C :: DATA_IN7 :: DATA_IN7 [07:00] */ +#define I2C_DATA_IN7_DATA_IN7_MASK 0x000000ff +#define I2C_DATA_IN7_DATA_IN7_ALIGN 0 +#define I2C_DATA_IN7_DATA_IN7_BITS 8 +#define I2C_DATA_IN7_DATA_IN7_SHIFT 0 + + +/**************************************************************************** + * I2C :: CNT_REG + ***************************************************************************/ +/* I2C :: CNT_REG :: reserved0 [31:08] */ +#define I2C_CNT_REG_reserved0_MASK 0xffffff00 +#define I2C_CNT_REG_reserved0_ALIGN 0 +#define I2C_CNT_REG_reserved0_BITS 24 +#define I2C_CNT_REG_reserved0_SHIFT 8 + +/* I2C :: CNT_REG :: CNT_REG2 [07:04] */ +#define I2C_CNT_REG_CNT_REG2_MASK 0x000000f0 +#define I2C_CNT_REG_CNT_REG2_ALIGN 0 +#define I2C_CNT_REG_CNT_REG2_BITS 4 +#define I2C_CNT_REG_CNT_REG2_SHIFT 4 + +/* I2C :: CNT_REG :: CNT_REG1 [03:00] */ +#define I2C_CNT_REG_CNT_REG1_MASK 0x0000000f +#define I2C_CNT_REG_CNT_REG1_ALIGN 0 +#define I2C_CNT_REG_CNT_REG1_BITS 4 +#define I2C_CNT_REG_CNT_REG1_SHIFT 0 + + +/**************************************************************************** + * I2C :: CTL_REG + ***************************************************************************/ +/* I2C :: CTL_REG :: reserved0 [31:08] */ +#define I2C_CTL_REG_reserved0_MASK 0xffffff00 +#define I2C_CTL_REG_reserved0_ALIGN 0 +#define I2C_CTL_REG_reserved0_BITS 24 +#define I2C_CTL_REG_reserved0_SHIFT 8 + +/* I2C :: CTL_REG :: DIV_CLK [07:07] */ +#define I2C_CTL_REG_DIV_CLK_MASK 0x00000080 +#define I2C_CTL_REG_DIV_CLK_ALIGN 0 +#define I2C_CTL_REG_DIV_CLK_BITS 1 +#define I2C_CTL_REG_DIV_CLK_SHIFT 7 + +/* I2C :: CTL_REG :: INT_EN [06:06] */ +#define I2C_CTL_REG_INT_EN_MASK 0x00000040 +#define I2C_CTL_REG_INT_EN_ALIGN 0 +#define I2C_CTL_REG_INT_EN_BITS 1 +#define I2C_CTL_REG_INT_EN_SHIFT 6 + +/* I2C :: CTL_REG :: SCL_SEL [05:04] */ +#define I2C_CTL_REG_SCL_SEL_MASK 0x00000030 +#define I2C_CTL_REG_SCL_SEL_ALIGN 0 +#define I2C_CTL_REG_SCL_SEL_BITS 2 +#define I2C_CTL_REG_SCL_SEL_SHIFT 4 + +/* I2C :: CTL_REG :: DELAY_DIS [03:03] */ +#define I2C_CTL_REG_DELAY_DIS_MASK 0x00000008 +#define I2C_CTL_REG_DELAY_DIS_ALIGN 0 +#define I2C_CTL_REG_DELAY_DIS_BITS 1 +#define I2C_CTL_REG_DELAY_DIS_SHIFT 3 + +/* I2C :: CTL_REG :: DEGLITCH_DIS [02:02] */ +#define I2C_CTL_REG_DEGLITCH_DIS_MASK 0x00000004 +#define I2C_CTL_REG_DEGLITCH_DIS_ALIGN 0 +#define I2C_CTL_REG_DEGLITCH_DIS_BITS 1 +#define I2C_CTL_REG_DEGLITCH_DIS_SHIFT 2 + +/* I2C :: CTL_REG :: DTF [01:00] */ +#define I2C_CTL_REG_DTF_MASK 0x00000003 +#define I2C_CTL_REG_DTF_ALIGN 0 +#define I2C_CTL_REG_DTF_BITS 2 +#define I2C_CTL_REG_DTF_SHIFT 0 + + +/**************************************************************************** + * I2C :: IIC_ENABLE + ***************************************************************************/ +/* I2C :: IIC_ENABLE :: reserved0 [31:07] */ +#define I2C_IIC_ENABLE_reserved0_MASK 0xffffff80 +#define I2C_IIC_ENABLE_reserved0_ALIGN 0 +#define I2C_IIC_ENABLE_reserved0_BITS 25 +#define I2C_IIC_ENABLE_reserved0_SHIFT 7 + +/* I2C :: IIC_ENABLE :: RESTART [06:06] */ +#define I2C_IIC_ENABLE_RESTART_MASK 0x00000040 +#define I2C_IIC_ENABLE_RESTART_ALIGN 0 +#define I2C_IIC_ENABLE_RESTART_BITS 1 +#define I2C_IIC_ENABLE_RESTART_SHIFT 6 + +/* I2C :: IIC_ENABLE :: NO_START [05:05] */ +#define I2C_IIC_ENABLE_NO_START_MASK 0x00000020 +#define I2C_IIC_ENABLE_NO_START_ALIGN 0 +#define I2C_IIC_ENABLE_NO_START_BITS 1 +#define I2C_IIC_ENABLE_NO_START_SHIFT 5 + +/* I2C :: IIC_ENABLE :: NO_STOP [04:04] */ +#define I2C_IIC_ENABLE_NO_STOP_MASK 0x00000010 +#define I2C_IIC_ENABLE_NO_STOP_ALIGN 0 +#define I2C_IIC_ENABLE_NO_STOP_BITS 1 +#define I2C_IIC_ENABLE_NO_STOP_SHIFT 4 + +/* I2C :: IIC_ENABLE :: reserved1 [03:03] */ +#define I2C_IIC_ENABLE_reserved1_MASK 0x00000008 +#define I2C_IIC_ENABLE_reserved1_ALIGN 0 +#define I2C_IIC_ENABLE_reserved1_BITS 1 +#define I2C_IIC_ENABLE_reserved1_SHIFT 3 + +/* I2C :: IIC_ENABLE :: NO_ACK [02:02] */ +#define I2C_IIC_ENABLE_NO_ACK_MASK 0x00000004 +#define I2C_IIC_ENABLE_NO_ACK_ALIGN 0 +#define I2C_IIC_ENABLE_NO_ACK_BITS 1 +#define I2C_IIC_ENABLE_NO_ACK_SHIFT 2 + +/* I2C :: IIC_ENABLE :: INTRP [01:01] */ +#define I2C_IIC_ENABLE_INTRP_MASK 0x00000002 +#define I2C_IIC_ENABLE_INTRP_ALIGN 0 +#define I2C_IIC_ENABLE_INTRP_BITS 1 +#define I2C_IIC_ENABLE_INTRP_SHIFT 1 + +/* I2C :: IIC_ENABLE :: ENABLE [00:00] */ +#define I2C_IIC_ENABLE_ENABLE_MASK 0x00000001 +#define I2C_IIC_ENABLE_ENABLE_ALIGN 0 +#define I2C_IIC_ENABLE_ENABLE_BITS 1 +#define I2C_IIC_ENABLE_ENABLE_SHIFT 0 + + +/**************************************************************************** + * I2C :: DATA_OUT0 + ***************************************************************************/ +/* I2C :: DATA_OUT0 :: reserved0 [31:08] */ +#define I2C_DATA_OUT0_reserved0_MASK 0xffffff00 +#define I2C_DATA_OUT0_reserved0_ALIGN 0 +#define I2C_DATA_OUT0_reserved0_BITS 24 +#define I2C_DATA_OUT0_reserved0_SHIFT 8 + +/* I2C :: DATA_OUT0 :: DATA_OUT0 [07:00] */ +#define I2C_DATA_OUT0_DATA_OUT0_MASK 0x000000ff +#define I2C_DATA_OUT0_DATA_OUT0_ALIGN 0 +#define I2C_DATA_OUT0_DATA_OUT0_BITS 8 +#define I2C_DATA_OUT0_DATA_OUT0_SHIFT 0 + + +/**************************************************************************** + * I2C :: DATA_OUT1 + ***************************************************************************/ +/* I2C :: DATA_OUT1 :: reserved0 [31:08] */ +#define I2C_DATA_OUT1_reserved0_MASK 0xffffff00 +#define I2C_DATA_OUT1_reserved0_ALIGN 0 +#define I2C_DATA_OUT1_reserved0_BITS 24 +#define I2C_DATA_OUT1_reserved0_SHIFT 8 + +/* I2C :: DATA_OUT1 :: DATA_OUT1 [07:00] */ +#define I2C_DATA_OUT1_DATA_OUT1_MASK 0x000000ff +#define I2C_DATA_OUT1_DATA_OUT1_ALIGN 0 +#define I2C_DATA_OUT1_DATA_OUT1_BITS 8 +#define I2C_DATA_OUT1_DATA_OUT1_SHIFT 0 + + +/**************************************************************************** + * I2C :: DATA_OUT2 + ***************************************************************************/ +/* I2C :: DATA_OUT2 :: reserved0 [31:08] */ +#define I2C_DATA_OUT2_reserved0_MASK 0xffffff00 +#define I2C_DATA_OUT2_reserved0_ALIGN 0 +#define I2C_DATA_OUT2_reserved0_BITS 24 +#define I2C_DATA_OUT2_reserved0_SHIFT 8 + +/* I2C :: DATA_OUT2 :: DATA_OUT2 [07:00] */ +#define I2C_DATA_OUT2_DATA_OUT2_MASK 0x000000ff +#define I2C_DATA_OUT2_DATA_OUT2_ALIGN 0 +#define I2C_DATA_OUT2_DATA_OUT2_BITS 8 +#define I2C_DATA_OUT2_DATA_OUT2_SHIFT 0 + + +/**************************************************************************** + * I2C :: DATA_OUT3 + ***************************************************************************/ +/* I2C :: DATA_OUT3 :: reserved0 [31:08] */ +#define I2C_DATA_OUT3_reserved0_MASK 0xffffff00 +#define I2C_DATA_OUT3_reserved0_ALIGN 0 +#define I2C_DATA_OUT3_reserved0_BITS 24 +#define I2C_DATA_OUT3_reserved0_SHIFT 8 + +/* I2C :: DATA_OUT3 :: DATA_OUT3 [07:00] */ +#define I2C_DATA_OUT3_DATA_OUT3_MASK 0x000000ff +#define I2C_DATA_OUT3_DATA_OUT3_ALIGN 0 +#define I2C_DATA_OUT3_DATA_OUT3_BITS 8 +#define I2C_DATA_OUT3_DATA_OUT3_SHIFT 0 + + +/**************************************************************************** + * I2C :: DATA_OUT4 + ***************************************************************************/ +/* I2C :: DATA_OUT4 :: reserved0 [31:08] */ +#define I2C_DATA_OUT4_reserved0_MASK 0xffffff00 +#define I2C_DATA_OUT4_reserved0_ALIGN 0 +#define I2C_DATA_OUT4_reserved0_BITS 24 +#define I2C_DATA_OUT4_reserved0_SHIFT 8 + +/* I2C :: DATA_OUT4 :: DATA_OUT4 [07:00] */ +#define I2C_DATA_OUT4_DATA_OUT4_MASK 0x000000ff +#define I2C_DATA_OUT4_DATA_OUT4_ALIGN 0 +#define I2C_DATA_OUT4_DATA_OUT4_BITS 8 +#define I2C_DATA_OUT4_DATA_OUT4_SHIFT 0 + + +/**************************************************************************** + * I2C :: DATA_OUT5 + ***************************************************************************/ +/* I2C :: DATA_OUT5 :: reserved0 [31:08] */ +#define I2C_DATA_OUT5_reserved0_MASK 0xffffff00 +#define I2C_DATA_OUT5_reserved0_ALIGN 0 +#define I2C_DATA_OUT5_reserved0_BITS 24 +#define I2C_DATA_OUT5_reserved0_SHIFT 8 + +/* I2C :: DATA_OUT5 :: DATA_OUT5 [07:00] */ +#define I2C_DATA_OUT5_DATA_OUT5_MASK 0x000000ff +#define I2C_DATA_OUT5_DATA_OUT5_ALIGN 0 +#define I2C_DATA_OUT5_DATA_OUT5_BITS 8 +#define I2C_DATA_OUT5_DATA_OUT5_SHIFT 0 + + +/**************************************************************************** + * I2C :: DATA_OUT6 + ***************************************************************************/ +/* I2C :: DATA_OUT6 :: reserved0 [31:08] */ +#define I2C_DATA_OUT6_reserved0_MASK 0xffffff00 +#define I2C_DATA_OUT6_reserved0_ALIGN 0 +#define I2C_DATA_OUT6_reserved0_BITS 24 +#define I2C_DATA_OUT6_reserved0_SHIFT 8 + +/* I2C :: DATA_OUT6 :: DATA_OUT6 [07:00] */ +#define I2C_DATA_OUT6_DATA_OUT6_MASK 0x000000ff +#define I2C_DATA_OUT6_DATA_OUT6_ALIGN 0 +#define I2C_DATA_OUT6_DATA_OUT6_BITS 8 +#define I2C_DATA_OUT6_DATA_OUT6_SHIFT 0 + + +/**************************************************************************** + * I2C :: DATA_OUT7 + ***************************************************************************/ +/* I2C :: DATA_OUT7 :: reserved0 [31:08] */ +#define I2C_DATA_OUT7_reserved0_MASK 0xffffff00 +#define I2C_DATA_OUT7_reserved0_ALIGN 0 +#define I2C_DATA_OUT7_reserved0_BITS 24 +#define I2C_DATA_OUT7_reserved0_SHIFT 8 + +/* I2C :: DATA_OUT7 :: DATA_OUT7 [07:00] */ +#define I2C_DATA_OUT7_DATA_OUT7_MASK 0x000000ff +#define I2C_DATA_OUT7_DATA_OUT7_ALIGN 0 +#define I2C_DATA_OUT7_DATA_OUT7_BITS 8 +#define I2C_DATA_OUT7_DATA_OUT7_SHIFT 0 + + +/**************************************************************************** + * I2C :: CTLHI_REG + ***************************************************************************/ +/* I2C :: CTLHI_REG :: reserved0 [31:02] */ +#define I2C_CTLHI_REG_reserved0_MASK 0xfffffffc +#define I2C_CTLHI_REG_reserved0_ALIGN 0 +#define I2C_CTLHI_REG_reserved0_BITS 30 +#define I2C_CTLHI_REG_reserved0_SHIFT 2 + +/* I2C :: CTLHI_REG :: IGNORE_ACK [01:01] */ +#define I2C_CTLHI_REG_IGNORE_ACK_MASK 0x00000002 +#define I2C_CTLHI_REG_IGNORE_ACK_ALIGN 0 +#define I2C_CTLHI_REG_IGNORE_ACK_BITS 1 +#define I2C_CTLHI_REG_IGNORE_ACK_SHIFT 1 + +/* I2C :: CTLHI_REG :: WAIT_DIS [00:00] */ +#define I2C_CTLHI_REG_WAIT_DIS_MASK 0x00000001 +#define I2C_CTLHI_REG_WAIT_DIS_ALIGN 0 +#define I2C_CTLHI_REG_WAIT_DIS_BITS 1 +#define I2C_CTLHI_REG_WAIT_DIS_SHIFT 0 + + +/**************************************************************************** + * I2C :: SCL_PARAM + ***************************************************************************/ +/* I2C :: SCL_PARAM :: reserved0 [31:00] */ +#define I2C_SCL_PARAM_reserved0_MASK 0xffffffff +#define I2C_SCL_PARAM_reserved0_ALIGN 0 +#define I2C_SCL_PARAM_reserved0_BITS 32 +#define I2C_SCL_PARAM_reserved0_SHIFT 0 + + +/**************************************************************************** + * BCM70012_I2C_TOP_I2C_GR_BRIDGE + ***************************************************************************/ +/**************************************************************************** + * I2C_GR_BRIDGE :: REVISION + ***************************************************************************/ +/* I2C_GR_BRIDGE :: REVISION :: reserved0 [31:16] */ +#define I2C_GR_BRIDGE_REVISION_reserved0_MASK 0xffff0000 +#define I2C_GR_BRIDGE_REVISION_reserved0_ALIGN 0 +#define I2C_GR_BRIDGE_REVISION_reserved0_BITS 16 +#define I2C_GR_BRIDGE_REVISION_reserved0_SHIFT 16 + +/* I2C_GR_BRIDGE :: REVISION :: MAJOR [15:08] */ +#define I2C_GR_BRIDGE_REVISION_MAJOR_MASK 0x0000ff00 +#define I2C_GR_BRIDGE_REVISION_MAJOR_ALIGN 0 +#define I2C_GR_BRIDGE_REVISION_MAJOR_BITS 8 +#define I2C_GR_BRIDGE_REVISION_MAJOR_SHIFT 8 + +/* I2C_GR_BRIDGE :: REVISION :: MINOR [07:00] */ +#define I2C_GR_BRIDGE_REVISION_MINOR_MASK 0x000000ff +#define I2C_GR_BRIDGE_REVISION_MINOR_ALIGN 0 +#define I2C_GR_BRIDGE_REVISION_MINOR_BITS 8 +#define I2C_GR_BRIDGE_REVISION_MINOR_SHIFT 0 + + +/**************************************************************************** + * I2C_GR_BRIDGE :: CTRL + ***************************************************************************/ +/* I2C_GR_BRIDGE :: CTRL :: reserved0 [31:01] */ +#define I2C_GR_BRIDGE_CTRL_reserved0_MASK 0xfffffffe +#define I2C_GR_BRIDGE_CTRL_reserved0_ALIGN 0 +#define I2C_GR_BRIDGE_CTRL_reserved0_BITS 31 +#define I2C_GR_BRIDGE_CTRL_reserved0_SHIFT 1 + +/* I2C_GR_BRIDGE :: CTRL :: gisb_error_intr [00:00] */ +#define I2C_GR_BRIDGE_CTRL_gisb_error_intr_MASK 0x00000001 +#define I2C_GR_BRIDGE_CTRL_gisb_error_intr_ALIGN 0 +#define I2C_GR_BRIDGE_CTRL_gisb_error_intr_BITS 1 +#define I2C_GR_BRIDGE_CTRL_gisb_error_intr_SHIFT 0 +#define I2C_GR_BRIDGE_CTRL_gisb_error_intr_INTR_DISABLE 0 +#define I2C_GR_BRIDGE_CTRL_gisb_error_intr_INTR_ENABLE 1 + + +/**************************************************************************** + * I2C_GR_BRIDGE :: SPARE_SW_RESET_0 + ***************************************************************************/ +/* I2C_GR_BRIDGE :: SPARE_SW_RESET_0 :: reserved0 [31:01] */ +#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_MASK 0xfffffffe +#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_ALIGN 0 +#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_BITS 31 +#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_SHIFT 1 + +/* I2C_GR_BRIDGE :: SPARE_SW_RESET_0 :: SPARE_SW_RESET [00:00] */ +#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_MASK 0x00000001 +#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ALIGN 0 +#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_BITS 1 +#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_SHIFT 0 +#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_DEASSERT 0 +#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ASSERT 1 + + +/**************************************************************************** + * I2C_GR_BRIDGE :: SPARE_SW_RESET_1 + ***************************************************************************/ +/* I2C_GR_BRIDGE :: SPARE_SW_RESET_1 :: reserved0 [31:01] */ +#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_MASK 0xfffffffe +#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_ALIGN 0 +#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_BITS 31 +#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_SHIFT 1 + +/* I2C_GR_BRIDGE :: SPARE_SW_RESET_1 :: SPARE_SW_RESET [00:00] */ +#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_MASK 0x00000001 +#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ALIGN 0 +#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_BITS 1 +#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_SHIFT 0 +#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_DEASSERT 0 +#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ASSERT 1 + + +/**************************************************************************** + * BCM70012_MISC_TOP_MISC1 + ***************************************************************************/ +/**************************************************************************** + * MISC1 :: TX_FIRST_DESC_L_ADDR_LIST0 + ***************************************************************************/ +/* MISC1 :: TX_FIRST_DESC_L_ADDR_LIST0 :: DESC_ADDR [31:05] */ +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_MASK 0xffffffe0 +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_ALIGN 0 +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_BITS 27 +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_SHIFT 5 + +/* MISC1 :: TX_FIRST_DESC_L_ADDR_LIST0 :: reserved0 [04:01] */ +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_reserved0_MASK 0x0000001e +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_reserved0_ALIGN 0 +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_reserved0_BITS 4 +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_reserved0_SHIFT 1 + +/* MISC1 :: TX_FIRST_DESC_L_ADDR_LIST0 :: TX_DESC_LIST0_VALID [00:00] */ +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_TX_DESC_LIST0_VALID_MASK 0x00000001 +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_TX_DESC_LIST0_VALID_ALIGN 0 +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_TX_DESC_LIST0_VALID_BITS 1 +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_TX_DESC_LIST0_VALID_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: TX_FIRST_DESC_U_ADDR_LIST0 + ***************************************************************************/ +/* MISC1 :: TX_FIRST_DESC_U_ADDR_LIST0 :: DESC_ADDR [31:00] */ +#define MISC1_TX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_MASK 0xffffffff +#define MISC1_TX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_ALIGN 0 +#define MISC1_TX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_BITS 32 +#define MISC1_TX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: TX_FIRST_DESC_L_ADDR_LIST1 + ***************************************************************************/ +/* MISC1 :: TX_FIRST_DESC_L_ADDR_LIST1 :: DESC_ADDR [31:05] */ +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_MASK 0xffffffe0 +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_ALIGN 0 +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_BITS 27 +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_SHIFT 5 + +/* MISC1 :: TX_FIRST_DESC_L_ADDR_LIST1 :: reserved0 [04:01] */ +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_reserved0_MASK 0x0000001e +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_reserved0_ALIGN 0 +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_reserved0_BITS 4 +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_reserved0_SHIFT 1 + +/* MISC1 :: TX_FIRST_DESC_L_ADDR_LIST1 :: TX_DESC_LIST1_VALID [00:00] */ +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_TX_DESC_LIST1_VALID_MASK 0x00000001 +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_TX_DESC_LIST1_VALID_ALIGN 0 +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_TX_DESC_LIST1_VALID_BITS 1 +#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_TX_DESC_LIST1_VALID_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: TX_FIRST_DESC_U_ADDR_LIST1 + ***************************************************************************/ +/* MISC1 :: TX_FIRST_DESC_U_ADDR_LIST1 :: DESC_ADDR [31:00] */ +#define MISC1_TX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_MASK 0xffffffff +#define MISC1_TX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_ALIGN 0 +#define MISC1_TX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_BITS 32 +#define MISC1_TX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: TX_SW_DESC_LIST_CTRL_STS + ***************************************************************************/ +/* MISC1 :: TX_SW_DESC_LIST_CTRL_STS :: reserved0 [31:04] */ +#define MISC1_TX_SW_DESC_LIST_CTRL_STS_reserved0_MASK 0xfffffff0 +#define MISC1_TX_SW_DESC_LIST_CTRL_STS_reserved0_ALIGN 0 +#define MISC1_TX_SW_DESC_LIST_CTRL_STS_reserved0_BITS 28 +#define MISC1_TX_SW_DESC_LIST_CTRL_STS_reserved0_SHIFT 4 + +/* MISC1 :: TX_SW_DESC_LIST_CTRL_STS :: DMA_DATA_SERV_PTR [03:03] */ +#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_MASK 0x00000008 +#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_ALIGN 0 +#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_BITS 1 +#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_SHIFT 3 + +/* MISC1 :: TX_SW_DESC_LIST_CTRL_STS :: DESC_SERV_PTR [02:02] */ +#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_MASK 0x00000004 +#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_ALIGN 0 +#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_BITS 1 +#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_SHIFT 2 + +/* MISC1 :: TX_SW_DESC_LIST_CTRL_STS :: TX_DMA_HALT_ON_ERROR [01:01] */ +#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_HALT_ON_ERROR_MASK 0x00000002 +#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_HALT_ON_ERROR_ALIGN 0 +#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_HALT_ON_ERROR_BITS 1 +#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_HALT_ON_ERROR_SHIFT 1 + +/* MISC1 :: TX_SW_DESC_LIST_CTRL_STS :: TX_DMA_RUN_STOP [00:00] */ +#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_MASK 0x00000001 +#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_ALIGN 0 +#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_BITS 1 +#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: TX_DMA_ERROR_STATUS + ***************************************************************************/ +/* MISC1 :: TX_DMA_ERROR_STATUS :: reserved0 [31:10] */ +#define MISC1_TX_DMA_ERROR_STATUS_reserved0_MASK 0xfffffc00 +#define MISC1_TX_DMA_ERROR_STATUS_reserved0_ALIGN 0 +#define MISC1_TX_DMA_ERROR_STATUS_reserved0_BITS 22 +#define MISC1_TX_DMA_ERROR_STATUS_reserved0_SHIFT 10 + +/* MISC1 :: TX_DMA_ERROR_STATUS :: TX_L1_DESC_TX_ABORT_ERRORS [09:09] */ +#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DESC_TX_ABORT_ERRORS_MASK 0x00000200 +#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DESC_TX_ABORT_ERRORS_ALIGN 0 +#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DESC_TX_ABORT_ERRORS_BITS 1 +#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DESC_TX_ABORT_ERRORS_SHIFT 9 + +/* MISC1 :: TX_DMA_ERROR_STATUS :: reserved1 [08:08] */ +#define MISC1_TX_DMA_ERROR_STATUS_reserved1_MASK 0x00000100 +#define MISC1_TX_DMA_ERROR_STATUS_reserved1_ALIGN 0 +#define MISC1_TX_DMA_ERROR_STATUS_reserved1_BITS 1 +#define MISC1_TX_DMA_ERROR_STATUS_reserved1_SHIFT 8 + +/* MISC1 :: TX_DMA_ERROR_STATUS :: TX_L0_DESC_TX_ABORT_ERRORS [07:07] */ +#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DESC_TX_ABORT_ERRORS_MASK 0x00000080 +#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DESC_TX_ABORT_ERRORS_ALIGN 0 +#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DESC_TX_ABORT_ERRORS_BITS 1 +#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DESC_TX_ABORT_ERRORS_SHIFT 7 + +/* MISC1 :: TX_DMA_ERROR_STATUS :: reserved2 [06:06] */ +#define MISC1_TX_DMA_ERROR_STATUS_reserved2_MASK 0x00000040 +#define MISC1_TX_DMA_ERROR_STATUS_reserved2_ALIGN 0 +#define MISC1_TX_DMA_ERROR_STATUS_reserved2_BITS 1 +#define MISC1_TX_DMA_ERROR_STATUS_reserved2_SHIFT 6 + +/* MISC1 :: TX_DMA_ERROR_STATUS :: TX_L1_DMA_DATA_TX_ABORT_ERRORS [05:05] */ +#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DMA_DATA_TX_ABORT_ERRORS_MASK 0x00000020 +#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DMA_DATA_TX_ABORT_ERRORS_ALIGN 0 +#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DMA_DATA_TX_ABORT_ERRORS_BITS 1 +#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DMA_DATA_TX_ABORT_ERRORS_SHIFT 5 + +/* MISC1 :: TX_DMA_ERROR_STATUS :: TX_L1_FIFO_FULL_ERRORS [04:04] */ +#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_MASK 0x00000010 +#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_ALIGN 0 +#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_BITS 1 +#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_SHIFT 4 + +/* MISC1 :: TX_DMA_ERROR_STATUS :: reserved3 [03:03] */ +#define MISC1_TX_DMA_ERROR_STATUS_reserved3_MASK 0x00000008 +#define MISC1_TX_DMA_ERROR_STATUS_reserved3_ALIGN 0 +#define MISC1_TX_DMA_ERROR_STATUS_reserved3_BITS 1 +#define MISC1_TX_DMA_ERROR_STATUS_reserved3_SHIFT 3 + +/* MISC1 :: TX_DMA_ERROR_STATUS :: TX_L0_DMA_DATA_TX_ABORT_ERRORS [02:02] */ +#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DMA_DATA_TX_ABORT_ERRORS_MASK 0x00000004 +#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DMA_DATA_TX_ABORT_ERRORS_ALIGN 0 +#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DMA_DATA_TX_ABORT_ERRORS_BITS 1 +#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DMA_DATA_TX_ABORT_ERRORS_SHIFT 2 + +/* MISC1 :: TX_DMA_ERROR_STATUS :: TX_L0_FIFO_FULL_ERRORS [01:01] */ +#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_MASK 0x00000002 +#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_ALIGN 0 +#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_BITS 1 +#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_SHIFT 1 + +/* MISC1 :: TX_DMA_ERROR_STATUS :: reserved4 [00:00] */ +#define MISC1_TX_DMA_ERROR_STATUS_reserved4_MASK 0x00000001 +#define MISC1_TX_DMA_ERROR_STATUS_reserved4_ALIGN 0 +#define MISC1_TX_DMA_ERROR_STATUS_reserved4_BITS 1 +#define MISC1_TX_DMA_ERROR_STATUS_reserved4_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: TX_DMA_LIST0_CUR_DESC_L_ADDR + ***************************************************************************/ +/* MISC1 :: TX_DMA_LIST0_CUR_DESC_L_ADDR :: TX_DMA_L0_CUR_DESC_L_ADDR [31:05] */ +#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR_TX_DMA_L0_CUR_DESC_L_ADDR_MASK 0xffffffe0 +#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR_TX_DMA_L0_CUR_DESC_L_ADDR_ALIGN 0 +#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR_TX_DMA_L0_CUR_DESC_L_ADDR_BITS 27 +#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR_TX_DMA_L0_CUR_DESC_L_ADDR_SHIFT 5 + +/* MISC1 :: TX_DMA_LIST0_CUR_DESC_L_ADDR :: reserved0 [04:00] */ +#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR_reserved0_MASK 0x0000001f +#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR_reserved0_ALIGN 0 +#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR_reserved0_BITS 5 +#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR_reserved0_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: TX_DMA_LIST0_CUR_DESC_U_ADDR + ***************************************************************************/ +/* MISC1 :: TX_DMA_LIST0_CUR_DESC_U_ADDR :: TX_DMA_L0_CUR_DESC_U_ADDR [31:00] */ +#define MISC1_TX_DMA_LIST0_CUR_DESC_U_ADDR_TX_DMA_L0_CUR_DESC_U_ADDR_MASK 0xffffffff +#define MISC1_TX_DMA_LIST0_CUR_DESC_U_ADDR_TX_DMA_L0_CUR_DESC_U_ADDR_ALIGN 0 +#define MISC1_TX_DMA_LIST0_CUR_DESC_U_ADDR_TX_DMA_L0_CUR_DESC_U_ADDR_BITS 32 +#define MISC1_TX_DMA_LIST0_CUR_DESC_U_ADDR_TX_DMA_L0_CUR_DESC_U_ADDR_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: TX_DMA_LIST0_CUR_BYTE_CNT_REM + ***************************************************************************/ +/* MISC1 :: TX_DMA_LIST0_CUR_BYTE_CNT_REM :: reserved0 [31:24] */ +#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_reserved0_MASK 0xff000000 +#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_reserved0_ALIGN 0 +#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_reserved0_BITS 8 +#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_reserved0_SHIFT 24 + +/* MISC1 :: TX_DMA_LIST0_CUR_BYTE_CNT_REM :: TX_DMA_L0_CUR_BYTE_CNT_REM [23:02] */ +#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_TX_DMA_L0_CUR_BYTE_CNT_REM_MASK 0x00fffffc +#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_TX_DMA_L0_CUR_BYTE_CNT_REM_ALIGN 0 +#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_TX_DMA_L0_CUR_BYTE_CNT_REM_BITS 22 +#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_TX_DMA_L0_CUR_BYTE_CNT_REM_SHIFT 2 + +/* MISC1 :: TX_DMA_LIST0_CUR_BYTE_CNT_REM :: reserved1 [01:00] */ +#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_reserved1_MASK 0x00000003 +#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_reserved1_ALIGN 0 +#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_reserved1_BITS 2 +#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_reserved1_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: TX_DMA_LIST1_CUR_DESC_L_ADDR + ***************************************************************************/ +/* MISC1 :: TX_DMA_LIST1_CUR_DESC_L_ADDR :: TX_DMA_L1_CUR_DESC_L_ADDR [31:05] */ +#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR_TX_DMA_L1_CUR_DESC_L_ADDR_MASK 0xffffffe0 +#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR_TX_DMA_L1_CUR_DESC_L_ADDR_ALIGN 0 +#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR_TX_DMA_L1_CUR_DESC_L_ADDR_BITS 27 +#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR_TX_DMA_L1_CUR_DESC_L_ADDR_SHIFT 5 + +/* MISC1 :: TX_DMA_LIST1_CUR_DESC_L_ADDR :: reserved0 [04:00] */ +#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR_reserved0_MASK 0x0000001f +#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR_reserved0_ALIGN 0 +#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR_reserved0_BITS 5 +#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR_reserved0_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: TX_DMA_LIST1_CUR_DESC_U_ADDR + ***************************************************************************/ +/* MISC1 :: TX_DMA_LIST1_CUR_DESC_U_ADDR :: TX_DMA_L1_CUR_DESC_U_ADDR [31:00] */ +#define MISC1_TX_DMA_LIST1_CUR_DESC_U_ADDR_TX_DMA_L1_CUR_DESC_U_ADDR_MASK 0xffffffff +#define MISC1_TX_DMA_LIST1_CUR_DESC_U_ADDR_TX_DMA_L1_CUR_DESC_U_ADDR_ALIGN 0 +#define MISC1_TX_DMA_LIST1_CUR_DESC_U_ADDR_TX_DMA_L1_CUR_DESC_U_ADDR_BITS 32 +#define MISC1_TX_DMA_LIST1_CUR_DESC_U_ADDR_TX_DMA_L1_CUR_DESC_U_ADDR_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: TX_DMA_LIST1_CUR_BYTE_CNT_REM + ***************************************************************************/ +/* MISC1 :: TX_DMA_LIST1_CUR_BYTE_CNT_REM :: reserved0 [31:24] */ +#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_reserved0_MASK 0xff000000 +#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_reserved0_ALIGN 0 +#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_reserved0_BITS 8 +#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_reserved0_SHIFT 24 + +/* MISC1 :: TX_DMA_LIST1_CUR_BYTE_CNT_REM :: TX_DMA_L1_CUR_BYTE_CNT_REM [23:02] */ +#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_TX_DMA_L1_CUR_BYTE_CNT_REM_MASK 0x00fffffc +#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_TX_DMA_L1_CUR_BYTE_CNT_REM_ALIGN 0 +#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_TX_DMA_L1_CUR_BYTE_CNT_REM_BITS 22 +#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_TX_DMA_L1_CUR_BYTE_CNT_REM_SHIFT 2 + +/* MISC1 :: TX_DMA_LIST1_CUR_BYTE_CNT_REM :: reserved1 [01:00] */ +#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_reserved1_MASK 0x00000003 +#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_reserved1_ALIGN 0 +#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_reserved1_BITS 2 +#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_reserved1_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: Y_RX_FIRST_DESC_L_ADDR_LIST0 + ***************************************************************************/ +/* MISC1 :: Y_RX_FIRST_DESC_L_ADDR_LIST0 :: DESC_ADDR [31:05] */ +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_MASK 0xffffffe0 +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_ALIGN 0 +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_BITS 27 +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_SHIFT 5 + +/* MISC1 :: Y_RX_FIRST_DESC_L_ADDR_LIST0 :: reserved0 [04:01] */ +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_reserved0_MASK 0x0000001e +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_reserved0_ALIGN 0 +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_reserved0_BITS 4 +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_reserved0_SHIFT 1 + +/* MISC1 :: Y_RX_FIRST_DESC_L_ADDR_LIST0 :: RX_DESC_LIST0_VALID [00:00] */ +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_RX_DESC_LIST0_VALID_MASK 0x00000001 +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_RX_DESC_LIST0_VALID_ALIGN 0 +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_RX_DESC_LIST0_VALID_BITS 1 +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_RX_DESC_LIST0_VALID_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: Y_RX_FIRST_DESC_U_ADDR_LIST0 + ***************************************************************************/ +/* MISC1 :: Y_RX_FIRST_DESC_U_ADDR_LIST0 :: DESC_ADDR [31:00] */ +#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_MASK 0xffffffff +#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_ALIGN 0 +#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_BITS 32 +#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: Y_RX_FIRST_DESC_L_ADDR_LIST1 + ***************************************************************************/ +/* MISC1 :: Y_RX_FIRST_DESC_L_ADDR_LIST1 :: DESC_ADDR [31:05] */ +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_MASK 0xffffffe0 +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_ALIGN 0 +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_BITS 27 +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_SHIFT 5 + +/* MISC1 :: Y_RX_FIRST_DESC_L_ADDR_LIST1 :: reserved0 [04:01] */ +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_reserved0_MASK 0x0000001e +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_reserved0_ALIGN 0 +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_reserved0_BITS 4 +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_reserved0_SHIFT 1 + +/* MISC1 :: Y_RX_FIRST_DESC_L_ADDR_LIST1 :: RX_DESC_LIST1_VALID [00:00] */ +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_RX_DESC_LIST1_VALID_MASK 0x00000001 +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_RX_DESC_LIST1_VALID_ALIGN 0 +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_RX_DESC_LIST1_VALID_BITS 1 +#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_RX_DESC_LIST1_VALID_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: Y_RX_FIRST_DESC_U_ADDR_LIST1 + ***************************************************************************/ +/* MISC1 :: Y_RX_FIRST_DESC_U_ADDR_LIST1 :: DESC_ADDR [31:00] */ +#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_MASK 0xffffffff +#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_ALIGN 0 +#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_BITS 32 +#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: Y_RX_SW_DESC_LIST_CTRL_STS + ***************************************************************************/ +/* MISC1 :: Y_RX_SW_DESC_LIST_CTRL_STS :: reserved0 [31:04] */ +#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_reserved0_MASK 0xfffffff0 +#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_reserved0_ALIGN 0 +#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_reserved0_BITS 28 +#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_reserved0_SHIFT 4 + +/* MISC1 :: Y_RX_SW_DESC_LIST_CTRL_STS :: DMA_DATA_SERV_PTR [03:03] */ +#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_MASK 0x00000008 +#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_ALIGN 0 +#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_BITS 1 +#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_SHIFT 3 + +/* MISC1 :: Y_RX_SW_DESC_LIST_CTRL_STS :: DESC_SERV_PTR [02:02] */ +#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_MASK 0x00000004 +#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_ALIGN 0 +#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_BITS 1 +#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_SHIFT 2 + +/* MISC1 :: Y_RX_SW_DESC_LIST_CTRL_STS :: RX_HALT_ON_ERROR [01:01] */ +#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_RX_HALT_ON_ERROR_MASK 0x00000002 +#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_RX_HALT_ON_ERROR_ALIGN 0 +#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_RX_HALT_ON_ERROR_BITS 1 +#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_RX_HALT_ON_ERROR_SHIFT 1 + +/* MISC1 :: Y_RX_SW_DESC_LIST_CTRL_STS :: RX_RUN_STOP [00:00] */ +#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_RX_RUN_STOP_MASK 0x00000001 +#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_RX_RUN_STOP_ALIGN 0 +#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_RX_RUN_STOP_BITS 1 +#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_RX_RUN_STOP_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: Y_RX_ERROR_STATUS + ***************************************************************************/ +/* MISC1 :: Y_RX_ERROR_STATUS :: reserved0 [31:14] */ +#define MISC1_Y_RX_ERROR_STATUS_reserved0_MASK 0xffffc000 +#define MISC1_Y_RX_ERROR_STATUS_reserved0_ALIGN 0 +#define MISC1_Y_RX_ERROR_STATUS_reserved0_BITS 18 +#define MISC1_Y_RX_ERROR_STATUS_reserved0_SHIFT 14 + +/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L1_UNDERRUN_ERROR [13:13] */ +#define MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK 0x00002000 +#define MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_ALIGN 0 +#define MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_BITS 1 +#define MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_SHIFT 13 + +/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L1_OVERRUN_ERROR [12:12] */ +#define MISC1_Y_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_MASK 0x00001000 +#define MISC1_Y_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_ALIGN 0 +#define MISC1_Y_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_BITS 1 +#define MISC1_Y_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_SHIFT 12 + +/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L0_UNDERRUN_ERROR [11:11] */ +#define MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK 0x00000800 +#define MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_ALIGN 0 +#define MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_BITS 1 +#define MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_SHIFT 11 + +/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L0_OVERRUN_ERROR [10:10] */ +#define MISC1_Y_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_MASK 0x00000400 +#define MISC1_Y_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_ALIGN 0 +#define MISC1_Y_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_BITS 1 +#define MISC1_Y_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_SHIFT 10 + +/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L1_DESC_TX_ABORT_ERRORS [09:09] */ +#define MISC1_Y_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_MASK 0x00000200 +#define MISC1_Y_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_ALIGN 0 +#define MISC1_Y_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_BITS 1 +#define MISC1_Y_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_SHIFT 9 + +/* MISC1 :: Y_RX_ERROR_STATUS :: reserved1 [08:08] */ +#define MISC1_Y_RX_ERROR_STATUS_reserved1_MASK 0x00000100 +#define MISC1_Y_RX_ERROR_STATUS_reserved1_ALIGN 0 +#define MISC1_Y_RX_ERROR_STATUS_reserved1_BITS 1 +#define MISC1_Y_RX_ERROR_STATUS_reserved1_SHIFT 8 + +/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L0_DESC_TX_ABORT_ERRORS [07:07] */ +#define MISC1_Y_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_MASK 0x00000080 +#define MISC1_Y_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_ALIGN 0 +#define MISC1_Y_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_BITS 1 +#define MISC1_Y_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_SHIFT 7 + +/* MISC1 :: Y_RX_ERROR_STATUS :: reserved2 [06:05] */ +#define MISC1_Y_RX_ERROR_STATUS_reserved2_MASK 0x00000060 +#define MISC1_Y_RX_ERROR_STATUS_reserved2_ALIGN 0 +#define MISC1_Y_RX_ERROR_STATUS_reserved2_BITS 2 +#define MISC1_Y_RX_ERROR_STATUS_reserved2_SHIFT 5 + +/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L1_FIFO_FULL_ERRORS [04:04] */ +#define MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK 0x00000010 +#define MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_ALIGN 0 +#define MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_BITS 1 +#define MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_SHIFT 4 + +/* MISC1 :: Y_RX_ERROR_STATUS :: reserved3 [03:02] */ +#define MISC1_Y_RX_ERROR_STATUS_reserved3_MASK 0x0000000c +#define MISC1_Y_RX_ERROR_STATUS_reserved3_ALIGN 0 +#define MISC1_Y_RX_ERROR_STATUS_reserved3_BITS 2 +#define MISC1_Y_RX_ERROR_STATUS_reserved3_SHIFT 2 + +/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L0_FIFO_FULL_ERRORS [01:01] */ +#define MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK 0x00000002 +#define MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_ALIGN 0 +#define MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_BITS 1 +#define MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_SHIFT 1 + +/* MISC1 :: Y_RX_ERROR_STATUS :: reserved4 [00:00] */ +#define MISC1_Y_RX_ERROR_STATUS_reserved4_MASK 0x00000001 +#define MISC1_Y_RX_ERROR_STATUS_reserved4_ALIGN 0 +#define MISC1_Y_RX_ERROR_STATUS_reserved4_BITS 1 +#define MISC1_Y_RX_ERROR_STATUS_reserved4_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: Y_RX_LIST0_CUR_DESC_L_ADDR + ***************************************************************************/ +/* MISC1 :: Y_RX_LIST0_CUR_DESC_L_ADDR :: RX_L0_CUR_DESC_L_ADDR [31:05] */ +#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR_RX_L0_CUR_DESC_L_ADDR_MASK 0xffffffe0 +#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR_RX_L0_CUR_DESC_L_ADDR_ALIGN 0 +#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR_RX_L0_CUR_DESC_L_ADDR_BITS 27 +#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR_RX_L0_CUR_DESC_L_ADDR_SHIFT 5 + +/* MISC1 :: Y_RX_LIST0_CUR_DESC_L_ADDR :: reserved0 [04:00] */ +#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR_reserved0_MASK 0x0000001f +#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR_reserved0_ALIGN 0 +#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR_reserved0_BITS 5 +#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR_reserved0_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: Y_RX_LIST0_CUR_DESC_U_ADDR + ***************************************************************************/ +/* MISC1 :: Y_RX_LIST0_CUR_DESC_U_ADDR :: RX_L0_CUR_DESC_U_ADDR [31:00] */ +#define MISC1_Y_RX_LIST0_CUR_DESC_U_ADDR_RX_L0_CUR_DESC_U_ADDR_MASK 0xffffffff +#define MISC1_Y_RX_LIST0_CUR_DESC_U_ADDR_RX_L0_CUR_DESC_U_ADDR_ALIGN 0 +#define MISC1_Y_RX_LIST0_CUR_DESC_U_ADDR_RX_L0_CUR_DESC_U_ADDR_BITS 32 +#define MISC1_Y_RX_LIST0_CUR_DESC_U_ADDR_RX_L0_CUR_DESC_U_ADDR_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: Y_RX_LIST0_CUR_BYTE_CNT + ***************************************************************************/ +/* MISC1 :: Y_RX_LIST0_CUR_BYTE_CNT :: RX_L0_CUR_BYTE_CNT [31:00] */ +#define MISC1_Y_RX_LIST0_CUR_BYTE_CNT_RX_L0_CUR_BYTE_CNT_MASK 0xffffffff +#define MISC1_Y_RX_LIST0_CUR_BYTE_CNT_RX_L0_CUR_BYTE_CNT_ALIGN 0 +#define MISC1_Y_RX_LIST0_CUR_BYTE_CNT_RX_L0_CUR_BYTE_CNT_BITS 32 +#define MISC1_Y_RX_LIST0_CUR_BYTE_CNT_RX_L0_CUR_BYTE_CNT_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: Y_RX_LIST1_CUR_DESC_L_ADDR + ***************************************************************************/ +/* MISC1 :: Y_RX_LIST1_CUR_DESC_L_ADDR :: RX_L1_CUR_DESC_L_ADDR [31:05] */ +#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR_RX_L1_CUR_DESC_L_ADDR_MASK 0xffffffe0 +#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR_RX_L1_CUR_DESC_L_ADDR_ALIGN 0 +#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR_RX_L1_CUR_DESC_L_ADDR_BITS 27 +#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR_RX_L1_CUR_DESC_L_ADDR_SHIFT 5 + +/* MISC1 :: Y_RX_LIST1_CUR_DESC_L_ADDR :: reserved0 [04:00] */ +#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR_reserved0_MASK 0x0000001f +#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR_reserved0_ALIGN 0 +#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR_reserved0_BITS 5 +#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR_reserved0_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: Y_RX_LIST1_CUR_DESC_U_ADDR + ***************************************************************************/ +/* MISC1 :: Y_RX_LIST1_CUR_DESC_U_ADDR :: RX_L1_CUR_DESC_U_ADDR [31:00] */ +#define MISC1_Y_RX_LIST1_CUR_DESC_U_ADDR_RX_L1_CUR_DESC_U_ADDR_MASK 0xffffffff +#define MISC1_Y_RX_LIST1_CUR_DESC_U_ADDR_RX_L1_CUR_DESC_U_ADDR_ALIGN 0 +#define MISC1_Y_RX_LIST1_CUR_DESC_U_ADDR_RX_L1_CUR_DESC_U_ADDR_BITS 32 +#define MISC1_Y_RX_LIST1_CUR_DESC_U_ADDR_RX_L1_CUR_DESC_U_ADDR_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: Y_RX_LIST1_CUR_BYTE_CNT + ***************************************************************************/ +/* MISC1 :: Y_RX_LIST1_CUR_BYTE_CNT :: RX_L1_CUR_BYTE_CNT [31:00] */ +#define MISC1_Y_RX_LIST1_CUR_BYTE_CNT_RX_L1_CUR_BYTE_CNT_MASK 0xffffffff +#define MISC1_Y_RX_LIST1_CUR_BYTE_CNT_RX_L1_CUR_BYTE_CNT_ALIGN 0 +#define MISC1_Y_RX_LIST1_CUR_BYTE_CNT_RX_L1_CUR_BYTE_CNT_BITS 32 +#define MISC1_Y_RX_LIST1_CUR_BYTE_CNT_RX_L1_CUR_BYTE_CNT_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: UV_RX_FIRST_DESC_L_ADDR_LIST0 + ***************************************************************************/ +/* MISC1 :: UV_RX_FIRST_DESC_L_ADDR_LIST0 :: DESC_ADDR [31:05] */ +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_MASK 0xffffffe0 +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_ALIGN 0 +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_BITS 27 +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_SHIFT 5 + +/* MISC1 :: UV_RX_FIRST_DESC_L_ADDR_LIST0 :: reserved0 [04:01] */ +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_reserved0_MASK 0x0000001e +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_reserved0_ALIGN 0 +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_reserved0_BITS 4 +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_reserved0_SHIFT 1 + +/* MISC1 :: UV_RX_FIRST_DESC_L_ADDR_LIST0 :: RX_DESC_LIST0_VALID [00:00] */ +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_RX_DESC_LIST0_VALID_MASK 0x00000001 +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_RX_DESC_LIST0_VALID_ALIGN 0 +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_RX_DESC_LIST0_VALID_BITS 1 +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_RX_DESC_LIST0_VALID_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: UV_RX_FIRST_DESC_U_ADDR_LIST0 + ***************************************************************************/ +/* MISC1 :: UV_RX_FIRST_DESC_U_ADDR_LIST0 :: DESC_ADDR [31:00] */ +#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_MASK 0xffffffff +#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_ALIGN 0 +#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_BITS 32 +#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: UV_RX_FIRST_DESC_L_ADDR_LIST1 + ***************************************************************************/ +/* MISC1 :: UV_RX_FIRST_DESC_L_ADDR_LIST1 :: DESC_ADDR [31:05] */ +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_MASK 0xffffffe0 +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_ALIGN 0 +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_BITS 27 +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_SHIFT 5 + +/* MISC1 :: UV_RX_FIRST_DESC_L_ADDR_LIST1 :: reserved0 [04:01] */ +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_reserved0_MASK 0x0000001e +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_reserved0_ALIGN 0 +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_reserved0_BITS 4 +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_reserved0_SHIFT 1 + +/* MISC1 :: UV_RX_FIRST_DESC_L_ADDR_LIST1 :: RX_DESC_LIST1_VALID [00:00] */ +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_RX_DESC_LIST1_VALID_MASK 0x00000001 +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_RX_DESC_LIST1_VALID_ALIGN 0 +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_RX_DESC_LIST1_VALID_BITS 1 +#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_RX_DESC_LIST1_VALID_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: UV_RX_FIRST_DESC_U_ADDR_LIST1 + ***************************************************************************/ +/* MISC1 :: UV_RX_FIRST_DESC_U_ADDR_LIST1 :: DESC_ADDR [31:00] */ +#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_MASK 0xffffffff +#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_ALIGN 0 +#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_BITS 32 +#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: UV_RX_SW_DESC_LIST_CTRL_STS + ***************************************************************************/ +/* MISC1 :: UV_RX_SW_DESC_LIST_CTRL_STS :: reserved0 [31:04] */ +#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_reserved0_MASK 0xfffffff0 +#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_reserved0_ALIGN 0 +#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_reserved0_BITS 28 +#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_reserved0_SHIFT 4 + +/* MISC1 :: UV_RX_SW_DESC_LIST_CTRL_STS :: DMA_DATA_SERV_PTR [03:03] */ +#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_MASK 0x00000008 +#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_ALIGN 0 +#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_BITS 1 +#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_SHIFT 3 + +/* MISC1 :: UV_RX_SW_DESC_LIST_CTRL_STS :: DESC_SERV_PTR [02:02] */ +#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_MASK 0x00000004 +#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_ALIGN 0 +#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_BITS 1 +#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_SHIFT 2 + +/* MISC1 :: UV_RX_SW_DESC_LIST_CTRL_STS :: RX_HALT_ON_ERROR [01:01] */ +#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_RX_HALT_ON_ERROR_MASK 0x00000002 +#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_RX_HALT_ON_ERROR_ALIGN 0 +#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_RX_HALT_ON_ERROR_BITS 1 +#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_RX_HALT_ON_ERROR_SHIFT 1 + +/* MISC1 :: UV_RX_SW_DESC_LIST_CTRL_STS :: RX_RUN_STOP [00:00] */ +#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_RX_RUN_STOP_MASK 0x00000001 +#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_RX_RUN_STOP_ALIGN 0 +#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_RX_RUN_STOP_BITS 1 +#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_RX_RUN_STOP_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: UV_RX_ERROR_STATUS + ***************************************************************************/ +/* MISC1 :: UV_RX_ERROR_STATUS :: reserved0 [31:14] */ +#define MISC1_UV_RX_ERROR_STATUS_reserved0_MASK 0xffffc000 +#define MISC1_UV_RX_ERROR_STATUS_reserved0_ALIGN 0 +#define MISC1_UV_RX_ERROR_STATUS_reserved0_BITS 18 +#define MISC1_UV_RX_ERROR_STATUS_reserved0_SHIFT 14 + +/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L1_UNDERRUN_ERROR [13:13] */ +#define MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK 0x00002000 +#define MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_ALIGN 0 +#define MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_BITS 1 +#define MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_SHIFT 13 + +/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L1_OVERRUN_ERROR [12:12] */ +#define MISC1_UV_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_MASK 0x00001000 +#define MISC1_UV_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_ALIGN 0 +#define MISC1_UV_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_BITS 1 +#define MISC1_UV_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_SHIFT 12 + +/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L0_UNDERRUN_ERROR [11:11] */ +#define MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK 0x00000800 +#define MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_ALIGN 0 +#define MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_BITS 1 +#define MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_SHIFT 11 + +/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L0_OVERRUN_ERROR [10:10] */ +#define MISC1_UV_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_MASK 0x00000400 +#define MISC1_UV_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_ALIGN 0 +#define MISC1_UV_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_BITS 1 +#define MISC1_UV_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_SHIFT 10 + +/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L1_DESC_TX_ABORT_ERRORS [09:09] */ +#define MISC1_UV_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_MASK 0x00000200 +#define MISC1_UV_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_ALIGN 0 +#define MISC1_UV_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_BITS 1 +#define MISC1_UV_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_SHIFT 9 + +/* MISC1 :: UV_RX_ERROR_STATUS :: reserved1 [08:08] */ +#define MISC1_UV_RX_ERROR_STATUS_reserved1_MASK 0x00000100 +#define MISC1_UV_RX_ERROR_STATUS_reserved1_ALIGN 0 +#define MISC1_UV_RX_ERROR_STATUS_reserved1_BITS 1 +#define MISC1_UV_RX_ERROR_STATUS_reserved1_SHIFT 8 + +/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L0_DESC_TX_ABORT_ERRORS [07:07] */ +#define MISC1_UV_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_MASK 0x00000080 +#define MISC1_UV_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_ALIGN 0 +#define MISC1_UV_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_BITS 1 +#define MISC1_UV_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_SHIFT 7 + +/* MISC1 :: UV_RX_ERROR_STATUS :: reserved2 [06:05] */ +#define MISC1_UV_RX_ERROR_STATUS_reserved2_MASK 0x00000060 +#define MISC1_UV_RX_ERROR_STATUS_reserved2_ALIGN 0 +#define MISC1_UV_RX_ERROR_STATUS_reserved2_BITS 2 +#define MISC1_UV_RX_ERROR_STATUS_reserved2_SHIFT 5 + +/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L1_FIFO_FULL_ERRORS [04:04] */ +#define MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK 0x00000010 +#define MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_ALIGN 0 +#define MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_BITS 1 +#define MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_SHIFT 4 + +/* MISC1 :: UV_RX_ERROR_STATUS :: reserved3 [03:02] */ +#define MISC1_UV_RX_ERROR_STATUS_reserved3_MASK 0x0000000c +#define MISC1_UV_RX_ERROR_STATUS_reserved3_ALIGN 0 +#define MISC1_UV_RX_ERROR_STATUS_reserved3_BITS 2 +#define MISC1_UV_RX_ERROR_STATUS_reserved3_SHIFT 2 + +/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L0_FIFO_FULL_ERRORS [01:01] */ +#define MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK 0x00000002 +#define MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_ALIGN 0 +#define MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_BITS 1 +#define MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_SHIFT 1 + +/* MISC1 :: UV_RX_ERROR_STATUS :: reserved4 [00:00] */ +#define MISC1_UV_RX_ERROR_STATUS_reserved4_MASK 0x00000001 +#define MISC1_UV_RX_ERROR_STATUS_reserved4_ALIGN 0 +#define MISC1_UV_RX_ERROR_STATUS_reserved4_BITS 1 +#define MISC1_UV_RX_ERROR_STATUS_reserved4_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: UV_RX_LIST0_CUR_DESC_L_ADDR + ***************************************************************************/ +/* MISC1 :: UV_RX_LIST0_CUR_DESC_L_ADDR :: RX_L0_CUR_DESC_L_ADDR [31:05] */ +#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR_RX_L0_CUR_DESC_L_ADDR_MASK 0xffffffe0 +#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR_RX_L0_CUR_DESC_L_ADDR_ALIGN 0 +#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR_RX_L0_CUR_DESC_L_ADDR_BITS 27 +#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR_RX_L0_CUR_DESC_L_ADDR_SHIFT 5 + +/* MISC1 :: UV_RX_LIST0_CUR_DESC_L_ADDR :: reserved0 [04:00] */ +#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR_reserved0_MASK 0x0000001f +#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR_reserved0_ALIGN 0 +#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR_reserved0_BITS 5 +#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR_reserved0_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: UV_RX_LIST0_CUR_DESC_U_ADDR + ***************************************************************************/ +/* MISC1 :: UV_RX_LIST0_CUR_DESC_U_ADDR :: RX_L0_CUR_DESC_U_ADDR [31:00] */ +#define MISC1_UV_RX_LIST0_CUR_DESC_U_ADDR_RX_L0_CUR_DESC_U_ADDR_MASK 0xffffffff +#define MISC1_UV_RX_LIST0_CUR_DESC_U_ADDR_RX_L0_CUR_DESC_U_ADDR_ALIGN 0 +#define MISC1_UV_RX_LIST0_CUR_DESC_U_ADDR_RX_L0_CUR_DESC_U_ADDR_BITS 32 +#define MISC1_UV_RX_LIST0_CUR_DESC_U_ADDR_RX_L0_CUR_DESC_U_ADDR_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: UV_RX_LIST0_CUR_BYTE_CNT + ***************************************************************************/ +/* MISC1 :: UV_RX_LIST0_CUR_BYTE_CNT :: RX_L0_CUR_BYTE_CNT [31:00] */ +#define MISC1_UV_RX_LIST0_CUR_BYTE_CNT_RX_L0_CUR_BYTE_CNT_MASK 0xffffffff +#define MISC1_UV_RX_LIST0_CUR_BYTE_CNT_RX_L0_CUR_BYTE_CNT_ALIGN 0 +#define MISC1_UV_RX_LIST0_CUR_BYTE_CNT_RX_L0_CUR_BYTE_CNT_BITS 32 +#define MISC1_UV_RX_LIST0_CUR_BYTE_CNT_RX_L0_CUR_BYTE_CNT_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: UV_RX_LIST1_CUR_DESC_L_ADDR + ***************************************************************************/ +/* MISC1 :: UV_RX_LIST1_CUR_DESC_L_ADDR :: RX_L1_CUR_DESC_L_ADDR [31:05] */ +#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR_RX_L1_CUR_DESC_L_ADDR_MASK 0xffffffe0 +#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR_RX_L1_CUR_DESC_L_ADDR_ALIGN 0 +#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR_RX_L1_CUR_DESC_L_ADDR_BITS 27 +#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR_RX_L1_CUR_DESC_L_ADDR_SHIFT 5 + +/* MISC1 :: UV_RX_LIST1_CUR_DESC_L_ADDR :: reserved0 [04:00] */ +#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR_reserved0_MASK 0x0000001f +#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR_reserved0_ALIGN 0 +#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR_reserved0_BITS 5 +#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR_reserved0_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: UV_RX_LIST1_CUR_DESC_U_ADDR + ***************************************************************************/ +/* MISC1 :: UV_RX_LIST1_CUR_DESC_U_ADDR :: RX_L1_CUR_DESC_U_ADDR [31:00] */ +#define MISC1_UV_RX_LIST1_CUR_DESC_U_ADDR_RX_L1_CUR_DESC_U_ADDR_MASK 0xffffffff +#define MISC1_UV_RX_LIST1_CUR_DESC_U_ADDR_RX_L1_CUR_DESC_U_ADDR_ALIGN 0 +#define MISC1_UV_RX_LIST1_CUR_DESC_U_ADDR_RX_L1_CUR_DESC_U_ADDR_BITS 32 +#define MISC1_UV_RX_LIST1_CUR_DESC_U_ADDR_RX_L1_CUR_DESC_U_ADDR_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: UV_RX_LIST1_CUR_BYTE_CNT + ***************************************************************************/ +/* MISC1 :: UV_RX_LIST1_CUR_BYTE_CNT :: RX_L1_CUR_BYTE_CNT [31:00] */ +#define MISC1_UV_RX_LIST1_CUR_BYTE_CNT_RX_L1_CUR_BYTE_CNT_MASK 0xffffffff +#define MISC1_UV_RX_LIST1_CUR_BYTE_CNT_RX_L1_CUR_BYTE_CNT_ALIGN 0 +#define MISC1_UV_RX_LIST1_CUR_BYTE_CNT_RX_L1_CUR_BYTE_CNT_BITS 32 +#define MISC1_UV_RX_LIST1_CUR_BYTE_CNT_RX_L1_CUR_BYTE_CNT_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: DMA_DEBUG_OPTIONS_REG + ***************************************************************************/ +/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: DMA_DEBUG_TX_DMA_SOFT_RST [31:31] */ +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_TX_DMA_SOFT_RST_MASK 0x80000000 +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_TX_DMA_SOFT_RST_ALIGN 0 +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_TX_DMA_SOFT_RST_BITS 1 +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_TX_DMA_SOFT_RST_SHIFT 31 + +/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: DMA_DEBUG_RX_DMA_SOFT_RST [30:30] */ +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_RX_DMA_SOFT_RST_MASK 0x40000000 +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_RX_DMA_SOFT_RST_ALIGN 0 +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_RX_DMA_SOFT_RST_BITS 1 +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_RX_DMA_SOFT_RST_SHIFT 30 + +/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: DMA_DEBUG_TX_DMA_RD_Q_SOFT_RST [29:29] */ +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_TX_DMA_RD_Q_SOFT_RST_MASK 0x20000000 +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_TX_DMA_RD_Q_SOFT_RST_ALIGN 0 +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_TX_DMA_RD_Q_SOFT_RST_BITS 1 +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_TX_DMA_RD_Q_SOFT_RST_SHIFT 29 + +/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: DMA_DEBUG_RX_DMA_WR_Q_SOFT_RST [28:28] */ +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_RX_DMA_WR_Q_SOFT_RST_MASK 0x10000000 +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_RX_DMA_WR_Q_SOFT_RST_ALIGN 0 +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_RX_DMA_WR_Q_SOFT_RST_BITS 1 +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_RX_DMA_WR_Q_SOFT_RST_SHIFT 28 + +/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: RSVD_DMA_DEBUG_0 [27:05] */ +#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_0_MASK 0x0fffffe0 +#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_0_ALIGN 0 +#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_0_BITS 23 +#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_0_SHIFT 5 + +/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: DMA_DEBUG_EN_RX_DMA_XFER_CNT [04:04] */ +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_EN_RX_DMA_XFER_CNT_MASK 0x00000010 +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_EN_RX_DMA_XFER_CNT_ALIGN 0 +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_EN_RX_DMA_XFER_CNT_BITS 1 +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_EN_RX_DMA_XFER_CNT_SHIFT 4 + +/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: RSVD_DMA_DEBUG_1 [03:03] */ +#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_1_MASK 0x00000008 +#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_1_ALIGN 0 +#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_1_BITS 1 +#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_1_SHIFT 3 + +/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: DMA_DEBUG_SINGLE_RD_Q [02:02] */ +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_SINGLE_RD_Q_MASK 0x00000004 +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_SINGLE_RD_Q_ALIGN 0 +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_SINGLE_RD_Q_BITS 1 +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_SINGLE_RD_Q_SHIFT 2 + +/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: DMA_DEBUG_SINGLE_WR_Q [01:01] */ +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_SINGLE_WR_Q_MASK 0x00000002 +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_SINGLE_WR_Q_ALIGN 0 +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_SINGLE_WR_Q_BITS 1 +#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_SINGLE_WR_Q_SHIFT 1 + +/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: RSVD_DMA_DEBUG_2 [00:00] */ +#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_2_MASK 0x00000001 +#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_2_ALIGN 0 +#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_2_BITS 1 +#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_2_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: READ_CHANNEL_ERROR_STATUS + ***************************************************************************/ +/* MISC1 :: READ_CHANNEL_ERROR_STATUS :: TX_ERR_STS_CHAN_7 [31:28] */ +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_7_MASK 0xf0000000 +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_7_ALIGN 0 +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_7_BITS 4 +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_7_SHIFT 28 + +/* MISC1 :: READ_CHANNEL_ERROR_STATUS :: TX_ERR_STS_CHAN_6 [27:24] */ +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_6_MASK 0x0f000000 +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_6_ALIGN 0 +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_6_BITS 4 +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_6_SHIFT 24 + +/* MISC1 :: READ_CHANNEL_ERROR_STATUS :: TX_ERR_STS_CHAN_5 [23:20] */ +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_5_MASK 0x00f00000 +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_5_ALIGN 0 +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_5_BITS 4 +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_5_SHIFT 20 + +/* MISC1 :: READ_CHANNEL_ERROR_STATUS :: TX_ERR_STS_CHAN_4 [19:16] */ +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_4_MASK 0x000f0000 +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_4_ALIGN 0 +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_4_BITS 4 +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_4_SHIFT 16 + +/* MISC1 :: READ_CHANNEL_ERROR_STATUS :: TX_ERR_STS_CHAN_3 [15:12] */ +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_3_MASK 0x0000f000 +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_3_ALIGN 0 +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_3_BITS 4 +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_3_SHIFT 12 + +/* MISC1 :: READ_CHANNEL_ERROR_STATUS :: TX_ERR_STS_CHAN_2 [11:08] */ +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_2_MASK 0x00000f00 +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_2_ALIGN 0 +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_2_BITS 4 +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_2_SHIFT 8 + +/* MISC1 :: READ_CHANNEL_ERROR_STATUS :: TX_ERR_STS_CHAN_1 [07:04] */ +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_1_MASK 0x000000f0 +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_1_ALIGN 0 +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_1_BITS 4 +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_1_SHIFT 4 + +/* MISC1 :: READ_CHANNEL_ERROR_STATUS :: TX_ERR_STS_CHAN_0 [03:00] */ +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_0_MASK 0x0000000f +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_0_ALIGN 0 +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_0_BITS 4 +#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_0_SHIFT 0 + + +/**************************************************************************** + * MISC1 :: PCIE_DMA_CTRL + ***************************************************************************/ +/* MISC1 :: PCIE_DMA_CTRL :: reserved0 [31:18] */ +#define MISC1_PCIE_DMA_CTRL_reserved0_MASK 0xfffc0000 +#define MISC1_PCIE_DMA_CTRL_reserved0_ALIGN 0 +#define MISC1_PCIE_DMA_CTRL_reserved0_BITS 14 +#define MISC1_PCIE_DMA_CTRL_reserved0_SHIFT 18 + +/* MISC1 :: PCIE_DMA_CTRL :: DESC_ENDIAN_MODE [17:16] */ +#define MISC1_PCIE_DMA_CTRL_DESC_ENDIAN_MODE_MASK 0x00030000 +#define MISC1_PCIE_DMA_CTRL_DESC_ENDIAN_MODE_ALIGN 0 +#define MISC1_PCIE_DMA_CTRL_DESC_ENDIAN_MODE_BITS 2 +#define MISC1_PCIE_DMA_CTRL_DESC_ENDIAN_MODE_SHIFT 16 + +/* MISC1 :: PCIE_DMA_CTRL :: reserved1 [15:10] */ +#define MISC1_PCIE_DMA_CTRL_reserved1_MASK 0x0000fc00 +#define MISC1_PCIE_DMA_CTRL_reserved1_ALIGN 0 +#define MISC1_PCIE_DMA_CTRL_reserved1_BITS 6 +#define MISC1_PCIE_DMA_CTRL_reserved1_SHIFT 10 + +/* MISC1 :: PCIE_DMA_CTRL :: EN_WEIGHTED_RR [09:09] */ +#define MISC1_PCIE_DMA_CTRL_EN_WEIGHTED_RR_MASK 0x00000200 +#define MISC1_PCIE_DMA_CTRL_EN_WEIGHTED_RR_ALIGN 0 +#define MISC1_PCIE_DMA_CTRL_EN_WEIGHTED_RR_BITS 1 +#define MISC1_PCIE_DMA_CTRL_EN_WEIGHTED_RR_SHIFT 9 + +/* MISC1 :: PCIE_DMA_CTRL :: EN_ROUND_ROBIN [08:08] */ +#define MISC1_PCIE_DMA_CTRL_EN_ROUND_ROBIN_MASK 0x00000100 +#define MISC1_PCIE_DMA_CTRL_EN_ROUND_ROBIN_ALIGN 0 +#define MISC1_PCIE_DMA_CTRL_EN_ROUND_ROBIN_BITS 1 +#define MISC1_PCIE_DMA_CTRL_EN_ROUND_ROBIN_SHIFT 8 + +/* MISC1 :: PCIE_DMA_CTRL :: reserved2 [07:05] */ +#define MISC1_PCIE_DMA_CTRL_reserved2_MASK 0x000000e0 +#define MISC1_PCIE_DMA_CTRL_reserved2_ALIGN 0 +#define MISC1_PCIE_DMA_CTRL_reserved2_BITS 3 +#define MISC1_PCIE_DMA_CTRL_reserved2_SHIFT 5 + +/* MISC1 :: PCIE_DMA_CTRL :: RELAXED_ORDERING [04:04] */ +#define MISC1_PCIE_DMA_CTRL_RELAXED_ORDERING_MASK 0x00000010 +#define MISC1_PCIE_DMA_CTRL_RELAXED_ORDERING_ALIGN 0 +#define MISC1_PCIE_DMA_CTRL_RELAXED_ORDERING_BITS 1 +#define MISC1_PCIE_DMA_CTRL_RELAXED_ORDERING_SHIFT 4 + +/* MISC1 :: PCIE_DMA_CTRL :: NO_SNOOP [03:03] */ +#define MISC1_PCIE_DMA_CTRL_NO_SNOOP_MASK 0x00000008 +#define MISC1_PCIE_DMA_CTRL_NO_SNOOP_ALIGN 0 +#define MISC1_PCIE_DMA_CTRL_NO_SNOOP_BITS 1 +#define MISC1_PCIE_DMA_CTRL_NO_SNOOP_SHIFT 3 + +/* MISC1 :: PCIE_DMA_CTRL :: TRAFFIC_CLASS [02:00] */ +#define MISC1_PCIE_DMA_CTRL_TRAFFIC_CLASS_MASK 0x00000007 +#define MISC1_PCIE_DMA_CTRL_TRAFFIC_CLASS_ALIGN 0 +#define MISC1_PCIE_DMA_CTRL_TRAFFIC_CLASS_BITS 3 +#define MISC1_PCIE_DMA_CTRL_TRAFFIC_CLASS_SHIFT 0 + + +/**************************************************************************** + * BCM70012_MISC_TOP_MISC2 + ***************************************************************************/ +/**************************************************************************** + * MISC2 :: GLOBAL_CTRL + ***************************************************************************/ +/* MISC2 :: GLOBAL_CTRL :: reserved0 [31:21] */ +#define MISC2_GLOBAL_CTRL_reserved0_MASK 0xffe00000 +#define MISC2_GLOBAL_CTRL_reserved0_ALIGN 0 +#define MISC2_GLOBAL_CTRL_reserved0_BITS 11 +#define MISC2_GLOBAL_CTRL_reserved0_SHIFT 21 + +/* MISC2 :: GLOBAL_CTRL :: EN_WRITE_ALL [20:20] */ +#define MISC2_GLOBAL_CTRL_EN_WRITE_ALL_MASK 0x00100000 +#define MISC2_GLOBAL_CTRL_EN_WRITE_ALL_ALIGN 0 +#define MISC2_GLOBAL_CTRL_EN_WRITE_ALL_BITS 1 +#define MISC2_GLOBAL_CTRL_EN_WRITE_ALL_SHIFT 20 + +/* MISC2 :: GLOBAL_CTRL :: reserved1 [19:17] */ +#define MISC2_GLOBAL_CTRL_reserved1_MASK 0x000e0000 +#define MISC2_GLOBAL_CTRL_reserved1_ALIGN 0 +#define MISC2_GLOBAL_CTRL_reserved1_BITS 3 +#define MISC2_GLOBAL_CTRL_reserved1_SHIFT 17 + +/* MISC2 :: GLOBAL_CTRL :: EN_SINGLE_DMA [16:16] */ +#define MISC2_GLOBAL_CTRL_EN_SINGLE_DMA_MASK 0x00010000 +#define MISC2_GLOBAL_CTRL_EN_SINGLE_DMA_ALIGN 0 +#define MISC2_GLOBAL_CTRL_EN_SINGLE_DMA_BITS 1 +#define MISC2_GLOBAL_CTRL_EN_SINGLE_DMA_SHIFT 16 + +/* MISC2 :: GLOBAL_CTRL :: reserved2 [15:11] */ +#define MISC2_GLOBAL_CTRL_reserved2_MASK 0x0000f800 +#define MISC2_GLOBAL_CTRL_reserved2_ALIGN 0 +#define MISC2_GLOBAL_CTRL_reserved2_BITS 5 +#define MISC2_GLOBAL_CTRL_reserved2_SHIFT 11 + +/* MISC2 :: GLOBAL_CTRL :: Y_UV_FIFO_LEN_SEL [10:10] */ +#define MISC2_GLOBAL_CTRL_Y_UV_FIFO_LEN_SEL_MASK 0x00000400 +#define MISC2_GLOBAL_CTRL_Y_UV_FIFO_LEN_SEL_ALIGN 0 +#define MISC2_GLOBAL_CTRL_Y_UV_FIFO_LEN_SEL_BITS 1 +#define MISC2_GLOBAL_CTRL_Y_UV_FIFO_LEN_SEL_SHIFT 10 + +/* MISC2 :: GLOBAL_CTRL :: ODD_DE_EOFRST_DIS [09:09] */ +#define MISC2_GLOBAL_CTRL_ODD_DE_EOFRST_DIS_MASK 0x00000200 +#define MISC2_GLOBAL_CTRL_ODD_DE_EOFRST_DIS_ALIGN 0 +#define MISC2_GLOBAL_CTRL_ODD_DE_EOFRST_DIS_BITS 1 +#define MISC2_GLOBAL_CTRL_ODD_DE_EOFRST_DIS_SHIFT 9 + +/* MISC2 :: GLOBAL_CTRL :: DIS_BIT_STUFFING [08:08] */ +#define MISC2_GLOBAL_CTRL_DIS_BIT_STUFFING_MASK 0x00000100 +#define MISC2_GLOBAL_CTRL_DIS_BIT_STUFFING_ALIGN 0 +#define MISC2_GLOBAL_CTRL_DIS_BIT_STUFFING_BITS 1 +#define MISC2_GLOBAL_CTRL_DIS_BIT_STUFFING_SHIFT 8 + +/* MISC2 :: GLOBAL_CTRL :: reserved3 [07:05] */ +#define MISC2_GLOBAL_CTRL_reserved3_MASK 0x000000e0 +#define MISC2_GLOBAL_CTRL_reserved3_ALIGN 0 +#define MISC2_GLOBAL_CTRL_reserved3_BITS 3 +#define MISC2_GLOBAL_CTRL_reserved3_SHIFT 5 + +/* MISC2 :: GLOBAL_CTRL :: EN_PROG_MODE [04:04] */ +#define MISC2_GLOBAL_CTRL_EN_PROG_MODE_MASK 0x00000010 +#define MISC2_GLOBAL_CTRL_EN_PROG_MODE_ALIGN 0 +#define MISC2_GLOBAL_CTRL_EN_PROG_MODE_BITS 1 +#define MISC2_GLOBAL_CTRL_EN_PROG_MODE_SHIFT 4 + +/* MISC2 :: GLOBAL_CTRL :: reserved4 [03:01] */ +#define MISC2_GLOBAL_CTRL_reserved4_MASK 0x0000000e +#define MISC2_GLOBAL_CTRL_reserved4_ALIGN 0 +#define MISC2_GLOBAL_CTRL_reserved4_BITS 3 +#define MISC2_GLOBAL_CTRL_reserved4_SHIFT 1 + +/* MISC2 :: GLOBAL_CTRL :: EN_188B [00:00] */ +#define MISC2_GLOBAL_CTRL_EN_188B_MASK 0x00000001 +#define MISC2_GLOBAL_CTRL_EN_188B_ALIGN 0 +#define MISC2_GLOBAL_CTRL_EN_188B_BITS 1 +#define MISC2_GLOBAL_CTRL_EN_188B_SHIFT 0 + + +/**************************************************************************** + * MISC2 :: INTERNAL_STATUS + ***************************************************************************/ +/* MISC2 :: INTERNAL_STATUS :: reserved0 [31:12] */ +#define MISC2_INTERNAL_STATUS_reserved0_MASK 0xfffff000 +#define MISC2_INTERNAL_STATUS_reserved0_ALIGN 0 +#define MISC2_INTERNAL_STATUS_reserved0_BITS 20 +#define MISC2_INTERNAL_STATUS_reserved0_SHIFT 12 + +/* MISC2 :: INTERNAL_STATUS :: UV_BYTE_COUNT_FIFO_FULL [11:11] */ +#define MISC2_INTERNAL_STATUS_UV_BYTE_COUNT_FIFO_FULL_MASK 0x00000800 +#define MISC2_INTERNAL_STATUS_UV_BYTE_COUNT_FIFO_FULL_ALIGN 0 +#define MISC2_INTERNAL_STATUS_UV_BYTE_COUNT_FIFO_FULL_BITS 1 +#define MISC2_INTERNAL_STATUS_UV_BYTE_COUNT_FIFO_FULL_SHIFT 11 + +/* MISC2 :: INTERNAL_STATUS :: UV_DATA_FIFO_FULL [10:10] */ +#define MISC2_INTERNAL_STATUS_UV_DATA_FIFO_FULL_MASK 0x00000400 +#define MISC2_INTERNAL_STATUS_UV_DATA_FIFO_FULL_ALIGN 0 +#define MISC2_INTERNAL_STATUS_UV_DATA_FIFO_FULL_BITS 1 +#define MISC2_INTERNAL_STATUS_UV_DATA_FIFO_FULL_SHIFT 10 + +/* MISC2 :: INTERNAL_STATUS :: Y_BYTE_COUNT_FIFO_FULL [09:09] */ +#define MISC2_INTERNAL_STATUS_Y_BYTE_COUNT_FIFO_FULL_MASK 0x00000200 +#define MISC2_INTERNAL_STATUS_Y_BYTE_COUNT_FIFO_FULL_ALIGN 0 +#define MISC2_INTERNAL_STATUS_Y_BYTE_COUNT_FIFO_FULL_BITS 1 +#define MISC2_INTERNAL_STATUS_Y_BYTE_COUNT_FIFO_FULL_SHIFT 9 + +/* MISC2 :: INTERNAL_STATUS :: Y_DATA_FIFO_FULL [08:08] */ +#define MISC2_INTERNAL_STATUS_Y_DATA_FIFO_FULL_MASK 0x00000100 +#define MISC2_INTERNAL_STATUS_Y_DATA_FIFO_FULL_ALIGN 0 +#define MISC2_INTERNAL_STATUS_Y_DATA_FIFO_FULL_BITS 1 +#define MISC2_INTERNAL_STATUS_Y_DATA_FIFO_FULL_SHIFT 8 + +/* MISC2 :: INTERNAL_STATUS :: UV_BYTE_COUNT_FIFO_EMPTY [07:07] */ +#define MISC2_INTERNAL_STATUS_UV_BYTE_COUNT_FIFO_EMPTY_MASK 0x00000080 +#define MISC2_INTERNAL_STATUS_UV_BYTE_COUNT_FIFO_EMPTY_ALIGN 0 +#define MISC2_INTERNAL_STATUS_UV_BYTE_COUNT_FIFO_EMPTY_BITS 1 +#define MISC2_INTERNAL_STATUS_UV_BYTE_COUNT_FIFO_EMPTY_SHIFT 7 + +/* MISC2 :: INTERNAL_STATUS :: UV_DATA_FIFO_EMPTY [06:06] */ +#define MISC2_INTERNAL_STATUS_UV_DATA_FIFO_EMPTY_MASK 0x00000040 +#define MISC2_INTERNAL_STATUS_UV_DATA_FIFO_EMPTY_ALIGN 0 +#define MISC2_INTERNAL_STATUS_UV_DATA_FIFO_EMPTY_BITS 1 +#define MISC2_INTERNAL_STATUS_UV_DATA_FIFO_EMPTY_SHIFT 6 + +/* MISC2 :: INTERNAL_STATUS :: Y_BYTE_COUNT_FIFO_EMPTY [05:05] */ +#define MISC2_INTERNAL_STATUS_Y_BYTE_COUNT_FIFO_EMPTY_MASK 0x00000020 +#define MISC2_INTERNAL_STATUS_Y_BYTE_COUNT_FIFO_EMPTY_ALIGN 0 +#define MISC2_INTERNAL_STATUS_Y_BYTE_COUNT_FIFO_EMPTY_BITS 1 +#define MISC2_INTERNAL_STATUS_Y_BYTE_COUNT_FIFO_EMPTY_SHIFT 5 + +/* MISC2 :: INTERNAL_STATUS :: Y_DATA_FIFO_EMPTY [04:04] */ +#define MISC2_INTERNAL_STATUS_Y_DATA_FIFO_EMPTY_MASK 0x00000010 +#define MISC2_INTERNAL_STATUS_Y_DATA_FIFO_EMPTY_ALIGN 0 +#define MISC2_INTERNAL_STATUS_Y_DATA_FIFO_EMPTY_BITS 1 +#define MISC2_INTERNAL_STATUS_Y_DATA_FIFO_EMPTY_SHIFT 4 + +/* MISC2 :: INTERNAL_STATUS :: reserved1 [03:00] */ +#define MISC2_INTERNAL_STATUS_reserved1_MASK 0x0000000f +#define MISC2_INTERNAL_STATUS_reserved1_ALIGN 0 +#define MISC2_INTERNAL_STATUS_reserved1_BITS 4 +#define MISC2_INTERNAL_STATUS_reserved1_SHIFT 0 + + +/**************************************************************************** + * MISC2 :: INTERNAL_STATUS_MUX_CTRL + ***************************************************************************/ +/* MISC2 :: INTERNAL_STATUS_MUX_CTRL :: reserved0 [31:16] */ +#define MISC2_INTERNAL_STATUS_MUX_CTRL_reserved0_MASK 0xffff0000 +#define MISC2_INTERNAL_STATUS_MUX_CTRL_reserved0_ALIGN 0 +#define MISC2_INTERNAL_STATUS_MUX_CTRL_reserved0_BITS 16 +#define MISC2_INTERNAL_STATUS_MUX_CTRL_reserved0_SHIFT 16 + +/* MISC2 :: INTERNAL_STATUS_MUX_CTRL :: CLK_OUT_ALT_SRC [15:15] */ +#define MISC2_INTERNAL_STATUS_MUX_CTRL_CLK_OUT_ALT_SRC_MASK 0x00008000 +#define MISC2_INTERNAL_STATUS_MUX_CTRL_CLK_OUT_ALT_SRC_ALIGN 0 +#define MISC2_INTERNAL_STATUS_MUX_CTRL_CLK_OUT_ALT_SRC_BITS 1 +#define MISC2_INTERNAL_STATUS_MUX_CTRL_CLK_OUT_ALT_SRC_SHIFT 15 + +/* MISC2 :: INTERNAL_STATUS_MUX_CTRL :: DEBUG_CLK_SEL [14:12] */ +#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_CLK_SEL_MASK 0x00007000 +#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_CLK_SEL_ALIGN 0 +#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_CLK_SEL_BITS 3 +#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_CLK_SEL_SHIFT 12 + +/* MISC2 :: INTERNAL_STATUS_MUX_CTRL :: reserved1 [11:09] */ +#define MISC2_INTERNAL_STATUS_MUX_CTRL_reserved1_MASK 0x00000e00 +#define MISC2_INTERNAL_STATUS_MUX_CTRL_reserved1_ALIGN 0 +#define MISC2_INTERNAL_STATUS_MUX_CTRL_reserved1_BITS 3 +#define MISC2_INTERNAL_STATUS_MUX_CTRL_reserved1_SHIFT 9 + +/* MISC2 :: INTERNAL_STATUS_MUX_CTRL :: DEBUG_TOP_CORE_SEL [08:08] */ +#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_TOP_CORE_SEL_MASK 0x00000100 +#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_TOP_CORE_SEL_ALIGN 0 +#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_TOP_CORE_SEL_BITS 1 +#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_TOP_CORE_SEL_SHIFT 8 + +/* MISC2 :: INTERNAL_STATUS_MUX_CTRL :: DEBUG_CORE_BLK_SEL [07:04] */ +#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_CORE_BLK_SEL_MASK 0x000000f0 +#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_CORE_BLK_SEL_ALIGN 0 +#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_CORE_BLK_SEL_BITS 4 +#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_CORE_BLK_SEL_SHIFT 4 + +/* MISC2 :: INTERNAL_STATUS_MUX_CTRL :: DEBUG_VECTOR_SEL [03:00] */ +#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_VECTOR_SEL_MASK 0x0000000f +#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_VECTOR_SEL_ALIGN 0 +#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_VECTOR_SEL_BITS 4 +#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_VECTOR_SEL_SHIFT 0 + + +/**************************************************************************** + * MISC2 :: DEBUG_FIFO_LENGTH + ***************************************************************************/ +/* MISC2 :: DEBUG_FIFO_LENGTH :: reserved0 [31:21] */ +#define MISC2_DEBUG_FIFO_LENGTH_reserved0_MASK 0xffe00000 +#define MISC2_DEBUG_FIFO_LENGTH_reserved0_ALIGN 0 +#define MISC2_DEBUG_FIFO_LENGTH_reserved0_BITS 11 +#define MISC2_DEBUG_FIFO_LENGTH_reserved0_SHIFT 21 + +/* MISC2 :: DEBUG_FIFO_LENGTH :: FIFO_LENGTH [20:00] */ +#define MISC2_DEBUG_FIFO_LENGTH_FIFO_LENGTH_MASK 0x001fffff +#define MISC2_DEBUG_FIFO_LENGTH_FIFO_LENGTH_ALIGN 0 +#define MISC2_DEBUG_FIFO_LENGTH_FIFO_LENGTH_BITS 21 +#define MISC2_DEBUG_FIFO_LENGTH_FIFO_LENGTH_SHIFT 0 + + +/**************************************************************************** + * BCM70012_MISC_TOP_MISC3 + ***************************************************************************/ +/**************************************************************************** + * MISC3 :: RESET_CTRL + ***************************************************************************/ +/* MISC3 :: RESET_CTRL :: reserved0 [31:09] */ +#define MISC3_RESET_CTRL_reserved0_MASK 0xfffffe00 +#define MISC3_RESET_CTRL_reserved0_ALIGN 0 +#define MISC3_RESET_CTRL_reserved0_BITS 23 +#define MISC3_RESET_CTRL_reserved0_SHIFT 9 + +/* MISC3 :: RESET_CTRL :: PLL_RESET [08:08] */ +#define MISC3_RESET_CTRL_PLL_RESET_MASK 0x00000100 +#define MISC3_RESET_CTRL_PLL_RESET_ALIGN 0 +#define MISC3_RESET_CTRL_PLL_RESET_BITS 1 +#define MISC3_RESET_CTRL_PLL_RESET_SHIFT 8 + +/* MISC3 :: RESET_CTRL :: reserved1 [07:02] */ +#define MISC3_RESET_CTRL_reserved1_MASK 0x000000fc +#define MISC3_RESET_CTRL_reserved1_ALIGN 0 +#define MISC3_RESET_CTRL_reserved1_BITS 6 +#define MISC3_RESET_CTRL_reserved1_SHIFT 2 + +/* MISC3 :: RESET_CTRL :: POR_RESET [01:01] */ +#define MISC3_RESET_CTRL_POR_RESET_MASK 0x00000002 +#define MISC3_RESET_CTRL_POR_RESET_ALIGN 0 +#define MISC3_RESET_CTRL_POR_RESET_BITS 1 +#define MISC3_RESET_CTRL_POR_RESET_SHIFT 1 + +/* MISC3 :: RESET_CTRL :: CORE_RESET [00:00] */ +#define MISC3_RESET_CTRL_CORE_RESET_MASK 0x00000001 +#define MISC3_RESET_CTRL_CORE_RESET_ALIGN 0 +#define MISC3_RESET_CTRL_CORE_RESET_BITS 1 +#define MISC3_RESET_CTRL_CORE_RESET_SHIFT 0 + + +/**************************************************************************** + * MISC3 :: BIST_CTRL + ***************************************************************************/ +/* MISC3 :: BIST_CTRL :: MBIST_OVERRIDE [31:31] */ +#define MISC3_BIST_CTRL_MBIST_OVERRIDE_MASK 0x80000000 +#define MISC3_BIST_CTRL_MBIST_OVERRIDE_ALIGN 0 +#define MISC3_BIST_CTRL_MBIST_OVERRIDE_BITS 1 +#define MISC3_BIST_CTRL_MBIST_OVERRIDE_SHIFT 31 + +/* MISC3 :: BIST_CTRL :: reserved0 [30:15] */ +#define MISC3_BIST_CTRL_reserved0_MASK 0x7fff8000 +#define MISC3_BIST_CTRL_reserved0_ALIGN 0 +#define MISC3_BIST_CTRL_reserved0_BITS 16 +#define MISC3_BIST_CTRL_reserved0_SHIFT 15 + +/* MISC3 :: BIST_CTRL :: MBIST_EN_2 [14:14] */ +#define MISC3_BIST_CTRL_MBIST_EN_2_MASK 0x00004000 +#define MISC3_BIST_CTRL_MBIST_EN_2_ALIGN 0 +#define MISC3_BIST_CTRL_MBIST_EN_2_BITS 1 +#define MISC3_BIST_CTRL_MBIST_EN_2_SHIFT 14 + +/* MISC3 :: BIST_CTRL :: MBIST_EN_1 [13:13] */ +#define MISC3_BIST_CTRL_MBIST_EN_1_MASK 0x00002000 +#define MISC3_BIST_CTRL_MBIST_EN_1_ALIGN 0 +#define MISC3_BIST_CTRL_MBIST_EN_1_BITS 1 +#define MISC3_BIST_CTRL_MBIST_EN_1_SHIFT 13 + +/* MISC3 :: BIST_CTRL :: MBIST_EN_0 [12:12] */ +#define MISC3_BIST_CTRL_MBIST_EN_0_MASK 0x00001000 +#define MISC3_BIST_CTRL_MBIST_EN_0_ALIGN 0 +#define MISC3_BIST_CTRL_MBIST_EN_0_BITS 1 +#define MISC3_BIST_CTRL_MBIST_EN_0_SHIFT 12 + +/* MISC3 :: BIST_CTRL :: reserved1 [11:06] */ +#define MISC3_BIST_CTRL_reserved1_MASK 0x00000fc0 +#define MISC3_BIST_CTRL_reserved1_ALIGN 0 +#define MISC3_BIST_CTRL_reserved1_BITS 6 +#define MISC3_BIST_CTRL_reserved1_SHIFT 6 + +/* MISC3 :: BIST_CTRL :: MBIST_SETUP [05:04] */ +#define MISC3_BIST_CTRL_MBIST_SETUP_MASK 0x00000030 +#define MISC3_BIST_CTRL_MBIST_SETUP_ALIGN 0 +#define MISC3_BIST_CTRL_MBIST_SETUP_BITS 2 +#define MISC3_BIST_CTRL_MBIST_SETUP_SHIFT 4 + +/* MISC3 :: BIST_CTRL :: reserved2 [03:01] */ +#define MISC3_BIST_CTRL_reserved2_MASK 0x0000000e +#define MISC3_BIST_CTRL_reserved2_ALIGN 0 +#define MISC3_BIST_CTRL_reserved2_BITS 3 +#define MISC3_BIST_CTRL_reserved2_SHIFT 1 + +/* MISC3 :: BIST_CTRL :: MBIST_ASYNC_RESET [00:00] */ +#define MISC3_BIST_CTRL_MBIST_ASYNC_RESET_MASK 0x00000001 +#define MISC3_BIST_CTRL_MBIST_ASYNC_RESET_ALIGN 0 +#define MISC3_BIST_CTRL_MBIST_ASYNC_RESET_BITS 1 +#define MISC3_BIST_CTRL_MBIST_ASYNC_RESET_SHIFT 0 + + +/**************************************************************************** + * MISC3 :: BIST_STATUS + ***************************************************************************/ +/* MISC3 :: BIST_STATUS :: reserved0 [31:31] */ +#define MISC3_BIST_STATUS_reserved0_MASK 0x80000000 +#define MISC3_BIST_STATUS_reserved0_ALIGN 0 +#define MISC3_BIST_STATUS_reserved0_BITS 1 +#define MISC3_BIST_STATUS_reserved0_SHIFT 31 + +/* MISC3 :: BIST_STATUS :: MBIST_GO_2 [30:30] */ +#define MISC3_BIST_STATUS_MBIST_GO_2_MASK 0x40000000 +#define MISC3_BIST_STATUS_MBIST_GO_2_ALIGN 0 +#define MISC3_BIST_STATUS_MBIST_GO_2_BITS 1 +#define MISC3_BIST_STATUS_MBIST_GO_2_SHIFT 30 + +/* MISC3 :: BIST_STATUS :: MBIST_GO_1 [29:29] */ +#define MISC3_BIST_STATUS_MBIST_GO_1_MASK 0x20000000 +#define MISC3_BIST_STATUS_MBIST_GO_1_ALIGN 0 +#define MISC3_BIST_STATUS_MBIST_GO_1_BITS 1 +#define MISC3_BIST_STATUS_MBIST_GO_1_SHIFT 29 + +/* MISC3 :: BIST_STATUS :: MBIST_GO_0 [28:28] */ +#define MISC3_BIST_STATUS_MBIST_GO_0_MASK 0x10000000 +#define MISC3_BIST_STATUS_MBIST_GO_0_ALIGN 0 +#define MISC3_BIST_STATUS_MBIST_GO_0_BITS 1 +#define MISC3_BIST_STATUS_MBIST_GO_0_SHIFT 28 + +/* MISC3 :: BIST_STATUS :: reserved1 [27:27] */ +#define MISC3_BIST_STATUS_reserved1_MASK 0x08000000 +#define MISC3_BIST_STATUS_reserved1_ALIGN 0 +#define MISC3_BIST_STATUS_reserved1_BITS 1 +#define MISC3_BIST_STATUS_reserved1_SHIFT 27 + +/* MISC3 :: BIST_STATUS :: MBIST_DONE_2 [26:26] */ +#define MISC3_BIST_STATUS_MBIST_DONE_2_MASK 0x04000000 +#define MISC3_BIST_STATUS_MBIST_DONE_2_ALIGN 0 +#define MISC3_BIST_STATUS_MBIST_DONE_2_BITS 1 +#define MISC3_BIST_STATUS_MBIST_DONE_2_SHIFT 26 + +/* MISC3 :: BIST_STATUS :: MBIST_DONE_1 [25:25] */ +#define MISC3_BIST_STATUS_MBIST_DONE_1_MASK 0x02000000 +#define MISC3_BIST_STATUS_MBIST_DONE_1_ALIGN 0 +#define MISC3_BIST_STATUS_MBIST_DONE_1_BITS 1 +#define MISC3_BIST_STATUS_MBIST_DONE_1_SHIFT 25 + +/* MISC3 :: BIST_STATUS :: MBIST_DONE_0 [24:24] */ +#define MISC3_BIST_STATUS_MBIST_DONE_0_MASK 0x01000000 +#define MISC3_BIST_STATUS_MBIST_DONE_0_ALIGN 0 +#define MISC3_BIST_STATUS_MBIST_DONE_0_BITS 1 +#define MISC3_BIST_STATUS_MBIST_DONE_0_SHIFT 24 + +/* MISC3 :: BIST_STATUS :: reserved2 [23:06] */ +#define MISC3_BIST_STATUS_reserved2_MASK 0x00ffffc0 +#define MISC3_BIST_STATUS_reserved2_ALIGN 0 +#define MISC3_BIST_STATUS_reserved2_BITS 18 +#define MISC3_BIST_STATUS_reserved2_SHIFT 6 + +/* MISC3 :: BIST_STATUS :: MBIST_MBIST_MEMORY_GO_2 [05:04] */ +#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_2_MASK 0x00000030 +#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_2_ALIGN 0 +#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_2_BITS 2 +#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_2_SHIFT 4 + +/* MISC3 :: BIST_STATUS :: MBIST_MBIST_MEMORY_GO_1 [03:02] */ +#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_1_MASK 0x0000000c +#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_1_ALIGN 0 +#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_1_BITS 2 +#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_1_SHIFT 2 + +/* MISC3 :: BIST_STATUS :: MBIST_MBIST_MEMORY_GO_0 [01:00] */ +#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_0_MASK 0x00000003 +#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_0_ALIGN 0 +#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_0_BITS 2 +#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_0_SHIFT 0 + + +/**************************************************************************** + * MISC3 :: RX_CHECKSUM + ***************************************************************************/ +/* MISC3 :: RX_CHECKSUM :: RX_CHECKSUM [31:00] */ +#define MISC3_RX_CHECKSUM_RX_CHECKSUM_MASK 0xffffffff +#define MISC3_RX_CHECKSUM_RX_CHECKSUM_ALIGN 0 +#define MISC3_RX_CHECKSUM_RX_CHECKSUM_BITS 32 +#define MISC3_RX_CHECKSUM_RX_CHECKSUM_SHIFT 0 + + +/**************************************************************************** + * MISC3 :: TX_CHECKSUM + ***************************************************************************/ +/* MISC3 :: TX_CHECKSUM :: TX_CHECKSUM [31:00] */ +#define MISC3_TX_CHECKSUM_TX_CHECKSUM_MASK 0xffffffff +#define MISC3_TX_CHECKSUM_TX_CHECKSUM_ALIGN 0 +#define MISC3_TX_CHECKSUM_TX_CHECKSUM_BITS 32 +#define MISC3_TX_CHECKSUM_TX_CHECKSUM_SHIFT 0 + + +/**************************************************************************** + * MISC3 :: ECO_CTRL_CORE + ***************************************************************************/ +/* MISC3 :: ECO_CTRL_CORE :: reserved0 [31:16] */ +#define MISC3_ECO_CTRL_CORE_reserved0_MASK 0xffff0000 +#define MISC3_ECO_CTRL_CORE_reserved0_ALIGN 0 +#define MISC3_ECO_CTRL_CORE_reserved0_BITS 16 +#define MISC3_ECO_CTRL_CORE_reserved0_SHIFT 16 + +/* MISC3 :: ECO_CTRL_CORE :: ECO_CORE_RST_N [15:00] */ +#define MISC3_ECO_CTRL_CORE_ECO_CORE_RST_N_MASK 0x0000ffff +#define MISC3_ECO_CTRL_CORE_ECO_CORE_RST_N_ALIGN 0 +#define MISC3_ECO_CTRL_CORE_ECO_CORE_RST_N_BITS 16 +#define MISC3_ECO_CTRL_CORE_ECO_CORE_RST_N_SHIFT 0 + + +/**************************************************************************** + * MISC3 :: CSI_TEST_CTRL + ***************************************************************************/ +/* MISC3 :: CSI_TEST_CTRL :: ENABLE_CSI_TEST [31:31] */ +#define MISC3_CSI_TEST_CTRL_ENABLE_CSI_TEST_MASK 0x80000000 +#define MISC3_CSI_TEST_CTRL_ENABLE_CSI_TEST_ALIGN 0 +#define MISC3_CSI_TEST_CTRL_ENABLE_CSI_TEST_BITS 1 +#define MISC3_CSI_TEST_CTRL_ENABLE_CSI_TEST_SHIFT 31 + +/* MISC3 :: CSI_TEST_CTRL :: reserved0 [30:24] */ +#define MISC3_CSI_TEST_CTRL_reserved0_MASK 0x7f000000 +#define MISC3_CSI_TEST_CTRL_reserved0_ALIGN 0 +#define MISC3_CSI_TEST_CTRL_reserved0_BITS 7 +#define MISC3_CSI_TEST_CTRL_reserved0_SHIFT 24 + +/* MISC3 :: CSI_TEST_CTRL :: CSI_CLOCK_ENABLE [23:16] */ +#define MISC3_CSI_TEST_CTRL_CSI_CLOCK_ENABLE_MASK 0x00ff0000 +#define MISC3_CSI_TEST_CTRL_CSI_CLOCK_ENABLE_ALIGN 0 +#define MISC3_CSI_TEST_CTRL_CSI_CLOCK_ENABLE_BITS 8 +#define MISC3_CSI_TEST_CTRL_CSI_CLOCK_ENABLE_SHIFT 16 + +/* MISC3 :: CSI_TEST_CTRL :: CSI_SYNC [15:08] */ +#define MISC3_CSI_TEST_CTRL_CSI_SYNC_MASK 0x0000ff00 +#define MISC3_CSI_TEST_CTRL_CSI_SYNC_ALIGN 0 +#define MISC3_CSI_TEST_CTRL_CSI_SYNC_BITS 8 +#define MISC3_CSI_TEST_CTRL_CSI_SYNC_SHIFT 8 + +/* MISC3 :: CSI_TEST_CTRL :: CSI_DATA [07:00] */ +#define MISC3_CSI_TEST_CTRL_CSI_DATA_MASK 0x000000ff +#define MISC3_CSI_TEST_CTRL_CSI_DATA_ALIGN 0 +#define MISC3_CSI_TEST_CTRL_CSI_DATA_BITS 8 +#define MISC3_CSI_TEST_CTRL_CSI_DATA_SHIFT 0 + + +/**************************************************************************** + * MISC3 :: HD_DVI_TEST_CTRL + ***************************************************************************/ +/* MISC3 :: HD_DVI_TEST_CTRL :: reserved0 [31:25] */ +#define MISC3_HD_DVI_TEST_CTRL_reserved0_MASK 0xfe000000 +#define MISC3_HD_DVI_TEST_CTRL_reserved0_ALIGN 0 +#define MISC3_HD_DVI_TEST_CTRL_reserved0_BITS 7 +#define MISC3_HD_DVI_TEST_CTRL_reserved0_SHIFT 25 + +/* MISC3 :: HD_DVI_TEST_CTRL :: POS_VIDO_VBLANK_N [24:24] */ +#define MISC3_HD_DVI_TEST_CTRL_POS_VIDO_VBLANK_N_MASK 0x01000000 +#define MISC3_HD_DVI_TEST_CTRL_POS_VIDO_VBLANK_N_ALIGN 0 +#define MISC3_HD_DVI_TEST_CTRL_POS_VIDO_VBLANK_N_BITS 1 +#define MISC3_HD_DVI_TEST_CTRL_POS_VIDO_VBLANK_N_SHIFT 24 + +/* MISC3 :: HD_DVI_TEST_CTRL :: NEG_VIDO_DVI_DATA [23:12] */ +#define MISC3_HD_DVI_TEST_CTRL_NEG_VIDO_DVI_DATA_MASK 0x00fff000 +#define MISC3_HD_DVI_TEST_CTRL_NEG_VIDO_DVI_DATA_ALIGN 0 +#define MISC3_HD_DVI_TEST_CTRL_NEG_VIDO_DVI_DATA_BITS 12 +#define MISC3_HD_DVI_TEST_CTRL_NEG_VIDO_DVI_DATA_SHIFT 12 + +/* MISC3 :: HD_DVI_TEST_CTRL :: POS_VIDO_DVI_DATA [11:00] */ +#define MISC3_HD_DVI_TEST_CTRL_POS_VIDO_DVI_DATA_MASK 0x00000fff +#define MISC3_HD_DVI_TEST_CTRL_POS_VIDO_DVI_DATA_ALIGN 0 +#define MISC3_HD_DVI_TEST_CTRL_POS_VIDO_DVI_DATA_BITS 12 +#define MISC3_HD_DVI_TEST_CTRL_POS_VIDO_DVI_DATA_SHIFT 0 + + +/**************************************************************************** + * BCM70012_MISC_TOP_MISC_PERST + ***************************************************************************/ +/**************************************************************************** + * MISC_PERST :: ECO_CTRL_PERST + ***************************************************************************/ +/* MISC_PERST :: ECO_CTRL_PERST :: reserved0 [31:16] */ +#define MISC_PERST_ECO_CTRL_PERST_reserved0_MASK 0xffff0000 +#define MISC_PERST_ECO_CTRL_PERST_reserved0_ALIGN 0 +#define MISC_PERST_ECO_CTRL_PERST_reserved0_BITS 16 +#define MISC_PERST_ECO_CTRL_PERST_reserved0_SHIFT 16 + +/* MISC_PERST :: ECO_CTRL_PERST :: ECO_PERST_N [15:00] */ +#define MISC_PERST_ECO_CTRL_PERST_ECO_PERST_N_MASK 0x0000ffff +#define MISC_PERST_ECO_CTRL_PERST_ECO_PERST_N_ALIGN 0 +#define MISC_PERST_ECO_CTRL_PERST_ECO_PERST_N_BITS 16 +#define MISC_PERST_ECO_CTRL_PERST_ECO_PERST_N_SHIFT 0 + + +/**************************************************************************** + * MISC_PERST :: DECODER_CTRL + ***************************************************************************/ +/* MISC_PERST :: DECODER_CTRL :: reserved0 [31:05] */ +#define MISC_PERST_DECODER_CTRL_reserved0_MASK 0xffffffe0 +#define MISC_PERST_DECODER_CTRL_reserved0_ALIGN 0 +#define MISC_PERST_DECODER_CTRL_reserved0_BITS 27 +#define MISC_PERST_DECODER_CTRL_reserved0_SHIFT 5 + +/* MISC_PERST :: DECODER_CTRL :: STOP_BCM7412_CLK [04:04] */ +#define MISC_PERST_DECODER_CTRL_STOP_BCM7412_CLK_MASK 0x00000010 +#define MISC_PERST_DECODER_CTRL_STOP_BCM7412_CLK_ALIGN 0 +#define MISC_PERST_DECODER_CTRL_STOP_BCM7412_CLK_BITS 1 +#define MISC_PERST_DECODER_CTRL_STOP_BCM7412_CLK_SHIFT 4 + +/* MISC_PERST :: DECODER_CTRL :: reserved1 [03:01] */ +#define MISC_PERST_DECODER_CTRL_reserved1_MASK 0x0000000e +#define MISC_PERST_DECODER_CTRL_reserved1_ALIGN 0 +#define MISC_PERST_DECODER_CTRL_reserved1_BITS 3 +#define MISC_PERST_DECODER_CTRL_reserved1_SHIFT 1 + +/* MISC_PERST :: DECODER_CTRL :: BCM7412_RESET [00:00] */ +#define MISC_PERST_DECODER_CTRL_BCM7412_RESET_MASK 0x00000001 +#define MISC_PERST_DECODER_CTRL_BCM7412_RESET_ALIGN 0 +#define MISC_PERST_DECODER_CTRL_BCM7412_RESET_BITS 1 +#define MISC_PERST_DECODER_CTRL_BCM7412_RESET_SHIFT 0 + + +/**************************************************************************** + * MISC_PERST :: CCE_STATUS + ***************************************************************************/ +/* MISC_PERST :: CCE_STATUS :: CCE_DONE [31:31] */ +#define MISC_PERST_CCE_STATUS_CCE_DONE_MASK 0x80000000 +#define MISC_PERST_CCE_STATUS_CCE_DONE_ALIGN 0 +#define MISC_PERST_CCE_STATUS_CCE_DONE_BITS 1 +#define MISC_PERST_CCE_STATUS_CCE_DONE_SHIFT 31 + +/* MISC_PERST :: CCE_STATUS :: reserved0 [30:03] */ +#define MISC_PERST_CCE_STATUS_reserved0_MASK 0x7ffffff8 +#define MISC_PERST_CCE_STATUS_reserved0_ALIGN 0 +#define MISC_PERST_CCE_STATUS_reserved0_BITS 28 +#define MISC_PERST_CCE_STATUS_reserved0_SHIFT 3 + +/* MISC_PERST :: CCE_STATUS :: CCE_BAD_GISB_ACCESS [02:02] */ +#define MISC_PERST_CCE_STATUS_CCE_BAD_GISB_ACCESS_MASK 0x00000004 +#define MISC_PERST_CCE_STATUS_CCE_BAD_GISB_ACCESS_ALIGN 0 +#define MISC_PERST_CCE_STATUS_CCE_BAD_GISB_ACCESS_BITS 1 +#define MISC_PERST_CCE_STATUS_CCE_BAD_GISB_ACCESS_SHIFT 2 + +/* MISC_PERST :: CCE_STATUS :: CCE_BAD_I2C_ACCESS [01:01] */ +#define MISC_PERST_CCE_STATUS_CCE_BAD_I2C_ACCESS_MASK 0x00000002 +#define MISC_PERST_CCE_STATUS_CCE_BAD_I2C_ACCESS_ALIGN 0 +#define MISC_PERST_CCE_STATUS_CCE_BAD_I2C_ACCESS_BITS 1 +#define MISC_PERST_CCE_STATUS_CCE_BAD_I2C_ACCESS_SHIFT 1 + +/* MISC_PERST :: CCE_STATUS :: CCE_BAD_SECTION_ID [00:00] */ +#define MISC_PERST_CCE_STATUS_CCE_BAD_SECTION_ID_MASK 0x00000001 +#define MISC_PERST_CCE_STATUS_CCE_BAD_SECTION_ID_ALIGN 0 +#define MISC_PERST_CCE_STATUS_CCE_BAD_SECTION_ID_BITS 1 +#define MISC_PERST_CCE_STATUS_CCE_BAD_SECTION_ID_SHIFT 0 + + +/**************************************************************************** + * MISC_PERST :: PCIE_DEBUG + ***************************************************************************/ +/* MISC_PERST :: PCIE_DEBUG :: SERDES_TERM_CNT [31:16] */ +#define MISC_PERST_PCIE_DEBUG_SERDES_TERM_CNT_MASK 0xffff0000 +#define MISC_PERST_PCIE_DEBUG_SERDES_TERM_CNT_ALIGN 0 +#define MISC_PERST_PCIE_DEBUG_SERDES_TERM_CNT_BITS 16 +#define MISC_PERST_PCIE_DEBUG_SERDES_TERM_CNT_SHIFT 16 + +/* MISC_PERST :: PCIE_DEBUG :: reserved0 [15:11] */ +#define MISC_PERST_PCIE_DEBUG_reserved0_MASK 0x0000f800 +#define MISC_PERST_PCIE_DEBUG_reserved0_ALIGN 0 +#define MISC_PERST_PCIE_DEBUG_reserved0_BITS 5 +#define MISC_PERST_PCIE_DEBUG_reserved0_SHIFT 11 + +/* MISC_PERST :: PCIE_DEBUG :: PLL_VCO_RESCUE [10:10] */ +#define MISC_PERST_PCIE_DEBUG_PLL_VCO_RESCUE_MASK 0x00000400 +#define MISC_PERST_PCIE_DEBUG_PLL_VCO_RESCUE_ALIGN 0 +#define MISC_PERST_PCIE_DEBUG_PLL_VCO_RESCUE_BITS 1 +#define MISC_PERST_PCIE_DEBUG_PLL_VCO_RESCUE_SHIFT 10 + +/* MISC_PERST :: PCIE_DEBUG :: PLL_PDN_OVERRIDE [09:09] */ +#define MISC_PERST_PCIE_DEBUG_PLL_PDN_OVERRIDE_MASK 0x00000200 +#define MISC_PERST_PCIE_DEBUG_PLL_PDN_OVERRIDE_ALIGN 0 +#define MISC_PERST_PCIE_DEBUG_PLL_PDN_OVERRIDE_BITS 1 +#define MISC_PERST_PCIE_DEBUG_PLL_PDN_OVERRIDE_SHIFT 9 + +/* MISC_PERST :: PCIE_DEBUG :: CORE_CLOCK_OVR [08:08] */ +#define MISC_PERST_PCIE_DEBUG_CORE_CLOCK_OVR_MASK 0x00000100 +#define MISC_PERST_PCIE_DEBUG_CORE_CLOCK_OVR_ALIGN 0 +#define MISC_PERST_PCIE_DEBUG_CORE_CLOCK_OVR_BITS 1 +#define MISC_PERST_PCIE_DEBUG_CORE_CLOCK_OVR_SHIFT 8 + +/* MISC_PERST :: PCIE_DEBUG :: reserved1 [07:04] */ +#define MISC_PERST_PCIE_DEBUG_reserved1_MASK 0x000000f0 +#define MISC_PERST_PCIE_DEBUG_reserved1_ALIGN 0 +#define MISC_PERST_PCIE_DEBUG_reserved1_BITS 4 +#define MISC_PERST_PCIE_DEBUG_reserved1_SHIFT 4 + +/* MISC_PERST :: PCIE_DEBUG :: PCIE_TMUX_SEL [03:00] */ +#define MISC_PERST_PCIE_DEBUG_PCIE_TMUX_SEL_MASK 0x0000000f +#define MISC_PERST_PCIE_DEBUG_PCIE_TMUX_SEL_ALIGN 0 +#define MISC_PERST_PCIE_DEBUG_PCIE_TMUX_SEL_BITS 4 +#define MISC_PERST_PCIE_DEBUG_PCIE_TMUX_SEL_SHIFT 0 + + +/**************************************************************************** + * MISC_PERST :: PCIE_DEBUG_STATUS + ***************************************************************************/ +/* MISC_PERST :: PCIE_DEBUG_STATUS :: reserved0 [31:06] */ +#define MISC_PERST_PCIE_DEBUG_STATUS_reserved0_MASK 0xffffffc0 +#define MISC_PERST_PCIE_DEBUG_STATUS_reserved0_ALIGN 0 +#define MISC_PERST_PCIE_DEBUG_STATUS_reserved0_BITS 26 +#define MISC_PERST_PCIE_DEBUG_STATUS_reserved0_SHIFT 6 + +/* MISC_PERST :: PCIE_DEBUG_STATUS :: DATALINKATTN [05:05] */ +#define MISC_PERST_PCIE_DEBUG_STATUS_DATALINKATTN_MASK 0x00000020 +#define MISC_PERST_PCIE_DEBUG_STATUS_DATALINKATTN_ALIGN 0 +#define MISC_PERST_PCIE_DEBUG_STATUS_DATALINKATTN_BITS 1 +#define MISC_PERST_PCIE_DEBUG_STATUS_DATALINKATTN_SHIFT 5 + +/* MISC_PERST :: PCIE_DEBUG_STATUS :: PHYLINKATTN [04:04] */ +#define MISC_PERST_PCIE_DEBUG_STATUS_PHYLINKATTN_MASK 0x00000010 +#define MISC_PERST_PCIE_DEBUG_STATUS_PHYLINKATTN_ALIGN 0 +#define MISC_PERST_PCIE_DEBUG_STATUS_PHYLINKATTN_BITS 1 +#define MISC_PERST_PCIE_DEBUG_STATUS_PHYLINKATTN_SHIFT 4 + +/* MISC_PERST :: PCIE_DEBUG_STATUS :: reserved1 [03:02] */ +#define MISC_PERST_PCIE_DEBUG_STATUS_reserved1_MASK 0x0000000c +#define MISC_PERST_PCIE_DEBUG_STATUS_reserved1_ALIGN 0 +#define MISC_PERST_PCIE_DEBUG_STATUS_reserved1_BITS 2 +#define MISC_PERST_PCIE_DEBUG_STATUS_reserved1_SHIFT 2 + +/* MISC_PERST :: PCIE_DEBUG_STATUS :: DATA_LINKUP [01:01] */ +#define MISC_PERST_PCIE_DEBUG_STATUS_DATA_LINKUP_MASK 0x00000002 +#define MISC_PERST_PCIE_DEBUG_STATUS_DATA_LINKUP_ALIGN 0 +#define MISC_PERST_PCIE_DEBUG_STATUS_DATA_LINKUP_BITS 1 +#define MISC_PERST_PCIE_DEBUG_STATUS_DATA_LINKUP_SHIFT 1 + +/* MISC_PERST :: PCIE_DEBUG_STATUS :: PHY_LINKUP [00:00] */ +#define MISC_PERST_PCIE_DEBUG_STATUS_PHY_LINKUP_MASK 0x00000001 +#define MISC_PERST_PCIE_DEBUG_STATUS_PHY_LINKUP_ALIGN 0 +#define MISC_PERST_PCIE_DEBUG_STATUS_PHY_LINKUP_BITS 1 +#define MISC_PERST_PCIE_DEBUG_STATUS_PHY_LINKUP_SHIFT 0 + + +/**************************************************************************** + * MISC_PERST :: VREG_CTRL + ***************************************************************************/ +/* MISC_PERST :: VREG_CTRL :: reserved0 [31:08] */ +#define MISC_PERST_VREG_CTRL_reserved0_MASK 0xffffff00 +#define MISC_PERST_VREG_CTRL_reserved0_ALIGN 0 +#define MISC_PERST_VREG_CTRL_reserved0_BITS 24 +#define MISC_PERST_VREG_CTRL_reserved0_SHIFT 8 + +/* MISC_PERST :: VREG_CTRL :: VREG1P2_SEL [07:04] */ +#define MISC_PERST_VREG_CTRL_VREG1P2_SEL_MASK 0x000000f0 +#define MISC_PERST_VREG_CTRL_VREG1P2_SEL_ALIGN 0 +#define MISC_PERST_VREG_CTRL_VREG1P2_SEL_BITS 4 +#define MISC_PERST_VREG_CTRL_VREG1P2_SEL_SHIFT 4 + +/* MISC_PERST :: VREG_CTRL :: VREG2P5_SEL [03:00] */ +#define MISC_PERST_VREG_CTRL_VREG2P5_SEL_MASK 0x0000000f +#define MISC_PERST_VREG_CTRL_VREG2P5_SEL_ALIGN 0 +#define MISC_PERST_VREG_CTRL_VREG2P5_SEL_BITS 4 +#define MISC_PERST_VREG_CTRL_VREG2P5_SEL_SHIFT 0 + + +/**************************************************************************** + * MISC_PERST :: MEM_CTRL + ***************************************************************************/ +/* MISC_PERST :: MEM_CTRL :: reserved0 [31:04] */ +#define MISC_PERST_MEM_CTRL_reserved0_MASK 0xfffffff0 +#define MISC_PERST_MEM_CTRL_reserved0_ALIGN 0 +#define MISC_PERST_MEM_CTRL_reserved0_BITS 28 +#define MISC_PERST_MEM_CTRL_reserved0_SHIFT 4 + +/* MISC_PERST :: MEM_CTRL :: Y_RM [03:03] */ +#define MISC_PERST_MEM_CTRL_Y_RM_MASK 0x00000008 +#define MISC_PERST_MEM_CTRL_Y_RM_ALIGN 0 +#define MISC_PERST_MEM_CTRL_Y_RM_BITS 1 +#define MISC_PERST_MEM_CTRL_Y_RM_SHIFT 3 + +/* MISC_PERST :: MEM_CTRL :: Y_CCM [02:02] */ +#define MISC_PERST_MEM_CTRL_Y_CCM_MASK 0x00000004 +#define MISC_PERST_MEM_CTRL_Y_CCM_ALIGN 0 +#define MISC_PERST_MEM_CTRL_Y_CCM_BITS 1 +#define MISC_PERST_MEM_CTRL_Y_CCM_SHIFT 2 + +/* MISC_PERST :: MEM_CTRL :: UV_RM [01:01] */ +#define MISC_PERST_MEM_CTRL_UV_RM_MASK 0x00000002 +#define MISC_PERST_MEM_CTRL_UV_RM_ALIGN 0 +#define MISC_PERST_MEM_CTRL_UV_RM_BITS 1 +#define MISC_PERST_MEM_CTRL_UV_RM_SHIFT 1 + +/* MISC_PERST :: MEM_CTRL :: UV_CCM [00:00] */ +#define MISC_PERST_MEM_CTRL_UV_CCM_MASK 0x00000001 +#define MISC_PERST_MEM_CTRL_UV_CCM_ALIGN 0 +#define MISC_PERST_MEM_CTRL_UV_CCM_BITS 1 +#define MISC_PERST_MEM_CTRL_UV_CCM_SHIFT 0 + + +/**************************************************************************** + * MISC_PERST :: CLOCK_CTRL + ***************************************************************************/ +/* MISC_PERST :: CLOCK_CTRL :: reserved0 [31:20] */ +#define MISC_PERST_CLOCK_CTRL_reserved0_MASK 0xfff00000 +#define MISC_PERST_CLOCK_CTRL_reserved0_ALIGN 0 +#define MISC_PERST_CLOCK_CTRL_reserved0_BITS 12 +#define MISC_PERST_CLOCK_CTRL_reserved0_SHIFT 20 + +/* MISC_PERST :: CLOCK_CTRL :: PLL_DIV [19:16] */ +#define MISC_PERST_CLOCK_CTRL_PLL_DIV_MASK 0x000f0000 +#define MISC_PERST_CLOCK_CTRL_PLL_DIV_ALIGN 0 +#define MISC_PERST_CLOCK_CTRL_PLL_DIV_BITS 4 +#define MISC_PERST_CLOCK_CTRL_PLL_DIV_SHIFT 16 + +/* MISC_PERST :: CLOCK_CTRL :: PLL_MULT [15:08] */ +#define MISC_PERST_CLOCK_CTRL_PLL_MULT_MASK 0x0000ff00 +#define MISC_PERST_CLOCK_CTRL_PLL_MULT_ALIGN 0 +#define MISC_PERST_CLOCK_CTRL_PLL_MULT_BITS 8 +#define MISC_PERST_CLOCK_CTRL_PLL_MULT_SHIFT 8 + +/* MISC_PERST :: CLOCK_CTRL :: reserved1 [07:03] */ +#define MISC_PERST_CLOCK_CTRL_reserved1_MASK 0x000000f8 +#define MISC_PERST_CLOCK_CTRL_reserved1_ALIGN 0 +#define MISC_PERST_CLOCK_CTRL_reserved1_BITS 5 +#define MISC_PERST_CLOCK_CTRL_reserved1_SHIFT 3 + +/* MISC_PERST :: CLOCK_CTRL :: PLL_PWRDOWN [02:02] */ +#define MISC_PERST_CLOCK_CTRL_PLL_PWRDOWN_MASK 0x00000004 +#define MISC_PERST_CLOCK_CTRL_PLL_PWRDOWN_ALIGN 0 +#define MISC_PERST_CLOCK_CTRL_PLL_PWRDOWN_BITS 1 +#define MISC_PERST_CLOCK_CTRL_PLL_PWRDOWN_SHIFT 2 + +/* MISC_PERST :: CLOCK_CTRL :: STOP_CORE_CLK [01:01] */ +#define MISC_PERST_CLOCK_CTRL_STOP_CORE_CLK_MASK 0x00000002 +#define MISC_PERST_CLOCK_CTRL_STOP_CORE_CLK_ALIGN 0 +#define MISC_PERST_CLOCK_CTRL_STOP_CORE_CLK_BITS 1 +#define MISC_PERST_CLOCK_CTRL_STOP_CORE_CLK_SHIFT 1 + +/* MISC_PERST :: CLOCK_CTRL :: SEL_ALT_CLK [00:00] */ +#define MISC_PERST_CLOCK_CTRL_SEL_ALT_CLK_MASK 0x00000001 +#define MISC_PERST_CLOCK_CTRL_SEL_ALT_CLK_ALIGN 0 +#define MISC_PERST_CLOCK_CTRL_SEL_ALT_CLK_BITS 1 +#define MISC_PERST_CLOCK_CTRL_SEL_ALT_CLK_SHIFT 0 + + +/**************************************************************************** + * BCM70012_MISC_TOP_GISB_ARBITER + ***************************************************************************/ +/**************************************************************************** + * GISB_ARBITER :: REVISION + ***************************************************************************/ +/* GISB_ARBITER :: REVISION :: reserved0 [31:16] */ +#define GISB_ARBITER_REVISION_reserved0_MASK 0xffff0000 +#define GISB_ARBITER_REVISION_reserved0_ALIGN 0 +#define GISB_ARBITER_REVISION_reserved0_BITS 16 +#define GISB_ARBITER_REVISION_reserved0_SHIFT 16 + +/* GISB_ARBITER :: REVISION :: MAJOR [15:08] */ +#define GISB_ARBITER_REVISION_MAJOR_MASK 0x0000ff00 +#define GISB_ARBITER_REVISION_MAJOR_ALIGN 0 +#define GISB_ARBITER_REVISION_MAJOR_BITS 8 +#define GISB_ARBITER_REVISION_MAJOR_SHIFT 8 + +/* GISB_ARBITER :: REVISION :: MINOR [07:00] */ +#define GISB_ARBITER_REVISION_MINOR_MASK 0x000000ff +#define GISB_ARBITER_REVISION_MINOR_ALIGN 0 +#define GISB_ARBITER_REVISION_MINOR_BITS 8 +#define GISB_ARBITER_REVISION_MINOR_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: SCRATCH + ***************************************************************************/ +/* GISB_ARBITER :: SCRATCH :: scratch_bit [31:00] */ +#define GISB_ARBITER_SCRATCH_scratch_bit_MASK 0xffffffff +#define GISB_ARBITER_SCRATCH_scratch_bit_ALIGN 0 +#define GISB_ARBITER_SCRATCH_scratch_bit_BITS 32 +#define GISB_ARBITER_SCRATCH_scratch_bit_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: REQ_MASK + ***************************************************************************/ +/* GISB_ARBITER :: REQ_MASK :: reserved0 [31:06] */ +#define GISB_ARBITER_REQ_MASK_reserved0_MASK 0xffffffc0 +#define GISB_ARBITER_REQ_MASK_reserved0_ALIGN 0 +#define GISB_ARBITER_REQ_MASK_reserved0_BITS 26 +#define GISB_ARBITER_REQ_MASK_reserved0_SHIFT 6 + +/* GISB_ARBITER :: REQ_MASK :: bsp [05:05] */ +#define GISB_ARBITER_REQ_MASK_bsp_MASK 0x00000020 +#define GISB_ARBITER_REQ_MASK_bsp_ALIGN 0 +#define GISB_ARBITER_REQ_MASK_bsp_BITS 1 +#define GISB_ARBITER_REQ_MASK_bsp_SHIFT 5 +#define GISB_ARBITER_REQ_MASK_bsp_UNMASK 0 + +/* GISB_ARBITER :: REQ_MASK :: tgt [04:04] */ +#define GISB_ARBITER_REQ_MASK_tgt_MASK 0x00000010 +#define GISB_ARBITER_REQ_MASK_tgt_ALIGN 0 +#define GISB_ARBITER_REQ_MASK_tgt_BITS 1 +#define GISB_ARBITER_REQ_MASK_tgt_SHIFT 4 +#define GISB_ARBITER_REQ_MASK_tgt_UNMASK 0 + +/* GISB_ARBITER :: REQ_MASK :: aes [03:03] */ +#define GISB_ARBITER_REQ_MASK_aes_MASK 0x00000008 +#define GISB_ARBITER_REQ_MASK_aes_ALIGN 0 +#define GISB_ARBITER_REQ_MASK_aes_BITS 1 +#define GISB_ARBITER_REQ_MASK_aes_SHIFT 3 +#define GISB_ARBITER_REQ_MASK_aes_UNMASK 0 + +/* GISB_ARBITER :: REQ_MASK :: dci [02:02] */ +#define GISB_ARBITER_REQ_MASK_dci_MASK 0x00000004 +#define GISB_ARBITER_REQ_MASK_dci_ALIGN 0 +#define GISB_ARBITER_REQ_MASK_dci_BITS 1 +#define GISB_ARBITER_REQ_MASK_dci_SHIFT 2 +#define GISB_ARBITER_REQ_MASK_dci_UNMASK 0 + +/* GISB_ARBITER :: REQ_MASK :: cce [01:01] */ +#define GISB_ARBITER_REQ_MASK_cce_MASK 0x00000002 +#define GISB_ARBITER_REQ_MASK_cce_ALIGN 0 +#define GISB_ARBITER_REQ_MASK_cce_BITS 1 +#define GISB_ARBITER_REQ_MASK_cce_SHIFT 1 +#define GISB_ARBITER_REQ_MASK_cce_UNMASK 0 + +/* GISB_ARBITER :: REQ_MASK :: dbu [00:00] */ +#define GISB_ARBITER_REQ_MASK_dbu_MASK 0x00000001 +#define GISB_ARBITER_REQ_MASK_dbu_ALIGN 0 +#define GISB_ARBITER_REQ_MASK_dbu_BITS 1 +#define GISB_ARBITER_REQ_MASK_dbu_SHIFT 0 +#define GISB_ARBITER_REQ_MASK_dbu_UNMASK 0 + + +/**************************************************************************** + * GISB_ARBITER :: TIMER + ***************************************************************************/ +/* GISB_ARBITER :: TIMER :: hi_count [31:16] */ +#define GISB_ARBITER_TIMER_hi_count_MASK 0xffff0000 +#define GISB_ARBITER_TIMER_hi_count_ALIGN 0 +#define GISB_ARBITER_TIMER_hi_count_BITS 16 +#define GISB_ARBITER_TIMER_hi_count_SHIFT 16 + +/* GISB_ARBITER :: TIMER :: lo_count [15:00] */ +#define GISB_ARBITER_TIMER_lo_count_MASK 0x0000ffff +#define GISB_ARBITER_TIMER_lo_count_ALIGN 0 +#define GISB_ARBITER_TIMER_lo_count_BITS 16 +#define GISB_ARBITER_TIMER_lo_count_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: BP_CTRL + ***************************************************************************/ +/* GISB_ARBITER :: BP_CTRL :: reserved0 [31:02] */ +#define GISB_ARBITER_BP_CTRL_reserved0_MASK 0xfffffffc +#define GISB_ARBITER_BP_CTRL_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_CTRL_reserved0_BITS 30 +#define GISB_ARBITER_BP_CTRL_reserved0_SHIFT 2 + +/* GISB_ARBITER :: BP_CTRL :: breakpoint_tea [01:01] */ +#define GISB_ARBITER_BP_CTRL_breakpoint_tea_MASK 0x00000002 +#define GISB_ARBITER_BP_CTRL_breakpoint_tea_ALIGN 0 +#define GISB_ARBITER_BP_CTRL_breakpoint_tea_BITS 1 +#define GISB_ARBITER_BP_CTRL_breakpoint_tea_SHIFT 1 +#define GISB_ARBITER_BP_CTRL_breakpoint_tea_DISABLE 0 +#define GISB_ARBITER_BP_CTRL_breakpoint_tea_ENABLE 1 + +/* GISB_ARBITER :: BP_CTRL :: repeat_capture [00:00] */ +#define GISB_ARBITER_BP_CTRL_repeat_capture_MASK 0x00000001 +#define GISB_ARBITER_BP_CTRL_repeat_capture_ALIGN 0 +#define GISB_ARBITER_BP_CTRL_repeat_capture_BITS 1 +#define GISB_ARBITER_BP_CTRL_repeat_capture_SHIFT 0 +#define GISB_ARBITER_BP_CTRL_repeat_capture_DISABLE 0 +#define GISB_ARBITER_BP_CTRL_repeat_capture_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_CAP_CLR + ***************************************************************************/ +/* GISB_ARBITER :: BP_CAP_CLR :: reserved0 [31:01] */ +#define GISB_ARBITER_BP_CAP_CLR_reserved0_MASK 0xfffffffe +#define GISB_ARBITER_BP_CAP_CLR_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_CAP_CLR_reserved0_BITS 31 +#define GISB_ARBITER_BP_CAP_CLR_reserved0_SHIFT 1 + +/* GISB_ARBITER :: BP_CAP_CLR :: clear [00:00] */ +#define GISB_ARBITER_BP_CAP_CLR_clear_MASK 0x00000001 +#define GISB_ARBITER_BP_CAP_CLR_clear_ALIGN 0 +#define GISB_ARBITER_BP_CAP_CLR_clear_BITS 1 +#define GISB_ARBITER_BP_CAP_CLR_clear_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: BP_START_ADDR_0 + ***************************************************************************/ +/* GISB_ARBITER :: BP_START_ADDR_0 :: start [31:00] */ +#define GISB_ARBITER_BP_START_ADDR_0_start_MASK 0xffffffff +#define GISB_ARBITER_BP_START_ADDR_0_start_ALIGN 0 +#define GISB_ARBITER_BP_START_ADDR_0_start_BITS 32 +#define GISB_ARBITER_BP_START_ADDR_0_start_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: BP_END_ADDR_0 + ***************************************************************************/ +/* GISB_ARBITER :: BP_END_ADDR_0 :: end [31:00] */ +#define GISB_ARBITER_BP_END_ADDR_0_end_MASK 0xffffffff +#define GISB_ARBITER_BP_END_ADDR_0_end_ALIGN 0 +#define GISB_ARBITER_BP_END_ADDR_0_end_BITS 32 +#define GISB_ARBITER_BP_END_ADDR_0_end_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: BP_READ_0 + ***************************************************************************/ +/* GISB_ARBITER :: BP_READ_0 :: reserved0 [31:06] */ +#define GISB_ARBITER_BP_READ_0_reserved0_MASK 0xffffffc0 +#define GISB_ARBITER_BP_READ_0_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_READ_0_reserved0_BITS 26 +#define GISB_ARBITER_BP_READ_0_reserved0_SHIFT 6 + +/* GISB_ARBITER :: BP_READ_0 :: bsp [05:05] */ +#define GISB_ARBITER_BP_READ_0_bsp_MASK 0x00000020 +#define GISB_ARBITER_BP_READ_0_bsp_ALIGN 0 +#define GISB_ARBITER_BP_READ_0_bsp_BITS 1 +#define GISB_ARBITER_BP_READ_0_bsp_SHIFT 5 +#define GISB_ARBITER_BP_READ_0_bsp_DISABLE 0 +#define GISB_ARBITER_BP_READ_0_bsp_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_0 :: aes [04:04] */ +#define GISB_ARBITER_BP_READ_0_aes_MASK 0x00000010 +#define GISB_ARBITER_BP_READ_0_aes_ALIGN 0 +#define GISB_ARBITER_BP_READ_0_aes_BITS 1 +#define GISB_ARBITER_BP_READ_0_aes_SHIFT 4 +#define GISB_ARBITER_BP_READ_0_aes_DISABLE 0 +#define GISB_ARBITER_BP_READ_0_aes_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_0 :: fve [03:03] */ +#define GISB_ARBITER_BP_READ_0_fve_MASK 0x00000008 +#define GISB_ARBITER_BP_READ_0_fve_ALIGN 0 +#define GISB_ARBITER_BP_READ_0_fve_BITS 1 +#define GISB_ARBITER_BP_READ_0_fve_SHIFT 3 +#define GISB_ARBITER_BP_READ_0_fve_DISABLE 0 +#define GISB_ARBITER_BP_READ_0_fve_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_0 :: tgt [02:02] */ +#define GISB_ARBITER_BP_READ_0_tgt_MASK 0x00000004 +#define GISB_ARBITER_BP_READ_0_tgt_ALIGN 0 +#define GISB_ARBITER_BP_READ_0_tgt_BITS 1 +#define GISB_ARBITER_BP_READ_0_tgt_SHIFT 2 +#define GISB_ARBITER_BP_READ_0_tgt_DISABLE 0 +#define GISB_ARBITER_BP_READ_0_tgt_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_0 :: dbu [01:01] */ +#define GISB_ARBITER_BP_READ_0_dbu_MASK 0x00000002 +#define GISB_ARBITER_BP_READ_0_dbu_ALIGN 0 +#define GISB_ARBITER_BP_READ_0_dbu_BITS 1 +#define GISB_ARBITER_BP_READ_0_dbu_SHIFT 1 +#define GISB_ARBITER_BP_READ_0_dbu_DISABLE 0 +#define GISB_ARBITER_BP_READ_0_dbu_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_0 :: cce [00:00] */ +#define GISB_ARBITER_BP_READ_0_cce_MASK 0x00000001 +#define GISB_ARBITER_BP_READ_0_cce_ALIGN 0 +#define GISB_ARBITER_BP_READ_0_cce_BITS 1 +#define GISB_ARBITER_BP_READ_0_cce_SHIFT 0 +#define GISB_ARBITER_BP_READ_0_cce_DISABLE 0 +#define GISB_ARBITER_BP_READ_0_cce_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_WRITE_0 + ***************************************************************************/ +/* GISB_ARBITER :: BP_WRITE_0 :: reserved0 [31:06] */ +#define GISB_ARBITER_BP_WRITE_0_reserved0_MASK 0xffffffc0 +#define GISB_ARBITER_BP_WRITE_0_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_0_reserved0_BITS 26 +#define GISB_ARBITER_BP_WRITE_0_reserved0_SHIFT 6 + +/* GISB_ARBITER :: BP_WRITE_0 :: bsp [05:05] */ +#define GISB_ARBITER_BP_WRITE_0_bsp_MASK 0x00000020 +#define GISB_ARBITER_BP_WRITE_0_bsp_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_0_bsp_BITS 1 +#define GISB_ARBITER_BP_WRITE_0_bsp_SHIFT 5 +#define GISB_ARBITER_BP_WRITE_0_bsp_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_0_bsp_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_0 :: aes [04:04] */ +#define GISB_ARBITER_BP_WRITE_0_aes_MASK 0x00000010 +#define GISB_ARBITER_BP_WRITE_0_aes_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_0_aes_BITS 1 +#define GISB_ARBITER_BP_WRITE_0_aes_SHIFT 4 +#define GISB_ARBITER_BP_WRITE_0_aes_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_0_aes_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_0 :: fve [03:03] */ +#define GISB_ARBITER_BP_WRITE_0_fve_MASK 0x00000008 +#define GISB_ARBITER_BP_WRITE_0_fve_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_0_fve_BITS 1 +#define GISB_ARBITER_BP_WRITE_0_fve_SHIFT 3 +#define GISB_ARBITER_BP_WRITE_0_fve_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_0_fve_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_0 :: tgt [02:02] */ +#define GISB_ARBITER_BP_WRITE_0_tgt_MASK 0x00000004 +#define GISB_ARBITER_BP_WRITE_0_tgt_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_0_tgt_BITS 1 +#define GISB_ARBITER_BP_WRITE_0_tgt_SHIFT 2 +#define GISB_ARBITER_BP_WRITE_0_tgt_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_0_tgt_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_0 :: dbu [01:01] */ +#define GISB_ARBITER_BP_WRITE_0_dbu_MASK 0x00000002 +#define GISB_ARBITER_BP_WRITE_0_dbu_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_0_dbu_BITS 1 +#define GISB_ARBITER_BP_WRITE_0_dbu_SHIFT 1 +#define GISB_ARBITER_BP_WRITE_0_dbu_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_0_dbu_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_0 :: cce [00:00] */ +#define GISB_ARBITER_BP_WRITE_0_cce_MASK 0x00000001 +#define GISB_ARBITER_BP_WRITE_0_cce_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_0_cce_BITS 1 +#define GISB_ARBITER_BP_WRITE_0_cce_SHIFT 0 +#define GISB_ARBITER_BP_WRITE_0_cce_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_0_cce_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_ENABLE_0 + ***************************************************************************/ +/* GISB_ARBITER :: BP_ENABLE_0 :: reserved0 [31:03] */ +#define GISB_ARBITER_BP_ENABLE_0_reserved0_MASK 0xfffffff8 +#define GISB_ARBITER_BP_ENABLE_0_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_0_reserved0_BITS 29 +#define GISB_ARBITER_BP_ENABLE_0_reserved0_SHIFT 3 + +/* GISB_ARBITER :: BP_ENABLE_0 :: block [02:02] */ +#define GISB_ARBITER_BP_ENABLE_0_block_MASK 0x00000004 +#define GISB_ARBITER_BP_ENABLE_0_block_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_0_block_BITS 1 +#define GISB_ARBITER_BP_ENABLE_0_block_SHIFT 2 +#define GISB_ARBITER_BP_ENABLE_0_block_DISABLE 0 +#define GISB_ARBITER_BP_ENABLE_0_block_ENABLE 1 + +/* GISB_ARBITER :: BP_ENABLE_0 :: address [01:01] */ +#define GISB_ARBITER_BP_ENABLE_0_address_MASK 0x00000002 +#define GISB_ARBITER_BP_ENABLE_0_address_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_0_address_BITS 1 +#define GISB_ARBITER_BP_ENABLE_0_address_SHIFT 1 +#define GISB_ARBITER_BP_ENABLE_0_address_DISABLE 0 +#define GISB_ARBITER_BP_ENABLE_0_address_ENABLE 1 + +/* GISB_ARBITER :: BP_ENABLE_0 :: access [00:00] */ +#define GISB_ARBITER_BP_ENABLE_0_access_MASK 0x00000001 +#define GISB_ARBITER_BP_ENABLE_0_access_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_0_access_BITS 1 +#define GISB_ARBITER_BP_ENABLE_0_access_SHIFT 0 +#define GISB_ARBITER_BP_ENABLE_0_access_DISABLE 0 +#define GISB_ARBITER_BP_ENABLE_0_access_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_START_ADDR_1 + ***************************************************************************/ +/* GISB_ARBITER :: BP_START_ADDR_1 :: start [31:00] */ +#define GISB_ARBITER_BP_START_ADDR_1_start_MASK 0xffffffff +#define GISB_ARBITER_BP_START_ADDR_1_start_ALIGN 0 +#define GISB_ARBITER_BP_START_ADDR_1_start_BITS 32 +#define GISB_ARBITER_BP_START_ADDR_1_start_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: BP_END_ADDR_1 + ***************************************************************************/ +/* GISB_ARBITER :: BP_END_ADDR_1 :: end [31:00] */ +#define GISB_ARBITER_BP_END_ADDR_1_end_MASK 0xffffffff +#define GISB_ARBITER_BP_END_ADDR_1_end_ALIGN 0 +#define GISB_ARBITER_BP_END_ADDR_1_end_BITS 32 +#define GISB_ARBITER_BP_END_ADDR_1_end_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: BP_READ_1 + ***************************************************************************/ +/* GISB_ARBITER :: BP_READ_1 :: reserved0 [31:06] */ +#define GISB_ARBITER_BP_READ_1_reserved0_MASK 0xffffffc0 +#define GISB_ARBITER_BP_READ_1_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_READ_1_reserved0_BITS 26 +#define GISB_ARBITER_BP_READ_1_reserved0_SHIFT 6 + +/* GISB_ARBITER :: BP_READ_1 :: bsp [05:05] */ +#define GISB_ARBITER_BP_READ_1_bsp_MASK 0x00000020 +#define GISB_ARBITER_BP_READ_1_bsp_ALIGN 0 +#define GISB_ARBITER_BP_READ_1_bsp_BITS 1 +#define GISB_ARBITER_BP_READ_1_bsp_SHIFT 5 +#define GISB_ARBITER_BP_READ_1_bsp_DISABLE 0 +#define GISB_ARBITER_BP_READ_1_bsp_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_1 :: aes [04:04] */ +#define GISB_ARBITER_BP_READ_1_aes_MASK 0x00000010 +#define GISB_ARBITER_BP_READ_1_aes_ALIGN 0 +#define GISB_ARBITER_BP_READ_1_aes_BITS 1 +#define GISB_ARBITER_BP_READ_1_aes_SHIFT 4 +#define GISB_ARBITER_BP_READ_1_aes_DISABLE 0 +#define GISB_ARBITER_BP_READ_1_aes_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_1 :: fve [03:03] */ +#define GISB_ARBITER_BP_READ_1_fve_MASK 0x00000008 +#define GISB_ARBITER_BP_READ_1_fve_ALIGN 0 +#define GISB_ARBITER_BP_READ_1_fve_BITS 1 +#define GISB_ARBITER_BP_READ_1_fve_SHIFT 3 +#define GISB_ARBITER_BP_READ_1_fve_DISABLE 0 +#define GISB_ARBITER_BP_READ_1_fve_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_1 :: tgt [02:02] */ +#define GISB_ARBITER_BP_READ_1_tgt_MASK 0x00000004 +#define GISB_ARBITER_BP_READ_1_tgt_ALIGN 0 +#define GISB_ARBITER_BP_READ_1_tgt_BITS 1 +#define GISB_ARBITER_BP_READ_1_tgt_SHIFT 2 +#define GISB_ARBITER_BP_READ_1_tgt_DISABLE 0 +#define GISB_ARBITER_BP_READ_1_tgt_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_1 :: dbu [01:01] */ +#define GISB_ARBITER_BP_READ_1_dbu_MASK 0x00000002 +#define GISB_ARBITER_BP_READ_1_dbu_ALIGN 0 +#define GISB_ARBITER_BP_READ_1_dbu_BITS 1 +#define GISB_ARBITER_BP_READ_1_dbu_SHIFT 1 +#define GISB_ARBITER_BP_READ_1_dbu_DISABLE 0 +#define GISB_ARBITER_BP_READ_1_dbu_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_1 :: cce [00:00] */ +#define GISB_ARBITER_BP_READ_1_cce_MASK 0x00000001 +#define GISB_ARBITER_BP_READ_1_cce_ALIGN 0 +#define GISB_ARBITER_BP_READ_1_cce_BITS 1 +#define GISB_ARBITER_BP_READ_1_cce_SHIFT 0 +#define GISB_ARBITER_BP_READ_1_cce_DISABLE 0 +#define GISB_ARBITER_BP_READ_1_cce_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_WRITE_1 + ***************************************************************************/ +/* GISB_ARBITER :: BP_WRITE_1 :: reserved0 [31:06] */ +#define GISB_ARBITER_BP_WRITE_1_reserved0_MASK 0xffffffc0 +#define GISB_ARBITER_BP_WRITE_1_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_1_reserved0_BITS 26 +#define GISB_ARBITER_BP_WRITE_1_reserved0_SHIFT 6 + +/* GISB_ARBITER :: BP_WRITE_1 :: bsp [05:05] */ +#define GISB_ARBITER_BP_WRITE_1_bsp_MASK 0x00000020 +#define GISB_ARBITER_BP_WRITE_1_bsp_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_1_bsp_BITS 1 +#define GISB_ARBITER_BP_WRITE_1_bsp_SHIFT 5 +#define GISB_ARBITER_BP_WRITE_1_bsp_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_1_bsp_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_1 :: aes [04:04] */ +#define GISB_ARBITER_BP_WRITE_1_aes_MASK 0x00000010 +#define GISB_ARBITER_BP_WRITE_1_aes_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_1_aes_BITS 1 +#define GISB_ARBITER_BP_WRITE_1_aes_SHIFT 4 +#define GISB_ARBITER_BP_WRITE_1_aes_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_1_aes_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_1 :: fve [03:03] */ +#define GISB_ARBITER_BP_WRITE_1_fve_MASK 0x00000008 +#define GISB_ARBITER_BP_WRITE_1_fve_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_1_fve_BITS 1 +#define GISB_ARBITER_BP_WRITE_1_fve_SHIFT 3 +#define GISB_ARBITER_BP_WRITE_1_fve_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_1_fve_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_1 :: tgt [02:02] */ +#define GISB_ARBITER_BP_WRITE_1_tgt_MASK 0x00000004 +#define GISB_ARBITER_BP_WRITE_1_tgt_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_1_tgt_BITS 1 +#define GISB_ARBITER_BP_WRITE_1_tgt_SHIFT 2 +#define GISB_ARBITER_BP_WRITE_1_tgt_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_1_tgt_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_1 :: dbu [01:01] */ +#define GISB_ARBITER_BP_WRITE_1_dbu_MASK 0x00000002 +#define GISB_ARBITER_BP_WRITE_1_dbu_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_1_dbu_BITS 1 +#define GISB_ARBITER_BP_WRITE_1_dbu_SHIFT 1 +#define GISB_ARBITER_BP_WRITE_1_dbu_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_1_dbu_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_1 :: cce [00:00] */ +#define GISB_ARBITER_BP_WRITE_1_cce_MASK 0x00000001 +#define GISB_ARBITER_BP_WRITE_1_cce_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_1_cce_BITS 1 +#define GISB_ARBITER_BP_WRITE_1_cce_SHIFT 0 +#define GISB_ARBITER_BP_WRITE_1_cce_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_1_cce_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_ENABLE_1 + ***************************************************************************/ +/* GISB_ARBITER :: BP_ENABLE_1 :: reserved0 [31:03] */ +#define GISB_ARBITER_BP_ENABLE_1_reserved0_MASK 0xfffffff8 +#define GISB_ARBITER_BP_ENABLE_1_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_1_reserved0_BITS 29 +#define GISB_ARBITER_BP_ENABLE_1_reserved0_SHIFT 3 + +/* GISB_ARBITER :: BP_ENABLE_1 :: block [02:02] */ +#define GISB_ARBITER_BP_ENABLE_1_block_MASK 0x00000004 +#define GISB_ARBITER_BP_ENABLE_1_block_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_1_block_BITS 1 +#define GISB_ARBITER_BP_ENABLE_1_block_SHIFT 2 +#define GISB_ARBITER_BP_ENABLE_1_block_DISABLE 0 +#define GISB_ARBITER_BP_ENABLE_1_block_ENABLE 1 + +/* GISB_ARBITER :: BP_ENABLE_1 :: address [01:01] */ +#define GISB_ARBITER_BP_ENABLE_1_address_MASK 0x00000002 +#define GISB_ARBITER_BP_ENABLE_1_address_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_1_address_BITS 1 +#define GISB_ARBITER_BP_ENABLE_1_address_SHIFT 1 +#define GISB_ARBITER_BP_ENABLE_1_address_DISABLE 0 +#define GISB_ARBITER_BP_ENABLE_1_address_ENABLE 1 + +/* GISB_ARBITER :: BP_ENABLE_1 :: access [00:00] */ +#define GISB_ARBITER_BP_ENABLE_1_access_MASK 0x00000001 +#define GISB_ARBITER_BP_ENABLE_1_access_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_1_access_BITS 1 +#define GISB_ARBITER_BP_ENABLE_1_access_SHIFT 0 +#define GISB_ARBITER_BP_ENABLE_1_access_DISABLE 0 +#define GISB_ARBITER_BP_ENABLE_1_access_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_START_ADDR_2 + ***************************************************************************/ +/* GISB_ARBITER :: BP_START_ADDR_2 :: start [31:00] */ +#define GISB_ARBITER_BP_START_ADDR_2_start_MASK 0xffffffff +#define GISB_ARBITER_BP_START_ADDR_2_start_ALIGN 0 +#define GISB_ARBITER_BP_START_ADDR_2_start_BITS 32 +#define GISB_ARBITER_BP_START_ADDR_2_start_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: BP_END_ADDR_2 + ***************************************************************************/ +/* GISB_ARBITER :: BP_END_ADDR_2 :: end [31:00] */ +#define GISB_ARBITER_BP_END_ADDR_2_end_MASK 0xffffffff +#define GISB_ARBITER_BP_END_ADDR_2_end_ALIGN 0 +#define GISB_ARBITER_BP_END_ADDR_2_end_BITS 32 +#define GISB_ARBITER_BP_END_ADDR_2_end_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: BP_READ_2 + ***************************************************************************/ +/* GISB_ARBITER :: BP_READ_2 :: reserved0 [31:06] */ +#define GISB_ARBITER_BP_READ_2_reserved0_MASK 0xffffffc0 +#define GISB_ARBITER_BP_READ_2_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_READ_2_reserved0_BITS 26 +#define GISB_ARBITER_BP_READ_2_reserved0_SHIFT 6 + +/* GISB_ARBITER :: BP_READ_2 :: bsp [05:05] */ +#define GISB_ARBITER_BP_READ_2_bsp_MASK 0x00000020 +#define GISB_ARBITER_BP_READ_2_bsp_ALIGN 0 +#define GISB_ARBITER_BP_READ_2_bsp_BITS 1 +#define GISB_ARBITER_BP_READ_2_bsp_SHIFT 5 +#define GISB_ARBITER_BP_READ_2_bsp_DISABLE 0 +#define GISB_ARBITER_BP_READ_2_bsp_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_2 :: aes [04:04] */ +#define GISB_ARBITER_BP_READ_2_aes_MASK 0x00000010 +#define GISB_ARBITER_BP_READ_2_aes_ALIGN 0 +#define GISB_ARBITER_BP_READ_2_aes_BITS 1 +#define GISB_ARBITER_BP_READ_2_aes_SHIFT 4 +#define GISB_ARBITER_BP_READ_2_aes_DISABLE 0 +#define GISB_ARBITER_BP_READ_2_aes_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_2 :: fve [03:03] */ +#define GISB_ARBITER_BP_READ_2_fve_MASK 0x00000008 +#define GISB_ARBITER_BP_READ_2_fve_ALIGN 0 +#define GISB_ARBITER_BP_READ_2_fve_BITS 1 +#define GISB_ARBITER_BP_READ_2_fve_SHIFT 3 +#define GISB_ARBITER_BP_READ_2_fve_DISABLE 0 +#define GISB_ARBITER_BP_READ_2_fve_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_2 :: tgt [02:02] */ +#define GISB_ARBITER_BP_READ_2_tgt_MASK 0x00000004 +#define GISB_ARBITER_BP_READ_2_tgt_ALIGN 0 +#define GISB_ARBITER_BP_READ_2_tgt_BITS 1 +#define GISB_ARBITER_BP_READ_2_tgt_SHIFT 2 +#define GISB_ARBITER_BP_READ_2_tgt_DISABLE 0 +#define GISB_ARBITER_BP_READ_2_tgt_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_2 :: dbu [01:01] */ +#define GISB_ARBITER_BP_READ_2_dbu_MASK 0x00000002 +#define GISB_ARBITER_BP_READ_2_dbu_ALIGN 0 +#define GISB_ARBITER_BP_READ_2_dbu_BITS 1 +#define GISB_ARBITER_BP_READ_2_dbu_SHIFT 1 +#define GISB_ARBITER_BP_READ_2_dbu_DISABLE 0 +#define GISB_ARBITER_BP_READ_2_dbu_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_2 :: cce [00:00] */ +#define GISB_ARBITER_BP_READ_2_cce_MASK 0x00000001 +#define GISB_ARBITER_BP_READ_2_cce_ALIGN 0 +#define GISB_ARBITER_BP_READ_2_cce_BITS 1 +#define GISB_ARBITER_BP_READ_2_cce_SHIFT 0 +#define GISB_ARBITER_BP_READ_2_cce_DISABLE 0 +#define GISB_ARBITER_BP_READ_2_cce_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_WRITE_2 + ***************************************************************************/ +/* GISB_ARBITER :: BP_WRITE_2 :: reserved0 [31:06] */ +#define GISB_ARBITER_BP_WRITE_2_reserved0_MASK 0xffffffc0 +#define GISB_ARBITER_BP_WRITE_2_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_2_reserved0_BITS 26 +#define GISB_ARBITER_BP_WRITE_2_reserved0_SHIFT 6 + +/* GISB_ARBITER :: BP_WRITE_2 :: bsp [05:05] */ +#define GISB_ARBITER_BP_WRITE_2_bsp_MASK 0x00000020 +#define GISB_ARBITER_BP_WRITE_2_bsp_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_2_bsp_BITS 1 +#define GISB_ARBITER_BP_WRITE_2_bsp_SHIFT 5 +#define GISB_ARBITER_BP_WRITE_2_bsp_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_2_bsp_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_2 :: aes [04:04] */ +#define GISB_ARBITER_BP_WRITE_2_aes_MASK 0x00000010 +#define GISB_ARBITER_BP_WRITE_2_aes_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_2_aes_BITS 1 +#define GISB_ARBITER_BP_WRITE_2_aes_SHIFT 4 +#define GISB_ARBITER_BP_WRITE_2_aes_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_2_aes_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_2 :: fve [03:03] */ +#define GISB_ARBITER_BP_WRITE_2_fve_MASK 0x00000008 +#define GISB_ARBITER_BP_WRITE_2_fve_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_2_fve_BITS 1 +#define GISB_ARBITER_BP_WRITE_2_fve_SHIFT 3 +#define GISB_ARBITER_BP_WRITE_2_fve_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_2_fve_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_2 :: tgt [02:02] */ +#define GISB_ARBITER_BP_WRITE_2_tgt_MASK 0x00000004 +#define GISB_ARBITER_BP_WRITE_2_tgt_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_2_tgt_BITS 1 +#define GISB_ARBITER_BP_WRITE_2_tgt_SHIFT 2 +#define GISB_ARBITER_BP_WRITE_2_tgt_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_2_tgt_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_2 :: dbu [01:01] */ +#define GISB_ARBITER_BP_WRITE_2_dbu_MASK 0x00000002 +#define GISB_ARBITER_BP_WRITE_2_dbu_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_2_dbu_BITS 1 +#define GISB_ARBITER_BP_WRITE_2_dbu_SHIFT 1 +#define GISB_ARBITER_BP_WRITE_2_dbu_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_2_dbu_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_2 :: cce [00:00] */ +#define GISB_ARBITER_BP_WRITE_2_cce_MASK 0x00000001 +#define GISB_ARBITER_BP_WRITE_2_cce_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_2_cce_BITS 1 +#define GISB_ARBITER_BP_WRITE_2_cce_SHIFT 0 +#define GISB_ARBITER_BP_WRITE_2_cce_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_2_cce_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_ENABLE_2 + ***************************************************************************/ +/* GISB_ARBITER :: BP_ENABLE_2 :: reserved0 [31:03] */ +#define GISB_ARBITER_BP_ENABLE_2_reserved0_MASK 0xfffffff8 +#define GISB_ARBITER_BP_ENABLE_2_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_2_reserved0_BITS 29 +#define GISB_ARBITER_BP_ENABLE_2_reserved0_SHIFT 3 + +/* GISB_ARBITER :: BP_ENABLE_2 :: block [02:02] */ +#define GISB_ARBITER_BP_ENABLE_2_block_MASK 0x00000004 +#define GISB_ARBITER_BP_ENABLE_2_block_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_2_block_BITS 1 +#define GISB_ARBITER_BP_ENABLE_2_block_SHIFT 2 +#define GISB_ARBITER_BP_ENABLE_2_block_DISABLE 0 +#define GISB_ARBITER_BP_ENABLE_2_block_ENABLE 1 + +/* GISB_ARBITER :: BP_ENABLE_2 :: address [01:01] */ +#define GISB_ARBITER_BP_ENABLE_2_address_MASK 0x00000002 +#define GISB_ARBITER_BP_ENABLE_2_address_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_2_address_BITS 1 +#define GISB_ARBITER_BP_ENABLE_2_address_SHIFT 1 +#define GISB_ARBITER_BP_ENABLE_2_address_DISABLE 0 +#define GISB_ARBITER_BP_ENABLE_2_address_ENABLE 1 + +/* GISB_ARBITER :: BP_ENABLE_2 :: access [00:00] */ +#define GISB_ARBITER_BP_ENABLE_2_access_MASK 0x00000001 +#define GISB_ARBITER_BP_ENABLE_2_access_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_2_access_BITS 1 +#define GISB_ARBITER_BP_ENABLE_2_access_SHIFT 0 +#define GISB_ARBITER_BP_ENABLE_2_access_DISABLE 0 +#define GISB_ARBITER_BP_ENABLE_2_access_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_START_ADDR_3 + ***************************************************************************/ +/* GISB_ARBITER :: BP_START_ADDR_3 :: start [31:00] */ +#define GISB_ARBITER_BP_START_ADDR_3_start_MASK 0xffffffff +#define GISB_ARBITER_BP_START_ADDR_3_start_ALIGN 0 +#define GISB_ARBITER_BP_START_ADDR_3_start_BITS 32 +#define GISB_ARBITER_BP_START_ADDR_3_start_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: BP_END_ADDR_3 + ***************************************************************************/ +/* GISB_ARBITER :: BP_END_ADDR_3 :: end [31:00] */ +#define GISB_ARBITER_BP_END_ADDR_3_end_MASK 0xffffffff +#define GISB_ARBITER_BP_END_ADDR_3_end_ALIGN 0 +#define GISB_ARBITER_BP_END_ADDR_3_end_BITS 32 +#define GISB_ARBITER_BP_END_ADDR_3_end_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: BP_READ_3 + ***************************************************************************/ +/* GISB_ARBITER :: BP_READ_3 :: reserved0 [31:06] */ +#define GISB_ARBITER_BP_READ_3_reserved0_MASK 0xffffffc0 +#define GISB_ARBITER_BP_READ_3_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_READ_3_reserved0_BITS 26 +#define GISB_ARBITER_BP_READ_3_reserved0_SHIFT 6 + +/* GISB_ARBITER :: BP_READ_3 :: bsp [05:05] */ +#define GISB_ARBITER_BP_READ_3_bsp_MASK 0x00000020 +#define GISB_ARBITER_BP_READ_3_bsp_ALIGN 0 +#define GISB_ARBITER_BP_READ_3_bsp_BITS 1 +#define GISB_ARBITER_BP_READ_3_bsp_SHIFT 5 +#define GISB_ARBITER_BP_READ_3_bsp_DISABLE 0 +#define GISB_ARBITER_BP_READ_3_bsp_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_3 :: aes [04:04] */ +#define GISB_ARBITER_BP_READ_3_aes_MASK 0x00000010 +#define GISB_ARBITER_BP_READ_3_aes_ALIGN 0 +#define GISB_ARBITER_BP_READ_3_aes_BITS 1 +#define GISB_ARBITER_BP_READ_3_aes_SHIFT 4 +#define GISB_ARBITER_BP_READ_3_aes_DISABLE 0 +#define GISB_ARBITER_BP_READ_3_aes_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_3 :: fve [03:03] */ +#define GISB_ARBITER_BP_READ_3_fve_MASK 0x00000008 +#define GISB_ARBITER_BP_READ_3_fve_ALIGN 0 +#define GISB_ARBITER_BP_READ_3_fve_BITS 1 +#define GISB_ARBITER_BP_READ_3_fve_SHIFT 3 +#define GISB_ARBITER_BP_READ_3_fve_DISABLE 0 +#define GISB_ARBITER_BP_READ_3_fve_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_3 :: tgt [02:02] */ +#define GISB_ARBITER_BP_READ_3_tgt_MASK 0x00000004 +#define GISB_ARBITER_BP_READ_3_tgt_ALIGN 0 +#define GISB_ARBITER_BP_READ_3_tgt_BITS 1 +#define GISB_ARBITER_BP_READ_3_tgt_SHIFT 2 +#define GISB_ARBITER_BP_READ_3_tgt_DISABLE 0 +#define GISB_ARBITER_BP_READ_3_tgt_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_3 :: dbu [01:01] */ +#define GISB_ARBITER_BP_READ_3_dbu_MASK 0x00000002 +#define GISB_ARBITER_BP_READ_3_dbu_ALIGN 0 +#define GISB_ARBITER_BP_READ_3_dbu_BITS 1 +#define GISB_ARBITER_BP_READ_3_dbu_SHIFT 1 +#define GISB_ARBITER_BP_READ_3_dbu_DISABLE 0 +#define GISB_ARBITER_BP_READ_3_dbu_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_3 :: cce [00:00] */ +#define GISB_ARBITER_BP_READ_3_cce_MASK 0x00000001 +#define GISB_ARBITER_BP_READ_3_cce_ALIGN 0 +#define GISB_ARBITER_BP_READ_3_cce_BITS 1 +#define GISB_ARBITER_BP_READ_3_cce_SHIFT 0 +#define GISB_ARBITER_BP_READ_3_cce_DISABLE 0 +#define GISB_ARBITER_BP_READ_3_cce_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_WRITE_3 + ***************************************************************************/ +/* GISB_ARBITER :: BP_WRITE_3 :: reserved0 [31:06] */ +#define GISB_ARBITER_BP_WRITE_3_reserved0_MASK 0xffffffc0 +#define GISB_ARBITER_BP_WRITE_3_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_3_reserved0_BITS 26 +#define GISB_ARBITER_BP_WRITE_3_reserved0_SHIFT 6 + +/* GISB_ARBITER :: BP_WRITE_3 :: bsp [05:05] */ +#define GISB_ARBITER_BP_WRITE_3_bsp_MASK 0x00000020 +#define GISB_ARBITER_BP_WRITE_3_bsp_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_3_bsp_BITS 1 +#define GISB_ARBITER_BP_WRITE_3_bsp_SHIFT 5 +#define GISB_ARBITER_BP_WRITE_3_bsp_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_3_bsp_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_3 :: aes [04:04] */ +#define GISB_ARBITER_BP_WRITE_3_aes_MASK 0x00000010 +#define GISB_ARBITER_BP_WRITE_3_aes_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_3_aes_BITS 1 +#define GISB_ARBITER_BP_WRITE_3_aes_SHIFT 4 +#define GISB_ARBITER_BP_WRITE_3_aes_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_3_aes_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_3 :: fve [03:03] */ +#define GISB_ARBITER_BP_WRITE_3_fve_MASK 0x00000008 +#define GISB_ARBITER_BP_WRITE_3_fve_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_3_fve_BITS 1 +#define GISB_ARBITER_BP_WRITE_3_fve_SHIFT 3 +#define GISB_ARBITER_BP_WRITE_3_fve_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_3_fve_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_3 :: tgt [02:02] */ +#define GISB_ARBITER_BP_WRITE_3_tgt_MASK 0x00000004 +#define GISB_ARBITER_BP_WRITE_3_tgt_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_3_tgt_BITS 1 +#define GISB_ARBITER_BP_WRITE_3_tgt_SHIFT 2 +#define GISB_ARBITER_BP_WRITE_3_tgt_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_3_tgt_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_3 :: dbu [01:01] */ +#define GISB_ARBITER_BP_WRITE_3_dbu_MASK 0x00000002 +#define GISB_ARBITER_BP_WRITE_3_dbu_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_3_dbu_BITS 1 +#define GISB_ARBITER_BP_WRITE_3_dbu_SHIFT 1 +#define GISB_ARBITER_BP_WRITE_3_dbu_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_3_dbu_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_3 :: cce [00:00] */ +#define GISB_ARBITER_BP_WRITE_3_cce_MASK 0x00000001 +#define GISB_ARBITER_BP_WRITE_3_cce_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_3_cce_BITS 1 +#define GISB_ARBITER_BP_WRITE_3_cce_SHIFT 0 +#define GISB_ARBITER_BP_WRITE_3_cce_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_3_cce_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_ENABLE_3 + ***************************************************************************/ +/* GISB_ARBITER :: BP_ENABLE_3 :: reserved0 [31:03] */ +#define GISB_ARBITER_BP_ENABLE_3_reserved0_MASK 0xfffffff8 +#define GISB_ARBITER_BP_ENABLE_3_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_3_reserved0_BITS 29 +#define GISB_ARBITER_BP_ENABLE_3_reserved0_SHIFT 3 + +/* GISB_ARBITER :: BP_ENABLE_3 :: block [02:02] */ +#define GISB_ARBITER_BP_ENABLE_3_block_MASK 0x00000004 +#define GISB_ARBITER_BP_ENABLE_3_block_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_3_block_BITS 1 +#define GISB_ARBITER_BP_ENABLE_3_block_SHIFT 2 +#define GISB_ARBITER_BP_ENABLE_3_block_DISABLE 0 +#define GISB_ARBITER_BP_ENABLE_3_block_ENABLE 1 + +/* GISB_ARBITER :: BP_ENABLE_3 :: address [01:01] */ +#define GISB_ARBITER_BP_ENABLE_3_address_MASK 0x00000002 +#define GISB_ARBITER_BP_ENABLE_3_address_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_3_address_BITS 1 +#define GISB_ARBITER_BP_ENABLE_3_address_SHIFT 1 +#define GISB_ARBITER_BP_ENABLE_3_address_DISABLE 0 +#define GISB_ARBITER_BP_ENABLE_3_address_ENABLE 1 + +/* GISB_ARBITER :: BP_ENABLE_3 :: access [00:00] */ +#define GISB_ARBITER_BP_ENABLE_3_access_MASK 0x00000001 +#define GISB_ARBITER_BP_ENABLE_3_access_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_3_access_BITS 1 +#define GISB_ARBITER_BP_ENABLE_3_access_SHIFT 0 +#define GISB_ARBITER_BP_ENABLE_3_access_DISABLE 0 +#define GISB_ARBITER_BP_ENABLE_3_access_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_START_ADDR_4 + ***************************************************************************/ +/* GISB_ARBITER :: BP_START_ADDR_4 :: start [31:00] */ +#define GISB_ARBITER_BP_START_ADDR_4_start_MASK 0xffffffff +#define GISB_ARBITER_BP_START_ADDR_4_start_ALIGN 0 +#define GISB_ARBITER_BP_START_ADDR_4_start_BITS 32 +#define GISB_ARBITER_BP_START_ADDR_4_start_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: BP_END_ADDR_4 + ***************************************************************************/ +/* GISB_ARBITER :: BP_END_ADDR_4 :: end [31:00] */ +#define GISB_ARBITER_BP_END_ADDR_4_end_MASK 0xffffffff +#define GISB_ARBITER_BP_END_ADDR_4_end_ALIGN 0 +#define GISB_ARBITER_BP_END_ADDR_4_end_BITS 32 +#define GISB_ARBITER_BP_END_ADDR_4_end_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: BP_READ_4 + ***************************************************************************/ +/* GISB_ARBITER :: BP_READ_4 :: reserved0 [31:06] */ +#define GISB_ARBITER_BP_READ_4_reserved0_MASK 0xffffffc0 +#define GISB_ARBITER_BP_READ_4_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_READ_4_reserved0_BITS 26 +#define GISB_ARBITER_BP_READ_4_reserved0_SHIFT 6 + +/* GISB_ARBITER :: BP_READ_4 :: bsp [05:05] */ +#define GISB_ARBITER_BP_READ_4_bsp_MASK 0x00000020 +#define GISB_ARBITER_BP_READ_4_bsp_ALIGN 0 +#define GISB_ARBITER_BP_READ_4_bsp_BITS 1 +#define GISB_ARBITER_BP_READ_4_bsp_SHIFT 5 +#define GISB_ARBITER_BP_READ_4_bsp_DISABLE 0 +#define GISB_ARBITER_BP_READ_4_bsp_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_4 :: aes [04:04] */ +#define GISB_ARBITER_BP_READ_4_aes_MASK 0x00000010 +#define GISB_ARBITER_BP_READ_4_aes_ALIGN 0 +#define GISB_ARBITER_BP_READ_4_aes_BITS 1 +#define GISB_ARBITER_BP_READ_4_aes_SHIFT 4 +#define GISB_ARBITER_BP_READ_4_aes_DISABLE 0 +#define GISB_ARBITER_BP_READ_4_aes_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_4 :: fve [03:03] */ +#define GISB_ARBITER_BP_READ_4_fve_MASK 0x00000008 +#define GISB_ARBITER_BP_READ_4_fve_ALIGN 0 +#define GISB_ARBITER_BP_READ_4_fve_BITS 1 +#define GISB_ARBITER_BP_READ_4_fve_SHIFT 3 +#define GISB_ARBITER_BP_READ_4_fve_DISABLE 0 +#define GISB_ARBITER_BP_READ_4_fve_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_4 :: tgt [02:02] */ +#define GISB_ARBITER_BP_READ_4_tgt_MASK 0x00000004 +#define GISB_ARBITER_BP_READ_4_tgt_ALIGN 0 +#define GISB_ARBITER_BP_READ_4_tgt_BITS 1 +#define GISB_ARBITER_BP_READ_4_tgt_SHIFT 2 +#define GISB_ARBITER_BP_READ_4_tgt_DISABLE 0 +#define GISB_ARBITER_BP_READ_4_tgt_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_4 :: dbu [01:01] */ +#define GISB_ARBITER_BP_READ_4_dbu_MASK 0x00000002 +#define GISB_ARBITER_BP_READ_4_dbu_ALIGN 0 +#define GISB_ARBITER_BP_READ_4_dbu_BITS 1 +#define GISB_ARBITER_BP_READ_4_dbu_SHIFT 1 +#define GISB_ARBITER_BP_READ_4_dbu_DISABLE 0 +#define GISB_ARBITER_BP_READ_4_dbu_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_4 :: cce [00:00] */ +#define GISB_ARBITER_BP_READ_4_cce_MASK 0x00000001 +#define GISB_ARBITER_BP_READ_4_cce_ALIGN 0 +#define GISB_ARBITER_BP_READ_4_cce_BITS 1 +#define GISB_ARBITER_BP_READ_4_cce_SHIFT 0 +#define GISB_ARBITER_BP_READ_4_cce_DISABLE 0 +#define GISB_ARBITER_BP_READ_4_cce_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_WRITE_4 + ***************************************************************************/ +/* GISB_ARBITER :: BP_WRITE_4 :: reserved0 [31:06] */ +#define GISB_ARBITER_BP_WRITE_4_reserved0_MASK 0xffffffc0 +#define GISB_ARBITER_BP_WRITE_4_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_4_reserved0_BITS 26 +#define GISB_ARBITER_BP_WRITE_4_reserved0_SHIFT 6 + +/* GISB_ARBITER :: BP_WRITE_4 :: bsp [05:05] */ +#define GISB_ARBITER_BP_WRITE_4_bsp_MASK 0x00000020 +#define GISB_ARBITER_BP_WRITE_4_bsp_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_4_bsp_BITS 1 +#define GISB_ARBITER_BP_WRITE_4_bsp_SHIFT 5 +#define GISB_ARBITER_BP_WRITE_4_bsp_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_4_bsp_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_4 :: aes [04:04] */ +#define GISB_ARBITER_BP_WRITE_4_aes_MASK 0x00000010 +#define GISB_ARBITER_BP_WRITE_4_aes_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_4_aes_BITS 1 +#define GISB_ARBITER_BP_WRITE_4_aes_SHIFT 4 +#define GISB_ARBITER_BP_WRITE_4_aes_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_4_aes_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_4 :: fve [03:03] */ +#define GISB_ARBITER_BP_WRITE_4_fve_MASK 0x00000008 +#define GISB_ARBITER_BP_WRITE_4_fve_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_4_fve_BITS 1 +#define GISB_ARBITER_BP_WRITE_4_fve_SHIFT 3 +#define GISB_ARBITER_BP_WRITE_4_fve_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_4_fve_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_4 :: tgt [02:02] */ +#define GISB_ARBITER_BP_WRITE_4_tgt_MASK 0x00000004 +#define GISB_ARBITER_BP_WRITE_4_tgt_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_4_tgt_BITS 1 +#define GISB_ARBITER_BP_WRITE_4_tgt_SHIFT 2 +#define GISB_ARBITER_BP_WRITE_4_tgt_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_4_tgt_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_4 :: dbu [01:01] */ +#define GISB_ARBITER_BP_WRITE_4_dbu_MASK 0x00000002 +#define GISB_ARBITER_BP_WRITE_4_dbu_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_4_dbu_BITS 1 +#define GISB_ARBITER_BP_WRITE_4_dbu_SHIFT 1 +#define GISB_ARBITER_BP_WRITE_4_dbu_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_4_dbu_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_4 :: cce [00:00] */ +#define GISB_ARBITER_BP_WRITE_4_cce_MASK 0x00000001 +#define GISB_ARBITER_BP_WRITE_4_cce_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_4_cce_BITS 1 +#define GISB_ARBITER_BP_WRITE_4_cce_SHIFT 0 +#define GISB_ARBITER_BP_WRITE_4_cce_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_4_cce_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_ENABLE_4 + ***************************************************************************/ +/* GISB_ARBITER :: BP_ENABLE_4 :: reserved0 [31:03] */ +#define GISB_ARBITER_BP_ENABLE_4_reserved0_MASK 0xfffffff8 +#define GISB_ARBITER_BP_ENABLE_4_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_4_reserved0_BITS 29 +#define GISB_ARBITER_BP_ENABLE_4_reserved0_SHIFT 3 + +/* GISB_ARBITER :: BP_ENABLE_4 :: block [02:02] */ +#define GISB_ARBITER_BP_ENABLE_4_block_MASK 0x00000004 +#define GISB_ARBITER_BP_ENABLE_4_block_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_4_block_BITS 1 +#define GISB_ARBITER_BP_ENABLE_4_block_SHIFT 2 +#define GISB_ARBITER_BP_ENABLE_4_block_DISABLE 0 +#define GISB_ARBITER_BP_ENABLE_4_block_ENABLE 1 + +/* GISB_ARBITER :: BP_ENABLE_4 :: address [01:01] */ +#define GISB_ARBITER_BP_ENABLE_4_address_MASK 0x00000002 +#define GISB_ARBITER_BP_ENABLE_4_address_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_4_address_BITS 1 +#define GISB_ARBITER_BP_ENABLE_4_address_SHIFT 1 +#define GISB_ARBITER_BP_ENABLE_4_address_DISABLE 0 +#define GISB_ARBITER_BP_ENABLE_4_address_ENABLE 1 + +/* GISB_ARBITER :: BP_ENABLE_4 :: access [00:00] */ +#define GISB_ARBITER_BP_ENABLE_4_access_MASK 0x00000001 +#define GISB_ARBITER_BP_ENABLE_4_access_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_4_access_BITS 1 +#define GISB_ARBITER_BP_ENABLE_4_access_SHIFT 0 +#define GISB_ARBITER_BP_ENABLE_4_access_DISABLE 0 +#define GISB_ARBITER_BP_ENABLE_4_access_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_START_ADDR_5 + ***************************************************************************/ +/* GISB_ARBITER :: BP_START_ADDR_5 :: start [31:00] */ +#define GISB_ARBITER_BP_START_ADDR_5_start_MASK 0xffffffff +#define GISB_ARBITER_BP_START_ADDR_5_start_ALIGN 0 +#define GISB_ARBITER_BP_START_ADDR_5_start_BITS 32 +#define GISB_ARBITER_BP_START_ADDR_5_start_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: BP_END_ADDR_5 + ***************************************************************************/ +/* GISB_ARBITER :: BP_END_ADDR_5 :: end [31:00] */ +#define GISB_ARBITER_BP_END_ADDR_5_end_MASK 0xffffffff +#define GISB_ARBITER_BP_END_ADDR_5_end_ALIGN 0 +#define GISB_ARBITER_BP_END_ADDR_5_end_BITS 32 +#define GISB_ARBITER_BP_END_ADDR_5_end_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: BP_READ_5 + ***************************************************************************/ +/* GISB_ARBITER :: BP_READ_5 :: reserved0 [31:06] */ +#define GISB_ARBITER_BP_READ_5_reserved0_MASK 0xffffffc0 +#define GISB_ARBITER_BP_READ_5_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_READ_5_reserved0_BITS 26 +#define GISB_ARBITER_BP_READ_5_reserved0_SHIFT 6 + +/* GISB_ARBITER :: BP_READ_5 :: bsp [05:05] */ +#define GISB_ARBITER_BP_READ_5_bsp_MASK 0x00000020 +#define GISB_ARBITER_BP_READ_5_bsp_ALIGN 0 +#define GISB_ARBITER_BP_READ_5_bsp_BITS 1 +#define GISB_ARBITER_BP_READ_5_bsp_SHIFT 5 +#define GISB_ARBITER_BP_READ_5_bsp_DISABLE 0 +#define GISB_ARBITER_BP_READ_5_bsp_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_5 :: aes [04:04] */ +#define GISB_ARBITER_BP_READ_5_aes_MASK 0x00000010 +#define GISB_ARBITER_BP_READ_5_aes_ALIGN 0 +#define GISB_ARBITER_BP_READ_5_aes_BITS 1 +#define GISB_ARBITER_BP_READ_5_aes_SHIFT 4 +#define GISB_ARBITER_BP_READ_5_aes_DISABLE 0 +#define GISB_ARBITER_BP_READ_5_aes_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_5 :: fve [03:03] */ +#define GISB_ARBITER_BP_READ_5_fve_MASK 0x00000008 +#define GISB_ARBITER_BP_READ_5_fve_ALIGN 0 +#define GISB_ARBITER_BP_READ_5_fve_BITS 1 +#define GISB_ARBITER_BP_READ_5_fve_SHIFT 3 +#define GISB_ARBITER_BP_READ_5_fve_DISABLE 0 +#define GISB_ARBITER_BP_READ_5_fve_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_5 :: tgt [02:02] */ +#define GISB_ARBITER_BP_READ_5_tgt_MASK 0x00000004 +#define GISB_ARBITER_BP_READ_5_tgt_ALIGN 0 +#define GISB_ARBITER_BP_READ_5_tgt_BITS 1 +#define GISB_ARBITER_BP_READ_5_tgt_SHIFT 2 +#define GISB_ARBITER_BP_READ_5_tgt_DISABLE 0 +#define GISB_ARBITER_BP_READ_5_tgt_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_5 :: dbu [01:01] */ +#define GISB_ARBITER_BP_READ_5_dbu_MASK 0x00000002 +#define GISB_ARBITER_BP_READ_5_dbu_ALIGN 0 +#define GISB_ARBITER_BP_READ_5_dbu_BITS 1 +#define GISB_ARBITER_BP_READ_5_dbu_SHIFT 1 +#define GISB_ARBITER_BP_READ_5_dbu_DISABLE 0 +#define GISB_ARBITER_BP_READ_5_dbu_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_5 :: cce [00:00] */ +#define GISB_ARBITER_BP_READ_5_cce_MASK 0x00000001 +#define GISB_ARBITER_BP_READ_5_cce_ALIGN 0 +#define GISB_ARBITER_BP_READ_5_cce_BITS 1 +#define GISB_ARBITER_BP_READ_5_cce_SHIFT 0 +#define GISB_ARBITER_BP_READ_5_cce_DISABLE 0 +#define GISB_ARBITER_BP_READ_5_cce_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_WRITE_5 + ***************************************************************************/ +/* GISB_ARBITER :: BP_WRITE_5 :: reserved0 [31:06] */ +#define GISB_ARBITER_BP_WRITE_5_reserved0_MASK 0xffffffc0 +#define GISB_ARBITER_BP_WRITE_5_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_5_reserved0_BITS 26 +#define GISB_ARBITER_BP_WRITE_5_reserved0_SHIFT 6 + +/* GISB_ARBITER :: BP_WRITE_5 :: bsp [05:05] */ +#define GISB_ARBITER_BP_WRITE_5_bsp_MASK 0x00000020 +#define GISB_ARBITER_BP_WRITE_5_bsp_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_5_bsp_BITS 1 +#define GISB_ARBITER_BP_WRITE_5_bsp_SHIFT 5 +#define GISB_ARBITER_BP_WRITE_5_bsp_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_5_bsp_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_5 :: aes [04:04] */ +#define GISB_ARBITER_BP_WRITE_5_aes_MASK 0x00000010 +#define GISB_ARBITER_BP_WRITE_5_aes_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_5_aes_BITS 1 +#define GISB_ARBITER_BP_WRITE_5_aes_SHIFT 4 +#define GISB_ARBITER_BP_WRITE_5_aes_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_5_aes_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_5 :: fve [03:03] */ +#define GISB_ARBITER_BP_WRITE_5_fve_MASK 0x00000008 +#define GISB_ARBITER_BP_WRITE_5_fve_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_5_fve_BITS 1 +#define GISB_ARBITER_BP_WRITE_5_fve_SHIFT 3 +#define GISB_ARBITER_BP_WRITE_5_fve_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_5_fve_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_5 :: tgt [02:02] */ +#define GISB_ARBITER_BP_WRITE_5_tgt_MASK 0x00000004 +#define GISB_ARBITER_BP_WRITE_5_tgt_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_5_tgt_BITS 1 +#define GISB_ARBITER_BP_WRITE_5_tgt_SHIFT 2 +#define GISB_ARBITER_BP_WRITE_5_tgt_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_5_tgt_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_5 :: dbu [01:01] */ +#define GISB_ARBITER_BP_WRITE_5_dbu_MASK 0x00000002 +#define GISB_ARBITER_BP_WRITE_5_dbu_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_5_dbu_BITS 1 +#define GISB_ARBITER_BP_WRITE_5_dbu_SHIFT 1 +#define GISB_ARBITER_BP_WRITE_5_dbu_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_5_dbu_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_5 :: cce [00:00] */ +#define GISB_ARBITER_BP_WRITE_5_cce_MASK 0x00000001 +#define GISB_ARBITER_BP_WRITE_5_cce_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_5_cce_BITS 1 +#define GISB_ARBITER_BP_WRITE_5_cce_SHIFT 0 +#define GISB_ARBITER_BP_WRITE_5_cce_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_5_cce_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_ENABLE_5 + ***************************************************************************/ +/* GISB_ARBITER :: BP_ENABLE_5 :: reserved0 [31:03] */ +#define GISB_ARBITER_BP_ENABLE_5_reserved0_MASK 0xfffffff8 +#define GISB_ARBITER_BP_ENABLE_5_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_5_reserved0_BITS 29 +#define GISB_ARBITER_BP_ENABLE_5_reserved0_SHIFT 3 + +/* GISB_ARBITER :: BP_ENABLE_5 :: block [02:02] */ +#define GISB_ARBITER_BP_ENABLE_5_block_MASK 0x00000004 +#define GISB_ARBITER_BP_ENABLE_5_block_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_5_block_BITS 1 +#define GISB_ARBITER_BP_ENABLE_5_block_SHIFT 2 +#define GISB_ARBITER_BP_ENABLE_5_block_DISABLE 0 +#define GISB_ARBITER_BP_ENABLE_5_block_ENABLE 1 + +/* GISB_ARBITER :: BP_ENABLE_5 :: address [01:01] */ +#define GISB_ARBITER_BP_ENABLE_5_address_MASK 0x00000002 +#define GISB_ARBITER_BP_ENABLE_5_address_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_5_address_BITS 1 +#define GISB_ARBITER_BP_ENABLE_5_address_SHIFT 1 +#define GISB_ARBITER_BP_ENABLE_5_address_DISABLE 0 +#define GISB_ARBITER_BP_ENABLE_5_address_ENABLE 1 + +/* GISB_ARBITER :: BP_ENABLE_5 :: access [00:00] */ +#define GISB_ARBITER_BP_ENABLE_5_access_MASK 0x00000001 +#define GISB_ARBITER_BP_ENABLE_5_access_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_5_access_BITS 1 +#define GISB_ARBITER_BP_ENABLE_5_access_SHIFT 0 +#define GISB_ARBITER_BP_ENABLE_5_access_DISABLE 0 +#define GISB_ARBITER_BP_ENABLE_5_access_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_START_ADDR_6 + ***************************************************************************/ +/* GISB_ARBITER :: BP_START_ADDR_6 :: start [31:00] */ +#define GISB_ARBITER_BP_START_ADDR_6_start_MASK 0xffffffff +#define GISB_ARBITER_BP_START_ADDR_6_start_ALIGN 0 +#define GISB_ARBITER_BP_START_ADDR_6_start_BITS 32 +#define GISB_ARBITER_BP_START_ADDR_6_start_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: BP_END_ADDR_6 + ***************************************************************************/ +/* GISB_ARBITER :: BP_END_ADDR_6 :: end [31:00] */ +#define GISB_ARBITER_BP_END_ADDR_6_end_MASK 0xffffffff +#define GISB_ARBITER_BP_END_ADDR_6_end_ALIGN 0 +#define GISB_ARBITER_BP_END_ADDR_6_end_BITS 32 +#define GISB_ARBITER_BP_END_ADDR_6_end_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: BP_READ_6 + ***************************************************************************/ +/* GISB_ARBITER :: BP_READ_6 :: reserved0 [31:06] */ +#define GISB_ARBITER_BP_READ_6_reserved0_MASK 0xffffffc0 +#define GISB_ARBITER_BP_READ_6_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_READ_6_reserved0_BITS 26 +#define GISB_ARBITER_BP_READ_6_reserved0_SHIFT 6 + +/* GISB_ARBITER :: BP_READ_6 :: bsp [05:05] */ +#define GISB_ARBITER_BP_READ_6_bsp_MASK 0x00000020 +#define GISB_ARBITER_BP_READ_6_bsp_ALIGN 0 +#define GISB_ARBITER_BP_READ_6_bsp_BITS 1 +#define GISB_ARBITER_BP_READ_6_bsp_SHIFT 5 +#define GISB_ARBITER_BP_READ_6_bsp_DISABLE 0 +#define GISB_ARBITER_BP_READ_6_bsp_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_6 :: aes [04:04] */ +#define GISB_ARBITER_BP_READ_6_aes_MASK 0x00000010 +#define GISB_ARBITER_BP_READ_6_aes_ALIGN 0 +#define GISB_ARBITER_BP_READ_6_aes_BITS 1 +#define GISB_ARBITER_BP_READ_6_aes_SHIFT 4 +#define GISB_ARBITER_BP_READ_6_aes_DISABLE 0 +#define GISB_ARBITER_BP_READ_6_aes_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_6 :: fve [03:03] */ +#define GISB_ARBITER_BP_READ_6_fve_MASK 0x00000008 +#define GISB_ARBITER_BP_READ_6_fve_ALIGN 0 +#define GISB_ARBITER_BP_READ_6_fve_BITS 1 +#define GISB_ARBITER_BP_READ_6_fve_SHIFT 3 +#define GISB_ARBITER_BP_READ_6_fve_DISABLE 0 +#define GISB_ARBITER_BP_READ_6_fve_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_6 :: tgt [02:02] */ +#define GISB_ARBITER_BP_READ_6_tgt_MASK 0x00000004 +#define GISB_ARBITER_BP_READ_6_tgt_ALIGN 0 +#define GISB_ARBITER_BP_READ_6_tgt_BITS 1 +#define GISB_ARBITER_BP_READ_6_tgt_SHIFT 2 +#define GISB_ARBITER_BP_READ_6_tgt_DISABLE 0 +#define GISB_ARBITER_BP_READ_6_tgt_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_6 :: dbu [01:01] */ +#define GISB_ARBITER_BP_READ_6_dbu_MASK 0x00000002 +#define GISB_ARBITER_BP_READ_6_dbu_ALIGN 0 +#define GISB_ARBITER_BP_READ_6_dbu_BITS 1 +#define GISB_ARBITER_BP_READ_6_dbu_SHIFT 1 +#define GISB_ARBITER_BP_READ_6_dbu_DISABLE 0 +#define GISB_ARBITER_BP_READ_6_dbu_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_6 :: cce [00:00] */ +#define GISB_ARBITER_BP_READ_6_cce_MASK 0x00000001 +#define GISB_ARBITER_BP_READ_6_cce_ALIGN 0 +#define GISB_ARBITER_BP_READ_6_cce_BITS 1 +#define GISB_ARBITER_BP_READ_6_cce_SHIFT 0 +#define GISB_ARBITER_BP_READ_6_cce_DISABLE 0 +#define GISB_ARBITER_BP_READ_6_cce_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_WRITE_6 + ***************************************************************************/ +/* GISB_ARBITER :: BP_WRITE_6 :: reserved0 [31:06] */ +#define GISB_ARBITER_BP_WRITE_6_reserved0_MASK 0xffffffc0 +#define GISB_ARBITER_BP_WRITE_6_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_6_reserved0_BITS 26 +#define GISB_ARBITER_BP_WRITE_6_reserved0_SHIFT 6 + +/* GISB_ARBITER :: BP_WRITE_6 :: bsp [05:05] */ +#define GISB_ARBITER_BP_WRITE_6_bsp_MASK 0x00000020 +#define GISB_ARBITER_BP_WRITE_6_bsp_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_6_bsp_BITS 1 +#define GISB_ARBITER_BP_WRITE_6_bsp_SHIFT 5 +#define GISB_ARBITER_BP_WRITE_6_bsp_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_6_bsp_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_6 :: aes [04:04] */ +#define GISB_ARBITER_BP_WRITE_6_aes_MASK 0x00000010 +#define GISB_ARBITER_BP_WRITE_6_aes_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_6_aes_BITS 1 +#define GISB_ARBITER_BP_WRITE_6_aes_SHIFT 4 +#define GISB_ARBITER_BP_WRITE_6_aes_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_6_aes_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_6 :: fve [03:03] */ +#define GISB_ARBITER_BP_WRITE_6_fve_MASK 0x00000008 +#define GISB_ARBITER_BP_WRITE_6_fve_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_6_fve_BITS 1 +#define GISB_ARBITER_BP_WRITE_6_fve_SHIFT 3 +#define GISB_ARBITER_BP_WRITE_6_fve_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_6_fve_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_6 :: tgt [02:02] */ +#define GISB_ARBITER_BP_WRITE_6_tgt_MASK 0x00000004 +#define GISB_ARBITER_BP_WRITE_6_tgt_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_6_tgt_BITS 1 +#define GISB_ARBITER_BP_WRITE_6_tgt_SHIFT 2 +#define GISB_ARBITER_BP_WRITE_6_tgt_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_6_tgt_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_6 :: dbu [01:01] */ +#define GISB_ARBITER_BP_WRITE_6_dbu_MASK 0x00000002 +#define GISB_ARBITER_BP_WRITE_6_dbu_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_6_dbu_BITS 1 +#define GISB_ARBITER_BP_WRITE_6_dbu_SHIFT 1 +#define GISB_ARBITER_BP_WRITE_6_dbu_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_6_dbu_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_6 :: cce [00:00] */ +#define GISB_ARBITER_BP_WRITE_6_cce_MASK 0x00000001 +#define GISB_ARBITER_BP_WRITE_6_cce_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_6_cce_BITS 1 +#define GISB_ARBITER_BP_WRITE_6_cce_SHIFT 0 +#define GISB_ARBITER_BP_WRITE_6_cce_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_6_cce_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_ENABLE_6 + ***************************************************************************/ +/* GISB_ARBITER :: BP_ENABLE_6 :: reserved0 [31:03] */ +#define GISB_ARBITER_BP_ENABLE_6_reserved0_MASK 0xfffffff8 +#define GISB_ARBITER_BP_ENABLE_6_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_6_reserved0_BITS 29 +#define GISB_ARBITER_BP_ENABLE_6_reserved0_SHIFT 3 + +/* GISB_ARBITER :: BP_ENABLE_6 :: block [02:02] */ +#define GISB_ARBITER_BP_ENABLE_6_block_MASK 0x00000004 +#define GISB_ARBITER_BP_ENABLE_6_block_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_6_block_BITS 1 +#define GISB_ARBITER_BP_ENABLE_6_block_SHIFT 2 +#define GISB_ARBITER_BP_ENABLE_6_block_DISABLE 0 +#define GISB_ARBITER_BP_ENABLE_6_block_ENABLE 1 + +/* GISB_ARBITER :: BP_ENABLE_6 :: address [01:01] */ +#define GISB_ARBITER_BP_ENABLE_6_address_MASK 0x00000002 +#define GISB_ARBITER_BP_ENABLE_6_address_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_6_address_BITS 1 +#define GISB_ARBITER_BP_ENABLE_6_address_SHIFT 1 +#define GISB_ARBITER_BP_ENABLE_6_address_DISABLE 0 +#define GISB_ARBITER_BP_ENABLE_6_address_ENABLE 1 + +/* GISB_ARBITER :: BP_ENABLE_6 :: access [00:00] */ +#define GISB_ARBITER_BP_ENABLE_6_access_MASK 0x00000001 +#define GISB_ARBITER_BP_ENABLE_6_access_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_6_access_BITS 1 +#define GISB_ARBITER_BP_ENABLE_6_access_SHIFT 0 +#define GISB_ARBITER_BP_ENABLE_6_access_DISABLE 0 +#define GISB_ARBITER_BP_ENABLE_6_access_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_START_ADDR_7 + ***************************************************************************/ +/* GISB_ARBITER :: BP_START_ADDR_7 :: start [31:00] */ +#define GISB_ARBITER_BP_START_ADDR_7_start_MASK 0xffffffff +#define GISB_ARBITER_BP_START_ADDR_7_start_ALIGN 0 +#define GISB_ARBITER_BP_START_ADDR_7_start_BITS 32 +#define GISB_ARBITER_BP_START_ADDR_7_start_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: BP_END_ADDR_7 + ***************************************************************************/ +/* GISB_ARBITER :: BP_END_ADDR_7 :: end [31:00] */ +#define GISB_ARBITER_BP_END_ADDR_7_end_MASK 0xffffffff +#define GISB_ARBITER_BP_END_ADDR_7_end_ALIGN 0 +#define GISB_ARBITER_BP_END_ADDR_7_end_BITS 32 +#define GISB_ARBITER_BP_END_ADDR_7_end_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: BP_READ_7 + ***************************************************************************/ +/* GISB_ARBITER :: BP_READ_7 :: reserved0 [31:06] */ +#define GISB_ARBITER_BP_READ_7_reserved0_MASK 0xffffffc0 +#define GISB_ARBITER_BP_READ_7_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_READ_7_reserved0_BITS 26 +#define GISB_ARBITER_BP_READ_7_reserved0_SHIFT 6 + +/* GISB_ARBITER :: BP_READ_7 :: bsp [05:05] */ +#define GISB_ARBITER_BP_READ_7_bsp_MASK 0x00000020 +#define GISB_ARBITER_BP_READ_7_bsp_ALIGN 0 +#define GISB_ARBITER_BP_READ_7_bsp_BITS 1 +#define GISB_ARBITER_BP_READ_7_bsp_SHIFT 5 +#define GISB_ARBITER_BP_READ_7_bsp_DISABLE 0 +#define GISB_ARBITER_BP_READ_7_bsp_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_7 :: aes [04:04] */ +#define GISB_ARBITER_BP_READ_7_aes_MASK 0x00000010 +#define GISB_ARBITER_BP_READ_7_aes_ALIGN 0 +#define GISB_ARBITER_BP_READ_7_aes_BITS 1 +#define GISB_ARBITER_BP_READ_7_aes_SHIFT 4 +#define GISB_ARBITER_BP_READ_7_aes_DISABLE 0 +#define GISB_ARBITER_BP_READ_7_aes_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_7 :: fve [03:03] */ +#define GISB_ARBITER_BP_READ_7_fve_MASK 0x00000008 +#define GISB_ARBITER_BP_READ_7_fve_ALIGN 0 +#define GISB_ARBITER_BP_READ_7_fve_BITS 1 +#define GISB_ARBITER_BP_READ_7_fve_SHIFT 3 +#define GISB_ARBITER_BP_READ_7_fve_DISABLE 0 +#define GISB_ARBITER_BP_READ_7_fve_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_7 :: tgt [02:02] */ +#define GISB_ARBITER_BP_READ_7_tgt_MASK 0x00000004 +#define GISB_ARBITER_BP_READ_7_tgt_ALIGN 0 +#define GISB_ARBITER_BP_READ_7_tgt_BITS 1 +#define GISB_ARBITER_BP_READ_7_tgt_SHIFT 2 +#define GISB_ARBITER_BP_READ_7_tgt_DISABLE 0 +#define GISB_ARBITER_BP_READ_7_tgt_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_7 :: dbu [01:01] */ +#define GISB_ARBITER_BP_READ_7_dbu_MASK 0x00000002 +#define GISB_ARBITER_BP_READ_7_dbu_ALIGN 0 +#define GISB_ARBITER_BP_READ_7_dbu_BITS 1 +#define GISB_ARBITER_BP_READ_7_dbu_SHIFT 1 +#define GISB_ARBITER_BP_READ_7_dbu_DISABLE 0 +#define GISB_ARBITER_BP_READ_7_dbu_ENABLE 1 + +/* GISB_ARBITER :: BP_READ_7 :: cce [00:00] */ +#define GISB_ARBITER_BP_READ_7_cce_MASK 0x00000001 +#define GISB_ARBITER_BP_READ_7_cce_ALIGN 0 +#define GISB_ARBITER_BP_READ_7_cce_BITS 1 +#define GISB_ARBITER_BP_READ_7_cce_SHIFT 0 +#define GISB_ARBITER_BP_READ_7_cce_DISABLE 0 +#define GISB_ARBITER_BP_READ_7_cce_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_WRITE_7 + ***************************************************************************/ +/* GISB_ARBITER :: BP_WRITE_7 :: reserved0 [31:06] */ +#define GISB_ARBITER_BP_WRITE_7_reserved0_MASK 0xffffffc0 +#define GISB_ARBITER_BP_WRITE_7_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_7_reserved0_BITS 26 +#define GISB_ARBITER_BP_WRITE_7_reserved0_SHIFT 6 + +/* GISB_ARBITER :: BP_WRITE_7 :: bsp [05:05] */ +#define GISB_ARBITER_BP_WRITE_7_bsp_MASK 0x00000020 +#define GISB_ARBITER_BP_WRITE_7_bsp_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_7_bsp_BITS 1 +#define GISB_ARBITER_BP_WRITE_7_bsp_SHIFT 5 +#define GISB_ARBITER_BP_WRITE_7_bsp_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_7_bsp_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_7 :: aes [04:04] */ +#define GISB_ARBITER_BP_WRITE_7_aes_MASK 0x00000010 +#define GISB_ARBITER_BP_WRITE_7_aes_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_7_aes_BITS 1 +#define GISB_ARBITER_BP_WRITE_7_aes_SHIFT 4 +#define GISB_ARBITER_BP_WRITE_7_aes_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_7_aes_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_7 :: fve [03:03] */ +#define GISB_ARBITER_BP_WRITE_7_fve_MASK 0x00000008 +#define GISB_ARBITER_BP_WRITE_7_fve_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_7_fve_BITS 1 +#define GISB_ARBITER_BP_WRITE_7_fve_SHIFT 3 +#define GISB_ARBITER_BP_WRITE_7_fve_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_7_fve_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_7 :: tgt [02:02] */ +#define GISB_ARBITER_BP_WRITE_7_tgt_MASK 0x00000004 +#define GISB_ARBITER_BP_WRITE_7_tgt_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_7_tgt_BITS 1 +#define GISB_ARBITER_BP_WRITE_7_tgt_SHIFT 2 +#define GISB_ARBITER_BP_WRITE_7_tgt_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_7_tgt_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_7 :: dbu [01:01] */ +#define GISB_ARBITER_BP_WRITE_7_dbu_MASK 0x00000002 +#define GISB_ARBITER_BP_WRITE_7_dbu_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_7_dbu_BITS 1 +#define GISB_ARBITER_BP_WRITE_7_dbu_SHIFT 1 +#define GISB_ARBITER_BP_WRITE_7_dbu_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_7_dbu_ENABLE 1 + +/* GISB_ARBITER :: BP_WRITE_7 :: cce [00:00] */ +#define GISB_ARBITER_BP_WRITE_7_cce_MASK 0x00000001 +#define GISB_ARBITER_BP_WRITE_7_cce_ALIGN 0 +#define GISB_ARBITER_BP_WRITE_7_cce_BITS 1 +#define GISB_ARBITER_BP_WRITE_7_cce_SHIFT 0 +#define GISB_ARBITER_BP_WRITE_7_cce_DISABLE 0 +#define GISB_ARBITER_BP_WRITE_7_cce_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_ENABLE_7 + ***************************************************************************/ +/* GISB_ARBITER :: BP_ENABLE_7 :: reserved0 [31:03] */ +#define GISB_ARBITER_BP_ENABLE_7_reserved0_MASK 0xfffffff8 +#define GISB_ARBITER_BP_ENABLE_7_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_7_reserved0_BITS 29 +#define GISB_ARBITER_BP_ENABLE_7_reserved0_SHIFT 3 + +/* GISB_ARBITER :: BP_ENABLE_7 :: block [02:02] */ +#define GISB_ARBITER_BP_ENABLE_7_block_MASK 0x00000004 +#define GISB_ARBITER_BP_ENABLE_7_block_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_7_block_BITS 1 +#define GISB_ARBITER_BP_ENABLE_7_block_SHIFT 2 +#define GISB_ARBITER_BP_ENABLE_7_block_DISABLE 0 +#define GISB_ARBITER_BP_ENABLE_7_block_ENABLE 1 + +/* GISB_ARBITER :: BP_ENABLE_7 :: address [01:01] */ +#define GISB_ARBITER_BP_ENABLE_7_address_MASK 0x00000002 +#define GISB_ARBITER_BP_ENABLE_7_address_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_7_address_BITS 1 +#define GISB_ARBITER_BP_ENABLE_7_address_SHIFT 1 +#define GISB_ARBITER_BP_ENABLE_7_address_DISABLE 0 +#define GISB_ARBITER_BP_ENABLE_7_address_ENABLE 1 + +/* GISB_ARBITER :: BP_ENABLE_7 :: access [00:00] */ +#define GISB_ARBITER_BP_ENABLE_7_access_MASK 0x00000001 +#define GISB_ARBITER_BP_ENABLE_7_access_ALIGN 0 +#define GISB_ARBITER_BP_ENABLE_7_access_BITS 1 +#define GISB_ARBITER_BP_ENABLE_7_access_SHIFT 0 +#define GISB_ARBITER_BP_ENABLE_7_access_DISABLE 0 +#define GISB_ARBITER_BP_ENABLE_7_access_ENABLE 1 + + +/**************************************************************************** + * GISB_ARBITER :: BP_CAP_ADDR + ***************************************************************************/ +/* GISB_ARBITER :: BP_CAP_ADDR :: address [31:00] */ +#define GISB_ARBITER_BP_CAP_ADDR_address_MASK 0xffffffff +#define GISB_ARBITER_BP_CAP_ADDR_address_ALIGN 0 +#define GISB_ARBITER_BP_CAP_ADDR_address_BITS 32 +#define GISB_ARBITER_BP_CAP_ADDR_address_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: BP_CAP_DATA + ***************************************************************************/ +/* GISB_ARBITER :: BP_CAP_DATA :: data [31:00] */ +#define GISB_ARBITER_BP_CAP_DATA_data_MASK 0xffffffff +#define GISB_ARBITER_BP_CAP_DATA_data_ALIGN 0 +#define GISB_ARBITER_BP_CAP_DATA_data_BITS 32 +#define GISB_ARBITER_BP_CAP_DATA_data_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: BP_CAP_STATUS + ***************************************************************************/ +/* GISB_ARBITER :: BP_CAP_STATUS :: reserved0 [31:06] */ +#define GISB_ARBITER_BP_CAP_STATUS_reserved0_MASK 0xffffffc0 +#define GISB_ARBITER_BP_CAP_STATUS_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_CAP_STATUS_reserved0_BITS 26 +#define GISB_ARBITER_BP_CAP_STATUS_reserved0_SHIFT 6 + +/* GISB_ARBITER :: BP_CAP_STATUS :: bs_b [05:02] */ +#define GISB_ARBITER_BP_CAP_STATUS_bs_b_MASK 0x0000003c +#define GISB_ARBITER_BP_CAP_STATUS_bs_b_ALIGN 0 +#define GISB_ARBITER_BP_CAP_STATUS_bs_b_BITS 4 +#define GISB_ARBITER_BP_CAP_STATUS_bs_b_SHIFT 2 + +/* GISB_ARBITER :: BP_CAP_STATUS :: write [01:01] */ +#define GISB_ARBITER_BP_CAP_STATUS_write_MASK 0x00000002 +#define GISB_ARBITER_BP_CAP_STATUS_write_ALIGN 0 +#define GISB_ARBITER_BP_CAP_STATUS_write_BITS 1 +#define GISB_ARBITER_BP_CAP_STATUS_write_SHIFT 1 + +/* GISB_ARBITER :: BP_CAP_STATUS :: valid [00:00] */ +#define GISB_ARBITER_BP_CAP_STATUS_valid_MASK 0x00000001 +#define GISB_ARBITER_BP_CAP_STATUS_valid_ALIGN 0 +#define GISB_ARBITER_BP_CAP_STATUS_valid_BITS 1 +#define GISB_ARBITER_BP_CAP_STATUS_valid_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: BP_CAP_MASTER + ***************************************************************************/ +/* GISB_ARBITER :: BP_CAP_MASTER :: reserved0 [31:06] */ +#define GISB_ARBITER_BP_CAP_MASTER_reserved0_MASK 0xffffffc0 +#define GISB_ARBITER_BP_CAP_MASTER_reserved0_ALIGN 0 +#define GISB_ARBITER_BP_CAP_MASTER_reserved0_BITS 26 +#define GISB_ARBITER_BP_CAP_MASTER_reserved0_SHIFT 6 + +/* GISB_ARBITER :: BP_CAP_MASTER :: bsp [05:05] */ +#define GISB_ARBITER_BP_CAP_MASTER_bsp_MASK 0x00000020 +#define GISB_ARBITER_BP_CAP_MASTER_bsp_ALIGN 0 +#define GISB_ARBITER_BP_CAP_MASTER_bsp_BITS 1 +#define GISB_ARBITER_BP_CAP_MASTER_bsp_SHIFT 5 + +/* GISB_ARBITER :: BP_CAP_MASTER :: aes [04:04] */ +#define GISB_ARBITER_BP_CAP_MASTER_aes_MASK 0x00000010 +#define GISB_ARBITER_BP_CAP_MASTER_aes_ALIGN 0 +#define GISB_ARBITER_BP_CAP_MASTER_aes_BITS 1 +#define GISB_ARBITER_BP_CAP_MASTER_aes_SHIFT 4 + +/* GISB_ARBITER :: BP_CAP_MASTER :: fve [03:03] */ +#define GISB_ARBITER_BP_CAP_MASTER_fve_MASK 0x00000008 +#define GISB_ARBITER_BP_CAP_MASTER_fve_ALIGN 0 +#define GISB_ARBITER_BP_CAP_MASTER_fve_BITS 1 +#define GISB_ARBITER_BP_CAP_MASTER_fve_SHIFT 3 + +/* GISB_ARBITER :: BP_CAP_MASTER :: tgt [02:02] */ +#define GISB_ARBITER_BP_CAP_MASTER_tgt_MASK 0x00000004 +#define GISB_ARBITER_BP_CAP_MASTER_tgt_ALIGN 0 +#define GISB_ARBITER_BP_CAP_MASTER_tgt_BITS 1 +#define GISB_ARBITER_BP_CAP_MASTER_tgt_SHIFT 2 + +/* GISB_ARBITER :: BP_CAP_MASTER :: dbu [01:01] */ +#define GISB_ARBITER_BP_CAP_MASTER_dbu_MASK 0x00000002 +#define GISB_ARBITER_BP_CAP_MASTER_dbu_ALIGN 0 +#define GISB_ARBITER_BP_CAP_MASTER_dbu_BITS 1 +#define GISB_ARBITER_BP_CAP_MASTER_dbu_SHIFT 1 + +/* GISB_ARBITER :: BP_CAP_MASTER :: cce [00:00] */ +#define GISB_ARBITER_BP_CAP_MASTER_cce_MASK 0x00000001 +#define GISB_ARBITER_BP_CAP_MASTER_cce_ALIGN 0 +#define GISB_ARBITER_BP_CAP_MASTER_cce_BITS 1 +#define GISB_ARBITER_BP_CAP_MASTER_cce_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: ERR_CAP_CLR + ***************************************************************************/ +/* GISB_ARBITER :: ERR_CAP_CLR :: reserved0 [31:01] */ +#define GISB_ARBITER_ERR_CAP_CLR_reserved0_MASK 0xfffffffe +#define GISB_ARBITER_ERR_CAP_CLR_reserved0_ALIGN 0 +#define GISB_ARBITER_ERR_CAP_CLR_reserved0_BITS 31 +#define GISB_ARBITER_ERR_CAP_CLR_reserved0_SHIFT 1 + +/* GISB_ARBITER :: ERR_CAP_CLR :: clear [00:00] */ +#define GISB_ARBITER_ERR_CAP_CLR_clear_MASK 0x00000001 +#define GISB_ARBITER_ERR_CAP_CLR_clear_ALIGN 0 +#define GISB_ARBITER_ERR_CAP_CLR_clear_BITS 1 +#define GISB_ARBITER_ERR_CAP_CLR_clear_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: ERR_CAP_ADDR + ***************************************************************************/ +/* GISB_ARBITER :: ERR_CAP_ADDR :: address [31:00] */ +#define GISB_ARBITER_ERR_CAP_ADDR_address_MASK 0xffffffff +#define GISB_ARBITER_ERR_CAP_ADDR_address_ALIGN 0 +#define GISB_ARBITER_ERR_CAP_ADDR_address_BITS 32 +#define GISB_ARBITER_ERR_CAP_ADDR_address_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: ERR_CAP_DATA + ***************************************************************************/ +/* GISB_ARBITER :: ERR_CAP_DATA :: data [31:00] */ +#define GISB_ARBITER_ERR_CAP_DATA_data_MASK 0xffffffff +#define GISB_ARBITER_ERR_CAP_DATA_data_ALIGN 0 +#define GISB_ARBITER_ERR_CAP_DATA_data_BITS 32 +#define GISB_ARBITER_ERR_CAP_DATA_data_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: ERR_CAP_STATUS + ***************************************************************************/ +/* GISB_ARBITER :: ERR_CAP_STATUS :: reserved0 [31:13] */ +#define GISB_ARBITER_ERR_CAP_STATUS_reserved0_MASK 0xffffe000 +#define GISB_ARBITER_ERR_CAP_STATUS_reserved0_ALIGN 0 +#define GISB_ARBITER_ERR_CAP_STATUS_reserved0_BITS 19 +#define GISB_ARBITER_ERR_CAP_STATUS_reserved0_SHIFT 13 + +/* GISB_ARBITER :: ERR_CAP_STATUS :: timeout [12:12] */ +#define GISB_ARBITER_ERR_CAP_STATUS_timeout_MASK 0x00001000 +#define GISB_ARBITER_ERR_CAP_STATUS_timeout_ALIGN 0 +#define GISB_ARBITER_ERR_CAP_STATUS_timeout_BITS 1 +#define GISB_ARBITER_ERR_CAP_STATUS_timeout_SHIFT 12 + +/* GISB_ARBITER :: ERR_CAP_STATUS :: tea [11:11] */ +#define GISB_ARBITER_ERR_CAP_STATUS_tea_MASK 0x00000800 +#define GISB_ARBITER_ERR_CAP_STATUS_tea_ALIGN 0 +#define GISB_ARBITER_ERR_CAP_STATUS_tea_BITS 1 +#define GISB_ARBITER_ERR_CAP_STATUS_tea_SHIFT 11 + +/* GISB_ARBITER :: ERR_CAP_STATUS :: reserved1 [10:06] */ +#define GISB_ARBITER_ERR_CAP_STATUS_reserved1_MASK 0x000007c0 +#define GISB_ARBITER_ERR_CAP_STATUS_reserved1_ALIGN 0 +#define GISB_ARBITER_ERR_CAP_STATUS_reserved1_BITS 5 +#define GISB_ARBITER_ERR_CAP_STATUS_reserved1_SHIFT 6 + +/* GISB_ARBITER :: ERR_CAP_STATUS :: bs_b [05:02] */ +#define GISB_ARBITER_ERR_CAP_STATUS_bs_b_MASK 0x0000003c +#define GISB_ARBITER_ERR_CAP_STATUS_bs_b_ALIGN 0 +#define GISB_ARBITER_ERR_CAP_STATUS_bs_b_BITS 4 +#define GISB_ARBITER_ERR_CAP_STATUS_bs_b_SHIFT 2 + +/* GISB_ARBITER :: ERR_CAP_STATUS :: write [01:01] */ +#define GISB_ARBITER_ERR_CAP_STATUS_write_MASK 0x00000002 +#define GISB_ARBITER_ERR_CAP_STATUS_write_ALIGN 0 +#define GISB_ARBITER_ERR_CAP_STATUS_write_BITS 1 +#define GISB_ARBITER_ERR_CAP_STATUS_write_SHIFT 1 + +/* GISB_ARBITER :: ERR_CAP_STATUS :: valid [00:00] */ +#define GISB_ARBITER_ERR_CAP_STATUS_valid_MASK 0x00000001 +#define GISB_ARBITER_ERR_CAP_STATUS_valid_ALIGN 0 +#define GISB_ARBITER_ERR_CAP_STATUS_valid_BITS 1 +#define GISB_ARBITER_ERR_CAP_STATUS_valid_SHIFT 0 + + +/**************************************************************************** + * GISB_ARBITER :: ERR_CAP_MASTER + ***************************************************************************/ +/* GISB_ARBITER :: ERR_CAP_MASTER :: reserved0 [31:06] */ +#define GISB_ARBITER_ERR_CAP_MASTER_reserved0_MASK 0xffffffc0 +#define GISB_ARBITER_ERR_CAP_MASTER_reserved0_ALIGN 0 +#define GISB_ARBITER_ERR_CAP_MASTER_reserved0_BITS 26 +#define GISB_ARBITER_ERR_CAP_MASTER_reserved0_SHIFT 6 + +/* GISB_ARBITER :: ERR_CAP_MASTER :: bsp [05:05] */ +#define GISB_ARBITER_ERR_CAP_MASTER_bsp_MASK 0x00000020 +#define GISB_ARBITER_ERR_CAP_MASTER_bsp_ALIGN 0 +#define GISB_ARBITER_ERR_CAP_MASTER_bsp_BITS 1 +#define GISB_ARBITER_ERR_CAP_MASTER_bsp_SHIFT 5 + +/* GISB_ARBITER :: ERR_CAP_MASTER :: aes [04:04] */ +#define GISB_ARBITER_ERR_CAP_MASTER_aes_MASK 0x00000010 +#define GISB_ARBITER_ERR_CAP_MASTER_aes_ALIGN 0 +#define GISB_ARBITER_ERR_CAP_MASTER_aes_BITS 1 +#define GISB_ARBITER_ERR_CAP_MASTER_aes_SHIFT 4 + +/* GISB_ARBITER :: ERR_CAP_MASTER :: fve [03:03] */ +#define GISB_ARBITER_ERR_CAP_MASTER_fve_MASK 0x00000008 +#define GISB_ARBITER_ERR_CAP_MASTER_fve_ALIGN 0 +#define GISB_ARBITER_ERR_CAP_MASTER_fve_BITS 1 +#define GISB_ARBITER_ERR_CAP_MASTER_fve_SHIFT 3 + +/* GISB_ARBITER :: ERR_CAP_MASTER :: tgt [02:02] */ +#define GISB_ARBITER_ERR_CAP_MASTER_tgt_MASK 0x00000004 +#define GISB_ARBITER_ERR_CAP_MASTER_tgt_ALIGN 0 +#define GISB_ARBITER_ERR_CAP_MASTER_tgt_BITS 1 +#define GISB_ARBITER_ERR_CAP_MASTER_tgt_SHIFT 2 + +/* GISB_ARBITER :: ERR_CAP_MASTER :: dbu [01:01] */ +#define GISB_ARBITER_ERR_CAP_MASTER_dbu_MASK 0x00000002 +#define GISB_ARBITER_ERR_CAP_MASTER_dbu_ALIGN 0 +#define GISB_ARBITER_ERR_CAP_MASTER_dbu_BITS 1 +#define GISB_ARBITER_ERR_CAP_MASTER_dbu_SHIFT 1 + +/* GISB_ARBITER :: ERR_CAP_MASTER :: cce [00:00] */ +#define GISB_ARBITER_ERR_CAP_MASTER_cce_MASK 0x00000001 +#define GISB_ARBITER_ERR_CAP_MASTER_cce_ALIGN 0 +#define GISB_ARBITER_ERR_CAP_MASTER_cce_BITS 1 +#define GISB_ARBITER_ERR_CAP_MASTER_cce_SHIFT 0 + + +/**************************************************************************** + * BCM70012_MISC_TOP_MISC_GR_BRIDGE + ***************************************************************************/ +/**************************************************************************** + * MISC_GR_BRIDGE :: REVISION + ***************************************************************************/ +/* MISC_GR_BRIDGE :: REVISION :: reserved0 [31:16] */ +#define MISC_GR_BRIDGE_REVISION_reserved0_MASK 0xffff0000 +#define MISC_GR_BRIDGE_REVISION_reserved0_ALIGN 0 +#define MISC_GR_BRIDGE_REVISION_reserved0_BITS 16 +#define MISC_GR_BRIDGE_REVISION_reserved0_SHIFT 16 + +/* MISC_GR_BRIDGE :: REVISION :: MAJOR [15:08] */ +#define MISC_GR_BRIDGE_REVISION_MAJOR_MASK 0x0000ff00 +#define MISC_GR_BRIDGE_REVISION_MAJOR_ALIGN 0 +#define MISC_GR_BRIDGE_REVISION_MAJOR_BITS 8 +#define MISC_GR_BRIDGE_REVISION_MAJOR_SHIFT 8 + +/* MISC_GR_BRIDGE :: REVISION :: MINOR [07:00] */ +#define MISC_GR_BRIDGE_REVISION_MINOR_MASK 0x000000ff +#define MISC_GR_BRIDGE_REVISION_MINOR_ALIGN 0 +#define MISC_GR_BRIDGE_REVISION_MINOR_BITS 8 +#define MISC_GR_BRIDGE_REVISION_MINOR_SHIFT 0 + + +/**************************************************************************** + * MISC_GR_BRIDGE :: CTRL + ***************************************************************************/ +/* MISC_GR_BRIDGE :: CTRL :: reserved0 [31:01] */ +#define MISC_GR_BRIDGE_CTRL_reserved0_MASK 0xfffffffe +#define MISC_GR_BRIDGE_CTRL_reserved0_ALIGN 0 +#define MISC_GR_BRIDGE_CTRL_reserved0_BITS 31 +#define MISC_GR_BRIDGE_CTRL_reserved0_SHIFT 1 + +/* MISC_GR_BRIDGE :: CTRL :: gisb_error_intr [00:00] */ +#define MISC_GR_BRIDGE_CTRL_gisb_error_intr_MASK 0x00000001 +#define MISC_GR_BRIDGE_CTRL_gisb_error_intr_ALIGN 0 +#define MISC_GR_BRIDGE_CTRL_gisb_error_intr_BITS 1 +#define MISC_GR_BRIDGE_CTRL_gisb_error_intr_SHIFT 0 +#define MISC_GR_BRIDGE_CTRL_gisb_error_intr_INTR_DISABLE 0 +#define MISC_GR_BRIDGE_CTRL_gisb_error_intr_INTR_ENABLE 1 + + +/**************************************************************************** + * MISC_GR_BRIDGE :: SPARE_SW_RESET_0 + ***************************************************************************/ +/* MISC_GR_BRIDGE :: SPARE_SW_RESET_0 :: reserved0 [31:01] */ +#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_MASK 0xfffffffe +#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_ALIGN 0 +#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_BITS 31 +#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_SHIFT 1 + +/* MISC_GR_BRIDGE :: SPARE_SW_RESET_0 :: SPARE_SW_RESET [00:00] */ +#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_MASK 0x00000001 +#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ALIGN 0 +#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_BITS 1 +#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_SHIFT 0 +#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_DEASSERT 0 +#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ASSERT 1 + + +/**************************************************************************** + * MISC_GR_BRIDGE :: SPARE_SW_RESET_1 + ***************************************************************************/ +/* MISC_GR_BRIDGE :: SPARE_SW_RESET_1 :: reserved0 [31:01] */ +#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_MASK 0xfffffffe +#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_ALIGN 0 +#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_BITS 31 +#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_SHIFT 1 + +/* MISC_GR_BRIDGE :: SPARE_SW_RESET_1 :: SPARE_SW_RESET [00:00] */ +#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_MASK 0x00000001 +#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ALIGN 0 +#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_BITS 1 +#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_SHIFT 0 +#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_DEASSERT 0 +#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ASSERT 1 + + +/**************************************************************************** + * BCM70012_DBU_TOP_DBU + ***************************************************************************/ +/**************************************************************************** + * DBU :: DBU_CMD + ***************************************************************************/ +/* DBU :: DBU_CMD :: reserved0 [31:03] */ +#define DBU_DBU_CMD_reserved0_MASK 0xfffffff8 +#define DBU_DBU_CMD_reserved0_ALIGN 0 +#define DBU_DBU_CMD_reserved0_BITS 29 +#define DBU_DBU_CMD_reserved0_SHIFT 3 + +/* DBU :: DBU_CMD :: RX_OVERFLOW [02:02] */ +#define DBU_DBU_CMD_RX_OVERFLOW_MASK 0x00000004 +#define DBU_DBU_CMD_RX_OVERFLOW_ALIGN 0 +#define DBU_DBU_CMD_RX_OVERFLOW_BITS 1 +#define DBU_DBU_CMD_RX_OVERFLOW_SHIFT 2 + +/* DBU :: DBU_CMD :: RX_ERROR [01:01] */ +#define DBU_DBU_CMD_RX_ERROR_MASK 0x00000002 +#define DBU_DBU_CMD_RX_ERROR_ALIGN 0 +#define DBU_DBU_CMD_RX_ERROR_BITS 1 +#define DBU_DBU_CMD_RX_ERROR_SHIFT 1 + +/* DBU :: DBU_CMD :: ENABLE [00:00] */ +#define DBU_DBU_CMD_ENABLE_MASK 0x00000001 +#define DBU_DBU_CMD_ENABLE_ALIGN 0 +#define DBU_DBU_CMD_ENABLE_BITS 1 +#define DBU_DBU_CMD_ENABLE_SHIFT 0 + + +/**************************************************************************** + * DBU :: DBU_STATUS + ***************************************************************************/ +/* DBU :: DBU_STATUS :: reserved0 [31:02] */ +#define DBU_DBU_STATUS_reserved0_MASK 0xfffffffc +#define DBU_DBU_STATUS_reserved0_ALIGN 0 +#define DBU_DBU_STATUS_reserved0_BITS 30 +#define DBU_DBU_STATUS_reserved0_SHIFT 2 + +/* DBU :: DBU_STATUS :: TXDATA_OCCUPIED [01:01] */ +#define DBU_DBU_STATUS_TXDATA_OCCUPIED_MASK 0x00000002 +#define DBU_DBU_STATUS_TXDATA_OCCUPIED_ALIGN 0 +#define DBU_DBU_STATUS_TXDATA_OCCUPIED_BITS 1 +#define DBU_DBU_STATUS_TXDATA_OCCUPIED_SHIFT 1 + +/* DBU :: DBU_STATUS :: RXDATA_VALID [00:00] */ +#define DBU_DBU_STATUS_RXDATA_VALID_MASK 0x00000001 +#define DBU_DBU_STATUS_RXDATA_VALID_ALIGN 0 +#define DBU_DBU_STATUS_RXDATA_VALID_BITS 1 +#define DBU_DBU_STATUS_RXDATA_VALID_SHIFT 0 + + +/**************************************************************************** + * DBU :: DBU_CONFIG + ***************************************************************************/ +/* DBU :: DBU_CONFIG :: reserved0 [31:03] */ +#define DBU_DBU_CONFIG_reserved0_MASK 0xfffffff8 +#define DBU_DBU_CONFIG_reserved0_ALIGN 0 +#define DBU_DBU_CONFIG_reserved0_BITS 29 +#define DBU_DBU_CONFIG_reserved0_SHIFT 3 + +/* DBU :: DBU_CONFIG :: CRLF_ENABLE [02:02] */ +#define DBU_DBU_CONFIG_CRLF_ENABLE_MASK 0x00000004 +#define DBU_DBU_CONFIG_CRLF_ENABLE_ALIGN 0 +#define DBU_DBU_CONFIG_CRLF_ENABLE_BITS 1 +#define DBU_DBU_CONFIG_CRLF_ENABLE_SHIFT 2 + +/* DBU :: DBU_CONFIG :: DEBUGSM_ENABLE [01:01] */ +#define DBU_DBU_CONFIG_DEBUGSM_ENABLE_MASK 0x00000002 +#define DBU_DBU_CONFIG_DEBUGSM_ENABLE_ALIGN 0 +#define DBU_DBU_CONFIG_DEBUGSM_ENABLE_BITS 1 +#define DBU_DBU_CONFIG_DEBUGSM_ENABLE_SHIFT 1 + +/* DBU :: DBU_CONFIG :: TIMING_OVERRIDE [00:00] */ +#define DBU_DBU_CONFIG_TIMING_OVERRIDE_MASK 0x00000001 +#define DBU_DBU_CONFIG_TIMING_OVERRIDE_ALIGN 0 +#define DBU_DBU_CONFIG_TIMING_OVERRIDE_BITS 1 +#define DBU_DBU_CONFIG_TIMING_OVERRIDE_SHIFT 0 + + +/**************************************************************************** + * DBU :: DBU_TIMING + ***************************************************************************/ +/* DBU :: DBU_TIMING :: BIT_INTERVAL [31:16] */ +#define DBU_DBU_TIMING_BIT_INTERVAL_MASK 0xffff0000 +#define DBU_DBU_TIMING_BIT_INTERVAL_ALIGN 0 +#define DBU_DBU_TIMING_BIT_INTERVAL_BITS 16 +#define DBU_DBU_TIMING_BIT_INTERVAL_SHIFT 16 + +/* DBU :: DBU_TIMING :: FB_SMPL_OFFSET [15:00] */ +#define DBU_DBU_TIMING_FB_SMPL_OFFSET_MASK 0x0000ffff +#define DBU_DBU_TIMING_FB_SMPL_OFFSET_ALIGN 0 +#define DBU_DBU_TIMING_FB_SMPL_OFFSET_BITS 16 +#define DBU_DBU_TIMING_FB_SMPL_OFFSET_SHIFT 0 + + +/**************************************************************************** + * DBU :: DBU_RXDATA + ***************************************************************************/ +/* DBU :: DBU_RXDATA :: reserved0 [31:09] */ +#define DBU_DBU_RXDATA_reserved0_MASK 0xfffffe00 +#define DBU_DBU_RXDATA_reserved0_ALIGN 0 +#define DBU_DBU_RXDATA_reserved0_BITS 23 +#define DBU_DBU_RXDATA_reserved0_SHIFT 9 + +/* DBU :: DBU_RXDATA :: ERROR [08:08] */ +#define DBU_DBU_RXDATA_ERROR_MASK 0x00000100 +#define DBU_DBU_RXDATA_ERROR_ALIGN 0 +#define DBU_DBU_RXDATA_ERROR_BITS 1 +#define DBU_DBU_RXDATA_ERROR_SHIFT 8 + +/* DBU :: DBU_RXDATA :: VALUE [07:00] */ +#define DBU_DBU_RXDATA_VALUE_MASK 0x000000ff +#define DBU_DBU_RXDATA_VALUE_ALIGN 0 +#define DBU_DBU_RXDATA_VALUE_BITS 8 +#define DBU_DBU_RXDATA_VALUE_SHIFT 0 + + +/**************************************************************************** + * DBU :: DBU_TXDATA + ***************************************************************************/ +/* DBU :: DBU_TXDATA :: reserved0 [31:08] */ +#define DBU_DBU_TXDATA_reserved0_MASK 0xffffff00 +#define DBU_DBU_TXDATA_reserved0_ALIGN 0 +#define DBU_DBU_TXDATA_reserved0_BITS 24 +#define DBU_DBU_TXDATA_reserved0_SHIFT 8 + +/* DBU :: DBU_TXDATA :: VALUE [07:00] */ +#define DBU_DBU_TXDATA_VALUE_MASK 0x000000ff +#define DBU_DBU_TXDATA_VALUE_ALIGN 0 +#define DBU_DBU_TXDATA_VALUE_BITS 8 +#define DBU_DBU_TXDATA_VALUE_SHIFT 0 + + +/**************************************************************************** + * BCM70012_DBU_TOP_DBU_RGR_BRIDGE + ***************************************************************************/ +/**************************************************************************** + * DBU_RGR_BRIDGE :: REVISION + ***************************************************************************/ +/* DBU_RGR_BRIDGE :: REVISION :: reserved0 [31:16] */ +#define DBU_RGR_BRIDGE_REVISION_reserved0_MASK 0xffff0000 +#define DBU_RGR_BRIDGE_REVISION_reserved0_ALIGN 0 +#define DBU_RGR_BRIDGE_REVISION_reserved0_BITS 16 +#define DBU_RGR_BRIDGE_REVISION_reserved0_SHIFT 16 + +/* DBU_RGR_BRIDGE :: REVISION :: MAJOR [15:08] */ +#define DBU_RGR_BRIDGE_REVISION_MAJOR_MASK 0x0000ff00 +#define DBU_RGR_BRIDGE_REVISION_MAJOR_ALIGN 0 +#define DBU_RGR_BRIDGE_REVISION_MAJOR_BITS 8 +#define DBU_RGR_BRIDGE_REVISION_MAJOR_SHIFT 8 + +/* DBU_RGR_BRIDGE :: REVISION :: MINOR [07:00] */ +#define DBU_RGR_BRIDGE_REVISION_MINOR_MASK 0x000000ff +#define DBU_RGR_BRIDGE_REVISION_MINOR_ALIGN 0 +#define DBU_RGR_BRIDGE_REVISION_MINOR_BITS 8 +#define DBU_RGR_BRIDGE_REVISION_MINOR_SHIFT 0 + + +/**************************************************************************** + * DBU_RGR_BRIDGE :: CTRL + ***************************************************************************/ +/* DBU_RGR_BRIDGE :: CTRL :: reserved0 [31:02] */ +#define DBU_RGR_BRIDGE_CTRL_reserved0_MASK 0xfffffffc +#define DBU_RGR_BRIDGE_CTRL_reserved0_ALIGN 0 +#define DBU_RGR_BRIDGE_CTRL_reserved0_BITS 30 +#define DBU_RGR_BRIDGE_CTRL_reserved0_SHIFT 2 + +/* DBU_RGR_BRIDGE :: CTRL :: rbus_error_intr [01:01] */ +#define DBU_RGR_BRIDGE_CTRL_rbus_error_intr_MASK 0x00000002 +#define DBU_RGR_BRIDGE_CTRL_rbus_error_intr_ALIGN 0 +#define DBU_RGR_BRIDGE_CTRL_rbus_error_intr_BITS 1 +#define DBU_RGR_BRIDGE_CTRL_rbus_error_intr_SHIFT 1 +#define DBU_RGR_BRIDGE_CTRL_rbus_error_intr_INTR_DISABLE 0 +#define DBU_RGR_BRIDGE_CTRL_rbus_error_intr_INTR_ENABLE 1 + +/* DBU_RGR_BRIDGE :: CTRL :: gisb_error_intr [00:00] */ +#define DBU_RGR_BRIDGE_CTRL_gisb_error_intr_MASK 0x00000001 +#define DBU_RGR_BRIDGE_CTRL_gisb_error_intr_ALIGN 0 +#define DBU_RGR_BRIDGE_CTRL_gisb_error_intr_BITS 1 +#define DBU_RGR_BRIDGE_CTRL_gisb_error_intr_SHIFT 0 +#define DBU_RGR_BRIDGE_CTRL_gisb_error_intr_INTR_DISABLE 0 +#define DBU_RGR_BRIDGE_CTRL_gisb_error_intr_INTR_ENABLE 1 + + +/**************************************************************************** + * DBU_RGR_BRIDGE :: RBUS_TIMER + ***************************************************************************/ +/* DBU_RGR_BRIDGE :: RBUS_TIMER :: reserved0 [31:16] */ +#define DBU_RGR_BRIDGE_RBUS_TIMER_reserved0_MASK 0xffff0000 +#define DBU_RGR_BRIDGE_RBUS_TIMER_reserved0_ALIGN 0 +#define DBU_RGR_BRIDGE_RBUS_TIMER_reserved0_BITS 16 +#define DBU_RGR_BRIDGE_RBUS_TIMER_reserved0_SHIFT 16 + +/* DBU_RGR_BRIDGE :: RBUS_TIMER :: timer_value [15:00] */ +#define DBU_RGR_BRIDGE_RBUS_TIMER_timer_value_MASK 0x0000ffff +#define DBU_RGR_BRIDGE_RBUS_TIMER_timer_value_ALIGN 0 +#define DBU_RGR_BRIDGE_RBUS_TIMER_timer_value_BITS 16 +#define DBU_RGR_BRIDGE_RBUS_TIMER_timer_value_SHIFT 0 + + +/**************************************************************************** + * DBU_RGR_BRIDGE :: SPARE_SW_RESET_0 + ***************************************************************************/ +/* DBU_RGR_BRIDGE :: SPARE_SW_RESET_0 :: reserved0 [31:01] */ +#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_MASK 0xfffffffe +#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_ALIGN 0 +#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_BITS 31 +#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_SHIFT 1 + +/* DBU_RGR_BRIDGE :: SPARE_SW_RESET_0 :: SPARE_SW_RESET [00:00] */ +#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_MASK 0x00000001 +#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ALIGN 0 +#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_BITS 1 +#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_SHIFT 0 +#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_DEASSERT 0 +#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ASSERT 1 + + +/**************************************************************************** + * DBU_RGR_BRIDGE :: SPARE_SW_RESET_1 + ***************************************************************************/ +/* DBU_RGR_BRIDGE :: SPARE_SW_RESET_1 :: reserved0 [31:01] */ +#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_MASK 0xfffffffe +#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_ALIGN 0 +#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_BITS 31 +#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_SHIFT 1 + +/* DBU_RGR_BRIDGE :: SPARE_SW_RESET_1 :: SPARE_SW_RESET [00:00] */ +#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_MASK 0x00000001 +#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ALIGN 0 +#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_BITS 1 +#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_SHIFT 0 +#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_DEASSERT 0 +#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ASSERT 1 + + +/**************************************************************************** + * BCM70012_OTP_TOP_OTP + ***************************************************************************/ +/**************************************************************************** + * OTP :: CONFIG_INFO + ***************************************************************************/ +/* OTP :: CONFIG_INFO :: reserved0 [31:22] */ +#define OTP_CONFIG_INFO_reserved0_MASK 0xffc00000 +#define OTP_CONFIG_INFO_reserved0_ALIGN 0 +#define OTP_CONFIG_INFO_reserved0_BITS 10 +#define OTP_CONFIG_INFO_reserved0_SHIFT 22 + +/* OTP :: CONFIG_INFO :: SELVL [21:20] */ +#define OTP_CONFIG_INFO_SELVL_MASK 0x00300000 +#define OTP_CONFIG_INFO_SELVL_ALIGN 0 +#define OTP_CONFIG_INFO_SELVL_BITS 2 +#define OTP_CONFIG_INFO_SELVL_SHIFT 20 + +/* OTP :: CONFIG_INFO :: reserved1 [19:17] */ +#define OTP_CONFIG_INFO_reserved1_MASK 0x000e0000 +#define OTP_CONFIG_INFO_reserved1_ALIGN 0 +#define OTP_CONFIG_INFO_reserved1_BITS 3 +#define OTP_CONFIG_INFO_reserved1_SHIFT 17 + +/* OTP :: CONFIG_INFO :: PTEST [16:16] */ +#define OTP_CONFIG_INFO_PTEST_MASK 0x00010000 +#define OTP_CONFIG_INFO_PTEST_ALIGN 0 +#define OTP_CONFIG_INFO_PTEST_BITS 1 +#define OTP_CONFIG_INFO_PTEST_SHIFT 16 + +/* OTP :: CONFIG_INFO :: reserved2 [15:13] */ +#define OTP_CONFIG_INFO_reserved2_MASK 0x0000e000 +#define OTP_CONFIG_INFO_reserved2_ALIGN 0 +#define OTP_CONFIG_INFO_reserved2_BITS 3 +#define OTP_CONFIG_INFO_reserved2_SHIFT 13 + +/* OTP :: CONFIG_INFO :: MAX_REDUNDANT_ROWS [12:08] */ +#define OTP_CONFIG_INFO_MAX_REDUNDANT_ROWS_MASK 0x00001f00 +#define OTP_CONFIG_INFO_MAX_REDUNDANT_ROWS_ALIGN 0 +#define OTP_CONFIG_INFO_MAX_REDUNDANT_ROWS_BITS 5 +#define OTP_CONFIG_INFO_MAX_REDUNDANT_ROWS_SHIFT 8 + +/* OTP :: CONFIG_INFO :: MAX_RETRY [07:04] */ +#define OTP_CONFIG_INFO_MAX_RETRY_MASK 0x000000f0 +#define OTP_CONFIG_INFO_MAX_RETRY_ALIGN 0 +#define OTP_CONFIG_INFO_MAX_RETRY_BITS 4 +#define OTP_CONFIG_INFO_MAX_RETRY_SHIFT 4 + +/* OTP :: CONFIG_INFO :: reserved3 [03:01] */ +#define OTP_CONFIG_INFO_reserved3_MASK 0x0000000e +#define OTP_CONFIG_INFO_reserved3_ALIGN 0 +#define OTP_CONFIG_INFO_reserved3_BITS 3 +#define OTP_CONFIG_INFO_reserved3_SHIFT 1 + +/* OTP :: CONFIG_INFO :: PROG_MODE [00:00] */ +#define OTP_CONFIG_INFO_PROG_MODE_MASK 0x00000001 +#define OTP_CONFIG_INFO_PROG_MODE_ALIGN 0 +#define OTP_CONFIG_INFO_PROG_MODE_BITS 1 +#define OTP_CONFIG_INFO_PROG_MODE_SHIFT 0 + + +/**************************************************************************** + * OTP :: CMD + ***************************************************************************/ +/* OTP :: CMD :: reserved0 [31:02] */ +#define OTP_CMD_reserved0_MASK 0xfffffffc +#define OTP_CMD_reserved0_ALIGN 0 +#define OTP_CMD_reserved0_BITS 30 +#define OTP_CMD_reserved0_SHIFT 2 + +/* OTP :: CMD :: KEYS_AVAIL [01:01] */ +#define OTP_CMD_KEYS_AVAIL_MASK 0x00000002 +#define OTP_CMD_KEYS_AVAIL_ALIGN 0 +#define OTP_CMD_KEYS_AVAIL_BITS 1 +#define OTP_CMD_KEYS_AVAIL_SHIFT 1 + +/* OTP :: CMD :: PROGRAM_OTP [00:00] */ +#define OTP_CMD_PROGRAM_OTP_MASK 0x00000001 +#define OTP_CMD_PROGRAM_OTP_ALIGN 0 +#define OTP_CMD_PROGRAM_OTP_BITS 1 +#define OTP_CMD_PROGRAM_OTP_SHIFT 0 + + +/**************************************************************************** + * OTP :: STATUS + ***************************************************************************/ +/* OTP :: STATUS :: reserved0 [31:30] */ +#define OTP_STATUS_reserved0_MASK 0xc0000000 +#define OTP_STATUS_reserved0_ALIGN 0 +#define OTP_STATUS_reserved0_BITS 2 +#define OTP_STATUS_reserved0_SHIFT 30 + +/* OTP :: STATUS :: TOTAL_RETRIES [29:17] */ +#define OTP_STATUS_TOTAL_RETRIES_MASK 0x3ffe0000 +#define OTP_STATUS_TOTAL_RETRIES_ALIGN 0 +#define OTP_STATUS_TOTAL_RETRIES_BITS 13 +#define OTP_STATUS_TOTAL_RETRIES_SHIFT 17 + +/* OTP :: STATUS :: ROWS_USED [16:12] */ +#define OTP_STATUS_ROWS_USED_MASK 0x0001f000 +#define OTP_STATUS_ROWS_USED_ALIGN 0 +#define OTP_STATUS_ROWS_USED_BITS 5 +#define OTP_STATUS_ROWS_USED_SHIFT 12 + +/* OTP :: STATUS :: MAX_RETRIES [11:08] */ +#define OTP_STATUS_MAX_RETRIES_MASK 0x00000f00 +#define OTP_STATUS_MAX_RETRIES_ALIGN 0 +#define OTP_STATUS_MAX_RETRIES_BITS 4 +#define OTP_STATUS_MAX_RETRIES_SHIFT 8 + +/* OTP :: STATUS :: PROG_STATUS [07:04] */ +#define OTP_STATUS_PROG_STATUS_MASK 0x000000f0 +#define OTP_STATUS_PROG_STATUS_ALIGN 0 +#define OTP_STATUS_PROG_STATUS_BITS 4 +#define OTP_STATUS_PROG_STATUS_SHIFT 4 + +/* OTP :: STATUS :: reserved1 [03:03] */ +#define OTP_STATUS_reserved1_MASK 0x00000008 +#define OTP_STATUS_reserved1_ALIGN 0 +#define OTP_STATUS_reserved1_BITS 1 +#define OTP_STATUS_reserved1_SHIFT 3 + +/* OTP :: STATUS :: CHECKSUM_MISMATCH [02:02] */ +#define OTP_STATUS_CHECKSUM_MISMATCH_MASK 0x00000004 +#define OTP_STATUS_CHECKSUM_MISMATCH_ALIGN 0 +#define OTP_STATUS_CHECKSUM_MISMATCH_BITS 1 +#define OTP_STATUS_CHECKSUM_MISMATCH_SHIFT 2 + +/* OTP :: STATUS :: INSUFFICIENT_ROWS [01:01] */ +#define OTP_STATUS_INSUFFICIENT_ROWS_MASK 0x00000002 +#define OTP_STATUS_INSUFFICIENT_ROWS_ALIGN 0 +#define OTP_STATUS_INSUFFICIENT_ROWS_BITS 1 +#define OTP_STATUS_INSUFFICIENT_ROWS_SHIFT 1 + +/* OTP :: STATUS :: PROGRAMMED [00:00] */ +#define OTP_STATUS_PROGRAMMED_MASK 0x00000001 +#define OTP_STATUS_PROGRAMMED_ALIGN 0 +#define OTP_STATUS_PROGRAMMED_BITS 1 +#define OTP_STATUS_PROGRAMMED_SHIFT 0 + + +/**************************************************************************** + * OTP :: CONTENT_MISC + ***************************************************************************/ +/* OTP :: CONTENT_MISC :: reserved0 [31:06] */ +#define OTP_CONTENT_MISC_reserved0_MASK 0xffffffc0 +#define OTP_CONTENT_MISC_reserved0_ALIGN 0 +#define OTP_CONTENT_MISC_reserved0_BITS 26 +#define OTP_CONTENT_MISC_reserved0_SHIFT 6 + +/* OTP :: CONTENT_MISC :: DCI_SECURITY_ENABLE [05:05] */ +#define OTP_CONTENT_MISC_DCI_SECURITY_ENABLE_MASK 0x00000020 +#define OTP_CONTENT_MISC_DCI_SECURITY_ENABLE_ALIGN 0 +#define OTP_CONTENT_MISC_DCI_SECURITY_ENABLE_BITS 1 +#define OTP_CONTENT_MISC_DCI_SECURITY_ENABLE_SHIFT 5 + +/* OTP :: CONTENT_MISC :: AES_SECURITY_ENABLE [04:04] */ +#define OTP_CONTENT_MISC_AES_SECURITY_ENABLE_MASK 0x00000010 +#define OTP_CONTENT_MISC_AES_SECURITY_ENABLE_ALIGN 0 +#define OTP_CONTENT_MISC_AES_SECURITY_ENABLE_BITS 1 +#define OTP_CONTENT_MISC_AES_SECURITY_ENABLE_SHIFT 4 + +/* OTP :: CONTENT_MISC :: DISABLE_JTAG [03:03] */ +#define OTP_CONTENT_MISC_DISABLE_JTAG_MASK 0x00000008 +#define OTP_CONTENT_MISC_DISABLE_JTAG_ALIGN 0 +#define OTP_CONTENT_MISC_DISABLE_JTAG_BITS 1 +#define OTP_CONTENT_MISC_DISABLE_JTAG_SHIFT 3 + +/* OTP :: CONTENT_MISC :: DISABLE_UART [02:02] */ +#define OTP_CONTENT_MISC_DISABLE_UART_MASK 0x00000004 +#define OTP_CONTENT_MISC_DISABLE_UART_ALIGN 0 +#define OTP_CONTENT_MISC_DISABLE_UART_BITS 1 +#define OTP_CONTENT_MISC_DISABLE_UART_SHIFT 2 + +/* OTP :: CONTENT_MISC :: ENABLE_RANDOMIZATION [01:01] */ +#define OTP_CONTENT_MISC_ENABLE_RANDOMIZATION_MASK 0x00000002 +#define OTP_CONTENT_MISC_ENABLE_RANDOMIZATION_ALIGN 0 +#define OTP_CONTENT_MISC_ENABLE_RANDOMIZATION_BITS 1 +#define OTP_CONTENT_MISC_ENABLE_RANDOMIZATION_SHIFT 1 + +/* OTP :: CONTENT_MISC :: OTP_SECURITY_ENABLE [00:00] */ +#define OTP_CONTENT_MISC_OTP_SECURITY_ENABLE_MASK 0x00000001 +#define OTP_CONTENT_MISC_OTP_SECURITY_ENABLE_ALIGN 0 +#define OTP_CONTENT_MISC_OTP_SECURITY_ENABLE_BITS 1 +#define OTP_CONTENT_MISC_OTP_SECURITY_ENABLE_SHIFT 0 + + +/**************************************************************************** + * OTP :: CONTENT_AES_0 + ***************************************************************************/ +/* OTP :: CONTENT_AES_0 :: AES_KEY_0 [31:00] */ +#define OTP_CONTENT_AES_0_AES_KEY_0_MASK 0xffffffff +#define OTP_CONTENT_AES_0_AES_KEY_0_ALIGN 0 +#define OTP_CONTENT_AES_0_AES_KEY_0_BITS 32 +#define OTP_CONTENT_AES_0_AES_KEY_0_SHIFT 0 + + +/**************************************************************************** + * OTP :: CONTENT_AES_1 + ***************************************************************************/ +/* OTP :: CONTENT_AES_1 :: AES_KEY_1 [31:00] */ +#define OTP_CONTENT_AES_1_AES_KEY_1_MASK 0xffffffff +#define OTP_CONTENT_AES_1_AES_KEY_1_ALIGN 0 +#define OTP_CONTENT_AES_1_AES_KEY_1_BITS 32 +#define OTP_CONTENT_AES_1_AES_KEY_1_SHIFT 0 + + +/**************************************************************************** + * OTP :: CONTENT_AES_2 + ***************************************************************************/ +/* OTP :: CONTENT_AES_2 :: AES_KEY_2 [31:00] */ +#define OTP_CONTENT_AES_2_AES_KEY_2_MASK 0xffffffff +#define OTP_CONTENT_AES_2_AES_KEY_2_ALIGN 0 +#define OTP_CONTENT_AES_2_AES_KEY_2_BITS 32 +#define OTP_CONTENT_AES_2_AES_KEY_2_SHIFT 0 + + +/**************************************************************************** + * OTP :: CONTENT_AES_3 + ***************************************************************************/ +/* OTP :: CONTENT_AES_3 :: AES_KEY_3 [31:00] */ +#define OTP_CONTENT_AES_3_AES_KEY_3_MASK 0xffffffff +#define OTP_CONTENT_AES_3_AES_KEY_3_ALIGN 0 +#define OTP_CONTENT_AES_3_AES_KEY_3_BITS 32 +#define OTP_CONTENT_AES_3_AES_KEY_3_SHIFT 0 + + +/**************************************************************************** + * OTP :: CONTENT_SHA_0 + ***************************************************************************/ +/* OTP :: CONTENT_SHA_0 :: SHA_KEY_0 [31:00] */ +#define OTP_CONTENT_SHA_0_SHA_KEY_0_MASK 0xffffffff +#define OTP_CONTENT_SHA_0_SHA_KEY_0_ALIGN 0 +#define OTP_CONTENT_SHA_0_SHA_KEY_0_BITS 32 +#define OTP_CONTENT_SHA_0_SHA_KEY_0_SHIFT 0 + + +/**************************************************************************** + * OTP :: CONTENT_SHA_1 + ***************************************************************************/ +/* OTP :: CONTENT_SHA_1 :: SHA_KEY_1 [31:00] */ +#define OTP_CONTENT_SHA_1_SHA_KEY_1_MASK 0xffffffff +#define OTP_CONTENT_SHA_1_SHA_KEY_1_ALIGN 0 +#define OTP_CONTENT_SHA_1_SHA_KEY_1_BITS 32 +#define OTP_CONTENT_SHA_1_SHA_KEY_1_SHIFT 0 + + +/**************************************************************************** + * OTP :: CONTENT_SHA_2 + ***************************************************************************/ +/* OTP :: CONTENT_SHA_2 :: SHA_KEY_2 [31:00] */ +#define OTP_CONTENT_SHA_2_SHA_KEY_2_MASK 0xffffffff +#define OTP_CONTENT_SHA_2_SHA_KEY_2_ALIGN 0 +#define OTP_CONTENT_SHA_2_SHA_KEY_2_BITS 32 +#define OTP_CONTENT_SHA_2_SHA_KEY_2_SHIFT 0 + + +/**************************************************************************** + * OTP :: CONTENT_SHA_3 + ***************************************************************************/ +/* OTP :: CONTENT_SHA_3 :: SHA_KEY_3 [31:00] */ +#define OTP_CONTENT_SHA_3_SHA_KEY_3_MASK 0xffffffff +#define OTP_CONTENT_SHA_3_SHA_KEY_3_ALIGN 0 +#define OTP_CONTENT_SHA_3_SHA_KEY_3_BITS 32 +#define OTP_CONTENT_SHA_3_SHA_KEY_3_SHIFT 0 + + +/**************************************************************************** + * OTP :: CONTENT_SHA_4 + ***************************************************************************/ +/* OTP :: CONTENT_SHA_4 :: SHA_KEY_4 [31:00] */ +#define OTP_CONTENT_SHA_4_SHA_KEY_4_MASK 0xffffffff +#define OTP_CONTENT_SHA_4_SHA_KEY_4_ALIGN 0 +#define OTP_CONTENT_SHA_4_SHA_KEY_4_BITS 32 +#define OTP_CONTENT_SHA_4_SHA_KEY_4_SHIFT 0 + + +/**************************************************************************** + * OTP :: CONTENT_SHA_5 + ***************************************************************************/ +/* OTP :: CONTENT_SHA_5 :: SHA_KEY_5 [31:00] */ +#define OTP_CONTENT_SHA_5_SHA_KEY_5_MASK 0xffffffff +#define OTP_CONTENT_SHA_5_SHA_KEY_5_ALIGN 0 +#define OTP_CONTENT_SHA_5_SHA_KEY_5_BITS 32 +#define OTP_CONTENT_SHA_5_SHA_KEY_5_SHIFT 0 + + +/**************************************************************************** + * OTP :: CONTENT_SHA_6 + ***************************************************************************/ +/* OTP :: CONTENT_SHA_6 :: SHA_KEY_6 [31:00] */ +#define OTP_CONTENT_SHA_6_SHA_KEY_6_MASK 0xffffffff +#define OTP_CONTENT_SHA_6_SHA_KEY_6_ALIGN 0 +#define OTP_CONTENT_SHA_6_SHA_KEY_6_BITS 32 +#define OTP_CONTENT_SHA_6_SHA_KEY_6_SHIFT 0 + + +/**************************************************************************** + * OTP :: CONTENT_SHA_7 + ***************************************************************************/ +/* OTP :: CONTENT_SHA_7 :: SHA_KEY_7 [31:00] */ +#define OTP_CONTENT_SHA_7_SHA_KEY_7_MASK 0xffffffff +#define OTP_CONTENT_SHA_7_SHA_KEY_7_ALIGN 0 +#define OTP_CONTENT_SHA_7_SHA_KEY_7_BITS 32 +#define OTP_CONTENT_SHA_7_SHA_KEY_7_SHIFT 0 + + +/**************************************************************************** + * OTP :: CONTENT_CHECKSUM + ***************************************************************************/ +/* OTP :: CONTENT_CHECKSUM :: reserved0 [31:16] */ +#define OTP_CONTENT_CHECKSUM_reserved0_MASK 0xffff0000 +#define OTP_CONTENT_CHECKSUM_reserved0_ALIGN 0 +#define OTP_CONTENT_CHECKSUM_reserved0_BITS 16 +#define OTP_CONTENT_CHECKSUM_reserved0_SHIFT 16 + +/* OTP :: CONTENT_CHECKSUM :: CHECKSUM [15:00] */ +#define OTP_CONTENT_CHECKSUM_CHECKSUM_MASK 0x0000ffff +#define OTP_CONTENT_CHECKSUM_CHECKSUM_ALIGN 0 +#define OTP_CONTENT_CHECKSUM_CHECKSUM_BITS 16 +#define OTP_CONTENT_CHECKSUM_CHECKSUM_SHIFT 0 + + +/**************************************************************************** + * OTP :: PROG_CTRL + ***************************************************************************/ +/* OTP :: PROG_CTRL :: reserved0 [31:02] */ +#define OTP_PROG_CTRL_reserved0_MASK 0xfffffffc +#define OTP_PROG_CTRL_reserved0_ALIGN 0 +#define OTP_PROG_CTRL_reserved0_BITS 30 +#define OTP_PROG_CTRL_reserved0_SHIFT 2 + +/* OTP :: PROG_CTRL :: ENABLE [01:01] */ +#define OTP_PROG_CTRL_ENABLE_MASK 0x00000002 +#define OTP_PROG_CTRL_ENABLE_ALIGN 0 +#define OTP_PROG_CTRL_ENABLE_BITS 1 +#define OTP_PROG_CTRL_ENABLE_SHIFT 1 + +/* OTP :: PROG_CTRL :: RST [00:00] */ +#define OTP_PROG_CTRL_RST_MASK 0x00000001 +#define OTP_PROG_CTRL_RST_ALIGN 0 +#define OTP_PROG_CTRL_RST_BITS 1 +#define OTP_PROG_CTRL_RST_SHIFT 0 + + +/**************************************************************************** + * OTP :: PROG_STATUS + ***************************************************************************/ +/* OTP :: PROG_STATUS :: reserved0 [31:02] */ +#define OTP_PROG_STATUS_reserved0_MASK 0xfffffffc +#define OTP_PROG_STATUS_reserved0_ALIGN 0 +#define OTP_PROG_STATUS_reserved0_BITS 30 +#define OTP_PROG_STATUS_reserved0_SHIFT 2 + +/* OTP :: PROG_STATUS :: ORDY [01:01] */ +#define OTP_PROG_STATUS_ORDY_MASK 0x00000002 +#define OTP_PROG_STATUS_ORDY_ALIGN 0 +#define OTP_PROG_STATUS_ORDY_BITS 1 +#define OTP_PROG_STATUS_ORDY_SHIFT 1 + +/* OTP :: PROG_STATUS :: IRDY [00:00] */ +#define OTP_PROG_STATUS_IRDY_MASK 0x00000001 +#define OTP_PROG_STATUS_IRDY_ALIGN 0 +#define OTP_PROG_STATUS_IRDY_BITS 1 +#define OTP_PROG_STATUS_IRDY_SHIFT 0 + + +/**************************************************************************** + * OTP :: PROG_PULSE + ***************************************************************************/ +/* OTP :: PROG_PULSE :: PROG_HI [31:00] */ +#define OTP_PROG_PULSE_PROG_HI_MASK 0xffffffff +#define OTP_PROG_PULSE_PROG_HI_ALIGN 0 +#define OTP_PROG_PULSE_PROG_HI_BITS 32 +#define OTP_PROG_PULSE_PROG_HI_SHIFT 0 + + +/**************************************************************************** + * OTP :: VERIFY_PULSE + ***************************************************************************/ +/* OTP :: VERIFY_PULSE :: PROG_LOW [31:16] */ +#define OTP_VERIFY_PULSE_PROG_LOW_MASK 0xffff0000 +#define OTP_VERIFY_PULSE_PROG_LOW_ALIGN 0 +#define OTP_VERIFY_PULSE_PROG_LOW_BITS 16 +#define OTP_VERIFY_PULSE_PROG_LOW_SHIFT 16 + +/* OTP :: VERIFY_PULSE :: VERIFY [15:00] */ +#define OTP_VERIFY_PULSE_VERIFY_MASK 0x0000ffff +#define OTP_VERIFY_PULSE_VERIFY_ALIGN 0 +#define OTP_VERIFY_PULSE_VERIFY_BITS 16 +#define OTP_VERIFY_PULSE_VERIFY_SHIFT 0 + + +/**************************************************************************** + * OTP :: PROG_MASK + ***************************************************************************/ +/* OTP :: PROG_MASK :: reserved0 [31:17] */ +#define OTP_PROG_MASK_reserved0_MASK 0xfffe0000 +#define OTP_PROG_MASK_reserved0_ALIGN 0 +#define OTP_PROG_MASK_reserved0_BITS 15 +#define OTP_PROG_MASK_reserved0_SHIFT 17 + +/* OTP :: PROG_MASK :: PROG_MASK [16:00] */ +#define OTP_PROG_MASK_PROG_MASK_MASK 0x0001ffff +#define OTP_PROG_MASK_PROG_MASK_ALIGN 0 +#define OTP_PROG_MASK_PROG_MASK_BITS 17 +#define OTP_PROG_MASK_PROG_MASK_SHIFT 0 + + +/**************************************************************************** + * OTP :: DATA_INPUT + ***************************************************************************/ +/* OTP :: DATA_INPUT :: reserved0 [31:31] */ +#define OTP_DATA_INPUT_reserved0_MASK 0x80000000 +#define OTP_DATA_INPUT_reserved0_ALIGN 0 +#define OTP_DATA_INPUT_reserved0_BITS 1 +#define OTP_DATA_INPUT_reserved0_SHIFT 31 + +/* OTP :: DATA_INPUT :: CMD [30:28] */ +#define OTP_DATA_INPUT_CMD_MASK 0x70000000 +#define OTP_DATA_INPUT_CMD_ALIGN 0 +#define OTP_DATA_INPUT_CMD_BITS 3 +#define OTP_DATA_INPUT_CMD_SHIFT 28 + +/* OTP :: DATA_INPUT :: reserved1 [27:26] */ +#define OTP_DATA_INPUT_reserved1_MASK 0x0c000000 +#define OTP_DATA_INPUT_reserved1_ALIGN 0 +#define OTP_DATA_INPUT_reserved1_BITS 2 +#define OTP_DATA_INPUT_reserved1_SHIFT 26 + +/* OTP :: DATA_INPUT :: ADDR [25:20] */ +#define OTP_DATA_INPUT_ADDR_MASK 0x03f00000 +#define OTP_DATA_INPUT_ADDR_ALIGN 0 +#define OTP_DATA_INPUT_ADDR_BITS 6 +#define OTP_DATA_INPUT_ADDR_SHIFT 20 + +/* OTP :: DATA_INPUT :: reserved2 [19:18] */ +#define OTP_DATA_INPUT_reserved2_MASK 0x000c0000 +#define OTP_DATA_INPUT_reserved2_ALIGN 0 +#define OTP_DATA_INPUT_reserved2_BITS 2 +#define OTP_DATA_INPUT_reserved2_SHIFT 18 + +/* OTP :: DATA_INPUT :: WRCOL [17:17] */ +#define OTP_DATA_INPUT_WRCOL_MASK 0x00020000 +#define OTP_DATA_INPUT_WRCOL_ALIGN 0 +#define OTP_DATA_INPUT_WRCOL_BITS 1 +#define OTP_DATA_INPUT_WRCOL_SHIFT 17 + +/* OTP :: DATA_INPUT :: DIN [16:00] */ +#define OTP_DATA_INPUT_DIN_MASK 0x0001ffff +#define OTP_DATA_INPUT_DIN_ALIGN 0 +#define OTP_DATA_INPUT_DIN_BITS 17 +#define OTP_DATA_INPUT_DIN_SHIFT 0 + + +/**************************************************************************** + * OTP :: DATA_OUTPUT + ***************************************************************************/ +/* OTP :: DATA_OUTPUT :: reserved0 [31:17] */ +#define OTP_DATA_OUTPUT_reserved0_MASK 0xfffe0000 +#define OTP_DATA_OUTPUT_reserved0_ALIGN 0 +#define OTP_DATA_OUTPUT_reserved0_BITS 15 +#define OTP_DATA_OUTPUT_reserved0_SHIFT 17 + +/* OTP :: DATA_OUTPUT :: DOUT [16:00] */ +#define OTP_DATA_OUTPUT_DOUT_MASK 0x0001ffff +#define OTP_DATA_OUTPUT_DOUT_ALIGN 0 +#define OTP_DATA_OUTPUT_DOUT_BITS 17 +#define OTP_DATA_OUTPUT_DOUT_SHIFT 0 + + +/**************************************************************************** + * BCM70012_OTP_TOP_OTP_GR_BRIDGE + ***************************************************************************/ +/**************************************************************************** + * OTP_GR_BRIDGE :: REVISION + ***************************************************************************/ +/* OTP_GR_BRIDGE :: REVISION :: reserved0 [31:16] */ +#define OTP_GR_BRIDGE_REVISION_reserved0_MASK 0xffff0000 +#define OTP_GR_BRIDGE_REVISION_reserved0_ALIGN 0 +#define OTP_GR_BRIDGE_REVISION_reserved0_BITS 16 +#define OTP_GR_BRIDGE_REVISION_reserved0_SHIFT 16 + +/* OTP_GR_BRIDGE :: REVISION :: MAJOR [15:08] */ +#define OTP_GR_BRIDGE_REVISION_MAJOR_MASK 0x0000ff00 +#define OTP_GR_BRIDGE_REVISION_MAJOR_ALIGN 0 +#define OTP_GR_BRIDGE_REVISION_MAJOR_BITS 8 +#define OTP_GR_BRIDGE_REVISION_MAJOR_SHIFT 8 + +/* OTP_GR_BRIDGE :: REVISION :: MINOR [07:00] */ +#define OTP_GR_BRIDGE_REVISION_MINOR_MASK 0x000000ff +#define OTP_GR_BRIDGE_REVISION_MINOR_ALIGN 0 +#define OTP_GR_BRIDGE_REVISION_MINOR_BITS 8 +#define OTP_GR_BRIDGE_REVISION_MINOR_SHIFT 0 + + +/**************************************************************************** + * OTP_GR_BRIDGE :: CTRL + ***************************************************************************/ +/* OTP_GR_BRIDGE :: CTRL :: reserved0 [31:01] */ +#define OTP_GR_BRIDGE_CTRL_reserved0_MASK 0xfffffffe +#define OTP_GR_BRIDGE_CTRL_reserved0_ALIGN 0 +#define OTP_GR_BRIDGE_CTRL_reserved0_BITS 31 +#define OTP_GR_BRIDGE_CTRL_reserved0_SHIFT 1 + +/* OTP_GR_BRIDGE :: CTRL :: gisb_error_intr [00:00] */ +#define OTP_GR_BRIDGE_CTRL_gisb_error_intr_MASK 0x00000001 +#define OTP_GR_BRIDGE_CTRL_gisb_error_intr_ALIGN 0 +#define OTP_GR_BRIDGE_CTRL_gisb_error_intr_BITS 1 +#define OTP_GR_BRIDGE_CTRL_gisb_error_intr_SHIFT 0 +#define OTP_GR_BRIDGE_CTRL_gisb_error_intr_INTR_DISABLE 0 +#define OTP_GR_BRIDGE_CTRL_gisb_error_intr_INTR_ENABLE 1 + + +/**************************************************************************** + * OTP_GR_BRIDGE :: SPARE_SW_RESET_0 + ***************************************************************************/ +/* OTP_GR_BRIDGE :: SPARE_SW_RESET_0 :: reserved0 [31:01] */ +#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_MASK 0xfffffffe +#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_ALIGN 0 +#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_BITS 31 +#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_SHIFT 1 + +/* OTP_GR_BRIDGE :: SPARE_SW_RESET_0 :: SPARE_SW_RESET [00:00] */ +#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_MASK 0x00000001 +#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ALIGN 0 +#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_BITS 1 +#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_SHIFT 0 +#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_DEASSERT 0 +#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ASSERT 1 + + +/**************************************************************************** + * OTP_GR_BRIDGE :: SPARE_SW_RESET_1 + ***************************************************************************/ +/* OTP_GR_BRIDGE :: SPARE_SW_RESET_1 :: reserved0 [31:01] */ +#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_MASK 0xfffffffe +#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_ALIGN 0 +#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_BITS 31 +#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_SHIFT 1 + +/* OTP_GR_BRIDGE :: SPARE_SW_RESET_1 :: OTP_00_SW_RESET [00:00] */ +#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_OTP_00_SW_RESET_MASK 0x00000001 +#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_OTP_00_SW_RESET_ALIGN 0 +#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_OTP_00_SW_RESET_BITS 1 +#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_OTP_00_SW_RESET_SHIFT 0 +#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_OTP_00_SW_RESET_DEASSERT 0 +#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_OTP_00_SW_RESET_ASSERT 1 + + +/**************************************************************************** + * BCM70012_AES_TOP_AES + ***************************************************************************/ +/**************************************************************************** + * AES :: CONFIG_INFO + ***************************************************************************/ +/* AES :: CONFIG_INFO :: SWAP [31:31] */ +#define AES_CONFIG_INFO_SWAP_MASK 0x80000000 +#define AES_CONFIG_INFO_SWAP_ALIGN 0 +#define AES_CONFIG_INFO_SWAP_BITS 1 +#define AES_CONFIG_INFO_SWAP_SHIFT 31 + +/* AES :: CONFIG_INFO :: reserved0 [30:19] */ +#define AES_CONFIG_INFO_reserved0_MASK 0x7ff80000 +#define AES_CONFIG_INFO_reserved0_ALIGN 0 +#define AES_CONFIG_INFO_reserved0_BITS 12 +#define AES_CONFIG_INFO_reserved0_SHIFT 19 + +/* AES :: CONFIG_INFO :: OFFSET [18:02] */ +#define AES_CONFIG_INFO_OFFSET_MASK 0x0007fffc +#define AES_CONFIG_INFO_OFFSET_ALIGN 0 +#define AES_CONFIG_INFO_OFFSET_BITS 17 +#define AES_CONFIG_INFO_OFFSET_SHIFT 2 + +/* AES :: CONFIG_INFO :: reserved1 [01:00] */ +#define AES_CONFIG_INFO_reserved1_MASK 0x00000003 +#define AES_CONFIG_INFO_reserved1_ALIGN 0 +#define AES_CONFIG_INFO_reserved1_BITS 2 +#define AES_CONFIG_INFO_reserved1_SHIFT 0 + + +/**************************************************************************** + * AES :: CMD + ***************************************************************************/ +/* AES :: CMD :: reserved0 [31:13] */ +#define AES_CMD_reserved0_MASK 0xffffe000 +#define AES_CMD_reserved0_ALIGN 0 +#define AES_CMD_reserved0_BITS 19 +#define AES_CMD_reserved0_SHIFT 13 + +/* AES :: CMD :: WRITE_EEPROM [12:12] */ +#define AES_CMD_WRITE_EEPROM_MASK 0x00001000 +#define AES_CMD_WRITE_EEPROM_ALIGN 0 +#define AES_CMD_WRITE_EEPROM_BITS 1 +#define AES_CMD_WRITE_EEPROM_SHIFT 12 + +/* AES :: CMD :: reserved1 [11:09] */ +#define AES_CMD_reserved1_MASK 0x00000e00 +#define AES_CMD_reserved1_ALIGN 0 +#define AES_CMD_reserved1_BITS 3 +#define AES_CMD_reserved1_SHIFT 9 + +/* AES :: CMD :: START_EEPROM_COPY [08:08] */ +#define AES_CMD_START_EEPROM_COPY_MASK 0x00000100 +#define AES_CMD_START_EEPROM_COPY_ALIGN 0 +#define AES_CMD_START_EEPROM_COPY_BITS 1 +#define AES_CMD_START_EEPROM_COPY_SHIFT 8 + +/* AES :: CMD :: reserved2 [07:05] */ +#define AES_CMD_reserved2_MASK 0x000000e0 +#define AES_CMD_reserved2_ALIGN 0 +#define AES_CMD_reserved2_BITS 3 +#define AES_CMD_reserved2_SHIFT 5 + +/* AES :: CMD :: PREPARE_ENCRYPTION [04:04] */ +#define AES_CMD_PREPARE_ENCRYPTION_MASK 0x00000010 +#define AES_CMD_PREPARE_ENCRYPTION_ALIGN 0 +#define AES_CMD_PREPARE_ENCRYPTION_BITS 1 +#define AES_CMD_PREPARE_ENCRYPTION_SHIFT 4 + +/* AES :: CMD :: reserved3 [03:01] */ +#define AES_CMD_reserved3_MASK 0x0000000e +#define AES_CMD_reserved3_ALIGN 0 +#define AES_CMD_reserved3_BITS 3 +#define AES_CMD_reserved3_SHIFT 1 + +/* AES :: CMD :: START_KEY_LOAD [00:00] */ +#define AES_CMD_START_KEY_LOAD_MASK 0x00000001 +#define AES_CMD_START_KEY_LOAD_ALIGN 0 +#define AES_CMD_START_KEY_LOAD_BITS 1 +#define AES_CMD_START_KEY_LOAD_SHIFT 0 + + +/**************************************************************************** + * AES :: STATUS + ***************************************************************************/ +/* AES :: STATUS :: reserved0 [31:23] */ +#define AES_STATUS_reserved0_MASK 0xff800000 +#define AES_STATUS_reserved0_ALIGN 0 +#define AES_STATUS_reserved0_BITS 9 +#define AES_STATUS_reserved0_SHIFT 23 + +/* AES :: STATUS :: STUCK_AT_ZERO [22:22] */ +#define AES_STATUS_STUCK_AT_ZERO_MASK 0x00400000 +#define AES_STATUS_STUCK_AT_ZERO_ALIGN 0 +#define AES_STATUS_STUCK_AT_ZERO_BITS 1 +#define AES_STATUS_STUCK_AT_ZERO_SHIFT 22 + +/* AES :: STATUS :: STUCK_AT_ONE [21:21] */ +#define AES_STATUS_STUCK_AT_ONE_MASK 0x00200000 +#define AES_STATUS_STUCK_AT_ONE_ALIGN 0 +#define AES_STATUS_STUCK_AT_ONE_BITS 1 +#define AES_STATUS_STUCK_AT_ONE_SHIFT 21 + +/* AES :: STATUS :: RANDOM_READY [20:20] */ +#define AES_STATUS_RANDOM_READY_MASK 0x00100000 +#define AES_STATUS_RANDOM_READY_ALIGN 0 +#define AES_STATUS_RANDOM_READY_BITS 1 +#define AES_STATUS_RANDOM_READY_SHIFT 20 + +/* AES :: STATUS :: reserved1 [19:16] */ +#define AES_STATUS_reserved1_MASK 0x000f0000 +#define AES_STATUS_reserved1_ALIGN 0 +#define AES_STATUS_reserved1_BITS 4 +#define AES_STATUS_reserved1_SHIFT 16 + +/* AES :: STATUS :: WRITE_EEPROM_TIMEOUT [15:15] */ +#define AES_STATUS_WRITE_EEPROM_TIMEOUT_MASK 0x00008000 +#define AES_STATUS_WRITE_EEPROM_TIMEOUT_ALIGN 0 +#define AES_STATUS_WRITE_EEPROM_TIMEOUT_BITS 1 +#define AES_STATUS_WRITE_EEPROM_TIMEOUT_SHIFT 15 + +/* AES :: STATUS :: WRITE_DATA_MISMATCH [14:14] */ +#define AES_STATUS_WRITE_DATA_MISMATCH_MASK 0x00004000 +#define AES_STATUS_WRITE_DATA_MISMATCH_ALIGN 0 +#define AES_STATUS_WRITE_DATA_MISMATCH_BITS 1 +#define AES_STATUS_WRITE_DATA_MISMATCH_SHIFT 14 + +/* AES :: STATUS :: WRITE_GISB_ERROR [13:13] */ +#define AES_STATUS_WRITE_GISB_ERROR_MASK 0x00002000 +#define AES_STATUS_WRITE_GISB_ERROR_ALIGN 0 +#define AES_STATUS_WRITE_GISB_ERROR_BITS 1 +#define AES_STATUS_WRITE_GISB_ERROR_SHIFT 13 + +/* AES :: STATUS :: WRITE_DONE [12:12] */ +#define AES_STATUS_WRITE_DONE_MASK 0x00001000 +#define AES_STATUS_WRITE_DONE_ALIGN 0 +#define AES_STATUS_WRITE_DONE_BITS 1 +#define AES_STATUS_WRITE_DONE_SHIFT 12 + +/* AES :: STATUS :: reserved2 [11:11] */ +#define AES_STATUS_reserved2_MASK 0x00000800 +#define AES_STATUS_reserved2_ALIGN 0 +#define AES_STATUS_reserved2_BITS 1 +#define AES_STATUS_reserved2_SHIFT 11 + +/* AES :: STATUS :: COPY_EEPROM_ERROR [10:10] */ +#define AES_STATUS_COPY_EEPROM_ERROR_MASK 0x00000400 +#define AES_STATUS_COPY_EEPROM_ERROR_ALIGN 0 +#define AES_STATUS_COPY_EEPROM_ERROR_BITS 1 +#define AES_STATUS_COPY_EEPROM_ERROR_SHIFT 10 + +/* AES :: STATUS :: COPY_GISB_ERROR [09:09] */ +#define AES_STATUS_COPY_GISB_ERROR_MASK 0x00000200 +#define AES_STATUS_COPY_GISB_ERROR_ALIGN 0 +#define AES_STATUS_COPY_GISB_ERROR_BITS 1 +#define AES_STATUS_COPY_GISB_ERROR_SHIFT 9 + +/* AES :: STATUS :: COPY_DONE [08:08] */ +#define AES_STATUS_COPY_DONE_MASK 0x00000100 +#define AES_STATUS_COPY_DONE_ALIGN 0 +#define AES_STATUS_COPY_DONE_BITS 1 +#define AES_STATUS_COPY_DONE_SHIFT 8 + +/* AES :: STATUS :: PREPARE_EEPROM_TIMEOUT [07:07] */ +#define AES_STATUS_PREPARE_EEPROM_TIMEOUT_MASK 0x00000080 +#define AES_STATUS_PREPARE_EEPROM_TIMEOUT_ALIGN 0 +#define AES_STATUS_PREPARE_EEPROM_TIMEOUT_BITS 1 +#define AES_STATUS_PREPARE_EEPROM_TIMEOUT_SHIFT 7 + +/* AES :: STATUS :: PREPARE_DATA_MISMATCH [06:06] */ +#define AES_STATUS_PREPARE_DATA_MISMATCH_MASK 0x00000040 +#define AES_STATUS_PREPARE_DATA_MISMATCH_ALIGN 0 +#define AES_STATUS_PREPARE_DATA_MISMATCH_BITS 1 +#define AES_STATUS_PREPARE_DATA_MISMATCH_SHIFT 6 + +/* AES :: STATUS :: PREPARE_GISB_ERROR [05:05] */ +#define AES_STATUS_PREPARE_GISB_ERROR_MASK 0x00000020 +#define AES_STATUS_PREPARE_GISB_ERROR_ALIGN 0 +#define AES_STATUS_PREPARE_GISB_ERROR_BITS 1 +#define AES_STATUS_PREPARE_GISB_ERROR_SHIFT 5 + +/* AES :: STATUS :: PREPARE_DONE [04:04] */ +#define AES_STATUS_PREPARE_DONE_MASK 0x00000010 +#define AES_STATUS_PREPARE_DONE_ALIGN 0 +#define AES_STATUS_PREPARE_DONE_BITS 1 +#define AES_STATUS_PREPARE_DONE_SHIFT 4 + +/* AES :: STATUS :: reserved3 [03:02] */ +#define AES_STATUS_reserved3_MASK 0x0000000c +#define AES_STATUS_reserved3_ALIGN 0 +#define AES_STATUS_reserved3_BITS 2 +#define AES_STATUS_reserved3_SHIFT 2 + +/* AES :: STATUS :: KEY_LOAD_GISB_ERROR [01:01] */ +#define AES_STATUS_KEY_LOAD_GISB_ERROR_MASK 0x00000002 +#define AES_STATUS_KEY_LOAD_GISB_ERROR_ALIGN 0 +#define AES_STATUS_KEY_LOAD_GISB_ERROR_BITS 1 +#define AES_STATUS_KEY_LOAD_GISB_ERROR_SHIFT 1 + +/* AES :: STATUS :: KEY_LOAD_DONE [00:00] */ +#define AES_STATUS_KEY_LOAD_DONE_MASK 0x00000001 +#define AES_STATUS_KEY_LOAD_DONE_ALIGN 0 +#define AES_STATUS_KEY_LOAD_DONE_BITS 1 +#define AES_STATUS_KEY_LOAD_DONE_SHIFT 0 + + +/**************************************************************************** + * AES :: EEPROM_CONFIG + ***************************************************************************/ +/* AES :: EEPROM_CONFIG :: LENGTH [31:20] */ +#define AES_EEPROM_CONFIG_LENGTH_MASK 0xfff00000 +#define AES_EEPROM_CONFIG_LENGTH_ALIGN 0 +#define AES_EEPROM_CONFIG_LENGTH_BITS 12 +#define AES_EEPROM_CONFIG_LENGTH_SHIFT 20 + +/* AES :: EEPROM_CONFIG :: reserved0 [19:16] */ +#define AES_EEPROM_CONFIG_reserved0_MASK 0x000f0000 +#define AES_EEPROM_CONFIG_reserved0_ALIGN 0 +#define AES_EEPROM_CONFIG_reserved0_BITS 4 +#define AES_EEPROM_CONFIG_reserved0_SHIFT 16 + +/* AES :: EEPROM_CONFIG :: START_ADDR [15:02] */ +#define AES_EEPROM_CONFIG_START_ADDR_MASK 0x0000fffc +#define AES_EEPROM_CONFIG_START_ADDR_ALIGN 0 +#define AES_EEPROM_CONFIG_START_ADDR_BITS 14 +#define AES_EEPROM_CONFIG_START_ADDR_SHIFT 2 + +/* AES :: EEPROM_CONFIG :: reserved1 [01:00] */ +#define AES_EEPROM_CONFIG_reserved1_MASK 0x00000003 +#define AES_EEPROM_CONFIG_reserved1_ALIGN 0 +#define AES_EEPROM_CONFIG_reserved1_BITS 2 +#define AES_EEPROM_CONFIG_reserved1_SHIFT 0 + + +/**************************************************************************** + * AES :: EEPROM_DATA_0 + ***************************************************************************/ +/* AES :: EEPROM_DATA_0 :: DATA [31:00] */ +#define AES_EEPROM_DATA_0_DATA_MASK 0xffffffff +#define AES_EEPROM_DATA_0_DATA_ALIGN 0 +#define AES_EEPROM_DATA_0_DATA_BITS 32 +#define AES_EEPROM_DATA_0_DATA_SHIFT 0 + + +/**************************************************************************** + * AES :: EEPROM_DATA_1 + ***************************************************************************/ +/* AES :: EEPROM_DATA_1 :: DATA [31:00] */ +#define AES_EEPROM_DATA_1_DATA_MASK 0xffffffff +#define AES_EEPROM_DATA_1_DATA_ALIGN 0 +#define AES_EEPROM_DATA_1_DATA_BITS 32 +#define AES_EEPROM_DATA_1_DATA_SHIFT 0 + + +/**************************************************************************** + * AES :: EEPROM_DATA_2 + ***************************************************************************/ +/* AES :: EEPROM_DATA_2 :: DATA [31:00] */ +#define AES_EEPROM_DATA_2_DATA_MASK 0xffffffff +#define AES_EEPROM_DATA_2_DATA_ALIGN 0 +#define AES_EEPROM_DATA_2_DATA_BITS 32 +#define AES_EEPROM_DATA_2_DATA_SHIFT 0 + + +/**************************************************************************** + * AES :: EEPROM_DATA_3 + ***************************************************************************/ +/* AES :: EEPROM_DATA_3 :: DATA [31:00] */ +#define AES_EEPROM_DATA_3_DATA_MASK 0xffffffff +#define AES_EEPROM_DATA_3_DATA_ALIGN 0 +#define AES_EEPROM_DATA_3_DATA_BITS 32 +#define AES_EEPROM_DATA_3_DATA_SHIFT 0 + + +/**************************************************************************** + * BCM70012_AES_TOP_AES_RGR_BRIDGE + ***************************************************************************/ +/**************************************************************************** + * AES_RGR_BRIDGE :: REVISION + ***************************************************************************/ +/* AES_RGR_BRIDGE :: REVISION :: reserved0 [31:16] */ +#define AES_RGR_BRIDGE_REVISION_reserved0_MASK 0xffff0000 +#define AES_RGR_BRIDGE_REVISION_reserved0_ALIGN 0 +#define AES_RGR_BRIDGE_REVISION_reserved0_BITS 16 +#define AES_RGR_BRIDGE_REVISION_reserved0_SHIFT 16 + +/* AES_RGR_BRIDGE :: REVISION :: MAJOR [15:08] */ +#define AES_RGR_BRIDGE_REVISION_MAJOR_MASK 0x0000ff00 +#define AES_RGR_BRIDGE_REVISION_MAJOR_ALIGN 0 +#define AES_RGR_BRIDGE_REVISION_MAJOR_BITS 8 +#define AES_RGR_BRIDGE_REVISION_MAJOR_SHIFT 8 + +/* AES_RGR_BRIDGE :: REVISION :: MINOR [07:00] */ +#define AES_RGR_BRIDGE_REVISION_MINOR_MASK 0x000000ff +#define AES_RGR_BRIDGE_REVISION_MINOR_ALIGN 0 +#define AES_RGR_BRIDGE_REVISION_MINOR_BITS 8 +#define AES_RGR_BRIDGE_REVISION_MINOR_SHIFT 0 + + +/**************************************************************************** + * AES_RGR_BRIDGE :: CTRL + ***************************************************************************/ +/* AES_RGR_BRIDGE :: CTRL :: reserved0 [31:02] */ +#define AES_RGR_BRIDGE_CTRL_reserved0_MASK 0xfffffffc +#define AES_RGR_BRIDGE_CTRL_reserved0_ALIGN 0 +#define AES_RGR_BRIDGE_CTRL_reserved0_BITS 30 +#define AES_RGR_BRIDGE_CTRL_reserved0_SHIFT 2 + +/* AES_RGR_BRIDGE :: CTRL :: rbus_error_intr [01:01] */ +#define AES_RGR_BRIDGE_CTRL_rbus_error_intr_MASK 0x00000002 +#define AES_RGR_BRIDGE_CTRL_rbus_error_intr_ALIGN 0 +#define AES_RGR_BRIDGE_CTRL_rbus_error_intr_BITS 1 +#define AES_RGR_BRIDGE_CTRL_rbus_error_intr_SHIFT 1 +#define AES_RGR_BRIDGE_CTRL_rbus_error_intr_INTR_DISABLE 0 +#define AES_RGR_BRIDGE_CTRL_rbus_error_intr_INTR_ENABLE 1 + +/* AES_RGR_BRIDGE :: CTRL :: gisb_error_intr [00:00] */ +#define AES_RGR_BRIDGE_CTRL_gisb_error_intr_MASK 0x00000001 +#define AES_RGR_BRIDGE_CTRL_gisb_error_intr_ALIGN 0 +#define AES_RGR_BRIDGE_CTRL_gisb_error_intr_BITS 1 +#define AES_RGR_BRIDGE_CTRL_gisb_error_intr_SHIFT 0 +#define AES_RGR_BRIDGE_CTRL_gisb_error_intr_INTR_DISABLE 0 +#define AES_RGR_BRIDGE_CTRL_gisb_error_intr_INTR_ENABLE 1 + + +/**************************************************************************** + * AES_RGR_BRIDGE :: RBUS_TIMER + ***************************************************************************/ +/* AES_RGR_BRIDGE :: RBUS_TIMER :: reserved0 [31:16] */ +#define AES_RGR_BRIDGE_RBUS_TIMER_reserved0_MASK 0xffff0000 +#define AES_RGR_BRIDGE_RBUS_TIMER_reserved0_ALIGN 0 +#define AES_RGR_BRIDGE_RBUS_TIMER_reserved0_BITS 16 +#define AES_RGR_BRIDGE_RBUS_TIMER_reserved0_SHIFT 16 + +/* AES_RGR_BRIDGE :: RBUS_TIMER :: timer_value [15:00] */ +#define AES_RGR_BRIDGE_RBUS_TIMER_timer_value_MASK 0x0000ffff +#define AES_RGR_BRIDGE_RBUS_TIMER_timer_value_ALIGN 0 +#define AES_RGR_BRIDGE_RBUS_TIMER_timer_value_BITS 16 +#define AES_RGR_BRIDGE_RBUS_TIMER_timer_value_SHIFT 0 + + +/**************************************************************************** + * AES_RGR_BRIDGE :: SPARE_SW_RESET_0 + ***************************************************************************/ +/* AES_RGR_BRIDGE :: SPARE_SW_RESET_0 :: reserved0 [31:01] */ +#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_MASK 0xfffffffe +#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_ALIGN 0 +#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_BITS 31 +#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_SHIFT 1 + +/* AES_RGR_BRIDGE :: SPARE_SW_RESET_0 :: SPARE_SW_RESET [00:00] */ +#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_MASK 0x00000001 +#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ALIGN 0 +#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_BITS 1 +#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_SHIFT 0 +#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_DEASSERT 0 +#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ASSERT 1 + + +/**************************************************************************** + * AES_RGR_BRIDGE :: SPARE_SW_RESET_1 + ***************************************************************************/ +/* AES_RGR_BRIDGE :: SPARE_SW_RESET_1 :: reserved0 [31:01] */ +#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_MASK 0xfffffffe +#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_ALIGN 0 +#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_BITS 31 +#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_SHIFT 1 + +/* AES_RGR_BRIDGE :: SPARE_SW_RESET_1 :: SPARE_SW_RESET [00:00] */ +#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_MASK 0x00000001 +#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ALIGN 0 +#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_BITS 1 +#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_SHIFT 0 +#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_DEASSERT 0 +#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ASSERT 1 + + +/**************************************************************************** + * BCM70012_DCI_TOP_DCI + ***************************************************************************/ +/**************************************************************************** + * DCI :: CMD + ***************************************************************************/ +/* DCI :: CMD :: reserved0 [31:09] */ +#define DCI_CMD_reserved0_MASK 0xfffffe00 +#define DCI_CMD_reserved0_ALIGN 0 +#define DCI_CMD_reserved0_BITS 23 +#define DCI_CMD_reserved0_SHIFT 9 + +/* DCI :: CMD :: FORCE_FW_VALIDATED [08:08] */ +#define DCI_CMD_FORCE_FW_VALIDATED_MASK 0x00000100 +#define DCI_CMD_FORCE_FW_VALIDATED_ALIGN 0 +#define DCI_CMD_FORCE_FW_VALIDATED_BITS 1 +#define DCI_CMD_FORCE_FW_VALIDATED_SHIFT 8 + +/* DCI :: CMD :: reserved1 [07:05] */ +#define DCI_CMD_reserved1_MASK 0x000000e0 +#define DCI_CMD_reserved1_ALIGN 0 +#define DCI_CMD_reserved1_BITS 3 +#define DCI_CMD_reserved1_SHIFT 5 + +/* DCI :: CMD :: START_PROCESSOR [04:04] */ +#define DCI_CMD_START_PROCESSOR_MASK 0x00000010 +#define DCI_CMD_START_PROCESSOR_ALIGN 0 +#define DCI_CMD_START_PROCESSOR_BITS 1 +#define DCI_CMD_START_PROCESSOR_SHIFT 4 + +/* DCI :: CMD :: reserved2 [03:02] */ +#define DCI_CMD_reserved2_MASK 0x0000000c +#define DCI_CMD_reserved2_ALIGN 0 +#define DCI_CMD_reserved2_BITS 2 +#define DCI_CMD_reserved2_SHIFT 2 + +/* DCI :: CMD :: DOWNLOAD_COMPLETE [01:01] */ +#define DCI_CMD_DOWNLOAD_COMPLETE_MASK 0x00000002 +#define DCI_CMD_DOWNLOAD_COMPLETE_ALIGN 0 +#define DCI_CMD_DOWNLOAD_COMPLETE_BITS 1 +#define DCI_CMD_DOWNLOAD_COMPLETE_SHIFT 1 + +/* DCI :: CMD :: INITIATE_FW_DOWNLOAD [00:00] */ +#define DCI_CMD_INITIATE_FW_DOWNLOAD_MASK 0x00000001 +#define DCI_CMD_INITIATE_FW_DOWNLOAD_ALIGN 0 +#define DCI_CMD_INITIATE_FW_DOWNLOAD_BITS 1 +#define DCI_CMD_INITIATE_FW_DOWNLOAD_SHIFT 0 + + +/**************************************************************************** + * DCI :: STATUS + ***************************************************************************/ +/* DCI :: STATUS :: reserved0 [31:10] */ +#define DCI_STATUS_reserved0_MASK 0xfffffc00 +#define DCI_STATUS_reserved0_ALIGN 0 +#define DCI_STATUS_reserved0_BITS 22 +#define DCI_STATUS_reserved0_SHIFT 10 + +/* DCI :: STATUS :: SIGNATURE_MATCHED [09:09] */ +#define DCI_STATUS_SIGNATURE_MATCHED_MASK 0x00000200 +#define DCI_STATUS_SIGNATURE_MATCHED_ALIGN 0 +#define DCI_STATUS_SIGNATURE_MATCHED_BITS 1 +#define DCI_STATUS_SIGNATURE_MATCHED_SHIFT 9 + +/* DCI :: STATUS :: SIGNATURE_MISMATCH [08:08] */ +#define DCI_STATUS_SIGNATURE_MISMATCH_MASK 0x00000100 +#define DCI_STATUS_SIGNATURE_MISMATCH_ALIGN 0 +#define DCI_STATUS_SIGNATURE_MISMATCH_BITS 1 +#define DCI_STATUS_SIGNATURE_MISMATCH_SHIFT 8 + +/* DCI :: STATUS :: reserved1 [07:06] */ +#define DCI_STATUS_reserved1_MASK 0x000000c0 +#define DCI_STATUS_reserved1_ALIGN 0 +#define DCI_STATUS_reserved1_BITS 2 +#define DCI_STATUS_reserved1_SHIFT 6 + +/* DCI :: STATUS :: GISB_ERROR [05:05] */ +#define DCI_STATUS_GISB_ERROR_MASK 0x00000020 +#define DCI_STATUS_GISB_ERROR_ALIGN 0 +#define DCI_STATUS_GISB_ERROR_BITS 1 +#define DCI_STATUS_GISB_ERROR_SHIFT 5 + +/* DCI :: STATUS :: DOWNLOAD_READY [04:04] */ +#define DCI_STATUS_DOWNLOAD_READY_MASK 0x00000010 +#define DCI_STATUS_DOWNLOAD_READY_ALIGN 0 +#define DCI_STATUS_DOWNLOAD_READY_BITS 1 +#define DCI_STATUS_DOWNLOAD_READY_SHIFT 4 + +/* DCI :: STATUS :: reserved2 [03:01] */ +#define DCI_STATUS_reserved2_MASK 0x0000000e +#define DCI_STATUS_reserved2_ALIGN 0 +#define DCI_STATUS_reserved2_BITS 3 +#define DCI_STATUS_reserved2_SHIFT 1 + +/* DCI :: STATUS :: FIRMWARE_VALIDATED [00:00] */ +#define DCI_STATUS_FIRMWARE_VALIDATED_MASK 0x00000001 +#define DCI_STATUS_FIRMWARE_VALIDATED_ALIGN 0 +#define DCI_STATUS_FIRMWARE_VALIDATED_BITS 1 +#define DCI_STATUS_FIRMWARE_VALIDATED_SHIFT 0 + + +/**************************************************************************** + * DCI :: DRAM_BASE_ADDR + ***************************************************************************/ +/* DCI :: DRAM_BASE_ADDR :: reserved0 [31:13] */ +#define DCI_DRAM_BASE_ADDR_reserved0_MASK 0xffffe000 +#define DCI_DRAM_BASE_ADDR_reserved0_ALIGN 0 +#define DCI_DRAM_BASE_ADDR_reserved0_BITS 19 +#define DCI_DRAM_BASE_ADDR_reserved0_SHIFT 13 + +/* DCI :: DRAM_BASE_ADDR :: BASE_ADDR [12:00] */ +#define DCI_DRAM_BASE_ADDR_BASE_ADDR_MASK 0x00001fff +#define DCI_DRAM_BASE_ADDR_BASE_ADDR_ALIGN 0 +#define DCI_DRAM_BASE_ADDR_BASE_ADDR_BITS 13 +#define DCI_DRAM_BASE_ADDR_BASE_ADDR_SHIFT 0 + + +/**************************************************************************** + * DCI :: FIRMWARE_ADDR + ***************************************************************************/ +/* DCI :: FIRMWARE_ADDR :: reserved0 [31:19] */ +#define DCI_FIRMWARE_ADDR_reserved0_MASK 0xfff80000 +#define DCI_FIRMWARE_ADDR_reserved0_ALIGN 0 +#define DCI_FIRMWARE_ADDR_reserved0_BITS 13 +#define DCI_FIRMWARE_ADDR_reserved0_SHIFT 19 + +/* DCI :: FIRMWARE_ADDR :: FW_ADDR [18:02] */ +#define DCI_FIRMWARE_ADDR_FW_ADDR_MASK 0x0007fffc +#define DCI_FIRMWARE_ADDR_FW_ADDR_ALIGN 0 +#define DCI_FIRMWARE_ADDR_FW_ADDR_BITS 17 +#define DCI_FIRMWARE_ADDR_FW_ADDR_SHIFT 2 + +/* DCI :: FIRMWARE_ADDR :: reserved1 [01:00] */ +#define DCI_FIRMWARE_ADDR_reserved1_MASK 0x00000003 +#define DCI_FIRMWARE_ADDR_reserved1_ALIGN 0 +#define DCI_FIRMWARE_ADDR_reserved1_BITS 2 +#define DCI_FIRMWARE_ADDR_reserved1_SHIFT 0 + + +/**************************************************************************** + * DCI :: FIRMWARE_DATA + ***************************************************************************/ +/* DCI :: FIRMWARE_DATA :: FW_DATA [31:00] */ +#define DCI_FIRMWARE_DATA_FW_DATA_MASK 0xffffffff +#define DCI_FIRMWARE_DATA_FW_DATA_ALIGN 0 +#define DCI_FIRMWARE_DATA_FW_DATA_BITS 32 +#define DCI_FIRMWARE_DATA_FW_DATA_SHIFT 0 + + +/**************************************************************************** + * DCI :: SIGNATURE_DATA_0 + ***************************************************************************/ +/* DCI :: SIGNATURE_DATA_0 :: SIG_DATA_0 [31:00] */ +#define DCI_SIGNATURE_DATA_0_SIG_DATA_0_MASK 0xffffffff +#define DCI_SIGNATURE_DATA_0_SIG_DATA_0_ALIGN 0 +#define DCI_SIGNATURE_DATA_0_SIG_DATA_0_BITS 32 +#define DCI_SIGNATURE_DATA_0_SIG_DATA_0_SHIFT 0 + + +/**************************************************************************** + * DCI :: SIGNATURE_DATA_1 + ***************************************************************************/ +/* DCI :: SIGNATURE_DATA_1 :: SIG_DATA_1 [31:00] */ +#define DCI_SIGNATURE_DATA_1_SIG_DATA_1_MASK 0xffffffff +#define DCI_SIGNATURE_DATA_1_SIG_DATA_1_ALIGN 0 +#define DCI_SIGNATURE_DATA_1_SIG_DATA_1_BITS 32 +#define DCI_SIGNATURE_DATA_1_SIG_DATA_1_SHIFT 0 + + +/**************************************************************************** + * DCI :: SIGNATURE_DATA_2 + ***************************************************************************/ +/* DCI :: SIGNATURE_DATA_2 :: SIG_DATA_2 [31:00] */ +#define DCI_SIGNATURE_DATA_2_SIG_DATA_2_MASK 0xffffffff +#define DCI_SIGNATURE_DATA_2_SIG_DATA_2_ALIGN 0 +#define DCI_SIGNATURE_DATA_2_SIG_DATA_2_BITS 32 +#define DCI_SIGNATURE_DATA_2_SIG_DATA_2_SHIFT 0 + + +/**************************************************************************** + * DCI :: SIGNATURE_DATA_3 + ***************************************************************************/ +/* DCI :: SIGNATURE_DATA_3 :: SIG_DATA_3 [31:00] */ +#define DCI_SIGNATURE_DATA_3_SIG_DATA_3_MASK 0xffffffff +#define DCI_SIGNATURE_DATA_3_SIG_DATA_3_ALIGN 0 +#define DCI_SIGNATURE_DATA_3_SIG_DATA_3_BITS 32 +#define DCI_SIGNATURE_DATA_3_SIG_DATA_3_SHIFT 0 + + +/**************************************************************************** + * DCI :: SIGNATURE_DATA_4 + ***************************************************************************/ +/* DCI :: SIGNATURE_DATA_4 :: SIG_DATA_4 [31:00] */ +#define DCI_SIGNATURE_DATA_4_SIG_DATA_4_MASK 0xffffffff +#define DCI_SIGNATURE_DATA_4_SIG_DATA_4_ALIGN 0 +#define DCI_SIGNATURE_DATA_4_SIG_DATA_4_BITS 32 +#define DCI_SIGNATURE_DATA_4_SIG_DATA_4_SHIFT 0 + + +/**************************************************************************** + * DCI :: SIGNATURE_DATA_5 + ***************************************************************************/ +/* DCI :: SIGNATURE_DATA_5 :: SIG_DATA_5 [31:00] */ +#define DCI_SIGNATURE_DATA_5_SIG_DATA_5_MASK 0xffffffff +#define DCI_SIGNATURE_DATA_5_SIG_DATA_5_ALIGN 0 +#define DCI_SIGNATURE_DATA_5_SIG_DATA_5_BITS 32 +#define DCI_SIGNATURE_DATA_5_SIG_DATA_5_SHIFT 0 + + +/**************************************************************************** + * DCI :: SIGNATURE_DATA_6 + ***************************************************************************/ +/* DCI :: SIGNATURE_DATA_6 :: SIG_DATA_6 [31:00] */ +#define DCI_SIGNATURE_DATA_6_SIG_DATA_6_MASK 0xffffffff +#define DCI_SIGNATURE_DATA_6_SIG_DATA_6_ALIGN 0 +#define DCI_SIGNATURE_DATA_6_SIG_DATA_6_BITS 32 +#define DCI_SIGNATURE_DATA_6_SIG_DATA_6_SHIFT 0 + + +/**************************************************************************** + * DCI :: SIGNATURE_DATA_7 + ***************************************************************************/ +/* DCI :: SIGNATURE_DATA_7 :: SIG_DATA_7 [31:00] */ +#define DCI_SIGNATURE_DATA_7_SIG_DATA_7_MASK 0xffffffff +#define DCI_SIGNATURE_DATA_7_SIG_DATA_7_ALIGN 0 +#define DCI_SIGNATURE_DATA_7_SIG_DATA_7_BITS 32 +#define DCI_SIGNATURE_DATA_7_SIG_DATA_7_SHIFT 0 + + +/**************************************************************************** + * BCM70012_DCI_TOP_DCI_RGR_BRIDGE + ***************************************************************************/ +/**************************************************************************** + * DCI_RGR_BRIDGE :: REVISION + ***************************************************************************/ +/* DCI_RGR_BRIDGE :: REVISION :: reserved0 [31:16] */ +#define DCI_RGR_BRIDGE_REVISION_reserved0_MASK 0xffff0000 +#define DCI_RGR_BRIDGE_REVISION_reserved0_ALIGN 0 +#define DCI_RGR_BRIDGE_REVISION_reserved0_BITS 16 +#define DCI_RGR_BRIDGE_REVISION_reserved0_SHIFT 16 + +/* DCI_RGR_BRIDGE :: REVISION :: MAJOR [15:08] */ +#define DCI_RGR_BRIDGE_REVISION_MAJOR_MASK 0x0000ff00 +#define DCI_RGR_BRIDGE_REVISION_MAJOR_ALIGN 0 +#define DCI_RGR_BRIDGE_REVISION_MAJOR_BITS 8 +#define DCI_RGR_BRIDGE_REVISION_MAJOR_SHIFT 8 + +/* DCI_RGR_BRIDGE :: REVISION :: MINOR [07:00] */ +#define DCI_RGR_BRIDGE_REVISION_MINOR_MASK 0x000000ff +#define DCI_RGR_BRIDGE_REVISION_MINOR_ALIGN 0 +#define DCI_RGR_BRIDGE_REVISION_MINOR_BITS 8 +#define DCI_RGR_BRIDGE_REVISION_MINOR_SHIFT 0 + + +/**************************************************************************** + * DCI_RGR_BRIDGE :: CTRL + ***************************************************************************/ +/* DCI_RGR_BRIDGE :: CTRL :: reserved0 [31:02] */ +#define DCI_RGR_BRIDGE_CTRL_reserved0_MASK 0xfffffffc +#define DCI_RGR_BRIDGE_CTRL_reserved0_ALIGN 0 +#define DCI_RGR_BRIDGE_CTRL_reserved0_BITS 30 +#define DCI_RGR_BRIDGE_CTRL_reserved0_SHIFT 2 + +/* DCI_RGR_BRIDGE :: CTRL :: rbus_error_intr [01:01] */ +#define DCI_RGR_BRIDGE_CTRL_rbus_error_intr_MASK 0x00000002 +#define DCI_RGR_BRIDGE_CTRL_rbus_error_intr_ALIGN 0 +#define DCI_RGR_BRIDGE_CTRL_rbus_error_intr_BITS 1 +#define DCI_RGR_BRIDGE_CTRL_rbus_error_intr_SHIFT 1 +#define DCI_RGR_BRIDGE_CTRL_rbus_error_intr_INTR_DISABLE 0 +#define DCI_RGR_BRIDGE_CTRL_rbus_error_intr_INTR_ENABLE 1 + +/* DCI_RGR_BRIDGE :: CTRL :: gisb_error_intr [00:00] */ +#define DCI_RGR_BRIDGE_CTRL_gisb_error_intr_MASK 0x00000001 +#define DCI_RGR_BRIDGE_CTRL_gisb_error_intr_ALIGN 0 +#define DCI_RGR_BRIDGE_CTRL_gisb_error_intr_BITS 1 +#define DCI_RGR_BRIDGE_CTRL_gisb_error_intr_SHIFT 0 +#define DCI_RGR_BRIDGE_CTRL_gisb_error_intr_INTR_DISABLE 0 +#define DCI_RGR_BRIDGE_CTRL_gisb_error_intr_INTR_ENABLE 1 + + +/**************************************************************************** + * DCI_RGR_BRIDGE :: RBUS_TIMER + ***************************************************************************/ +/* DCI_RGR_BRIDGE :: RBUS_TIMER :: reserved0 [31:16] */ +#define DCI_RGR_BRIDGE_RBUS_TIMER_reserved0_MASK 0xffff0000 +#define DCI_RGR_BRIDGE_RBUS_TIMER_reserved0_ALIGN 0 +#define DCI_RGR_BRIDGE_RBUS_TIMER_reserved0_BITS 16 +#define DCI_RGR_BRIDGE_RBUS_TIMER_reserved0_SHIFT 16 + +/* DCI_RGR_BRIDGE :: RBUS_TIMER :: timer_value [15:00] */ +#define DCI_RGR_BRIDGE_RBUS_TIMER_timer_value_MASK 0x0000ffff +#define DCI_RGR_BRIDGE_RBUS_TIMER_timer_value_ALIGN 0 +#define DCI_RGR_BRIDGE_RBUS_TIMER_timer_value_BITS 16 +#define DCI_RGR_BRIDGE_RBUS_TIMER_timer_value_SHIFT 0 + + +/**************************************************************************** + * DCI_RGR_BRIDGE :: SPARE_SW_RESET_0 + ***************************************************************************/ +/* DCI_RGR_BRIDGE :: SPARE_SW_RESET_0 :: reserved0 [31:01] */ +#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_MASK 0xfffffffe +#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_ALIGN 0 +#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_BITS 31 +#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_SHIFT 1 + +/* DCI_RGR_BRIDGE :: SPARE_SW_RESET_0 :: SPARE_SW_RESET [00:00] */ +#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_MASK 0x00000001 +#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ALIGN 0 +#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_BITS 1 +#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_SHIFT 0 +#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_DEASSERT 0 +#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ASSERT 1 + + +/**************************************************************************** + * DCI_RGR_BRIDGE :: SPARE_SW_RESET_1 + ***************************************************************************/ +/* DCI_RGR_BRIDGE :: SPARE_SW_RESET_1 :: reserved0 [31:01] */ +#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_MASK 0xfffffffe +#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_ALIGN 0 +#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_BITS 31 +#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_SHIFT 1 + +/* DCI_RGR_BRIDGE :: SPARE_SW_RESET_1 :: SPARE_SW_RESET [00:00] */ +#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_MASK 0x00000001 +#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ALIGN 0 +#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_BITS 1 +#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_SHIFT 0 +#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_DEASSERT 0 +#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ASSERT 1 + + +/**************************************************************************** + * BCM70012_CCE_TOP_CCE_RGR_BRIDGE + ***************************************************************************/ +/**************************************************************************** + * CCE_RGR_BRIDGE :: REVISION + ***************************************************************************/ +/* CCE_RGR_BRIDGE :: REVISION :: reserved0 [31:16] */ +#define CCE_RGR_BRIDGE_REVISION_reserved0_MASK 0xffff0000 +#define CCE_RGR_BRIDGE_REVISION_reserved0_ALIGN 0 +#define CCE_RGR_BRIDGE_REVISION_reserved0_BITS 16 +#define CCE_RGR_BRIDGE_REVISION_reserved0_SHIFT 16 + +/* CCE_RGR_BRIDGE :: REVISION :: MAJOR [15:08] */ +#define CCE_RGR_BRIDGE_REVISION_MAJOR_MASK 0x0000ff00 +#define CCE_RGR_BRIDGE_REVISION_MAJOR_ALIGN 0 +#define CCE_RGR_BRIDGE_REVISION_MAJOR_BITS 8 +#define CCE_RGR_BRIDGE_REVISION_MAJOR_SHIFT 8 + +/* CCE_RGR_BRIDGE :: REVISION :: MINOR [07:00] */ +#define CCE_RGR_BRIDGE_REVISION_MINOR_MASK 0x000000ff +#define CCE_RGR_BRIDGE_REVISION_MINOR_ALIGN 0 +#define CCE_RGR_BRIDGE_REVISION_MINOR_BITS 8 +#define CCE_RGR_BRIDGE_REVISION_MINOR_SHIFT 0 + + +/**************************************************************************** + * CCE_RGR_BRIDGE :: CTRL + ***************************************************************************/ +/* CCE_RGR_BRIDGE :: CTRL :: reserved0 [31:02] */ +#define CCE_RGR_BRIDGE_CTRL_reserved0_MASK 0xfffffffc +#define CCE_RGR_BRIDGE_CTRL_reserved0_ALIGN 0 +#define CCE_RGR_BRIDGE_CTRL_reserved0_BITS 30 +#define CCE_RGR_BRIDGE_CTRL_reserved0_SHIFT 2 + +/* CCE_RGR_BRIDGE :: CTRL :: rbus_error_intr [01:01] */ +#define CCE_RGR_BRIDGE_CTRL_rbus_error_intr_MASK 0x00000002 +#define CCE_RGR_BRIDGE_CTRL_rbus_error_intr_ALIGN 0 +#define CCE_RGR_BRIDGE_CTRL_rbus_error_intr_BITS 1 +#define CCE_RGR_BRIDGE_CTRL_rbus_error_intr_SHIFT 1 +#define CCE_RGR_BRIDGE_CTRL_rbus_error_intr_INTR_DISABLE 0 +#define CCE_RGR_BRIDGE_CTRL_rbus_error_intr_INTR_ENABLE 1 + +/* CCE_RGR_BRIDGE :: CTRL :: gisb_error_intr [00:00] */ +#define CCE_RGR_BRIDGE_CTRL_gisb_error_intr_MASK 0x00000001 +#define CCE_RGR_BRIDGE_CTRL_gisb_error_intr_ALIGN 0 +#define CCE_RGR_BRIDGE_CTRL_gisb_error_intr_BITS 1 +#define CCE_RGR_BRIDGE_CTRL_gisb_error_intr_SHIFT 0 +#define CCE_RGR_BRIDGE_CTRL_gisb_error_intr_INTR_DISABLE 0 +#define CCE_RGR_BRIDGE_CTRL_gisb_error_intr_INTR_ENABLE 1 + + +/**************************************************************************** + * CCE_RGR_BRIDGE :: RBUS_TIMER + ***************************************************************************/ +/* CCE_RGR_BRIDGE :: RBUS_TIMER :: reserved0 [31:16] */ +#define CCE_RGR_BRIDGE_RBUS_TIMER_reserved0_MASK 0xffff0000 +#define CCE_RGR_BRIDGE_RBUS_TIMER_reserved0_ALIGN 0 +#define CCE_RGR_BRIDGE_RBUS_TIMER_reserved0_BITS 16 +#define CCE_RGR_BRIDGE_RBUS_TIMER_reserved0_SHIFT 16 + +/* CCE_RGR_BRIDGE :: RBUS_TIMER :: timer_value [15:00] */ +#define CCE_RGR_BRIDGE_RBUS_TIMER_timer_value_MASK 0x0000ffff +#define CCE_RGR_BRIDGE_RBUS_TIMER_timer_value_ALIGN 0 +#define CCE_RGR_BRIDGE_RBUS_TIMER_timer_value_BITS 16 +#define CCE_RGR_BRIDGE_RBUS_TIMER_timer_value_SHIFT 0 + + +/**************************************************************************** + * CCE_RGR_BRIDGE :: SPARE_SW_RESET_0 + ***************************************************************************/ +/* CCE_RGR_BRIDGE :: SPARE_SW_RESET_0 :: reserved0 [31:01] */ +#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_MASK 0xfffffffe +#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_ALIGN 0 +#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_BITS 31 +#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_SHIFT 1 + +/* CCE_RGR_BRIDGE :: SPARE_SW_RESET_0 :: SPARE_SW_RESET [00:00] */ +#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_MASK 0x00000001 +#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ALIGN 0 +#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_BITS 1 +#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_SHIFT 0 +#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_DEASSERT 0 +#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ASSERT 1 + + +/**************************************************************************** + * CCE_RGR_BRIDGE :: SPARE_SW_RESET_1 + ***************************************************************************/ +/* CCE_RGR_BRIDGE :: SPARE_SW_RESET_1 :: reserved0 [31:01] */ +#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_MASK 0xfffffffe +#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_ALIGN 0 +#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_BITS 31 +#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_SHIFT 1 + +/* CCE_RGR_BRIDGE :: SPARE_SW_RESET_1 :: SPARE_SW_RESET [00:00] */ +#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_MASK 0x00000001 +#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ALIGN 0 +#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_BITS 1 +#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_SHIFT 0 +#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_DEASSERT 0 +#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ASSERT 1 + + +/**************************************************************************** + * Datatype Definitions. + ***************************************************************************/ +#endif /* #ifndef MACFILE_H__ */ + +/* End of File */ + diff --git a/drivers/staging/crystalhd/crystalhd_cmds.c b/drivers/staging/crystalhd/crystalhd_cmds.c new file mode 100644 index 000000000000..39c641d6b672 --- /dev/null +++ b/drivers/staging/crystalhd/crystalhd_cmds.c @@ -0,0 +1,1058 @@ +/*************************************************************************** + * Copyright (c) 2005-2009, Broadcom Corporation. + * + * Name: crystalhd_cmds . c + * + * Description: + * BCM70010 Linux driver user command interfaces. + * + * HISTORY: + * + ********************************************************************** + * This file is part of the crystalhd device driver. + * + * This driver is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 2 of the License. + * + * This driver is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this driver. If not, see . + **********************************************************************/ + +#include "crystalhd_cmds.h" +#include "crystalhd_hw.h" + +static struct crystalhd_user *bc_cproc_get_uid(struct crystalhd_cmd *ctx) +{ + struct crystalhd_user *user = NULL; + int i; + + for (i = 0; i < BC_LINK_MAX_OPENS; i++) { + if (!ctx->user[i].in_use) { + user = &ctx->user[i]; + break; + } + } + + return user; +} + +static int bc_cproc_get_user_count(struct crystalhd_cmd *ctx) +{ + int i, count = 0; + + for (i = 0; i < BC_LINK_MAX_OPENS; i++) { + if (ctx->user[i].in_use) + count++; + } + + return count; +} + +static void bc_cproc_mark_pwr_state(struct crystalhd_cmd *ctx) +{ + int i; + + for (i = 0; i < BC_LINK_MAX_OPENS; i++) { + if (!ctx->user[i].in_use) + continue; + if (ctx->user[i].mode == DTS_DIAG_MODE || + ctx->user[i].mode == DTS_PLAYBACK_MODE) { + ctx->pwr_state_change = 1; + break; + } + } +} + +static BC_STATUS bc_cproc_notify_mode(struct crystalhd_cmd *ctx, + crystalhd_ioctl_data *idata) +{ + int rc = 0, i = 0; + + if (!ctx || !idata) { + BCMLOG_ERR("Invalid Arg!!\n"); + return BC_STS_INV_ARG; + } + + if (ctx->user[idata->u_id].mode != DTS_MODE_INV) { + BCMLOG_ERR("Close the handle first..\n"); + return BC_STS_ERR_USAGE; + } + if (idata->udata.u.NotifyMode.Mode == DTS_MONITOR_MODE) { + ctx->user[idata->u_id].mode = idata->udata.u.NotifyMode.Mode; + return BC_STS_SUCCESS; + } + if (ctx->state != BC_LINK_INVALID) { + BCMLOG_ERR("Link invalid state %d \n", ctx->state); + return BC_STS_ERR_USAGE; + } + /* Check for duplicate playback sessions..*/ + for (i = 0; i < BC_LINK_MAX_OPENS; i++) { + if (ctx->user[i].mode == DTS_DIAG_MODE || + ctx->user[i].mode == DTS_PLAYBACK_MODE) { + BCMLOG_ERR("multiple playback sessions are not " + "supported..\n"); + return BC_STS_ERR_USAGE; + } + } + ctx->cin_wait_exit = 0; + ctx->user[idata->u_id].mode = idata->udata.u.NotifyMode.Mode; + /* Setup mmap pool for uaddr sgl mapping..*/ + rc = crystalhd_create_dio_pool(ctx->adp, BC_LINK_MAX_SGLS); + if (rc) + return BC_STS_ERROR; + + /* Setup Hardware DMA rings */ + return crystalhd_hw_setup_dma_rings(&ctx->hw_ctx); +} + +static BC_STATUS bc_cproc_get_version(struct crystalhd_cmd *ctx, + crystalhd_ioctl_data *idata) +{ + + if (!ctx || !idata) { + BCMLOG_ERR("Invalid Arg!!\n"); + return BC_STS_INV_ARG; + } + idata->udata.u.VerInfo.DriverMajor = crystalhd_kmod_major; + idata->udata.u.VerInfo.DriverMinor = crystalhd_kmod_minor; + idata->udata.u.VerInfo.DriverRevision = crystalhd_kmod_rev; + return BC_STS_SUCCESS; +} + + +static BC_STATUS bc_cproc_get_hwtype(struct crystalhd_cmd *ctx, crystalhd_ioctl_data *idata) +{ + if (!ctx || !idata) { + BCMLOG_ERR("Invalid Arg!!\n"); + return BC_STS_INV_ARG; + } + + crystalhd_pci_cfg_rd(ctx->adp, 0, 2, + (uint32_t *)&idata->udata.u.hwType.PciVenId); + crystalhd_pci_cfg_rd(ctx->adp, 2, 2, + (uint32_t *)&idata->udata.u.hwType.PciDevId); + crystalhd_pci_cfg_rd(ctx->adp, 8, 1, + (uint32_t *)&idata->udata.u.hwType.HwRev); + + return BC_STS_SUCCESS; +} + +static BC_STATUS bc_cproc_reg_rd(struct crystalhd_cmd *ctx, + crystalhd_ioctl_data *idata) +{ + if (!ctx || !idata) + return BC_STS_INV_ARG; + idata->udata.u.regAcc.Value = bc_dec_reg_rd(ctx->adp, + idata->udata.u.regAcc.Offset); + return BC_STS_SUCCESS; +} + +static BC_STATUS bc_cproc_reg_wr(struct crystalhd_cmd *ctx, + crystalhd_ioctl_data *idata) +{ + if (!ctx || !idata) + return BC_STS_INV_ARG; + + bc_dec_reg_wr(ctx->adp, idata->udata.u.regAcc.Offset, + idata->udata.u.regAcc.Value); + + return BC_STS_SUCCESS; +} + +static BC_STATUS bc_cproc_link_reg_rd(struct crystalhd_cmd *ctx, + crystalhd_ioctl_data *idata) +{ + if (!ctx || !idata) + return BC_STS_INV_ARG; + + idata->udata.u.regAcc.Value = crystalhd_reg_rd(ctx->adp, + idata->udata.u.regAcc.Offset); + return BC_STS_SUCCESS; +} + +static BC_STATUS bc_cproc_link_reg_wr(struct crystalhd_cmd *ctx, + crystalhd_ioctl_data *idata) +{ + if (!ctx || !idata) + return BC_STS_INV_ARG; + + crystalhd_reg_wr(ctx->adp, idata->udata.u.regAcc.Offset, + idata->udata.u.regAcc.Value); + + return BC_STS_SUCCESS; +} + +static BC_STATUS bc_cproc_mem_rd(struct crystalhd_cmd *ctx, + crystalhd_ioctl_data *idata) +{ + BC_STATUS sts = BC_STS_SUCCESS; + + if (!ctx || !idata || !idata->add_cdata) + return BC_STS_INV_ARG; + + if (idata->udata.u.devMem.NumDwords > (idata->add_cdata_sz / 4)) { + BCMLOG_ERR("insufficient buffer\n"); + return BC_STS_INV_ARG; + } + sts = crystalhd_mem_rd(ctx->adp, idata->udata.u.devMem.StartOff, + idata->udata.u.devMem.NumDwords, + (uint32_t *)idata->add_cdata); + return sts; + +} + +static BC_STATUS bc_cproc_mem_wr(struct crystalhd_cmd *ctx, + crystalhd_ioctl_data *idata) +{ + BC_STATUS sts = BC_STS_SUCCESS; + + if (!ctx || !idata || !idata->add_cdata) + return BC_STS_INV_ARG; + + if (idata->udata.u.devMem.NumDwords > (idata->add_cdata_sz / 4)) { + BCMLOG_ERR("insufficient buffer\n"); + return BC_STS_INV_ARG; + } + + sts = crystalhd_mem_wr(ctx->adp, idata->udata.u.devMem.StartOff, + idata->udata.u.devMem.NumDwords, + (uint32_t *)idata->add_cdata); + return sts; +} + +static BC_STATUS bc_cproc_cfg_rd(struct crystalhd_cmd *ctx, + crystalhd_ioctl_data *idata) +{ + uint32_t ix, cnt, off, len; + BC_STATUS sts = BC_STS_SUCCESS; + uint32_t *temp; + + if (!ctx || !idata) + return BC_STS_INV_ARG; + + temp = (uint32_t *) idata->udata.u.pciCfg.pci_cfg_space; + off = idata->udata.u.pciCfg.Offset; + len = idata->udata.u.pciCfg.Size; + + if (len <= 4) + return crystalhd_pci_cfg_rd(ctx->adp, off, len, temp); + + /* Truncate to dword alignment..*/ + len = 4; + cnt = idata->udata.u.pciCfg.Size / len; + for (ix = 0; ix < cnt; ix++) { + sts = crystalhd_pci_cfg_rd(ctx->adp, off, len, &temp[ix]); + if (sts != BC_STS_SUCCESS) { + BCMLOG_ERR("config read : %d\n", sts); + return sts; + } + off += len; + } + + return sts; +} + +static BC_STATUS bc_cproc_cfg_wr(struct crystalhd_cmd *ctx, + crystalhd_ioctl_data *idata) +{ + uint32_t ix, cnt, off, len; + BC_STATUS sts = BC_STS_SUCCESS; + uint32_t *temp; + + if (!ctx || !idata) + return BC_STS_INV_ARG; + + temp = (uint32_t *) idata->udata.u.pciCfg.pci_cfg_space; + off = idata->udata.u.pciCfg.Offset; + len = idata->udata.u.pciCfg.Size; + + if (len <= 4) + return crystalhd_pci_cfg_wr(ctx->adp, off, len, temp[0]); + + /* Truncate to dword alignment..*/ + len = 4; + cnt = idata->udata.u.pciCfg.Size / len; + for (ix = 0; ix < cnt; ix++) { + sts = crystalhd_pci_cfg_wr(ctx->adp, off, len, temp[ix]); + if (sts != BC_STS_SUCCESS) { + BCMLOG_ERR("config write : %d\n", sts); + return sts; + } + off += len; + } + + return sts; +} + +static BC_STATUS bc_cproc_download_fw(struct crystalhd_cmd *ctx, + crystalhd_ioctl_data *idata) +{ + BC_STATUS sts = BC_STS_SUCCESS; + + if (!ctx || !idata || !idata->add_cdata || !idata->add_cdata_sz) { + BCMLOG_ERR("Invalid Arg!!\n"); + return BC_STS_INV_ARG; + } + + if (ctx->state != BC_LINK_INVALID) { + BCMLOG_ERR("Link invalid state %d \n", ctx->state); + return BC_STS_ERR_USAGE; + } + + sts = crystalhd_download_fw(ctx->adp, (uint8_t *)idata->add_cdata, + idata->add_cdata_sz); + + if (sts != BC_STS_SUCCESS) { + BCMLOG_ERR("Firmware Download Failure!! - %d\n", sts); + } else + ctx->state |= BC_LINK_INIT; + + return sts; +} + +/* + * We use the FW_CMD interface to sync up playback state with application + * and firmware. This function will perform the required pre and post + * processing of the Firmware commands. + * + * Pause - + * Disable capture after decoder pause. + * Resume - + * First enable capture and issue decoder resume command. + * Flush - + * Abort pending input transfers and issue decoder flush command. + * + */ +static BC_STATUS bc_cproc_do_fw_cmd(struct crystalhd_cmd *ctx, crystalhd_ioctl_data *idata) +{ + BC_STATUS sts; + uint32_t *cmd; + + if (!(ctx->state & BC_LINK_INIT)) { + BCMLOG_ERR("Link invalid state %d \n", ctx->state); + return BC_STS_ERR_USAGE; + } + + cmd = idata->udata.u.fwCmd.cmd; + + /* Pre-Process */ + if (cmd[0] == eCMD_C011_DEC_CHAN_PAUSE) { + if (!cmd[3]) { + ctx->state &= ~BC_LINK_PAUSED; + crystalhd_hw_unpause(&ctx->hw_ctx); + } + } else if (cmd[0] == eCMD_C011_DEC_CHAN_FLUSH) { + BCMLOG(BCMLOG_INFO, "Flush issued\n"); + if (cmd[3]) + ctx->cin_wait_exit = 1; + } + + sts = crystalhd_do_fw_cmd(&ctx->hw_ctx, &idata->udata.u.fwCmd); + + if (sts != BC_STS_SUCCESS) { + BCMLOG(BCMLOG_INFO, "fw cmd %x failed\n", cmd[0]); + return sts; + } + + /* Post-Process */ + if (cmd[0] == eCMD_C011_DEC_CHAN_PAUSE) { + if (cmd[3]) { + ctx->state |= BC_LINK_PAUSED; + crystalhd_hw_pause(&ctx->hw_ctx); + } + } + + return sts; +} + +static void bc_proc_in_completion(crystalhd_dio_req *dio_hnd, + wait_queue_head_t *event, BC_STATUS sts) +{ + if (!dio_hnd || !event) { + BCMLOG_ERR("Invalid Arg!!\n"); + return; + } + if (sts == BC_STS_IO_USER_ABORT) + return; + + dio_hnd->uinfo.comp_sts = sts; + dio_hnd->uinfo.ev_sts = 1; + crystalhd_set_event(event); +} + +static BC_STATUS bc_cproc_codein_sleep(struct crystalhd_cmd *ctx) +{ + wait_queue_head_t sleep_ev; + int rc = 0; + + if (ctx->state & BC_LINK_SUSPEND) + return BC_STS_IO_USER_ABORT; + + if (ctx->cin_wait_exit) { + ctx->cin_wait_exit = 0; + return BC_STS_CMD_CANCELLED; + } + crystalhd_create_event(&sleep_ev); + crystalhd_wait_on_event(&sleep_ev, 0, 100, rc, 0); + if (rc == -EINTR) + return BC_STS_IO_USER_ABORT; + + return BC_STS_SUCCESS; +} + +static BC_STATUS bc_cproc_hw_txdma(struct crystalhd_cmd *ctx, + crystalhd_ioctl_data *idata, + crystalhd_dio_req *dio) +{ + uint32_t tx_listid = 0; + BC_STATUS sts = BC_STS_SUCCESS; + wait_queue_head_t event; + int rc = 0; + + if (!ctx || !idata || !dio) { + BCMLOG_ERR("Invalid Arg!!\n"); + return BC_STS_INV_ARG; + } + + crystalhd_create_event(&event); + + ctx->tx_list_id = 0; + /* msleep_interruptible(2000); */ + sts = crystalhd_hw_post_tx(&ctx->hw_ctx, dio, bc_proc_in_completion, + &event, &tx_listid, + idata->udata.u.ProcInput.Encrypted); + + while (sts == BC_STS_BUSY) { + sts = bc_cproc_codein_sleep(ctx); + if (sts != BC_STS_SUCCESS) + break; + sts = crystalhd_hw_post_tx(&ctx->hw_ctx, dio, + bc_proc_in_completion, + &event, &tx_listid, + idata->udata.u.ProcInput.Encrypted); + } + if (sts != BC_STS_SUCCESS) { + BCMLOG(BCMLOG_DBG, "_hw_txdma returning sts:%d\n", sts); + return sts; + } + if (ctx->cin_wait_exit) + ctx->cin_wait_exit = 0; + + ctx->tx_list_id = tx_listid; + + /* _post() succeeded.. wait for the completion. */ + crystalhd_wait_on_event(&event, (dio->uinfo.ev_sts), 3000, rc, 0); + ctx->tx_list_id = 0; + if (!rc) { + return dio->uinfo.comp_sts; + } else if (rc == -EBUSY) { + BCMLOG(BCMLOG_DBG, "_tx_post() T/O \n"); + sts = BC_STS_TIMEOUT; + } else if (rc == -EINTR) { + BCMLOG(BCMLOG_DBG, "Tx Wait Signal int.\n"); + sts = BC_STS_IO_USER_ABORT; + } else { + sts = BC_STS_IO_ERROR; + } + + /* We are cancelling the IO from the same context as the _post(). + * so no need to wait on the event again.. the return itself + * ensures the release of our resources. + */ + crystalhd_hw_cancel_tx(&ctx->hw_ctx, tx_listid); + + return sts; +} + +/* Helper function to check on user buffers */ +static BC_STATUS bc_cproc_check_inbuffs(bool pin, void *ubuff, uint32_t ub_sz, + uint32_t uv_off, bool en_422) +{ + if (!ubuff || !ub_sz) { + BCMLOG_ERR("%s->Invalid Arg %p %x\n", + ((pin) ? "TX" : "RX"), ubuff, ub_sz); + return BC_STS_INV_ARG; + } + + /* Check for alignment */ + if (((uintptr_t)ubuff) & 0x03) { + BCMLOG_ERR("%s-->Un-aligned address not implemented yet.. %p \n", + ((pin) ? "TX" : "RX"), ubuff); + return BC_STS_NOT_IMPL; + } + if (pin) + return BC_STS_SUCCESS; + + if (!en_422 && !uv_off) { + BCMLOG_ERR("Need UV offset for 420 mode.\n"); + return BC_STS_INV_ARG; + } + + if (en_422 && uv_off) { + BCMLOG_ERR("UV offset in 422 mode ??\n"); + return BC_STS_INV_ARG; + } + + return BC_STS_SUCCESS; +} + +static BC_STATUS bc_cproc_proc_input(struct crystalhd_cmd *ctx, crystalhd_ioctl_data *idata) +{ + void *ubuff; + uint32_t ub_sz; + crystalhd_dio_req *dio_hnd = NULL; + BC_STATUS sts = BC_STS_SUCCESS; + + if (!ctx || !idata) { + BCMLOG_ERR("Invalid Arg!!\n"); + return BC_STS_INV_ARG; + } + + ubuff = idata->udata.u.ProcInput.pDmaBuff; + ub_sz = idata->udata.u.ProcInput.BuffSz; + + sts = bc_cproc_check_inbuffs(1, ubuff, ub_sz, 0, 0); + if (sts != BC_STS_SUCCESS) + return sts; + + sts = crystalhd_map_dio(ctx->adp, ubuff, ub_sz, 0, 0, 1, &dio_hnd); + if (sts != BC_STS_SUCCESS) { + BCMLOG_ERR("dio map - %d \n", sts); + return sts; + } + + if (!dio_hnd) + return BC_STS_ERROR; + + sts = bc_cproc_hw_txdma(ctx, idata, dio_hnd); + + crystalhd_unmap_dio(ctx->adp, dio_hnd); + + return sts; +} + +static BC_STATUS bc_cproc_add_cap_buff(struct crystalhd_cmd *ctx, + crystalhd_ioctl_data *idata) +{ + void *ubuff; + uint32_t ub_sz, uv_off; + bool en_422; + crystalhd_dio_req *dio_hnd = NULL; + BC_STATUS sts = BC_STS_SUCCESS; + + if (!ctx || !idata) { + BCMLOG_ERR("Invalid Arg!!\n"); + return BC_STS_INV_ARG; + } + + ubuff = idata->udata.u.RxBuffs.YuvBuff; + ub_sz = idata->udata.u.RxBuffs.YuvBuffSz; + uv_off = idata->udata.u.RxBuffs.UVbuffOffset; + en_422 = idata->udata.u.RxBuffs.b422Mode; + + sts = bc_cproc_check_inbuffs(0, ubuff, ub_sz, uv_off, en_422); + if (sts != BC_STS_SUCCESS) + return sts; + + sts = crystalhd_map_dio(ctx->adp, ubuff, ub_sz, uv_off, + en_422, 0, &dio_hnd); + if (sts != BC_STS_SUCCESS) { + BCMLOG_ERR("dio map - %d \n", sts); + return sts; + } + + if (!dio_hnd) + return BC_STS_ERROR; + + sts = crystalhd_hw_add_cap_buffer(&ctx->hw_ctx, dio_hnd, (ctx->state == BC_LINK_READY)); + if ((sts != BC_STS_SUCCESS) && (sts != BC_STS_BUSY)) { + crystalhd_unmap_dio(ctx->adp, dio_hnd); + return sts; + } + + return BC_STS_SUCCESS; +} + +static BC_STATUS bc_cproc_fmt_change(struct crystalhd_cmd *ctx, + crystalhd_dio_req *dio) +{ + BC_STATUS sts = BC_STS_SUCCESS; + + sts = crystalhd_hw_add_cap_buffer(&ctx->hw_ctx, dio, 0); + if (sts != BC_STS_SUCCESS) + return sts; + + ctx->state |= BC_LINK_FMT_CHG; + if (ctx->state == BC_LINK_READY) + sts = crystalhd_hw_start_capture(&ctx->hw_ctx); + + return sts; +} + +static BC_STATUS bc_cproc_fetch_frame(struct crystalhd_cmd *ctx, + crystalhd_ioctl_data *idata) +{ + crystalhd_dio_req *dio = NULL; + BC_STATUS sts = BC_STS_SUCCESS; + BC_DEC_OUT_BUFF *frame; + + if (!ctx || !idata) { + BCMLOG_ERR("Invalid Arg!!\n"); + return BC_STS_INV_ARG; + } + + if (!(ctx->state & BC_LINK_CAP_EN)) { + BCMLOG(BCMLOG_DBG, "Capture not enabled..%x\n", ctx->state); + return BC_STS_ERR_USAGE; + } + + frame = &idata->udata.u.DecOutData; + + sts = crystalhd_hw_get_cap_buffer(&ctx->hw_ctx, &frame->PibInfo, &dio); + if (sts != BC_STS_SUCCESS) + return (ctx->state & BC_LINK_SUSPEND) ? BC_STS_IO_USER_ABORT : sts; + + frame->Flags = dio->uinfo.comp_flags; + + if (frame->Flags & COMP_FLAG_FMT_CHANGE) + return bc_cproc_fmt_change(ctx, dio); + + frame->OutPutBuffs.YuvBuff = dio->uinfo.xfr_buff; + frame->OutPutBuffs.YuvBuffSz = dio->uinfo.xfr_len; + frame->OutPutBuffs.UVbuffOffset = dio->uinfo.uv_offset; + frame->OutPutBuffs.b422Mode = dio->uinfo.b422mode; + + frame->OutPutBuffs.YBuffDoneSz = dio->uinfo.y_done_sz; + frame->OutPutBuffs.UVBuffDoneSz = dio->uinfo.uv_done_sz; + + crystalhd_unmap_dio(ctx->adp, dio); + + return BC_STS_SUCCESS; +} + +static BC_STATUS bc_cproc_start_capture(struct crystalhd_cmd *ctx, + crystalhd_ioctl_data *idata) +{ + ctx->state |= BC_LINK_CAP_EN; + if (ctx->state == BC_LINK_READY) + return crystalhd_hw_start_capture(&ctx->hw_ctx); + + return BC_STS_SUCCESS; +} + +static BC_STATUS bc_cproc_flush_cap_buffs(struct crystalhd_cmd *ctx, + crystalhd_ioctl_data *idata) +{ + crystalhd_dio_req *dio = NULL; + BC_STATUS sts = BC_STS_SUCCESS; + BC_DEC_OUT_BUFF *frame; + uint32_t count; + + if (!ctx || !idata) { + BCMLOG_ERR("Invalid Arg!!\n"); + return BC_STS_INV_ARG; + } + + if (!(ctx->state & BC_LINK_CAP_EN)) + return BC_STS_ERR_USAGE; + + /* We should ack flush even when we are in paused/suspend state */ + if (!(ctx->state & BC_LINK_READY)) + return crystalhd_hw_stop_capture(&ctx->hw_ctx); + + ctx->state &= ~(BC_LINK_CAP_EN|BC_LINK_FMT_CHG); + + frame = &idata->udata.u.DecOutData; + for (count = 0; count < BC_RX_LIST_CNT; count++) { + + sts = crystalhd_hw_get_cap_buffer(&ctx->hw_ctx, &frame->PibInfo, &dio); + if (sts != BC_STS_SUCCESS) + break; + + crystalhd_unmap_dio(ctx->adp, dio); + } + + return crystalhd_hw_stop_capture(&ctx->hw_ctx); +} + +static BC_STATUS bc_cproc_get_stats(struct crystalhd_cmd *ctx, + crystalhd_ioctl_data *idata) +{ + BC_DTS_STATS *stats; + struct crystalhd_hw_stats hw_stats; + + if (!ctx || !idata) { + BCMLOG_ERR("Invalid Arg!!\n"); + return BC_STS_INV_ARG; + } + + crystalhd_hw_stats(&ctx->hw_ctx, &hw_stats); + + stats = &idata->udata.u.drvStat; + stats->drvRLL = hw_stats.rdyq_count; + stats->drvFLL = hw_stats.freeq_count; + stats->DrvTotalFrmDropped = hw_stats.rx_errors; + stats->DrvTotalHWErrs = hw_stats.rx_errors + hw_stats.tx_errors; + stats->intCount = hw_stats.num_interrupts; + stats->DrvIgnIntrCnt = hw_stats.num_interrupts - + hw_stats.dev_interrupts; + stats->TxFifoBsyCnt = hw_stats.cin_busy; + stats->pauseCount = hw_stats.pause_cnt; + + if (ctx->pwr_state_change) + stats->pwr_state_change = 1; + if (ctx->state & BC_LINK_PAUSED) + stats->DrvPauseTime = 1; + + return BC_STS_SUCCESS; +} + +static BC_STATUS bc_cproc_reset_stats(struct crystalhd_cmd *ctx, + crystalhd_ioctl_data *idata) +{ + crystalhd_hw_stats(&ctx->hw_ctx, NULL); + + return BC_STS_SUCCESS; +} + +static BC_STATUS bc_cproc_chg_clk(struct crystalhd_cmd *ctx, + crystalhd_ioctl_data *idata) +{ + BC_CLOCK *clock; + uint32_t oldClk; + BC_STATUS sts = BC_STS_SUCCESS; + + if (!ctx || !idata) { + BCMLOG_ERR("Invalid Arg!!\n"); + return BC_STS_INV_ARG; + } + + clock = &idata->udata.u.clockValue; + oldClk = ctx->hw_ctx.core_clock_mhz; + ctx->hw_ctx.core_clock_mhz = clock->clk; + + if (ctx->state & BC_LINK_READY) { + sts = crystalhd_hw_set_core_clock(&ctx->hw_ctx); + if (sts == BC_STS_CLK_NOCHG) + ctx->hw_ctx.core_clock_mhz = oldClk; + } + + clock->clk = ctx->hw_ctx.core_clock_mhz; + + return sts; +} + +/*=============== Cmd Proc Table.. ======================================*/ +static const crystalhd_cmd_tbl_t g_crystalhd_cproc_tbl[] = { + { BCM_IOC_GET_VERSION, bc_cproc_get_version, 0}, + { BCM_IOC_GET_HWTYPE, bc_cproc_get_hwtype, 0}, + { BCM_IOC_REG_RD, bc_cproc_reg_rd, 0}, + { BCM_IOC_REG_WR, bc_cproc_reg_wr, 0}, + { BCM_IOC_FPGA_RD, bc_cproc_link_reg_rd, 0}, + { BCM_IOC_FPGA_WR, bc_cproc_link_reg_wr, 0}, + { BCM_IOC_MEM_RD, bc_cproc_mem_rd, 0}, + { BCM_IOC_MEM_WR, bc_cproc_mem_wr, 0}, + { BCM_IOC_RD_PCI_CFG, bc_cproc_cfg_rd, 0}, + { BCM_IOC_WR_PCI_CFG, bc_cproc_cfg_wr, 1}, + { BCM_IOC_FW_DOWNLOAD, bc_cproc_download_fw, 1}, + { BCM_IOC_FW_CMD, bc_cproc_do_fw_cmd, 1}, + { BCM_IOC_PROC_INPUT, bc_cproc_proc_input, 1}, + { BCM_IOC_ADD_RXBUFFS, bc_cproc_add_cap_buff, 1}, + { BCM_IOC_FETCH_RXBUFF, bc_cproc_fetch_frame, 1}, + { BCM_IOC_START_RX_CAP, bc_cproc_start_capture, 1}, + { BCM_IOC_FLUSH_RX_CAP, bc_cproc_flush_cap_buffs, 1}, + { BCM_IOC_GET_DRV_STAT, bc_cproc_get_stats, 0}, + { BCM_IOC_RST_DRV_STAT, bc_cproc_reset_stats, 0}, + { BCM_IOC_NOTIFY_MODE, bc_cproc_notify_mode, 0}, + { BCM_IOC_CHG_CLK, bc_cproc_chg_clk, 0}, + { BCM_IOC_END, NULL}, +}; + +/*=============== Cmd Proc Functions.. ===================================*/ + +/** + * crystalhd_suspend - Power management suspend request. + * @ctx: Command layer context. + * @idata: Iodata - required for internal use. + * + * Return: + * status + * + * 1. Set the state to Suspend. + * 2. Flush the Rx Buffers it will unmap all the buffers and + * stop the RxDMA engine. + * 3. Cancel The TX Io and Stop Dma Engine. + * 4. Put the DDR in to deep sleep. + * 5. Stop the hardware putting it in to Reset State. + * + * Current gstreamer frame work does not provide any power management + * related notification to user mode decoder plug-in. As a work-around + * we pass on the power mangement notification to our plug-in by completing + * all outstanding requests with BC_STS_IO_USER_ABORT return code. + */ +BC_STATUS crystalhd_suspend(struct crystalhd_cmd *ctx, crystalhd_ioctl_data *idata) +{ + BC_STATUS sts = BC_STS_SUCCESS; + + if (!ctx || !idata) { + BCMLOG_ERR("Invalid Parameters\n"); + return BC_STS_ERROR; + } + + if (ctx->state & BC_LINK_SUSPEND) + return BC_STS_SUCCESS; + + if (ctx->state == BC_LINK_INVALID) { + BCMLOG(BCMLOG_DBG, "Nothing To Do Suspend Success\n"); + return BC_STS_SUCCESS; + } + + ctx->state |= BC_LINK_SUSPEND; + + bc_cproc_mark_pwr_state(ctx); + + if (ctx->state & BC_LINK_CAP_EN) { + sts = bc_cproc_flush_cap_buffs(ctx, idata); + if (sts != BC_STS_SUCCESS) + return sts; + } + + if (ctx->tx_list_id) { + sts = crystalhd_hw_cancel_tx(&ctx->hw_ctx, ctx->tx_list_id); + if (sts != BC_STS_SUCCESS) + return sts; + } + + sts = crystalhd_hw_suspend(&ctx->hw_ctx); + if (sts != BC_STS_SUCCESS) + return sts; + + BCMLOG(BCMLOG_DBG, "BCM70012 suspend success\n"); + + return BC_STS_SUCCESS; +} + +/** + * crystalhd_resume - Resume frame capture. + * @ctx: Command layer contextx. + * + * Return: + * status + * + * + * Resume frame capture. + * + * PM_Resume can't resume the playback state back to pre-suspend state + * because we don't keep video clip related information within driver. + * To get back to the pre-suspend state App will re-open the device and + * start a new playback session from the pre-suspend clip position. + * + */ +BC_STATUS crystalhd_resume(struct crystalhd_cmd *ctx) +{ + BCMLOG(BCMLOG_DBG, "crystalhd_resume Success %x\n", ctx->state); + + bc_cproc_mark_pwr_state(ctx); + + return BC_STS_SUCCESS; +} + +/** + * crystalhd_user_open - Create application handle. + * @ctx: Command layer contextx. + * @user_ctx: User ID context. + * + * Return: + * status + * + * Creates an application specific UID and allocates + * application specific resources. HW layer initialization + * is done for the first open request. + */ +BC_STATUS crystalhd_user_open(struct crystalhd_cmd *ctx, + struct crystalhd_user **user_ctx) +{ + struct crystalhd_user *uc; + + if (!ctx || !user_ctx) { + BCMLOG_ERR("Invalid arg..\n"); + return BC_STS_INV_ARG; + } + + uc = bc_cproc_get_uid(ctx); + if (!uc) { + BCMLOG(BCMLOG_INFO, "No free user context...\n"); + return BC_STS_BUSY; + } + + BCMLOG(BCMLOG_INFO, "Opening new user[%x] handle\n", uc->uid); + + crystalhd_hw_open(&ctx->hw_ctx, ctx->adp); + + uc->in_use = 1; + + *user_ctx = uc; + + return BC_STS_SUCCESS; +} + +/** + * crystalhd_user_close - Close application handle. + * @ctx: Command layer contextx. + * @uc: User ID context. + * + * Return: + * status + * + * Closer aplication handle and release app specific + * resources. + */ +BC_STATUS crystalhd_user_close(struct crystalhd_cmd *ctx, struct crystalhd_user *uc) +{ + uint32_t mode = uc->mode; + + ctx->user[uc->uid].mode = DTS_MODE_INV; + ctx->user[uc->uid].in_use = 0; + ctx->cin_wait_exit = 1; + ctx->pwr_state_change = 0; + + BCMLOG(BCMLOG_INFO, "Closing user[%x] handle\n", uc->uid); + + if ((mode == DTS_DIAG_MODE) || (mode == DTS_PLAYBACK_MODE)) { + crystalhd_hw_free_dma_rings(&ctx->hw_ctx); + crystalhd_destroy_dio_pool(ctx->adp); + } else if (bc_cproc_get_user_count(ctx)) { + return BC_STS_SUCCESS; + } + + crystalhd_hw_close(&ctx->hw_ctx); + + ctx->state = BC_LINK_INVALID; + + return BC_STS_SUCCESS; +} + +/** + * crystalhd_setup_cmd_context - Setup Command layer resources. + * @ctx: Command layer contextx. + * @adp: Adapter context + * + * Return: + * status + * + * Called at the time of driver load. + */ +BC_STATUS crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx, + struct crystalhd_adp *adp) +{ + int i = 0; + + if (!ctx || !adp) { + BCMLOG_ERR("Invalid arg!!\n"); + return BC_STS_INV_ARG; + } + + if (ctx->adp) + BCMLOG(BCMLOG_DBG, "Resetting Cmd context delete missing..\n"); + + ctx->adp = adp; + for (i = 0; i < BC_LINK_MAX_OPENS; i++) { + ctx->user[i].uid = i; + ctx->user[i].in_use = 0; + ctx->user[i].mode = DTS_MODE_INV; + } + + /*Open and Close the Hardware to put it in to sleep state*/ + crystalhd_hw_open(&ctx->hw_ctx, ctx->adp); + crystalhd_hw_close(&ctx->hw_ctx); + return BC_STS_SUCCESS; +} + +/** + * crystalhd_delete_cmd_context - Release Command layer resources. + * @ctx: Command layer contextx. + * + * Return: + * status + * + * Called at the time of driver un-load. + */ +BC_STATUS crystalhd_delete_cmd_context(struct crystalhd_cmd *ctx) +{ + BCMLOG(BCMLOG_DBG, "Deleting Command context..\n"); + + ctx->adp = NULL; + + return BC_STS_SUCCESS; +} + +/** + * crystalhd_get_cmd_proc - Cproc table lookup. + * @ctx: Command layer contextx. + * @cmd: IOCTL command code. + * @uc: User ID context. + * + * Return: + * command proc function pointer + * + * This function checks the process context, application's + * mode of operation and returns the function pointer + * from the cproc table. + */ +crystalhd_cmd_proc crystalhd_get_cmd_proc(struct crystalhd_cmd *ctx, uint32_t cmd, + struct crystalhd_user *uc) +{ + crystalhd_cmd_proc cproc = NULL; + unsigned int i, tbl_sz; + + if (!ctx) { + BCMLOG_ERR("Invalid arg.. Cmd[%d]\n", cmd); + return NULL; + } + + if ((cmd != BCM_IOC_GET_DRV_STAT) && (ctx->state & BC_LINK_SUSPEND)) { + BCMLOG_ERR("Invalid State [suspend Set].. Cmd[%d]\n", cmd); + return NULL; + } + + tbl_sz = sizeof(g_crystalhd_cproc_tbl) / sizeof(crystalhd_cmd_tbl_t); + for (i = 0; i < tbl_sz; i++) { + if (g_crystalhd_cproc_tbl[i].cmd_id == cmd) { + if ((uc->mode == DTS_MONITOR_MODE) && + (g_crystalhd_cproc_tbl[i].block_mon)) { + BCMLOG(BCMLOG_INFO, "Blocking cmd %d \n", cmd); + break; + } + cproc = g_crystalhd_cproc_tbl[i].cmd_proc; + break; + } + } + + return cproc; +} + +/** + * crystalhd_cmd_interrupt - ISR entry point + * @ctx: Command layer contextx. + * + * Return: + * TRUE: If interrupt from bcm70012 device. + * + * + * ISR entry point from OS layer. + */ +bool crystalhd_cmd_interrupt(struct crystalhd_cmd *ctx) +{ + if (!ctx) { + BCMLOG_ERR("Invalid arg..\n"); + return 0; + } + + return crystalhd_hw_interrupt(ctx->adp, &ctx->hw_ctx); +} diff --git a/drivers/staging/crystalhd/crystalhd_cmds.h b/drivers/staging/crystalhd/crystalhd_cmds.h new file mode 100644 index 000000000000..6b290aed8e0b --- /dev/null +++ b/drivers/staging/crystalhd/crystalhd_cmds.h @@ -0,0 +1,88 @@ +/*************************************************************************** + * Copyright (c) 2005-2009, Broadcom Corporation. + * + * Name: crystalhd_cmds . h + * + * Description: + * BCM70010 Linux driver user command interfaces. + * + * HISTORY: + * + ********************************************************************** + * This file is part of the crystalhd device driver. + * + * This driver is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 2 of the License. + * + * This driver is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this driver. If not, see . + **********************************************************************/ + +#ifndef _CRYSTALHD_CMDS_H_ +#define _CRYSTALHD_CMDS_H_ + +/* + * NOTE:: This is the main interface file between the Linux layer + * and the harware layer. This file will use the definitions + * from _dts_glob and dts_defs etc.. which are defined for + * windows. + */ +#include "crystalhd_misc.h" +#include "crystalhd_hw.h" + +enum _crystalhd_state{ + BC_LINK_INVALID = 0x00, + BC_LINK_INIT = 0x01, + BC_LINK_CAP_EN = 0x02, + BC_LINK_FMT_CHG = 0x04, + BC_LINK_SUSPEND = 0x10, + BC_LINK_PAUSED = 0x20, + BC_LINK_READY = (BC_LINK_INIT | BC_LINK_CAP_EN | BC_LINK_FMT_CHG), +}; + +struct crystalhd_user { + uint32_t uid; + uint32_t in_use; + uint32_t mode; +}; + +#define DTS_MODE_INV (-1) + +struct crystalhd_cmd { + uint32_t state; + struct crystalhd_adp *adp; + struct crystalhd_user user[BC_LINK_MAX_OPENS]; + + spinlock_t ctx_lock; + uint32_t tx_list_id; + uint32_t cin_wait_exit; + uint32_t pwr_state_change; + struct crystalhd_hw hw_ctx; +}; + +typedef BC_STATUS (*crystalhd_cmd_proc)(struct crystalhd_cmd *, crystalhd_ioctl_data *); + +typedef struct _crystalhd_cmd_tbl { + uint32_t cmd_id; + const crystalhd_cmd_proc cmd_proc; + uint32_t block_mon; +} crystalhd_cmd_tbl_t; + + +BC_STATUS crystalhd_suspend(struct crystalhd_cmd *ctx, crystalhd_ioctl_data *idata); +BC_STATUS crystalhd_resume(struct crystalhd_cmd *ctx); +crystalhd_cmd_proc crystalhd_get_cmd_proc(struct crystalhd_cmd *ctx, uint32_t cmd, + struct crystalhd_user *uc); +BC_STATUS crystalhd_user_open(struct crystalhd_cmd *ctx, struct crystalhd_user **user_ctx); +BC_STATUS crystalhd_user_close(struct crystalhd_cmd *ctx, struct crystalhd_user *uc); +BC_STATUS crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx, struct crystalhd_adp *adp); +BC_STATUS crystalhd_delete_cmd_context(struct crystalhd_cmd *ctx); +bool crystalhd_cmd_interrupt(struct crystalhd_cmd *ctx); + +#endif diff --git a/drivers/staging/crystalhd/crystalhd_fw_if.h b/drivers/staging/crystalhd/crystalhd_fw_if.h new file mode 100644 index 000000000000..261cd19a0ee7 --- /dev/null +++ b/drivers/staging/crystalhd/crystalhd_fw_if.h @@ -0,0 +1,369 @@ +/*************************************************************************** + * Copyright (c) 2005-2009, Broadcom Corporation. + * + * Name: crystalhd_fw_if . h + * + * Description: + * BCM70012 Firmware interface definitions. + * + * HISTORY: + * + ********************************************************************** + * This file is part of the crystalhd device driver. + * + * This driver is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 2 of the License. + * + * This driver is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this driver. If not, see . + **********************************************************************/ + +#ifndef _CRYSTALHD_FW_IF_H_ +#define _CRYSTALHD_FW_IF_H_ + +/* TBD: Pull in only required defs into this file.. */ + + + +/* User Data Header */ +typedef struct user_data { + struct user_data *next; + uint32_t type; + uint32_t size; +} UD_HDR; + + + +/*------------------------------------------------------* + * MPEG Extension to the PPB * + *------------------------------------------------------*/ +typedef struct { + uint32_t to_be_defined; + uint32_t valid; + + /* Always valid, defaults to picture size if no + sequence display extension in the stream. */ + uint32_t display_horizontal_size; + uint32_t display_vertical_size; + + /* MPEG_VALID_PANSCAN + Offsets are a copy values from the MPEG stream. */ + uint32_t offset_count; + int32_t horizontal_offset[3]; + int32_t vertical_offset[3]; + + /* MPEG_VALID_USERDATA + User data is in the form of a linked list. */ + int32_t userDataSize; + UD_HDR *userData; + +} PPB_MPEG; + + +/*------------------------------------------------------* + * VC1 Extension to the PPB * + *------------------------------------------------------*/ +typedef struct { + uint32_t to_be_defined; + uint32_t valid; + + /* Always valid, defaults to picture size if no + sequence display extension in the stream. */ + uint32_t display_horizontal_size; + uint32_t display_vertical_size; + + /* VC1 pan scan windows */ + uint32_t num_panscan_windows; + int32_t ps_horiz_offset[4]; + int32_t ps_vert_offset[4]; + int32_t ps_width[4]; + int32_t ps_height[4]; + + /* VC1_VALID_USERDATA + User data is in the form of a linked list. */ + int32_t userDataSize; + UD_HDR *userData; + +} PPB_VC1; + +/*------------------------------------------------------* + * H.264 Extension to the PPB * + *------------------------------------------------------*/ + +/** + * @brief Film grain SEI message. + * + * Content of the film grain SEI message. + */ + +/* maximum number of model-values as for Thomson spec(standard says 5) */ +#define MAX_FGT_MODEL_VALUE (3) + +/* maximum number of intervals(as many as 256 intervals?) */ +#define MAX_FGT_VALUE_INTERVAL (256) + +typedef struct FGT_SEI { + struct FGT_SEI *next; + unsigned char model_values[3][MAX_FGT_VALUE_INTERVAL][MAX_FGT_MODEL_VALUE]; + unsigned char upper_bound[3][MAX_FGT_VALUE_INTERVAL]; + unsigned char lower_bound[3][MAX_FGT_VALUE_INTERVAL]; + + unsigned char cancel_flag; /* Cancel flag: 1 no film grain. */ + unsigned char model_id; /* Model id. */ + + /* +unused SE based on Thomson spec */ + unsigned char color_desc_flag; /* Separate color descrition flag. */ + unsigned char bit_depth_luma; /* Bit depth luma minus 8. */ + unsigned char bit_depth_chroma; /* Bit depth chroma minus 8. */ + unsigned char full_range_flag; /* Full range flag. */ + unsigned char color_primaries; /* Color primaries. */ + unsigned char transfer_charact; /* Transfer characteristics. */ + unsigned char matrix_coeff; /*< Matrix coefficients. */ + /* -unused SE based on Thomson spec */ + + unsigned char blending_mode_id; /* Blending mode. */ + unsigned char log2_scale_factor; /* Log2 scale factor (2-7). */ + unsigned char comp_flag[3]; /* Components [0,2] parameters present flag. */ + unsigned char num_intervals_minus1[3]; /* Number of intensity level intervals. */ + unsigned char num_model_values[3]; /* Number of model values. */ + uint16_t repetition_period; /* Repetition period (0-16384) */ + +} FGT_SEI; + +typedef struct { + /* 'valid' specifies which fields (or sets of + * fields) below are valid. If the corresponding + * bit in 'valid' is NOT set then that field(s) + * is (are) not initialized. */ + uint32_t valid; + + int32_t poc_top; /* POC for Top Field/Frame */ + int32_t poc_bottom; /* POC for Bottom Field */ + uint32_t idr_pic_id; + + /* H264_VALID_PANSCAN */ + uint32_t pan_scan_count; + int32_t pan_scan_left[3]; + int32_t pan_scan_right[3]; + int32_t pan_scan_top[3]; + int32_t pan_scan_bottom[3]; + + /* H264_VALID_CT_TYPE */ + uint32_t ct_type_count; + uint32_t ct_type[3]; + + /* H264_VALID_SPS_CROP */ + int32_t sps_crop_left; + int32_t sps_crop_right; + int32_t sps_crop_top; + int32_t sps_crop_bottom; + + /* H264_VALID_VUI */ + uint32_t chroma_top; + uint32_t chroma_bottom; + + /* H264_VALID_USER */ + uint32_t user_data_size; + UD_HDR *user_data; + + /* H264 VALID FGT */ + FGT_SEI *pfgt; + +} PPB_H264; + +typedef struct { + /* Common fields. */ + uint32_t picture_number; /* Ordinal display number */ + uint32_t video_buffer; /* Video (picbuf) number */ + uint32_t video_address; /* Address of picbuf Y */ + uint32_t video_address_uv; /* Address of picbuf UV */ + uint32_t video_stripe; /* Picbuf stripe */ + uint32_t video_width; /* Picbuf width */ + uint32_t video_height; /* Picbuf height */ + + uint32_t channel_id; /* Decoder channel ID */ + uint32_t status; /* reserved */ + uint32_t width; /* pixels */ + uint32_t height; /* pixels */ + uint32_t chroma_format; /* see above */ + uint32_t pulldown; /* see above */ + uint32_t flags; /* see above */ + uint32_t pts; /* 32 LSBs of PTS */ + uint32_t protocol; /* protocolXXX (above) */ + + uint32_t frame_rate; /* see above */ + uint32_t matrix_coeff; /* see above */ + uint32_t aspect_ratio; /* see above */ + uint32_t colour_primaries; /* see above */ + uint32_t transfer_char; /* see above */ + uint32_t pcr_offset; /* 45kHz if PCR type; else 27MHz */ + uint32_t n_drop; /* Number of pictures to be dropped */ + + uint32_t custom_aspect_ratio_width_height; + /* upper 16-bits is Y and lower 16-bits is X */ + + uint32_t picture_tag; /* Indexing tag from BUD packets */ + uint32_t picture_done_payload; + uint32_t picture_meta_payload; + uint32_t reserved[1]; + + /* Protocol-specific extensions. */ + union { + PPB_H264 h264; + PPB_MPEG mpeg; + PPB_VC1 vc1; + } other; + +} PPB; + +typedef struct { + uint32_t bFormatChange; + uint32_t resolution; + uint32_t channelId; + uint32_t ppbPtr; + int32_t ptsStcOffset; + uint32_t zeroPanscanValid; + uint32_t dramOutBufAddr; + uint32_t yComponent; + PPB ppb; + +} C011_PIB; + + + +typedef struct { + uint32_t command; + uint32_t sequence; + uint32_t status; + uint32_t picBuf; + uint32_t picRelBuf; + uint32_t picInfoDeliveryQ; + uint32_t picInfoReleaseQ; + uint32_t channelStatus; + uint32_t userDataDeliveryQ; + uint32_t userDataReleaseQ; + uint32_t transportStreamCaptureAddr; + uint32_t asyncEventQ; + +} DecRspChannelStartVideo; + +#define eCMD_C011_CMD_BASE (0x73763000) + +/* host commands */ +typedef enum { + eCMD_TS_GET_NEXT_PIC = 0x7376F100, /* debug get next picture */ + eCMD_TS_GET_LAST_PIC = 0x7376F102, /* debug get last pic status */ + eCMD_TS_READ_WRITE_MEM = 0x7376F104, /* debug read write memory */ + + /* New API commands */ + /* General commands */ + eCMD_C011_INIT = eCMD_C011_CMD_BASE + 0x01, + eCMD_C011_RESET = eCMD_C011_CMD_BASE + 0x02, + eCMD_C011_SELF_TEST = eCMD_C011_CMD_BASE + 0x03, + eCMD_C011_GET_VERSION = eCMD_C011_CMD_BASE + 0x04, + eCMD_C011_GPIO = eCMD_C011_CMD_BASE + 0x05, + eCMD_C011_DEBUG_SETUP = eCMD_C011_CMD_BASE + 0x06, + + /* Decoding commands */ + eCMD_C011_DEC_CHAN_OPEN = eCMD_C011_CMD_BASE + 0x100, + eCMD_C011_DEC_CHAN_CLOSE = eCMD_C011_CMD_BASE + 0x101, + eCMD_C011_DEC_CHAN_ACTIVATE = eCMD_C011_CMD_BASE + 0x102, + eCMD_C011_DEC_CHAN_STATUS = eCMD_C011_CMD_BASE + 0x103, + eCMD_C011_DEC_CHAN_FLUSH = eCMD_C011_CMD_BASE + 0x104, + eCMD_C011_DEC_CHAN_TRICK_PLAY = eCMD_C011_CMD_BASE + 0x105, + eCMD_C011_DEC_CHAN_TS_PIDS = eCMD_C011_CMD_BASE + 0x106, + eCMD_C011_DEC_CHAN_PS_STREAM_ID = eCMD_C011_CMD_BASE + 0x107, + eCMD_C011_DEC_CHAN_INPUT_PARAMS = eCMD_C011_CMD_BASE + 0x108, + eCMD_C011_DEC_CHAN_VIDEO_OUTPUT = eCMD_C011_CMD_BASE + 0x109, + eCMD_C011_DEC_CHAN_OUTPUT_FORMAT = eCMD_C011_CMD_BASE + 0x10A, + eCMD_C011_DEC_CHAN_SCALING_FILTERS = eCMD_C011_CMD_BASE + 0x10B, + eCMD_C011_DEC_CHAN_OSD_MODE = eCMD_C011_CMD_BASE + 0x10D, + eCMD_C011_DEC_CHAN_DROP = eCMD_C011_CMD_BASE + 0x10E, + eCMD_C011_DEC_CHAN_RELEASE = eCMD_C011_CMD_BASE + 0x10F, + eCMD_C011_DEC_CHAN_STREAM_SETTINGS = eCMD_C011_CMD_BASE + 0x110, + eCMD_C011_DEC_CHAN_PAUSE_OUTPUT = eCMD_C011_CMD_BASE + 0x111, + eCMD_C011_DEC_CHAN_CHANGE = eCMD_C011_CMD_BASE + 0x112, + eCMD_C011_DEC_CHAN_SET_STC = eCMD_C011_CMD_BASE + 0x113, + eCMD_C011_DEC_CHAN_SET_PTS = eCMD_C011_CMD_BASE + 0x114, + eCMD_C011_DEC_CHAN_CC_MODE = eCMD_C011_CMD_BASE + 0x115, + eCMD_C011_DEC_CREATE_AUDIO_CONTEXT = eCMD_C011_CMD_BASE + 0x116, + eCMD_C011_DEC_COPY_AUDIO_CONTEXT = eCMD_C011_CMD_BASE + 0x117, + eCMD_C011_DEC_DELETE_AUDIO_CONTEXT = eCMD_C011_CMD_BASE + 0x118, + eCMD_C011_DEC_CHAN_SET_DECYPTION = eCMD_C011_CMD_BASE + 0x119, + eCMD_C011_DEC_CHAN_START_VIDEO = eCMD_C011_CMD_BASE + 0x11A, + eCMD_C011_DEC_CHAN_STOP_VIDEO = eCMD_C011_CMD_BASE + 0x11B, + eCMD_C011_DEC_CHAN_PIC_CAPTURE = eCMD_C011_CMD_BASE + 0x11C, + eCMD_C011_DEC_CHAN_PAUSE = eCMD_C011_CMD_BASE + 0x11D, + eCMD_C011_DEC_CHAN_PAUSE_STATE = eCMD_C011_CMD_BASE + 0x11E, + eCMD_C011_DEC_CHAN_SET_SLOWM_RATE = eCMD_C011_CMD_BASE + 0x11F, + eCMD_C011_DEC_CHAN_GET_SLOWM_RATE = eCMD_C011_CMD_BASE + 0x120, + eCMD_C011_DEC_CHAN_SET_FF_RATE = eCMD_C011_CMD_BASE + 0x121, + eCMD_C011_DEC_CHAN_GET_FF_RATE = eCMD_C011_CMD_BASE + 0x122, + eCMD_C011_DEC_CHAN_FRAME_ADVANCE = eCMD_C011_CMD_BASE + 0x123, + eCMD_C011_DEC_CHAN_SET_SKIP_PIC_MODE = eCMD_C011_CMD_BASE + 0x124, + eCMD_C011_DEC_CHAN_GET_SKIP_PIC_MODE = eCMD_C011_CMD_BASE + 0x125, + eCMD_C011_DEC_CHAN_FILL_PIC_BUF = eCMD_C011_CMD_BASE + 0x126, + eCMD_C011_DEC_CHAN_SET_CONTINUITY_CHECK = eCMD_C011_CMD_BASE + 0x127, + eCMD_C011_DEC_CHAN_GET_CONTINUITY_CHECK = eCMD_C011_CMD_BASE + 0x128, + eCMD_C011_DEC_CHAN_SET_BRCM_TRICK_MODE = eCMD_C011_CMD_BASE + 0x129, + eCMD_C011_DEC_CHAN_GET_BRCM_TRICK_MODE = eCMD_C011_CMD_BASE + 0x12A, + eCMD_C011_DEC_CHAN_REVERSE_FIELD_STATUS = eCMD_C011_CMD_BASE + 0x12B, + eCMD_C011_DEC_CHAN_I_PICTURE_FOUND = eCMD_C011_CMD_BASE + 0x12C, + eCMD_C011_DEC_CHAN_SET_PARAMETER = eCMD_C011_CMD_BASE + 0x12D, + eCMD_C011_DEC_CHAN_SET_USER_DATA_MODE = eCMD_C011_CMD_BASE + 0x12E, + eCMD_C011_DEC_CHAN_SET_PAUSE_DISPLAY_MODE = eCMD_C011_CMD_BASE + 0x12F, + eCMD_C011_DEC_CHAN_SET_SLOW_DISPLAY_MODE = eCMD_C011_CMD_BASE + 0x130, + eCMD_C011_DEC_CHAN_SET_FF_DISPLAY_MODE = eCMD_C011_CMD_BASE + 0x131, + eCMD_C011_DEC_CHAN_SET_DISPLAY_TIMING_MODE = eCMD_C011_CMD_BASE + 0x132, + eCMD_C011_DEC_CHAN_SET_DISPLAY_MODE = eCMD_C011_CMD_BASE + 0x133, + eCMD_C011_DEC_CHAN_GET_DISPLAY_MODE = eCMD_C011_CMD_BASE + 0x134, + eCMD_C011_DEC_CHAN_SET_REVERSE_FIELD = eCMD_C011_CMD_BASE + 0x135, + eCMD_C011_DEC_CHAN_STREAM_OPEN = eCMD_C011_CMD_BASE + 0x136, + eCMD_C011_DEC_CHAN_SET_PCR_PID = eCMD_C011_CMD_BASE + 0x137, + eCMD_C011_DEC_CHAN_SET_VID_PID = eCMD_C011_CMD_BASE + 0x138, + eCMD_C011_DEC_CHAN_SET_PAN_SCAN_MODE = eCMD_C011_CMD_BASE + 0x139, + eCMD_C011_DEC_CHAN_START_DISPLAY_AT_PTS = eCMD_C011_CMD_BASE + 0x140, + eCMD_C011_DEC_CHAN_STOP_DISPLAY_AT_PTS = eCMD_C011_CMD_BASE + 0x141, + eCMD_C011_DEC_CHAN_SET_DISPLAY_ORDER = eCMD_C011_CMD_BASE + 0x142, + eCMD_C011_DEC_CHAN_GET_DISPLAY_ORDER = eCMD_C011_CMD_BASE + 0x143, + eCMD_C011_DEC_CHAN_SET_HOST_TRICK_MODE = eCMD_C011_CMD_BASE + 0x144, + eCMD_C011_DEC_CHAN_SET_OPERATION_MODE = eCMD_C011_CMD_BASE + 0x145, + eCMD_C011_DEC_CHAN_DISPLAY_PAUSE_UNTO_PTS = eCMD_C011_CMD_BASE + 0x146, + eCMD_C011_DEC_CHAN_SET_PTS_STC_DIFF_THRESHOLD = eCMD_C011_CMD_BASE + 0x147, + eCMD_C011_DEC_CHAN_SEND_COMPRESSED_BUF = eCMD_C011_CMD_BASE + 0x148, + eCMD_C011_DEC_CHAN_SET_CLIPPING = eCMD_C011_CMD_BASE + 0x149, + eCMD_C011_DEC_CHAN_SET_PARAMETERS_FOR_HARD_RESET_INTERRUPT_TO_HOST + = eCMD_C011_CMD_BASE + 0x150, + + /* Decoder RevD commands */ + eCMD_C011_DEC_CHAN_SET_CSC = eCMD_C011_CMD_BASE + 0x180, /* color space conversion */ + eCMD_C011_DEC_CHAN_SET_RANGE_REMAP = eCMD_C011_CMD_BASE + 0x181, + eCMD_C011_DEC_CHAN_SET_FGT = eCMD_C011_CMD_BASE + 0x182, + /* Note: 0x183 not implemented yet in Rev D main */ + eCMD_C011_DEC_CHAN_SET_LASTPICTURE_PADDING = eCMD_C011_CMD_BASE + 0x183, + + /* Decoder 7412 commands (7412-only) */ + eCMD_C011_DEC_CHAN_SET_CONTENT_KEY = eCMD_C011_CMD_BASE + 0x190, + eCMD_C011_DEC_CHAN_SET_SESSION_KEY = eCMD_C011_CMD_BASE + 0x191, + eCMD_C011_DEC_CHAN_FMT_CHANGE_ACK = eCMD_C011_CMD_BASE + 0x192, + + eCMD_C011_DEC_CHAN_CUSTOM_VIDOUT = eCMD_C011_CMD_BASE + 0x1FF, + + /* Encoding commands */ + eCMD_C011_ENC_CHAN_OPEN = eCMD_C011_CMD_BASE + 0x200, + eCMD_C011_ENC_CHAN_CLOSE = eCMD_C011_CMD_BASE + 0x201, + eCMD_C011_ENC_CHAN_ACTIVATE = eCMD_C011_CMD_BASE + 0x202, + eCMD_C011_ENC_CHAN_CONTROL = eCMD_C011_CMD_BASE + 0x203, + eCMD_C011_ENC_CHAN_STATISTICS = eCMD_C011_CMD_BASE + 0x204, + + eNOTIFY_C011_ENC_CHAN_EVENT = eCMD_C011_CMD_BASE + 0x210, + +} eC011_TS_CMD; + +#endif diff --git a/drivers/staging/crystalhd/crystalhd_hw.c b/drivers/staging/crystalhd/crystalhd_hw.c new file mode 100644 index 000000000000..01819d34201a --- /dev/null +++ b/drivers/staging/crystalhd/crystalhd_hw.c @@ -0,0 +1,2395 @@ +/*************************************************************************** + * Copyright (c) 2005-2009, Broadcom Corporation. + * + * Name: crystalhd_hw . c + * + * Description: + * BCM70010 Linux driver HW layer. + * + ********************************************************************** + * This file is part of the crystalhd device driver. + * + * This driver is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 2 of the License. + * + * This driver is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this driver. If not, see . + **********************************************************************/ + +#include +#include +#include "crystalhd_hw.h" + +/* Functions internal to this file */ + +static void crystalhd_enable_uarts(struct crystalhd_adp *adp) +{ + bc_dec_reg_wr(adp, UartSelectA, BSVS_UART_STREAM); + bc_dec_reg_wr(adp, UartSelectB, BSVS_UART_DEC_OUTER); +} + + +static void crystalhd_start_dram(struct crystalhd_adp *adp) +{ + bc_dec_reg_wr(adp, SDRAM_PARAM, ((40 / 5 - 1) << 0) | + /* tras (40ns tras)/(5ns period) -1 ((15/5 - 1) << 4) | // trcd */ + ((15 / 5 - 1) << 7) | /* trp */ + ((10 / 5 - 1) << 10) | /* trrd */ + ((15 / 5 + 1) << 12) | /* twr */ + ((2 + 1) << 16) | /* twtr */ + ((70 / 5 - 2) << 19) | /* trfc */ + (0 << 23)); + + bc_dec_reg_wr(adp, SDRAM_PRECHARGE, 0); + bc_dec_reg_wr(adp, SDRAM_EXT_MODE, 2); + bc_dec_reg_wr(adp, SDRAM_MODE, 0x132); + bc_dec_reg_wr(adp, SDRAM_PRECHARGE, 0); + bc_dec_reg_wr(adp, SDRAM_REFRESH, 0); + bc_dec_reg_wr(adp, SDRAM_REFRESH, 0); + bc_dec_reg_wr(adp, SDRAM_MODE, 0x32); + /* setting the refresh rate here */ + bc_dec_reg_wr(adp, SDRAM_REF_PARAM, ((1 << 12) | 96)); +} + + +static bool crystalhd_bring_out_of_rst(struct crystalhd_adp *adp) +{ + link_misc_perst_deco_ctrl rst_deco_cntrl; + link_misc_perst_clk_ctrl rst_clk_cntrl; + uint32_t temp; + + /* + * Link clocks: MISC_PERST_CLOCK_CTRL Clear PLL power down bit, + * delay to allow PLL to lock Clear alternate clock, stop clock bits + */ + rst_clk_cntrl.whole_reg = crystalhd_reg_rd(adp, MISC_PERST_CLOCK_CTRL); + rst_clk_cntrl.pll_pwr_dn = 0; + crystalhd_reg_wr(adp, MISC_PERST_CLOCK_CTRL, rst_clk_cntrl.whole_reg); + msleep_interruptible(50); + + rst_clk_cntrl.whole_reg = crystalhd_reg_rd(adp, MISC_PERST_CLOCK_CTRL); + rst_clk_cntrl.stop_core_clk = 0; + rst_clk_cntrl.sel_alt_clk = 0; + + crystalhd_reg_wr(adp, MISC_PERST_CLOCK_CTRL, rst_clk_cntrl.whole_reg); + msleep_interruptible(50); + + /* + * Bus Arbiter Timeout: GISB_ARBITER_TIMER + * Set internal bus arbiter timeout to 40us based on core clock speed + * (63MHz * 40us = 0x9D8) + */ + crystalhd_reg_wr(adp, GISB_ARBITER_TIMER, 0x9D8); + + /* + * Decoder clocks: MISC_PERST_DECODER_CTRL + * Enable clocks while 7412 reset is asserted, delay + * De-assert 7412 reset + */ + rst_deco_cntrl.whole_reg = crystalhd_reg_rd(adp, MISC_PERST_DECODER_CTRL); + rst_deco_cntrl.stop_bcm_7412_clk = 0; + rst_deco_cntrl.bcm7412_rst = 1; + crystalhd_reg_wr(adp, MISC_PERST_DECODER_CTRL, rst_deco_cntrl.whole_reg); + msleep_interruptible(10); + + rst_deco_cntrl.whole_reg = crystalhd_reg_rd(adp, MISC_PERST_DECODER_CTRL); + rst_deco_cntrl.bcm7412_rst = 0; + crystalhd_reg_wr(adp, MISC_PERST_DECODER_CTRL, rst_deco_cntrl.whole_reg); + msleep_interruptible(50); + + /* Disable OTP_CONTENT_MISC to 0 to disable all secure modes */ + crystalhd_reg_wr(adp, OTP_CONTENT_MISC, 0); + + /* Clear bit 29 of 0x404 */ + temp = crystalhd_reg_rd(adp, PCIE_TL_TRANSACTION_CONFIGURATION); + temp &= ~BC_BIT(29); + crystalhd_reg_wr(adp, PCIE_TL_TRANSACTION_CONFIGURATION, temp); + + /* 2.5V regulator must be set to 2.6 volts (+6%) */ + /* FIXME: jarod: what's the point of this reg read? */ + temp = crystalhd_reg_rd(adp, MISC_PERST_VREG_CTRL); + crystalhd_reg_wr(adp, MISC_PERST_VREG_CTRL, 0xF3); + + return true; +} + +static bool crystalhd_put_in_reset(struct crystalhd_adp *adp) +{ + link_misc_perst_deco_ctrl rst_deco_cntrl; + link_misc_perst_clk_ctrl rst_clk_cntrl; + uint32_t temp; + + /* + * Decoder clocks: MISC_PERST_DECODER_CTRL + * Assert 7412 reset, delay + * Assert 7412 stop clock + */ + rst_deco_cntrl.whole_reg = crystalhd_reg_rd(adp, MISC_PERST_DECODER_CTRL); + rst_deco_cntrl.stop_bcm_7412_clk = 1; + crystalhd_reg_wr(adp, MISC_PERST_DECODER_CTRL, rst_deco_cntrl.whole_reg); + msleep_interruptible(50); + + /* Bus Arbiter Timeout: GISB_ARBITER_TIMER + * Set internal bus arbiter timeout to 40us based on core clock speed + * (6.75MHZ * 40us = 0x10E) + */ + crystalhd_reg_wr(adp, GISB_ARBITER_TIMER, 0x10E); + + /* Link clocks: MISC_PERST_CLOCK_CTRL + * Stop core clk, delay + * Set alternate clk, delay, set PLL power down + */ + rst_clk_cntrl.whole_reg = crystalhd_reg_rd(adp, MISC_PERST_CLOCK_CTRL); + rst_clk_cntrl.stop_core_clk = 1; + rst_clk_cntrl.sel_alt_clk = 1; + crystalhd_reg_wr(adp, MISC_PERST_CLOCK_CTRL, rst_clk_cntrl.whole_reg); + msleep_interruptible(50); + + rst_clk_cntrl.whole_reg = crystalhd_reg_rd(adp, MISC_PERST_CLOCK_CTRL); + rst_clk_cntrl.pll_pwr_dn = 1; + crystalhd_reg_wr(adp, MISC_PERST_CLOCK_CTRL, rst_clk_cntrl.whole_reg); + + /* + * Read and restore the Transaction Configuration Register + * after core reset + */ + temp = crystalhd_reg_rd(adp, PCIE_TL_TRANSACTION_CONFIGURATION); + + /* + * Link core soft reset: MISC3_RESET_CTRL + * - Write BIT[0]=1 and read it back for core reset to take place + */ + crystalhd_reg_wr(adp, MISC3_RESET_CTRL, 1); + rst_deco_cntrl.whole_reg = crystalhd_reg_rd(adp, MISC3_RESET_CTRL); + msleep_interruptible(50); + + /* restore the transaction configuration register */ + crystalhd_reg_wr(adp, PCIE_TL_TRANSACTION_CONFIGURATION, temp); + + return true; +} + +static void crystalhd_disable_interrupts(struct crystalhd_adp *adp) +{ + intr_mask_reg intr_mask; + intr_mask.whole_reg = crystalhd_reg_rd(adp, INTR_INTR_MSK_STS_REG); + intr_mask.mask_pcie_err = 1; + intr_mask.mask_pcie_rbusmast_err = 1; + intr_mask.mask_pcie_rgr_bridge = 1; + intr_mask.mask_rx_done = 1; + intr_mask.mask_rx_err = 1; + intr_mask.mask_tx_done = 1; + intr_mask.mask_tx_err = 1; + crystalhd_reg_wr(adp, INTR_INTR_MSK_SET_REG, intr_mask.whole_reg); + + return; +} + +static void crystalhd_enable_interrupts(struct crystalhd_adp *adp) +{ + intr_mask_reg intr_mask; + intr_mask.whole_reg = crystalhd_reg_rd(adp, INTR_INTR_MSK_STS_REG); + intr_mask.mask_pcie_err = 1; + intr_mask.mask_pcie_rbusmast_err = 1; + intr_mask.mask_pcie_rgr_bridge = 1; + intr_mask.mask_rx_done = 1; + intr_mask.mask_rx_err = 1; + intr_mask.mask_tx_done = 1; + intr_mask.mask_tx_err = 1; + crystalhd_reg_wr(adp, INTR_INTR_MSK_CLR_REG, intr_mask.whole_reg); + + return; +} + +static void crystalhd_clear_errors(struct crystalhd_adp *adp) +{ + uint32_t reg; + + /* FIXME: jarod: wouldn't we want to write a 0 to the reg? Or does the write clear the bits specified? */ + reg = crystalhd_reg_rd(adp, MISC1_Y_RX_ERROR_STATUS); + if (reg) + crystalhd_reg_wr(adp, MISC1_Y_RX_ERROR_STATUS, reg); + + reg = crystalhd_reg_rd(adp, MISC1_UV_RX_ERROR_STATUS); + if (reg) + crystalhd_reg_wr(adp, MISC1_UV_RX_ERROR_STATUS, reg); + + reg = crystalhd_reg_rd(adp, MISC1_TX_DMA_ERROR_STATUS); + if (reg) + crystalhd_reg_wr(adp, MISC1_TX_DMA_ERROR_STATUS, reg); +} + +static void crystalhd_clear_interrupts(struct crystalhd_adp *adp) +{ + uint32_t intr_sts = crystalhd_reg_rd(adp, INTR_INTR_STATUS); + + if (intr_sts) { + crystalhd_reg_wr(adp, INTR_INTR_CLR_REG, intr_sts); + + /* Write End Of Interrupt for PCIE */ + crystalhd_reg_wr(adp, INTR_EOI_CTRL, 1); + } +} + +static void crystalhd_soft_rst(struct crystalhd_adp *adp) +{ + uint32_t val; + + /* Assert c011 soft reset*/ + bc_dec_reg_wr(adp, DecHt_HostSwReset, 0x00000001); + msleep_interruptible(50); + + /* Release c011 soft reset*/ + bc_dec_reg_wr(adp, DecHt_HostSwReset, 0x00000000); + + /* Disable Stuffing..*/ + val = crystalhd_reg_rd(adp, MISC2_GLOBAL_CTRL); + val |= BC_BIT(8); + crystalhd_reg_wr(adp, MISC2_GLOBAL_CTRL, val); +} + +static bool crystalhd_load_firmware_config(struct crystalhd_adp *adp) +{ + uint32_t i = 0, reg; + + crystalhd_reg_wr(adp, DCI_DRAM_BASE_ADDR, (BC_DRAM_FW_CFG_ADDR >> 19)); + + crystalhd_reg_wr(adp, AES_CMD, 0); + crystalhd_reg_wr(adp, AES_CONFIG_INFO, (BC_DRAM_FW_CFG_ADDR & 0x7FFFF)); + crystalhd_reg_wr(adp, AES_CMD, 0x1); + + /* FIXME: jarod: I've seen this fail, and introducing extra delays helps... */ + for (i = 0; i < 100; ++i) { + reg = crystalhd_reg_rd(adp, AES_STATUS); + if (reg & 0x1) + return true; + msleep_interruptible(10); + } + + return false; +} + + +static bool crystalhd_start_device(struct crystalhd_adp *adp) +{ + uint32_t dbg_options, glb_cntrl = 0, reg_pwrmgmt = 0; + + BCMLOG(BCMLOG_INFO, "Starting BCM70012 Device\n"); + + reg_pwrmgmt = crystalhd_reg_rd(adp, PCIE_DLL_DATA_LINK_CONTROL); + reg_pwrmgmt &= ~ASPM_L1_ENABLE; + + crystalhd_reg_wr(adp, PCIE_DLL_DATA_LINK_CONTROL, reg_pwrmgmt); + + if (!crystalhd_bring_out_of_rst(adp)) { + BCMLOG_ERR("Failed To Bring Link Out Of Reset\n"); + return false; + } + + crystalhd_disable_interrupts(adp); + + crystalhd_clear_errors(adp); + + crystalhd_clear_interrupts(adp); + + crystalhd_enable_interrupts(adp); + + /* Enable the option for getting the total no. of DWORDS + * that have been transfered by the RXDMA engine + */ + dbg_options = crystalhd_reg_rd(adp, MISC1_DMA_DEBUG_OPTIONS_REG); + dbg_options |= 0x10; + crystalhd_reg_wr(adp, MISC1_DMA_DEBUG_OPTIONS_REG, dbg_options); + + /* Enable PCI Global Control options */ + glb_cntrl = crystalhd_reg_rd(adp, MISC2_GLOBAL_CTRL); + glb_cntrl |= 0x100; + glb_cntrl |= 0x8000; + crystalhd_reg_wr(adp, MISC2_GLOBAL_CTRL, glb_cntrl); + + crystalhd_enable_interrupts(adp); + + crystalhd_soft_rst(adp); + crystalhd_start_dram(adp); + crystalhd_enable_uarts(adp); + + return true; +} + +static bool crystalhd_stop_device(struct crystalhd_adp *adp) +{ + uint32_t reg; + + BCMLOG(BCMLOG_INFO, "Stopping BCM70012 Device\n"); + /* Clear and disable interrupts */ + crystalhd_disable_interrupts(adp); + crystalhd_clear_errors(adp); + crystalhd_clear_interrupts(adp); + + if (!crystalhd_put_in_reset(adp)) + BCMLOG_ERR("Failed to Put Link To Reset State\n"); + + reg = crystalhd_reg_rd(adp, PCIE_DLL_DATA_LINK_CONTROL); + reg |= ASPM_L1_ENABLE; + crystalhd_reg_wr(adp, PCIE_DLL_DATA_LINK_CONTROL, reg); + + /* Set PCI Clk Req */ + reg = crystalhd_reg_rd(adp, PCIE_CLK_REQ_REG); + reg |= PCI_CLK_REQ_ENABLE; + crystalhd_reg_wr(adp, PCIE_CLK_REQ_REG, reg); + + return true; +} + +static crystalhd_rx_dma_pkt *crystalhd_hw_alloc_rx_pkt(struct crystalhd_hw *hw) +{ + unsigned long flags = 0; + crystalhd_rx_dma_pkt *temp = NULL; + + if (!hw) + return NULL; + + spin_lock_irqsave(&hw->lock, flags); + temp = hw->rx_pkt_pool_head; + if (temp) { + hw->rx_pkt_pool_head = hw->rx_pkt_pool_head->next; + temp->dio_req = NULL; + temp->pkt_tag = 0; + temp->flags = 0; + } + spin_unlock_irqrestore(&hw->lock, flags); + + return temp; +} + +static void crystalhd_hw_free_rx_pkt(struct crystalhd_hw *hw, + crystalhd_rx_dma_pkt *pkt) +{ + unsigned long flags = 0; + + if (!hw || !pkt) + return; + + spin_lock_irqsave(&hw->lock, flags); + pkt->next = hw->rx_pkt_pool_head; + hw->rx_pkt_pool_head = pkt; + spin_unlock_irqrestore(&hw->lock, flags); +} + +/* + * Call back from TX - IOQ deletion. + * + * This routine will release the TX DMA rings allocated + * druing setup_dma rings interface. + * + * Memory is allocated per DMA ring basis. This is just + * a place holder to be able to create the dio queues. + */ +static void crystalhd_tx_desc_rel_call_back(void *context, void *data) +{ +} + +/* + * Rx Packet release callback.. + * + * Release All user mapped capture buffers and Our DMA packets + * back to our free pool. The actual cleanup of the DMA + * ring descriptors happen during dma ring release. + */ +static void crystalhd_rx_pkt_rel_call_back(void *context, void *data) +{ + struct crystalhd_hw *hw = (struct crystalhd_hw *)context; + crystalhd_rx_dma_pkt *pkt = (crystalhd_rx_dma_pkt *)data; + + if (!pkt || !hw) { + BCMLOG_ERR("Invalid arg - %p %p\n", hw, pkt); + return; + } + + if (pkt->dio_req) + crystalhd_unmap_dio(hw->adp, pkt->dio_req); + else + BCMLOG_ERR("Missing dio_req: 0x%x\n", pkt->pkt_tag); + + crystalhd_hw_free_rx_pkt(hw, pkt); +} + +#define crystalhd_hw_delete_ioq(adp, q) \ + if (q) { \ + crystalhd_delete_dioq(adp, q); \ + q = NULL; \ + } + +static void crystalhd_hw_delete_ioqs(struct crystalhd_hw *hw) +{ + if (!hw) + return; + + BCMLOG(BCMLOG_DBG, "Deleting IOQs \n"); + crystalhd_hw_delete_ioq(hw->adp, hw->tx_actq); + crystalhd_hw_delete_ioq(hw->adp, hw->tx_freeq); + crystalhd_hw_delete_ioq(hw->adp, hw->rx_actq); + crystalhd_hw_delete_ioq(hw->adp, hw->rx_freeq); + crystalhd_hw_delete_ioq(hw->adp, hw->rx_rdyq); +} + +#define crystalhd_hw_create_ioq(sts, hw, q, cb) \ +do { \ + sts = crystalhd_create_dioq(hw->adp, &q, cb, hw); \ + if (sts != BC_STS_SUCCESS) \ + goto hw_create_ioq_err; \ +} while (0) + +/* + * Create IOQs.. + * + * TX - Active & Free + * RX - Active, Ready and Free. + */ +static BC_STATUS crystalhd_hw_create_ioqs(struct crystalhd_hw *hw) +{ + BC_STATUS sts = BC_STS_SUCCESS; + + if (!hw) { + BCMLOG_ERR("Invalid Arg!!\n"); + return BC_STS_INV_ARG; + } + + crystalhd_hw_create_ioq(sts, hw, hw->tx_freeq, + crystalhd_tx_desc_rel_call_back); + crystalhd_hw_create_ioq(sts, hw, hw->tx_actq, + crystalhd_tx_desc_rel_call_back); + + crystalhd_hw_create_ioq(sts, hw, hw->rx_freeq, + crystalhd_rx_pkt_rel_call_back); + crystalhd_hw_create_ioq(sts, hw, hw->rx_rdyq, + crystalhd_rx_pkt_rel_call_back); + crystalhd_hw_create_ioq(sts, hw, hw->rx_actq, + crystalhd_rx_pkt_rel_call_back); + + return sts; + +hw_create_ioq_err: + crystalhd_hw_delete_ioqs(hw); + + return sts; +} + + +static bool crystalhd_code_in_full(struct crystalhd_adp *adp, uint32_t needed_sz, + bool b_188_byte_pkts, uint8_t flags) +{ + uint32_t base, end, writep, readp; + uint32_t cpbSize, cpbFullness, fifoSize; + + if (flags & 0x02) { /* ASF Bit is set */ + base = bc_dec_reg_rd(adp, REG_Dec_TsAudCDB2Base); + end = bc_dec_reg_rd(adp, REG_Dec_TsAudCDB2End); + writep = bc_dec_reg_rd(adp, REG_Dec_TsAudCDB2Wrptr); + readp = bc_dec_reg_rd(adp, REG_Dec_TsAudCDB2Rdptr); + } else if (b_188_byte_pkts) { /*Encrypted 188 byte packets*/ + base = bc_dec_reg_rd(adp, REG_Dec_TsUser0Base); + end = bc_dec_reg_rd(adp, REG_Dec_TsUser0End); + writep = bc_dec_reg_rd(adp, REG_Dec_TsUser0Wrptr); + readp = bc_dec_reg_rd(adp, REG_Dec_TsUser0Rdptr); + } else { + base = bc_dec_reg_rd(adp, REG_DecCA_RegCinBase); + end = bc_dec_reg_rd(adp, REG_DecCA_RegCinEnd); + writep = bc_dec_reg_rd(adp, REG_DecCA_RegCinWrPtr); + readp = bc_dec_reg_rd(adp, REG_DecCA_RegCinRdPtr); + } + + cpbSize = end - base; + if (writep >= readp) + cpbFullness = writep - readp; + else + cpbFullness = (end - base) - (readp - writep); + + fifoSize = cpbSize - cpbFullness; + + if (fifoSize < BC_INFIFO_THRESHOLD) + return true; + + if (needed_sz > (fifoSize - BC_INFIFO_THRESHOLD)) + return true; + + return false; +} + +static BC_STATUS crystalhd_hw_tx_req_complete(struct crystalhd_hw *hw, + uint32_t list_id, BC_STATUS cs) +{ + tx_dma_pkt *tx_req; + + if (!hw || !list_id) { + BCMLOG_ERR("Invalid Arg..\n"); + return BC_STS_INV_ARG; + } + + hw->pwr_lock--; + + tx_req = (tx_dma_pkt *)crystalhd_dioq_find_and_fetch(hw->tx_actq, list_id); + if (!tx_req) { + if (cs != BC_STS_IO_USER_ABORT) + BCMLOG_ERR("Find and Fetch Did not find req\n"); + return BC_STS_NO_DATA; + } + + if (tx_req->call_back) { + tx_req->call_back(tx_req->dio_req, tx_req->cb_event, cs); + tx_req->dio_req = NULL; + tx_req->cb_event = NULL; + tx_req->call_back = NULL; + } else { + BCMLOG(BCMLOG_DBG, "Missing Tx Callback - %X\n", + tx_req->list_tag); + } + + /* Now put back the tx_list back in FreeQ */ + tx_req->list_tag = 0; + + return crystalhd_dioq_add(hw->tx_freeq, tx_req, false, 0); +} + +static bool crystalhd_tx_list0_handler(struct crystalhd_hw *hw, uint32_t err_sts) +{ + uint32_t err_mask, tmp; + unsigned long flags = 0; + + err_mask = MISC1_TX_DMA_ERROR_STATUS_TX_L0_DESC_TX_ABORT_ERRORS_MASK | + MISC1_TX_DMA_ERROR_STATUS_TX_L0_DMA_DATA_TX_ABORT_ERRORS_MASK | + MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_MASK; + + if (!(err_sts & err_mask)) + return false; + + BCMLOG_ERR("Error on Tx-L0 %x \n", err_sts); + + tmp = err_mask; + + if (err_sts & MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_MASK) + tmp &= ~MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_MASK; + + if (tmp) { + spin_lock_irqsave(&hw->lock, flags); + /* reset list index.*/ + hw->tx_list_post_index = 0; + spin_unlock_irqrestore(&hw->lock, flags); + } + + tmp = err_sts & err_mask; + crystalhd_reg_wr(hw->adp, MISC1_TX_DMA_ERROR_STATUS, tmp); + + return true; +} + +static bool crystalhd_tx_list1_handler(struct crystalhd_hw *hw, uint32_t err_sts) +{ + uint32_t err_mask, tmp; + unsigned long flags = 0; + + err_mask = MISC1_TX_DMA_ERROR_STATUS_TX_L1_DESC_TX_ABORT_ERRORS_MASK | + MISC1_TX_DMA_ERROR_STATUS_TX_L1_DMA_DATA_TX_ABORT_ERRORS_MASK | + MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_MASK; + + if (!(err_sts & err_mask)) + return false; + + BCMLOG_ERR("Error on Tx-L1 %x \n", err_sts); + + tmp = err_mask; + + if (err_sts & MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_MASK) + tmp &= ~MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_MASK; + + if (tmp) { + spin_lock_irqsave(&hw->lock, flags); + /* reset list index.*/ + hw->tx_list_post_index = 0; + spin_unlock_irqrestore(&hw->lock, flags); + } + + tmp = err_sts & err_mask; + crystalhd_reg_wr(hw->adp, MISC1_TX_DMA_ERROR_STATUS, tmp); + + return true; +} + +static void crystalhd_tx_isr(struct crystalhd_hw *hw, uint32_t int_sts) +{ + uint32_t err_sts; + + if (int_sts & INTR_INTR_STATUS_L0_TX_DMA_DONE_INTR_MASK) + crystalhd_hw_tx_req_complete(hw, hw->tx_ioq_tag_seed + 0, + BC_STS_SUCCESS); + + if (int_sts & INTR_INTR_STATUS_L1_TX_DMA_DONE_INTR_MASK) + crystalhd_hw_tx_req_complete(hw, hw->tx_ioq_tag_seed + 1, + BC_STS_SUCCESS); + + if (!(int_sts & (INTR_INTR_STATUS_L0_TX_DMA_ERR_INTR_MASK | + INTR_INTR_STATUS_L1_TX_DMA_ERR_INTR_MASK))) { + /* No error mask set.. */ + return; + } + + /* Handle Tx errors. */ + err_sts = crystalhd_reg_rd(hw->adp, MISC1_TX_DMA_ERROR_STATUS); + + if (crystalhd_tx_list0_handler(hw, err_sts)) + crystalhd_hw_tx_req_complete(hw, hw->tx_ioq_tag_seed + 0, + BC_STS_ERROR); + + if (crystalhd_tx_list1_handler(hw, err_sts)) + crystalhd_hw_tx_req_complete(hw, hw->tx_ioq_tag_seed + 1, + BC_STS_ERROR); + + hw->stats.tx_errors++; +} + +static void crystalhd_hw_dump_desc(pdma_descriptor p_dma_desc, + uint32_t ul_desc_index, uint32_t cnt) +{ + uint32_t ix, ll = 0; + + if (!p_dma_desc || !cnt) + return; + + /* FIXME: jarod: perhaps a modparam desc_debug to enable this, rather than + * setting ll (log level, I presume) to non-zero? */ + if (!ll) + return; + + for (ix = ul_desc_index; ix < (ul_desc_index + cnt); ix++) { + BCMLOG(ll, "%s[%d] Buff[%x:%x] Next:[%x:%x] XferSz:%x Intr:%x,Last:%x\n", + ((p_dma_desc[ul_desc_index].dma_dir) ? "TDesc" : "RDesc"), + ul_desc_index, + p_dma_desc[ul_desc_index].buff_addr_high, + p_dma_desc[ul_desc_index].buff_addr_low, + p_dma_desc[ul_desc_index].next_desc_addr_high, + p_dma_desc[ul_desc_index].next_desc_addr_low, + p_dma_desc[ul_desc_index].xfer_size, + p_dma_desc[ul_desc_index].intr_enable, + p_dma_desc[ul_desc_index].last_rec_indicator); + } + +} + +static BC_STATUS crystalhd_hw_fill_desc(crystalhd_dio_req *ioreq, + dma_descriptor *desc, + dma_addr_t desc_paddr_base, + uint32_t sg_cnt, uint32_t sg_st_ix, + uint32_t sg_st_off, uint32_t xfr_sz) +{ + uint32_t count = 0, ix = 0, sg_ix = 0, len = 0, last_desc_ix = 0; + dma_addr_t desc_phy_addr = desc_paddr_base; + addr_64 addr_temp; + + if (!ioreq || !desc || !desc_paddr_base || !xfr_sz || + (!sg_cnt && !ioreq->uinfo.dir_tx)) { + BCMLOG_ERR("Invalid Args\n"); + return BC_STS_INV_ARG; + } + + for (ix = 0; ix < sg_cnt; ix++) { + + /* Setup SGLE index. */ + sg_ix = ix + sg_st_ix; + + /* Get SGLE length */ + len = crystalhd_get_sgle_len(ioreq, sg_ix); + if (len % 4) { + BCMLOG_ERR(" len in sg %d %d %d\n", len, sg_ix, sg_cnt); + return BC_STS_NOT_IMPL; + } + /* Setup DMA desc with Phy addr & Length at current index. */ + addr_temp.full_addr = crystalhd_get_sgle_paddr(ioreq, sg_ix); + if (sg_ix == sg_st_ix) { + addr_temp.full_addr += sg_st_off; + len -= sg_st_off; + } + memset(&desc[ix], 0, sizeof(desc[ix])); + desc[ix].buff_addr_low = addr_temp.low_part; + desc[ix].buff_addr_high = addr_temp.high_part; + desc[ix].dma_dir = ioreq->uinfo.dir_tx; + + /* Chain DMA descriptor. */ + addr_temp.full_addr = desc_phy_addr + sizeof(dma_descriptor); + desc[ix].next_desc_addr_low = addr_temp.low_part; + desc[ix].next_desc_addr_high = addr_temp.high_part; + + if ((count + len) > xfr_sz) + len = xfr_sz - count; + + /* Debug.. */ + if ((!len) || (len > crystalhd_get_sgle_len(ioreq, sg_ix))) { + BCMLOG_ERR("inv-len(%x) Ix(%d) count:%x xfr_sz:%x sg_cnt:%d\n", + len, ix, count, xfr_sz, sg_cnt); + return BC_STS_ERROR; + } + /* Length expects Multiple of 4 */ + desc[ix].xfer_size = (len / 4); + + crystalhd_hw_dump_desc(desc, ix, 1); + + count += len; + desc_phy_addr += sizeof(dma_descriptor); + } + + last_desc_ix = ix - 1; + + if (ioreq->fb_size) { + memset(&desc[ix], 0, sizeof(desc[ix])); + addr_temp.full_addr = ioreq->fb_pa; + desc[ix].buff_addr_low = addr_temp.low_part; + desc[ix].buff_addr_high = addr_temp.high_part; + desc[ix].dma_dir = ioreq->uinfo.dir_tx; + desc[ix].xfer_size = 1; + desc[ix].fill_bytes = 4 - ioreq->fb_size; + count += ioreq->fb_size; + last_desc_ix++; + } + + /* setup last descriptor..*/ + desc[last_desc_ix].last_rec_indicator = 1; + desc[last_desc_ix].next_desc_addr_low = 0; + desc[last_desc_ix].next_desc_addr_high = 0; + desc[last_desc_ix].intr_enable = 1; + + crystalhd_hw_dump_desc(desc, last_desc_ix, 1); + + if (count != xfr_sz) { + BCMLOG_ERR("interal error sz curr:%x exp:%x\n", count, xfr_sz); + return BC_STS_ERROR; + } + + return BC_STS_SUCCESS; +} + +static BC_STATUS crystalhd_xlat_sgl_to_dma_desc(crystalhd_dio_req *ioreq, + pdma_desc_mem pdesc_mem, + uint32_t *uv_desc_index) +{ + dma_descriptor *desc = NULL; + dma_addr_t desc_paddr_base = 0; + uint32_t sg_cnt = 0, sg_st_ix = 0, sg_st_off = 0; + uint32_t xfr_sz = 0; + BC_STATUS sts = BC_STS_SUCCESS; + + /* Check params.. */ + if (!ioreq || !pdesc_mem || !uv_desc_index) { + BCMLOG_ERR("Invalid Args\n"); + return BC_STS_INV_ARG; + } + + if (!pdesc_mem->sz || !pdesc_mem->pdma_desc_start || + !ioreq->sg || (!ioreq->sg_cnt && !ioreq->uinfo.dir_tx)) { + BCMLOG_ERR("Invalid Args\n"); + return BC_STS_INV_ARG; + } + + if ((ioreq->uinfo.dir_tx) && (ioreq->uinfo.uv_offset)) { + BCMLOG_ERR("UV offset for TX??\n"); + return BC_STS_INV_ARG; + + } + + desc = pdesc_mem->pdma_desc_start; + desc_paddr_base = pdesc_mem->phy_addr; + + if (ioreq->uinfo.dir_tx || (ioreq->uinfo.uv_offset == 0)) { + sg_cnt = ioreq->sg_cnt; + xfr_sz = ioreq->uinfo.xfr_len; + } else { + sg_cnt = ioreq->uinfo.uv_sg_ix + 1; + xfr_sz = ioreq->uinfo.uv_offset; + } + + sts = crystalhd_hw_fill_desc(ioreq, desc, desc_paddr_base, sg_cnt, + sg_st_ix, sg_st_off, xfr_sz); + + if ((sts != BC_STS_SUCCESS) || !ioreq->uinfo.uv_offset) + return sts; + + /* Prepare for UV mapping.. */ + desc = &pdesc_mem->pdma_desc_start[sg_cnt]; + desc_paddr_base = pdesc_mem->phy_addr + + (sg_cnt * sizeof(dma_descriptor)); + + /* Done with desc addr.. now update sg stuff.*/ + sg_cnt = ioreq->sg_cnt - ioreq->uinfo.uv_sg_ix; + xfr_sz = ioreq->uinfo.xfr_len - ioreq->uinfo.uv_offset; + sg_st_ix = ioreq->uinfo.uv_sg_ix; + sg_st_off = ioreq->uinfo.uv_sg_off; + + sts = crystalhd_hw_fill_desc(ioreq, desc, desc_paddr_base, sg_cnt, + sg_st_ix, sg_st_off, xfr_sz); + if (sts != BC_STS_SUCCESS) + return sts; + + *uv_desc_index = sg_st_ix; + + return sts; +} + +static void crystalhd_start_tx_dma_engine(struct crystalhd_hw *hw) +{ + uint32_t dma_cntrl; + + dma_cntrl = crystalhd_reg_rd(hw->adp, MISC1_TX_SW_DESC_LIST_CTRL_STS); + if (!(dma_cntrl & DMA_START_BIT)) { + dma_cntrl |= DMA_START_BIT; + crystalhd_reg_wr(hw->adp, MISC1_TX_SW_DESC_LIST_CTRL_STS, + dma_cntrl); + } + + return; +} + +/* _CHECK_THIS_ + * + * Verify if the Stop generates a completion interrupt or not. + * if it does not generate an interrupt, then add polling here. + */ +static BC_STATUS crystalhd_stop_tx_dma_engine(struct crystalhd_hw *hw) +{ + uint32_t dma_cntrl, cnt = 30; + uint32_t l1 = 1, l2 = 1; + unsigned long flags = 0; + + dma_cntrl = crystalhd_reg_rd(hw->adp, MISC1_TX_SW_DESC_LIST_CTRL_STS); + + BCMLOG(BCMLOG_DBG, "Stopping TX DMA Engine..\n"); + + /* FIXME: jarod: invert dma_ctrl and check bit? or are there missing parens? */ + if (!dma_cntrl & DMA_START_BIT) { + BCMLOG(BCMLOG_DBG, "Already Stopped\n"); + return BC_STS_SUCCESS; + } + + crystalhd_disable_interrupts(hw->adp); + + /* Issue stop to HW */ + /* This bit when set gave problems. Please check*/ + dma_cntrl &= ~DMA_START_BIT; + crystalhd_reg_wr(hw->adp, MISC1_TX_SW_DESC_LIST_CTRL_STS, dma_cntrl); + + BCMLOG(BCMLOG_DBG, "Cleared the DMA Start bit\n"); + + /* Poll for 3seconds (30 * 100ms) on both the lists..*/ + while ((l1 || l2) && cnt) { + + if (l1) { + l1 = crystalhd_reg_rd(hw->adp, MISC1_TX_FIRST_DESC_L_ADDR_LIST0); + l1 &= DMA_START_BIT; + } + + if (l2) { + l2 = crystalhd_reg_rd(hw->adp, MISC1_TX_FIRST_DESC_L_ADDR_LIST1); + l2 &= DMA_START_BIT; + } + + msleep_interruptible(100); + + cnt--; + } + + if (!cnt) { + BCMLOG_ERR("Failed to stop TX DMA.. l1 %d, l2 %d\n", l1, l2); + crystalhd_enable_interrupts(hw->adp); + return BC_STS_ERROR; + } + + spin_lock_irqsave(&hw->lock, flags); + hw->tx_list_post_index = 0; + spin_unlock_irqrestore(&hw->lock, flags); + BCMLOG(BCMLOG_DBG, "stopped TX DMA..\n"); + crystalhd_enable_interrupts(hw->adp); + + return BC_STS_SUCCESS; +} + +static uint32_t crystalhd_get_pib_avail_cnt(struct crystalhd_hw *hw) +{ + /* + * Position of the PIB Entries can be found at + * 0th and the 1st location of the Circular list. + */ + uint32_t Q_addr; + uint32_t pib_cnt, r_offset, w_offset; + + Q_addr = hw->pib_del_Q_addr; + + /* Get the Read Pointer */ + crystalhd_mem_rd(hw->adp, Q_addr, 1, &r_offset); + + /* Get the Write Pointer */ + crystalhd_mem_rd(hw->adp, Q_addr + sizeof(uint32_t), 1, &w_offset); + + if (r_offset == w_offset) + return 0; /* Queue is empty */ + + if (w_offset > r_offset) + pib_cnt = w_offset - r_offset; + else + pib_cnt = (w_offset + MAX_PIB_Q_DEPTH) - + (r_offset + MIN_PIB_Q_DEPTH); + + if (pib_cnt > MAX_PIB_Q_DEPTH) { + BCMLOG_ERR("Invalid PIB Count (%u)\n", pib_cnt); + return 0; + } + + return pib_cnt; +} + +static uint32_t crystalhd_get_addr_from_pib_Q(struct crystalhd_hw *hw) +{ + uint32_t Q_addr; + uint32_t addr_entry, r_offset, w_offset; + + Q_addr = hw->pib_del_Q_addr; + + /* Get the Read Pointer 0Th Location is Read Pointer */ + crystalhd_mem_rd(hw->adp, Q_addr, 1, &r_offset); + + /* Get the Write Pointer 1st Location is Write pointer */ + crystalhd_mem_rd(hw->adp, Q_addr + sizeof(uint32_t), 1, &w_offset); + + /* Queue is empty */ + if (r_offset == w_offset) + return 0; + + if ((r_offset < MIN_PIB_Q_DEPTH) || (r_offset >= MAX_PIB_Q_DEPTH)) + return 0; + + /* Get the Actual Address of the PIB */ + crystalhd_mem_rd(hw->adp, Q_addr + (r_offset * sizeof(uint32_t)), + 1, &addr_entry); + + /* Increment the Read Pointer */ + r_offset++; + + if (MAX_PIB_Q_DEPTH == r_offset) + r_offset = MIN_PIB_Q_DEPTH; + + /* Write back the read pointer to It's Location */ + crystalhd_mem_wr(hw->adp, Q_addr, 1, &r_offset); + + return addr_entry; +} + +static bool crystalhd_rel_addr_to_pib_Q(struct crystalhd_hw *hw, uint32_t addr_to_rel) +{ + uint32_t Q_addr; + uint32_t r_offset, w_offset, n_offset; + + Q_addr = hw->pib_rel_Q_addr; + + /* Get the Read Pointer */ + crystalhd_mem_rd(hw->adp, Q_addr, 1, &r_offset); + + /* Get the Write Pointer */ + crystalhd_mem_rd(hw->adp, Q_addr + sizeof(uint32_t), 1, &w_offset); + + if ((r_offset < MIN_PIB_Q_DEPTH) || + (r_offset >= MAX_PIB_Q_DEPTH)) + return false; + + n_offset = w_offset + 1; + + if (MAX_PIB_Q_DEPTH == n_offset) + n_offset = MIN_PIB_Q_DEPTH; + + if (r_offset == n_offset) + return false; /* should never happen */ + + /* Write the DRAM ADDR to the Queue at Next Offset */ + crystalhd_mem_wr(hw->adp, Q_addr + (w_offset * sizeof(uint32_t)), + 1, &addr_to_rel); + + /* Put the New value of the write pointer in Queue */ + crystalhd_mem_wr(hw->adp, Q_addr + sizeof(uint32_t), 1, &n_offset); + + return true; +} + +static void cpy_pib_to_app(C011_PIB *src_pib, BC_PIC_INFO_BLOCK *dst_pib) +{ + if (!src_pib || !dst_pib) { + BCMLOG_ERR("Invalid Arguments\n"); + return; + } + + dst_pib->timeStamp = 0; + dst_pib->picture_number = src_pib->ppb.picture_number; + dst_pib->width = src_pib->ppb.width; + dst_pib->height = src_pib->ppb.height; + dst_pib->chroma_format = src_pib->ppb.chroma_format; + dst_pib->pulldown = src_pib->ppb.pulldown; + dst_pib->flags = src_pib->ppb.flags; + dst_pib->sess_num = src_pib->ptsStcOffset; + dst_pib->aspect_ratio = src_pib->ppb.aspect_ratio; + dst_pib->colour_primaries = src_pib->ppb.colour_primaries; + dst_pib->picture_meta_payload = src_pib->ppb.picture_meta_payload; + dst_pib->frame_rate = src_pib->resolution ; + return; +} + +static void crystalhd_hw_proc_pib(struct crystalhd_hw *hw) +{ + unsigned int cnt; + C011_PIB src_pib; + uint32_t pib_addr, pib_cnt; + BC_PIC_INFO_BLOCK *AppPib; + crystalhd_rx_dma_pkt *rx_pkt = NULL; + + pib_cnt = crystalhd_get_pib_avail_cnt(hw); + + if (!pib_cnt) + return; + + for (cnt = 0; cnt < pib_cnt; cnt++) { + + pib_addr = crystalhd_get_addr_from_pib_Q(hw); + crystalhd_mem_rd(hw->adp, pib_addr, sizeof(C011_PIB) / 4, + (uint32_t *)&src_pib); + + if (src_pib.bFormatChange) { + rx_pkt = (crystalhd_rx_dma_pkt *)crystalhd_dioq_fetch(hw->rx_freeq); + if (!rx_pkt) + return; + rx_pkt->flags = 0; + rx_pkt->flags |= COMP_FLAG_PIB_VALID | COMP_FLAG_FMT_CHANGE; + AppPib = &rx_pkt->pib; + cpy_pib_to_app(&src_pib, AppPib); + + BCMLOG(BCMLOG_DBG, + "App PIB:%x %x %x %x %x %x %x %x %x %x\n", + rx_pkt->pib.picture_number, + rx_pkt->pib.aspect_ratio, + rx_pkt->pib.chroma_format, + rx_pkt->pib.colour_primaries, + rx_pkt->pib.frame_rate, + rx_pkt->pib.height, + rx_pkt->pib.height, + rx_pkt->pib.n_drop, + rx_pkt->pib.pulldown, + rx_pkt->pib.ycom); + + crystalhd_dioq_add(hw->rx_rdyq, (void *)rx_pkt, true, rx_pkt->pkt_tag); + + } + + crystalhd_rel_addr_to_pib_Q(hw, pib_addr); + } +} + +static void crystalhd_start_rx_dma_engine(struct crystalhd_hw *hw) +{ + uint32_t dma_cntrl; + + dma_cntrl = crystalhd_reg_rd(hw->adp, MISC1_Y_RX_SW_DESC_LIST_CTRL_STS); + if (!(dma_cntrl & DMA_START_BIT)) { + dma_cntrl |= DMA_START_BIT; + crystalhd_reg_wr(hw->adp, MISC1_Y_RX_SW_DESC_LIST_CTRL_STS, dma_cntrl); + } + + dma_cntrl = crystalhd_reg_rd(hw->adp, MISC1_UV_RX_SW_DESC_LIST_CTRL_STS); + if (!(dma_cntrl & DMA_START_BIT)) { + dma_cntrl |= DMA_START_BIT; + crystalhd_reg_wr(hw->adp, MISC1_UV_RX_SW_DESC_LIST_CTRL_STS, dma_cntrl); + } + + return; +} + +static void crystalhd_stop_rx_dma_engine(struct crystalhd_hw *hw) +{ + uint32_t dma_cntrl = 0, count = 30; + uint32_t l0y = 1, l0uv = 1, l1y = 1, l1uv = 1; + + dma_cntrl = crystalhd_reg_rd(hw->adp, MISC1_Y_RX_SW_DESC_LIST_CTRL_STS); + if ((dma_cntrl & DMA_START_BIT)) { + dma_cntrl &= ~DMA_START_BIT; + crystalhd_reg_wr(hw->adp, MISC1_Y_RX_SW_DESC_LIST_CTRL_STS, dma_cntrl); + } + + dma_cntrl = crystalhd_reg_rd(hw->adp, MISC1_UV_RX_SW_DESC_LIST_CTRL_STS); + if ((dma_cntrl & DMA_START_BIT)) { + dma_cntrl &= ~DMA_START_BIT; + crystalhd_reg_wr(hw->adp, MISC1_UV_RX_SW_DESC_LIST_CTRL_STS, dma_cntrl); + } + + /* Poll for 3seconds (30 * 100ms) on both the lists..*/ + while ((l0y || l0uv || l1y || l1uv) && count) { + + if (l0y) { + l0y = crystalhd_reg_rd(hw->adp, MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0); + l0y &= DMA_START_BIT; + if (!l0y) { + hw->rx_list_sts[0] &= ~rx_waiting_y_intr; + } + } + + if (l1y) { + l1y = crystalhd_reg_rd(hw->adp, MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1); + l1y &= DMA_START_BIT; + if (!l1y) { + hw->rx_list_sts[1] &= ~rx_waiting_y_intr; + } + } + + if (l0uv) { + l0uv = crystalhd_reg_rd(hw->adp, MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0); + l0uv &= DMA_START_BIT; + if (!l0uv) { + hw->rx_list_sts[0] &= ~rx_waiting_uv_intr; + } + } + + if (l1uv) { + l1uv = crystalhd_reg_rd(hw->adp, MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1); + l1uv &= DMA_START_BIT; + if (!l1uv) { + hw->rx_list_sts[1] &= ~rx_waiting_uv_intr; + } + } + msleep_interruptible(100); + count--; + } + + hw->rx_list_post_index = 0; + + BCMLOG(BCMLOG_SSTEP, "Capture Stop: %d List0:Sts:%x List1:Sts:%x\n", + count, hw->rx_list_sts[0], hw->rx_list_sts[1]); +} + +static BC_STATUS crystalhd_hw_prog_rxdma(struct crystalhd_hw *hw, crystalhd_rx_dma_pkt *rx_pkt) +{ + uint32_t y_low_addr_reg, y_high_addr_reg; + uint32_t uv_low_addr_reg, uv_high_addr_reg; + addr_64 desc_addr; + unsigned long flags; + + if (!hw || !rx_pkt) { + BCMLOG_ERR("Invalid Arguments\n"); + return BC_STS_INV_ARG; + } + + if (hw->rx_list_post_index >= DMA_ENGINE_CNT) { + BCMLOG_ERR("List Out Of bounds %x\n", hw->rx_list_post_index); + return BC_STS_INV_ARG; + } + + spin_lock_irqsave(&hw->rx_lock, flags); + /* FIXME: jarod: sts_free is an enum for 0, in crystalhd_hw.h... yuk... */ + if (sts_free != hw->rx_list_sts[hw->rx_list_post_index]) { + spin_unlock_irqrestore(&hw->rx_lock, flags); + return BC_STS_BUSY; + } + + if (!hw->rx_list_post_index) { + y_low_addr_reg = MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0; + y_high_addr_reg = MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST0; + uv_low_addr_reg = MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0; + uv_high_addr_reg = MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST0; + } else { + y_low_addr_reg = MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1; + y_high_addr_reg = MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST1; + uv_low_addr_reg = MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1; + uv_high_addr_reg = MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST1; + } + rx_pkt->pkt_tag = hw->rx_pkt_tag_seed + hw->rx_list_post_index; + hw->rx_list_sts[hw->rx_list_post_index] |= rx_waiting_y_intr; + if (rx_pkt->uv_phy_addr) + hw->rx_list_sts[hw->rx_list_post_index] |= rx_waiting_uv_intr; + hw->rx_list_post_index = (hw->rx_list_post_index + 1) % DMA_ENGINE_CNT; + spin_unlock_irqrestore(&hw->rx_lock, flags); + + crystalhd_dioq_add(hw->rx_actq, (void *)rx_pkt, false, rx_pkt->pkt_tag); + + crystalhd_start_rx_dma_engine(hw); + /* Program the Y descriptor */ + desc_addr.full_addr = rx_pkt->desc_mem.phy_addr; + crystalhd_reg_wr(hw->adp, y_high_addr_reg, desc_addr.high_part); + crystalhd_reg_wr(hw->adp, y_low_addr_reg, desc_addr.low_part | 0x01); + + if (rx_pkt->uv_phy_addr) { + /* Program the UV descriptor */ + desc_addr.full_addr = rx_pkt->uv_phy_addr; + crystalhd_reg_wr(hw->adp, uv_high_addr_reg, desc_addr.high_part); + crystalhd_reg_wr(hw->adp, uv_low_addr_reg, desc_addr.low_part | 0x01); + } + + return BC_STS_SUCCESS; +} + +static BC_STATUS crystalhd_hw_post_cap_buff(struct crystalhd_hw *hw, + crystalhd_rx_dma_pkt *rx_pkt) +{ + BC_STATUS sts = crystalhd_hw_prog_rxdma(hw, rx_pkt); + + if (sts == BC_STS_BUSY) + crystalhd_dioq_add(hw->rx_freeq, (void *)rx_pkt, + false, rx_pkt->pkt_tag); + + return sts; +} + +static void crystalhd_get_dnsz(struct crystalhd_hw *hw, uint32_t list_index, + uint32_t *y_dw_dnsz, uint32_t *uv_dw_dnsz) +{ + uint32_t y_dn_sz_reg, uv_dn_sz_reg; + + if (!list_index) { + y_dn_sz_reg = MISC1_Y_RX_LIST0_CUR_BYTE_CNT; + uv_dn_sz_reg = MISC1_UV_RX_LIST0_CUR_BYTE_CNT; + } else { + y_dn_sz_reg = MISC1_Y_RX_LIST1_CUR_BYTE_CNT; + uv_dn_sz_reg = MISC1_UV_RX_LIST1_CUR_BYTE_CNT; + } + + *y_dw_dnsz = crystalhd_reg_rd(hw->adp, y_dn_sz_reg); + *uv_dw_dnsz = crystalhd_reg_rd(hw->adp, uv_dn_sz_reg); +} + +/* + * This function should be called only after making sure that the two DMA + * lists are free. This function does not check if DMA's are active, before + * turning off the DMA. + */ +static void crystalhd_hw_finalize_pause(struct crystalhd_hw *hw) +{ + uint32_t dma_cntrl, aspm; + + hw->stop_pending = 0; + + dma_cntrl = crystalhd_reg_rd(hw->adp, MISC1_Y_RX_SW_DESC_LIST_CTRL_STS); + if (dma_cntrl & DMA_START_BIT) { + dma_cntrl &= ~DMA_START_BIT; + crystalhd_reg_wr(hw->adp, MISC1_Y_RX_SW_DESC_LIST_CTRL_STS, dma_cntrl); + } + + dma_cntrl = crystalhd_reg_rd(hw->adp, MISC1_UV_RX_SW_DESC_LIST_CTRL_STS); + if (dma_cntrl & DMA_START_BIT) { + dma_cntrl &= ~DMA_START_BIT; + crystalhd_reg_wr(hw->adp, MISC1_UV_RX_SW_DESC_LIST_CTRL_STS, dma_cntrl); + } + hw->rx_list_post_index = 0; + + aspm = crystalhd_reg_rd(hw->adp, PCIE_DLL_DATA_LINK_CONTROL); + aspm |= ASPM_L1_ENABLE; + /* NAREN BCMLOG(BCMLOG_INFO, "aspm on\n"); */ + crystalhd_reg_wr(hw->adp, PCIE_DLL_DATA_LINK_CONTROL, aspm); +} + +static BC_STATUS crystalhd_rx_pkt_done(struct crystalhd_hw *hw, uint32_t list_index, + BC_STATUS comp_sts) +{ + crystalhd_rx_dma_pkt *rx_pkt = NULL; + uint32_t y_dw_dnsz, uv_dw_dnsz; + BC_STATUS sts = BC_STS_SUCCESS; + + if (!hw || list_index >= DMA_ENGINE_CNT) { + BCMLOG_ERR("Invalid Arguments\n"); + return BC_STS_INV_ARG; + } + + rx_pkt = crystalhd_dioq_find_and_fetch(hw->rx_actq, + hw->rx_pkt_tag_seed + list_index); + if (!rx_pkt) { + BCMLOG_ERR("Act-Q:PostIx:%x L0Sts:%x L1Sts:%x current L:%x tag:%x comp:%x\n", + hw->rx_list_post_index, hw->rx_list_sts[0], + hw->rx_list_sts[1], list_index, + hw->rx_pkt_tag_seed + list_index, comp_sts); + return BC_STS_INV_ARG; + } + + if (comp_sts == BC_STS_SUCCESS) { + crystalhd_get_dnsz(hw, list_index, &y_dw_dnsz, &uv_dw_dnsz); + rx_pkt->dio_req->uinfo.y_done_sz = y_dw_dnsz; + rx_pkt->flags = COMP_FLAG_DATA_VALID; + if (rx_pkt->uv_phy_addr) + rx_pkt->dio_req->uinfo.uv_done_sz = uv_dw_dnsz; + crystalhd_dioq_add(hw->rx_rdyq, rx_pkt, true, + hw->rx_pkt_tag_seed + list_index); + return sts; + } + + /* Check if we can post this DIO again. */ + return crystalhd_hw_post_cap_buff(hw, rx_pkt); +} + +static bool crystalhd_rx_list0_handler(struct crystalhd_hw *hw, uint32_t int_sts, + uint32_t y_err_sts, uint32_t uv_err_sts) +{ + uint32_t tmp; + list_sts tmp_lsts; + + if (!(y_err_sts & GET_Y0_ERR_MSK) && !(uv_err_sts & GET_UV0_ERR_MSK)) + return false; + + tmp_lsts = hw->rx_list_sts[0]; + + /* Y0 - DMA */ + tmp = y_err_sts & GET_Y0_ERR_MSK; + if (int_sts & INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_MASK) + hw->rx_list_sts[0] &= ~rx_waiting_y_intr; + + if (y_err_sts & MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK) { + hw->rx_list_sts[0] &= ~rx_waiting_y_intr; + tmp &= ~MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK; + } + + if (y_err_sts & MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK) { + hw->rx_list_sts[0] &= ~rx_y_mask; + hw->rx_list_sts[0] |= rx_y_error; + tmp &= ~MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK; + } + + if (tmp) { + hw->rx_list_sts[0] &= ~rx_y_mask; + hw->rx_list_sts[0] |= rx_y_error; + hw->rx_list_post_index = 0; + } + + /* UV0 - DMA */ + tmp = uv_err_sts & GET_UV0_ERR_MSK; + if (int_sts & INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_MASK) + hw->rx_list_sts[0] &= ~rx_waiting_uv_intr; + + if (uv_err_sts & MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK) { + hw->rx_list_sts[0] &= ~rx_waiting_uv_intr; + tmp &= ~MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK; + } + + if (uv_err_sts & MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK) { + hw->rx_list_sts[0] &= ~rx_uv_mask; + hw->rx_list_sts[0] |= rx_uv_error; + tmp &= ~MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK; + } + + if (tmp) { + hw->rx_list_sts[0] &= ~rx_uv_mask; + hw->rx_list_sts[0] |= rx_uv_error; + hw->rx_list_post_index = 0; + } + + if (y_err_sts & GET_Y0_ERR_MSK) { + tmp = y_err_sts & GET_Y0_ERR_MSK; + crystalhd_reg_wr(hw->adp, MISC1_Y_RX_ERROR_STATUS, tmp); + } + + if (uv_err_sts & GET_UV0_ERR_MSK) { + tmp = uv_err_sts & GET_UV0_ERR_MSK; + crystalhd_reg_wr(hw->adp, MISC1_UV_RX_ERROR_STATUS, tmp); + } + + return (tmp_lsts != hw->rx_list_sts[0]); +} + +static bool crystalhd_rx_list1_handler(struct crystalhd_hw *hw, uint32_t int_sts, + uint32_t y_err_sts, uint32_t uv_err_sts) +{ + uint32_t tmp; + list_sts tmp_lsts; + + if (!(y_err_sts & GET_Y1_ERR_MSK) && !(uv_err_sts & GET_UV1_ERR_MSK)) + return false; + + tmp_lsts = hw->rx_list_sts[1]; + + /* Y1 - DMA */ + tmp = y_err_sts & GET_Y1_ERR_MSK; + if (int_sts & INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_MASK) + hw->rx_list_sts[1] &= ~rx_waiting_y_intr; + + if (y_err_sts & MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK) { + hw->rx_list_sts[1] &= ~rx_waiting_y_intr; + tmp &= ~MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK; + } + + if (y_err_sts & MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK) { + /* Add retry-support..*/ + hw->rx_list_sts[1] &= ~rx_y_mask; + hw->rx_list_sts[1] |= rx_y_error; + tmp &= ~MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK; + } + + if (tmp) { + hw->rx_list_sts[1] &= ~rx_y_mask; + hw->rx_list_sts[1] |= rx_y_error; + hw->rx_list_post_index = 0; + } + + /* UV1 - DMA */ + tmp = uv_err_sts & GET_UV1_ERR_MSK; + if (int_sts & INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_MASK) { + hw->rx_list_sts[1] &= ~rx_waiting_uv_intr; + } + + if (uv_err_sts & MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK) { + hw->rx_list_sts[1] &= ~rx_waiting_uv_intr; + tmp &= ~MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK; + } + + if (uv_err_sts & MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK) { + /* Add retry-support*/ + hw->rx_list_sts[1] &= ~rx_uv_mask; + hw->rx_list_sts[1] |= rx_uv_error; + tmp &= ~MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK; + } + + if (tmp) { + hw->rx_list_sts[1] &= ~rx_uv_mask; + hw->rx_list_sts[1] |= rx_uv_error; + hw->rx_list_post_index = 0; + } + + if (y_err_sts & GET_Y1_ERR_MSK) { + tmp = y_err_sts & GET_Y1_ERR_MSK; + crystalhd_reg_wr(hw->adp, MISC1_Y_RX_ERROR_STATUS, tmp); + } + + if (uv_err_sts & GET_UV1_ERR_MSK) { + tmp = uv_err_sts & GET_UV1_ERR_MSK; + crystalhd_reg_wr(hw->adp, MISC1_UV_RX_ERROR_STATUS, tmp); + } + + return (tmp_lsts != hw->rx_list_sts[1]); +} + + +static void crystalhd_rx_isr(struct crystalhd_hw *hw, uint32_t intr_sts) +{ + unsigned long flags; + uint32_t i, list_avail = 0; + BC_STATUS comp_sts = BC_STS_NO_DATA; + uint32_t y_err_sts, uv_err_sts, y_dn_sz = 0, uv_dn_sz = 0; + bool ret = 0; + + if (!hw) { + BCMLOG_ERR("Invalid Arguments\n"); + return; + } + + if (!(intr_sts & GET_RX_INTR_MASK)) + return; + + y_err_sts = crystalhd_reg_rd(hw->adp, MISC1_Y_RX_ERROR_STATUS); + uv_err_sts = crystalhd_reg_rd(hw->adp, MISC1_UV_RX_ERROR_STATUS); + + for (i = 0; i < DMA_ENGINE_CNT; i++) { + /* Update States..*/ + spin_lock_irqsave(&hw->rx_lock, flags); + if (i == 0) + ret = crystalhd_rx_list0_handler(hw, intr_sts, y_err_sts, uv_err_sts); + else + ret = crystalhd_rx_list1_handler(hw, intr_sts, y_err_sts, uv_err_sts); + if (ret) { + switch (hw->rx_list_sts[i]) { + case sts_free: + comp_sts = BC_STS_SUCCESS; + list_avail = 1; + break; + case rx_y_error: + case rx_uv_error: + case rx_sts_error: + /* We got error on both or Y or uv. */ + hw->stats.rx_errors++; + crystalhd_get_dnsz(hw, i, &y_dn_sz, &uv_dn_sz); + /* FIXME: jarod: this is where my mini pci-e card is tripping up */ + BCMLOG(BCMLOG_DBG, "list_index:%x rx[%d] Y:%x " + "UV:%x Int:%x YDnSz:%x UVDnSz:%x\n", + i, hw->stats.rx_errors, y_err_sts, + uv_err_sts, intr_sts, y_dn_sz, uv_dn_sz); + hw->rx_list_sts[i] = sts_free; + comp_sts = BC_STS_ERROR; + break; + default: + /* Wait for completion..*/ + comp_sts = BC_STS_NO_DATA; + break; + } + } + spin_unlock_irqrestore(&hw->rx_lock, flags); + + /* handle completion...*/ + if (comp_sts != BC_STS_NO_DATA) { + crystalhd_rx_pkt_done(hw, i, comp_sts); + comp_sts = BC_STS_NO_DATA; + } + } + + if (list_avail) { + if (hw->stop_pending) { + if ((hw->rx_list_sts[0] == sts_free) && + (hw->rx_list_sts[1] == sts_free)) + crystalhd_hw_finalize_pause(hw); + } else { + crystalhd_hw_start_capture(hw); + } + } +} + +static BC_STATUS crystalhd_fw_cmd_post_proc(struct crystalhd_hw *hw, + BC_FW_CMD *fw_cmd) +{ + BC_STATUS sts = BC_STS_SUCCESS; + DecRspChannelStartVideo *st_rsp = NULL; + + switch (fw_cmd->cmd[0]) { + case eCMD_C011_DEC_CHAN_START_VIDEO: + st_rsp = (DecRspChannelStartVideo *)fw_cmd->rsp; + hw->pib_del_Q_addr = st_rsp->picInfoDeliveryQ; + hw->pib_rel_Q_addr = st_rsp->picInfoReleaseQ; + BCMLOG(BCMLOG_DBG, "DelQAddr:%x RelQAddr:%x\n", + hw->pib_del_Q_addr, hw->pib_rel_Q_addr); + break; + case eCMD_C011_INIT: + if (!(crystalhd_load_firmware_config(hw->adp))) { + BCMLOG_ERR("Invalid Params.\n"); + sts = BC_STS_FW_AUTH_FAILED; + } + break; + default: + break; + } + return sts; +} + +static BC_STATUS crystalhd_put_ddr2sleep(struct crystalhd_hw *hw) +{ + uint32_t reg; + link_misc_perst_decoder_ctrl rst_cntrl_reg; + + /* Pulse reset pin of 7412 (MISC_PERST_DECODER_CTRL) */ + rst_cntrl_reg.whole_reg = crystalhd_reg_rd(hw->adp, MISC_PERST_DECODER_CTRL); + + rst_cntrl_reg.bcm_7412_rst = 1; + crystalhd_reg_wr(hw->adp, MISC_PERST_DECODER_CTRL, rst_cntrl_reg.whole_reg); + msleep_interruptible(50); + + rst_cntrl_reg.bcm_7412_rst = 0; + crystalhd_reg_wr(hw->adp, MISC_PERST_DECODER_CTRL, rst_cntrl_reg.whole_reg); + + /* Close all banks, put DDR in idle */ + bc_dec_reg_wr(hw->adp, SDRAM_PRECHARGE, 0); + + /* Set bit 25 (drop CKE pin of DDR) */ + reg = bc_dec_reg_rd(hw->adp, SDRAM_PARAM); + reg |= 0x02000000; + bc_dec_reg_wr(hw->adp, SDRAM_PARAM, reg); + + /* Reset the audio block */ + bc_dec_reg_wr(hw->adp, AUD_DSP_MISC_SOFT_RESET, 0x1); + + /* Power down Raptor PLL */ + reg = bc_dec_reg_rd(hw->adp, DecHt_PllCCtl); + reg |= 0x00008000; + bc_dec_reg_wr(hw->adp, DecHt_PllCCtl, reg); + + /* Power down all Audio PLL */ + bc_dec_reg_wr(hw->adp, AIO_MISC_PLL_RESET, 0x1); + + /* Power down video clock (75MHz) */ + reg = bc_dec_reg_rd(hw->adp, DecHt_PllECtl); + reg |= 0x00008000; + bc_dec_reg_wr(hw->adp, DecHt_PllECtl, reg); + + /* Power down video clock (75MHz) */ + reg = bc_dec_reg_rd(hw->adp, DecHt_PllDCtl); + reg |= 0x00008000; + bc_dec_reg_wr(hw->adp, DecHt_PllDCtl, reg); + + /* Power down core clock (200MHz) */ + reg = bc_dec_reg_rd(hw->adp, DecHt_PllACtl); + reg |= 0x00008000; + bc_dec_reg_wr(hw->adp, DecHt_PllACtl, reg); + + /* Power down core clock (200MHz) */ + reg = bc_dec_reg_rd(hw->adp, DecHt_PllBCtl); + reg |= 0x00008000; + bc_dec_reg_wr(hw->adp, DecHt_PllBCtl, reg); + + return BC_STS_SUCCESS; +} + +/************************************************ +** +*************************************************/ + +BC_STATUS crystalhd_download_fw(struct crystalhd_adp *adp, void *buffer, uint32_t sz) +{ + uint32_t reg_data, cnt, *temp_buff; + uint32_t fw_sig_len = 36; + uint32_t dram_offset = BC_FWIMG_ST_ADDR, sig_reg; + + BCMLOG_ENTER; + + if (!adp || !buffer || !sz) { + BCMLOG_ERR("Invalid Params.\n"); + return BC_STS_INV_ARG; + } + + reg_data = crystalhd_reg_rd(adp, OTP_CMD); + if (!(reg_data & 0x02)) { + BCMLOG_ERR("Invalid hw config.. otp not programmed\n"); + return BC_STS_ERROR; + } + + reg_data = 0; + crystalhd_reg_wr(adp, DCI_CMD, 0); + reg_data |= BC_BIT(0); + crystalhd_reg_wr(adp, DCI_CMD, reg_data); + + reg_data = 0; + cnt = 1000; + msleep_interruptible(10); + + while (reg_data != BC_BIT(4)) { + reg_data = crystalhd_reg_rd(adp, DCI_STATUS); + reg_data &= BC_BIT(4); + if (--cnt == 0) { + BCMLOG_ERR("Firmware Download RDY Timeout.\n"); + return BC_STS_TIMEOUT; + } + } + + msleep_interruptible(10); + /* Load the FW to the FW_ADDR field in the DCI_FIRMWARE_ADDR */ + crystalhd_reg_wr(adp, DCI_FIRMWARE_ADDR, dram_offset); + temp_buff = (uint32_t *)buffer; + for (cnt = 0; cnt < (sz - fw_sig_len); cnt += 4) { + crystalhd_reg_wr(adp, DCI_DRAM_BASE_ADDR, (dram_offset >> 19)); + crystalhd_reg_wr(adp, DCI_FIRMWARE_DATA, *temp_buff); + dram_offset += 4; + temp_buff++; + } + msleep_interruptible(10); + + temp_buff++; + + sig_reg = (uint32_t)DCI_SIGNATURE_DATA_7; + for (cnt = 0; cnt < 8; cnt++) { + uint32_t swapped_data = *temp_buff; + swapped_data = bswap_32_1(swapped_data); + crystalhd_reg_wr(adp, sig_reg, swapped_data); + sig_reg -= 4; + temp_buff++; + } + msleep_interruptible(10); + + reg_data = 0; + reg_data |= BC_BIT(1); + crystalhd_reg_wr(adp, DCI_CMD, reg_data); + msleep_interruptible(10); + + reg_data = 0; + reg_data = crystalhd_reg_rd(adp, DCI_STATUS); + + if ((reg_data & BC_BIT(9)) == BC_BIT(9)) { + cnt = 1000; + while ((reg_data & BC_BIT(0)) != BC_BIT(0)) { + reg_data = crystalhd_reg_rd(adp, DCI_STATUS); + reg_data &= BC_BIT(0); + if (!(--cnt)) + break; + msleep_interruptible(10); + } + reg_data = 0; + reg_data = crystalhd_reg_rd(adp, DCI_CMD); + reg_data |= BC_BIT(4); + crystalhd_reg_wr(adp, DCI_CMD, reg_data); + + } else { + BCMLOG_ERR("F/w Signature mismatch\n"); + return BC_STS_FW_AUTH_FAILED; + } + + BCMLOG(BCMLOG_INFO, "Firmware Downloaded Successfully\n"); + return BC_STS_SUCCESS;; +} + +BC_STATUS crystalhd_do_fw_cmd(struct crystalhd_hw *hw, BC_FW_CMD *fw_cmd) +{ + uint32_t cnt = 0, cmd_res_addr; + uint32_t *cmd_buff, *res_buff; + wait_queue_head_t fw_cmd_event; + int rc = 0; + BC_STATUS sts; + + crystalhd_create_event(&fw_cmd_event); + + BCMLOG_ENTER; + + if (!hw || !fw_cmd) { + BCMLOG_ERR("Invalid Arguments\n"); + return BC_STS_INV_ARG; + } + + cmd_buff = fw_cmd->cmd; + res_buff = fw_cmd->rsp; + + if (!cmd_buff || !res_buff) { + BCMLOG_ERR("Invalid Parameters for F/W Command \n"); + return BC_STS_INV_ARG; + } + + hw->pwr_lock++; + + hw->fwcmd_evt_sts = 0; + hw->pfw_cmd_event = &fw_cmd_event; + + /*Write the command to the memory*/ + crystalhd_mem_wr(hw->adp, TS_Host2CpuSnd, FW_CMD_BUFF_SZ, cmd_buff); + + /*Memory Read for memory arbitrator flush*/ + crystalhd_mem_rd(hw->adp, TS_Host2CpuSnd, 1, &cnt); + + /* Write the command address to mailbox */ + bc_dec_reg_wr(hw->adp, Hst2CpuMbx1, TS_Host2CpuSnd); + msleep_interruptible(50); + + crystalhd_wait_on_event(&fw_cmd_event, hw->fwcmd_evt_sts, 20000, rc, 0); + + if (!rc) { + sts = BC_STS_SUCCESS; + } else if (rc == -EBUSY) { + BCMLOG_ERR("Firmware command T/O\n"); + sts = BC_STS_TIMEOUT; + } else if (rc == -EINTR) { + BCMLOG(BCMLOG_DBG, "FwCmd Wait Signal int.\n"); + sts = BC_STS_IO_USER_ABORT; + } else { + BCMLOG_ERR("FwCmd IO Error.\n"); + sts = BC_STS_IO_ERROR; + } + + if (sts != BC_STS_SUCCESS) { + BCMLOG_ERR("FwCmd Failed.\n"); + hw->pwr_lock--; + return sts; + } + + /*Get the Responce Address*/ + cmd_res_addr = bc_dec_reg_rd(hw->adp, Cpu2HstMbx1); + + /*Read the Response*/ + crystalhd_mem_rd(hw->adp, cmd_res_addr, FW_CMD_BUFF_SZ, res_buff); + + hw->pwr_lock--; + + if (res_buff[2] != C011_RET_SUCCESS) { + BCMLOG_ERR("res_buff[2] != C011_RET_SUCCESS\n"); + return BC_STS_FW_CMD_ERR; + } + + sts = crystalhd_fw_cmd_post_proc(hw, fw_cmd); + if (sts != BC_STS_SUCCESS) + BCMLOG_ERR("crystalhd_fw_cmd_post_proc Failed.\n"); + + return sts; +} + +bool crystalhd_hw_interrupt(struct crystalhd_adp *adp, struct crystalhd_hw *hw) +{ + uint32_t intr_sts = 0; + uint32_t deco_intr = 0; + bool rc = 0; + + if (!adp || !hw->dev_started) + return rc; + + hw->stats.num_interrupts++; + hw->pwr_lock++; + + deco_intr = bc_dec_reg_rd(adp, Stream2Host_Intr_Sts); + intr_sts = crystalhd_reg_rd(adp, INTR_INTR_STATUS); + + if (intr_sts) { + /* let system know we processed interrupt..*/ + rc = 1; + hw->stats.dev_interrupts++; + } + + if (deco_intr && (deco_intr != 0xdeaddead)) { + + if (deco_intr & 0x80000000) { + /*Set the Event and the status flag*/ + if (hw->pfw_cmd_event) { + hw->fwcmd_evt_sts = 1; + crystalhd_set_event(hw->pfw_cmd_event); + } + } + + if (deco_intr & BC_BIT(1)) + crystalhd_hw_proc_pib(hw); + + bc_dec_reg_wr(adp, Stream2Host_Intr_Sts, deco_intr); + /* FIXME: jarod: No udelay? might this be the real reason mini pci-e cards were stalling out? */ + bc_dec_reg_wr(adp, Stream2Host_Intr_Sts, 0); + rc = 1; + } + + /* Rx interrupts */ + crystalhd_rx_isr(hw, intr_sts); + + /* Tx interrupts*/ + crystalhd_tx_isr(hw, intr_sts); + + /* Clear interrupts */ + if (rc) { + if (intr_sts) + crystalhd_reg_wr(adp, INTR_INTR_CLR_REG, intr_sts); + + crystalhd_reg_wr(adp, INTR_EOI_CTRL, 1); + } + + hw->pwr_lock--; + + return rc; +} + +BC_STATUS crystalhd_hw_open(struct crystalhd_hw *hw, struct crystalhd_adp *adp) +{ + if (!hw || !adp) { + BCMLOG_ERR("Invalid Arguments\n"); + return BC_STS_INV_ARG; + } + + if (hw->dev_started) + return BC_STS_SUCCESS; + + memset(hw, 0, sizeof(struct crystalhd_hw)); + + hw->adp = adp; + spin_lock_init(&hw->lock); + spin_lock_init(&hw->rx_lock); + /* FIXME: jarod: what are these magic numbers?!? */ + hw->tx_ioq_tag_seed = 0x70023070; + hw->rx_pkt_tag_seed = 0x70029070; + + hw->stop_pending = 0; + crystalhd_start_device(hw->adp); + hw->dev_started = true; + + /* set initial core clock */ + hw->core_clock_mhz = CLOCK_PRESET; + hw->prev_n = 0; + hw->pwr_lock = 0; + crystalhd_hw_set_core_clock(hw); + + return BC_STS_SUCCESS; +} + +BC_STATUS crystalhd_hw_close(struct crystalhd_hw *hw) +{ + if (!hw) { + BCMLOG_ERR("Invalid Arguments\n"); + return BC_STS_INV_ARG; + } + + if (!hw->dev_started) + return BC_STS_SUCCESS; + + /* Stop and DDR sleep will happen in here */ + crystalhd_hw_suspend(hw); + hw->dev_started = false; + + return BC_STS_SUCCESS; +} + +BC_STATUS crystalhd_hw_setup_dma_rings(struct crystalhd_hw *hw) +{ + unsigned int i; + void *mem; + size_t mem_len; + dma_addr_t phy_addr; + BC_STATUS sts = BC_STS_SUCCESS; + crystalhd_rx_dma_pkt *rpkt; + + if (!hw || !hw->adp) { + BCMLOG_ERR("Invalid Arguments\n"); + return BC_STS_INV_ARG; + } + + sts = crystalhd_hw_create_ioqs(hw); + if (sts != BC_STS_SUCCESS) { + BCMLOG_ERR("Failed to create IOQs..\n"); + return sts; + } + + mem_len = BC_LINK_MAX_SGLS * sizeof(dma_descriptor); + + for (i = 0; i < BC_TX_LIST_CNT; i++) { + mem = bc_kern_dma_alloc(hw->adp, mem_len, &phy_addr); + if (mem) { + memset(mem, 0, mem_len); + } else { + BCMLOG_ERR("Insufficient Memory For TX\n"); + crystalhd_hw_free_dma_rings(hw); + return BC_STS_INSUFF_RES; + } + /* rx_pkt_pool -- static memory allocation */ + hw->tx_pkt_pool[i].desc_mem.pdma_desc_start = mem; + hw->tx_pkt_pool[i].desc_mem.phy_addr = phy_addr; + hw->tx_pkt_pool[i].desc_mem.sz = BC_LINK_MAX_SGLS * + sizeof(dma_descriptor); + hw->tx_pkt_pool[i].list_tag = 0; + + /* Add TX dma requests to Free Queue..*/ + sts = crystalhd_dioq_add(hw->tx_freeq, + &hw->tx_pkt_pool[i], false, 0); + if (sts != BC_STS_SUCCESS) { + crystalhd_hw_free_dma_rings(hw); + return sts; + } + } + + for (i = 0; i < BC_RX_LIST_CNT; i++) { + rpkt = kzalloc(sizeof(*rpkt), GFP_KERNEL); + if (!rpkt) { + BCMLOG_ERR("Insufficient Memory For RX\n"); + crystalhd_hw_free_dma_rings(hw); + return BC_STS_INSUFF_RES; + } + + mem = bc_kern_dma_alloc(hw->adp, mem_len, &phy_addr); + if (mem) { + memset(mem, 0, mem_len); + } else { + BCMLOG_ERR("Insufficient Memory For RX\n"); + crystalhd_hw_free_dma_rings(hw); + return BC_STS_INSUFF_RES; + } + rpkt->desc_mem.pdma_desc_start = mem; + rpkt->desc_mem.phy_addr = phy_addr; + rpkt->desc_mem.sz = BC_LINK_MAX_SGLS * sizeof(dma_descriptor); + rpkt->pkt_tag = hw->rx_pkt_tag_seed + i; + crystalhd_hw_free_rx_pkt(hw, rpkt); + } + + return BC_STS_SUCCESS; +} + +BC_STATUS crystalhd_hw_free_dma_rings(struct crystalhd_hw *hw) +{ + unsigned int i; + crystalhd_rx_dma_pkt *rpkt = NULL; + + if (!hw || !hw->adp) { + BCMLOG_ERR("Invalid Arguments\n"); + return BC_STS_INV_ARG; + } + + /* Delete all IOQs.. */ + crystalhd_hw_delete_ioqs(hw); + + for (i = 0; i < BC_TX_LIST_CNT; i++) { + if (hw->tx_pkt_pool[i].desc_mem.pdma_desc_start) { + bc_kern_dma_free(hw->adp, + hw->tx_pkt_pool[i].desc_mem.sz, + hw->tx_pkt_pool[i].desc_mem.pdma_desc_start, + hw->tx_pkt_pool[i].desc_mem.phy_addr); + + hw->tx_pkt_pool[i].desc_mem.pdma_desc_start = NULL; + } + } + + BCMLOG(BCMLOG_DBG, "Releasing RX Pkt pool\n"); + do { + rpkt = crystalhd_hw_alloc_rx_pkt(hw); + if (!rpkt) + break; + bc_kern_dma_free(hw->adp, rpkt->desc_mem.sz, + rpkt->desc_mem.pdma_desc_start, + rpkt->desc_mem.phy_addr); + kfree(rpkt); + } while (rpkt); + + return BC_STS_SUCCESS; +} + +BC_STATUS crystalhd_hw_post_tx(struct crystalhd_hw *hw, crystalhd_dio_req *ioreq, + hw_comp_callback call_back, + wait_queue_head_t *cb_event, uint32_t *list_id, + uint8_t data_flags) +{ + tx_dma_pkt *tx_dma_packet = NULL; + uint32_t first_desc_u_addr, first_desc_l_addr; + uint32_t low_addr, high_addr; + addr_64 desc_addr; + BC_STATUS sts, add_sts; + uint32_t dummy_index = 0; + unsigned long flags; + bool rc; + + if (!hw || !ioreq || !call_back || !cb_event || !list_id) { + BCMLOG_ERR("Invalid Arguments\n"); + return BC_STS_INV_ARG; + } + + /* + * Since we hit code in busy condition very frequently, + * we will check the code in status first before + * checking the availability of free elem. + * + * This will avoid the Q fetch/add in normal condition. + */ + rc = crystalhd_code_in_full(hw->adp, ioreq->uinfo.xfr_len, + false, data_flags); + if (rc) { + hw->stats.cin_busy++; + return BC_STS_BUSY; + } + + /* Get a list from TxFreeQ */ + tx_dma_packet = (tx_dma_pkt *)crystalhd_dioq_fetch(hw->tx_freeq); + if (!tx_dma_packet) { + BCMLOG_ERR("No empty elements..\n"); + return BC_STS_ERR_USAGE; + } + + sts = crystalhd_xlat_sgl_to_dma_desc(ioreq, + &tx_dma_packet->desc_mem, + &dummy_index); + if (sts != BC_STS_SUCCESS) { + add_sts = crystalhd_dioq_add(hw->tx_freeq, tx_dma_packet, + false, 0); + if (add_sts != BC_STS_SUCCESS) + BCMLOG_ERR("double fault..\n"); + + return sts; + } + + hw->pwr_lock++; + + desc_addr.full_addr = tx_dma_packet->desc_mem.phy_addr; + low_addr = desc_addr.low_part; + high_addr = desc_addr.high_part; + + tx_dma_packet->call_back = call_back; + tx_dma_packet->cb_event = cb_event; + tx_dma_packet->dio_req = ioreq; + + spin_lock_irqsave(&hw->lock, flags); + + if (hw->tx_list_post_index == 0) { + first_desc_u_addr = MISC1_TX_FIRST_DESC_U_ADDR_LIST0; + first_desc_l_addr = MISC1_TX_FIRST_DESC_L_ADDR_LIST0; + } else { + first_desc_u_addr = MISC1_TX_FIRST_DESC_U_ADDR_LIST1; + first_desc_l_addr = MISC1_TX_FIRST_DESC_L_ADDR_LIST1; + } + + *list_id = tx_dma_packet->list_tag = hw->tx_ioq_tag_seed + + hw->tx_list_post_index; + + hw->tx_list_post_index = (hw->tx_list_post_index + 1) % DMA_ENGINE_CNT; + + spin_unlock_irqrestore(&hw->lock, flags); + + + /* Insert in Active Q..*/ + crystalhd_dioq_add(hw->tx_actq, tx_dma_packet, false, + tx_dma_packet->list_tag); + + /* + * Interrupt will come as soon as you write + * the valid bit. So be ready for that. All + * the initialization should happen before that. + */ + crystalhd_start_tx_dma_engine(hw); + crystalhd_reg_wr(hw->adp, first_desc_u_addr, desc_addr.high_part); + + crystalhd_reg_wr(hw->adp, first_desc_l_addr, desc_addr.low_part | 0x01); + /* Be sure we set the valid bit ^^^^ */ + + return BC_STS_SUCCESS; +} + +/* + * This is a force cancel and we are racing with ISR. + * + * Will try to remove the req from ActQ before ISR gets it. + * If ISR gets it first then the completion happens in the + * normal path and we will return _STS_NO_DATA from here. + * + * FIX_ME: Not Tested the actual condition.. + */ +BC_STATUS crystalhd_hw_cancel_tx(struct crystalhd_hw *hw, uint32_t list_id) +{ + if (!hw || !list_id) { + BCMLOG_ERR("Invalid Arguments\n"); + return BC_STS_INV_ARG; + } + + crystalhd_stop_tx_dma_engine(hw); + crystalhd_hw_tx_req_complete(hw, list_id, BC_STS_IO_USER_ABORT); + + return BC_STS_SUCCESS; +} + +BC_STATUS crystalhd_hw_add_cap_buffer(struct crystalhd_hw *hw, + crystalhd_dio_req *ioreq, bool en_post) +{ + crystalhd_rx_dma_pkt *rpkt; + uint32_t tag, uv_desc_ix = 0; + BC_STATUS sts; + + if (!hw || !ioreq) { + BCMLOG_ERR("Invalid Arguments\n"); + return BC_STS_INV_ARG; + } + + rpkt = crystalhd_hw_alloc_rx_pkt(hw); + if (!rpkt) { + BCMLOG_ERR("Insufficient resources\n"); + return BC_STS_INSUFF_RES; + } + + rpkt->dio_req = ioreq; + tag = rpkt->pkt_tag; + + sts = crystalhd_xlat_sgl_to_dma_desc(ioreq, &rpkt->desc_mem, &uv_desc_ix); + if (sts != BC_STS_SUCCESS) + return sts; + + rpkt->uv_phy_addr = 0; + + /* Store the address of UV in the rx packet for post*/ + if (uv_desc_ix) + rpkt->uv_phy_addr = rpkt->desc_mem.phy_addr + + (sizeof(dma_descriptor) * (uv_desc_ix + 1)); + + if (en_post) + sts = crystalhd_hw_post_cap_buff(hw, rpkt); + else + sts = crystalhd_dioq_add(hw->rx_freeq, rpkt, false, tag); + + return sts; +} + +BC_STATUS crystalhd_hw_get_cap_buffer(struct crystalhd_hw *hw, + BC_PIC_INFO_BLOCK *pib, + crystalhd_dio_req **ioreq) +{ + crystalhd_rx_dma_pkt *rpkt; + uint32_t timeout = BC_PROC_OUTPUT_TIMEOUT / 1000; + uint32_t sig_pending = 0; + + + if (!hw || !ioreq || !pib) { + BCMLOG_ERR("Invalid Arguments\n"); + return BC_STS_INV_ARG; + } + + rpkt = crystalhd_dioq_fetch_wait(hw->rx_rdyq, timeout, &sig_pending); + if (!rpkt) { + if (sig_pending) { + BCMLOG(BCMLOG_INFO, "wait on frame time out %d\n", sig_pending); + return BC_STS_IO_USER_ABORT; + } else { + return BC_STS_TIMEOUT; + } + } + + rpkt->dio_req->uinfo.comp_flags = rpkt->flags; + + if (rpkt->flags & COMP_FLAG_PIB_VALID) + memcpy(pib, &rpkt->pib, sizeof(*pib)); + + *ioreq = rpkt->dio_req; + + crystalhd_hw_free_rx_pkt(hw, rpkt); + + return BC_STS_SUCCESS; +} + +BC_STATUS crystalhd_hw_start_capture(struct crystalhd_hw *hw) +{ + crystalhd_rx_dma_pkt *rx_pkt; + BC_STATUS sts; + uint32_t i; + + if (!hw) { + BCMLOG_ERR("Invalid Arguments\n"); + return BC_STS_INV_ARG; + } + + /* This is start of capture.. Post to both the lists.. */ + for (i = 0; i < DMA_ENGINE_CNT; i++) { + rx_pkt = crystalhd_dioq_fetch(hw->rx_freeq); + if (!rx_pkt) + return BC_STS_NO_DATA; + sts = crystalhd_hw_post_cap_buff(hw, rx_pkt); + if (BC_STS_SUCCESS != sts) + break; + + } + + return BC_STS_SUCCESS; +} + +BC_STATUS crystalhd_hw_stop_capture(struct crystalhd_hw *hw) +{ + void *temp = NULL; + + if (!hw) { + BCMLOG_ERR("Invalid Arguments\n"); + return BC_STS_INV_ARG; + } + + crystalhd_stop_rx_dma_engine(hw); + + do { + temp = crystalhd_dioq_fetch(hw->rx_freeq); + if (temp) + crystalhd_rx_pkt_rel_call_back(hw, temp); + } while (temp); + + return BC_STS_SUCCESS; +} + +BC_STATUS crystalhd_hw_pause(struct crystalhd_hw *hw) +{ + hw->stats.pause_cnt++; + hw->stop_pending = 1; + + if ((hw->rx_list_sts[0] == sts_free) && + (hw->rx_list_sts[1] == sts_free)) + crystalhd_hw_finalize_pause(hw); + + return BC_STS_SUCCESS; +} + +BC_STATUS crystalhd_hw_unpause(struct crystalhd_hw *hw) +{ + BC_STATUS sts; + uint32_t aspm; + + hw->stop_pending = 0; + + aspm = crystalhd_reg_rd(hw->adp, PCIE_DLL_DATA_LINK_CONTROL); + aspm &= ~ASPM_L1_ENABLE; +/* NAREN BCMLOG(BCMLOG_INFO, "aspm off\n"); */ + crystalhd_reg_wr(hw->adp, PCIE_DLL_DATA_LINK_CONTROL, aspm); + + sts = crystalhd_hw_start_capture(hw); + return sts; +} + +BC_STATUS crystalhd_hw_suspend(struct crystalhd_hw *hw) +{ + BC_STATUS sts; + + if (!hw) { + BCMLOG_ERR("Invalid Arguments\n"); + return BC_STS_INV_ARG; + } + + sts = crystalhd_put_ddr2sleep(hw); + if (sts != BC_STS_SUCCESS) { + BCMLOG_ERR("Failed to Put DDR To Sleep!!\n"); + return BC_STS_ERROR; + } + + if (!crystalhd_stop_device(hw->adp)) { + BCMLOG_ERR("Failed to Stop Device!!\n"); + return BC_STS_ERROR; + } + + return BC_STS_SUCCESS; +} + +void crystalhd_hw_stats(struct crystalhd_hw *hw, struct crystalhd_hw_stats *stats) +{ + if (!hw) { + BCMLOG_ERR("Invalid Arguments\n"); + return; + } + + /* if called w/NULL stats, its a req to zero out the stats */ + if (!stats) { + memset(&hw->stats, 0, sizeof(hw->stats)); + return; + } + + hw->stats.freeq_count = crystalhd_dioq_count(hw->rx_freeq); + hw->stats.rdyq_count = crystalhd_dioq_count(hw->rx_rdyq); + memcpy(stats, &hw->stats, sizeof(*stats)); +} + +BC_STATUS crystalhd_hw_set_core_clock(struct crystalhd_hw *hw) +{ + uint32_t reg, n, i; + uint32_t vco_mg, refresh_reg; + + if (!hw) { + BCMLOG_ERR("Invalid Arguments\n"); + return BC_STS_INV_ARG; + } + + /* FIXME: jarod: wha? */ + /*n = (hw->core_clock_mhz * 3) / 20 + 1; */ + n = hw->core_clock_mhz/5; + + if (n == hw->prev_n) + return BC_STS_CLK_NOCHG; + + if (hw->pwr_lock > 0) { + /* BCMLOG(BCMLOG_INFO,"pwr_lock is %u\n", hw->pwr_lock) */ + return BC_STS_CLK_NOCHG; + } + + i = n * 27; + if (i < 560) + vco_mg = 0; + else if (i < 900) + vco_mg = 1; + else if (i < 1030) + vco_mg = 2; + else + vco_mg = 3; + + reg = bc_dec_reg_rd(hw->adp, DecHt_PllACtl); + + reg &= 0xFFFFCFC0; + reg |= n; + reg |= vco_mg << 12; + + BCMLOG(BCMLOG_INFO, "clock is moving to %d with n %d with vco_mg %d\n", + hw->core_clock_mhz, n, vco_mg); + + /* Change the DRAM refresh rate to accomodate the new frequency */ + /* refresh reg = ((refresh_rate * clock_rate)/16) - 1; rounding up*/ + refresh_reg = (7 * hw->core_clock_mhz / 16); + bc_dec_reg_wr(hw->adp, SDRAM_REF_PARAM, ((1 << 12) | refresh_reg)); + + bc_dec_reg_wr(hw->adp, DecHt_PllACtl, reg); + + i = 0; + + for (i = 0; i < 10; i++) { + reg = bc_dec_reg_rd(hw->adp, DecHt_PllACtl); + + if (reg & 0x00020000) { + hw->prev_n = n; + /* FIXME: jarod: outputting a random "C" is... confusing... */ + BCMLOG(BCMLOG_INFO, "C"); + return BC_STS_SUCCESS; + } else { + msleep_interruptible(10); + } + } + BCMLOG(BCMLOG_INFO, "clk change failed\n"); + return BC_STS_CLK_NOCHG; +} diff --git a/drivers/staging/crystalhd/crystalhd_hw.h b/drivers/staging/crystalhd/crystalhd_hw.h new file mode 100644 index 000000000000..1c6318e912ac --- /dev/null +++ b/drivers/staging/crystalhd/crystalhd_hw.h @@ -0,0 +1,398 @@ +/*************************************************************************** + * Copyright (c) 2005-2009, Broadcom Corporation. + * + * Name: crystalhd_hw . h + * + * Description: + * BCM70012 Linux driver hardware layer. + * + * HISTORY: + * + ********************************************************************** + * This file is part of the crystalhd device driver. + * + * This driver is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 2 of the License. + * + * This driver is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this driver. If not, see . + **********************************************************************/ + +#ifndef _CRYSTALHD_HW_H_ +#define _CRYSTALHD_HW_H_ + +#include "crystalhd_misc.h" +#include "crystalhd_fw_if.h" + +/* HW constants..*/ +#define DMA_ENGINE_CNT 2 +#define MAX_PIB_Q_DEPTH 64 +#define MIN_PIB_Q_DEPTH 2 +#define WR_POINTER_OFF 4 + +#define ASPM_L1_ENABLE (BC_BIT(27)) + +/************************************************* + 7412 Decoder Registers. +**************************************************/ +#define FW_CMD_BUFF_SZ 64 +#define TS_Host2CpuSnd 0x00000100 +#define Hst2CpuMbx1 0x00100F00 +#define Cpu2HstMbx1 0x00100F04 +#define MbxStat1 0x00100F08 +#define Stream2Host_Intr_Sts 0x00100F24 +#define C011_RET_SUCCESS 0x0 /* Reutrn status of firmware command. */ + +/* TS input status register */ +#define TS_StreamAFIFOStatus 0x0010044C +#define TS_StreamBFIFOStatus 0x0010084C + +/*UART Selection definitions*/ +#define UartSelectA 0x00100300 +#define UartSelectB 0x00100304 + +#define BSVS_UART_DEC_NONE 0x00 +#define BSVS_UART_DEC_OUTER 0x01 +#define BSVS_UART_DEC_INNER 0x02 +#define BSVS_UART_STREAM 0x03 + +/* Code-In fifo */ +#define REG_DecCA_RegCinCTL 0xa00 +#define REG_DecCA_RegCinBase 0xa0c +#define REG_DecCA_RegCinEnd 0xa10 +#define REG_DecCA_RegCinWrPtr 0xa04 +#define REG_DecCA_RegCinRdPtr 0xa08 + +#define REG_Dec_TsUser0Base 0x100864 +#define REG_Dec_TsUser0Rdptr 0x100868 +#define REG_Dec_TsUser0Wrptr 0x10086C +#define REG_Dec_TsUser0End 0x100874 + +/* ASF Case ...*/ +#define REG_Dec_TsAudCDB2Base 0x10036c +#define REG_Dec_TsAudCDB2Rdptr 0x100378 +#define REG_Dec_TsAudCDB2Wrptr 0x100374 +#define REG_Dec_TsAudCDB2End 0x100370 + +/* DRAM bringup Registers */ +#define SDRAM_PARAM 0x00040804 +#define SDRAM_PRECHARGE 0x000408B0 +#define SDRAM_EXT_MODE 0x000408A4 +#define SDRAM_MODE 0x000408A0 +#define SDRAM_REFRESH 0x00040890 +#define SDRAM_REF_PARAM 0x00040808 + +#define DecHt_PllACtl 0x34000C +#define DecHt_PllBCtl 0x340010 +#define DecHt_PllCCtl 0x340014 +#define DecHt_PllDCtl 0x340034 +#define DecHt_PllECtl 0x340038 +#define AUD_DSP_MISC_SOFT_RESET 0x00240104 +#define AIO_MISC_PLL_RESET 0x0026000C +#define PCIE_CLK_REQ_REG 0xDC +#define PCI_CLK_REQ_ENABLE (BC_BIT(8)) + +/************************************************* + F/W Copy engine definitions.. +**************************************************/ +#define BC_FWIMG_ST_ADDR 0x00000000 +/* FIXME: jarod: there's a kernel function that'll do this for us... */ +#define rotr32_1(x, n) (((x) >> n) | ((x) << (32 - n))) +#define bswap_32_1(x) ((rotr32_1((x), 24) & 0x00ff00ff) | (rotr32_1((x), 8) & 0xff00ff00)) + +#define DecHt_HostSwReset 0x340000 +#define BC_DRAM_FW_CFG_ADDR 0x001c2000 + +typedef union _addr_64_ { + struct { + uint32_t low_part; + uint32_t high_part; + }; + + uint64_t full_addr; + +} addr_64; + +typedef union _intr_mask_reg_ { + struct { + uint32_t mask_tx_done:1; + uint32_t mask_tx_err:1; + uint32_t mask_rx_done:1; + uint32_t mask_rx_err:1; + uint32_t mask_pcie_err:1; + uint32_t mask_pcie_rbusmast_err:1; + uint32_t mask_pcie_rgr_bridge:1; + uint32_t reserved:25; + }; + + uint32_t whole_reg; + +} intr_mask_reg; + +typedef union _link_misc_perst_deco_ctrl_ { + struct { + uint32_t bcm7412_rst:1; /* 1 -> BCM7412 is held in reset. Reset value 1.*/ + uint32_t reserved0:3; /* Reserved.No Effect*/ + uint32_t stop_bcm_7412_clk:1; /* 1 ->Stops branch of 27MHz clk used to clk BCM7412*/ + uint32_t reserved1:27; /* Reseved. No Effect*/ + }; + + uint32_t whole_reg; + +} link_misc_perst_deco_ctrl; + +typedef union _link_misc_perst_clk_ctrl_ { + struct { + uint32_t sel_alt_clk:1; /* When set, selects a 6.75MHz clock as the source of core_clk */ + uint32_t stop_core_clk:1; /* When set, stops the branch of core_clk that is not needed for low power operation */ + uint32_t pll_pwr_dn:1; /* When set, powers down the main PLL. The alternate clock bit should be set + to select an alternate clock before setting this bit.*/ + uint32_t reserved0:5; /* Reserved */ + uint32_t pll_mult:8; /* This setting controls the multiplier for the PLL. */ + uint32_t pll_div:4; /* This setting controls the divider for the PLL. */ + uint32_t reserved1:12; /* Reserved */ + }; + + uint32_t whole_reg; + +} link_misc_perst_clk_ctrl; + + +typedef union _link_misc_perst_decoder_ctrl_ { + struct { + uint32_t bcm_7412_rst:1; /* 1 -> BCM7412 is held in reset. Reset value 1.*/ + uint32_t res0:3; /* Reserved.No Effect*/ + uint32_t stop_7412_clk:1; /* 1 ->Stops branch of 27MHz clk used to clk BCM7412*/ + uint32_t res1:27; /* Reseved. No Effect */ + }; + + uint32_t whole_reg; + +} link_misc_perst_decoder_ctrl; + + +typedef union _desc_low_addr_reg_ { + struct { + uint32_t list_valid:1; + uint32_t reserved:4; + uint32_t low_addr:27; + }; + + uint32_t whole_reg; + +} desc_low_addr_reg; + +typedef struct _dma_descriptor_ { /* 8 32-bit values */ + /* 0th u32 */ + uint32_t sdram_buff_addr:28; /* bits 0-27: SDRAM Address */ + uint32_t res0:4; /* bits 28-31: Reserved */ + + /* 1st u32 */ + uint32_t buff_addr_low; /* 1 buffer address low */ + uint32_t buff_addr_high; /* 2 buffer address high */ + + /* 3rd u32 */ + uint32_t res2:2; /* 0-1 - Reserved */ + uint32_t xfer_size:23; /* 2-24 = Xfer size in words */ + uint32_t res3:6; /* 25-30 reserved */ + uint32_t intr_enable:1; /* 31 - Interrupt After this desc */ + + /* 4th u32 */ + uint32_t endian_xlat_align:2; /* 0-1 Endian Translation */ + uint32_t next_desc_cont:1; /* 2 - Next desc is in contig memory */ + uint32_t res4:25; /* 3 - 27 Reserved bits */ + uint32_t fill_bytes:2; /* 28-29 Bits Fill Bytes */ + uint32_t dma_dir:1; /* 30 bit DMA Direction */ + uint32_t last_rec_indicator:1; /* 31 bit Last Record Indicator */ + + /* 5th u32 */ + uint32_t next_desc_addr_low; /* 32-bits Next Desc Addr lower */ + + /* 6th u32 */ + uint32_t next_desc_addr_high; /* 32-bits Next Desc Addr Higher */ + + /* 7th u32 */ + uint32_t res8; /* Last 32bits reserved */ + +} dma_descriptor, *pdma_descriptor; + +/* + * We will allocate the memory in 4K pages + * the linked list will be a list of 32 byte descriptors. + * The virtual address will determine what should be freed. + */ +typedef struct _dma_desc_mem_ { + pdma_descriptor pdma_desc_start; /* 32-bytes for dma descriptor. should be first element */ + dma_addr_t phy_addr; /* physical address of each DMA desc */ + uint32_t sz; + struct _dma_desc_mem_ *Next; /* points to Next Descriptor in chain */ + +} dma_desc_mem, *pdma_desc_mem; + + + +typedef enum _list_sts_ { + sts_free = 0, + + /* RX-Y Bits 0:7 */ + rx_waiting_y_intr = 0x00000001, + rx_y_error = 0x00000004, + + /* RX-UV Bits 8:16 */ + rx_waiting_uv_intr = 0x0000100, + rx_uv_error = 0x0000400, + + rx_sts_waiting = (rx_waiting_y_intr|rx_waiting_uv_intr), + rx_sts_error = (rx_y_error|rx_uv_error), + + rx_y_mask = 0x000000FF, + rx_uv_mask = 0x0000FF00, + +} list_sts; + +typedef struct _tx_dma_pkt_ { + dma_desc_mem desc_mem; + hw_comp_callback call_back; + crystalhd_dio_req *dio_req; + wait_queue_head_t *cb_event; + uint32_t list_tag; + +} tx_dma_pkt; + +typedef struct _crystalhd_rx_dma_pkt { + dma_desc_mem desc_mem; + crystalhd_dio_req *dio_req; + uint32_t pkt_tag; + uint32_t flags; + BC_PIC_INFO_BLOCK pib; + dma_addr_t uv_phy_addr; + struct _crystalhd_rx_dma_pkt *next; + +} crystalhd_rx_dma_pkt; + +struct crystalhd_hw_stats{ + uint32_t rx_errors; + uint32_t tx_errors; + uint32_t freeq_count; + uint32_t rdyq_count; + uint32_t num_interrupts; + uint32_t dev_interrupts; + uint32_t cin_busy; + uint32_t pause_cnt; +}; + +struct crystalhd_hw { + tx_dma_pkt tx_pkt_pool[DMA_ENGINE_CNT]; + spinlock_t lock; + + uint32_t tx_ioq_tag_seed; + uint32_t tx_list_post_index; + + crystalhd_rx_dma_pkt *rx_pkt_pool_head; + uint32_t rx_pkt_tag_seed; + + bool dev_started; + void *adp; + + wait_queue_head_t *pfw_cmd_event; + int fwcmd_evt_sts; + + uint32_t pib_del_Q_addr; + uint32_t pib_rel_Q_addr; + + crystalhd_dioq_t *tx_freeq; + crystalhd_dioq_t *tx_actq; + + /* Rx DMA Engine Specific Locks */ + spinlock_t rx_lock; + uint32_t rx_list_post_index; + list_sts rx_list_sts[DMA_ENGINE_CNT]; + crystalhd_dioq_t *rx_rdyq; + crystalhd_dioq_t *rx_freeq; + crystalhd_dioq_t *rx_actq; + uint32_t stop_pending; + + /* HW counters.. */ + struct crystalhd_hw_stats stats; + + /* Core clock in MHz */ + uint32_t core_clock_mhz; + uint32_t prev_n; + uint32_t pwr_lock; +}; + +/* Clock defines for power control */ +#define CLOCK_PRESET 175 + +/* DMA engine register BIT mask wrappers.. */ +#define DMA_START_BIT MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_MASK + +#define GET_RX_INTR_MASK (INTR_INTR_STATUS_L1_UV_RX_DMA_ERR_INTR_MASK | \ + INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_MASK | \ + INTR_INTR_STATUS_L1_Y_RX_DMA_ERR_INTR_MASK | \ + INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_MASK | \ + INTR_INTR_STATUS_L0_UV_RX_DMA_ERR_INTR_MASK | \ + INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_MASK | \ + INTR_INTR_STATUS_L0_Y_RX_DMA_ERR_INTR_MASK | \ + INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_MASK) + +#define GET_Y0_ERR_MSK (MISC1_Y_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_MASK | \ + MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK | \ + MISC1_Y_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_MASK | \ + MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK) + +#define GET_UV0_ERR_MSK (MISC1_UV_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_MASK | \ + MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK | \ + MISC1_UV_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_MASK | \ + MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK) + +#define GET_Y1_ERR_MSK (MISC1_Y_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_MASK | \ + MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK | \ + MISC1_Y_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_MASK | \ + MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK) + +#define GET_UV1_ERR_MSK (MISC1_UV_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_MASK | \ + MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK | \ + MISC1_UV_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_MASK | \ + MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK) + + +/**** API Exposed to the other layers ****/ +BC_STATUS crystalhd_download_fw(struct crystalhd_adp *adp, + void *buffer, uint32_t sz); +BC_STATUS crystalhd_do_fw_cmd(struct crystalhd_hw *hw, BC_FW_CMD *fw_cmd); +bool crystalhd_hw_interrupt(struct crystalhd_adp *adp, struct crystalhd_hw *hw); +BC_STATUS crystalhd_hw_open(struct crystalhd_hw *, struct crystalhd_adp *); +BC_STATUS crystalhd_hw_close(struct crystalhd_hw *); +BC_STATUS crystalhd_hw_setup_dma_rings(struct crystalhd_hw *); +BC_STATUS crystalhd_hw_free_dma_rings(struct crystalhd_hw *); + + +BC_STATUS crystalhd_hw_post_tx(struct crystalhd_hw *hw, crystalhd_dio_req *ioreq, + hw_comp_callback call_back, + wait_queue_head_t *cb_event, + uint32_t *list_id, uint8_t data_flags); + +BC_STATUS crystalhd_hw_pause(struct crystalhd_hw *hw); +BC_STATUS crystalhd_hw_unpause(struct crystalhd_hw *hw); +BC_STATUS crystalhd_hw_suspend(struct crystalhd_hw *hw); +BC_STATUS crystalhd_hw_cancel_tx(struct crystalhd_hw *hw, uint32_t list_id); +BC_STATUS crystalhd_hw_add_cap_buffer(struct crystalhd_hw *hw, + crystalhd_dio_req *ioreq, bool en_post); +BC_STATUS crystalhd_hw_get_cap_buffer(struct crystalhd_hw *hw, + BC_PIC_INFO_BLOCK *pib, + crystalhd_dio_req **ioreq); +BC_STATUS crystalhd_hw_stop_capture(struct crystalhd_hw *hw); +BC_STATUS crystalhd_hw_start_capture(struct crystalhd_hw *hw); +void crystalhd_hw_stats(struct crystalhd_hw *hw, struct crystalhd_hw_stats *stats); + +/* API to program the core clock on the decoder */ +BC_STATUS crystalhd_hw_set_core_clock(struct crystalhd_hw *); + +#endif diff --git a/drivers/staging/crystalhd/crystalhd_lnx.c b/drivers/staging/crystalhd/crystalhd_lnx.c new file mode 100644 index 000000000000..1f36b4db6fce --- /dev/null +++ b/drivers/staging/crystalhd/crystalhd_lnx.c @@ -0,0 +1,780 @@ +/*************************************************************************** + * Copyright (c) 2005-2009, Broadcom Corporation. + * + * Name: crystalhd_lnx . c + * + * Description: + * BCM70010 Linux driver + * + * HISTORY: + * + ********************************************************************** + * This file is part of the crystalhd device driver. + * + * This driver is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 2 of the License. + * + * This driver is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this driver. If not, see . + **********************************************************************/ + +#include + +#include "crystalhd_lnx.h" + +static struct class *crystalhd_class; + +static struct crystalhd_adp *g_adp_info; + +static irqreturn_t chd_dec_isr(int irq, void *arg) +{ + struct crystalhd_adp *adp = (struct crystalhd_adp *) arg; + int rc = 0; + if (adp) + rc = crystalhd_cmd_interrupt(&adp->cmds); + + return IRQ_RETVAL(rc); +} + +static int chd_dec_enable_int(struct crystalhd_adp *adp) +{ + int rc = 0; + + if (!adp || !adp->pdev) { + BCMLOG_ERR("Invalid arg!!\n"); + return -EINVAL; + } + + if (adp->pdev->msi_enabled) + adp->msi = 1; + else + adp->msi = pci_enable_msi(adp->pdev); + + rc = request_irq(adp->pdev->irq, chd_dec_isr, IRQF_SHARED, + adp->name, (void *)adp); + if (rc) { + BCMLOG_ERR("Interrupt request failed.. \n"); + pci_disable_msi(adp->pdev); + } + + return rc; +} + +static int chd_dec_disable_int(struct crystalhd_adp *adp) +{ + if (!adp || !adp->pdev) { + BCMLOG_ERR("Invalid arg!!\n"); + return -EINVAL; + } + + free_irq(adp->pdev->irq, adp); + + if (adp->msi) + pci_disable_msi(adp->pdev); + + return 0; +} + +crystalhd_ioctl_data *chd_dec_alloc_iodata(struct crystalhd_adp *adp, bool isr) +{ + unsigned long flags = 0; + crystalhd_ioctl_data *temp; + + if (!adp) + return NULL; + + spin_lock_irqsave(&adp->lock, flags); + + temp = adp->idata_free_head; + if (temp) { + adp->idata_free_head = adp->idata_free_head->next; + memset(temp, 0, sizeof(*temp)); + } + + spin_unlock_irqrestore(&adp->lock, flags); + return temp; +} + +void chd_dec_free_iodata(struct crystalhd_adp *adp, crystalhd_ioctl_data *iodata, + bool isr) +{ + unsigned long flags = 0; + + if (!adp || !iodata) + return; + + spin_lock_irqsave(&adp->lock, flags); + iodata->next = adp->idata_free_head; + adp->idata_free_head = iodata; + spin_unlock_irqrestore(&adp->lock, flags); +} + +static inline int crystalhd_user_data(unsigned long ud, void *dr, int size, int set) +{ + int rc; + + if (!ud || !dr) { + BCMLOG_ERR("Invalid arg \n"); + return -EINVAL; + } + + if (set) + rc = copy_to_user((void *)ud, dr, size); + else + rc = copy_from_user(dr, (void *)ud, size); + + if (rc) { + BCMLOG_ERR("Invalid args for command \n"); + rc = -EFAULT; + } + + return rc; +} + +static int chd_dec_fetch_cdata(struct crystalhd_adp *adp, crystalhd_ioctl_data *io, + uint32_t m_sz, unsigned long ua) +{ + unsigned long ua_off; + int rc = 0; + + if (!adp || !io || !ua || !m_sz) { + BCMLOG_ERR("Invalid Arg!!\n"); + return -EINVAL; + } + + io->add_cdata = vmalloc(m_sz); + if (!io->add_cdata) { + BCMLOG_ERR("kalloc fail for sz:%x\n", m_sz); + return -ENOMEM; + } + + io->add_cdata_sz = m_sz; + ua_off = ua + sizeof(io->udata); + rc = crystalhd_user_data(ua_off, io->add_cdata, io->add_cdata_sz, 0); + if (rc) { + BCMLOG_ERR("failed to pull add_cdata sz:%x ua_off:%x\n", + io->add_cdata_sz, (unsigned int)ua_off); + if (io->add_cdata) { + kfree(io->add_cdata); + io->add_cdata = NULL; + } + return -ENODATA; + } + + return rc; +} + +static int chd_dec_release_cdata(struct crystalhd_adp *adp, + crystalhd_ioctl_data *io, unsigned long ua) +{ + unsigned long ua_off; + int rc; + + if (!adp || !io || !ua) { + BCMLOG_ERR("Invalid Arg!!\n"); + return -EINVAL; + } + + if (io->cmd != BCM_IOC_FW_DOWNLOAD) { + ua_off = ua + sizeof(io->udata); + rc = crystalhd_user_data(ua_off, io->add_cdata, + io->add_cdata_sz, 1); + if (rc) { + BCMLOG_ERR("failed to push add_cdata sz:%x ua_off:%x\n", + io->add_cdata_sz, (unsigned int)ua_off); + return -ENODATA; + } + } + + if (io->add_cdata) { + vfree(io->add_cdata); + io->add_cdata = NULL; + } + + return 0; +} + +static int chd_dec_proc_user_data(struct crystalhd_adp *adp, + crystalhd_ioctl_data *io, + unsigned long ua, int set) +{ + int rc; + uint32_t m_sz = 0; + + if (!adp || !io || !ua) { + BCMLOG_ERR("Invalid Arg!!\n"); + return -EINVAL; + } + + rc = crystalhd_user_data(ua, &io->udata, sizeof(io->udata), set); + if (rc) { + BCMLOG_ERR("failed to %s iodata \n", (set ? "set" : "get")); + return rc; + } + + switch (io->cmd) { + case BCM_IOC_MEM_RD: + case BCM_IOC_MEM_WR: + case BCM_IOC_FW_DOWNLOAD: + m_sz = io->udata.u.devMem.NumDwords * 4; + if (set) + rc = chd_dec_release_cdata(adp, io, ua); + else + rc = chd_dec_fetch_cdata(adp, io, m_sz, ua); + break; + default: + break; + } + + return rc; +} + +static int chd_dec_api_cmd(struct crystalhd_adp *adp, unsigned long ua, + uint32_t uid, uint32_t cmd, crystalhd_cmd_proc func) +{ + int rc; + crystalhd_ioctl_data *temp; + BC_STATUS sts = BC_STS_SUCCESS; + + temp = chd_dec_alloc_iodata(adp, 0); + if (!temp) { + BCMLOG_ERR("Failed to get iodata..\n"); + return -EINVAL; + } + + temp->u_id = uid; + temp->cmd = cmd; + + rc = chd_dec_proc_user_data(adp, temp, ua, 0); + if (!rc) { + sts = func(&adp->cmds, temp); + if (sts == BC_STS_PENDING) + sts = BC_STS_NOT_IMPL; + temp->udata.RetSts = sts; + rc = chd_dec_proc_user_data(adp, temp, ua, 1); + } + + if (temp) { + chd_dec_free_iodata(adp, temp, 0); + temp = NULL; + } + + return rc; +} + +/* ========================= API interfaces =================================*/ +static int chd_dec_ioctl(struct inode *in, struct file *fd, + unsigned int cmd, unsigned long ua) +{ + struct crystalhd_adp *adp = chd_get_adp(); + crystalhd_cmd_proc cproc; + struct crystalhd_user *uc; + + if (!adp || !fd) { + BCMLOG_ERR("Invalid adp\n"); + return -EINVAL; + } + + uc = (struct crystalhd_user *)fd->private_data; + if (!uc) { + BCMLOG_ERR("Failed to get uc\n"); + return -ENODATA; + } + + cproc = crystalhd_get_cmd_proc(&adp->cmds, cmd, uc); + if (!cproc) { + BCMLOG_ERR("Unhandled command: %d\n", cmd); + return -EINVAL; + } + + return chd_dec_api_cmd(adp, ua, uc->uid, cmd, cproc); +} + +static int chd_dec_open(struct inode *in, struct file *fd) +{ + struct crystalhd_adp *adp = chd_get_adp(); + int rc = 0; + BC_STATUS sts = BC_STS_SUCCESS; + struct crystalhd_user *uc = NULL; + + BCMLOG_ENTER; + if (!adp) { + BCMLOG_ERR("Invalid adp\n"); + return -EINVAL; + } + + if (adp->cfg_users >= BC_LINK_MAX_OPENS) { + BCMLOG(BCMLOG_INFO, "Already in use.%d\n", adp->cfg_users); + return -EBUSY; + } + + sts = crystalhd_user_open(&adp->cmds, &uc); + if (sts != BC_STS_SUCCESS) { + BCMLOG_ERR("cmd_user_open - %d \n", sts); + rc = -EBUSY; + } + + adp->cfg_users++; + + fd->private_data = uc; + + return rc; +} + +static int chd_dec_close(struct inode *in, struct file *fd) +{ + struct crystalhd_adp *adp = chd_get_adp(); + struct crystalhd_user *uc; + + BCMLOG_ENTER; + if (!adp) { + BCMLOG_ERR("Invalid adp \n"); + return -EINVAL; + } + + uc = (struct crystalhd_user *)fd->private_data; + if (!uc) { + BCMLOG_ERR("Failed to get uc\n"); + return -ENODATA; + } + + crystalhd_user_close(&adp->cmds, uc); + + adp->cfg_users--; + + return 0; +} + +static const struct file_operations chd_dec_fops = { + .owner = THIS_MODULE, + .ioctl = chd_dec_ioctl, + .open = chd_dec_open, + .release = chd_dec_close, +}; + +static int chd_dec_init_chdev(struct crystalhd_adp *adp) +{ + crystalhd_ioctl_data *temp; + struct device *dev; + int rc = -ENODEV, i = 0; + + if (!adp) + goto fail; + + adp->chd_dec_major = register_chrdev(0, CRYSTALHD_API_NAME, + &chd_dec_fops); + if (adp->chd_dec_major < 0) { + BCMLOG_ERR("Failed to create config dev\n"); + rc = adp->chd_dec_major; + goto fail; + } + + /* register crystalhd class */ + crystalhd_class = class_create(THIS_MODULE, "crystalhd"); + if (IS_ERR(crystalhd_class)) { + BCMLOG_ERR("failed to create class\n"); + goto fail; + } + + dev = device_create(crystalhd_class, NULL, MKDEV(adp->chd_dec_major, 0), + NULL, "crystalhd"); + if (!dev) { + BCMLOG_ERR("failed to create device\n"); + goto device_create_fail; + } + + rc = crystalhd_create_elem_pool(adp, BC_LINK_ELEM_POOL_SZ); + if (rc) { + BCMLOG_ERR("failed to create device\n"); + goto elem_pool_fail; + } + + /* Allocate general purpose ioctl pool. */ + for (i = 0; i < CHD_IODATA_POOL_SZ; i++) { + /* FIXME: jarod: why atomic? */ + temp = kzalloc(sizeof(crystalhd_ioctl_data), GFP_ATOMIC); + if (!temp) { + BCMLOG_ERR("ioctl data pool kzalloc failed\n"); + rc = -ENOMEM; + goto kzalloc_fail; + } + /* Add to global pool.. */ + chd_dec_free_iodata(adp, temp, 0); + } + + return 0; + +kzalloc_fail: + crystalhd_delete_elem_pool(adp); +elem_pool_fail: + device_destroy(crystalhd_class, MKDEV(adp->chd_dec_major, 0)); +device_create_fail: + class_destroy(crystalhd_class); +fail: + return rc; +} + +static void chd_dec_release_chdev(struct crystalhd_adp *adp) +{ + crystalhd_ioctl_data *temp = NULL; + if (!adp) + return; + + if (adp->chd_dec_major > 0) { + /* unregister crystalhd class */ + device_destroy(crystalhd_class, MKDEV(adp->chd_dec_major, 0)); + unregister_chrdev(adp->chd_dec_major, CRYSTALHD_API_NAME); + BCMLOG(BCMLOG_INFO, "released api device - %d\n", + adp->chd_dec_major); + class_destroy(crystalhd_class); + } + adp->chd_dec_major = 0; + + /* Clear iodata pool.. */ + do { + temp = chd_dec_alloc_iodata(adp, 0); + if (temp) + kfree(temp); + } while (temp); + + crystalhd_delete_elem_pool(adp); +} + +static int chd_pci_reserve_mem(struct crystalhd_adp *pinfo) +{ + int rc; + unsigned long bar2 = pci_resource_start(pinfo->pdev, 2); + uint32_t mem_len = pci_resource_len(pinfo->pdev, 2); + unsigned long bar0 = pci_resource_start(pinfo->pdev, 0); + uint32_t i2o_len = pci_resource_len(pinfo->pdev, 0); + + BCMLOG(BCMLOG_SSTEP, "bar2:0x%lx-0x%08x bar0:0x%lx-0x%08x\n", + bar2, mem_len, bar0, i2o_len); + + rc = check_mem_region(bar2, mem_len); + if (rc) { + BCMLOG_ERR("No valid mem region...\n"); + return -ENOMEM; + } + + pinfo->addr = ioremap_nocache(bar2, mem_len); + if (!pinfo->addr) { + BCMLOG_ERR("Failed to remap mem region...\n"); + return -ENOMEM; + } + + pinfo->pci_mem_start = bar2; + pinfo->pci_mem_len = mem_len; + + rc = check_mem_region(bar0, i2o_len); + if (rc) { + BCMLOG_ERR("No valid mem region...\n"); + return -ENOMEM; + } + + pinfo->i2o_addr = ioremap_nocache(bar0, i2o_len); + if (!pinfo->i2o_addr) { + BCMLOG_ERR("Failed to remap mem region...\n"); + return -ENOMEM; + } + + pinfo->pci_i2o_start = bar0; + pinfo->pci_i2o_len = i2o_len; + + rc = pci_request_regions(pinfo->pdev, pinfo->name); + if (rc < 0) { + BCMLOG_ERR("Region request failed: %d\n", rc); + return rc; + } + + BCMLOG(BCMLOG_SSTEP, "Mapped addr:0x%08lx i2o_addr:0x%08lx\n", + (unsigned long)pinfo->addr, (unsigned long)pinfo->i2o_addr); + + return 0; +} + +static void chd_pci_release_mem(struct crystalhd_adp *pinfo) +{ + if (!pinfo) + return; + + if (pinfo->addr) + iounmap(pinfo->addr); + + if (pinfo->i2o_addr) + iounmap(pinfo->i2o_addr); + + pci_release_regions(pinfo->pdev); +} + + +static void chd_dec_pci_remove(struct pci_dev *pdev) +{ + struct crystalhd_adp *pinfo; + BC_STATUS sts = BC_STS_SUCCESS; + + BCMLOG_ENTER; + + pinfo = (struct crystalhd_adp *) pci_get_drvdata(pdev); + if (!pinfo) { + BCMLOG_ERR("could not get adp\n"); + return; + } + + sts = crystalhd_delete_cmd_context(&pinfo->cmds); + if (sts != BC_STS_SUCCESS) + BCMLOG_ERR("cmd delete :%d \n", sts); + + chd_dec_release_chdev(pinfo); + + chd_dec_disable_int(pinfo); + + chd_pci_release_mem(pinfo); + pci_disable_device(pinfo->pdev); + + kfree(pinfo); + g_adp_info = NULL; +} + +static int chd_dec_pci_probe(struct pci_dev *pdev, + const struct pci_device_id *entry) +{ + struct crystalhd_adp *pinfo; + int rc; + BC_STATUS sts = BC_STS_SUCCESS; + + BCMLOG(BCMLOG_DBG, "PCI_INFO: Vendor:0x%04x Device:0x%04x " + "s_vendor:0x%04x s_device: 0x%04x\n", + pdev->vendor, pdev->device, pdev->subsystem_vendor, + pdev->subsystem_device); + + /* FIXME: jarod: why atomic? */ + pinfo = kzalloc(sizeof(struct crystalhd_adp), GFP_ATOMIC); + if (!pinfo) { + BCMLOG_ERR("Failed to allocate memory\n"); + return -ENOMEM; + } + + pinfo->pdev = pdev; + + rc = pci_enable_device(pdev); + if (rc) { + BCMLOG_ERR("Failed to enable PCI device\n"); + return rc; + } + + snprintf(pinfo->name, 31, "crystalhd_pci_e:%d:%d:%d", + pdev->bus->number, PCI_SLOT(pdev->devfn), + PCI_FUNC(pdev->devfn)); + + rc = chd_pci_reserve_mem(pinfo); + if (rc) { + BCMLOG_ERR("Failed to setup memory regions.\n"); + return -ENOMEM; + } + + pinfo->present = 1; + pinfo->drv_data = entry->driver_data; + + /* Setup adapter level lock.. */ + spin_lock_init(&pinfo->lock); + + /* setup api stuff.. */ + chd_dec_init_chdev(pinfo); + rc = chd_dec_enable_int(pinfo); + if (rc) { + BCMLOG_ERR("_enable_int err:%d \n", rc); + pci_disable_device(pdev); + return -ENODEV; + } + + /* Set dma mask... */ + if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) { + pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); + pinfo->dmabits = 64; + } else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) { + pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); + pinfo->dmabits = 32; + } else { + BCMLOG_ERR("Unabled to setup DMA %d\n", rc); + pci_disable_device(pdev); + return -ENODEV; + } + + sts = crystalhd_setup_cmd_context(&pinfo->cmds, pinfo); + if (sts != BC_STS_SUCCESS) { + BCMLOG_ERR("cmd setup :%d \n", sts); + pci_disable_device(pdev); + return -ENODEV; + } + + pci_set_master(pdev); + + pci_set_drvdata(pdev, pinfo); + + g_adp_info = pinfo; + + return 0; + +} + +#ifdef CONFIG_PM +int chd_dec_pci_suspend(struct pci_dev *pdev, pm_message_t state) +{ + struct crystalhd_adp *adp; + crystalhd_ioctl_data *temp; + BC_STATUS sts = BC_STS_SUCCESS; + + adp = (struct crystalhd_adp *)pci_get_drvdata(pdev); + if (!adp) { + BCMLOG_ERR("could not get adp\n"); + return -ENODEV; + } + + temp = chd_dec_alloc_iodata(adp, false); + if (!temp) { + BCMLOG_ERR("could not get ioctl data\n"); + return -ENODEV; + } + + sts = crystalhd_suspend(&adp->cmds, temp); + if (sts != BC_STS_SUCCESS) { + BCMLOG_ERR("BCM70012 Suspend %d\n", sts); + return -ENODEV; + } + + chd_dec_free_iodata(adp, temp, false); + chd_dec_disable_int(adp); + pci_save_state(pdev); + + /* Disable IO/bus master/irq router */ + pci_disable_device(pdev); + pci_set_power_state(pdev, pci_choose_state(pdev, state)); + return 0; +} + +int chd_dec_pci_resume(struct pci_dev *pdev) +{ + struct crystalhd_adp *adp; + BC_STATUS sts = BC_STS_SUCCESS; + int rc; + + adp = (struct crystalhd_adp *)pci_get_drvdata(pdev); + if (!adp) { + BCMLOG_ERR("could not get adp\n"); + return -ENODEV; + } + + pci_set_power_state(pdev, PCI_D0); + pci_restore_state(pdev); + + /* device's irq possibly is changed, driver should take care */ + if (pci_enable_device(pdev)) { + BCMLOG_ERR("Failed to enable PCI device\n"); + return 1; + } + + pci_set_master(pdev); + + rc = chd_dec_enable_int(adp); + if (rc) { + BCMLOG_ERR("_enable_int err:%d \n", rc); + pci_disable_device(pdev); + return -ENODEV; + } + + sts = crystalhd_resume(&adp->cmds); + if (sts != BC_STS_SUCCESS) { + BCMLOG_ERR("BCM70012 Resume %d\n", sts); + pci_disable_device(pdev); + return -ENODEV; + } + + return 0; +} +#endif + +static struct pci_device_id chd_dec_pci_id_table[] = { +/* vendor, device, subvendor, subdevice, class, classmask, driver_data */ + { 0x14e4, 0x1612, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 }, + { 0, }, +}; + +struct pci_driver bc_chd_70012_driver = { + .name = "Broadcom 70012 Decoder", + .probe = chd_dec_pci_probe, + .remove = chd_dec_pci_remove, + .id_table = chd_dec_pci_id_table, +#ifdef CONFIG_PM + .suspend = chd_dec_pci_suspend, + .resume = chd_dec_pci_resume +#endif +}; +MODULE_DEVICE_TABLE(pci, chd_dec_pci_id_table); + + +void chd_set_log_level(struct crystalhd_adp *adp, char *arg) +{ + if ((!arg) || (strlen(arg) < 3)) + g_linklog_level = BCMLOG_ERROR | BCMLOG_DATA; + else if (!strncmp(arg, "sstep", 5)) + g_linklog_level = BCMLOG_INFO | BCMLOG_DATA | BCMLOG_DBG | + BCMLOG_SSTEP | BCMLOG_ERROR; + else if (!strncmp(arg, "info", 4)) + g_linklog_level = BCMLOG_ERROR | BCMLOG_DATA | BCMLOG_INFO; + else if (!strncmp(arg, "debug", 5)) + g_linklog_level = BCMLOG_ERROR | BCMLOG_DATA | BCMLOG_INFO | + BCMLOG_DBG; + else if (!strncmp(arg, "pball", 5)) + g_linklog_level = 0xFFFFFFFF & ~(BCMLOG_SPINLOCK); + else if (!strncmp(arg, "silent", 6)) + g_linklog_level = 0; + else + g_linklog_level = 0; +} + +struct crystalhd_adp *chd_get_adp(void) +{ + return g_adp_info; +} + +int __init chd_dec_module_init(void) +{ + int rc; + + chd_set_log_level(NULL, "debug"); + BCMLOG(BCMLOG_DATA, "Loading crystalhd %d.%d.%d \n", + crystalhd_kmod_major, crystalhd_kmod_minor, crystalhd_kmod_rev); + + rc = pci_register_driver(&bc_chd_70012_driver); + + if (rc < 0) + BCMLOG_ERR("Could not find any devices. err:%d \n", rc); + + return rc; +} + +void __exit chd_dec_module_cleanup(void) +{ + BCMLOG(BCMLOG_DATA, "unloading crystalhd %d.%d.%d \n", + crystalhd_kmod_major, crystalhd_kmod_minor, crystalhd_kmod_rev); + + pci_unregister_driver(&bc_chd_70012_driver); +} + + +MODULE_AUTHOR("Naren Sankar "); +MODULE_AUTHOR("Prasad Bolisetty "); +MODULE_DESCRIPTION(CRYSTAL_HD_NAME); +MODULE_LICENSE("GPL"); +MODULE_ALIAS("bcm70012"); + +module_init(chd_dec_module_init); +module_exit(chd_dec_module_cleanup); + diff --git a/drivers/staging/crystalhd/crystalhd_lnx.h b/drivers/staging/crystalhd/crystalhd_lnx.h new file mode 100644 index 000000000000..d3f9fc43d2d4 --- /dev/null +++ b/drivers/staging/crystalhd/crystalhd_lnx.h @@ -0,0 +1,95 @@ +/*************************************************************************** + * Copyright (c) 2005-2009, Broadcom Corporation. + * + * Name: crystalhd_lnx . c + * + * Description: + * BCM70012 Linux driver + * + * HISTORY: + * + ********************************************************************** + * This file is part of the crystalhd device driver. + * + * This driver is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 2 of the License. + * + * This driver is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this driver. If not, see . + **********************************************************************/ + +#ifndef _CRYSTALHD_LNX_H_ +#define _CRYSTALHD_LNX_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "crystalhd_cmds.h" + +#define CRYSTAL_HD_NAME "Broadcom Crystal HD Decoder (BCM70012) Driver" + + +/* OS specific PCI information structure and adapter information. */ +struct crystalhd_adp { + /* Hardware borad/PCI specifics */ + char name[32]; + struct pci_dev *pdev; + + unsigned long pci_mem_start; + uint32_t pci_mem_len; + void *addr; + + unsigned long pci_i2o_start; + uint32_t pci_i2o_len; + void *i2o_addr; + + unsigned int drv_data; + unsigned int dmabits; /* 32 | 64 */ + unsigned int registered; + unsigned int present; + unsigned int msi; + + spinlock_t lock; + + /* API Related */ + unsigned int chd_dec_major; + unsigned int cfg_users; + + crystalhd_ioctl_data *idata_free_head; /* ioctl data pool */ + crystalhd_elem_t *elem_pool_head; /* Queue element pool */ + + struct crystalhd_cmd cmds; + + crystalhd_dio_req *ua_map_free_head; + struct pci_pool *fill_byte_pool; +}; + + +struct crystalhd_adp *chd_get_adp(void); +void chd_set_log_level(struct crystalhd_adp *adp, char *arg); + +#endif + diff --git a/drivers/staging/crystalhd/crystalhd_misc.c b/drivers/staging/crystalhd/crystalhd_misc.c new file mode 100644 index 000000000000..32e632c2ab3e --- /dev/null +++ b/drivers/staging/crystalhd/crystalhd_misc.c @@ -0,0 +1,1029 @@ +/*************************************************************************** + * Copyright (c) 2005-2009, Broadcom Corporation. + * + * Name: crystalhd_misc . c + * + * Description: + * BCM70012 Linux driver misc routines. + * + * HISTORY: + * + ********************************************************************** + * This file is part of the crystalhd device driver. + * + * This driver is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 2 of the License. + * + * This driver is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this driver. If not, see . + **********************************************************************/ + +#include "crystalhd_misc.h" +#include "crystalhd_lnx.h" + +uint32_t g_linklog_level; + +static inline uint32_t crystalhd_dram_rd(struct crystalhd_adp *adp, uint32_t mem_off) +{ + crystalhd_reg_wr(adp, DCI_DRAM_BASE_ADDR, (mem_off >> 19)); + return bc_dec_reg_rd(adp, (0x00380000 | (mem_off & 0x0007FFFF))); +} + +static inline void crystalhd_dram_wr(struct crystalhd_adp *adp, uint32_t mem_off, uint32_t val) +{ + crystalhd_reg_wr(adp, DCI_DRAM_BASE_ADDR, (mem_off >> 19)); + bc_dec_reg_wr(adp, (0x00380000 | (mem_off & 0x0007FFFF)), val); +} + +static inline BC_STATUS bc_chk_dram_range(struct crystalhd_adp *adp, uint32_t start_off, uint32_t cnt) +{ + return BC_STS_SUCCESS; +} + +static crystalhd_dio_req *crystalhd_alloc_dio(struct crystalhd_adp *adp) +{ + unsigned long flags = 0; + crystalhd_dio_req *temp = NULL; + + if (!adp) { + BCMLOG_ERR("Invalid Arg!!\n"); + return temp; + } + + spin_lock_irqsave(&adp->lock, flags); + temp = adp->ua_map_free_head; + if (temp) + adp->ua_map_free_head = adp->ua_map_free_head->next; + spin_unlock_irqrestore(&adp->lock, flags); + + return temp; +} + +static void crystalhd_free_dio(struct crystalhd_adp *adp, crystalhd_dio_req *dio) +{ + unsigned long flags = 0; + + if (!adp || !dio) + return; + spin_lock_irqsave(&adp->lock, flags); + dio->sig = crystalhd_dio_inv; + dio->page_cnt = 0; + dio->fb_size = 0; + memset(&dio->uinfo, 0, sizeof(dio->uinfo)); + dio->next = adp->ua_map_free_head; + adp->ua_map_free_head = dio; + spin_unlock_irqrestore(&adp->lock, flags); +} + +static crystalhd_elem_t *crystalhd_alloc_elem(struct crystalhd_adp *adp) +{ + unsigned long flags = 0; + crystalhd_elem_t *temp = NULL; + + if (!adp) + return temp; + spin_lock_irqsave(&adp->lock, flags); + temp = adp->elem_pool_head; + if (temp) { + adp->elem_pool_head = adp->elem_pool_head->flink; + memset(temp, 0, sizeof(*temp)); + } + spin_unlock_irqrestore(&adp->lock, flags); + + return temp; +} +static void crystalhd_free_elem(struct crystalhd_adp *adp, crystalhd_elem_t *elem) +{ + unsigned long flags = 0; + + if (!adp || !elem) + return; + spin_lock_irqsave(&adp->lock, flags); + elem->flink = adp->elem_pool_head; + adp->elem_pool_head = elem; + spin_unlock_irqrestore(&adp->lock, flags); +} + +static inline void crystalhd_set_sg(struct scatterlist *sg, struct page *page, + unsigned int len, unsigned int offset) +{ + sg_set_page(sg, page, len, offset); +#ifdef CONFIG_X86_64 + sg->dma_length = len; +#endif +} + +static inline void crystalhd_init_sg(struct scatterlist *sg, unsigned int entries) +{ + /* http://lkml.org/lkml/2007/11/27/68 */ + sg_init_table(sg, entries); +} + +/*========================== Extern ========================================*/ +/** + * bc_dec_reg_rd - Read 7412's device register. + * @adp: Adapter instance + * @reg_off: Register offset. + * + * Return: + * 32bit value read + * + * 7412's device register read routine. This interface use + * 7412's device access range mapped from BAR-2 (4M) of PCIe + * configuration space. + */ +uint32_t bc_dec_reg_rd(struct crystalhd_adp *adp, uint32_t reg_off) +{ + if (!adp || (reg_off > adp->pci_mem_len)) { + BCMLOG_ERR("dec_rd_reg_off outof range: 0x%08x\n", reg_off); + return 0; + } + + return readl(adp->addr + reg_off); +} + +/** + * bc_dec_reg_wr - Write 7412's device register + * @adp: Adapter instance + * @reg_off: Register offset. + * @val: Dword value to be written. + * + * Return: + * none. + * + * 7412's device register write routine. This interface use + * 7412's device access range mapped from BAR-2 (4M) of PCIe + * configuration space. + */ +void bc_dec_reg_wr(struct crystalhd_adp *adp, uint32_t reg_off, uint32_t val) +{ + if (!adp || (reg_off > adp->pci_mem_len)) { + BCMLOG_ERR("dec_wr_reg_off outof range: 0x%08x\n", reg_off); + return; + } + writel(val, adp->addr + reg_off); + udelay(8); +} + +/** + * crystalhd_reg_rd - Read Link's device register. + * @adp: Adapter instance + * @reg_off: Register offset. + * + * Return: + * 32bit value read + * + * Link device register read routine. This interface use + * Link's device access range mapped from BAR-1 (64K) of PCIe + * configuration space. + * + */ +uint32_t crystalhd_reg_rd(struct crystalhd_adp *adp, uint32_t reg_off) +{ + if (!adp || (reg_off > adp->pci_i2o_len)) { + BCMLOG_ERR("link_rd_reg_off outof range: 0x%08x\n", reg_off); + return 0; + } + return readl(adp->i2o_addr + reg_off); +} + +/** + * crystalhd_reg_wr - Write Link's device register + * @adp: Adapter instance + * @reg_off: Register offset. + * @val: Dword value to be written. + * + * Return: + * none. + * + * Link device register write routine. This interface use + * Link's device access range mapped from BAR-1 (64K) of PCIe + * configuration space. + * + */ +void crystalhd_reg_wr(struct crystalhd_adp *adp, uint32_t reg_off, uint32_t val) +{ + if (!adp || (reg_off > adp->pci_i2o_len)) { + BCMLOG_ERR("link_wr_reg_off outof range: 0x%08x\n", reg_off); + return; + } + writel(val, adp->i2o_addr + reg_off); +} + +/** + * crystalhd_mem_rd - Read data from 7412's DRAM area. + * @adp: Adapter instance + * @start_off: Start offset. + * @dw_cnt: Count in dwords. + * @rd_buff: Buffer to copy the data from dram. + * + * Return: + * Status. + * + * 7412's Dram read routine. + */ +BC_STATUS crystalhd_mem_rd(struct crystalhd_adp *adp, uint32_t start_off, + uint32_t dw_cnt, uint32_t *rd_buff) +{ + uint32_t ix = 0; + + if (!adp || !rd_buff || + (bc_chk_dram_range(adp, start_off, dw_cnt) != BC_STS_SUCCESS)) { + BCMLOG_ERR("Invalid arg \n"); + return BC_STS_INV_ARG; + } + for (ix = 0; ix < dw_cnt; ix++) + rd_buff[ix] = crystalhd_dram_rd(adp, (start_off + (ix * 4))); + + return BC_STS_SUCCESS; +} + +/** + * crystalhd_mem_wr - Write data to 7412's DRAM area. + * @adp: Adapter instance + * @start_off: Start offset. + * @dw_cnt: Count in dwords. + * @wr_buff: Data Buffer to be written. + * + * Return: + * Status. + * + * 7412's Dram write routine. + */ +BC_STATUS crystalhd_mem_wr(struct crystalhd_adp *adp, uint32_t start_off, + uint32_t dw_cnt, uint32_t *wr_buff) +{ + uint32_t ix = 0; + + if (!adp || !wr_buff || + (bc_chk_dram_range(adp, start_off, dw_cnt) != BC_STS_SUCCESS)) { + BCMLOG_ERR("Invalid arg \n"); + return BC_STS_INV_ARG; + } + + for (ix = 0; ix < dw_cnt; ix++) + crystalhd_dram_wr(adp, (start_off + (ix * 4)), wr_buff[ix]); + + return BC_STS_SUCCESS; +} +/** + * crystalhd_pci_cfg_rd - PCIe config read + * @adp: Adapter instance + * @off: PCI config space offset. + * @len: Size -- Byte, Word & dword. + * @val: Value read + * + * Return: + * Status. + * + * Get value from Link's PCIe config space. + */ +BC_STATUS crystalhd_pci_cfg_rd(struct crystalhd_adp *adp, uint32_t off, + uint32_t len, uint32_t *val) +{ + BC_STATUS sts = BC_STS_SUCCESS; + int rc = 0; + + if (!adp || !val) { + BCMLOG_ERR("Invalid arg \n"); + return BC_STS_INV_ARG; + } + + switch (len) { + case 1: + rc = pci_read_config_byte(adp->pdev, off, (u8 *)val); + break; + case 2: + rc = pci_read_config_word(adp->pdev, off, (u16 *)val); + break; + case 4: + rc = pci_read_config_dword(adp->pdev, off, (u32 *)val); + break; + default: + rc = -EINVAL; + sts = BC_STS_INV_ARG; + BCMLOG_ERR("Invalid len:%d\n", len); + }; + + if (rc && (sts == BC_STS_SUCCESS)) + sts = BC_STS_ERROR; + + return sts; +} + +/** + * crystalhd_pci_cfg_wr - PCIe config write + * @adp: Adapter instance + * @off: PCI config space offset. + * @len: Size -- Byte, Word & dword. + * @val: Value to be written + * + * Return: + * Status. + * + * Set value to Link's PCIe config space. + */ +BC_STATUS crystalhd_pci_cfg_wr(struct crystalhd_adp *adp, uint32_t off, + uint32_t len, uint32_t val) +{ + BC_STATUS sts = BC_STS_SUCCESS; + int rc = 0; + + if (!adp || !val) { + BCMLOG_ERR("Invalid arg \n"); + return BC_STS_INV_ARG; + } + + switch (len) { + case 1: + rc = pci_write_config_byte(adp->pdev, off, (u8)val); + break; + case 2: + rc = pci_write_config_word(adp->pdev, off, (u16)val); + break; + case 4: + rc = pci_write_config_dword(adp->pdev, off, val); + break; + default: + rc = -EINVAL; + sts = BC_STS_INV_ARG; + BCMLOG_ERR("Invalid len:%d\n", len); + }; + + if (rc && (sts == BC_STS_SUCCESS)) + sts = BC_STS_ERROR; + + return sts; +} + +/** + * bc_kern_dma_alloc - Allocate memory for Dma rings + * @adp: Adapter instance + * @sz: Size of the memory to allocate. + * @phy_addr: Physical address of the memory allocated. + * Typedef to system's dma_addr_t (u64) + * + * Return: + * Pointer to allocated memory.. + * + * Wrapper to Linux kernel interface. + * + */ +void *bc_kern_dma_alloc(struct crystalhd_adp *adp, uint32_t sz, + dma_addr_t *phy_addr) +{ + void *temp = NULL; + + if (!adp || !sz || !phy_addr) { + BCMLOG_ERR("Invalide Arg..\n"); + return temp; + } + + temp = pci_alloc_consistent(adp->pdev, sz, phy_addr); + if (temp) + memset(temp, 0, sz); + + return temp; +} + +/** + * bc_kern_dma_free - Release Dma ring memory. + * @adp: Adapter instance + * @sz: Size of the memory to allocate. + * @ka: Kernel virtual address returned during _dio_alloc() + * @phy_addr: Physical address of the memory allocated. + * Typedef to system's dma_addr_t (u64) + * + * Return: + * none. + */ +void bc_kern_dma_free(struct crystalhd_adp *adp, uint32_t sz, void *ka, + dma_addr_t phy_addr) +{ + if (!adp || !ka || !sz || !phy_addr) { + BCMLOG_ERR("Invalide Arg..\n"); + return; + } + + pci_free_consistent(adp->pdev, sz, ka, phy_addr); +} + +/** + * crystalhd_create_dioq - Create Generic DIO queue + * @adp: Adapter instance + * @dioq_hnd: Handle to the dio queue created + * @cb : Optional - Call back To free the element. + * @cbctx: Context to pass to callback. + * + * Return: + * status + * + * Initialize Generic DIO queue to hold any data. Callback + * will be used to free elements while deleting the queue. + */ +BC_STATUS crystalhd_create_dioq(struct crystalhd_adp *adp, + crystalhd_dioq_t **dioq_hnd, + crystalhd_data_free_cb cb, void *cbctx) +{ + crystalhd_dioq_t *dioq = NULL; + + if (!adp || !dioq_hnd) { + BCMLOG_ERR("Invalid arg!!\n"); + return BC_STS_INV_ARG; + } + + dioq = kzalloc(sizeof(*dioq), GFP_KERNEL); + if (!dioq) + return BC_STS_INSUFF_RES; + + spin_lock_init(&dioq->lock); + dioq->sig = BC_LINK_DIOQ_SIG; + dioq->head = (crystalhd_elem_t *)&dioq->head; + dioq->tail = (crystalhd_elem_t *)&dioq->head; + crystalhd_create_event(&dioq->event); + dioq->adp = adp; + dioq->data_rel_cb = cb; + dioq->cb_context = cbctx; + *dioq_hnd = dioq; + + return BC_STS_SUCCESS; +} + +/** + * crystalhd_delete_dioq - Delete Generic DIO queue + * @adp: Adapter instance + * @dioq: DIOQ instance.. + * + * Return: + * None. + * + * Release Generic DIO queue. This function will remove + * all the entries from the Queue and will release data + * by calling the call back provided during creation. + * + */ +void crystalhd_delete_dioq(struct crystalhd_adp *adp, crystalhd_dioq_t *dioq) +{ + void *temp; + + if (!dioq || (dioq->sig != BC_LINK_DIOQ_SIG)) + return; + + do { + temp = crystalhd_dioq_fetch(dioq); + if (temp && dioq->data_rel_cb) + dioq->data_rel_cb(dioq->cb_context, temp); + } while (temp); + dioq->sig = 0; + kfree(dioq); +} + +/** + * crystalhd_dioq_add - Add new DIO request element. + * @ioq: DIO queue instance + * @t: DIO request to be added. + * @wake: True - Wake up suspended process. + * @tag: Special tag to assign - For search and get. + * + * Return: + * Status. + * + * Insert new element to Q tail. + */ +BC_STATUS crystalhd_dioq_add(crystalhd_dioq_t *ioq, void *data, + bool wake, uint32_t tag) +{ + unsigned long flags = 0; + crystalhd_elem_t *tmp; + + if (!ioq || (ioq->sig != BC_LINK_DIOQ_SIG) || !data) { + BCMLOG_ERR("Invalid arg!!\n"); + return BC_STS_INV_ARG; + } + + tmp = crystalhd_alloc_elem(ioq->adp); + if (!tmp) { + BCMLOG_ERR("No free elements.\n"); + return BC_STS_INSUFF_RES; + } + + tmp->data = data; + tmp->tag = tag; + spin_lock_irqsave(&ioq->lock, flags); + tmp->flink = (crystalhd_elem_t *)&ioq->head; + tmp->blink = ioq->tail; + tmp->flink->blink = tmp; + tmp->blink->flink = tmp; + ioq->count++; + spin_unlock_irqrestore(&ioq->lock, flags); + + if (wake) + crystalhd_set_event(&ioq->event); + + return BC_STS_SUCCESS; +} + +/** + * crystalhd_dioq_fetch - Fetch element from head. + * @ioq: DIO queue instance + * + * Return: + * data element from the head.. + * + * Remove an element from Queue. + */ +void *crystalhd_dioq_fetch(crystalhd_dioq_t *ioq) +{ + unsigned long flags = 0; + crystalhd_elem_t *tmp; + crystalhd_elem_t *ret = NULL; + void *data = NULL; + + if (!ioq || (ioq->sig != BC_LINK_DIOQ_SIG)) { + BCMLOG_ERR("Invalid arg!!\n"); + return data; + } + + spin_lock_irqsave(&ioq->lock, flags); + tmp = ioq->head; + if (tmp != (crystalhd_elem_t *)&ioq->head) { + ret = tmp; + tmp->flink->blink = tmp->blink; + tmp->blink->flink = tmp->flink; + ioq->count--; + } + spin_unlock_irqrestore(&ioq->lock, flags); + if (ret) { + data = ret->data; + crystalhd_free_elem(ioq->adp, ret); + } + + return data; +} +/** + * crystalhd_dioq_find_and_fetch - Search the tag and Fetch element + * @ioq: DIO queue instance + * @tag: Tag to search for. + * + * Return: + * element from the head.. + * + * Search TAG and remove the element. + */ +void *crystalhd_dioq_find_and_fetch(crystalhd_dioq_t *ioq, uint32_t tag) +{ + unsigned long flags = 0; + crystalhd_elem_t *tmp; + crystalhd_elem_t *ret = NULL; + void *data = NULL; + + if (!ioq || (ioq->sig != BC_LINK_DIOQ_SIG)) { + BCMLOG_ERR("Invalid arg!!\n"); + return data; + } + + spin_lock_irqsave(&ioq->lock, flags); + tmp = ioq->head; + while (tmp != (crystalhd_elem_t *)&ioq->head) { + if (tmp->tag == tag) { + ret = tmp; + tmp->flink->blink = tmp->blink; + tmp->blink->flink = tmp->flink; + ioq->count--; + break; + } + tmp = tmp->flink; + } + spin_unlock_irqrestore(&ioq->lock, flags); + + if (ret) { + data = ret->data; + crystalhd_free_elem(ioq->adp, ret); + } + + return data; +} + +/** + * crystalhd_dioq_fetch_wait - Fetch element from Head. + * @ioq: DIO queue instance + * @to_secs: Wait timeout in seconds.. + * + * Return: + * element from the head.. + * + * Return element from head if Q is not empty. Wait for new element + * if Q is empty for Timeout seconds. + */ +void *crystalhd_dioq_fetch_wait(crystalhd_dioq_t *ioq, uint32_t to_secs, + uint32_t *sig_pend) +{ + unsigned long flags = 0; + int rc = 0, count; + void *tmp = NULL; + + if (!ioq || (ioq->sig != BC_LINK_DIOQ_SIG) || !to_secs || !sig_pend) { + BCMLOG_ERR("Invalid arg!!\n"); + return tmp; + } + + count = to_secs; + spin_lock_irqsave(&ioq->lock, flags); + while ((ioq->count == 0) && count) { + spin_unlock_irqrestore(&ioq->lock, flags); + + crystalhd_wait_on_event(&ioq->event, (ioq->count > 0), 1000, rc, 0); + if (rc == 0) { + goto out; + } else if (rc == -EINTR) { + BCMLOG(BCMLOG_INFO, "Cancelling fetch wait\n"); + *sig_pend = 1; + return tmp; + } + spin_lock_irqsave(&ioq->lock, flags); + count--; + } + spin_unlock_irqrestore(&ioq->lock, flags); + +out: + return crystalhd_dioq_fetch(ioq); +} + +/** + * crystalhd_map_dio - Map user address for DMA + * @adp: Adapter instance + * @ubuff: User buffer to map. + * @ubuff_sz: User buffer size. + * @uv_offset: UV buffer offset. + * @en_422mode: TRUE:422 FALSE:420 Capture mode. + * @dir_tx: TRUE for Tx (To device from host) + * @dio_hnd: Handle to mapped DIO request. + * + * Return: + * Status. + * + * This routine maps user address and lock pages for DMA. + * + */ +BC_STATUS crystalhd_map_dio(struct crystalhd_adp *adp, void *ubuff, + uint32_t ubuff_sz, uint32_t uv_offset, + bool en_422mode, bool dir_tx, + crystalhd_dio_req **dio_hnd) +{ + crystalhd_dio_req *dio; + /* FIXME: jarod: should some of these unsigned longs be uint32_t or uintptr_t? */ + unsigned long start = 0, end = 0, uaddr = 0, count = 0; + unsigned long spsz = 0, uv_start = 0; + int i = 0, rw = 0, res = 0, nr_pages = 0, skip_fb_sg = 0; + + if (!adp || !ubuff || !ubuff_sz || !dio_hnd) { + BCMLOG_ERR("Invalid arg \n"); + return BC_STS_INV_ARG; + } + /* Compute pages */ + uaddr = (unsigned long)ubuff; + count = (unsigned long)ubuff_sz; + end = (uaddr + count + PAGE_SIZE - 1) >> PAGE_SHIFT; + start = uaddr >> PAGE_SHIFT; + nr_pages = end - start; + + if (!count || ((uaddr + count) < uaddr)) { + BCMLOG_ERR("User addr overflow!!\n"); + return BC_STS_INV_ARG; + } + + dio = crystalhd_alloc_dio(adp); + if (!dio) { + BCMLOG_ERR("dio pool empty..\n"); + return BC_STS_INSUFF_RES; + } + + if (dir_tx) { + rw = WRITE; + dio->direction = DMA_TO_DEVICE; + } else { + rw = READ; + dio->direction = DMA_FROM_DEVICE; + } + + if (nr_pages > dio->max_pages) { + BCMLOG_ERR("max_pages(%d) exceeded(%d)!!\n", + dio->max_pages, nr_pages); + crystalhd_unmap_dio(adp, dio); + return BC_STS_INSUFF_RES; + } + + if (uv_offset) { + uv_start = (uaddr + (unsigned long)uv_offset) >> PAGE_SHIFT; + dio->uinfo.uv_sg_ix = uv_start - start; + dio->uinfo.uv_sg_off = ((uaddr + (unsigned long)uv_offset) & ~PAGE_MASK); + } + + dio->fb_size = ubuff_sz & 0x03; + if (dio->fb_size) { + res = copy_from_user(dio->fb_va, + (void *)(uaddr + count - dio->fb_size), + dio->fb_size); + if (res) { + BCMLOG_ERR("failed %d to copy %u fill bytes from %p\n", + res, dio->fb_size, + (void *)(uaddr + count-dio->fb_size)); + crystalhd_unmap_dio(adp, dio); + return BC_STS_INSUFF_RES; + } + } + + down_read(¤t->mm->mmap_sem); + res = get_user_pages(current, current->mm, uaddr, nr_pages, rw == READ, + 0, dio->pages, NULL); + up_read(¤t->mm->mmap_sem); + + /* Save for release..*/ + dio->sig = crystalhd_dio_locked; + if (res < nr_pages) { + BCMLOG_ERR("get pages failed: %d-%d\n", nr_pages, res); + dio->page_cnt = res; + crystalhd_unmap_dio(adp, dio); + return BC_STS_ERROR; + } + + dio->page_cnt = nr_pages; + /* Get scatter/gather */ + crystalhd_init_sg(dio->sg, dio->page_cnt); + crystalhd_set_sg(&dio->sg[0], dio->pages[0], 0, uaddr & ~PAGE_MASK); + if (nr_pages > 1) { + dio->sg[0].length = PAGE_SIZE - dio->sg[0].offset; + +#ifdef CONFIG_X86_64 + dio->sg[0].dma_length = dio->sg[0].length; +#endif + count -= dio->sg[0].length; + for (i = 1; i < nr_pages; i++) { + if (count < 4) { + spsz = count; + skip_fb_sg = 1; + } else { + spsz = (count < PAGE_SIZE) ? + (count & ~0x03) : PAGE_SIZE; + } + crystalhd_set_sg(&dio->sg[i], dio->pages[i], spsz, 0); + count -= spsz; + } + } else { + if (count < 4) { + dio->sg[0].length = count; + skip_fb_sg = 1; + } else { + dio->sg[0].length = count - dio->fb_size; + } +#ifdef CONFIG_X86_64 + dio->sg[0].dma_length = dio->sg[0].length; +#endif + } + dio->sg_cnt = pci_map_sg(adp->pdev, dio->sg, + dio->page_cnt, dio->direction); + if (dio->sg_cnt <= 0) { + BCMLOG_ERR("sg map %d-%d \n", dio->sg_cnt, dio->page_cnt); + crystalhd_unmap_dio(adp, dio); + return BC_STS_ERROR; + } + if (dio->sg_cnt && skip_fb_sg) + dio->sg_cnt -= 1; + dio->sig = crystalhd_dio_sg_mapped; + /* Fill in User info.. */ + dio->uinfo.xfr_len = ubuff_sz; + dio->uinfo.xfr_buff = ubuff; + dio->uinfo.uv_offset = uv_offset; + dio->uinfo.b422mode = en_422mode; + dio->uinfo.dir_tx = dir_tx; + + *dio_hnd = dio; + + return BC_STS_SUCCESS; +} + +/** + * crystalhd_unmap_sgl - Release mapped resources + * @adp: Adapter instance + * @dio: DIO request instance + * + * Return: + * Status. + * + * This routine is to unmap the user buffer pages. + */ +BC_STATUS crystalhd_unmap_dio(struct crystalhd_adp *adp, crystalhd_dio_req *dio) +{ + struct page *page = NULL; + int j = 0; + + if (!adp || !dio) { + BCMLOG_ERR("Invalid arg \n"); + return BC_STS_INV_ARG; + } + + if ((dio->page_cnt > 0) && (dio->sig != crystalhd_dio_inv)) { + for (j = 0; j < dio->page_cnt; j++) { + page = dio->pages[j]; + if (page) { + if (!PageReserved(page) && + (dio->direction == DMA_FROM_DEVICE)) + SetPageDirty(page); + page_cache_release(page); + } + } + } + if (dio->sig == crystalhd_dio_sg_mapped) + pci_unmap_sg(adp->pdev, dio->sg, dio->page_cnt, dio->direction); + + crystalhd_free_dio(adp, dio); + + return BC_STS_SUCCESS; +} + +/** + * crystalhd_create_dio_pool - Allocate mem pool for DIO management. + * @adp: Adapter instance + * @max_pages: Max pages for size calculation. + * + * Return: + * system error. + * + * This routine creates a memory pool to hold dio context for + * for HW Direct IO operation. + */ +int crystalhd_create_dio_pool(struct crystalhd_adp *adp, uint32_t max_pages) +{ + uint32_t asz = 0, i = 0; + uint8_t *temp; + crystalhd_dio_req *dio; + + if (!adp || !max_pages) { + BCMLOG_ERR("Invalid Arg!!\n"); + return -EINVAL; + } + + /* Get dma memory for fill byte handling..*/ + adp->fill_byte_pool = pci_pool_create("crystalhd_fbyte", + adp->pdev, 8, 8, 0); + if (!adp->fill_byte_pool) { + BCMLOG_ERR("failed to create fill byte pool\n"); + return -ENOMEM; + } + + /* Get the max size from user based on 420/422 modes */ + asz = (sizeof(*dio->pages) * max_pages) + + (sizeof(*dio->sg) * max_pages) + sizeof(*dio); + + BCMLOG(BCMLOG_DBG, "Initializing Dio pool %d %d %x %p\n", + BC_LINK_SG_POOL_SZ, max_pages, asz, adp->fill_byte_pool); + + for (i = 0; i < BC_LINK_SG_POOL_SZ; i++) { + temp = (uint8_t *)kzalloc(asz, GFP_KERNEL); + if ((temp) == NULL) { + BCMLOG_ERR("Failed to alloc %d mem\n", asz); + return -ENOMEM; + } + + dio = (crystalhd_dio_req *)temp; + temp += sizeof(*dio); + dio->pages = (struct page **)temp; + temp += (sizeof(*dio->pages) * max_pages); + dio->sg = (struct scatterlist *)temp; + dio->max_pages = max_pages; + dio->fb_va = pci_pool_alloc(adp->fill_byte_pool, GFP_KERNEL, + &dio->fb_pa); + if (!dio->fb_va) { + BCMLOG_ERR("fill byte alloc failed.\n"); + return -ENOMEM; + } + + crystalhd_free_dio(adp, dio); + } + + return 0; +} + +/** + * crystalhd_destroy_dio_pool - Release DIO mem pool. + * @adp: Adapter instance + * + * Return: + * none. + * + * This routine releases dio memory pool during close. + */ +void crystalhd_destroy_dio_pool(struct crystalhd_adp *adp) +{ + crystalhd_dio_req *dio; + int count = 0; + + if (!adp) { + BCMLOG_ERR("Invalid Arg!!\n"); + return; + } + + do { + dio = crystalhd_alloc_dio(adp); + if (dio) { + if (dio->fb_va) + pci_pool_free(adp->fill_byte_pool, + dio->fb_va, dio->fb_pa); + count++; + kfree(dio); + } + } while (dio); + + if (adp->fill_byte_pool) { + pci_pool_destroy(adp->fill_byte_pool); + adp->fill_byte_pool = NULL; + } + + BCMLOG(BCMLOG_DBG, "Released dio pool %d \n", count); +} + +/** + * crystalhd_create_elem_pool - List element pool creation. + * @adp: Adapter instance + * @pool_size: Number of elements in the pool. + * + * Return: + * 0 - success, <0 error + * + * Create general purpose list element pool to hold pending, + * and active requests. + */ +int crystalhd_create_elem_pool(struct crystalhd_adp *adp, uint32_t pool_size) +{ + uint32_t i; + crystalhd_elem_t *temp; + + if (!adp || !pool_size) + return -EINVAL; + + for (i = 0; i < pool_size; i++) { + temp = kzalloc(sizeof(*temp), GFP_KERNEL); + if (!temp) { + BCMLOG_ERR("kalloc failed \n"); + return -ENOMEM; + } + crystalhd_free_elem(adp, temp); + } + BCMLOG(BCMLOG_DBG, "allocated %d elem\n", pool_size); + return 0; +} + +/** + * crystalhd_delete_elem_pool - List element pool deletion. + * @adp: Adapter instance + * + * Return: + * none + * + * Delete general purpose list element pool. + */ +void crystalhd_delete_elem_pool(struct crystalhd_adp *adp) +{ + crystalhd_elem_t *temp; + int dbg_cnt = 0; + + if (!adp) + return; + + do { + temp = crystalhd_alloc_elem(adp); + if (temp) { + kfree(temp); + dbg_cnt++; + } + } while (temp); + + BCMLOG(BCMLOG_DBG, "released %d elem\n", dbg_cnt); +} + +/*================ Debug support routines.. ================================*/ +void crystalhd_show_buffer(uint32_t off, uint8_t *buff, uint32_t dwcount) +{ + uint32_t i, k = 1; + + for (i = 0; i < dwcount; i++) { + if (k == 1) + BCMLOG(BCMLOG_DATA, "0x%08X : ", off); + + BCMLOG(BCMLOG_DATA, " 0x%08X ", *((uint32_t *)buff)); + + buff += sizeof(uint32_t); + off += sizeof(uint32_t); + k++; + if ((i == dwcount - 1) || (k > 4)) { + BCMLOG(BCMLOG_DATA, "\n"); + k = 1; + } + } +} diff --git a/drivers/staging/crystalhd/crystalhd_misc.h b/drivers/staging/crystalhd/crystalhd_misc.h new file mode 100644 index 000000000000..a2aa6ad7fc81 --- /dev/null +++ b/drivers/staging/crystalhd/crystalhd_misc.h @@ -0,0 +1,229 @@ +/*************************************************************************** + * Copyright (c) 2005-2009, Broadcom Corporation. + * + * Name: crystalhd_misc . h + * + * Description: + * BCM70012 Linux driver general purpose routines. + * Includes reg/mem read and write routines. + * + * HISTORY: + * + ********************************************************************** + * This file is part of the crystalhd device driver. + * + * This driver is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 2 of the License. + * + * This driver is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this driver. If not, see . + **********************************************************************/ + +#ifndef _CRYSTALHD_MISC_H_ +#define _CRYSTALHD_MISC_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "bc_dts_glob_lnx.h" + +/* Global log level variable defined in crystal_misc.c file */ +extern uint32_t g_linklog_level; + +/* Global element pool for all Queue management. + * TX: Active = BC_TX_LIST_CNT, Free = BC_TX_LIST_CNT. + * RX: Free = BC_RX_LIST_CNT, Active = 2 + * FW-CMD: 4 + */ +#define BC_LINK_ELEM_POOL_SZ ((BC_TX_LIST_CNT * 2) + BC_RX_LIST_CNT + 2 + 4) + +/* Driver's IODATA pool count */ +#define CHD_IODATA_POOL_SZ (BC_IOCTL_DATA_POOL_SIZE * BC_LINK_MAX_OPENS) + +/* Scatter Gather memory pool size for Tx and Rx */ +#define BC_LINK_SG_POOL_SZ (BC_TX_LIST_CNT + BC_RX_LIST_CNT) + +enum _crystalhd_dio_sig { + crystalhd_dio_inv = 0, + crystalhd_dio_locked, + crystalhd_dio_sg_mapped, +}; + +struct crystalhd_dio_user_info { + void *xfr_buff; + uint32_t xfr_len; + uint32_t uv_offset; + bool dir_tx; + + uint32_t uv_sg_ix; + uint32_t uv_sg_off; + int comp_sts; + int ev_sts; + uint32_t y_done_sz; + uint32_t uv_done_sz; + uint32_t comp_flags; + bool b422mode; +}; + +typedef struct _crystalhd_dio_req { + uint32_t sig; + uint32_t max_pages; + struct page **pages; + struct scatterlist *sg; + int sg_cnt; + int page_cnt; + int direction; + struct crystalhd_dio_user_info uinfo; + void *fb_va; + uint32_t fb_size; + dma_addr_t fb_pa; + struct _crystalhd_dio_req *next; +} crystalhd_dio_req; + +#define BC_LINK_DIOQ_SIG (0x09223280) + +typedef struct _crystalhd_elem_s { + struct _crystalhd_elem_s *flink; + struct _crystalhd_elem_s *blink; + void *data; + uint32_t tag; +} crystalhd_elem_t; + +typedef void (*crystalhd_data_free_cb)(void *context, void *data); + +typedef struct _crystalhd_dioq_s { + uint32_t sig; + struct crystalhd_adp *adp; + crystalhd_elem_t *head; + crystalhd_elem_t *tail; + uint32_t count; + spinlock_t lock; + wait_queue_head_t event; + crystalhd_data_free_cb data_rel_cb; + void *cb_context; +} crystalhd_dioq_t; + +typedef void (*hw_comp_callback)(crystalhd_dio_req *, + wait_queue_head_t *event, BC_STATUS sts); + +/*========= Decoder (7412) register access routines.================= */ +uint32_t bc_dec_reg_rd(struct crystalhd_adp *, uint32_t); +void bc_dec_reg_wr(struct crystalhd_adp *, uint32_t, uint32_t); + +/*========= Link (70012) register access routines.. =================*/ +uint32_t crystalhd_reg_rd(struct crystalhd_adp *, uint32_t); +void crystalhd_reg_wr(struct crystalhd_adp *, uint32_t, uint32_t); + +/*========= Decoder (7412) memory access routines..=================*/ +BC_STATUS crystalhd_mem_rd(struct crystalhd_adp *, uint32_t, uint32_t, uint32_t *); +BC_STATUS crystalhd_mem_wr(struct crystalhd_adp *, uint32_t, uint32_t, uint32_t *); + +/*==========Link (70012) PCIe Config access routines.================*/ +BC_STATUS crystalhd_pci_cfg_rd(struct crystalhd_adp *, uint32_t, uint32_t, uint32_t *); +BC_STATUS crystalhd_pci_cfg_wr(struct crystalhd_adp *, uint32_t, uint32_t, uint32_t); + +/*========= Linux Kernel Interface routines. ======================= */ +void *bc_kern_dma_alloc(struct crystalhd_adp *, uint32_t, dma_addr_t *); +void bc_kern_dma_free(struct crystalhd_adp *, uint32_t, + void *, dma_addr_t); +#define crystalhd_create_event(_ev) init_waitqueue_head(_ev) +#define crystalhd_set_event(_ev) wake_up_interruptible(_ev) +#define crystalhd_wait_on_event(ev, condition, timeout, ret, nosig) \ +do { \ + DECLARE_WAITQUEUE(entry, current); \ + unsigned long end = jiffies + ((timeout * HZ) / 1000); \ + ret = 0; \ + add_wait_queue(ev, &entry); \ + for (;;) { \ + __set_current_state(TASK_INTERRUPTIBLE); \ + if (condition) { \ + break; \ + } \ + if (time_after_eq(jiffies, end)) { \ + ret = -EBUSY; \ + break; \ + } \ + schedule_timeout((HZ / 100 > 1) ? HZ / 100 : 1); \ + if (!nosig && signal_pending(current)) { \ + ret = -EINTR; \ + break; \ + } \ + } \ + __set_current_state(TASK_RUNNING); \ + remove_wait_queue(ev, &entry); \ +} while (0) + +/*================ Direct IO mapping routines ==================*/ +extern int crystalhd_create_dio_pool(struct crystalhd_adp *, uint32_t); +extern void crystalhd_destroy_dio_pool(struct crystalhd_adp *); +extern BC_STATUS crystalhd_map_dio(struct crystalhd_adp *, void *, uint32_t, + uint32_t, bool, bool, crystalhd_dio_req**); + +extern BC_STATUS crystalhd_unmap_dio(struct crystalhd_adp *, crystalhd_dio_req*); +#define crystalhd_get_sgle_paddr(_dio, _ix) (cpu_to_le64(sg_dma_address(&_dio->sg[_ix]))) +#define crystalhd_get_sgle_len(_dio, _ix) (cpu_to_le32(sg_dma_len(&_dio->sg[_ix]))) + +/*================ General Purpose Queues ==================*/ +extern BC_STATUS crystalhd_create_dioq(struct crystalhd_adp *, crystalhd_dioq_t **, crystalhd_data_free_cb , void *); +extern void crystalhd_delete_dioq(struct crystalhd_adp *, crystalhd_dioq_t *); +extern BC_STATUS crystalhd_dioq_add(crystalhd_dioq_t *ioq, void *data, bool wake, uint32_t tag); +extern void *crystalhd_dioq_fetch(crystalhd_dioq_t *ioq); +extern void *crystalhd_dioq_find_and_fetch(crystalhd_dioq_t *ioq, uint32_t tag); +extern void *crystalhd_dioq_fetch_wait(crystalhd_dioq_t *ioq, uint32_t to_secs, uint32_t *sig_pend); + +#define crystalhd_dioq_count(_ioq) ((_ioq) ? _ioq->count : 0) + +extern int crystalhd_create_elem_pool(struct crystalhd_adp *, uint32_t); +extern void crystalhd_delete_elem_pool(struct crystalhd_adp *); + + +/*================ Debug routines/macros .. ================================*/ +extern void crystalhd_show_buffer(uint32_t off, uint8_t *buff, uint32_t dwcount); + +enum _chd_log_levels { + BCMLOG_ERROR = 0x80000000, /* Don't disable this option */ + BCMLOG_DATA = 0x40000000, /* Data, enable by default */ + BCMLOG_SPINLOCK = 0x20000000, /* Spcial case for Spin locks*/ + + /* Following are allowed only in debug mode */ + BCMLOG_INFO = 0x00000001, /* Generic informational */ + BCMLOG_DBG = 0x00000002, /* First level Debug info */ + BCMLOG_SSTEP = 0x00000004, /* Stepping information */ + BCMLOG_ENTER_LEAVE = 0x00000008, /* stack tracking */ +}; + +#define BCMLOG_ENTER \ +if (g_linklog_level & BCMLOG_ENTER_LEAVE) { \ + printk("Entered %s\n", __func__); \ +} + +#define BCMLOG_LEAVE \ +if (g_linklog_level & BCMLOG_ENTER_LEAVE) { \ + printk("Leaving %s\n", __func__); \ +} + +#define BCMLOG(trace, fmt, args...) \ +if (g_linklog_level & trace) { \ + printk(fmt, ##args); \ +} + +#define BCMLOG_ERR(fmt, args...) \ +do { \ + if (g_linklog_level & BCMLOG_ERROR) { \ + printk("*ERR*:%s:%d: "fmt, __FILE__, __LINE__, ##args); \ + } \ +} while (0); + +#endif From 716323c09319ae5e6c9e413a6378d61a77b26996 Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Wed, 23 Dec 2009 02:36:43 +0100 Subject: [PATCH 070/367] Staging: rtl8192u: ieee80211: add missing parentheses not(!) has a higher precedence than bit and(&). Signed-off-by: Roel Kluin Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c index da2449d290cb..c0b2c02b0ac4 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c @@ -718,7 +718,7 @@ int ieee80211_wx_get_encode_ext(struct ieee80211_device *ieee, } else idx = ieee->tx_keyidx; - if (!ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY && + if (!(ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY) && ext->alg != IW_ENCODE_ALG_WEP) if (idx != 0 || ieee->iw_mode != IW_MODE_INFRA) return -EINVAL; From 23a51a8061567a47347ade59edf2a0bde0eece30 Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Sat, 26 Dec 2009 20:00:47 +0100 Subject: [PATCH 071/367] Staging: rt2860: test off by one in RtmpAsicSendCommandToMcu() `i' reaches 101 after the loop, so if it was 100 then it succeeded in the last iteration. This is probably unlikely to cause problems. Signed-off-by: Roel Kluin Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rt2860/common/rtmp_mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rt2860/common/rtmp_mcu.c b/drivers/staging/rt2860/common/rtmp_mcu.c index 9f03901433bb..e80f587cff1a 100644 --- a/drivers/staging/rt2860/common/rtmp_mcu.c +++ b/drivers/staging/rt2860/common/rtmp_mcu.c @@ -221,7 +221,7 @@ int RtmpAsicSendCommandToMcu(struct rt_rtmp_adapter *pAd, ("AsicSendCommanToMcu::Mail box is busy\n")); } while (i++ < 100); - if (i >= 100) { + if (i > 100) { DBGPRINT_ERR(("H2M_MAILBOX still hold by MCU. command fail\n")); return FALSE; } From acdfd0e088502dc225f594b5a5598cab53ffd375 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sat, 2 Jan 2010 11:30:36 +0100 Subject: [PATCH 072/367] Staging: batman-adv: Remove NULL pointer check It is safe to call kfree(NULL) which makes this extra check unneeded. It was found using checkpatch.pl from linux-2.6 Signed-off-by: Sven Eckelmann Acked-by: Simon Wunderlich Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/hard-interface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/batman-adv/hard-interface.c b/drivers/staging/batman-adv/hard-interface.c index e9cb977d0016..28d02f68a3f8 100644 --- a/drivers/staging/batman-adv/hard-interface.c +++ b/drivers/staging/batman-adv/hard-interface.c @@ -399,8 +399,7 @@ int hardif_add_interface(char *dev, int if_num) return 1; out: - if (batman_if->packet_buff) - kfree(batman_if->packet_buff); + kfree(batman_if->packet_buff); kfree(batman_if); kfree(dev); return -1; From 183cd9ee543c9364fa42be8d30265fd47a914b59 Mon Sep 17 00:00:00 2001 From: Simon Wunderlich Date: Sat, 2 Jan 2010 11:30:37 +0100 Subject: [PATCH 073/367] Staging: batman-adv: update README for latest kernel state in the README that we also (compile) support 2.6.32 Signed-off-by: Simon Wunderlich Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/batman-adv/README b/drivers/staging/batman-adv/README index a6a419de0b50..2bedcbedb6af 100644 --- a/drivers/staging/batman-adv/README +++ b/drivers/staging/batman-adv/README @@ -1,4 +1,4 @@ -[state: 13-11-2009] +[state: 13-12-2009] BATMAN-ADV ---------- @@ -15,7 +15,7 @@ above B.A.T.M.A.N. Advanced, prominent examples are: IPv4, IPv6, DHCP, IPX. This is batman-advanced implemented as Linux kernel driver. It does not depend on any network (other) driver, and can be used on wifi as well as ethernet, vpn, etc ... (anything with ethernet-style layer 2). -It compiles against and should work with Linux 2.6.20 - 2.6.31. Supporting older +It compiles against and should work with Linux 2.6.20 - 2.6.32. Supporting older versions is not planned, but it's probably easy to backport it. If you work on a backport, feel free to contact us. :-) From 4ce21a7faf320bdb750a2e1639f8f2dbb27bdb89 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Sat, 2 Jan 2010 11:30:38 +0100 Subject: [PATCH 074/367] Staging: batman-adv: Replace KERN_DEBUG with bat_dbg Ameya Palande requested we replace printk(KERN_DEBUG "") by pr_debug() I decided it was better to use our debug macro. Signed-off-by: Andrew Lunn Acked-by: Marek Lindner Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/TODO | 6 ------ drivers/staging/batman-adv/device.c | 6 +++--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/staging/batman-adv/TODO b/drivers/staging/batman-adv/TODO index ea6dcf94d661..8c2b89e82ad7 100644 --- a/drivers/staging/batman-adv/TODO +++ b/drivers/staging/batman-adv/TODO @@ -29,12 +29,6 @@ -> PRIMARY) => logging -* the log level LOG_TYPE_CRIT, LOG_TYPE_WARN & LOG_TYPE_NOTICE will be -* unified to use printk -* LOG_TYPE_BATMAN & LOG_TYPE_ROUTES will also use printk but only after the -* internal debug level has been raised -* the internal debug level can be modified using a module parameter (debug) -* or at run time via /sys/module/batman-adv/parameters/debug * make use of printk %pM support instead of converting mac addresses * manually diff --git a/drivers/staging/batman-adv/device.c b/drivers/staging/batman-adv/device.c index 12f2de98b3d0..92cf8d56a5f2 100644 --- a/drivers/staging/batman-adv/device.c +++ b/drivers/staging/batman-adv/device.c @@ -207,7 +207,7 @@ ssize_t bat_device_write(struct file *file, const char __user *buff, struct batman_if *batman_if; if (len < sizeof(struct icmp_packet)) { - printk(KERN_DEBUG "batman-adv:Error - can't send packet from char device: invalid packet size\n"); + bat_dbg(DBG_BATMAN, "batman-adv:Error - can't send packet from char device: invalid packet size\n"); return -EINVAL; } @@ -218,12 +218,12 @@ ssize_t bat_device_write(struct file *file, const char __user *buff, return -EFAULT; if (icmp_packet.packet_type != BAT_ICMP) { - printk(KERN_DEBUG "batman-adv:Error - can't send packet from char device: got bogus packet type (expected: BAT_ICMP)\n"); + bat_dbg(DBG_BATMAN, "batman-adv:Error - can't send packet from char device: got bogus packet type (expected: BAT_ICMP)\n"); return -EINVAL; } if (icmp_packet.msg_type != ECHO_REQUEST) { - printk(KERN_DEBUG "batman-adv:Error - can't send packet from char device: got bogus message type (expected: ECHO_REQUEST)\n"); + bat_dbg(DBG_BATMAN, "batman-adv:Error - can't send packet from char device: got bogus message type (expected: ECHO_REQUEST)\n"); return -EINVAL; } From b6c359767bc743a7b6830660daa8f7e5c4273ad8 Mon Sep 17 00:00:00 2001 From: Simon Wunderlich Date: Sat, 2 Jan 2010 11:30:39 +0100 Subject: [PATCH 075/367] Staging: batman-adv: initialize static hash iterators instead of dynamically registering hash iterators, calling functions are changed to register the iterator objects statically. The two advantages are: * no memory leaks when aborting from hash_iterate() * no calls to kmalloc/kfree, therefore a little faster/safer Tested with 9 QEMU instances, no obvious regression found. Signed-off-by: Simon Wunderlich Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/hard-interface.c | 6 ++-- drivers/staging/batman-adv/hash.c | 25 +++++--------- drivers/staging/batman-adv/hash.h | 5 +++ drivers/staging/batman-adv/originator.c | 8 ++--- drivers/staging/batman-adv/proc.c | 12 +++---- drivers/staging/batman-adv/routing.c | 6 ++-- .../staging/batman-adv/translation-table.c | 24 +++++++------- drivers/staging/batman-adv/vis.c | 33 +++++++++---------- 8 files changed, 58 insertions(+), 61 deletions(-) diff --git a/drivers/staging/batman-adv/hard-interface.c b/drivers/staging/batman-adv/hard-interface.c index 28d02f68a3f8..7c885926b167 100644 --- a/drivers/staging/batman-adv/hard-interface.c +++ b/drivers/staging/batman-adv/hard-interface.c @@ -318,7 +318,7 @@ int hardif_add_interface(char *dev, int if_num) struct batman_if *batman_if; struct batman_packet *batman_packet; struct orig_node *orig_node; - struct hash_it_t *hashit = NULL; + HASHIT(hashit); batman_if = kmalloc(sizeof(struct batman_if), GFP_KERNEL); @@ -377,8 +377,8 @@ int hardif_add_interface(char *dev, int if_num) * if_num */ spin_lock(&orig_hash_lock); - while (NULL != (hashit = hash_iterate(orig_hash, hashit))) { - orig_node = hashit->bucket->data; + while (hash_iterate(orig_hash, &hashit)) { + orig_node = hashit.bucket->data; if (resize_orig(orig_node, if_num) == -1) { spin_unlock(&orig_hash_lock); goto out; diff --git a/drivers/staging/batman-adv/hash.c b/drivers/staging/batman-adv/hash.c index 61cb4a20ebca..5a2018de3ff2 100644 --- a/drivers/staging/batman-adv/hash.c +++ b/drivers/staging/batman-adv/hash.c @@ -64,24 +64,18 @@ void hash_destroy(struct hashtable_t *hash) kfree(hash); } -/* iterate though the hash. first element is selected with iter_in NULL. use - * the returned iterator to access the elements until hash_it_t returns NULL. */ -struct hash_it_t *hash_iterate(struct hashtable_t *hash, - struct hash_it_t *iter_in) -{ - struct hash_it_t *iter; +/* iterate though the hash. First element is selected if an iterator + * initialized with HASHIT() is supplied as iter. Use the returned + * (or supplied) iterator to access the elements until hash_iterate returns + * NULL. */ +struct hash_it_t *hash_iterate(struct hashtable_t *hash, + struct hash_it_t *iter) +{ if (!hash) return NULL; - - if (iter_in == NULL) { - iter = kmalloc(sizeof(struct hash_it_t), GFP_ATOMIC); - iter->index = -1; - iter->bucket = NULL; - iter->prev_bucket = NULL; - } else { - iter = iter_in; - } + if (!iter) + return NULL; /* sanity checks first (if our bucket got deleted in the last * iteration): */ @@ -139,7 +133,6 @@ struct hash_it_t *hash_iterate(struct hashtable_t *hash, } /* nothing to iterate over anymore */ - kfree(iter); return NULL; } diff --git a/drivers/staging/batman-adv/hash.h b/drivers/staging/batman-adv/hash.h index bb60f082be6a..a70d6d6e1c7a 100644 --- a/drivers/staging/batman-adv/hash.h +++ b/drivers/staging/batman-adv/hash.h @@ -21,6 +21,11 @@ #ifndef _BATMAN_HASH_H #define _BATMAN_HASH_H +#define HASHIT(name) struct hash_it_t name = { \ + .index = -1, .bucket = NULL, \ + .prev_bucket = NULL, \ + .first_bucket = NULL } + typedef int (*hashdata_compare_cb)(void *, void *); typedef int (*hashdata_choose_cb)(void *, int); diff --git a/drivers/staging/batman-adv/originator.c b/drivers/staging/batman-adv/originator.c index 9962af7ae640..b1049826b51a 100644 --- a/drivers/staging/batman-adv/originator.c +++ b/drivers/staging/batman-adv/originator.c @@ -221,16 +221,16 @@ static bool purge_orig_node(struct orig_node *orig_node) void purge_orig(struct work_struct *work) { - struct hash_it_t *hashit = NULL; + HASHIT(hashit); struct orig_node *orig_node; spin_lock(&orig_hash_lock); /* for all origins... */ - while (NULL != (hashit = hash_iterate(orig_hash, hashit))) { - orig_node = hashit->bucket->data; + while (hash_iterate(orig_hash, &hashit)) { + orig_node = hashit.bucket->data; if (purge_orig_node(orig_node)) { - hash_remove_bucket(orig_hash, hashit); + hash_remove_bucket(orig_hash, &hashit); free_orig_node(orig_node); } } diff --git a/drivers/staging/batman-adv/proc.c b/drivers/staging/batman-adv/proc.c index ed4c73484d7d..9f7136b3be3e 100644 --- a/drivers/staging/batman-adv/proc.c +++ b/drivers/staging/batman-adv/proc.c @@ -186,7 +186,7 @@ static int proc_orig_interval_open(struct inode *inode, struct file *file) static int proc_originators_read(struct seq_file *seq, void *offset) { - struct hash_it_t *hashit = NULL; + HASHIT(hashit); struct orig_node *orig_node; struct neigh_node *neigh_node; int batman_count = 0; @@ -215,9 +215,9 @@ static int proc_originators_read(struct seq_file *seq, void *offset) rcu_read_unlock(); spin_lock(&orig_hash_lock); - while (NULL != (hashit = hash_iterate(orig_hash, hashit))) { + while (hash_iterate(orig_hash, &hashit)) { - orig_node = hashit->bucket->data; + orig_node = hashit.bucket->data; if (!orig_node->router) continue; @@ -413,7 +413,7 @@ static void proc_vis_read_entry(struct seq_file *seq, static int proc_vis_read(struct seq_file *seq, void *offset) { - struct hash_it_t *hashit = NULL; + HASHIT(hashit); struct vis_info *info; struct vis_info_entry *entries; struct vis_if_list *if_entries = NULL; @@ -440,8 +440,8 @@ static int proc_vis_read(struct seq_file *seq, void *offset) seq_printf(seq, "digraph {\n"); spin_lock(&vis_hash_lock); - while (NULL != (hashit = hash_iterate(vis_hash, hashit))) { - info = hashit->bucket->data; + while (hash_iterate(vis_hash, &hashit)) { + info = hashit.bucket->data; entries = (struct vis_info_entry *) ((char *)info + sizeof(struct vis_info)); diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c index e8d712788dad..68dea76b0cab 100644 --- a/drivers/staging/batman-adv/routing.c +++ b/drivers/staging/batman-adv/routing.c @@ -40,14 +40,14 @@ static atomic_t data_ready_cond; atomic_t exit_cond; void slide_own_bcast_window(struct batman_if *batman_if) { - struct hash_it_t *hashit = NULL; + HASHIT(hashit); struct orig_node *orig_node; TYPE_OF_WORD *word; spin_lock(&orig_hash_lock); - while (NULL != (hashit = hash_iterate(orig_hash, hashit))) { - orig_node = hashit->bucket->data; + while (hash_iterate(orig_hash, &hashit)) { + orig_node = hashit.bucket->data; word = &(orig_node->bcast_own[batman_if->if_num * NUM_WORDS]); bit_get_packet(word, 1, 0); diff --git a/drivers/staging/batman-adv/translation-table.c b/drivers/staging/batman-adv/translation-table.c index c7122da98f1e..088715ba8dbd 100644 --- a/drivers/staging/batman-adv/translation-table.c +++ b/drivers/staging/batman-adv/translation-table.c @@ -134,18 +134,18 @@ void hna_local_add(uint8_t *addr) int hna_local_fill_buffer(unsigned char *buff, int buff_len) { struct hna_local_entry *hna_local_entry; - struct hash_it_t *hashit = NULL; + HASHIT(hashit); int i = 0; unsigned long flags; spin_lock_irqsave(&hna_local_hash_lock, flags); - while (NULL != (hashit = hash_iterate(hna_local_hash, hashit))) { + while (hash_iterate(hna_local_hash, &hashit)) { if (buff_len < (i + 1) * ETH_ALEN) break; - hna_local_entry = hashit->bucket->data; + hna_local_entry = hashit.bucket->data; memcpy(buff + (i * ETH_ALEN), hna_local_entry->addr, ETH_ALEN); i++; @@ -163,18 +163,18 @@ int hna_local_fill_buffer(unsigned char *buff, int buff_len) int hna_local_fill_buffer_text(unsigned char *buff, int buff_len) { struct hna_local_entry *hna_local_entry; - struct hash_it_t *hashit = NULL; + HASHIT(hashit); int bytes_written = 0; unsigned long flags; spin_lock_irqsave(&hna_local_hash_lock, flags); - while (NULL != (hashit = hash_iterate(hna_local_hash, hashit))) { + while (hash_iterate(hna_local_hash, &hashit)) { if (buff_len < bytes_written + ETH_STR_LEN + 4) break; - hna_local_entry = hashit->bucket->data; + hna_local_entry = hashit.bucket->data; bytes_written += snprintf(buff + bytes_written, ETH_STR_LEN + 4, " * %02x:%02x:%02x:%02x:%02x:%02x\n", @@ -214,14 +214,14 @@ static void hna_local_del(struct hna_local_entry *hna_local_entry, void hna_local_purge(struct work_struct *work) { struct hna_local_entry *hna_local_entry; - struct hash_it_t *hashit = NULL; + HASHIT(hashit); unsigned long flags; unsigned long timeout; spin_lock_irqsave(&hna_local_hash_lock, flags); - while (NULL != (hashit = hash_iterate(hna_local_hash, hashit))) { - hna_local_entry = hashit->bucket->data; + while (hash_iterate(hna_local_hash, &hashit)) { + hna_local_entry = hashit.bucket->data; timeout = hna_local_entry->last_seen + ((LOCAL_HNA_TIMEOUT / 1000) * HZ); @@ -345,17 +345,17 @@ void hna_global_add_orig(struct orig_node *orig_node, int hna_global_fill_buffer_text(unsigned char *buff, int buff_len) { struct hna_global_entry *hna_global_entry; - struct hash_it_t *hashit = NULL; + HASHIT(hashit); int bytes_written = 0; unsigned long flags; spin_lock_irqsave(&hna_global_hash_lock, flags); - while (NULL != (hashit = hash_iterate(hna_global_hash, hashit))) { + while (hash_iterate(hna_global_hash, &hashit)) { if (buff_len < bytes_written + (2 * ETH_STR_LEN) + 10) break; - hna_global_entry = hashit->bucket->data; + hna_global_entry = hashit.bucket->data; bytes_written += snprintf(buff + bytes_written, (2 * ETH_STR_LEN) + 10, diff --git a/drivers/staging/batman-adv/vis.c b/drivers/staging/batman-adv/vis.c index cdb8aab146d7..086da871cd59 100644 --- a/drivers/staging/batman-adv/vis.c +++ b/drivers/staging/batman-adv/vis.c @@ -266,12 +266,12 @@ end: * Must be called with the originator hash locked */ static int find_best_vis_server(struct vis_info *info) { - struct hash_it_t *hashit = NULL; + HASHIT(hashit); struct orig_node *orig_node; int best_tq = -1; - while (NULL != (hashit = hash_iterate(orig_hash, hashit))) { - orig_node = hashit->bucket->data; + while (hash_iterate(orig_hash, &hashit)) { + orig_node = hashit.bucket->data; if ((orig_node != NULL) && (orig_node->router != NULL) && (orig_node->flags & VIS_SERVER) && @@ -297,7 +297,8 @@ static bool vis_packet_full(struct vis_info *info) * returns 0 on success, -1 if no packet could be generated */ static int generate_vis_packet(void) { - struct hash_it_t *hashit = NULL; + HASHIT(hashit_local); + HASHIT(hashit_global); struct orig_node *orig_node; struct vis_info *info = (struct vis_info *)my_vis_info; struct vis_info_entry *entry, *entry_array; @@ -320,13 +321,12 @@ static int generate_vis_packet(void) return -1; } } - hashit = NULL; entry_array = (struct vis_info_entry *) ((char *)info + sizeof(struct vis_info)); - while (NULL != (hashit = hash_iterate(orig_hash, hashit))) { - orig_node = hashit->bucket->data; + while (hash_iterate(orig_hash, &hashit_global)) { + orig_node = hashit_global.bucket->data; if (orig_node->router != NULL && compare_orig(orig_node->router->addr, orig_node->orig) && orig_node->batman_if @@ -349,10 +349,9 @@ static int generate_vis_packet(void) spin_unlock(&orig_hash_lock); - hashit = NULL; spin_lock_irqsave(&hna_local_hash_lock, flags); - while (NULL != (hashit = hash_iterate(hna_local_hash, hashit))) { - hna_local_entry = hashit->bucket->data; + while (hash_iterate(hna_local_hash, &hashit_local)) { + hna_local_entry = hashit_local.bucket->data; entry = &entry_array[info->packet.entries]; memset(entry->src, 0, ETH_ALEN); memcpy(entry->dest, hna_local_entry->addr, ETH_ALEN); @@ -370,16 +369,16 @@ static int generate_vis_packet(void) static void purge_vis_packets(void) { - struct hash_it_t *hashit = NULL; + HASHIT(hashit); struct vis_info *info; - while (NULL != (hashit = hash_iterate(vis_hash, hashit))) { - info = hashit->bucket->data; + while (hash_iterate(vis_hash, &hashit)) { + info = hashit.bucket->data; if (info == my_vis_info) /* never purge own data. */ continue; if (time_after(jiffies, info->first_seen + (VIS_TIMEOUT/1000)*HZ)) { - hash_remove_bucket(vis_hash, hashit); + hash_remove_bucket(vis_hash, &hashit); free_info(info); } } @@ -387,14 +386,14 @@ static void purge_vis_packets(void) static void broadcast_vis_packet(struct vis_info *info, int packet_length) { - struct hash_it_t *hashit = NULL; + HASHIT(hashit); struct orig_node *orig_node; spin_lock(&orig_hash_lock); /* send to all routers in range. */ - while (NULL != (hashit = hash_iterate(orig_hash, hashit))) { - orig_node = hashit->bucket->data; + while (hash_iterate(orig_hash, &hashit)) { + orig_node = hashit.bucket->data; /* if it's a vis server and reachable, send it. */ if (orig_node && From 5ea84fa369baa3d36fa8a78e9af3dc71bbcbca51 Mon Sep 17 00:00:00 2001 From: Simon Wunderlich Date: Sat, 2 Jan 2010 11:30:40 +0100 Subject: [PATCH 076/367] Staging: batman-adv: consistent spelling of "neighbors" we have written "neighbors", "neighbours" and bad spelled versions of this word, this patch should make it consistent. Signed-off-by: Simon Wunderlich Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/originator.c | 12 ++++++------ drivers/staging/batman-adv/packet.h | 2 +- drivers/staging/batman-adv/proc.c | 2 +- drivers/staging/batman-adv/routing.c | 10 +++++----- drivers/staging/batman-adv/types.h | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/staging/batman-adv/originator.c b/drivers/staging/batman-adv/originator.c index b1049826b51a..6a1fdf2b702b 100644 --- a/drivers/staging/batman-adv/originator.c +++ b/drivers/staging/batman-adv/originator.c @@ -74,7 +74,7 @@ create_neighbor(struct orig_node *orig_node, struct orig_node *orig_neigh_node, { struct neigh_node *neigh_node; - bat_dbg(DBG_BATMAN, "Creating new last-hop neighbour of originator\n"); + bat_dbg(DBG_BATMAN, "Creating new last-hop neighbor of originator\n"); neigh_node = kmalloc(sizeof(struct neigh_node), GFP_ATOMIC); memset(neigh_node, 0, sizeof(struct neigh_node)); @@ -94,7 +94,7 @@ void free_orig_node(void *data) struct neigh_node *neigh_node; struct orig_node *orig_node = (struct orig_node *)data; - /* for all neighbours towards this originator ... */ + /* for all neighbors towards this originator ... */ list_for_each_safe(list_pos, list_pos_tmp, &orig_node->neigh_list) { neigh_node = list_entry(list_pos, struct neigh_node, list); @@ -159,7 +159,7 @@ struct orig_node *get_orig_node(uint8_t *addr) return orig_node; } -static bool purge_orig_neigbours(struct orig_node *orig_node, +static bool purge_orig_neighbors(struct orig_node *orig_node, struct neigh_node **best_neigh_node) { struct list_head *list_pos, *list_pos_tmp; @@ -170,7 +170,7 @@ static bool purge_orig_neigbours(struct orig_node *orig_node, *best_neigh_node = NULL; - /* for all neighbours towards this originator ... */ + /* for all neighbors towards this originator ... */ list_for_each_safe(list_pos, list_pos_tmp, &orig_node->neigh_list) { neigh_node = list_entry(list_pos, struct neigh_node, list); @@ -180,7 +180,7 @@ static bool purge_orig_neigbours(struct orig_node *orig_node, addr_to_string(neigh_str, neigh_node->addr); addr_to_string(orig_str, orig_node->orig); - bat_dbg(DBG_BATMAN, "Neighbour timeout: originator %s, neighbour: %s, last_valid %lu\n", orig_str, neigh_str, (neigh_node->last_valid / HZ)); + bat_dbg(DBG_BATMAN, "neighbor timeout: originator %s, neighbor: %s, last_valid %lu\n", orig_str, neigh_str, (neigh_node->last_valid / HZ)); neigh_purged = true; list_del(list_pos); @@ -211,7 +211,7 @@ static bool purge_orig_node(struct orig_node *orig_node) orig_str, (orig_node->last_valid / HZ)); return true; } else { - if (purge_orig_neigbours(orig_node, &best_neigh_node)) + if (purge_orig_neighbors(orig_node, &best_neigh_node)) update_routes(orig_node, best_neigh_node, orig_node->hna_buff, orig_node->hna_buff_len); diff --git a/drivers/staging/batman-adv/packet.h b/drivers/staging/batman-adv/packet.h index 5627ca326018..ad006ce8b131 100644 --- a/drivers/staging/batman-adv/packet.h +++ b/drivers/staging/batman-adv/packet.h @@ -90,7 +90,7 @@ struct vis_packet { uint8_t entries; /* number of entries behind this struct */ uint8_t ttl; /* TTL */ uint8_t vis_orig[6]; /* originator that informs about its - * neighbours */ + * neighbors */ uint8_t target_orig[6]; /* who should receive this packet */ uint8_t sender_orig[6]; /* who sent or rebroadcasted this packet */ } __attribute__((packed)); diff --git a/drivers/staging/batman-adv/proc.c b/drivers/staging/batman-adv/proc.c index 9f7136b3be3e..71668cfbdbf9 100644 --- a/drivers/staging/batman-adv/proc.c +++ b/drivers/staging/batman-adv/proc.c @@ -404,7 +404,7 @@ static void proc_vis_read_entry(struct seq_file *seq, from, to, int_part, frac_part); } else { seq_printf(seq, - "%s\t{ router : \"%s\", neighbour : \"%s\", label : %d.%d }", + "%s\t{ router : \"%s\", neighbor : \"%s\", label : %d.%d }", (first_line ? "" : ",\n"), from, to, int_part, frac_part); } } diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c index 68dea76b0cab..37c53822e9c9 100644 --- a/drivers/staging/batman-adv/routing.c +++ b/drivers/staging/batman-adv/routing.c @@ -266,7 +266,7 @@ static void update_orig(struct orig_node *orig_node, struct ethhdr *ethhdr, ethhdr->h_source, if_incoming); else bat_dbg(DBG_BATMAN, - "Updating existing last-hop neighbour of originator\n"); + "Updating existing last-hop neighbor of originator\n"); orig_node->flags = batman_packet->flags; neigh_node->last_valid = jiffies; @@ -444,7 +444,7 @@ void receive_bat_packet(struct ethhdr *ethhdr, orig_neigh_node = get_orig_node(ethhdr->h_source); - /* neighbour has to indicate direct link and it has to + /* neighbor has to indicate direct link and it has to * come via the corresponding interface */ /* if received seqno equals last send seqno save new * seqno for bidirectional check */ @@ -459,7 +459,7 @@ void receive_bat_packet(struct ethhdr *ethhdr, bit_packet_count(word); } - bat_dbg(DBG_BATMAN, "Drop packet: originator packet from myself (via neighbour) \n"); + bat_dbg(DBG_BATMAN, "Drop packet: originator packet from myself (via neighbor) \n"); return; } @@ -520,14 +520,14 @@ void receive_bat_packet(struct ethhdr *ethhdr, update_orig(orig_node, ethhdr, batman_packet, if_incoming, hna_buff, hna_buff_len, is_duplicate); - /* is single hop (direct) neighbour */ + /* is single hop (direct) neighbor */ if (is_single_hop_neigh) { /* mark direct link on incoming interface */ schedule_forward_packet(orig_node, ethhdr, batman_packet, 1, hna_buff_len, if_incoming); - bat_dbg(DBG_BATMAN, "Forwarding packet: rebroadcast neighbour packet with direct link flag\n"); + bat_dbg(DBG_BATMAN, "Forwarding packet: rebroadcast neighbor packet with direct link flag\n"); return; } diff --git a/drivers/staging/batman-adv/types.h b/drivers/staging/batman-adv/types.h index 3a0ef0c38c93..9739358caca3 100644 --- a/drivers/staging/batman-adv/types.h +++ b/drivers/staging/batman-adv/types.h @@ -75,7 +75,7 @@ struct neigh_node { uint8_t tq_index; uint8_t tq_avg; uint8_t last_ttl; - unsigned long last_valid; /* when last packet via this neighbour was received */ + unsigned long last_valid; /* when last packet via this neighbor was received */ TYPE_OF_WORD real_bits[NUM_WORDS]; struct orig_node *orig_node; struct batman_if *if_incoming; From cec4a69cfc2bc780b4107193cb9bd621b67ab2b6 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sat, 2 Jan 2010 11:30:41 +0100 Subject: [PATCH 077/367] Staging: batman-adv: Use forw_bcast_list_lock always with disabled interrupts forw_bcast_list_lock is spin_locked in both process and softirq context. SoftIRQ calls the spinlock with disabled IRQ and normal process context with enabled IRQs. When process context is inside an spin_locked area protected by forw_bcast_list_lock and gets interrupted by an IRQ, it could happen that something tries to lock forw_bcast_list_lock again in SoftIRQ context. It cannot proceed further since the lock is already taken somewhere else, but no reschedule will happen inside the SoftIRQ context. This leads to an complete kernel hang without any chance of resurrection. All functions called in process context must disable IRQs when they try to get get that lock to to prevent any reschedule due to IRQs. Signed-off-by: Sven Eckelmann Acked-by: Marek Lindner Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/send.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/staging/batman-adv/send.c b/drivers/staging/batman-adv/send.c index fc4953f50dff..49b1534b8f77 100644 --- a/drivers/staging/batman-adv/send.c +++ b/drivers/staging/batman-adv/send.c @@ -338,12 +338,13 @@ static void forw_packet_free(struct forw_packet *forw_packet) static void _add_bcast_packet_to_list(struct forw_packet *forw_packet, unsigned long send_time) { + unsigned long flags; INIT_HLIST_NODE(&forw_packet->list); /* add new packet to packet list */ - spin_lock(&forw_bcast_list_lock); + spin_lock_irqsave(&forw_bcast_list_lock, flags); hlist_add_head(&forw_packet->list, &forw_bcast_list); - spin_unlock(&forw_bcast_list_lock); + spin_unlock_irqrestore(&forw_bcast_list_lock, flags); /* start timer for this packet */ INIT_DELAYED_WORK(&forw_packet->delayed_work, @@ -382,10 +383,11 @@ void send_outstanding_bcast_packet(struct work_struct *work) container_of(work, struct delayed_work, work); struct forw_packet *forw_packet = container_of(delayed_work, struct forw_packet, delayed_work); + unsigned long flags; - spin_lock(&forw_bcast_list_lock); + spin_lock_irqsave(&forw_bcast_list_lock, flags); hlist_del(&forw_packet->list); - spin_unlock(&forw_bcast_list_lock); + spin_unlock_irqrestore(&forw_bcast_list_lock, flags); /* rebroadcast packet */ rcu_read_lock(); @@ -436,24 +438,25 @@ void purge_outstanding_packets(void) { struct forw_packet *forw_packet; struct hlist_node *tmp_node, *safe_tmp_node; + unsigned long flags; bat_dbg(DBG_BATMAN, "purge_outstanding_packets()\n"); /* free bcast list */ - spin_lock(&forw_bcast_list_lock); + spin_lock_irqsave(&forw_bcast_list_lock, flags); hlist_for_each_entry_safe(forw_packet, tmp_node, safe_tmp_node, &forw_bcast_list, list) { - spin_unlock(&forw_bcast_list_lock); + spin_unlock_irqrestore(&forw_bcast_list_lock, flags); /** * send_outstanding_bcast_packet() will lock the list to * delete the item from the list */ cancel_delayed_work_sync(&forw_packet->delayed_work); - spin_lock(&forw_bcast_list_lock); + spin_lock_irqsave(&forw_bcast_list_lock, flags); } - spin_unlock(&forw_bcast_list_lock); + spin_unlock_irqrestore(&forw_bcast_list_lock, flags); /* free batman packet list */ spin_lock(&forw_bat_list_lock); From 9bbf1ecdb36e2395eecbf04229eaaedce3589db5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20L=C3=BCssing?= Date: Sat, 2 Jan 2010 11:30:42 +0100 Subject: [PATCH 078/367] Staging: batman-adv: Fixes rounding issues in vis.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patches fixes two rounding issues in vis.c for sending and purging vis packets. Before, the timers and timeouts always got rounded down to seconds, though we want a precision in milliseconds. This also fixes a kernel panic that occures when lowering the timer for sending vis packets (vis_interval) to less than 1000ms in main.c manually. Signed-off-by: Linus Lüssing Acked-by: Marek Lindner Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/vis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/batman-adv/vis.c b/drivers/staging/batman-adv/vis.c index 086da871cd59..054631012138 100644 --- a/drivers/staging/batman-adv/vis.c +++ b/drivers/staging/batman-adv/vis.c @@ -377,7 +377,7 @@ static void purge_vis_packets(void) if (info == my_vis_info) /* never purge own data. */ continue; if (time_after(jiffies, - info->first_seen + (VIS_TIMEOUT/1000)*HZ)) { + info->first_seen + (VIS_TIMEOUT*HZ)/1000)) { hash_remove_bucket(vis_hash, &hashit); free_info(info); } @@ -556,6 +556,6 @@ void vis_quit(void) static void start_vis_timer(void) { queue_delayed_work(bat_event_workqueue, &vis_timer_wq, - (atomic_read(&vis_interval)/1000) * HZ); + (atomic_read(&vis_interval) * HZ) / 1000); } From b665aac8a7b44bbffc32dfff8543227704136ed5 Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Sat, 2 Jan 2010 11:30:43 +0100 Subject: [PATCH 079/367] Staging: batman-adv: fix minor orig table layout bug The originator table contained a TAB instead of a space which broke the layout as well as the batctl parser. Signed-off-by: Marek Lindner Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/batman-adv/proc.c b/drivers/staging/batman-adv/proc.c index 71668cfbdbf9..4afabad3abef 100644 --- a/drivers/staging/batman-adv/proc.c +++ b/drivers/staging/batman-adv/proc.c @@ -230,7 +230,7 @@ static int proc_originators_read(struct seq_file *seq, void *offset) addr_to_string(orig_str, orig_node->orig); addr_to_string(router_str, orig_node->router->addr); - seq_printf(seq, "%-17s (%3i) %17s [%10s]:", + seq_printf(seq, "%-17s (%3i) %17s [%10s]:", orig_str, orig_node->router->tq_avg, router_str, orig_node->router->if_incoming->dev); From b801fede6bd94a4b3b0bd4ba1f35f69a6b34158b Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Sat, 2 Jan 2010 11:30:44 +0100 Subject: [PATCH 080/367] Staging: batman-adv: moving vis output formats out of the kernel The batman-adv kernel module is able to output visualization data using the dot draw or JSON format. This patch transforms the output into a generic format (called vis raw). User space tool may convert the raw data to support a variety of formats without the need of modifying the kernel module. Signed-off-by: Andrew Lunn Signed-off-by: Marek Lindner Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/TODO | 11 -- drivers/staging/batman-adv/proc.c | 165 +++++++++++------------------- drivers/staging/batman-adv/proc.h | 9 -- 3 files changed, 58 insertions(+), 127 deletions(-) diff --git a/drivers/staging/batman-adv/TODO b/drivers/staging/batman-adv/TODO index 8c2b89e82ad7..b1e369cf9870 100644 --- a/drivers/staging/batman-adv/TODO +++ b/drivers/staging/batman-adv/TODO @@ -17,17 +17,6 @@ -> transtable_global (read-only) [outputs the global translation table] -> transtable_local (read-only) [outputs the local translation table] -=> vis "raw" data output -* the raw format shall replace dot draw / json to offer a neutral that can -* be converted -* the format (comma seperated entries): --> "mac" -> mac address of an originator (each line begins with it) --> "TQ mac value" -> src mac's link quality towards mac address --> "HNA mac" -> HNA announced by source mac --> "PRIMARY" -> this is a primary interface --> "SEC mac" -> secondary mac address of source (requires preceeding --> PRIMARY) - => logging * make use of printk %pM support instead of converting mac addresses * manually diff --git a/drivers/staging/batman-adv/proc.c b/drivers/staging/batman-adv/proc.c index 4afabad3abef..3ecf8e7684a5 100644 --- a/drivers/staging/batman-adv/proc.c +++ b/drivers/staging/batman-adv/proc.c @@ -322,166 +322,117 @@ static int proc_transt_global_open(struct inode *inode, struct file *file) return single_open(file, proc_transt_global_read, NULL); } -/* insert interface to the list of interfaces of one originator */ +/* While scanning for vis-entries of a particular vis-originator + * this list collects its interfaces to create a subgraph/cluster + * out of them later + */ +struct if_list_entry { + uint8_t addr[ETH_ALEN]; + bool primary; + struct hlist_node list; +}; +/* insert interface to the list of interfaces of one originator, if it + * does not already exist in the list */ static void proc_vis_insert_interface(const uint8_t *interface, - struct vis_if_list **if_entry, + struct hlist_head *if_list, bool primary) { - /* Did we get an empty list? (then insert imediately) */ - if (*if_entry == NULL) { - *if_entry = kmalloc(sizeof(struct vis_if_list), GFP_KERNEL); - if (*if_entry == NULL) + struct if_list_entry *entry; + struct hlist_node *pos; + + hlist_for_each_entry(entry, pos, if_list, list) { + if (compare_orig(entry->addr, (void *)interface)) return; + } - (*if_entry)->primary = primary; - (*if_entry)->next = NULL; - memcpy((*if_entry)->addr, interface, ETH_ALEN); - } else { - struct vis_if_list *head_if_entry = *if_entry; - /* Do we already have this interface in our list? */ - while (!compare_orig((*if_entry)->addr, (void *)interface)) { + /* its a new address, add it to the list */ + entry = kmalloc(sizeof(*entry), GFP_KERNEL); + if (!entry) + return; + memcpy(entry->addr, interface, ETH_ALEN); + entry->primary = primary; + hlist_add_head(&entry->list, if_list); +} - /* Or did we reach the end (then append the interface) */ - if ((*if_entry)->next == NULL) { - (*if_entry)->next = kmalloc(sizeof(struct vis_if_list), GFP_KERNEL); - if ((*if_entry)->next == NULL) - return; +static void proc_vis_read_prim_sec(struct seq_file *seq, + struct hlist_head *if_list) +{ + struct if_list_entry *entry; + struct hlist_node *pos, *n; + char tmp_addr_str[ETH_STR_LEN]; - memcpy((*if_entry)->next->addr, interface, ETH_ALEN); - (*if_entry)->next->primary = primary; - (*if_entry)->next->next = NULL; - break; - } - *if_entry = (*if_entry)->next; + hlist_for_each_entry_safe(entry, pos, n, if_list, list) { + if (entry->primary) { + seq_printf(seq, "PRIMARY, "); + } else { + addr_to_string(tmp_addr_str, entry->addr); + seq_printf(seq, "SEC %s, ", tmp_addr_str); } - /* Rewind the list to its head */ - *if_entry = head_if_entry; + + hlist_del(&entry->list); + kfree(entry); } } -/* read an entry */ +/* read an entry */ static void proc_vis_read_entry(struct seq_file *seq, struct vis_info_entry *entry, - struct vis_if_list **if_entry, - uint8_t *vis_orig, - uint8_t current_format, - uint8_t first_line) + struct hlist_head *if_list, + uint8_t *vis_orig) { - char from[40]; char to[40]; - int int_part, frac_part; addr_to_string(to, entry->dest); if (entry->quality == 0) { -#ifndef VIS_SUBCLUSTERS_DISABLED - proc_vis_insert_interface(vis_orig, if_entry, true); -#endif /* VIS_SUBCLUSTERS_DISABLED */ - addr_to_string(from, vis_orig); - if (current_format == DOT_DRAW) { - seq_printf(seq, "\t\"%s\" -> \"%s\" [label=\"HNA\"]\n", - from, to); - } else { - seq_printf(seq, - "%s\t{ router : \"%s\", gateway : \"%s\", label : \"HNA\" }", - (first_line ? "" : ",\n"), from, to); - } + proc_vis_insert_interface(vis_orig, if_list, true); + seq_printf(seq, "HNA %s, ", to); } else { -#ifndef VIS_SUBCLUSTERS_DISABLED - proc_vis_insert_interface(entry->src, if_entry, compare_orig(entry->src, vis_orig)); -#endif /* VIS_SUBCLUSTERS_DISABLED */ - addr_to_string(from, entry->src); - - /* kernel has no printf-support for %f? it'd be better to return - * this in float. */ - - int_part = TQ_MAX_VALUE / entry->quality; - frac_part = 1000 * TQ_MAX_VALUE / entry->quality - int_part * 1000; - - if (current_format == DOT_DRAW) { - seq_printf(seq, - "\t\"%s\" -> \"%s\" [label=\"%d.%d\"]\n", - from, to, int_part, frac_part); - } else { - seq_printf(seq, - "%s\t{ router : \"%s\", neighbor : \"%s\", label : %d.%d }", - (first_line ? "" : ",\n"), from, to, int_part, frac_part); - } + proc_vis_insert_interface(entry->src, if_list, + compare_orig(entry->src, vis_orig)); + seq_printf(seq, "TQ %s %d, ", to, entry->quality); } } - static int proc_vis_read(struct seq_file *seq, void *offset) { HASHIT(hashit); struct vis_info *info; struct vis_info_entry *entries; - struct vis_if_list *if_entries = NULL; + HLIST_HEAD(vis_if_list); int i; - uint8_t current_format, first_line = 1; -#ifndef VIS_SUBCLUSTERS_DISABLED + uint8_t current_format; char tmp_addr_str[ETH_STR_LEN]; - struct vis_if_list *tmp_if_next; -#endif /* VIS_SUBCLUSTERS_DISABLED */ current_format = vis_format; rcu_read_lock(); if (list_empty(&if_list) || (!is_vis_server())) { rcu_read_unlock(); - if (current_format == DOT_DRAW) - seq_printf(seq, "digraph {\n}\n"); goto end; } rcu_read_unlock(); - if (current_format == DOT_DRAW) - seq_printf(seq, "digraph {\n"); - spin_lock(&vis_hash_lock); while (hash_iterate(vis_hash, &hashit)) { info = hashit.bucket->data; entries = (struct vis_info_entry *) ((char *)info + sizeof(struct vis_info)); + addr_to_string(tmp_addr_str, info->packet.vis_orig); + seq_printf(seq, "%s,", tmp_addr_str); for (i = 0; i < info->packet.entries; i++) { - proc_vis_read_entry(seq, &entries[i], &if_entries, - info->packet.vis_orig, - current_format, first_line); - if (first_line) - first_line = 0; + proc_vis_read_entry(seq, &entries[i], &vis_if_list, + info->packet.vis_orig); } -#ifndef VIS_SUBCLUSTERS_DISABLED - /* Generate subgraphs from the collected items */ - if (current_format == DOT_DRAW) { - - addr_to_string(tmp_addr_str, info->packet.vis_orig); - seq_printf(seq, "\tsubgraph \"cluster_%s\" {\n", tmp_addr_str); - while (if_entries != NULL) { - - addr_to_string(tmp_addr_str, if_entries->addr); - if (if_entries->primary) - seq_printf(seq, "\t\t\"%s\" [peripheries=2]\n", tmp_addr_str); - else - seq_printf(seq, "\t\t\"%s\"\n", tmp_addr_str); - - /* ... and empty the list while doing this */ - tmp_if_next = if_entries->next; - kfree(if_entries); - if_entries = tmp_if_next; - } - seq_printf(seq, "\t}\n"); - } -#endif /* VIS_SUBCLUSTERS_DISABLED */ + /* add primary/secondary records */ + proc_vis_read_prim_sec(seq, &vis_if_list); + seq_printf(seq, "\n"); } spin_unlock(&vis_hash_lock); - if (current_format == DOT_DRAW) - seq_printf(seq, "}\n"); - else - seq_printf(seq, "\n"); end: return 0; } diff --git a/drivers/staging/batman-adv/proc.h b/drivers/staging/batman-adv/proc.h index 16d3efdebe52..761c5f8f95f6 100644 --- a/drivers/staging/batman-adv/proc.h +++ b/drivers/staging/batman-adv/proc.h @@ -38,12 +38,3 @@ void cleanup_procfs(void); int setup_procfs(void); -/* While scanning for vis-entries of a particular vis-originator - * this list collects its interfaces to create a subgraph/cluster - * out of them later - */ -struct vis_if_list { - uint8_t addr[ETH_ALEN]; - bool primary; - struct vis_if_list *next; -}; From 6051d44cb1210e79b39143921b9e162983a03005 Mon Sep 17 00:00:00 2001 From: Linus Luessing Date: Sat, 2 Jan 2010 11:30:45 +0100 Subject: [PATCH 081/367] Staging: batman-adv: remove obsoleted vis_format /proc file batman-adv used to export the vis data using different formats that were switchable via /proc/net/batman-adv/vis_format. The various formats moved to user space and rendered this configuration switch useless. Signed-off-by: Linus Luessing Signed-off-by: Marek Lindner Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/proc.c | 79 +------------------------------ drivers/staging/batman-adv/vis.h | 5 -- 2 files changed, 1 insertion(+), 83 deletions(-) diff --git a/drivers/staging/batman-adv/proc.c b/drivers/staging/batman-adv/proc.c index 3ecf8e7684a5..d0da0eae50f7 100644 --- a/drivers/staging/batman-adv/proc.c +++ b/drivers/staging/batman-adv/proc.c @@ -29,13 +29,11 @@ #include "vis.h" #include "compat.h" -static uint8_t vis_format = DOT_DRAW; - static struct proc_dir_entry *proc_batman_dir, *proc_interface_file; static struct proc_dir_entry *proc_orig_interval_file, *proc_originators_file; static struct proc_dir_entry *proc_transt_local_file; static struct proc_dir_entry *proc_transt_global_file; -static struct proc_dir_entry *proc_vis_file, *proc_vis_format_file; +static struct proc_dir_entry *proc_vis_file; static struct proc_dir_entry *proc_aggr_file; static int proc_interfaces_read(struct seq_file *seq, void *offset) @@ -401,11 +399,8 @@ static int proc_vis_read(struct seq_file *seq, void *offset) struct vis_info_entry *entries; HLIST_HEAD(vis_if_list); int i; - uint8_t current_format; char tmp_addr_str[ETH_STR_LEN]; - current_format = vis_format; - rcu_read_lock(); if (list_empty(&if_list) || (!is_vis_server())) { rcu_read_unlock(); @@ -471,55 +466,6 @@ static int proc_vis_open(struct inode *inode, struct file *file) return single_open(file, proc_vis_read, NULL); } -static int proc_vis_format_read(struct seq_file *seq, void *offset) -{ - uint8_t current_format = vis_format; - - seq_printf(seq, "[%c] %s\n", - (current_format == DOT_DRAW) ? 'x' : ' ', - VIS_FORMAT_DD_NAME); - seq_printf(seq, "[%c] %s\n", - (current_format == JSON) ? 'x' : ' ', - VIS_FORMAT_JSON_NAME); - return 0; -} - -static int proc_vis_format_open(struct inode *inode, struct file *file) -{ - return single_open(file, proc_vis_format_read, NULL); -} - -static ssize_t proc_vis_format_write(struct file *file, - const char __user *buffer, - size_t count, loff_t *ppos) -{ - char *vis_format_string; - int not_copied = 0; - - vis_format_string = kmalloc(count, GFP_KERNEL); - - if (!vis_format_string) - return -ENOMEM; - - not_copied = copy_from_user(vis_format_string, buffer, count); - vis_format_string[count - not_copied - 1] = 0; - - if (strcmp(vis_format_string, VIS_FORMAT_DD_NAME) == 0) { - printk(KERN_INFO "batman-adv:Setting VIS output format to: %s\n", - VIS_FORMAT_DD_NAME); - vis_format = DOT_DRAW; - } else if (strcmp(vis_format_string, VIS_FORMAT_JSON_NAME) == 0) { - printk(KERN_INFO "batman-adv:Setting VIS output format to: %s\n", - VIS_FORMAT_JSON_NAME); - vis_format = JSON; - } else - printk(KERN_ERR "batman-adv:Unknown VIS output format: %s\n", - vis_format_string); - - kfree(vis_format_string); - return count; -} - static int proc_aggr_read(struct seq_file *seq, void *offset) { seq_printf(seq, "%i\n", atomic_read(&aggregation_enabled)); @@ -583,15 +529,6 @@ static const struct file_operations proc_aggr_fops = { .release = single_release, }; -static const struct file_operations proc_vis_format_fops = { - .owner = THIS_MODULE, - .open = proc_vis_format_open, - .read = seq_read, - .write = proc_vis_format_write, - .llseek = seq_lseek, - .release = single_release, -}; - static const struct file_operations proc_vis_fops = { .owner = THIS_MODULE, .open = proc_vis_open, @@ -666,9 +603,6 @@ void cleanup_procfs(void) if (proc_vis_file) remove_proc_entry(PROC_FILE_VIS, proc_batman_dir); - if (proc_vis_format_file) - remove_proc_entry(PROC_FILE_VIS_FORMAT, proc_batman_dir); - if (proc_aggr_file) remove_proc_entry(PROC_FILE_AGGR, proc_batman_dir); @@ -755,17 +689,6 @@ int setup_procfs(void) return -EFAULT; } - proc_vis_format_file = create_proc_entry(PROC_FILE_VIS_FORMAT, - S_IWUSR | S_IRUGO, - proc_batman_dir); - if (proc_vis_format_file) { - proc_vis_format_file->proc_fops = &proc_vis_format_fops; - } else { - printk(KERN_ERR "batman-adv: Registering the '/proc/net/%s/%s' file failed\n", PROC_ROOT_DIR, PROC_FILE_VIS_FORMAT); - cleanup_procfs(); - return -EFAULT; - } - proc_aggr_file = create_proc_entry(PROC_FILE_AGGR, S_IWUSR | S_IRUGO, proc_batman_dir); if (proc_aggr_file) { diff --git a/drivers/staging/batman-adv/vis.h b/drivers/staging/batman-adv/vis.h index 276fabab4e88..ff88a43fc674 100644 --- a/drivers/staging/batman-adv/vis.h +++ b/drivers/staging/batman-adv/vis.h @@ -45,11 +45,6 @@ struct recvlist_node { uint8_t mac[ETH_ALEN]; }; -enum vis_formats { - DOT_DRAW, - JSON, -}; - extern struct hashtable_t *vis_hash; extern spinlock_t vis_hash_lock; From e9b764506aeb06ada6a7d0a24eda3e6eb70bade1 Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Sat, 2 Jan 2010 11:30:46 +0100 Subject: [PATCH 082/367] Staging: batman-adv: splitting /proc vis file into vis_server and vis_data The /proc vis file was used to enable/disable the vis server and to output the vis data at the same time. This behaviour was confusing and lacked a proper method to display the current vis server status. This patch seperates the 2 functionalities: * use vis_server to enable/disable the vis server and to retrieve its status * use vis_data to retrieve the vis raw data (if the server is enabled) Signed-off-by: Marek Lindner Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/proc.c | 174 ++++++++++++----------------- drivers/staging/batman-adv/proc.h | 4 +- drivers/staging/batman-adv/types.h | 10 ++ drivers/staging/batman-adv/vis.c | 62 ++++++++++ drivers/staging/batman-adv/vis.h | 6 + 5 files changed, 152 insertions(+), 104 deletions(-) diff --git a/drivers/staging/batman-adv/proc.c b/drivers/staging/batman-adv/proc.c index d0da0eae50f7..a4f19e1dfc7b 100644 --- a/drivers/staging/batman-adv/proc.c +++ b/drivers/staging/batman-adv/proc.c @@ -33,7 +33,7 @@ static struct proc_dir_entry *proc_batman_dir, *proc_interface_file; static struct proc_dir_entry *proc_orig_interval_file, *proc_originators_file; static struct proc_dir_entry *proc_transt_local_file; static struct proc_dir_entry *proc_transt_global_file; -static struct proc_dir_entry *proc_vis_file; +static struct proc_dir_entry *proc_vis_srv_file, *proc_vis_data_file; static struct proc_dir_entry *proc_aggr_file; static int proc_interfaces_read(struct seq_file *seq, void *offset) @@ -320,79 +320,55 @@ static int proc_transt_global_open(struct inode *inode, struct file *file) return single_open(file, proc_transt_global_read, NULL); } -/* While scanning for vis-entries of a particular vis-originator - * this list collects its interfaces to create a subgraph/cluster - * out of them later - */ -struct if_list_entry { - uint8_t addr[ETH_ALEN]; - bool primary; - struct hlist_node list; -}; - -/* insert interface to the list of interfaces of one originator, if it - * does not already exist in the list */ -static void proc_vis_insert_interface(const uint8_t *interface, - struct hlist_head *if_list, - bool primary) +/* setting the mode of the vis server by the user */ +static ssize_t proc_vis_srv_write(struct file *file, const char __user * buffer, + size_t count, loff_t *ppos) { - struct if_list_entry *entry; - struct hlist_node *pos; + char *vis_mode_string; + int not_copied = 0; - hlist_for_each_entry(entry, pos, if_list, list) { - if (compare_orig(entry->addr, (void *)interface)) - return; - } + vis_mode_string = kmalloc(count, GFP_KERNEL); - /* its a new address, add it to the list */ - entry = kmalloc(sizeof(*entry), GFP_KERNEL); - if (!entry) - return; - memcpy(entry->addr, interface, ETH_ALEN); - entry->primary = primary; - hlist_add_head(&entry->list, if_list); + if (!vis_mode_string) + return -ENOMEM; + + not_copied = copy_from_user(vis_mode_string, buffer, count); + vis_mode_string[count - not_copied - 1] = 0; + + if ((strcmp(vis_mode_string, "client") == 0) || + (strcmp(vis_mode_string, "disabled") == 0)) { + printk(KERN_INFO "batman-adv:Setting VIS mode to client (disabling vis server)\n"); + vis_set_mode(VIS_TYPE_CLIENT_UPDATE); + } else if ((strcmp(vis_mode_string, "server") == 0) || + (strcmp(vis_mode_string, "enabled") == 0)) { + printk(KERN_INFO "batman-adv:Setting VIS mode to server (enabling vis server)\n"); + vis_set_mode(VIS_TYPE_SERVER_SYNC); + } else + printk(KERN_ERR "batman-adv:Unknown VIS mode: %s\n", + vis_mode_string); + + kfree(vis_mode_string); + return count; } -static void proc_vis_read_prim_sec(struct seq_file *seq, - struct hlist_head *if_list) +static int proc_vis_srv_read(struct seq_file *seq, void *offset) { - struct if_list_entry *entry; - struct hlist_node *pos, *n; - char tmp_addr_str[ETH_STR_LEN]; + int vis_server = is_vis_server(); - hlist_for_each_entry_safe(entry, pos, n, if_list, list) { - if (entry->primary) { - seq_printf(seq, "PRIMARY, "); - } else { - addr_to_string(tmp_addr_str, entry->addr); - seq_printf(seq, "SEC %s, ", tmp_addr_str); - } + seq_printf(seq, "[%c] client mode (server disabled) \n", + (!vis_server) ? 'x' : ' '); + seq_printf(seq, "[%c] server mode (server enabled) \n", + (vis_server) ? 'x' : ' '); - hlist_del(&entry->list); - kfree(entry); - } + return 0; } -/* read an entry */ -static void proc_vis_read_entry(struct seq_file *seq, - struct vis_info_entry *entry, - struct hlist_head *if_list, - uint8_t *vis_orig) +static int proc_vis_srv_open(struct inode *inode, struct file *file) { - char to[40]; - - addr_to_string(to, entry->dest); - if (entry->quality == 0) { - proc_vis_insert_interface(vis_orig, if_list, true); - seq_printf(seq, "HNA %s, ", to); - } else { - proc_vis_insert_interface(entry->src, if_list, - compare_orig(entry->src, vis_orig)); - seq_printf(seq, "TQ %s %d, ", to, entry->quality); - } + return single_open(file, proc_vis_srv_read, NULL); } -static int proc_vis_read(struct seq_file *seq, void *offset) +static int proc_vis_data_read(struct seq_file *seq, void *offset) { HASHIT(hashit); struct vis_info *info; @@ -432,38 +408,9 @@ end: return 0; } -/* setting the mode of the vis server by the user */ -static ssize_t proc_vis_write(struct file *file, const char __user * buffer, - size_t count, loff_t *ppos) +static int proc_vis_data_open(struct inode *inode, struct file *file) { - char *vis_mode_string; - int not_copied = 0; - - vis_mode_string = kmalloc(count, GFP_KERNEL); - - if (!vis_mode_string) - return -ENOMEM; - - not_copied = copy_from_user(vis_mode_string, buffer, count); - vis_mode_string[count - not_copied - 1] = 0; - - if (strcmp(vis_mode_string, "client") == 0) { - printk(KERN_INFO "batman-adv:Setting VIS mode to client\n"); - vis_set_mode(VIS_TYPE_CLIENT_UPDATE); - } else if (strcmp(vis_mode_string, "server") == 0) { - printk(KERN_INFO "batman-adv:Setting VIS mode to server\n"); - vis_set_mode(VIS_TYPE_SERVER_SYNC); - } else - printk(KERN_ERR "batman-adv:Unknown VIS mode: %s\n", - vis_mode_string); - - kfree(vis_mode_string); - return count; -} - -static int proc_vis_open(struct inode *inode, struct file *file) -{ - return single_open(file, proc_vis_read, NULL); + return single_open(file, proc_vis_data_read, NULL); } static int proc_aggr_read(struct seq_file *seq, void *offset) @@ -529,11 +476,20 @@ static const struct file_operations proc_aggr_fops = { .release = single_release, }; -static const struct file_operations proc_vis_fops = { +static const struct file_operations proc_vis_srv_fops = { .owner = THIS_MODULE, - .open = proc_vis_open, + .open = proc_vis_srv_open, .read = seq_read, - .write = proc_vis_write, + .write = proc_vis_srv_write, + .llseek = seq_lseek, + .release = single_release, +}; + +static const struct file_operations proc_vis_data_fops = { + .owner = THIS_MODULE, + .open = proc_vis_data_open, + .read = seq_read, + .write = proc_dummy_write, .llseek = seq_lseek, .release = single_release, }; @@ -600,8 +556,11 @@ void cleanup_procfs(void) if (proc_interface_file) remove_proc_entry(PROC_FILE_INTERFACES, proc_batman_dir); - if (proc_vis_file) - remove_proc_entry(PROC_FILE_VIS, proc_batman_dir); + if (proc_vis_data_file) + remove_proc_entry(PROC_FILE_VIS_DATA, proc_batman_dir); + + if (proc_vis_srv_file) + remove_proc_entry(PROC_FILE_VIS_SRV, proc_batman_dir); if (proc_aggr_file) remove_proc_entry(PROC_FILE_AGGR, proc_batman_dir); @@ -679,12 +638,23 @@ int setup_procfs(void) return -EFAULT; } - proc_vis_file = create_proc_entry(PROC_FILE_VIS, S_IWUSR | S_IRUGO, - proc_batman_dir); - if (proc_vis_file) { - proc_vis_file->proc_fops = &proc_vis_fops; + proc_vis_srv_file = create_proc_entry(PROC_FILE_VIS_SRV, + S_IWUSR | S_IRUGO, + proc_batman_dir); + if (proc_vis_srv_file) { + proc_vis_srv_file->proc_fops = &proc_vis_srv_fops; } else { - printk(KERN_ERR "batman-adv: Registering the '/proc/net/%s/%s' file failed\n", PROC_ROOT_DIR, PROC_FILE_VIS); + printk(KERN_ERR "batman-adv: Registering the '/proc/net/%s/%s' file failed\n", PROC_ROOT_DIR, PROC_FILE_VIS_SRV); + cleanup_procfs(); + return -EFAULT; + } + + proc_vis_data_file = create_proc_entry(PROC_FILE_VIS_DATA, S_IRUGO, + proc_batman_dir); + if (proc_vis_data_file) { + proc_vis_data_file->proc_fops = &proc_vis_data_fops; + } else { + printk(KERN_ERR "batman-adv: Registering the '/proc/net/%s/%s' file failed\n", PROC_ROOT_DIR, PROC_FILE_VIS_DATA); cleanup_procfs(); return -EFAULT; } diff --git a/drivers/staging/batman-adv/proc.h b/drivers/staging/batman-adv/proc.h index 761c5f8f95f6..cd690e0f3e44 100644 --- a/drivers/staging/batman-adv/proc.h +++ b/drivers/staging/batman-adv/proc.h @@ -31,8 +31,8 @@ #define PROC_FILE_LOG_LEVEL "log_level" #define PROC_FILE_TRANST_LOCAL "transtable_local" #define PROC_FILE_TRANST_GLOBAL "transtable_global" -#define PROC_FILE_VIS "vis" -#define PROC_FILE_VIS_FORMAT "vis_format" +#define PROC_FILE_VIS_SRV "vis_server" +#define PROC_FILE_VIS_DATA "vis_data" #define PROC_FILE_AGGR "aggregate_ogm" void cleanup_procfs(void); diff --git a/drivers/staging/batman-adv/types.h b/drivers/staging/batman-adv/types.h index 9739358caca3..d708e6f15b37 100644 --- a/drivers/staging/batman-adv/types.h +++ b/drivers/staging/batman-adv/types.h @@ -121,4 +121,14 @@ struct forw_packet { /* structure for forw_list maintaining packet struct batman_if *if_incoming; }; +/* While scanning for vis-entries of a particular vis-originator + * this list collects its interfaces to create a subgraph/cluster + * out of them later + */ +struct if_list_entry { + uint8_t addr[ETH_ALEN]; + bool primary; + struct hlist_node list; +}; + #endif diff --git a/drivers/staging/batman-adv/vis.c b/drivers/staging/batman-adv/vis.c index 054631012138..62ee77396418 100644 --- a/drivers/staging/batman-adv/vis.c +++ b/drivers/staging/batman-adv/vis.c @@ -114,6 +114,68 @@ static int vis_info_choose(void *data, int size) return hash % size; } +/* insert interface to the list of interfaces of one originator, if it + * does not already exist in the list */ +static void proc_vis_insert_interface(const uint8_t *interface, + struct hlist_head *if_list, + bool primary) +{ + struct if_list_entry *entry; + struct hlist_node *pos; + + hlist_for_each_entry(entry, pos, if_list, list) { + if (compare_orig(entry->addr, (void *)interface)) + return; + } + + /* its a new address, add it to the list */ + entry = kmalloc(sizeof(*entry), GFP_KERNEL); + if (!entry) + return; + memcpy(entry->addr, interface, ETH_ALEN); + entry->primary = primary; + hlist_add_head(&entry->list, if_list); +} + +void proc_vis_read_prim_sec(struct seq_file *seq, + struct hlist_head *if_list) +{ + struct if_list_entry *entry; + struct hlist_node *pos, *n; + char tmp_addr_str[ETH_STR_LEN]; + + hlist_for_each_entry_safe(entry, pos, n, if_list, list) { + if (entry->primary) { + seq_printf(seq, "PRIMARY, "); + } else { + addr_to_string(tmp_addr_str, entry->addr); + seq_printf(seq, "SEC %s, ", tmp_addr_str); + } + + hlist_del(&entry->list); + kfree(entry); + } +} + +/* read an entry */ +void proc_vis_read_entry(struct seq_file *seq, + struct vis_info_entry *entry, + struct hlist_head *if_list, + uint8_t *vis_orig) +{ + char to[40]; + + addr_to_string(to, entry->dest); + if (entry->quality == 0) { + proc_vis_insert_interface(vis_orig, if_list, true); + seq_printf(seq, "HNA %s, ", to); + } else { + proc_vis_insert_interface(entry->src, if_list, + compare_orig(entry->src, vis_orig)); + seq_printf(seq, "TQ %s %d, ", to, entry->quality); + } +} + /* tries to add one entry to the receive list. */ static void recv_list_add(struct list_head *recv_list, char *mac) { diff --git a/drivers/staging/batman-adv/vis.h b/drivers/staging/batman-adv/vis.h index ff88a43fc674..2e24258e69a4 100644 --- a/drivers/staging/batman-adv/vis.h +++ b/drivers/staging/batman-adv/vis.h @@ -50,6 +50,12 @@ extern spinlock_t vis_hash_lock; void vis_set_mode(int mode); int is_vis_server(void); +void proc_vis_read_entry(struct seq_file *seq, + struct vis_info_entry *entry, + struct hlist_head *if_list, + uint8_t *vis_orig); +void proc_vis_read_prim_sec(struct seq_file *seq, + struct hlist_head *if_list); void receive_server_sync_packet(struct vis_packet *vis_packet, int vis_info_len); void receive_client_update_packet(struct vis_packet *vis_packet, From c4bf05d3960981a4291bcc9580f3d73eb4dcbe84 Mon Sep 17 00:00:00 2001 From: Simon Wunderlich Date: Sat, 2 Jan 2010 11:30:47 +0100 Subject: [PATCH 083/367] Staging: batman-adv: check all kmalloc()s there are some kmallocs left which are not checked whether they succeeds or not, which might lead to corrupted data structures if the system memory is full. This patch should clean up the remaining unchecked kmalloc()s. Signed-off-by: Simon Wunderlich Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/originator.c | 22 ++++++++++++++- drivers/staging/batman-adv/routing.c | 27 +++++++++++++++---- .../staging/batman-adv/translation-table.c | 16 ++++++----- 3 files changed, 52 insertions(+), 13 deletions(-) diff --git a/drivers/staging/batman-adv/originator.c b/drivers/staging/batman-adv/originator.c index 6a1fdf2b702b..71bd2cf421c4 100644 --- a/drivers/staging/batman-adv/originator.c +++ b/drivers/staging/batman-adv/originator.c @@ -77,6 +77,9 @@ create_neighbor(struct orig_node *orig_node, struct orig_node *orig_neigh_node, bat_dbg(DBG_BATMAN, "Creating new last-hop neighbor of originator\n"); neigh_node = kmalloc(sizeof(struct neigh_node), GFP_ATOMIC); + if (!neigh_node) + return NULL; + memset(neigh_node, 0, sizeof(struct neigh_node)); INIT_LIST_HEAD(&neigh_node->list); @@ -127,6 +130,9 @@ struct orig_node *get_orig_node(uint8_t *addr) bat_dbg(DBG_BATMAN, "Creating new originator: %s \n", orig_str); orig_node = kmalloc(sizeof(struct orig_node), GFP_ATOMIC); + if (!orig_node) + return NULL; + memset(orig_node, 0, sizeof(struct orig_node)); INIT_LIST_HEAD(&orig_node->neigh_list); @@ -138,13 +144,20 @@ struct orig_node *get_orig_node(uint8_t *addr) size = num_ifs * sizeof(TYPE_OF_WORD) * NUM_WORDS; orig_node->bcast_own = kmalloc(size, GFP_ATOMIC); + if (!orig_node->bcast_own) + goto free_orig_node; + memset(orig_node->bcast_own, 0, size); size = num_ifs * sizeof(uint8_t); orig_node->bcast_own_sum = kmalloc(size, GFP_ATOMIC); + if (!orig_node->bcast_own_sum) + goto free_bcast_own; + memset(orig_node->bcast_own_sum, 0, size); - hash_add(orig_hash, orig_node); + if (hash_add(orig_hash, orig_node) < 0) + goto free_bcast_own_sum; if (orig_hash->elements * 4 > orig_hash->size) { swaphash = hash_resize(orig_hash, orig_hash->size * 2); @@ -157,6 +170,13 @@ struct orig_node *get_orig_node(uint8_t *addr) } return orig_node; +free_bcast_own_sum: + kfree(orig_node->bcast_own_sum); +free_bcast_own: + kfree(orig_node->bcast_own); +free_orig_node: + kfree(orig_node); + return NULL; } static bool purge_orig_neighbors(struct orig_node *orig_node, diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c index 37c53822e9c9..f8464cad30b7 100644 --- a/drivers/staging/batman-adv/routing.c +++ b/drivers/staging/batman-adv/routing.c @@ -154,11 +154,14 @@ static int isBidirectionalNeigh(struct orig_node *orig_node, neigh_node = tmp_neigh_node; } - if (neigh_node == NULL) + if (!neigh_node) neigh_node = create_neighbor(orig_node, orig_neigh_node, orig_neigh_node->orig, if_incoming); + /* create_neighbor failed, return 0 */ + if (!neigh_node) + return 0; neigh_node->last_valid = jiffies; } else { @@ -172,11 +175,14 @@ static int isBidirectionalNeigh(struct orig_node *orig_node, neigh_node = tmp_neigh_node; } - if (neigh_node == NULL) + if (!neigh_node) neigh_node = create_neighbor(orig_neigh_node, orig_neigh_node, orig_neigh_node->orig, if_incoming); + /* create_neighbor failed, return 0 */ + if (!neigh_node) + return 0; } orig_node->last_valid = jiffies; @@ -260,11 +266,19 @@ static void update_orig(struct orig_node *orig_node, struct ethhdr *ethhdr, ring_buffer_avg(tmp_neigh_node->tq_recv); } - if (neigh_node == NULL) + if (!neigh_node) { + struct orig_node *orig_tmp; + + orig_tmp = get_orig_node(ethhdr->h_source); + if (!orig_tmp) + return; + neigh_node = create_neighbor(orig_node, - get_orig_node(ethhdr->h_source), + orig_tmp, ethhdr->h_source, if_incoming); - else + if (!neigh_node) + return; + } else bat_dbg(DBG_BATMAN, "Updating existing last-hop neighbor of originator\n"); @@ -444,6 +458,9 @@ void receive_bat_packet(struct ethhdr *ethhdr, orig_neigh_node = get_orig_node(ethhdr->h_source); + if (!orig_neigh_node) + return; + /* neighbor has to indicate direct link and it has to * come via the corresponding interface */ /* if received seqno equals last send seqno save new diff --git a/drivers/staging/batman-adv/translation-table.c b/drivers/staging/batman-adv/translation-table.c index 088715ba8dbd..8c8136b71628 100644 --- a/drivers/staging/batman-adv/translation-table.c +++ b/drivers/staging/batman-adv/translation-table.c @@ -317,14 +317,16 @@ void hna_global_add_orig(struct orig_node *orig_node, hna_buff_count++; } - orig_node->hna_buff_len = hna_buff_len; + /* initialize, and overwrite if malloc succeeds */ + orig_node->hna_buff = NULL; + orig_node->hna_buff_len = 0; - if (orig_node->hna_buff_len > 0) { - orig_node->hna_buff = kmalloc(orig_node->hna_buff_len, - GFP_ATOMIC); - memcpy(orig_node->hna_buff, hna_buff, orig_node->hna_buff_len); - } else { - orig_node->hna_buff = NULL; + if (hna_buff_len > 0) { + orig_node->hna_buff = kmalloc(hna_buff_len, GFP_ATOMIC); + if (orig_node->hna_buff) { + memcpy(orig_node->hna_buff, hna_buff, hna_buff_len); + orig_node->hna_buff_len = hna_buff_len; + } } spin_lock_irqsave(&hna_global_hash_lock, flags); From e70171957a3ac67fd62af0c66efe7b7749121899 Mon Sep 17 00:00:00 2001 From: Simon Wunderlich Date: Sat, 2 Jan 2010 11:30:48 +0100 Subject: [PATCH 084/367] Staging: batman-adv: receive packets directly using skbs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch removes the (ugly and racy) packet receiving thread and the kernel socket usage. Instead, packets are received directly by registering the ethernet type and handling skbs instead of self-allocated buffers. Some consequences and comments: * we don't copy the payload data when forwarding/sending/receiving data anymore. This should boost performance. * packets from/to different interfaces can be (theoretically) processed simultaneously. Only the big originator hash lock might be in the way. * no more polling or sleeping/wakeup/scheduling issues when receiving packets * this might introduce new race conditions. * aggregation and vis code still use packet buffers and are not (yet) converted. * all spinlocks were converted to irqsave/restore versions to solve some lifelock issues when preempted. This might be overkill, some of these locks might be reverted later. * skb copies are only done if neccesary to avoid overhead performance differences: * we made some "benchmarks" with intel laptops. * bandwidth on Gigabit Ethernet increased from ~500 MBit/s to ~920 MBit/s * ping latency decresed from ~2ms to ~0.2 ms I did some tests on my 9 node qemu environment and could confirm that usual sending/receiving, forwarding, vis, batctl ping etc works. Signed-off-by: Simon Wunderlich Acked-by: Sven Eckelmann Acked-by: Marek Lindner Acked-by: Linus Lüssing Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/aggregation.c | 13 +- drivers/staging/batman-adv/device.c | 24 +- drivers/staging/batman-adv/hard-interface.c | 154 ++++-- drivers/staging/batman-adv/hard-interface.h | 4 + drivers/staging/batman-adv/main.c | 29 +- drivers/staging/batman-adv/originator.c | 18 +- drivers/staging/batman-adv/proc.c | 10 +- drivers/staging/batman-adv/routing.c | 563 +++++++++----------- drivers/staging/batman-adv/routing.h | 8 +- drivers/staging/batman-adv/send.c | 93 ++-- drivers/staging/batman-adv/send.h | 5 +- drivers/staging/batman-adv/soft-interface.c | 76 +-- drivers/staging/batman-adv/soft-interface.h | 3 +- drivers/staging/batman-adv/types.h | 2 +- drivers/staging/batman-adv/vis.c | 55 +- 15 files changed, 548 insertions(+), 509 deletions(-) diff --git a/drivers/staging/batman-adv/aggregation.c b/drivers/staging/batman-adv/aggregation.c index 9c6e681f6fb6..7917322a7e2a 100644 --- a/drivers/staging/batman-adv/aggregation.c +++ b/drivers/staging/batman-adv/aggregation.c @@ -96,6 +96,7 @@ static void new_aggregated_packet(unsigned char *packet_buff, int own_packet) { struct forw_packet *forw_packet_aggr; + unsigned long flags; forw_packet_aggr = kmalloc(sizeof(struct forw_packet), GFP_ATOMIC); if (!forw_packet_aggr) @@ -115,6 +116,7 @@ static void new_aggregated_packet(unsigned char *packet_buff, packet_buff, forw_packet_aggr->packet_len); + forw_packet_aggr->skb = NULL; forw_packet_aggr->own = own_packet; forw_packet_aggr->if_incoming = if_incoming; forw_packet_aggr->num_packets = 0; @@ -126,9 +128,9 @@ static void new_aggregated_packet(unsigned char *packet_buff, forw_packet_aggr->direct_link_flags |= 1; /* add new packet to packet list */ - spin_lock(&forw_bat_list_lock); + spin_lock_irqsave(&forw_bat_list_lock, flags); hlist_add_head(&forw_packet_aggr->list, &forw_bat_list); - spin_unlock(&forw_bat_list_lock); + spin_unlock_irqrestore(&forw_bat_list_lock, flags); /* start timer for this packet */ INIT_DELAYED_WORK(&forw_packet_aggr->delayed_work, @@ -168,9 +170,10 @@ void add_bat_packet_to_list(unsigned char *packet_buff, int packet_len, struct batman_packet *batman_packet = (struct batman_packet *)packet_buff; bool direct_link = batman_packet->flags & DIRECTLINK ? 1 : 0; + unsigned long flags; /* find position for the packet in the forward queue */ - spin_lock(&forw_bat_list_lock); + spin_lock_irqsave(&forw_bat_list_lock, flags); /* own packets are not to be aggregated */ if ((atomic_read(&aggregation_enabled)) && (!own_packet)) { hlist_for_each_entry(forw_packet_pos, tmp_node, &forw_bat_list, @@ -191,7 +194,7 @@ void add_bat_packet_to_list(unsigned char *packet_buff, int packet_len, * suitable aggregation packet found */ if (forw_packet_aggr == NULL) { /* the following section can run without the lock */ - spin_unlock(&forw_bat_list_lock); + spin_unlock_irqrestore(&forw_bat_list_lock, flags); new_aggregated_packet(packet_buff, packet_len, send_time, direct_link, if_incoming, own_packet); @@ -199,7 +202,7 @@ void add_bat_packet_to_list(unsigned char *packet_buff, int packet_len, aggregate(forw_packet_aggr, packet_buff, packet_len, direct_link); - spin_unlock(&forw_bat_list_lock); + spin_unlock_irqrestore(&forw_bat_list_lock, flags); } } diff --git a/drivers/staging/batman-adv/device.c b/drivers/staging/batman-adv/device.c index 92cf8d56a5f2..ab2b0b17d9ea 100644 --- a/drivers/staging/batman-adv/device.c +++ b/drivers/staging/batman-adv/device.c @@ -133,8 +133,9 @@ int bat_device_release(struct inode *inode, struct file *file) (struct device_client *)file->private_data; struct device_packet *device_packet; struct list_head *list_pos, *list_pos_tmp; + unsigned long flags; - spin_lock(&device_client->lock); + spin_lock_irqsave(&device_client->lock, flags); /* for all packets in the queue ... */ list_for_each_safe(list_pos, list_pos_tmp, &device_client->queue_list) { @@ -146,7 +147,7 @@ int bat_device_release(struct inode *inode, struct file *file) } device_client_hash[device_client->index] = NULL; - spin_unlock(&device_client->lock); + spin_unlock_irqrestore(&device_client->lock, flags); kfree(device_client); dec_module_count(); @@ -161,6 +162,7 @@ ssize_t bat_device_read(struct file *file, char __user *buf, size_t count, (struct device_client *)file->private_data; struct device_packet *device_packet; int error; + unsigned long flags; if ((file->f_flags & O_NONBLOCK) && (device_client->queue_len == 0)) return -EAGAIN; @@ -177,14 +179,14 @@ ssize_t bat_device_read(struct file *file, char __user *buf, size_t count, if (error) return error; - spin_lock(&device_client->lock); + spin_lock_irqsave(&device_client->lock, flags); device_packet = list_first_entry(&device_client->queue_list, struct device_packet, list); list_del(&device_packet->list); device_client->queue_len--; - spin_unlock(&device_client->lock); + spin_unlock_irqrestore(&device_client->lock, flags); error = __copy_to_user(buf, &device_packet->icmp_packet, sizeof(struct icmp_packet)); @@ -205,6 +207,7 @@ ssize_t bat_device_write(struct file *file, const char __user *buff, struct icmp_packet icmp_packet; struct orig_node *orig_node; struct batman_if *batman_if; + unsigned long flags; if (len < sizeof(struct icmp_packet)) { bat_dbg(DBG_BATMAN, "batman-adv:Error - can't send packet from char device: invalid packet size\n"); @@ -239,7 +242,7 @@ ssize_t bat_device_write(struct file *file, const char __user *buff, if (atomic_read(&module_state) != MODULE_ACTIVE) goto dst_unreach; - spin_lock(&orig_hash_lock); + spin_lock_irqsave(&orig_hash_lock, flags); orig_node = ((struct orig_node *)hash_find(orig_hash, icmp_packet.dst)); if (!orig_node) @@ -261,11 +264,11 @@ ssize_t bat_device_write(struct file *file, const char __user *buff, sizeof(struct icmp_packet), batman_if, orig_node->router->addr); - spin_unlock(&orig_hash_lock); + spin_unlock_irqrestore(&orig_hash_lock, flags); goto out; unlock: - spin_unlock(&orig_hash_lock); + spin_unlock_irqrestore(&orig_hash_lock, flags); dst_unreach: icmp_packet.msg_type = DESTINATION_UNREACHABLE; bat_device_add_packet(device_client, &icmp_packet); @@ -290,6 +293,7 @@ void bat_device_add_packet(struct device_client *device_client, struct icmp_packet *icmp_packet) { struct device_packet *device_packet; + unsigned long flags; device_packet = kmalloc(sizeof(struct device_packet), GFP_KERNEL); @@ -300,12 +304,12 @@ void bat_device_add_packet(struct device_client *device_client, memcpy(&device_packet->icmp_packet, icmp_packet, sizeof(struct icmp_packet)); - spin_lock(&device_client->lock); + spin_lock_irqsave(&device_client->lock, flags); /* while waiting for the lock the device_client could have been * deleted */ if (!device_client_hash[icmp_packet->uid]) { - spin_unlock(&device_client->lock); + spin_unlock_irqrestore(&device_client->lock, flags); kfree(device_packet); return; } @@ -322,7 +326,7 @@ void bat_device_add_packet(struct device_client *device_client, device_client->queue_len--; } - spin_unlock(&device_client->lock); + spin_unlock_irqrestore(&device_client->lock, flags); wake_up(&device_client->queue_wait); } diff --git a/drivers/staging/batman-adv/hard-interface.c b/drivers/staging/batman-adv/hard-interface.c index 7c885926b167..cc59c307a420 100644 --- a/drivers/staging/batman-adv/hard-interface.c +++ b/drivers/staging/batman-adv/hard-interface.c @@ -153,9 +153,6 @@ void hardif_deactivate_interface(struct batman_if *batman_if) if (batman_if->if_active != IF_ACTIVE) return; - if (batman_if->raw_sock) - sock_release(batman_if->raw_sock); - /** * batman_if->net_dev has been acquired by dev_get_by_name() in * proc_interfaces_write() and has to be unreferenced. @@ -164,9 +161,6 @@ void hardif_deactivate_interface(struct batman_if *batman_if) if (batman_if->net_dev) dev_put(batman_if->net_dev); - batman_if->raw_sock = NULL; - batman_if->net_dev = NULL; - batman_if->if_active = IF_INACTIVE; active_ifs--; @@ -177,9 +171,6 @@ void hardif_deactivate_interface(struct batman_if *batman_if) /* (re)activate given interface. */ static void hardif_activate_interface(struct batman_if *batman_if) { - struct sockaddr_ll bind_addr; - int retval; - if (batman_if->if_active != IF_INACTIVE) return; @@ -191,35 +182,8 @@ static void hardif_activate_interface(struct batman_if *batman_if) if (!batman_if->net_dev) goto dev_err; - retval = sock_create_kern(PF_PACKET, SOCK_RAW, - __constant_htons(ETH_P_BATMAN), - &batman_if->raw_sock); - - if (retval < 0) { - printk(KERN_ERR "batman-adv:Can't create raw socket: %i\n", - retval); - goto sock_err; - } - - bind_addr.sll_family = AF_PACKET; - bind_addr.sll_ifindex = batman_if->net_dev->ifindex; - bind_addr.sll_protocol = 0; /* is set by the kernel */ - - retval = kernel_bind(batman_if->raw_sock, - (struct sockaddr *)&bind_addr, sizeof(bind_addr)); - - if (retval < 0) { - printk(KERN_ERR "batman-adv:Can't create bind raw socket: %i\n", - retval); - goto bind_err; - } - check_known_mac_addr(batman_if->net_dev->dev_addr); - batman_if->raw_sock->sk->sk_user_data = - batman_if->raw_sock->sk->sk_data_ready; - batman_if->raw_sock->sk->sk_data_ready = batman_data_ready; - addr_to_string(batman_if->addr_str, batman_if->net_dev->dev_addr); memcpy(((struct batman_packet *)(batman_if->packet_buff))->orig, @@ -239,12 +203,7 @@ static void hardif_activate_interface(struct batman_if *batman_if) return; -bind_err: - sock_release(batman_if->raw_sock); -sock_err: - dev_put(batman_if->net_dev); dev_err: - batman_if->raw_sock = NULL; batman_if->net_dev = NULL; } @@ -318,6 +277,7 @@ int hardif_add_interface(char *dev, int if_num) struct batman_if *batman_if; struct batman_packet *batman_packet; struct orig_node *orig_node; + unsigned long flags; HASHIT(hashit); batman_if = kmalloc(sizeof(struct batman_if), GFP_KERNEL); @@ -327,7 +287,6 @@ int hardif_add_interface(char *dev, int if_num) return -1; } - batman_if->raw_sock = NULL; batman_if->net_dev = NULL; if ((if_num == 0) && (num_hna > 0)) @@ -375,17 +334,17 @@ int hardif_add_interface(char *dev, int if_num) /* resize all orig nodes because orig_node->bcast_own(_sum) depend on * if_num */ - spin_lock(&orig_hash_lock); + spin_lock_irqsave(&orig_hash_lock, flags); while (hash_iterate(orig_hash, &hashit)) { orig_node = hashit.bucket->data; if (resize_orig(orig_node, if_num) == -1) { - spin_unlock(&orig_hash_lock); + spin_unlock_irqrestore(&orig_hash_lock, flags); goto out; } } - spin_unlock(&orig_hash_lock); + spin_unlock_irqrestore(&orig_hash_lock, flags); if (!hardif_is_interface_up(batman_if->dev)) printk(KERN_ERR "batman-adv:Not using interface %s (retrying later): interface not active\n", batman_if->dev); @@ -443,6 +402,111 @@ out: return NOTIFY_DONE; } +/* find batman interface by netdev. assumes rcu_read_lock on */ +static struct batman_if *find_batman_if(struct net_device *dev) +{ + struct batman_if *batman_if; + + rcu_read_lock(); + list_for_each_entry_rcu(batman_if, &if_list, list) { + if (batman_if->net_dev == dev) { + rcu_read_unlock(); + return batman_if; + } + } + rcu_read_unlock(); + return NULL; +} + + +/* receive a packet with the batman ethertype coming on a hard + * interface */ +int batman_skb_recv(struct sk_buff *skb, struct net_device *dev, + struct packet_type *ptype, struct net_device *orig_dev) +{ + struct batman_packet *batman_packet; + struct batman_if *batman_if; + struct net_device_stats *stats; + int ret; + + skb = skb_share_check(skb, GFP_ATOMIC); + + if (skb == NULL) + goto err_free; + + /* packet should hold at least type and version */ + if (unlikely(skb_headlen(skb) < 2)) + goto err_free; + + /* expect a valid ethernet header here. */ + if (unlikely(skb->mac_len != sizeof(struct ethhdr) + || !skb_mac_header(skb))) + goto err_free; + + batman_if = find_batman_if(skb->dev); + if (!batman_if) + goto err_free; + + stats = &skb->dev->stats; + stats->rx_packets++; + stats->rx_bytes += skb->len; + + batman_packet = (struct batman_packet *)skb->data; + + if (batman_packet->version != COMPAT_VERSION) { + bat_dbg(DBG_BATMAN, + "Drop packet: incompatible batman version (%i)\n", + batman_packet->version); + goto err_free; + } + + /* all receive handlers return whether they received or reused + * the supplied skb. if not, we have to free the skb. */ + + switch (batman_packet->packet_type) { + /* batman originator packet */ + case BAT_PACKET: + ret = recv_bat_packet(skb, batman_if); + break; + + /* batman icmp packet */ + case BAT_ICMP: + ret = recv_icmp_packet(skb); + break; + + /* unicast packet */ + case BAT_UNICAST: + ret = recv_unicast_packet(skb); + break; + + /* broadcast packet */ + case BAT_BCAST: + ret = recv_bcast_packet(skb); + break; + + /* vis packet */ + case BAT_VIS: + ret = recv_vis_packet(skb); + break; + default: + ret = NET_RX_DROP; + } + if (ret == NET_RX_DROP) + kfree_skb(skb); + + /* return NET_RX_SUCCESS in any case as we + * most probably dropped the packet for + * routing-logical reasons. */ + + return NET_RX_SUCCESS; + +err_free: + kfree_skb(skb); + return NET_RX_DROP; + +} + + struct notifier_block hard_if_notifier = { .notifier_call = hard_if_event, }; diff --git a/drivers/staging/batman-adv/hard-interface.h b/drivers/staging/batman-adv/hard-interface.h index 742358c00c0e..97c6ecb9e087 100644 --- a/drivers/staging/batman-adv/hard-interface.h +++ b/drivers/staging/batman-adv/hard-interface.h @@ -32,5 +32,9 @@ void hardif_deactivate_interface(struct batman_if *batman_if); char hardif_get_active_if_num(void); void hardif_check_interfaces_status(void); void hardif_check_interfaces_status_wq(struct work_struct *work); +int batman_skb_recv(struct sk_buff *skb, + struct net_device *dev, + struct packet_type *ptype, + struct net_device *orig_dev); int hardif_min_mtu(void); void update_min_mtu(void); diff --git a/drivers/staging/batman-adv/main.c b/drivers/staging/batman-adv/main.c index 434c600a6a47..c73350415697 100644 --- a/drivers/staging/batman-adv/main.c +++ b/drivers/staging/batman-adv/main.c @@ -50,11 +50,14 @@ int16_t num_ifs; struct net_device *soft_device; -static struct task_struct *kthread_task; - unsigned char broadcastAddr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; atomic_t module_state; +static struct packet_type batman_adv_packet_type __read_mostly = { + .type = cpu_to_be16(ETH_P_BATMAN), + .func = batman_skb_recv, +}; + struct workqueue_struct *bat_event_workqueue; #ifdef CONFIG_BATMAN_ADV_DEBUG @@ -113,6 +116,7 @@ int init_module(void) } register_netdevice_notifier(&hard_if_notifier); + dev_add_pack(&batman_adv_packet_type); printk(KERN_INFO "batman-adv:B.A.T.M.A.N. advanced %s%s (compatibility version %i) loaded \n", SOURCE_VERSION, REVISION_VERSION_STR, COMPAT_VERSION); @@ -135,6 +139,8 @@ void cleanup_module(void) soft_device = NULL; } + dev_remove_pack(&batman_adv_packet_type); + unregister_netdevice_notifier(&hard_if_notifier); cleanup_procfs(); @@ -162,16 +168,6 @@ void activate_module(void) if (vis_init() < 1) goto err; - /* (re)start kernel thread for packet processing */ - if (!kthread_task) { - kthread_task = kthread_run(packet_recv_thread, NULL, "batman-adv"); - - if (IS_ERR(kthread_task)) { - printk(KERN_ERR "batman-adv:Unable to start packet receive thread\n"); - kthread_task = NULL; - } - } - update_min_mtu(); atomic_set(&module_state, MODULE_ACTIVE); goto end; @@ -193,14 +189,7 @@ void shutdown_module(void) vis_quit(); - /* deactivate kernel thread for packet processing (if running) */ - if (kthread_task) { - atomic_set(&exit_cond, 1); - wake_up_interruptible(&thread_wait); - kthread_stop(kthread_task); - - kthread_task = NULL; - } + /* TODO: unregister BATMAN pack */ originator_free(); diff --git a/drivers/staging/batman-adv/originator.c b/drivers/staging/batman-adv/originator.c index 71bd2cf421c4..1c0a3cec8466 100644 --- a/drivers/staging/batman-adv/originator.c +++ b/drivers/staging/batman-adv/originator.c @@ -37,35 +37,38 @@ static void start_purge_timer(void) int originator_init(void) { + unsigned long flags; if (orig_hash) return 1; - spin_lock(&orig_hash_lock); + spin_lock_irqsave(&orig_hash_lock, flags); orig_hash = hash_new(128, compare_orig, choose_orig); if (!orig_hash) goto err; - spin_unlock(&orig_hash_lock); + spin_unlock_irqrestore(&orig_hash_lock, flags); start_purge_timer(); return 1; err: - spin_unlock(&orig_hash_lock); + spin_unlock_irqrestore(&orig_hash_lock, flags); return 0; } void originator_free(void) { + unsigned long flags; + if (!orig_hash) return; cancel_delayed_work_sync(&purge_orig_wq); - spin_lock(&orig_hash_lock); + spin_lock_irqsave(&orig_hash_lock, flags); hash_delete(orig_hash, free_orig_node); orig_hash = NULL; - spin_unlock(&orig_hash_lock); + spin_unlock_irqrestore(&orig_hash_lock, flags); } struct neigh_node * @@ -243,8 +246,9 @@ void purge_orig(struct work_struct *work) { HASHIT(hashit); struct orig_node *orig_node; + unsigned long flags; - spin_lock(&orig_hash_lock); + spin_lock_irqsave(&orig_hash_lock, flags); /* for all origins... */ while (hash_iterate(orig_hash, &hashit)) { @@ -255,7 +259,7 @@ void purge_orig(struct work_struct *work) } } - spin_unlock(&orig_hash_lock); + spin_unlock_irqrestore(&orig_hash_lock, flags); start_purge_timer(); } diff --git a/drivers/staging/batman-adv/proc.c b/drivers/staging/batman-adv/proc.c index a4f19e1dfc7b..33dae941a5c9 100644 --- a/drivers/staging/batman-adv/proc.c +++ b/drivers/staging/batman-adv/proc.c @@ -189,6 +189,7 @@ static int proc_originators_read(struct seq_file *seq, void *offset) struct neigh_node *neigh_node; int batman_count = 0; char orig_str[ETH_STR_LEN], router_str[ETH_STR_LEN]; + unsigned long flags; rcu_read_lock(); if (list_empty(&if_list)) { @@ -211,7 +212,7 @@ static int proc_originators_read(struct seq_file *seq, void *offset) ((struct batman_if *)if_list.next)->addr_str); rcu_read_unlock(); - spin_lock(&orig_hash_lock); + spin_lock_irqsave(&orig_hash_lock, flags); while (hash_iterate(orig_hash, &hashit)) { @@ -242,7 +243,7 @@ static int proc_originators_read(struct seq_file *seq, void *offset) } - spin_unlock(&orig_hash_lock); + spin_unlock_irqrestore(&orig_hash_lock, flags); if (batman_count == 0) seq_printf(seq, "No batman nodes in range ... \n"); @@ -376,6 +377,7 @@ static int proc_vis_data_read(struct seq_file *seq, void *offset) HLIST_HEAD(vis_if_list); int i; char tmp_addr_str[ETH_STR_LEN]; + unsigned long flags; rcu_read_lock(); if (list_empty(&if_list) || (!is_vis_server())) { @@ -385,7 +387,7 @@ static int proc_vis_data_read(struct seq_file *seq, void *offset) rcu_read_unlock(); - spin_lock(&vis_hash_lock); + spin_lock_irqsave(&vis_hash_lock, flags); while (hash_iterate(vis_hash, &hashit)) { info = hashit.bucket->data; entries = (struct vis_info_entry *) @@ -402,7 +404,7 @@ static int proc_vis_data_read(struct seq_file *seq, void *offset) proc_vis_read_prim_sec(seq, &vis_if_list); seq_printf(seq, "\n"); } - spin_unlock(&vis_hash_lock); + spin_unlock_irqrestore(&vis_hash_lock, flags); end: return 0; diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c index f8464cad30b7..e0d093f5d524 100644 --- a/drivers/staging/batman-adv/routing.c +++ b/drivers/staging/batman-adv/routing.c @@ -36,15 +36,16 @@ DECLARE_WAIT_QUEUE_HEAD(thread_wait); -static atomic_t data_ready_cond; atomic_t exit_cond; + void slide_own_bcast_window(struct batman_if *batman_if) { HASHIT(hashit); struct orig_node *orig_node; TYPE_OF_WORD *word; + unsigned long flags; - spin_lock(&orig_hash_lock); + spin_lock_irqsave(&orig_hash_lock, flags); while (hash_iterate(orig_hash, &hashit)) { orig_node = hashit.bucket->data; @@ -55,7 +56,7 @@ void slide_own_bcast_window(struct batman_if *batman_if) bit_packet_count(word); } - spin_unlock(&orig_hash_lock); + spin_unlock_irqrestore(&orig_hash_lock, flags); } static void update_HNA(struct orig_node *orig_node, @@ -365,10 +366,9 @@ static char count_real_packets(struct ethhdr *ethhdr, } void receive_bat_packet(struct ethhdr *ethhdr, - struct batman_packet *batman_packet, - unsigned char *hna_buff, - int hna_buff_len, - struct batman_if *if_incoming) + struct batman_packet *batman_packet, + unsigned char *hna_buff, int hna_buff_len, + struct batman_if *if_incoming) { struct batman_if *batman_if; struct orig_node *orig_neigh_node, *orig_node; @@ -566,95 +566,118 @@ void receive_bat_packet(struct ethhdr *ethhdr, 0, hna_buff_len, if_incoming); } - -static int receive_raw_packet(struct socket *raw_sock, - unsigned char *packet_buff, int packet_buff_len) +int recv_bat_packet(struct sk_buff *skb, + struct batman_if *batman_if) { - struct kvec iov; - struct msghdr msg; + struct ethhdr *ethhdr; + unsigned long flags; - iov.iov_base = packet_buff; - iov.iov_len = packet_buff_len; + /* drop packet if it has not necessary minimum size */ + if (skb_headlen(skb) < sizeof(struct batman_packet)) + return NET_RX_DROP; - msg.msg_flags = MSG_DONTWAIT; /* non-blocking */ - msg.msg_name = NULL; - msg.msg_namelen = 0; - msg.msg_control = NULL; + ethhdr = (struct ethhdr *)skb_mac_header(skb); - return kernel_recvmsg(raw_sock, &msg, &iov, 1, packet_buff_len, - MSG_DONTWAIT); -} - -static void recv_bat_packet(struct ethhdr *ethhdr, - unsigned char *packet_buff, - int result, - struct batman_if *batman_if) -{ /* packet with broadcast indication but unicast recipient */ if (!is_bcast(ethhdr->h_dest)) - return; + return NET_RX_DROP; /* packet with broadcast sender address */ if (is_bcast(ethhdr->h_source)) - return; + return NET_RX_DROP; - /* drop packet if it has not at least one batman packet as payload */ - if (result < sizeof(struct ethhdr) + sizeof(struct batman_packet)) - return; - - spin_lock(&orig_hash_lock); + spin_lock_irqsave(&orig_hash_lock, flags); + /* TODO: we use headlen instead of "length", because + * only this data is paged in. */ + /* TODO: is another skb_copy needed here? there will be + * written on the data, but nobody (?) should further use + * this data */ receive_aggr_bat_packet(ethhdr, - packet_buff + sizeof(struct ethhdr), - result - sizeof(struct ethhdr), + skb->data, + skb_headlen(skb), batman_if); - spin_unlock(&orig_hash_lock); + spin_unlock_irqrestore(&orig_hash_lock, flags); + + kfree_skb(skb); + return NET_RX_SUCCESS; } -static void recv_my_icmp_packet(struct ethhdr *ethhdr, - struct icmp_packet *icmp_packet, - unsigned char *packet_buff, - int result) +static int recv_my_icmp_packet(struct sk_buff *skb) { struct orig_node *orig_node; + struct icmp_packet *icmp_packet; + struct ethhdr *ethhdr; + struct sk_buff *skb_old; + struct batman_if *batman_if; + int ret; + unsigned long flags; + uint8_t dstaddr[ETH_ALEN]; + + icmp_packet = (struct icmp_packet *) skb->data; + ethhdr = (struct ethhdr *) skb_mac_header(skb); /* add data to device queue */ if (icmp_packet->msg_type != ECHO_REQUEST) { bat_device_receive_packet(icmp_packet); - return; + return NET_RX_DROP; } /* answer echo request (ping) */ /* get routing information */ - spin_lock(&orig_hash_lock); + spin_lock_irqsave(&orig_hash_lock, flags); orig_node = ((struct orig_node *)hash_find(orig_hash, icmp_packet->orig)); + ret = NET_RX_DROP; if ((orig_node != NULL) && (orig_node->batman_if != NULL) && (orig_node->router != NULL)) { + + /* don't lock while sending the packets ... we therefore + * copy the required data before sending */ + batman_if = orig_node->batman_if; + memcpy(dstaddr, orig_node->router->addr, ETH_ALEN); + spin_unlock_irqrestore(&orig_hash_lock, flags); + + /* create a copy of the skb, if needed, to modify it. */ + skb_old = NULL; + if (!skb_clone_writable(skb, sizeof(struct icmp_packet))) { + skb_old = skb; + skb = skb_copy(skb, GFP_ATOMIC); + if (!skb) + return NET_RX_DROP; + icmp_packet = (struct icmp_packet *) skb->data; + kfree_skb(skb_old); + } + memcpy(icmp_packet->dst, icmp_packet->orig, ETH_ALEN); memcpy(icmp_packet->orig, ethhdr->h_dest, ETH_ALEN); icmp_packet->msg_type = ECHO_REPLY; icmp_packet->ttl = TTL; - send_raw_packet(packet_buff + sizeof(struct ethhdr), - result - sizeof(struct ethhdr), - orig_node->batman_if, - orig_node->router->addr); - } + send_skb_packet(skb, batman_if, dstaddr); + ret = NET_RX_SUCCESS; - spin_unlock(&orig_hash_lock); - return; + } else + spin_unlock_irqrestore(&orig_hash_lock, flags); + + return ret; } -static void recv_icmp_ttl_exceeded(struct icmp_packet *icmp_packet, - struct ethhdr *ethhdr, - unsigned char *packet_buff, - int result, - struct batman_if *batman_if) +static int recv_icmp_ttl_exceeded(struct sk_buff *skb) { unsigned char src_str[ETH_STR_LEN], dst_str[ETH_STR_LEN]; struct orig_node *orig_node; + struct icmp_packet *icmp_packet; + struct ethhdr *ethhdr; + struct sk_buff *skb_old; + struct batman_if *batman_if; + int ret; + unsigned long flags; + uint8_t dstaddr[ETH_ALEN]; + + icmp_packet = (struct icmp_packet *) skb->data; + ethhdr = (struct ethhdr *) skb_mac_header(skb); addr_to_string(src_str, icmp_packet->orig); addr_to_string(dst_str, icmp_packet->dst); @@ -663,74 +686,93 @@ static void recv_icmp_ttl_exceeded(struct icmp_packet *icmp_packet, /* send TTL exceeded if packet is an echo request (traceroute) */ if (icmp_packet->msg_type != ECHO_REQUEST) - return; + return NET_RX_DROP; /* get routing information */ - spin_lock(&orig_hash_lock); + spin_lock_irqsave(&orig_hash_lock, flags); orig_node = ((struct orig_node *) hash_find(orig_hash, icmp_packet->orig)); + ret = NET_RX_DROP; if ((orig_node != NULL) && (orig_node->batman_if != NULL) && (orig_node->router != NULL)) { + + /* don't lock while sending the packets ... we therefore + * copy the required data before sending */ + batman_if = orig_node->batman_if; + memcpy(dstaddr, orig_node->router->addr, ETH_ALEN); + spin_unlock_irqrestore(&orig_hash_lock, flags); + + /* create a copy of the skb, if needed, to modify it. */ + if (!skb_clone_writable(skb, sizeof(struct icmp_packet))) { + skb_old = skb; + skb = skb_copy(skb, GFP_ATOMIC); + if (!skb) + return NET_RX_DROP; + icmp_packet = (struct icmp_packet *) skb->data; + kfree_skb(skb_old); + } + memcpy(icmp_packet->dst, icmp_packet->orig, ETH_ALEN); memcpy(icmp_packet->orig, ethhdr->h_dest, ETH_ALEN); icmp_packet->msg_type = TTL_EXCEEDED; icmp_packet->ttl = TTL; - send_raw_packet(packet_buff + sizeof(struct ethhdr), - result - sizeof(struct ethhdr), - orig_node->batman_if, - orig_node->router->addr); + send_skb_packet(skb, batman_if, dstaddr); + ret = NET_RX_SUCCESS; - } + } else + spin_unlock_irqrestore(&orig_hash_lock, flags); - spin_unlock(&orig_hash_lock); + return ret; } - -static void recv_icmp_packet(struct ethhdr *ethhdr, - unsigned char *packet_buff, - int result, - struct batman_if *batman_if) +int recv_icmp_packet(struct sk_buff *skb) { struct icmp_packet *icmp_packet; + struct ethhdr *ethhdr; struct orig_node *orig_node; + struct sk_buff *skb_old; + struct batman_if *batman_if; + int hdr_size = sizeof(struct icmp_packet); + int ret; + unsigned long flags; + uint8_t dstaddr[ETH_ALEN]; + + /* drop packet if it has not necessary minimum size */ + if (skb_headlen(skb) < hdr_size) + return NET_RX_DROP; + + ethhdr = (struct ethhdr *)skb_mac_header(skb); /* packet with unicast indication but broadcast recipient */ if (is_bcast(ethhdr->h_dest)) - return; + return NET_RX_DROP; /* packet with broadcast sender address */ if (is_bcast(ethhdr->h_source)) - return; + return NET_RX_DROP; /* not for me */ if (!is_my_mac(ethhdr->h_dest)) - return; + return NET_RX_DROP; - /* drop packet if it has not necessary minimum size */ - if (result < sizeof(struct ethhdr) + sizeof(struct icmp_packet)) - return; - - icmp_packet = (struct icmp_packet *) - (packet_buff + sizeof(struct ethhdr)); + icmp_packet = (struct icmp_packet *) skb->data; /* packet for me */ if (is_my_mac(icmp_packet->dst)) - recv_my_icmp_packet(ethhdr, icmp_packet, packet_buff, result); + return recv_my_icmp_packet(skb); /* TTL exceeded */ - if (icmp_packet->ttl < 2) { - recv_icmp_ttl_exceeded(icmp_packet, ethhdr, packet_buff, result, - batman_if); - return; + if (icmp_packet->ttl < 2) + return recv_icmp_ttl_exceeded(skb); - } + ret = NET_RX_DROP; /* get routing information */ - spin_lock(&orig_hash_lock); + spin_lock_irqsave(&orig_hash_lock, flags); orig_node = ((struct orig_node *) hash_find(orig_hash, icmp_packet->dst)); @@ -738,133 +780,169 @@ static void recv_icmp_packet(struct ethhdr *ethhdr, (orig_node->batman_if != NULL) && (orig_node->router != NULL)) { + /* don't lock while sending the packets ... we therefore + * copy the required data before sending */ + batman_if = orig_node->batman_if; + memcpy(dstaddr, orig_node->router->addr, ETH_ALEN); + spin_unlock_irqrestore(&orig_hash_lock, flags); + + /* create a copy of the skb, if needed, to modify it. */ + if (!skb_clone_writable(skb, sizeof(struct icmp_packet))) { + skb_old = skb; + skb = skb_copy(skb, GFP_ATOMIC); + if (!skb) + return NET_RX_DROP; + icmp_packet = (struct icmp_packet *) skb->data; + kfree_skb(skb_old); + } + /* decrement ttl */ icmp_packet->ttl--; /* route it */ - send_raw_packet(packet_buff + sizeof(struct ethhdr), - result - sizeof(struct ethhdr), - orig_node->batman_if, - orig_node->router->addr); - } - spin_unlock(&orig_hash_lock); + send_skb_packet(skb, batman_if, dstaddr); + ret = NET_RX_SUCCESS; + + } else + spin_unlock_irqrestore(&orig_hash_lock, flags); + + return ret; } -static void recv_unicast_packet(struct ethhdr *ethhdr, - unsigned char *packet_buff, - int result, - struct batman_if *batman_if) +int recv_unicast_packet(struct sk_buff *skb) { struct unicast_packet *unicast_packet; unsigned char src_str[ETH_STR_LEN], dst_str[ETH_STR_LEN]; struct orig_node *orig_node; - int hdr_size = sizeof(struct ethhdr) + sizeof(struct unicast_packet); + struct ethhdr *ethhdr; + struct batman_if *batman_if; + struct sk_buff *skb_old; + uint8_t dstaddr[ETH_ALEN]; + int hdr_size = sizeof(struct unicast_packet); + int ret; + unsigned long flags; + + /* drop packet if it has not necessary minimum size */ + if (skb_headlen(skb) < hdr_size) + return NET_RX_DROP; + + ethhdr = (struct ethhdr *) skb_mac_header(skb); /* packet with unicast indication but broadcast recipient */ if (is_bcast(ethhdr->h_dest)) - return; + return NET_RX_DROP; /* packet with broadcast sender address */ if (is_bcast(ethhdr->h_source)) - return; + return NET_RX_DROP; /* not for me */ if (!is_my_mac(ethhdr->h_dest)) - return; + return NET_RX_DROP; - /* drop packet if it has not necessary minimum size */ - if (result < hdr_size) - return; - - unicast_packet = (struct unicast_packet *) - (packet_buff + sizeof(struct ethhdr)); + unicast_packet = (struct unicast_packet *) skb->data; /* packet for me */ if (is_my_mac(unicast_packet->dest)) { - interface_rx(soft_device, packet_buff + hdr_size, - result - hdr_size); - return; - + interface_rx(skb, hdr_size); + return NET_RX_SUCCESS; } /* TTL exceeded */ if (unicast_packet->ttl < 2) { - addr_to_string(src_str, ((struct ethhdr *) - (unicast_packet + 1))->h_source); - addr_to_string(dst_str, unicast_packet->dest); + addr_to_string(src_str, ethhdr->h_source); + addr_to_string(dst_str, ethhdr->h_dest); printk(KERN_WARNING "batman-adv:Warning - can't send packet from %s to %s: ttl exceeded\n", src_str, dst_str); - return; + return NET_RX_DROP; } + ret = NET_RX_DROP; /* get routing information */ - spin_lock(&orig_hash_lock); + spin_lock_irqsave(&orig_hash_lock, flags); orig_node = ((struct orig_node *) hash_find(orig_hash, unicast_packet->dest)); if ((orig_node != NULL) && (orig_node->batman_if != NULL) && (orig_node->router != NULL)) { + + /* don't lock while sending the packets ... we therefore + * copy the required data before sending */ + batman_if = orig_node->batman_if; + memcpy(dstaddr, orig_node->router->addr, ETH_ALEN); + spin_unlock_irqrestore(&orig_hash_lock, flags); + + /* create a copy of the skb, if needed, to modify it. */ + if (!skb_clone_writable(skb, sizeof(struct unicast_packet))) { + skb_old = skb; + skb = skb_copy(skb, GFP_ATOMIC); + if (!skb) + return NET_RX_DROP; + unicast_packet = (struct unicast_packet *) skb->data; + kfree_skb(skb_old); + } /* decrement ttl */ unicast_packet->ttl--; /* route it */ - send_raw_packet(packet_buff + sizeof(struct ethhdr), - result - sizeof(struct ethhdr), - orig_node->batman_if, - orig_node->router->addr); - } - spin_unlock(&orig_hash_lock); + send_skb_packet(skb, batman_if, dstaddr); + ret = NET_RX_SUCCESS; + + } else + spin_unlock_irqrestore(&orig_hash_lock, flags); + + return ret; } -static void recv_bcast_packet(struct ethhdr *ethhdr, - unsigned char *packet_buff, - int result, - struct batman_if *batman_if) +int recv_bcast_packet(struct sk_buff *skb) { struct orig_node *orig_node; struct bcast_packet *bcast_packet; - int hdr_size = sizeof(struct ethhdr) + sizeof(struct bcast_packet); + struct ethhdr *ethhdr; + int hdr_size = sizeof(struct bcast_packet); + unsigned long flags; + + /* drop packet if it has not necessary minimum size */ + if (skb_headlen(skb) < hdr_size) + return NET_RX_DROP; + + ethhdr = (struct ethhdr *)skb_mac_header(skb); /* packet with broadcast indication but unicast recipient */ if (!is_bcast(ethhdr->h_dest)) - return; + return NET_RX_DROP; /* packet with broadcast sender address */ if (is_bcast(ethhdr->h_source)) - return; - - /* drop packet if it has not necessary minimum size */ - if (result < hdr_size) - return; + return NET_RX_DROP; /* ignore broadcasts sent by myself */ if (is_my_mac(ethhdr->h_source)) - return; + return NET_RX_DROP; - bcast_packet = (struct bcast_packet *) - (packet_buff + sizeof(struct ethhdr)); + bcast_packet = (struct bcast_packet *) skb->data; /* ignore broadcasts originated by myself */ if (is_my_mac(bcast_packet->orig)) - return; + return NET_RX_DROP; - spin_lock(&orig_hash_lock); + spin_lock_irqsave(&orig_hash_lock, flags); orig_node = ((struct orig_node *) hash_find(orig_hash, bcast_packet->orig)); if (orig_node == NULL) { - spin_unlock(&orig_hash_lock); - return; + spin_unlock_irqrestore(&orig_hash_lock, flags); + return NET_RX_DROP; } /* check flood history */ if (get_bit_status(orig_node->bcast_bits, orig_node->last_bcast_seqno, ntohs(bcast_packet->seqno))) { - spin_unlock(&orig_hash_lock); - return; + spin_unlock_irqrestore(&orig_hash_lock, flags); + return NET_RX_DROP; } /* mark broadcast in flood history */ @@ -873,211 +951,58 @@ static void recv_bcast_packet(struct ethhdr *ethhdr, orig_node->last_bcast_seqno, 1)) orig_node->last_bcast_seqno = ntohs(bcast_packet->seqno); - spin_unlock(&orig_hash_lock); - - /* broadcast for me */ - interface_rx(soft_device, packet_buff + hdr_size, result - hdr_size); + spin_unlock_irqrestore(&orig_hash_lock, flags); /* rebroadcast packet */ - add_bcast_packet_to_list(packet_buff + sizeof(struct ethhdr), - result - sizeof(struct ethhdr)); + add_bcast_packet_to_list(skb); + + /* broadcast for me */ + interface_rx(skb, hdr_size); + + return NET_RX_SUCCESS; } -static void recv_vis_packet(struct ethhdr *ethhdr, - unsigned char *packet_buff, - int result) +int recv_vis_packet(struct sk_buff *skb) { struct vis_packet *vis_packet; - int hdr_size = sizeof(struct ethhdr) + sizeof(struct vis_packet); - int vis_info_len; + struct ethhdr *ethhdr; + int hdr_size = sizeof(struct vis_packet); + int ret; - /* drop if too short. */ - if (result < hdr_size) - return; + if (skb_headlen(skb) < hdr_size) + return NET_RX_DROP; + + vis_packet = (struct vis_packet *) skb->data; + ethhdr = (struct ethhdr *)skb_mac_header(skb); /* not for me */ if (!is_my_mac(ethhdr->h_dest)) - return; - - vis_packet = (struct vis_packet *)(packet_buff + sizeof(struct ethhdr)); - vis_info_len = result - hdr_size; + return NET_RX_DROP; /* ignore own packets */ if (is_my_mac(vis_packet->vis_orig)) - return; + return NET_RX_DROP; if (is_my_mac(vis_packet->sender_orig)) - return; + return NET_RX_DROP; switch (vis_packet->vis_type) { case VIS_TYPE_SERVER_SYNC: - receive_server_sync_packet(vis_packet, vis_info_len); + /* TODO: handle fragmented skbs properly */ + receive_server_sync_packet(vis_packet, skb_headlen(skb)); + ret = NET_RX_SUCCESS; break; case VIS_TYPE_CLIENT_UPDATE: - receive_client_update_packet(vis_packet, vis_info_len); + /* TODO: handle fragmented skbs properly */ + receive_client_update_packet(vis_packet, skb_headlen(skb)); + ret = NET_RX_SUCCESS; break; default: /* ignore unknown packet */ + ret = NET_RX_DROP; break; } -} - -static int recv_one_packet(struct batman_if *batman_if, - unsigned char *packet_buff) -{ - int result; - struct ethhdr *ethhdr; - struct batman_packet *batman_packet; - - result = receive_raw_packet(batman_if->raw_sock, packet_buff, - PACKBUFF_SIZE); - if (result <= 0) - return result; - - if (result < sizeof(struct ethhdr) + 2) - return 0; - - ethhdr = (struct ethhdr *)packet_buff; - batman_packet = (struct batman_packet *) - (packet_buff + sizeof(struct ethhdr)); - - if (batman_packet->version != COMPAT_VERSION) { - bat_dbg(DBG_BATMAN, - "Drop packet: incompatible batman version (%i)\n", - batman_packet->version); - return 0; - } - - switch (batman_packet->packet_type) { - /* batman originator packet */ - case BAT_PACKET: - recv_bat_packet(ethhdr, packet_buff, result, batman_if); - break; - - /* batman icmp packet */ - case BAT_ICMP: - recv_icmp_packet(ethhdr, packet_buff, result, batman_if); - break; - - /* unicast packet */ - case BAT_UNICAST: - recv_unicast_packet(ethhdr, packet_buff, result, batman_if); - break; - - /* broadcast packet */ - case BAT_BCAST: - recv_bcast_packet(ethhdr, - packet_buff, result, batman_if); - break; - - /* vis packet */ - case BAT_VIS: - recv_vis_packet(ethhdr, packet_buff, result); - break; - } - return 0; -} - - -static int discard_one_packet(struct batman_if *batman_if, - unsigned char *packet_buff) -{ - int result = -EAGAIN; - - if (batman_if->raw_sock) { - result = receive_raw_packet(batman_if->raw_sock, - packet_buff, - PACKBUFF_SIZE); - } - return result; -} - - -static bool is_interface_active(struct batman_if *batman_if) -{ - if (batman_if->if_active != IF_ACTIVE) - return false; - - return true; -} - -static void service_interface(struct batman_if *batman_if, - unsigned char *packet_buff) - -{ - int result; - - do { - if (is_interface_active(batman_if)) - result = recv_one_packet(batman_if, packet_buff); - else - result = discard_one_packet(batman_if, packet_buff); - } while (result >= 0); - - /* we perform none blocking reads, so EAGAIN indicates there - are no more packets to read. Anything else is a real - error.*/ - - if ((result < 0) && (result != -EAGAIN)) - printk(KERN_ERR "batman-adv:Could not receive packet from interface %s: %i\n", batman_if->dev, result); -} - -static void service_interfaces(unsigned char *packet_buffer) -{ - struct batman_if *batman_if; - rcu_read_lock(); - list_for_each_entry_rcu(batman_if, &if_list, list) { - rcu_read_unlock(); - service_interface(batman_if, packet_buffer); - rcu_read_lock(); - } - rcu_read_unlock(); -} - - -int packet_recv_thread(void *data) -{ - unsigned char *packet_buff; - - atomic_set(&data_ready_cond, 0); - atomic_set(&exit_cond, 0); - packet_buff = kmalloc(PACKBUFF_SIZE, GFP_KERNEL); - if (!packet_buff) { - printk(KERN_ERR"batman-adv:Could allocate memory for the packet buffer. :(\n"); - return -1; - } - - while ((!kthread_should_stop()) && (!atomic_read(&exit_cond))) { - - wait_event_interruptible(thread_wait, - (atomic_read(&data_ready_cond) || - atomic_read(&exit_cond))); - - atomic_set(&data_ready_cond, 0); - - if (kthread_should_stop() || atomic_read(&exit_cond)) - break; - - service_interfaces(packet_buff); - } - kfree(packet_buff); - - /* do not exit until kthread_stop() is actually called, - * otherwise it will wait for us forever. */ - while (!kthread_should_stop()) - schedule(); - - return 0; -} - -void batman_data_ready(struct sock *sk, int len) -{ - void (*data_ready)(struct sock *, int) = sk->sk_user_data; - - data_ready(sk, len); - - atomic_set(&data_ready_cond, 1); - wake_up_interruptible(&thread_wait); + return ret; } diff --git a/drivers/staging/batman-adv/routing.h b/drivers/staging/batman-adv/routing.h index 890a4f53b553..c217241d0efd 100644 --- a/drivers/staging/batman-adv/routing.h +++ b/drivers/staging/batman-adv/routing.h @@ -25,8 +25,6 @@ extern wait_queue_head_t thread_wait; extern atomic_t exit_cond; void slide_own_bcast_window(struct batman_if *batman_if); -void batman_data_ready(struct sock *sk, int len); -int packet_recv_thread(void *data); void receive_bat_packet(struct ethhdr *ethhdr, struct batman_packet *batman_packet, unsigned char *hna_buff, int hna_buff_len, @@ -34,3 +32,9 @@ void receive_bat_packet(struct ethhdr *ethhdr, void update_routes(struct orig_node *orig_node, struct neigh_node *neigh_node, unsigned char *hna_buff, int hna_buff_len); +int recv_icmp_packet(struct sk_buff *skb); +int recv_unicast_packet(struct sk_buff *skb); +int recv_bcast_packet(struct sk_buff *skb); +int recv_vis_packet(struct sk_buff *skb); +int recv_bat_packet(struct sk_buff *skb, + struct batman_if *batman_if); diff --git a/drivers/staging/batman-adv/send.c b/drivers/staging/batman-adv/send.c index 49b1534b8f77..fd48f3fa2d88 100644 --- a/drivers/staging/batman-adv/send.c +++ b/drivers/staging/batman-adv/send.c @@ -23,6 +23,7 @@ #include "send.h" #include "routing.h" #include "translation-table.h" +#include "soft-interface.h" #include "hard-interface.h" #include "types.h" #include "vis.h" @@ -58,51 +59,69 @@ static unsigned long forward_send_time(void) return send_time; } -/* sends a raw packet. */ -void send_raw_packet(unsigned char *pack_buff, int pack_buff_len, - struct batman_if *batman_if, uint8_t *dst_addr) +/* send out an already prepared packet to the given address via the + * specified batman interface */ +int send_skb_packet(struct sk_buff *skb, + struct batman_if *batman_if, + uint8_t *dst_addr) { struct ethhdr *ethhdr; - struct sk_buff *skb; - int retval; - char *data; if (batman_if->if_active != IF_ACTIVE) - return; + goto send_skb_err; + + if (unlikely(!batman_if->net_dev)) + goto send_skb_err; if (!(batman_if->net_dev->flags & IFF_UP)) { printk(KERN_WARNING "batman-adv:Interface %s is not up - can't send packet via that interface!\n", batman_if->dev); - return; + goto send_skb_err; } - skb = dev_alloc_skb(pack_buff_len + sizeof(struct ethhdr)); - if (!skb) - return; - data = skb_put(skb, pack_buff_len + sizeof(struct ethhdr)); + /* push to the ethernet header. */ + if (my_skb_push(skb, sizeof(struct ethhdr)) < 0) + goto send_skb_err; - memcpy(data + sizeof(struct ethhdr), pack_buff, pack_buff_len); + skb_reset_mac_header(skb); - ethhdr = (struct ethhdr *) data; + ethhdr = (struct ethhdr *) skb_mac_header(skb); memcpy(ethhdr->h_source, batman_if->net_dev->dev_addr, ETH_ALEN); memcpy(ethhdr->h_dest, dst_addr, ETH_ALEN); ethhdr->h_proto = __constant_htons(ETH_P_BATMAN); - skb_reset_mac_header(skb); skb_set_network_header(skb, ETH_HLEN); skb->priority = TC_PRIO_CONTROL; skb->protocol = __constant_htons(ETH_P_BATMAN); + skb->dev = batman_if->net_dev; /* dev_queue_xmit() returns a negative result on error. However on * congestion and traffic shaping, it drops and returns NET_XMIT_DROP * (which is > 0). This will not be treated as an error. */ - retval = dev_queue_xmit(skb); - if (retval < 0) - printk(KERN_WARNING - "batman-adv:Can't write to raw socket: %i\n", - retval); + + return dev_queue_xmit(skb); +send_skb_err: + kfree_skb(skb); + return NET_XMIT_DROP; +} + +/* sends a raw packet. */ +void send_raw_packet(unsigned char *pack_buff, int pack_buff_len, + struct batman_if *batman_if, uint8_t *dst_addr) +{ + struct sk_buff *skb; + char *data; + + skb = dev_alloc_skb(pack_buff_len + sizeof(struct ethhdr)); + if (!skb) + return; + data = skb_put(skb, pack_buff_len + sizeof(struct ethhdr)); + memcpy(data + sizeof(struct ethhdr), pack_buff, pack_buff_len); + /* pull back to the batman "network header" */ + skb_pull(skb, sizeof(struct ethhdr)); + send_skb_packet(skb, batman_if, dst_addr); } /* Send a packet to a given interface */ @@ -331,6 +350,8 @@ void schedule_forward_packet(struct orig_node *orig_node, static void forw_packet_free(struct forw_packet *forw_packet) { + if (forw_packet->skb) + kfree_skb(forw_packet->skb); kfree(forw_packet->packet_buff); kfree(forw_packet); } @@ -353,7 +374,7 @@ static void _add_bcast_packet_to_list(struct forw_packet *forw_packet, send_time); } -void add_bcast_packet_to_list(unsigned char *packet_buff, int packet_len) +void add_bcast_packet_to_list(struct sk_buff *skb) { struct forw_packet *forw_packet; @@ -361,14 +382,16 @@ void add_bcast_packet_to_list(unsigned char *packet_buff, int packet_len) if (!forw_packet) return; - forw_packet->packet_buff = kmalloc(packet_len, GFP_ATOMIC); - if (!forw_packet->packet_buff) { + skb = skb_copy(skb, GFP_ATOMIC); + if (!skb) { kfree(forw_packet); return; } - forw_packet->packet_len = packet_len; - memcpy(forw_packet->packet_buff, packet_buff, forw_packet->packet_len); + skb_reset_mac_header(skb); + + forw_packet->skb = skb; + forw_packet->packet_buff = NULL; /* how often did we send the bcast packet ? */ forw_packet->num_packets = 0; @@ -384,6 +407,7 @@ void send_outstanding_bcast_packet(struct work_struct *work) struct forw_packet *forw_packet = container_of(delayed_work, struct forw_packet, delayed_work); unsigned long flags; + struct sk_buff *skb1; spin_lock_irqsave(&forw_bcast_list_lock, flags); hlist_del(&forw_packet->list); @@ -392,8 +416,10 @@ void send_outstanding_bcast_packet(struct work_struct *work) /* rebroadcast packet */ rcu_read_lock(); list_for_each_entry_rcu(batman_if, &if_list, list) { - send_raw_packet(forw_packet->packet_buff, - forw_packet->packet_len, + /* send a copy of the saved skb */ + skb1 = skb_copy(forw_packet->skb, GFP_ATOMIC); + if (skb1) + send_skb_packet(skb1, batman_if, broadcastAddr); } rcu_read_unlock(); @@ -415,10 +441,11 @@ void send_outstanding_bat_packet(struct work_struct *work) container_of(work, struct delayed_work, work); struct forw_packet *forw_packet = container_of(delayed_work, struct forw_packet, delayed_work); + unsigned long flags; - spin_lock(&forw_bat_list_lock); + spin_lock_irqsave(&forw_bat_list_lock, flags); hlist_del(&forw_packet->list); - spin_unlock(&forw_bat_list_lock); + spin_unlock_irqrestore(&forw_bat_list_lock, flags); send_packet(forw_packet); @@ -459,18 +486,18 @@ void purge_outstanding_packets(void) spin_unlock_irqrestore(&forw_bcast_list_lock, flags); /* free batman packet list */ - spin_lock(&forw_bat_list_lock); + spin_lock_irqsave(&forw_bat_list_lock, flags); hlist_for_each_entry_safe(forw_packet, tmp_node, safe_tmp_node, &forw_bat_list, list) { - spin_unlock(&forw_bat_list_lock); + spin_unlock_irqrestore(&forw_bat_list_lock, flags); /** * send_outstanding_bat_packet() will lock the list to * delete the item from the list */ cancel_delayed_work_sync(&forw_packet->delayed_work); - spin_lock(&forw_bat_list_lock); + spin_lock_irqsave(&forw_bat_list_lock, flags); } - spin_unlock(&forw_bat_list_lock); + spin_unlock_irqrestore(&forw_bat_list_lock, flags); } diff --git a/drivers/staging/batman-adv/send.h b/drivers/staging/batman-adv/send.h index 59d500917a35..5fc6f3417cb6 100644 --- a/drivers/staging/batman-adv/send.h +++ b/drivers/staging/batman-adv/send.h @@ -22,6 +22,9 @@ #include "types.h" void send_own_packet_work(struct work_struct *work); +int send_skb_packet(struct sk_buff *skb, + struct batman_if *batman_if, + uint8_t *dst_addr); void send_raw_packet(unsigned char *pack_buff, int pack_buff_len, struct batman_if *batman_if, uint8_t *dst_addr); void schedule_own_packet(struct batman_if *batman_if); @@ -30,7 +33,7 @@ void schedule_forward_packet(struct orig_node *orig_node, struct batman_packet *batman_packet, uint8_t directlink, int hna_buff_len, struct batman_if *if_outgoing); -void add_bcast_packet_to_list(unsigned char *packet_buff, int packet_len); +void add_bcast_packet_to_list(struct sk_buff *skb); void send_outstanding_bcast_packet(struct work_struct *work); void send_outstanding_bat_packet(struct work_struct *work); void purge_outstanding_packets(void); diff --git a/drivers/staging/batman-adv/soft-interface.c b/drivers/staging/batman-adv/soft-interface.c index 168a4e195a1c..8ae3483a6259 100644 --- a/drivers/staging/batman-adv/soft-interface.c +++ b/drivers/staging/batman-adv/soft-interface.c @@ -34,7 +34,6 @@ static uint16_t bcast_seqno = 1; /* give own bcast messages seq numbers to avoid * broadcast storms */ static int32_t skb_packets; static int32_t skb_bad_packets; -static int32_t lock_dropped; unsigned char mainIfAddr[ETH_ALEN]; static unsigned char mainIfAddr_default[ETH_ALEN]; @@ -67,12 +66,12 @@ int main_if_was_up(void) return (memcmp(mainIfAddr, mainIfAddr_default, ETH_ALEN) != 0 ? 1 : 0); } -static int my_skb_push(struct sk_buff *skb, unsigned int len) +int my_skb_push(struct sk_buff *skb, unsigned int len) { int result = 0; skb_packets++; - if (skb->data - len < skb->head) { + if (skb_headroom(skb) < len) { skb_bad_packets++; result = pskb_expand_head(skb, len, 0, GFP_ATOMIC); @@ -169,7 +168,10 @@ int interface_tx(struct sk_buff *skb, struct net_device *dev) struct orig_node *orig_node; struct ethhdr *ethhdr = (struct ethhdr *)skb->data; struct bat_priv *priv = netdev_priv(dev); + struct batman_if *batman_if; + uint8_t dstaddr[6]; int data_len = skb->len; + unsigned long flags; if (atomic_read(&module_state) != MODULE_ACTIVE) goto dropped; @@ -185,7 +187,6 @@ int interface_tx(struct sk_buff *skb, struct net_device *dev) goto dropped; bcast_packet = (struct bcast_packet *)skb->data; - bcast_packet->version = COMPAT_VERSION; /* batman packet type: broadcast */ @@ -194,27 +195,21 @@ int interface_tx(struct sk_buff *skb, struct net_device *dev) /* hw address of first interface is the orig mac because only * this mac is known throughout the mesh */ memcpy(bcast_packet->orig, mainIfAddr, ETH_ALEN); + /* set broadcast sequence number */ bcast_packet->seqno = htons(bcast_seqno); bcast_seqno++; /* broadcast packet */ - add_bcast_packet_to_list(skb->data, skb->len); + add_bcast_packet_to_list(skb); + /* a copy is stored in the bcast list, therefore removing + * the original skb. */ + kfree_skb(skb); /* unicast packet */ } else { - - /* simply spin_lock()ing can deadlock when the lock is already - * hold. */ - /* TODO: defer the work in a working queue instead of - * dropping */ - if (!spin_trylock(&orig_hash_lock)) { - lock_dropped++; - printk(KERN_WARNING "batman-adv:%d packets dropped because lock was hold\n", lock_dropped); - goto dropped; - } - + spin_lock_irqsave(&orig_hash_lock, flags); /* get routing information */ orig_node = ((struct orig_node *)hash_find(orig_hash, ethhdr->h_dest)); @@ -243,14 +238,17 @@ int interface_tx(struct sk_buff *skb, struct net_device *dev) if (orig_node->batman_if->if_active != IF_ACTIVE) goto unlock; - send_raw_packet(skb->data, skb->len, - orig_node->batman_if, - orig_node->router->addr); + /* don't lock while sending the packets ... we therefore + * copy the required data before sending */ + + batman_if = orig_node->batman_if; + memcpy(dstaddr, orig_node->router->addr, ETH_ALEN); + spin_unlock_irqrestore(&orig_hash_lock, flags); + + send_skb_packet(skb, batman_if, dstaddr); } else { goto unlock; } - - spin_unlock(&orig_hash_lock); } priv->stats.tx_packets++; @@ -258,42 +256,44 @@ int interface_tx(struct sk_buff *skb, struct net_device *dev) goto end; unlock: - spin_unlock(&orig_hash_lock); + spin_unlock_irqrestore(&orig_hash_lock, flags); dropped: priv->stats.tx_dropped++; end: - kfree_skb(skb); return 0; } -void interface_rx(struct net_device *dev, void *packet, int packet_len) +void interface_rx(struct sk_buff *skb, int hdr_size) { - struct sk_buff *skb; + struct net_device *dev = soft_device; struct bat_priv *priv = netdev_priv(dev); - skb = dev_alloc_skb(packet_len); - - if (!skb) { - priv->stats.rx_dropped++; - goto out; + /* check if enough space is available for pulling, and pull */ + if (!pskb_may_pull(skb, hdr_size)) { + kfree_skb(skb); + return; } + skb_pull_rcsum(skb, hdr_size); +/* skb_set_mac_header(skb, -sizeof(struct ethhdr));*/ - memcpy(skb_put(skb, packet_len), packet, packet_len); - - /* Write metadata, and then pass to the receive level */ skb->dev = dev; skb->protocol = eth_type_trans(skb, dev); - skb->ip_summed = CHECKSUM_UNNECESSARY; + + /* should not be neccesary anymore as we use skb_pull_rcsum() + * TODO: please verify this and remove this TODO + * -- Dec 21st 2009, Simon Wunderlich */ + +/* skb->ip_summed = CHECKSUM_UNNECESSARY;*/ + + /* TODO: set skb->pkt_type to PACKET_BROADCAST, PACKET_MULTICAST, + * PACKET_OTHERHOST or PACKET_HOST */ priv->stats.rx_packets++; - priv->stats.rx_bytes += packet_len; + priv->stats.rx_bytes += skb->len; dev->last_rx = jiffies; netif_rx(skb); - -out: - return; } /* ethtool */ diff --git a/drivers/staging/batman-adv/soft-interface.h b/drivers/staging/batman-adv/soft-interface.h index 515e276ef53d..c0cad8134b2b 100644 --- a/drivers/staging/batman-adv/soft-interface.h +++ b/drivers/staging/batman-adv/soft-interface.h @@ -28,6 +28,7 @@ struct net_device_stats *interface_stats(struct net_device *dev); int interface_set_mac_addr(struct net_device *dev, void *addr); int interface_change_mtu(struct net_device *dev, int new_mtu); int interface_tx(struct sk_buff *skb, struct net_device *dev); -void interface_rx(struct net_device *dev, void *packet, int packet_len); +void interface_rx(struct sk_buff *skb, int hdr_size); +int my_skb_push(struct sk_buff *skb, unsigned int len); extern unsigned char mainIfAddr[]; diff --git a/drivers/staging/batman-adv/types.h b/drivers/staging/batman-adv/types.h index d708e6f15b37..dec1b54031b6 100644 --- a/drivers/staging/batman-adv/types.h +++ b/drivers/staging/batman-adv/types.h @@ -39,7 +39,6 @@ struct batman_if { char if_active; char addr_str[ETH_STR_LEN]; struct net_device *net_dev; - struct socket *raw_sock; atomic_t seqno; unsigned char *packet_buff; int packet_len; @@ -113,6 +112,7 @@ struct forw_packet { /* structure for forw_list maintaining packet struct hlist_node list; unsigned long send_time; uint8_t own; + struct sk_buff *skb; unsigned char *packet_buff; uint16_t packet_len; uint32_t direct_link_flags; diff --git a/drivers/staging/batman-adv/vis.c b/drivers/staging/batman-adv/vis.c index 62ee77396418..191297926b3f 100644 --- a/drivers/staging/batman-adv/vis.c +++ b/drivers/staging/batman-adv/vis.c @@ -52,12 +52,13 @@ static void free_info(void *data) /* set the mode of the visualization to client or server */ void vis_set_mode(int mode) { - spin_lock(&vis_hash_lock); + unsigned long flags; + spin_lock_irqsave(&vis_hash_lock, flags); if (my_vis_info != NULL) my_vis_info->packet.vis_type = mode; - spin_unlock(&vis_hash_lock); + spin_unlock_irqrestore(&vis_hash_lock, flags); } /* is_vis_server(), locked outside */ @@ -74,10 +75,11 @@ static int is_vis_server_locked(void) int is_vis_server(void) { int ret = 0; + unsigned long flags; - spin_lock(&vis_hash_lock); + spin_lock_irqsave(&vis_hash_lock, flags); ret = is_vis_server_locked(); - spin_unlock(&vis_hash_lock); + spin_unlock_irqrestore(&vis_hash_lock, flags); return ret; } @@ -269,8 +271,9 @@ void receive_server_sync_packet(struct vis_packet *vis_packet, int vis_info_len) { struct vis_info *info; int is_new; + unsigned long flags; - spin_lock(&vis_hash_lock); + spin_lock_irqsave(&vis_hash_lock, flags); info = add_packet(vis_packet, vis_info_len, &is_new); if (info == NULL) goto end; @@ -283,7 +286,7 @@ void receive_server_sync_packet(struct vis_packet *vis_packet, int vis_info_len) list_add_tail(&info->send_list, &send_list); } end: - spin_unlock(&vis_hash_lock); + spin_unlock_irqrestore(&vis_hash_lock, flags); } /* handle an incoming client update packet and schedule forward if needed. */ @@ -292,12 +295,13 @@ void receive_client_update_packet(struct vis_packet *vis_packet, { struct vis_info *info; int is_new; + unsigned long flags; /* clients shall not broadcast. */ if (is_bcast(vis_packet->target_orig)) return; - spin_lock(&vis_hash_lock); + spin_lock_irqsave(&vis_hash_lock, flags); info = add_packet(vis_packet, vis_info_len, &is_new); if (info == NULL) goto end; @@ -319,7 +323,7 @@ void receive_client_update_packet(struct vis_packet *vis_packet, list_add_tail(&info->send_list, &send_list); } end: - spin_unlock(&vis_hash_lock); + spin_unlock_irqrestore(&vis_hash_lock, flags); } /* Walk the originators and find the VIS server with the best tq. Set the packet @@ -370,7 +374,7 @@ static int generate_vis_packet(void) info->first_seen = jiffies; - spin_lock(&orig_hash_lock); + spin_lock_irqsave(&orig_hash_lock, flags); memcpy(info->packet.target_orig, broadcastAddr, ETH_ALEN); info->packet.ttl = TTL; info->packet.seqno++; @@ -379,7 +383,7 @@ static int generate_vis_packet(void) if (!is_vis_server_locked()) { best_tq = find_best_vis_server(info); if (best_tq < 0) { - spin_unlock(&orig_hash_lock); + spin_unlock_irqrestore(&orig_hash_lock, flags); return -1; } } @@ -403,13 +407,13 @@ static int generate_vis_packet(void) info->packet.entries++; if (vis_packet_full(info)) { - spin_unlock(&orig_hash_lock); + spin_unlock_irqrestore(&orig_hash_lock, flags); return 0; } } } - spin_unlock(&orig_hash_lock); + spin_unlock_irqrestore(&orig_hash_lock, flags); spin_lock_irqsave(&hna_local_hash_lock, flags); while (hash_iterate(hna_local_hash, &hashit_local)) { @@ -450,8 +454,9 @@ static void broadcast_vis_packet(struct vis_info *info, int packet_length) { HASHIT(hashit); struct orig_node *orig_node; + unsigned long flags; - spin_lock(&orig_hash_lock); + spin_lock_irqsave(&orig_hash_lock, flags); /* send to all routers in range. */ while (hash_iterate(orig_hash, &hashit)) { @@ -478,14 +483,15 @@ static void broadcast_vis_packet(struct vis_info *info, int packet_length) } } memcpy(info->packet.target_orig, broadcastAddr, ETH_ALEN); - spin_unlock(&orig_hash_lock); + spin_unlock_irqrestore(&orig_hash_lock, flags); } static void unicast_vis_packet(struct vis_info *info, int packet_length) { struct orig_node *orig_node; + unsigned long flags; - spin_lock(&orig_hash_lock); + spin_lock_irqsave(&orig_hash_lock, flags); orig_node = ((struct orig_node *) hash_find(orig_hash, info->packet.target_orig)); @@ -496,7 +502,7 @@ static void unicast_vis_packet(struct vis_info *info, int packet_length) orig_node->batman_if, orig_node->router->addr); } - spin_unlock(&orig_hash_lock); + spin_unlock_irqrestore(&orig_hash_lock, flags); } /* only send one vis packet. called from send_vis_packets() */ @@ -526,8 +532,9 @@ static void send_vis_packet(struct vis_info *info) static void send_vis_packets(struct work_struct *work) { struct vis_info *info, *temp; + unsigned long flags; - spin_lock(&vis_hash_lock); + spin_lock_irqsave(&vis_hash_lock, flags); purge_vis_packets(); if (generate_vis_packet() == 0) @@ -538,7 +545,7 @@ static void send_vis_packets(struct work_struct *work) list_del_init(&info->send_list); send_vis_packet(info); } - spin_unlock(&vis_hash_lock); + spin_unlock_irqrestore(&vis_hash_lock, flags); start_vis_timer(); } static DECLARE_DELAYED_WORK(vis_timer_wq, send_vis_packets); @@ -547,10 +554,11 @@ static DECLARE_DELAYED_WORK(vis_timer_wq, send_vis_packets); * initialized (e.g. bat0 is initialized, interfaces have been added) */ int vis_init(void) { + unsigned long flags; if (vis_hash) return 1; - spin_lock(&vis_hash_lock); + spin_lock_irqsave(&vis_hash_lock, flags); vis_hash = hash_new(256, vis_info_cmp, vis_info_choose); if (!vis_hash) { @@ -588,12 +596,12 @@ int vis_init(void) goto err; } - spin_unlock(&vis_hash_lock); + spin_unlock_irqrestore(&vis_hash_lock, flags); start_vis_timer(); return 1; err: - spin_unlock(&vis_hash_lock); + spin_unlock_irqrestore(&vis_hash_lock, flags); vis_quit(); return 0; } @@ -601,17 +609,18 @@ err: /* shutdown vis-server */ void vis_quit(void) { + unsigned long flags; if (!vis_hash) return; cancel_delayed_work_sync(&vis_timer_wq); - spin_lock(&vis_hash_lock); + spin_lock_irqsave(&vis_hash_lock, flags); /* properly remove, kill timers ... */ hash_delete(vis_hash, free_info); vis_hash = NULL; my_vis_info = NULL; - spin_unlock(&vis_hash_lock); + spin_unlock_irqrestore(&vis_hash_lock, flags); } /* schedule packets for (re)transmission */ From a9c2910aa15c5b2559e80d1406176f8456d3e34e Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Sat, 2 Jan 2010 11:30:49 +0100 Subject: [PATCH 085/367] Staging: batman-adv: Allow the MAC address to be set Some embedded devices have very limited sources of entropy for the random number generator. It has been observed that the random MAC address on the interface bat0 is not always random. When testing with a collection of identical hardware, sometimes the bat0 device the same MAC address on multiple devices, causing mayhem. This patch allows the MAC address to be set by the user. Signed-off-by: Andrew Lunn Signed-off-by: Simon Wunderlich Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/soft-interface.c | 13 +++++++++++-- drivers/staging/batman-adv/translation-table.c | 15 +++++++++++++++ drivers/staging/batman-adv/translation-table.h | 1 + 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/drivers/staging/batman-adv/soft-interface.c b/drivers/staging/batman-adv/soft-interface.c index 8ae3483a6259..bc0217b1aeb1 100644 --- a/drivers/staging/batman-adv/soft-interface.c +++ b/drivers/staging/batman-adv/soft-interface.c @@ -145,9 +145,18 @@ struct net_device_stats *interface_stats(struct net_device *dev) return &priv->stats; } -int interface_set_mac_addr(struct net_device *dev, void *addr) +int interface_set_mac_addr(struct net_device *dev, void *p) { - return -EBUSY; + struct sockaddr *addr = p; + + if (!is_valid_ether_addr(addr->sa_data)) + return -EADDRNOTAVAIL; + + hna_local_remove(dev->dev_addr, "mac address changed"); + memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN); + hna_local_add(dev->dev_addr); + + return 0; } int interface_change_mtu(struct net_device *dev, int new_mtu) diff --git a/drivers/staging/batman-adv/translation-table.c b/drivers/staging/batman-adv/translation-table.c index 8c8136b71628..53a054e413d7 100644 --- a/drivers/staging/batman-adv/translation-table.c +++ b/drivers/staging/batman-adv/translation-table.c @@ -211,6 +211,21 @@ static void hna_local_del(struct hna_local_entry *hna_local_entry, _hna_local_del(hna_local_entry); } +void hna_local_remove(uint8_t *addr, char *message) +{ + struct hna_local_entry *hna_local_entry; + unsigned long flags; + + spin_lock_irqsave(&hna_local_hash_lock, flags); + + hna_local_entry = (struct hna_local_entry *) + hash_find(hna_local_hash, addr); + if (hna_local_entry) + hna_local_del(hna_local_entry, message); + + spin_unlock_irqrestore(&hna_local_hash_lock, flags); +} + void hna_local_purge(struct work_struct *work) { struct hna_local_entry *hna_local_entry; diff --git a/drivers/staging/batman-adv/translation-table.h b/drivers/staging/batman-adv/translation-table.h index f7da81129318..281125b729fb 100644 --- a/drivers/staging/batman-adv/translation-table.h +++ b/drivers/staging/batman-adv/translation-table.h @@ -23,6 +23,7 @@ int hna_local_init(void); void hna_local_add(uint8_t *addr); +void hna_local_remove(uint8_t *addr, char *message); int hna_local_fill_buffer(unsigned char *buff, int buff_len); int hna_local_fill_buffer_text(unsigned char *buff, int buff_len); void hna_local_purge(struct work_struct *work); From b9b27e4ef6313449a6b40a21e0e9a1bdd9a1d8ce Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Sat, 2 Jan 2010 11:30:50 +0100 Subject: [PATCH 086/367] Staging: batman-adv: Use printk(%pM) for MAC addresses printk() since kernel version 2.6.29 has supported printing MAC addresses directly, as an extension to the %p processing. This patch makes use of this for printk() and bat_dbg(). This will remove the overhead of using addr_to_string() which is normally never actually output. Fixed a typo found by Gus Wirth. Signed-off-by: Andrew Lunn Signed-off-by: Simon Wunderlich Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/TODO | 4 - drivers/staging/batman-adv/compat.h | 86 ++++++++++++++----- drivers/staging/batman-adv/device.c | 1 + drivers/staging/batman-adv/hard-interface.c | 14 +-- drivers/staging/batman-adv/main.c | 2 +- drivers/staging/batman-adv/originator.c | 17 ++-- drivers/staging/batman-adv/routing.c | 65 ++++---------- drivers/staging/batman-adv/send.c | 13 +-- .../staging/batman-adv/translation-table.c | 34 +++----- 9 files changed, 113 insertions(+), 123 deletions(-) diff --git a/drivers/staging/batman-adv/TODO b/drivers/staging/batman-adv/TODO index b1e369cf9870..2122adc6aa84 100644 --- a/drivers/staging/batman-adv/TODO +++ b/drivers/staging/batman-adv/TODO @@ -17,10 +17,6 @@ -> transtable_global (read-only) [outputs the global translation table] -> transtable_local (read-only) [outputs the local translation table] -=> logging -* make use of printk %pM support instead of converting mac addresses -* manually - => strip out all backward compatibility support to older kernels (only found in compat.h) diff --git a/drivers/staging/batman-adv/compat.h b/drivers/staging/batman-adv/compat.h index f4e0a4564ba7..ded1e6e15240 100644 --- a/drivers/staging/batman-adv/compat.h +++ b/drivers/staging/batman-adv/compat.h @@ -35,34 +35,31 @@ #define list_first_entry(ptr, type, member) \ list_entry((ptr)->next, type, member) -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) */ +#define skb_mac_header(_skb) \ + ((_skb)->mac.raw) +#define skb_network_header(_skb) \ + ((_skb)->nh.raw) -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) +#define skb_mac_header(_skb) \ + ((_skb)->mac.raw) -#define device_create(_cls, _parent, _devt, _device, _fmt) \ - class_device_create(_cls, _parent, _devt, _device, _fmt) - -#define device_destroy(_cls, _device) \ - class_device_destroy(_cls, _device) - -#else - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27) - -#define device_create(_cls, _parent, _devt, _device, _fmt) \ - device_create_drvdata(_cls, _parent, _devt, _device, _fmt) - -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27) */ - -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) */ +#endif /* < KERNEL_VERSION(2,6,22) */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23) +static inline int skb_clone_writable(struct sk_buff *skb, unsigned int len) +{ + /* skb->hdr_len not available, just "not writable" to enforce a copy */ + return 0; +} + #define cancel_delayed_work_sync(wq) cancel_rearming_delayed_work(wq) -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23) */ +#endif /* < KERNEL_VERSION(2, 6, 23) */ + #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25) + #define strict_strtoul(cp, base, res) \ ({ \ int ret = 0; \ @@ -72,4 +69,53 @@ ret = -EINVAL; \ ret; \ }) -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25) */ + +#endif /* < KERNEL_VERSION(2, 6, 25) */ + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) + +static const char hex_asc[] = "0123456789abcdef"; +#define hex_asc_lo(x) hex_asc[((x) & 0x0f)] +#define hex_asc_hi(x) hex_asc[((x) & 0xf0) >> 4] +static inline char *pack_hex_byte(char *buf, u8 byte) +{ + *buf++ = hex_asc_hi(byte); + *buf++ = hex_asc_lo(byte); + return buf; +} + +#define device_create(_cls, _parent, _devt, _device, _fmt) \ + class_device_create(_cls, _parent, _devt, _device, _fmt) + +#define device_destroy(_cls, _device) \ + class_device_destroy(_cls, _device) + +#endif /* < KERNEL_VERSION(2, 6, 26) */ + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27) + +#ifndef dereference_function_descriptor +#define dereference_function_descriptor(p) (p) +#endif + +#ifndef device_create +#define device_create(_cls, _parent, _devt, _device, _fmt) \ + device_create_drvdata(_cls, _parent, _devt, _device, _fmt) +#endif + +#endif /* < KERNEL_VERSION(2, 6, 27) */ + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) + +asmlinkage int bat_printk(const char *fmt, ...); +#define printk bat_printk + +static inline struct net_device_stats *dev_get_stats(struct net_device *dev) +{ + if (dev->get_stats) + return dev->get_stats(dev); + else + return NULL; +} + +#endif /* < KERNEL_VERSION(2, 6, 29) */ diff --git a/drivers/staging/batman-adv/device.c b/drivers/staging/batman-adv/device.c index ab2b0b17d9ea..72306acec5e6 100644 --- a/drivers/staging/batman-adv/device.c +++ b/drivers/staging/batman-adv/device.c @@ -19,6 +19,7 @@ * */ +#include #include "main.h" #include "device.h" #include "send.h" diff --git a/drivers/staging/batman-adv/hard-interface.c b/drivers/staging/batman-adv/hard-interface.c index cc59c307a420..db264bd0bf9d 100644 --- a/drivers/staging/batman-adv/hard-interface.c +++ b/drivers/staging/batman-adv/hard-interface.c @@ -74,7 +74,6 @@ int hardif_min_mtu(void) static void check_known_mac_addr(uint8_t *addr) { struct batman_if *batman_if; - char mac_string[ETH_STR_LEN]; rcu_read_lock(); list_for_each_entry_rcu(batman_if, &if_list, list) { @@ -85,9 +84,8 @@ static void check_known_mac_addr(uint8_t *addr) if (!compare_orig(batman_if->net_dev->dev_addr, addr)) continue; - addr_to_string(mac_string, addr); - printk(KERN_WARNING "batman-adv:The newly added mac address (%s) already exists on: %s\n", - mac_string, batman_if->dev); + printk(KERN_WARNING "batman-adv:The newly added mac address (%pM) already exists on: %s\n", + addr, batman_if->dev); printk(KERN_WARNING "batman-adv:It is strongly recommended to keep mac addresses unique to avoid problems!\n"); } rcu_read_unlock(); @@ -447,9 +445,11 @@ int batman_skb_recv(struct sk_buff *skb, struct net_device *dev, if (!batman_if) goto err_free; - stats = &skb->dev->stats; - stats->rx_packets++; - stats->rx_bytes += skb->len; + stats = (struct net_device_stats *) dev_get_stats(skb->dev); + if (stats) { + stats->rx_packets++; + stats->rx_bytes += skb->len; + } batman_packet = (struct batman_packet *)skb->data; diff --git a/drivers/staging/batman-adv/main.c b/drivers/staging/batman-adv/main.c index c73350415697..1d80ea366be3 100644 --- a/drivers/staging/batman-adv/main.c +++ b/drivers/staging/batman-adv/main.c @@ -54,7 +54,7 @@ unsigned char broadcastAddr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; atomic_t module_state; static struct packet_type batman_adv_packet_type __read_mostly = { - .type = cpu_to_be16(ETH_P_BATMAN), + .type = __constant_htons(ETH_P_BATMAN), .func = batman_skb_recv, }; diff --git a/drivers/staging/batman-adv/originator.c b/drivers/staging/batman-adv/originator.c index 1c0a3cec8466..a60dbe1cf6bf 100644 --- a/drivers/staging/batman-adv/originator.c +++ b/drivers/staging/batman-adv/originator.c @@ -26,6 +26,7 @@ #include "hash.h" #include "translation-table.h" #include "routing.h" +#include "compat.h" static DECLARE_DELAYED_WORK(purge_orig_wq, purge_orig); @@ -121,7 +122,6 @@ struct orig_node *get_orig_node(uint8_t *addr) { struct orig_node *orig_node; struct hashtable_t *swaphash; - char orig_str[ETH_STR_LEN]; int size; orig_node = ((struct orig_node *)hash_find(orig_hash, addr)); @@ -129,8 +129,7 @@ struct orig_node *get_orig_node(uint8_t *addr) if (orig_node != NULL) return orig_node; - addr_to_string(orig_str, addr); - bat_dbg(DBG_BATMAN, "Creating new originator: %s \n", orig_str); + bat_dbg(DBG_BATMAN, "Creating new originator: %pM \n", addr); orig_node = kmalloc(sizeof(struct orig_node), GFP_ATOMIC); if (!orig_node) @@ -186,7 +185,6 @@ static bool purge_orig_neighbors(struct orig_node *orig_node, struct neigh_node **best_neigh_node) { struct list_head *list_pos, *list_pos_tmp; - char neigh_str[ETH_STR_LEN], orig_str[ETH_STR_LEN]; struct neigh_node *neigh_node; bool neigh_purged = false; @@ -201,9 +199,7 @@ static bool purge_orig_neighbors(struct orig_node *orig_node, (neigh_node->last_valid + ((PURGE_TIMEOUT * HZ) / 1000)))) { - addr_to_string(neigh_str, neigh_node->addr); - addr_to_string(orig_str, orig_node->orig); - bat_dbg(DBG_BATMAN, "neighbor timeout: originator %s, neighbor: %s, last_valid %lu\n", orig_str, neigh_str, (neigh_node->last_valid / HZ)); + bat_dbg(DBG_BATMAN, "neighbor timeout: originator %pM, neighbor: %pM, last_valid %lu\n", orig_node->orig, neigh_node->addr, (neigh_node->last_valid / HZ)); neigh_purged = true; list_del(list_pos); @@ -221,17 +217,14 @@ static bool purge_orig_neighbors(struct orig_node *orig_node, static bool purge_orig_node(struct orig_node *orig_node) { struct neigh_node *best_neigh_node; - char orig_str[ETH_STR_LEN]; - - addr_to_string(orig_str, orig_node->orig); if (time_after(jiffies, (orig_node->last_valid + ((2 * PURGE_TIMEOUT * HZ) / 1000)))) { bat_dbg(DBG_BATMAN, - "Originator timeout: originator %s, last_valid %lu\n", - orig_str, (orig_node->last_valid / HZ)); + "Originator timeout: originator %pM, last_valid %lu\n", + orig_node->orig, (orig_node->last_valid / HZ)); return true; } else { if (purge_orig_neighbors(orig_node, &best_neigh_node)) diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c index e0d093f5d524..bab7a73e17a5 100644 --- a/drivers/staging/batman-adv/routing.c +++ b/drivers/staging/batman-adv/routing.c @@ -80,32 +80,24 @@ static void update_route(struct orig_node *orig_node, struct neigh_node *neigh_node, unsigned char *hna_buff, int hna_buff_len) { - char orig_str[ETH_STR_LEN], neigh_str[ETH_STR_LEN]; - char router_str[ETH_STR_LEN]; - - addr_to_string(orig_str, orig_node->orig); - /* route deleted */ if ((orig_node->router != NULL) && (neigh_node == NULL)) { - bat_dbg(DBG_ROUTES, "Deleting route towards: %s\n", - orig_str); + bat_dbg(DBG_ROUTES, "Deleting route towards: %pM\n", + orig_node->orig); hna_global_del_orig(orig_node, "originator timed out"); /* route added */ } else if ((orig_node->router == NULL) && (neigh_node != NULL)) { - addr_to_string(neigh_str, neigh_node->addr); bat_dbg(DBG_ROUTES, - "Adding route towards: %s (via %s)\n", - orig_str, neigh_str); + "Adding route towards: %pM (via %pM)\n", + orig_node->orig, neigh_node->addr); hna_global_add_orig(orig_node, hna_buff, hna_buff_len); /* route changed */ } else { - addr_to_string(neigh_str, neigh_node->addr); - addr_to_string(router_str, orig_node->router->addr); - bat_dbg(DBG_ROUTES, "Changing route towards: %s (now via %s - was via %s)\n", orig_str, neigh_str, router_str); + bat_dbg(DBG_ROUTES, "Changing route towards: %pM (now via %pM - was via %pM)\n", orig_node->orig, neigh_node->addr, orig_node->router->addr); } if (neigh_node != NULL) @@ -138,12 +130,8 @@ static int isBidirectionalNeigh(struct orig_node *orig_node, struct batman_if *if_incoming) { struct neigh_node *neigh_node = NULL, *tmp_neigh_node = NULL; - char orig_str[ETH_STR_LEN], neigh_str[ETH_STR_LEN]; unsigned char total_count; - addr_to_string(orig_str, orig_node->orig); - addr_to_string(neigh_str, orig_neigh_node->orig); - if (orig_node == orig_neigh_node) { list_for_each_entry(tmp_neigh_node, &orig_node->neigh_list, @@ -227,8 +215,8 @@ static int isBidirectionalNeigh(struct orig_node *orig_node, orig_neigh_node->tq_asym_penalty) / (TQ_MAX_VALUE * TQ_MAX_VALUE)); - bat_dbg(DBG_BATMAN, "bidirectional: orig = %-15s neigh = %-15s => own_bcast = %2i, real recv = %2i, local tq: %3i, asym_penalty: %3i, total tq: %3i \n", - orig_str, neigh_str, total_count, + bat_dbg(DBG_BATMAN, "bidirectional: orig = %-15pM neigh = %-15pM => own_bcast = %2i, real recv = %2i, local tq: %3i, asym_penalty: %3i, total tq: %3i \n", + orig_node->orig, orig_neigh_node->orig, total_count, neigh_node->real_packet_count, orig_neigh_node->tq_own, orig_neigh_node->tq_asym_penalty, batman_packet->tq); @@ -372,8 +360,6 @@ void receive_bat_packet(struct ethhdr *ethhdr, { struct batman_if *batman_if; struct orig_node *orig_neigh_node, *orig_node; - char orig_str[ETH_STR_LEN], prev_sender_str[ETH_STR_LEN]; - char neigh_str[ETH_STR_LEN]; char has_directlink_flag; char is_my_addr = 0, is_my_orig = 0, is_my_oldorig = 0; char is_broadcast = 0, is_bidirectional, is_single_hop_neigh; @@ -398,20 +384,16 @@ void receive_bat_packet(struct ethhdr *ethhdr, /* could be changed by schedule_own_packet() */ if_incoming_seqno = atomic_read(&if_incoming->seqno); - addr_to_string(orig_str, batman_packet->orig); - addr_to_string(prev_sender_str, batman_packet->prev_sender); - addr_to_string(neigh_str, ethhdr->h_source); - has_directlink_flag = (batman_packet->flags & DIRECTLINK ? 1 : 0); is_single_hop_neigh = (compare_orig(ethhdr->h_source, batman_packet->orig) ? 1 : 0); - bat_dbg(DBG_BATMAN, "Received BATMAN packet via NB: %s, IF: %s [%s] (from OG: %s, via prev OG: %s, seqno %d, tq %d, TTL %d, V %d, IDF %d) \n", - neigh_str, if_incoming->dev, if_incoming->addr_str, - orig_str, prev_sender_str, batman_packet->seqno, - batman_packet->tq, batman_packet->ttl, batman_packet->version, - has_directlink_flag); + bat_dbg(DBG_BATMAN, "Received BATMAN packet via NB: %pM, IF: %s [%s] (from OG: %pM, via prev OG: %pM, seqno %d, tq %d, TTL %d, V %d, IDF %d) \n", + ethhdr->h_source, if_incoming->dev, if_incoming->addr_str, + batman_packet->orig, batman_packet->prev_sender, + batman_packet->seqno, batman_packet->tq, batman_packet->ttl, + batman_packet->version, has_directlink_flag); list_for_each_entry_rcu(batman_if, &if_list, list) { if (batman_if->if_active != IF_ACTIVE) @@ -442,13 +424,13 @@ void receive_bat_packet(struct ethhdr *ethhdr, if (is_my_addr) { bat_dbg(DBG_BATMAN, - "Drop packet: received my own broadcast (sender: %s)\n", - neigh_str); + "Drop packet: received my own broadcast (sender: %pM)\n", + ethhdr->h_source); return; } if (is_broadcast) { - bat_dbg(DBG_BATMAN, "Drop packet: ignoring all packets with broadcast source addr (sender: %s) \n", neigh_str); + bat_dbg(DBG_BATMAN, "Drop packet: ignoring all packets with broadcast source addr (sender: %pM) \n", ethhdr->h_source); return; } @@ -488,7 +470,7 @@ void receive_bat_packet(struct ethhdr *ethhdr, } if (is_my_oldorig) { - bat_dbg(DBG_BATMAN, "Drop packet: ignoring all rebroadcast echos (sender: %s) \n", neigh_str); + bat_dbg(DBG_BATMAN, "Drop packet: ignoring all rebroadcast echos (sender: %pM) \n", ethhdr->h_source); return; } @@ -506,7 +488,7 @@ void receive_bat_packet(struct ethhdr *ethhdr, !(compare_orig(batman_packet->orig, batman_packet->prev_sender)) && (compare_orig(orig_node->router->addr, orig_node->router->orig_node->router->addr))) { - bat_dbg(DBG_BATMAN, "Drop packet: ignoring all rebroadcast packets that may make me loop (sender: %s) \n", neigh_str); + bat_dbg(DBG_BATMAN, "Drop packet: ignoring all rebroadcast packets that may make me loop (sender: %pM) \n", ethhdr->h_source); return; } @@ -666,7 +648,6 @@ static int recv_my_icmp_packet(struct sk_buff *skb) static int recv_icmp_ttl_exceeded(struct sk_buff *skb) { - unsigned char src_str[ETH_STR_LEN], dst_str[ETH_STR_LEN]; struct orig_node *orig_node; struct icmp_packet *icmp_packet; struct ethhdr *ethhdr; @@ -679,10 +660,7 @@ static int recv_icmp_ttl_exceeded(struct sk_buff *skb) icmp_packet = (struct icmp_packet *) skb->data; ethhdr = (struct ethhdr *) skb_mac_header(skb); - addr_to_string(src_str, icmp_packet->orig); - addr_to_string(dst_str, icmp_packet->dst); - - printk(KERN_WARNING "batman-adv:Warning - can't send packet from %s to %s: ttl exceeded\n", src_str, dst_str); + printk(KERN_WARNING "batman-adv:Warning - can't send packet from %pM to %pM: ttl exceeded\n", icmp_packet->orig, icmp_packet->dst); /* send TTL exceeded if packet is an echo request (traceroute) */ if (icmp_packet->msg_type != ECHO_REQUEST) @@ -812,7 +790,6 @@ int recv_icmp_packet(struct sk_buff *skb) int recv_unicast_packet(struct sk_buff *skb) { struct unicast_packet *unicast_packet; - unsigned char src_str[ETH_STR_LEN], dst_str[ETH_STR_LEN]; struct orig_node *orig_node; struct ethhdr *ethhdr; struct batman_if *batman_if; @@ -850,10 +827,7 @@ int recv_unicast_packet(struct sk_buff *skb) /* TTL exceeded */ if (unicast_packet->ttl < 2) { - addr_to_string(src_str, ethhdr->h_source); - addr_to_string(dst_str, ethhdr->h_dest); - - printk(KERN_WARNING "batman-adv:Warning - can't send packet from %s to %s: ttl exceeded\n", src_str, dst_str); + printk(KERN_WARNING "batman-adv:Warning - can't send packet from %pM to %pM: ttl exceeded\n", ethhdr->h_source, unicast_packet->dest); return NET_RX_DROP; } @@ -1005,4 +979,3 @@ int recv_vis_packet(struct sk_buff *skb) } return ret; } - diff --git a/drivers/staging/batman-adv/send.c b/drivers/staging/batman-adv/send.c index fd48f3fa2d88..edfdd5d9279b 100644 --- a/drivers/staging/batman-adv/send.c +++ b/drivers/staging/batman-adv/send.c @@ -132,7 +132,6 @@ static void send_packet_to_if(struct forw_packet *forw_packet, uint8_t packet_num; int16_t buff_pos; struct batman_packet *batman_packet; - char orig_str[ETH_STR_LEN]; if (batman_if->if_active != IF_ACTIVE) return; @@ -154,15 +153,14 @@ static void send_packet_to_if(struct forw_packet *forw_packet, else batman_packet->flags &= ~DIRECTLINK; - addr_to_string(orig_str, batman_packet->orig); fwd_str = (packet_num > 0 ? "Forwarding" : (forw_packet->own ? "Sending own" : "Forwarding")); bat_dbg(DBG_BATMAN, - "%s %spacket (originator %s, seqno %d, TQ %d, TTL %d, IDF %s) on interface %s [%s]\n", + "%s %spacket (originator %pM, seqno %d, TQ %d, TTL %d, IDF %s) on interface %s [%s]\n", fwd_str, (packet_num > 0 ? "aggregated " : ""), - orig_str, ntohs(batman_packet->seqno), + batman_packet->orig, ntohs(batman_packet->seqno), batman_packet->tq, batman_packet->ttl, (batman_packet->flags & DIRECTLINK ? "on" : "off"), @@ -186,7 +184,6 @@ static void send_packet(struct forw_packet *forw_packet) struct batman_if *batman_if; struct batman_packet *batman_packet = (struct batman_packet *)(forw_packet->packet_buff); - char orig_str[ETH_STR_LEN]; unsigned char directlink = (batman_packet->flags & DIRECTLINK ? 1 : 0); if (!forw_packet->if_incoming) { @@ -197,8 +194,6 @@ static void send_packet(struct forw_packet *forw_packet) if (forw_packet->if_incoming->if_active != IF_ACTIVE) return; - addr_to_string(orig_str, batman_packet->orig); - /* multihomed peer assumed */ /* non-primary OGMs are only broadcasted on their interface */ if ((directlink && (batman_packet->ttl == 1)) || @@ -206,9 +201,9 @@ static void send_packet(struct forw_packet *forw_packet) /* FIXME: what about aggregated packets ? */ bat_dbg(DBG_BATMAN, - "%s packet (originator %s, seqno %d, TTL %d) on interface %s [%s]\n", + "%s packet (originator %pM, seqno %d, TTL %d) on interface %s [%s]\n", (forw_packet->own ? "Sending own" : "Forwarding"), - orig_str, ntohs(batman_packet->seqno), + batman_packet->orig, ntohs(batman_packet->seqno), batman_packet->ttl, forw_packet->if_incoming->dev, forw_packet->if_incoming->addr_str); diff --git a/drivers/staging/batman-adv/translation-table.c b/drivers/staging/batman-adv/translation-table.c index 53a054e413d7..398a8084660a 100644 --- a/drivers/staging/batman-adv/translation-table.c +++ b/drivers/staging/batman-adv/translation-table.c @@ -61,7 +61,6 @@ void hna_local_add(uint8_t *addr) struct hna_local_entry *hna_local_entry; struct hna_global_entry *hna_global_entry; struct hashtable_t *swaphash; - char hna_str[ETH_STR_LEN]; unsigned long flags; spin_lock_irqsave(&hna_local_hash_lock, flags); @@ -74,19 +73,17 @@ void hna_local_add(uint8_t *addr) return; } - addr_to_string(hna_str, addr); - /* only announce as many hosts as possible in the batman-packet and space in batman_packet->num_hna That also should give a limit to MAC-flooding. */ if ((num_hna + 1 > (ETH_DATA_LEN - BAT_PACKET_LEN) / ETH_ALEN) || (num_hna + 1 > 255)) { - bat_dbg(DBG_ROUTES, "Can't add new local hna entry (%s): number of local hna entries exceeds packet size \n", hna_str); + bat_dbg(DBG_ROUTES, "Can't add new local hna entry (%pM): number of local hna entries exceeds packet size \n", addr); return; } - bat_dbg(DBG_ROUTES, "Creating new local hna entry: %s \n", - hna_str); + bat_dbg(DBG_ROUTES, "Creating new local hna entry: %pM \n", + addr); hna_local_entry = kmalloc(sizeof(struct hna_local_entry), GFP_ATOMIC); if (!hna_local_entry) @@ -201,11 +198,8 @@ static void _hna_local_del(void *data) static void hna_local_del(struct hna_local_entry *hna_local_entry, char *message) { - char hna_str[ETH_STR_LEN]; - - addr_to_string(hna_str, hna_local_entry->addr); - bat_dbg(DBG_ROUTES, "Deleting local hna entry (%s): %s \n", - hna_str, message); + bat_dbg(DBG_ROUTES, "Deleting local hna entry (%pM): %s \n", + hna_local_entry->addr, message); hash_remove(hna_local_hash, hna_local_entry->addr); _hna_local_del(hna_local_entry); @@ -278,13 +272,10 @@ void hna_global_add_orig(struct orig_node *orig_node, struct hna_global_entry *hna_global_entry; struct hna_local_entry *hna_local_entry; struct hashtable_t *swaphash; - char hna_str[ETH_STR_LEN], orig_str[ETH_STR_LEN]; int hna_buff_count = 0; unsigned long flags; unsigned char *hna_ptr; - addr_to_string(orig_str, orig_node->orig); - while ((hna_buff_count + 1) * ETH_ALEN <= hna_buff_len) { spin_lock_irqsave(&hna_global_hash_lock, flags); @@ -304,10 +295,9 @@ void hna_global_add_orig(struct orig_node *orig_node, memcpy(hna_global_entry->addr, hna_ptr, ETH_ALEN); - addr_to_string(hna_str, hna_global_entry->addr); bat_dbg(DBG_ROUTES, - "Creating new global hna entry: %s (via %s)\n", - hna_str, orig_str); + "Creating new global hna entry: %pM (via %pM)\n", + hna_global_entry->addr, orig_node->orig); spin_lock_irqsave(&hna_global_hash_lock, flags); hash_add(hna_global_hash, hna_global_entry); @@ -399,13 +389,9 @@ int hna_global_fill_buffer_text(unsigned char *buff, int buff_len) void _hna_global_del_orig(struct hna_global_entry *hna_global_entry, char *message) { - char hna_str[ETH_STR_LEN], orig_str[ETH_STR_LEN]; - - addr_to_string(orig_str, hna_global_entry->orig_node->orig); - addr_to_string(hna_str, hna_global_entry->addr); - - bat_dbg(DBG_ROUTES, "Deleting global hna entry %s (via %s): %s \n", - hna_str, orig_str, message); + bat_dbg(DBG_ROUTES, "Deleting global hna entry %pM (via %pM): %s \n", + hna_global_entry->addr, hna_global_entry->orig_node->orig, + message); hash_remove(hna_global_hash, hna_global_entry->addr); kfree(hna_global_entry); From abad5446585b0b9519fad00c05156f373ea114ad Mon Sep 17 00:00:00 2001 From: Simon Wunderlich Date: Sat, 2 Jan 2010 11:30:51 +0100 Subject: [PATCH 087/367] Staging: batman-adv: Remove compat.h Since we are now part of mainline, we don't need compat.h to allow building of the module with old versions of the kernel. Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/TODO | 3 - drivers/staging/batman-adv/compat.h | 121 ------------------ drivers/staging/batman-adv/device.c | 2 - drivers/staging/batman-adv/hard-interface.c | 1 - drivers/staging/batman-adv/main.c | 1 - drivers/staging/batman-adv/originator.c | 16 +-- drivers/staging/batman-adv/proc.c | 1 - drivers/staging/batman-adv/routing.c | 2 - drivers/staging/batman-adv/send.c | 2 - drivers/staging/batman-adv/soft-interface.c | 6 +- .../staging/batman-adv/translation-table.c | 1 - drivers/staging/batman-adv/vis.c | 1 - 12 files changed, 6 insertions(+), 151 deletions(-) delete mode 100644 drivers/staging/batman-adv/compat.h diff --git a/drivers/staging/batman-adv/TODO b/drivers/staging/batman-adv/TODO index 2122adc6aa84..2f15136b18e7 100644 --- a/drivers/staging/batman-adv/TODO +++ b/drivers/staging/batman-adv/TODO @@ -17,9 +17,6 @@ -> transtable_global (read-only) [outputs the global translation table] -> transtable_local (read-only) [outputs the local translation table] -=> strip out all backward compatibility support to older kernels - (only found in compat.h) - => fix checkpatch.pl errors Please send all patches to: diff --git a/drivers/staging/batman-adv/compat.h b/drivers/staging/batman-adv/compat.h deleted file mode 100644 index ded1e6e15240..000000000000 --- a/drivers/staging/batman-adv/compat.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (C) 2007-2009 B.A.T.M.A.N. contributors: - * - * Marek Lindner, Simon Wunderlich - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA - * - * - * This file contains macros for maintaining compatibility with older versions - * of the Linux kernel. - */ - -#include /* LINUX_VERSION_CODE */ - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) - -#define skb_set_network_header(_skb, _offset) \ - do { (_skb)->nh.raw = (_skb)->data + (_offset); } while (0) - -#define skb_reset_mac_header(_skb) \ - do { (_skb)->mac.raw = (_skb)->data; } while (0) - -#define list_first_entry(ptr, type, member) \ - list_entry((ptr)->next, type, member) - -#define skb_mac_header(_skb) \ - ((_skb)->mac.raw) - -#define skb_network_header(_skb) \ - ((_skb)->nh.raw) - -#define skb_mac_header(_skb) \ - ((_skb)->mac.raw) - -#endif /* < KERNEL_VERSION(2,6,22) */ - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23) - -static inline int skb_clone_writable(struct sk_buff *skb, unsigned int len) -{ - /* skb->hdr_len not available, just "not writable" to enforce a copy */ - return 0; -} - -#define cancel_delayed_work_sync(wq) cancel_rearming_delayed_work(wq) - -#endif /* < KERNEL_VERSION(2, 6, 23) */ - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25) - -#define strict_strtoul(cp, base, res) \ - ({ \ - int ret = 0; \ - char *endp; \ - *res = simple_strtoul(cp, &endp, base); \ - if (cp == endp) \ - ret = -EINVAL; \ - ret; \ -}) - -#endif /* < KERNEL_VERSION(2, 6, 25) */ - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) - -static const char hex_asc[] = "0123456789abcdef"; -#define hex_asc_lo(x) hex_asc[((x) & 0x0f)] -#define hex_asc_hi(x) hex_asc[((x) & 0xf0) >> 4] -static inline char *pack_hex_byte(char *buf, u8 byte) -{ - *buf++ = hex_asc_hi(byte); - *buf++ = hex_asc_lo(byte); - return buf; -} - -#define device_create(_cls, _parent, _devt, _device, _fmt) \ - class_device_create(_cls, _parent, _devt, _device, _fmt) - -#define device_destroy(_cls, _device) \ - class_device_destroy(_cls, _device) - -#endif /* < KERNEL_VERSION(2, 6, 26) */ - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27) - -#ifndef dereference_function_descriptor -#define dereference_function_descriptor(p) (p) -#endif - -#ifndef device_create -#define device_create(_cls, _parent, _devt, _device, _fmt) \ - device_create_drvdata(_cls, _parent, _devt, _device, _fmt) -#endif - -#endif /* < KERNEL_VERSION(2, 6, 27) */ - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) - -asmlinkage int bat_printk(const char *fmt, ...); -#define printk bat_printk - -static inline struct net_device_stats *dev_get_stats(struct net_device *dev) -{ - if (dev->get_stats) - return dev->get_stats(dev); - else - return NULL; -} - -#endif /* < KERNEL_VERSION(2, 6, 29) */ diff --git a/drivers/staging/batman-adv/device.c b/drivers/staging/batman-adv/device.c index 72306acec5e6..a3e74296abfd 100644 --- a/drivers/staging/batman-adv/device.c +++ b/drivers/staging/batman-adv/device.c @@ -26,8 +26,6 @@ #include "types.h" #include "hash.h" -#include "compat.h" - static struct class *batman_class; static int Major; /* Major number assigned to our device driver */ diff --git a/drivers/staging/batman-adv/hard-interface.c b/drivers/staging/batman-adv/hard-interface.c index db264bd0bf9d..f8b1ba3910ad 100644 --- a/drivers/staging/batman-adv/hard-interface.c +++ b/drivers/staging/batman-adv/hard-interface.c @@ -26,7 +26,6 @@ #include "translation-table.h" #include "routing.h" #include "hash.h" -#include "compat.h" #define MIN(x, y) ((x) < (y) ? (x) : (y)) diff --git a/drivers/staging/batman-adv/main.c b/drivers/staging/batman-adv/main.c index 1d80ea366be3..3f780753a2bf 100644 --- a/drivers/staging/batman-adv/main.c +++ b/drivers/staging/batman-adv/main.c @@ -31,7 +31,6 @@ #include "types.h" #include "vis.h" #include "hash.h" -#include "compat.h" struct list_head if_list; struct hlist_head forw_bat_list; diff --git a/drivers/staging/batman-adv/originator.c b/drivers/staging/batman-adv/originator.c index a60dbe1cf6bf..29c241119a3b 100644 --- a/drivers/staging/batman-adv/originator.c +++ b/drivers/staging/batman-adv/originator.c @@ -26,8 +26,6 @@ #include "hash.h" #include "translation-table.h" #include "routing.h" -#include "compat.h" - static DECLARE_DELAYED_WORK(purge_orig_wq, purge_orig); @@ -80,11 +78,10 @@ create_neighbor(struct orig_node *orig_node, struct orig_node *orig_neigh_node, bat_dbg(DBG_BATMAN, "Creating new last-hop neighbor of originator\n"); - neigh_node = kmalloc(sizeof(struct neigh_node), GFP_ATOMIC); + neigh_node = kzalloc(sizeof(struct neigh_node), GFP_ATOMIC); if (!neigh_node) return NULL; - memset(neigh_node, 0, sizeof(struct neigh_node)); INIT_LIST_HEAD(&neigh_node->list); memcpy(neigh_node->addr, neigh, ETH_ALEN); @@ -131,11 +128,10 @@ struct orig_node *get_orig_node(uint8_t *addr) bat_dbg(DBG_BATMAN, "Creating new originator: %pM \n", addr); - orig_node = kmalloc(sizeof(struct orig_node), GFP_ATOMIC); + orig_node = kzalloc(sizeof(struct orig_node), GFP_ATOMIC); if (!orig_node) return NULL; - memset(orig_node, 0, sizeof(struct orig_node)); INIT_LIST_HEAD(&orig_node->neigh_list); memcpy(orig_node->orig, addr, ETH_ALEN); @@ -145,19 +141,15 @@ struct orig_node *get_orig_node(uint8_t *addr) size = num_ifs * sizeof(TYPE_OF_WORD) * NUM_WORDS; - orig_node->bcast_own = kmalloc(size, GFP_ATOMIC); + orig_node->bcast_own = kzalloc(size, GFP_ATOMIC); if (!orig_node->bcast_own) goto free_orig_node; - memset(orig_node->bcast_own, 0, size); - size = num_ifs * sizeof(uint8_t); - orig_node->bcast_own_sum = kmalloc(size, GFP_ATOMIC); + orig_node->bcast_own_sum = kzalloc(size, GFP_ATOMIC); if (!orig_node->bcast_own_sum) goto free_bcast_own; - memset(orig_node->bcast_own_sum, 0, size); - if (hash_add(orig_hash, orig_node) < 0) goto free_bcast_own_sum; diff --git a/drivers/staging/batman-adv/proc.c b/drivers/staging/batman-adv/proc.c index 33dae941a5c9..4d199351c2b4 100644 --- a/drivers/staging/batman-adv/proc.c +++ b/drivers/staging/batman-adv/proc.c @@ -27,7 +27,6 @@ #include "types.h" #include "hash.h" #include "vis.h" -#include "compat.h" static struct proc_dir_entry *proc_batman_dir, *proc_interface_file; static struct proc_dir_entry *proc_orig_interval_file, *proc_originators_file; diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c index bab7a73e17a5..09917e57b41c 100644 --- a/drivers/staging/batman-adv/routing.c +++ b/drivers/staging/batman-adv/routing.c @@ -32,7 +32,6 @@ #include "ring_buffer.h" #include "vis.h" #include "aggregation.h" -#include "compat.h" DECLARE_WAIT_QUEUE_HEAD(thread_wait); @@ -310,7 +309,6 @@ static void update_orig(struct orig_node *orig_node, struct ethhdr *ethhdr, update_hna: update_routes(orig_node, orig_node->router, hna_buff, tmp_hna_buff_len); - return; } static char count_real_packets(struct ethhdr *ethhdr, diff --git a/drivers/staging/batman-adv/send.c b/drivers/staging/batman-adv/send.c index edfdd5d9279b..944b2cdbdff8 100644 --- a/drivers/staging/batman-adv/send.c +++ b/drivers/staging/batman-adv/send.c @@ -29,8 +29,6 @@ #include "vis.h" #include "aggregation.h" -#include "compat.h" - /* apply hop penalty for a normal link */ static uint8_t hop_penalty(const uint8_t tq) { diff --git a/drivers/staging/batman-adv/soft-interface.c b/drivers/staging/batman-adv/soft-interface.c index bc0217b1aeb1..c9b35d9f7991 100644 --- a/drivers/staging/batman-adv/soft-interface.c +++ b/drivers/staging/batman-adv/soft-interface.c @@ -28,7 +28,6 @@ #include "hash.h" #include #include -#include "compat.h" static uint16_t bcast_seqno = 1; /* give own bcast messages seq numbers to avoid * broadcast storms */ @@ -120,7 +119,7 @@ void interface_setup(struct net_device *dev) /* generate random address */ random_ether_addr(dev_addr); - memcpy(dev->dev_addr, dev_addr, sizeof(dev->dev_addr)); + memcpy(dev->dev_addr, dev_addr, ETH_ALEN); SET_ETHTOOL_OPS(dev, &bat_ethtool_ops); @@ -269,7 +268,7 @@ unlock: dropped: priv->stats.tx_dropped++; end: - return 0; + return NETDEV_TX_OK; } void interface_rx(struct sk_buff *skb, int hdr_size) @@ -338,7 +337,6 @@ static u32 bat_get_msglevel(struct net_device *dev) static void bat_set_msglevel(struct net_device *dev, u32 value) { - return; } static u32 bat_get_link(struct net_device *dev) diff --git a/drivers/staging/batman-adv/translation-table.c b/drivers/staging/batman-adv/translation-table.c index 398a8084660a..d56f6654de0d 100644 --- a/drivers/staging/batman-adv/translation-table.c +++ b/drivers/staging/batman-adv/translation-table.c @@ -24,7 +24,6 @@ #include "soft-interface.h" #include "types.h" #include "hash.h" -#include "compat.h" struct hashtable_t *hna_local_hash; static struct hashtable_t *hna_global_hash; diff --git a/drivers/staging/batman-adv/vis.c b/drivers/staging/batman-adv/vis.c index 191297926b3f..ec8bb3f382c6 100644 --- a/drivers/staging/batman-adv/vis.c +++ b/drivers/staging/batman-adv/vis.c @@ -26,7 +26,6 @@ #include "soft-interface.h" #include "hard-interface.h" #include "hash.h" -#include "compat.h" struct hashtable_t *vis_hash; DEFINE_SPINLOCK(vis_hash_lock); From 4230020c42457e51c98636a328c60e9f3744152c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20L=C3=BCssing?= Date: Sat, 2 Jan 2010 11:30:52 +0100 Subject: [PATCH 088/367] Staging: batman-adv: Dont deactivate aggregation on wrong input MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A non-integer changes the aggregation mode. Therefore this patch changes the behaviour to explicitly check strict_strtoul()'s return code. Signed-off-by: Linus Lüssing Acked-by: Simon Wunderlich Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/proc.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/batman-adv/proc.c b/drivers/staging/batman-adv/proc.c index 4d199351c2b4..68c36b097a07 100644 --- a/drivers/staging/batman-adv/proc.c +++ b/drivers/staging/batman-adv/proc.c @@ -427,6 +427,7 @@ static ssize_t proc_aggr_write(struct file *file, const char __user *buffer, char *aggr_string; int not_copied = 0; unsigned long aggregation_enabled_tmp; + int retval; aggr_string = kmalloc(count, GFP_KERNEL); @@ -436,22 +437,21 @@ static ssize_t proc_aggr_write(struct file *file, const char __user *buffer, not_copied = copy_from_user(aggr_string, buffer, count); aggr_string[count - not_copied - 1] = 0; - strict_strtoul(aggr_string, 10, &aggregation_enabled_tmp); + retval = strict_strtoul(aggr_string, 10, &aggregation_enabled_tmp); - if ((aggregation_enabled_tmp != 0) && (aggregation_enabled_tmp != 1)) { + if (retval || aggregation_enabled_tmp > 1) { printk(KERN_ERR "batman-adv:Aggregation can only be enabled (1) or disabled (0), given value: %li\n", aggregation_enabled_tmp); - goto end; + } else { + printk(KERN_INFO "batman-adv:Changing aggregation from: %s (%i) to: %s (%li)\n", + (atomic_read(&aggregation_enabled) == 1 ? + "enabled" : "disabled"), + atomic_read(&aggregation_enabled), + (aggregation_enabled_tmp == 1 ? "enabled" : "disabled"), + aggregation_enabled_tmp); + atomic_set(&aggregation_enabled, + (unsigned)aggregation_enabled_tmp); } - printk(KERN_INFO "batman-adv:Changing aggregation from: %s (%i) to: %s (%li)\n", - (atomic_read(&aggregation_enabled) == 1 ? - "enabled" : "disabled"), - atomic_read(&aggregation_enabled), - (aggregation_enabled_tmp == 1 ? "enabled" : "disabled"), - aggregation_enabled_tmp); - - atomic_set(&aggregation_enabled, (unsigned)aggregation_enabled_tmp); -end: kfree(aggr_string); return count; } From 65e65a3e73b31c097e59c6e8d4a9ed1eebbe9d8d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 8 Jan 2010 10:20:27 -0800 Subject: [PATCH 089/367] Staging: hv: remove unneeded OnHostRescan callback This callback was never called, so delete the thing. Cc: Hank Janssen Cc: Haiyang Zhang . Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/StorVscApi.h | 3 --- drivers/staging/hv/storvsc_drv.c | 1 - 2 files changed, 4 deletions(-) diff --git a/drivers/staging/hv/StorVscApi.h b/drivers/staging/hv/StorVscApi.h index 69c14066c479..1aca24e65035 100644 --- a/drivers/staging/hv/StorVscApi.h +++ b/drivers/staging/hv/StorVscApi.h @@ -91,9 +91,6 @@ struct storvsc_driver_object { /* Maximum # of requests in flight per channel/device */ u32 MaxOutstandingRequestsPerChannel; - /* Set by the caller to allow us to re-enumerate the bus on the host */ - void (*OnHostRescan)(struct hv_device *Device); - /* Specific to this driver */ int (*OnIORequest)(struct hv_device *Device, struct hv_storvsc_request *Request); diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c index d49dc21d4cb4..c3839626aeda 100644 --- a/drivers/staging/hv/storvsc_drv.c +++ b/drivers/staging/hv/storvsc_drv.c @@ -148,7 +148,6 @@ static int storvsc_drv_init(int (*drv_init)(struct hv_driver *drv)) vmbus_get_interface(&storvsc_drv_obj->Base.VmbusChannelInterface); storvsc_drv_obj->RingBufferSize = storvsc_ringbuffer_size; - storvsc_drv_obj->OnHostRescan = storvsc_host_rescan; /* Callback to client driver to complete the initialization */ drv_init(&storvsc_drv_obj->Base); From 99358ca725513de0a97971eb019d4a5544d83760 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 8 Jan 2010 10:21:58 -0800 Subject: [PATCH 090/367] Staging: hv: storvsc_drv: move unused functions Now that the callback pointer was removed, we can remove the code itself, as it is never used. Cc: Hank Janssen Cc: Haiyang Zhang . Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/storvsc_drv.c | 204 ------------------------------- 1 file changed, 204 deletions(-) diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c index c3839626aeda..56c911e7ade5 100644 --- a/drivers/staging/hv/storvsc_drv.c +++ b/drivers/staging/hv/storvsc_drv.c @@ -39,8 +39,6 @@ struct host_device_context { /* must be 1st field * FIXME this is a bug */ - struct work_struct host_rescan_work; - /* point back to our device context */ struct device_context *device_ctx; struct kmem_cache *request_pool; @@ -77,8 +75,6 @@ static int storvsc_queuecommand(struct scsi_cmnd *scmnd, static int storvsc_device_alloc(struct scsi_device *); static int storvsc_device_configure(struct scsi_device *); static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd); -static void storvsc_host_rescan_callback(struct work_struct *work); -static void storvsc_host_rescan(struct hv_device *device_obj); static int storvsc_remove(struct device *dev); static struct scatterlist *create_bounce_buffer(struct scatterlist *sgl, @@ -94,8 +90,6 @@ static unsigned int copy_to_bounce_buffer(struct scatterlist *orig_sgl, struct scatterlist *bounce_sgl, unsigned int orig_sgl_count); -static int storvsc_report_luns(struct scsi_device *sdev, unsigned int luns[], - unsigned int *lun_count); static int storvsc_get_chs(struct scsi_device *sdev, struct block_device *bdev, sector_t capacity, int *info); @@ -265,9 +259,6 @@ static int storvsc_probe(struct device *device) host_device_ctx->port = host->host_no; host_device_ctx->device_ctx = device_ctx; - INIT_WORK(&host_device_ctx->host_rescan_work, - storvsc_host_rescan_callback); - host_device_ctx->request_pool = kmem_cache_create(dev_name(&device_ctx->device), sizeof(struct storvsc_cmd_request) + @@ -908,201 +899,6 @@ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd) return ret; } -/** - * storvsc_host_rescan - Rescan the scsi HBA - */ -static void storvsc_host_rescan_callback(struct work_struct *work) -{ - struct hv_device *device_obj = - &((struct host_device_context *)work)->device_ctx->device_obj; - struct device_context *device_ctx = to_device_context(device_obj); - struct Scsi_Host *host = dev_get_drvdata(&device_ctx->device); - struct scsi_device *sdev; - struct host_device_context *host_device_ctx; - struct scsi_device **sdevs_remove_list; - unsigned int sdevs_count = 0; - unsigned int found; - unsigned int i; - unsigned int lun_count = 0; - unsigned int *lun_list; - - DPRINT_ENTER(STORVSC_DRV); - - host_device_ctx = (struct host_device_context *)host->hostdata; - lun_list = kcalloc(STORVSC_MAX_LUNS_PER_TARGET, sizeof(unsigned int), - GFP_ATOMIC); - if (!lun_list) { - DPRINT_ERR(STORVSC_DRV, "unable to allocate lun list"); - return; - } - - sdevs_remove_list = kcalloc(STORVSC_MAX_LUNS_PER_TARGET, - sizeof(void *), GFP_ATOMIC); - if (!sdevs_remove_list) { - kfree(lun_list); - DPRINT_ERR(STORVSC_DRV, "unable to allocate lun remove list"); - return; - } - - DPRINT_INFO(STORVSC_DRV, "rescanning host for new scsi devices..."); - - /* Rescan for new device */ - scsi_scan_target(&host->shost_gendev, host_device_ctx->path, - host_device_ctx->target, SCAN_WILD_CARD, 1); - - DPRINT_INFO(STORVSC_DRV, "rescanning host for removed scsi device..."); - - /* Use the 1st device to send the report luns cmd */ - shost_for_each_device(sdev, host) { - lun_count = STORVSC_MAX_LUNS_PER_TARGET; - storvsc_report_luns(sdev, lun_list, &lun_count); - - DPRINT_INFO(STORVSC_DRV, - "report luns on scsi device (%p) found %u luns ", - sdev, lun_count); - DPRINT_INFO(STORVSC_DRV, - "existing luns on scsi device (%p) host (%d)", - sdev, host->host_no); - - scsi_device_put(sdev); - break; - } - - for (i = 0; i < lun_count; i++) - DPRINT_INFO(STORVSC_DRV, "%d) lun %u", i, lun_list[i]); - - /* Rescan for devices that may have been removed. - * We do not have to worry that new devices may have been added since - * this callback is serialized by the workqueue ie add/remove are done - * here. - */ - shost_for_each_device(sdev, host) { - /* See if this device is still here */ - found = 0; - for (i = 0; i < lun_count; i++) { - if (sdev->lun == lun_list[i]) { - found = 1; - break; - } - } - if (!found) { - DPRINT_INFO(STORVSC_DRV, "lun (%u) does not exists", - sdev->lun); - sdevs_remove_list[sdevs_count++] = sdev; - } - } - - /* Now remove the devices */ - for (i = 0; i < sdevs_count; i++) { - DPRINT_INFO(STORVSC_DRV, - "removing scsi device (%p) lun (%u)...", - sdevs_remove_list[i], sdevs_remove_list[i]->lun); - - /* make sure it is not removed from underneath us */ - if (!scsi_device_get(sdevs_remove_list[i])) { - scsi_remove_device(sdevs_remove_list[i]); - scsi_device_put(sdevs_remove_list[i]); - } - } - - DPRINT_INFO(STORVSC_DRV, "rescan completed on dev obj (%p) " - "target (%u) bus (%u)", device_obj, - host_device_ctx->target, host_device_ctx->path); - - kfree(lun_list); - kfree(sdevs_remove_list); - - DPRINT_EXIT(STORVSC_DRV); -} - -static int storvsc_report_luns(struct scsi_device *sdev, unsigned int luns[], - unsigned int *lun_count) -{ - int i, j; - unsigned int lun = 0; - unsigned int num_luns; - int result; - unsigned char *data; - struct scsi_sense_hdr sshdr; - unsigned char cmd[16] = {0}; - /* Add 1 to cover the report_lun header */ - unsigned int report_len = 8 * (STORVSC_MAX_LUNS_PER_TARGET+1); - unsigned long long *report_luns; - const unsigned int in_lun_count = *lun_count; - - *lun_count = 0; - - report_luns = kzalloc(report_len, GFP_ATOMIC); - if (!report_luns) - return -ENOMEM; - - cmd[0] = REPORT_LUNS; - - /* cmd length */ - *(unsigned int *)&cmd[6] = cpu_to_be32(report_len); - - result = scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, - (unsigned char *)report_luns, report_len, - &sshdr, 30 * HZ, 3, NULL); - if (result != 0) { - kfree(report_luns); - return -EBUSY; - } - - /* get the length from the first four bytes */ - report_len = be32_to_cpu(*(unsigned int *)&report_luns[0]); - - num_luns = (report_len / sizeof(unsigned long long)); - if (num_luns > in_lun_count) { - kfree(report_luns); - return -EINVAL; - } - - *lun_count = num_luns; - - DPRINT_DBG(STORVSC_DRV, - "report luns on scsi device (%p) found %u luns ", - sdev, num_luns); - - /* lun id starts at 1 */ - for (i = 1; i < num_luns + 1; i++) { - lun = 0; - data = (unsigned char *)&report_luns[i]; - for (j = 0; j < sizeof(lun); j += 2) { - lun = lun | (((data[j] << 8) | data[j + 1]) << - (j * 8)); - } - - luns[i-1] = lun; - } - - kfree(report_luns); - return 0; -} - -static void storvsc_host_rescan(struct hv_device *device_obj) -{ - struct device_context *device_ctx = to_device_context(device_obj); - struct Scsi_Host *host = dev_get_drvdata(&device_ctx->device); - struct host_device_context *host_device_ctx; - - DPRINT_ENTER(STORVSC_DRV); - - host_device_ctx = (struct host_device_context *)host->hostdata; - - DPRINT_INFO(STORVSC_DRV, "initiating rescan on dev obj (%p) " - "target (%u) bus (%u)...", device_obj, - host_device_ctx->target, host_device_ctx->path); - - /* - * We need to queue this since the scanning may block and the caller - * may be in an intr context - */ - /* scsi_queue_work(host, &host_device_ctx->host_rescan_work); */ - schedule_work(&host_device_ctx->host_rescan_work); - DPRINT_EXIT(STORVSC_DRV); -} - static int storvsc_get_chs(struct scsi_device *sdev, struct block_device * bdev, sector_t capacity, int *info) { From 354b0a643e89dd3163278c9a0ac9cbcb9ef5c298 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 8 Jan 2010 10:24:26 -0800 Subject: [PATCH 091/367] Staging: hv: remove unneeded OnHostReset callback This callback only calls one function, so just call the function instead, no need for indirection at all. Cc: Hank Janssen Cc: Haiyang Zhang . Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/StorVsc.c | 3 +-- drivers/staging/hv/StorVscApi.h | 2 +- drivers/staging/hv/storvsc_drv.c | 10 +--------- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c index 2f7c425896f7..38ea1407f222 100644 --- a/drivers/staging/hv/StorVsc.c +++ b/drivers/staging/hv/StorVsc.c @@ -625,7 +625,7 @@ static int StorVscOnDeviceRemove(struct hv_device *Device) return 0; } -static int StorVscOnHostReset(struct hv_device *Device) +int StorVscOnHostReset(struct hv_device *Device) { struct storvsc_device *storDevice; struct storvsc_request_extension *request; @@ -842,7 +842,6 @@ int StorVscInitialize(struct hv_driver *Driver) storDriver->Base.OnCleanup = StorVscOnCleanup; storDriver->OnIORequest = StorVscOnIORequest; - storDriver->OnHostReset = StorVscOnHostReset; DPRINT_EXIT(STORVSC); diff --git a/drivers/staging/hv/StorVscApi.h b/drivers/staging/hv/StorVscApi.h index 1aca24e65035..126a8588edb1 100644 --- a/drivers/staging/hv/StorVscApi.h +++ b/drivers/staging/hv/StorVscApi.h @@ -94,7 +94,6 @@ struct storvsc_driver_object { /* Specific to this driver */ int (*OnIORequest)(struct hv_device *Device, struct hv_storvsc_request *Request); - int (*OnHostReset)(struct hv_device *Device); }; struct storvsc_device_info { @@ -105,6 +104,7 @@ struct storvsc_device_info { /* Interface */ int StorVscInitialize(struct hv_driver *driver); +int StorVscOnHostReset(struct hv_device *Device); int BlkVscInitialize(struct hv_driver *driver); #endif /* _STORVSC_API_H_ */ diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c index 56c911e7ade5..12f8f3f64c61 100644 --- a/drivers/staging/hv/storvsc_drv.c +++ b/drivers/staging/hv/storvsc_drv.c @@ -870,13 +870,6 @@ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd) struct host_device_context *host_device_ctx = (struct host_device_context *)scmnd->device->host->hostdata; struct device_context *device_ctx = host_device_ctx->device_ctx; - struct driver_context *driver_ctx = - driver_to_driver_context(device_ctx->device.driver); - struct storvsc_driver_context *storvsc_drv_ctx = - (struct storvsc_driver_context *)driver_ctx; - - struct storvsc_driver_object *storvsc_drv_obj = - &storvsc_drv_ctx->drv_obj; DPRINT_ENTER(STORVSC_DRV); @@ -884,8 +877,7 @@ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd) scmnd->device, &device_ctx->device_obj); /* Invokes the vsc to reset the host/bus */ - ASSERT(storvsc_drv_obj->OnHostReset); - ret = storvsc_drv_obj->OnHostReset(&device_ctx->device_obj); + ret = StorVscOnHostReset(&device_ctx->device_obj); if (ret != 0) { DPRINT_EXIT(STORVSC_DRV); return ret; From 2d0753464b497287565c2e54d3ae67666852ef57 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 8 Jan 2010 10:24:42 -0800 Subject: [PATCH 092/367] Staging: hv: remove unneeded OnOpen callback This callback only calls one function, so just call the function instead, no need for indirection at all. Cc: Hank Janssen Cc: Haiyang Zhang . Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/NetVscApi.h | 2 +- drivers/staging/hv/RndisFilter.c | 5 +---- drivers/staging/hv/netvsc_drv.c | 7 +------ 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/staging/hv/NetVscApi.h b/drivers/staging/hv/NetVscApi.h index 1ce2b74a34a7..93b9226ff3b5 100644 --- a/drivers/staging/hv/NetVscApi.h +++ b/drivers/staging/hv/NetVscApi.h @@ -105,7 +105,6 @@ struct netvsc_driver { void (*OnLinkStatusChanged)(struct hv_device *dev, u32 Status); /* Specific to this driver */ - int (*OnOpen)(struct hv_device *dev); int (*OnClose)(struct hv_device *dev); int (*OnSend)(struct hv_device *dev, struct hv_netvsc_packet *packet); @@ -119,5 +118,6 @@ struct netvsc_device_info { /* Interface */ int NetVscInitialize(struct hv_driver *drv); +int RndisFilterOnOpen(struct hv_device *Device); #endif /* _NETVSC_API_H_ */ diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c index 26d79975387c..74f741eb1296 100644 --- a/drivers/staging/hv/RndisFilter.c +++ b/drivers/staging/hv/RndisFilter.c @@ -85,8 +85,6 @@ static int RndisFilterOnDeviceRemove(struct hv_device *Device); static void RndisFilterOnCleanup(struct hv_driver *Driver); -static int RndisFilterOnOpen(struct hv_device *Device); - static int RndisFilterOnClose(struct hv_device *Device); static int RndisFilterOnSend(struct hv_device *Device, @@ -654,7 +652,6 @@ int RndisFilterInit(struct netvsc_driver *Driver) Driver->Base.OnDeviceRemove = RndisFilterOnDeviceRemove; Driver->Base.OnCleanup = RndisFilterOnCleanup; Driver->OnSend = RndisFilterOnSend; - Driver->OnOpen = RndisFilterOnOpen; Driver->OnClose = RndisFilterOnClose; /* Driver->QueryLinkStatus = RndisFilterQueryDeviceLinkStatus; */ Driver->OnReceiveCallback = RndisFilterOnReceive; @@ -888,7 +885,7 @@ static void RndisFilterOnCleanup(struct hv_driver *Driver) DPRINT_EXIT(NETVSC); } -static int RndisFilterOnOpen(struct hv_device *Device) +int RndisFilterOnOpen(struct hv_device *Device) { int ret; struct netvsc_device *netDevice = Device->Extension; diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c index 0d7459e2d036..515cd2361bf2 100644 --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c @@ -72,11 +72,6 @@ static void netvsc_set_multicast_list(struct net_device *net) static int netvsc_open(struct net_device *net) { struct net_device_context *net_device_ctx = netdev_priv(net); - struct driver_context *driver_ctx = - driver_to_driver_context(net_device_ctx->device_ctx->device.driver); - struct netvsc_driver_context *net_drv_ctx = - (struct netvsc_driver_context *)driver_ctx; - struct netvsc_driver *net_drv_obj = &net_drv_ctx->drv_obj; struct hv_device *device_obj = &net_device_ctx->device_ctx->device_obj; int ret = 0; @@ -87,7 +82,7 @@ static int netvsc_open(struct net_device *net) sizeof(struct net_device_stats)); /* Open up the device */ - ret = net_drv_obj->OnOpen(device_obj); + ret = RndisFilterOnOpen(device_obj); if (ret != 0) { DPRINT_ERR(NETVSC_DRV, "unable to open device (ret %d).", ret); From 4f28900bcf9bb5e6fb0c18fc7ee325df66fe8bbd Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 8 Jan 2010 10:25:01 -0800 Subject: [PATCH 093/367] Staging: hv: remove unneeded OnClose callback This callback only calls one function, so just call the function instead, no need for indirection at all. Cc: Hank Janssen Cc: Haiyang Zhang . Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/NetVscApi.h | 2 +- drivers/staging/hv/RndisFilter.c | 5 +---- drivers/staging/hv/netvsc_drv.c | 7 +------ 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/staging/hv/NetVscApi.h b/drivers/staging/hv/NetVscApi.h index 93b9226ff3b5..95d7a32b12f2 100644 --- a/drivers/staging/hv/NetVscApi.h +++ b/drivers/staging/hv/NetVscApi.h @@ -105,7 +105,6 @@ struct netvsc_driver { void (*OnLinkStatusChanged)(struct hv_device *dev, u32 Status); /* Specific to this driver */ - int (*OnClose)(struct hv_device *dev); int (*OnSend)(struct hv_device *dev, struct hv_netvsc_packet *packet); void *Context; @@ -119,5 +118,6 @@ struct netvsc_device_info { /* Interface */ int NetVscInitialize(struct hv_driver *drv); int RndisFilterOnOpen(struct hv_device *Device); +int RndisFilterOnClose(struct hv_device *Device); #endif /* _NETVSC_API_H_ */ diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c index 74f741eb1296..1ab7fa97d373 100644 --- a/drivers/staging/hv/RndisFilter.c +++ b/drivers/staging/hv/RndisFilter.c @@ -85,8 +85,6 @@ static int RndisFilterOnDeviceRemove(struct hv_device *Device); static void RndisFilterOnCleanup(struct hv_driver *Driver); -static int RndisFilterOnClose(struct hv_device *Device); - static int RndisFilterOnSend(struct hv_device *Device, struct hv_netvsc_packet *Packet); @@ -652,7 +650,6 @@ int RndisFilterInit(struct netvsc_driver *Driver) Driver->Base.OnDeviceRemove = RndisFilterOnDeviceRemove; Driver->Base.OnCleanup = RndisFilterOnCleanup; Driver->OnSend = RndisFilterOnSend; - Driver->OnClose = RndisFilterOnClose; /* Driver->QueryLinkStatus = RndisFilterQueryDeviceLinkStatus; */ Driver->OnReceiveCallback = RndisFilterOnReceive; @@ -900,7 +897,7 @@ int RndisFilterOnOpen(struct hv_device *Device) return ret; } -static int RndisFilterOnClose(struct hv_device *Device) +int RndisFilterOnClose(struct hv_device *Device) { int ret; struct netvsc_device *netDevice = Device->Extension; diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c index 515cd2361bf2..3234a7c4a429 100644 --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c @@ -101,11 +101,6 @@ static int netvsc_open(struct net_device *net) static int netvsc_close(struct net_device *net) { struct net_device_context *net_device_ctx = netdev_priv(net); - struct driver_context *driver_ctx = - driver_to_driver_context(net_device_ctx->device_ctx->device.driver); - struct netvsc_driver_context *net_drv_ctx = - (struct netvsc_driver_context *)driver_ctx; - struct netvsc_driver *net_drv_obj = &net_drv_ctx->drv_obj; struct hv_device *device_obj = &net_device_ctx->device_ctx->device_obj; int ret; @@ -113,7 +108,7 @@ static int netvsc_close(struct net_device *net) netif_stop_queue(net); - ret = net_drv_obj->OnClose(device_obj); + ret = RndisFilterOnClose(device_obj); if (ret != 0) DPRINT_ERR(NETVSC_DRV, "unable to close device (ret %d).", ret); From a73e6b7c508f610eeb315c443d9ac79041124af0 Mon Sep 17 00:00:00 2001 From: Hank Janssen Date: Fri, 22 Jan 2010 19:17:50 +0000 Subject: [PATCH 094/367] Staging: hv: Remove xen legacy code and check for Hyper-V Removed legacy XEN layer from hypervisor setup, and made sure only Hyper-V is Is a valid hypervisor to run on. Signed-off-by: Hank Janssen Cc: Haiyang Zhang . Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/Hv.c | 223 ++++++++++++++++------------------------ drivers/staging/hv/Hv.h | 10 +- 2 files changed, 93 insertions(+), 140 deletions(-) diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c index c2809f2a2ce0..51149e69f3e8 100644 --- a/drivers/staging/hv/Hv.c +++ b/drivers/staging/hv/Hv.c @@ -208,50 +208,51 @@ int HvInit(void) /* HvQueryHypervisorFeatures(maxLeaf); */ /* - * Determine if we are running on xenlinux (ie x2v shim) or native - * linux + * We only support running on top of Hyper-V */ rdmsrl(HV_X64_MSR_GUEST_OS_ID, gHvContext.GuestId); - if (gHvContext.GuestId == 0) { - /* Write our OS info */ - wrmsrl(HV_X64_MSR_GUEST_OS_ID, HV_LINUX_GUEST_ID); - gHvContext.GuestId = HV_LINUX_GUEST_ID; - } - /* See if the hypercall page is already set */ - rdmsrl(HV_X64_MSR_HYPERCALL, hypercallMsr.AsUINT64); - if (gHvContext.GuestId == HV_LINUX_GUEST_ID) { - /* Allocate the hypercall page memory */ - /* virtAddr = osd_PageAlloc(1); */ - virtAddr = osd_VirtualAllocExec(PAGE_SIZE); - - if (!virtAddr) { - DPRINT_ERR(VMBUS, - "unable to allocate hypercall page!!"); - goto Cleanup; - } - - hypercallMsr.Enable = 1; - /* hypercallMsr.GuestPhysicalAddress = - * virt_to_phys(virtAddr) >> PAGE_SHIFT; */ - hypercallMsr.GuestPhysicalAddress = vmalloc_to_pfn(virtAddr); - wrmsrl(HV_X64_MSR_HYPERCALL, hypercallMsr.AsUINT64); - - /* Confirm that hypercall page did get setup. */ - hypercallMsr.AsUINT64 = 0; - rdmsrl(HV_X64_MSR_HYPERCALL, hypercallMsr.AsUINT64); - if (!hypercallMsr.Enable) { - DPRINT_ERR(VMBUS, "unable to set hypercall page!!"); - goto Cleanup; - } - - gHvContext.HypercallPage = virtAddr; - } else { + if (gHvContext.GuestId != 0) { DPRINT_ERR(VMBUS, "Unknown guest id (0x%llx)!!", gHvContext.GuestId); goto Cleanup; } + /* Write our OS info */ + wrmsrl(HV_X64_MSR_GUEST_OS_ID, HV_LINUX_GUEST_ID); + gHvContext.GuestId = HV_LINUX_GUEST_ID; + + /* See if the hypercall page is already set */ + rdmsrl(HV_X64_MSR_HYPERCALL, hypercallMsr.AsUINT64); + + /* + * Allocate the hypercall page memory + * virtAddr = osd_PageAlloc(1); + */ + virtAddr = osd_VirtualAllocExec(PAGE_SIZE); + + if (!virtAddr) { + DPRINT_ERR(VMBUS, + "unable to allocate hypercall page!!"); + goto Cleanup; + } + + hypercallMsr.Enable = 1; + + hypercallMsr.GuestPhysicalAddress = vmalloc_to_pfn(virtAddr); + wrmsrl(HV_X64_MSR_HYPERCALL, hypercallMsr.AsUINT64); + + /* Confirm that hypercall page did get setup. */ + hypercallMsr.AsUINT64 = 0; + rdmsrl(HV_X64_MSR_HYPERCALL, hypercallMsr.AsUINT64); + + if (!hypercallMsr.Enable) { + DPRINT_ERR(VMBUS, "unable to set hypercall page!!"); + goto Cleanup; + } + + gHvContext.HypercallPage = virtAddr; + DPRINT_INFO(VMBUS, "Hypercall page VA=%p, PA=0x%0llx", gHvContext.HypercallPage, (u64)hypercallMsr.GuestPhysicalAddress << PAGE_SHIFT); @@ -273,8 +274,6 @@ int HvInit(void) gHvContext.SignalEventParam->FlagNumber = 0; gHvContext.SignalEventParam->RsvdZ = 0; - /* DPRINT_DBG(VMBUS, "My id %llu", HvGetCurrentPartitionId()); */ - DPRINT_EXIT(VMBUS); return ret; @@ -311,17 +310,14 @@ void HvCleanup(void) kfree(gHvContext.SignalEventBuffer); } - if (gHvContext.GuestId == HV_LINUX_GUEST_ID) { - if (gHvContext.HypercallPage) { - hypercallMsr.AsUINT64 = 0; - wrmsrl(HV_X64_MSR_HYPERCALL, hypercallMsr.AsUINT64); - vfree(gHvContext.HypercallPage); - gHvContext.HypercallPage = NULL; - } + if (gHvContext.HypercallPage) { + hypercallMsr.AsUINT64 = 0; + wrmsrl(HV_X64_MSR_HYPERCALL, hypercallMsr.AsUINT64); + vfree(gHvContext.HypercallPage); + gHvContext.HypercallPage = NULL; } DPRINT_EXIT(VMBUS); - } /** @@ -393,7 +389,7 @@ void HvSynicInit(void *irqarg) union hv_synic_siefp siefp; union hv_synic_sint sharedSint; union hv_synic_scontrol sctrl; - u64 guestID; + u32 irqVector = *((u32 *)(irqarg)); int cpu = smp_processor_id(); @@ -409,72 +405,42 @@ void HvSynicInit(void *irqarg) DPRINT_INFO(VMBUS, "SynIC version: %llx", version); - /* TODO: Handle SMP */ - if (gHvContext.GuestId == HV_XENLINUX_GUEST_ID) { - DPRINT_INFO(VMBUS, "Skipping SIMP and SIEFP setup since " - "it is already set."); + gHvContext.synICMessagePage[cpu] = (void *)get_zeroed_page(GFP_ATOMIC); - rdmsrl(HV_X64_MSR_SIMP, simp.AsUINT64); - rdmsrl(HV_X64_MSR_SIEFP, siefp.AsUINT64); - - DPRINT_DBG(VMBUS, "Simp: %llx, Sifep: %llx", - simp.AsUINT64, siefp.AsUINT64); - - /* - * Determine if we are running on xenlinux (ie x2v shim) or - * native linux - */ - rdmsrl(HV_X64_MSR_GUEST_OS_ID, guestID); - if (guestID == HV_LINUX_GUEST_ID) { - gHvContext.synICMessagePage[cpu] = - phys_to_virt(simp.BaseSimpGpa << PAGE_SHIFT); - gHvContext.synICEventPage[cpu] = - phys_to_virt(siefp.BaseSiefpGpa << PAGE_SHIFT); - } else { - DPRINT_ERR(VMBUS, "unknown guest id!!"); - goto Cleanup; - } - DPRINT_DBG(VMBUS, "MAPPED: Simp: %p, Sifep: %p", - gHvContext.synICMessagePage[cpu], - gHvContext.synICEventPage[cpu]); - } else { - gHvContext.synICMessagePage[cpu] = (void *)get_zeroed_page(GFP_ATOMIC); - if (gHvContext.synICMessagePage[cpu] == NULL) { - DPRINT_ERR(VMBUS, - "unable to allocate SYNIC message page!!"); - goto Cleanup; - } - - gHvContext.synICEventPage[cpu] = (void *)get_zeroed_page(GFP_ATOMIC); - if (gHvContext.synICEventPage[cpu] == NULL) { - DPRINT_ERR(VMBUS, - "unable to allocate SYNIC event page!!"); - goto Cleanup; - } - - /* Setup the Synic's message page */ - rdmsrl(HV_X64_MSR_SIMP, simp.AsUINT64); - simp.SimpEnabled = 1; - simp.BaseSimpGpa = virt_to_phys(gHvContext.synICMessagePage[cpu]) - >> PAGE_SHIFT; - - DPRINT_DBG(VMBUS, "HV_X64_MSR_SIMP msr set to: %llx", - simp.AsUINT64); - - wrmsrl(HV_X64_MSR_SIMP, simp.AsUINT64); - - /* Setup the Synic's event page */ - rdmsrl(HV_X64_MSR_SIEFP, siefp.AsUINT64); - siefp.SiefpEnabled = 1; - siefp.BaseSiefpGpa = virt_to_phys(gHvContext.synICEventPage[cpu]) - >> PAGE_SHIFT; - - DPRINT_DBG(VMBUS, "HV_X64_MSR_SIEFP msr set to: %llx", - siefp.AsUINT64); - - wrmsrl(HV_X64_MSR_SIEFP, siefp.AsUINT64); + if (gHvContext.synICMessagePage[cpu] == NULL) { + DPRINT_ERR(VMBUS, + "unable to allocate SYNIC message page!!"); + goto Cleanup; } + gHvContext.synICEventPage[cpu] = (void *)get_zeroed_page(GFP_ATOMIC); + + if (gHvContext.synICEventPage[cpu] == NULL) { + DPRINT_ERR(VMBUS, + "unable to allocate SYNIC event page!!"); + goto Cleanup; + } + + /* Setup the Synic's message page */ + rdmsrl(HV_X64_MSR_SIMP, simp.AsUINT64); + simp.SimpEnabled = 1; + simp.BaseSimpGpa = virt_to_phys(gHvContext.synICMessagePage[cpu]) + >> PAGE_SHIFT; + + DPRINT_DBG(VMBUS, "HV_X64_MSR_SIMP msr set to: %llx", simp.AsUINT64); + + wrmsrl(HV_X64_MSR_SIMP, simp.AsUINT64); + + /* Setup the Synic's event page */ + rdmsrl(HV_X64_MSR_SIEFP, siefp.AsUINT64); + siefp.SiefpEnabled = 1; + siefp.BaseSiefpGpa = virt_to_phys(gHvContext.synICEventPage[cpu]) + >> PAGE_SHIFT; + + DPRINT_DBG(VMBUS, "HV_X64_MSR_SIEFP msr set to: %llx", siefp.AsUINT64); + + wrmsrl(HV_X64_MSR_SIEFP, siefp.AsUINT64); + /* Setup the interception SINT. */ /* wrmsrl((HV_X64_MSR_SINT0 + HV_SYNIC_INTERCEPTION_SINT_INDEX), */ /* interceptionSint.AsUINT64); */ @@ -505,13 +471,11 @@ void HvSynicInit(void *irqarg) return; Cleanup: - if (gHvContext.GuestId == HV_LINUX_GUEST_ID) { - if (gHvContext.synICEventPage[cpu]) - osd_PageFree(gHvContext.synICEventPage[cpu], 1); + if (gHvContext.synICEventPage[cpu]) + osd_PageFree(gHvContext.synICEventPage[cpu], 1); - if (gHvContext.synICMessagePage[cpu]) - osd_PageFree(gHvContext.synICMessagePage[cpu], 1); - } + if (gHvContext.synICMessagePage[cpu]) + osd_PageFree(gHvContext.synICMessagePage[cpu], 1); DPRINT_EXIT(VMBUS); return; @@ -542,27 +506,20 @@ void HvSynicCleanup(void *arg) /* Disable the interrupt */ wrmsrl(HV_X64_MSR_SINT0 + VMBUS_MESSAGE_SINT, sharedSint.AsUINT64); - /* - * Disable and free the resources only if we are running as - * native linux since in xenlinux, we are sharing the - * resources with the x2v shim - */ - if (gHvContext.GuestId == HV_LINUX_GUEST_ID) { - rdmsrl(HV_X64_MSR_SIMP, simp.AsUINT64); - simp.SimpEnabled = 0; - simp.BaseSimpGpa = 0; + rdmsrl(HV_X64_MSR_SIMP, simp.AsUINT64); + simp.SimpEnabled = 0; + simp.BaseSimpGpa = 0; - wrmsrl(HV_X64_MSR_SIMP, simp.AsUINT64); + wrmsrl(HV_X64_MSR_SIMP, simp.AsUINT64); - rdmsrl(HV_X64_MSR_SIEFP, siefp.AsUINT64); - siefp.SiefpEnabled = 0; - siefp.BaseSiefpGpa = 0; + rdmsrl(HV_X64_MSR_SIEFP, siefp.AsUINT64); + siefp.SiefpEnabled = 0; + siefp.BaseSiefpGpa = 0; - wrmsrl(HV_X64_MSR_SIEFP, siefp.AsUINT64); + wrmsrl(HV_X64_MSR_SIEFP, siefp.AsUINT64); - osd_PageFree(gHvContext.synICMessagePage[cpu], 1); - osd_PageFree(gHvContext.synICEventPage[cpu], 1); - } + osd_PageFree(gHvContext.synICMessagePage[cpu], 1); + osd_PageFree(gHvContext.synICEventPage[cpu], 1); DPRINT_EXIT(VMBUS); } diff --git a/drivers/staging/hv/Hv.h b/drivers/staging/hv/Hv.h index fce4b5cdac30..41f5ebb86e17 100644 --- a/drivers/staging/hv/Hv.h +++ b/drivers/staging/hv/Hv.h @@ -41,11 +41,6 @@ enum { #define HV_PRESENT_BIT 0x80000000 -#define HV_XENLINUX_GUEST_ID_LO 0x00000000 -#define HV_XENLINUX_GUEST_ID_HI 0x0B00B135 -#define HV_XENLINUX_GUEST_ID (((u64)HV_XENLINUX_GUEST_ID_HI << 32) \ - | HV_XENLINUX_GUEST_ID_LO) - #define HV_LINUX_GUEST_ID_LO 0x00000000 #define HV_LINUX_GUEST_ID_HI 0xB16B00B5 #define HV_LINUX_GUEST_ID (((u64)HV_LINUX_GUEST_ID_HI << 32) | \ @@ -102,8 +97,9 @@ struct hv_input_signal_event_buffer { }; struct hv_context { - /* XenLinux or native Linux. If XenLinux, the hypercall and synic pages - * has already been initialized */ + /* We only support running on top of Hyper-V + * So at this point this really can only contain the Hyper-V ID + */ u64 GuestId; void *HypercallPage; From 4408f5319b6c8784120e0784df315b87e8a5dfef Mon Sep 17 00:00:00 2001 From: "C. Bartlett" Date: Wed, 3 Feb 2010 15:34:27 +0000 Subject: [PATCH 095/367] Staging: hv: fix various coding style issues in RingBuffer.c This is a patch to the RingBuffer.c file that corrects various coding style warnings and errors found by checkpatch.pl [ The real solution here is to get rid of this file entirely, and use the kernel's internal ring buffer api, but until then, make these changes so as to make checkpatch.pl happy, and keep others from continuously sending this type of patch. - gkh] Signed-off-by: Craig Bartlett Cc: Bill Pemberton Cc: Nicolas Palix Cc: Hank Janssen Cc: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/RingBuffer.c | 153 ++++++++++++++++++-------------- 1 file changed, 86 insertions(+), 67 deletions(-) diff --git a/drivers/staging/hv/RingBuffer.c b/drivers/staging/hv/RingBuffer.c index f69ae33a91e3..80b8a2c7784f 100644 --- a/drivers/staging/hv/RingBuffer.c +++ b/drivers/staging/hv/RingBuffer.c @@ -48,7 +48,7 @@ Description: static inline void GetRingBufferAvailBytes(RING_BUFFER_INFO *rbi, u32 *read, u32 *write) { - u32 read_loc,write_loc; + u32 read_loc, write_loc; /* Capture the read/write indices before they changed */ read_loc = rbi->RingBuffer->ReadIndex; @@ -68,7 +68,7 @@ Description: --*/ static inline u32 -GetNextWriteLocation(RING_BUFFER_INFO* RingInfo) +GetNextWriteLocation(RING_BUFFER_INFO *RingInfo) { u32 next = RingInfo->RingBuffer->WriteIndex; @@ -87,7 +87,7 @@ Description: --*/ static inline void -SetNextWriteLocation(RING_BUFFER_INFO* RingInfo, u32 NextWriteLocation) +SetNextWriteLocation(RING_BUFFER_INFO *RingInfo, u32 NextWriteLocation) { RingInfo->RingBuffer->WriteIndex = NextWriteLocation; } @@ -102,7 +102,7 @@ Description: --*/ static inline u32 -GetNextReadLocation(RING_BUFFER_INFO* RingInfo) +GetNextReadLocation(RING_BUFFER_INFO *RingInfo) { u32 next = RingInfo->RingBuffer->ReadIndex; @@ -122,7 +122,7 @@ Description: --*/ static inline u32 -GetNextReadLocationWithOffset(RING_BUFFER_INFO* RingInfo, u32 Offset) +GetNextReadLocationWithOffset(RING_BUFFER_INFO *RingInfo, u32 Offset) { u32 next = RingInfo->RingBuffer->ReadIndex; @@ -143,7 +143,7 @@ Description: --*/ static inline void -SetNextReadLocation(RING_BUFFER_INFO* RingInfo, u32 NextReadLocation) +SetNextReadLocation(RING_BUFFER_INFO *RingInfo, u32 NextReadLocation) { RingInfo->RingBuffer->ReadIndex = NextReadLocation; } @@ -159,7 +159,7 @@ Description: --*/ static inline void * -GetRingBuffer(RING_BUFFER_INFO* RingInfo) +GetRingBuffer(RING_BUFFER_INFO *RingInfo) { return (void *)RingInfo->RingBuffer->Buffer; } @@ -175,7 +175,7 @@ Description: --*/ static inline u32 -GetRingBufferSize(RING_BUFFER_INFO* RingInfo) +GetRingBufferSize(RING_BUFFER_INFO *RingInfo) { return RingInfo->RingDataSize; } @@ -190,9 +190,10 @@ Description: --*/ static inline u64 -GetRingBufferIndices(RING_BUFFER_INFO* RingInfo) +GetRingBufferIndices(RING_BUFFER_INFO *RingInfo) { - return ((u64)RingInfo->RingBuffer->WriteIndex << 32) || RingInfo->RingBuffer->ReadIndex; + return ((u64)RingInfo->RingBuffer->WriteIndex << 32) + || RingInfo->RingBuffer->ReadIndex; } @@ -210,9 +211,14 @@ void DumpRingInfo(RING_BUFFER_INFO *RingInfo, char *Prefix) u32 bytesAvailToWrite; u32 bytesAvailToRead; - GetRingBufferAvailBytes(RingInfo, &bytesAvailToRead, &bytesAvailToWrite); + GetRingBufferAvailBytes(RingInfo, + &bytesAvailToRead, + &bytesAvailToWrite); - DPRINT(VMBUS, DEBUG_RING_LVL, "%s <>", + DPRINT(VMBUS, + DEBUG_RING_LVL, + "%s <>", Prefix, RingInfo, RingInfo->RingBuffer->Buffer, @@ -229,13 +235,13 @@ static u32 CopyToRingBuffer( RING_BUFFER_INFO *RingInfo, u32 StartWriteOffset, - void * Src, + void *Src, u32 SrcLen); static u32 CopyFromRingBuffer( RING_BUFFER_INFO *RingInfo, - void * Dest, + void *Dest, u32 DestLen, u32 StartReadOffset); @@ -256,15 +262,15 @@ void RingBufferGetDebugInfo(RING_BUFFER_INFO *RingInfo, u32 bytesAvailToWrite; u32 bytesAvailToRead; - if (RingInfo->RingBuffer) - { - GetRingBufferAvailBytes(RingInfo, &bytesAvailToRead, &bytesAvailToWrite); + if (RingInfo->RingBuffer) { + GetRingBufferAvailBytes(RingInfo, + &bytesAvailToRead, + &bytesAvailToWrite); DebugInfo->BytesAvailToRead = bytesAvailToRead; DebugInfo->BytesAvailToWrite = bytesAvailToWrite; DebugInfo->CurrentReadIndex = RingInfo->RingBuffer->ReadIndex; DebugInfo->CurrentWriteIndex = RingInfo->RingBuffer->WriteIndex; - DebugInfo->CurrentInterruptMask = RingInfo->RingBuffer->InterruptMask; } } @@ -299,7 +305,7 @@ int RingBufferInit(RING_BUFFER_INFO *RingInfo, void *Buffer, u32 BufferLen) memset(RingInfo, 0, sizeof(RING_BUFFER_INFO)); - RingInfo->RingBuffer = (RING_BUFFER*)Buffer; + RingInfo->RingBuffer = (RING_BUFFER *)Buffer; RingInfo->RingBuffer->ReadIndex = RingInfo->RingBuffer->WriteIndex = 0; RingInfo->RingSize = BufferLen; @@ -319,7 +325,7 @@ Description: Cleanup the ring buffer --*/ -void RingBufferCleanup(RING_BUFFER_INFO* RingInfo) +void RingBufferCleanup(RING_BUFFER_INFO *RingInfo) { } @@ -335,14 +341,14 @@ Description: int RingBufferWrite(RING_BUFFER_INFO *OutRingInfo, struct scatterlist *sglist, u32 sgcount) { - int i=0; + int i = 0; u32 byteAvailToWrite; u32 byteAvailToRead; - u32 totalBytesToWrite=0; + u32 totalBytesToWrite = 0; struct scatterlist *sg; volatile u32 nextWriteLocation; - u64 prevIndices=0; + u64 prevIndices = 0; unsigned long flags; DPRINT_ENTER(VMBUS); @@ -356,17 +362,23 @@ int RingBufferWrite(RING_BUFFER_INFO *OutRingInfo, spin_lock_irqsave(&OutRingInfo->ring_lock, flags); - GetRingBufferAvailBytes(OutRingInfo, &byteAvailToRead, &byteAvailToWrite); + GetRingBufferAvailBytes(OutRingInfo, + &byteAvailToRead, + &byteAvailToWrite); DPRINT_DBG(VMBUS, "Writing %u bytes...", totalBytesToWrite); /* DumpRingInfo(OutRingInfo, "BEFORE "); */ - /* If there is only room for the packet, assume it is full. Otherwise, the next time around, we think the ring buffer */ + /* If there is only room for the packet, assume it is full. */ + /* Otherwise, the next time around, we think the ring buffer */ /* is empty since the read index == write index */ - if (byteAvailToWrite <= totalBytesToWrite) - { - DPRINT_DBG(VMBUS, "No more space left on outbound ring buffer (needed %u, avail %u)", totalBytesToWrite, byteAvailToWrite); + if (byteAvailToWrite <= totalBytesToWrite) { + DPRINT_DBG(VMBUS, + "No more space left on outbound ring buffer " + "(needed %u, avail %u)", + totalBytesToWrite, + byteAvailToWrite); spin_unlock_irqrestore(&OutRingInfo->ring_lock, flags); @@ -423,17 +435,22 @@ int RingBufferPeek(RING_BUFFER_INFO *InRingInfo, void *Buffer, u32 BufferLen) { u32 bytesAvailToWrite; u32 bytesAvailToRead; - u32 nextReadLocation=0; + u32 nextReadLocation = 0; unsigned long flags; spin_lock_irqsave(&InRingInfo->ring_lock, flags); - GetRingBufferAvailBytes(InRingInfo, &bytesAvailToRead, &bytesAvailToWrite); + GetRingBufferAvailBytes(InRingInfo, + &bytesAvailToRead, + &bytesAvailToWrite); /* Make sure there is something to read */ - if (bytesAvailToRead < BufferLen ) - { - /* DPRINT_DBG(VMBUS, "got callback but not enough to read !!", bytesAvailToRead, BufferLen); */ + if (bytesAvailToRead < BufferLen) { + /* DPRINT_DBG(VMBUS, + "got callback but not enough to read " + "!!", + bytesAvailToRead, + BufferLen); */ spin_unlock_irqrestore(&InRingInfo->ring_lock, flags); @@ -444,9 +461,9 @@ int RingBufferPeek(RING_BUFFER_INFO *InRingInfo, void *Buffer, u32 BufferLen) nextReadLocation = GetNextReadLocation(InRingInfo); nextReadLocation = CopyFromRingBuffer(InRingInfo, - Buffer, - BufferLen, - nextReadLocation); + Buffer, + BufferLen, + nextReadLocation); spin_unlock_irqrestore(&InRingInfo->ring_lock, flags); @@ -468,24 +485,29 @@ int RingBufferRead(RING_BUFFER_INFO *InRingInfo, void *Buffer, { u32 bytesAvailToWrite; u32 bytesAvailToRead; - u32 nextReadLocation=0; - u64 prevIndices=0; + u32 nextReadLocation = 0; + u64 prevIndices = 0; unsigned long flags; ASSERT(BufferLen > 0); spin_lock_irqsave(&InRingInfo->ring_lock, flags); - GetRingBufferAvailBytes(InRingInfo, &bytesAvailToRead, &bytesAvailToWrite); + GetRingBufferAvailBytes(InRingInfo, + &bytesAvailToRead, + &bytesAvailToWrite); DPRINT_DBG(VMBUS, "Reading %u bytes...", BufferLen); /* DumpRingInfo(InRingInfo, "BEFORE "); */ /* Make sure there is something to read */ - if (bytesAvailToRead < BufferLen ) - { - DPRINT_DBG(VMBUS, "got callback but not enough to read !!", bytesAvailToRead, BufferLen); + if (bytesAvailToRead < BufferLen) { + DPRINT_DBG(VMBUS, + "got callback but not enough to read " + "!!", + bytesAvailToRead, + BufferLen); spin_unlock_irqrestore(&InRingInfo->ring_lock, flags); @@ -495,17 +517,18 @@ int RingBufferRead(RING_BUFFER_INFO *InRingInfo, void *Buffer, nextReadLocation = GetNextReadLocationWithOffset(InRingInfo, Offset); nextReadLocation = CopyFromRingBuffer(InRingInfo, - Buffer, - BufferLen, - nextReadLocation); + Buffer, + BufferLen, + nextReadLocation); nextReadLocation = CopyFromRingBuffer(InRingInfo, - &prevIndices, - sizeof(u64), - nextReadLocation); + &prevIndices, + sizeof(u64), + nextReadLocation); /* Make sure all reads are done before we update the read index since */ - /* the writer may start writing to the read area once the read index is updated */ + /* the writer may start writing to the read area once the read index */ + /*is updated */ mb(); /* Update the read index */ @@ -533,25 +556,22 @@ static u32 CopyToRingBuffer( RING_BUFFER_INFO *RingInfo, u32 StartWriteOffset, - void * Src, + void *Src, u32 SrcLen) { - void * ringBuffer=GetRingBuffer(RingInfo); - u32 ringBufferSize=GetRingBufferSize(RingInfo); + void *ringBuffer = GetRingBuffer(RingInfo); + u32 ringBufferSize = GetRingBufferSize(RingInfo); u32 fragLen; - if (SrcLen > ringBufferSize - StartWriteOffset) /* wrap-around detected! */ - { + /* wrap-around detected! */ + if (SrcLen > ringBufferSize - StartWriteOffset) { DPRINT_DBG(VMBUS, "wrap-around detected!"); fragLen = ringBufferSize - StartWriteOffset; memcpy(ringBuffer + StartWriteOffset, Src, fragLen); memcpy(ringBuffer, Src + fragLen, SrcLen - fragLen); - } - else - { + } else memcpy(ringBuffer + StartWriteOffset, Src, SrcLen); - } StartWriteOffset += SrcLen; StartWriteOffset %= ringBufferSize; @@ -573,28 +593,27 @@ Description: static u32 CopyFromRingBuffer( RING_BUFFER_INFO *RingInfo, - void * Dest, + void *Dest, u32 DestLen, u32 StartReadOffset) { - void * ringBuffer=GetRingBuffer(RingInfo); - u32 ringBufferSize=GetRingBufferSize(RingInfo); + void *ringBuffer = GetRingBuffer(RingInfo); + u32 ringBufferSize = GetRingBufferSize(RingInfo); u32 fragLen; - if (DestLen > ringBufferSize - StartReadOffset) /* wrap-around detected at the src */ - { + /* wrap-around detected at the src */ + if (DestLen > ringBufferSize - StartReadOffset) { DPRINT_DBG(VMBUS, "src wrap-around detected!"); fragLen = ringBufferSize - StartReadOffset; memcpy(Dest, ringBuffer + StartReadOffset, fragLen); memcpy(Dest + fragLen, ringBuffer, DestLen - fragLen); - } - else - { + } else + memcpy(Dest, ringBuffer + StartReadOffset, DestLen); - } + StartReadOffset += DestLen; StartReadOffset %= ringBufferSize; From 26c14cc119204adc218259251919c5198d07dafe Mon Sep 17 00:00:00 2001 From: Hank Janssen Date: Thu, 11 Feb 2010 23:02:42 +0000 Subject: [PATCH 096/367] Staging: hv: Add proper versioning to HV drivers Provide proper versioning information for all HV drivers. With removal of build time/date/and Minor number as requested by Greg KH Signed-off-by: Hank Janssen Signed-off-by: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/VersionInfo.h | 22 +++++++++++++++++++--- drivers/staging/hv/Vmbus.c | 6 ++---- drivers/staging/hv/blkvsc_drv.c | 2 ++ drivers/staging/hv/netvsc_drv.c | 5 +++-- drivers/staging/hv/storvsc_drv.c | 2 ++ drivers/staging/hv/vmbus_drv.c | 2 ++ 6 files changed, 30 insertions(+), 9 deletions(-) diff --git a/drivers/staging/hv/VersionInfo.h b/drivers/staging/hv/VersionInfo.h index 9c3641d99ed8..10d7b19a485f 100644 --- a/drivers/staging/hv/VersionInfo.h +++ b/drivers/staging/hv/VersionInfo.h @@ -24,8 +24,24 @@ #ifndef __HV_VERSION_INFO #define __HV_VERSION_INFO -static const char VersionDate[] = __DATE__; -static const char VersionTime[] = __TIME__; -static const char VersionDesc[] = "Version 2.0"; +/* + * We use the same version numbering for all Hyper-V modules. + * + * Definition of versioning is as follows; + * + * Major Number Changes for these scenarios; + * 1. When a new version of Windows Hyper-V + * is released. + * 2. A Major change has occurred in the + * Linux IC's. + * (For example the merge for the first time + * into the kernel) Every time the Major Number + * changes, the Revision number is reset to 0. + * Minor Number Changes when new functionality is added + * to the Linux IC's that is not a bug fix. + * + */ +#define HV_DRV_VERSION "3.0" + #endif diff --git a/drivers/staging/hv/Vmbus.c b/drivers/staging/hv/Vmbus.c index 35a023e9f9d1..3d0a240ed664 100644 --- a/drivers/staging/hv/Vmbus.c +++ b/drivers/staging/hv/Vmbus.c @@ -273,10 +273,8 @@ int VmbusInitialize(struct hv_driver *drv) DPRINT_ENTER(VMBUS); - DPRINT_INFO(VMBUS, "+++++++ Build Date=%s %s +++++++", - VersionDate, VersionTime); - DPRINT_INFO(VMBUS, "+++++++ Build Description=%s +++++++", - VersionDesc); + DPRINT_INFO(VMBUS, "+++++++ HV Driver version = %s +++++++", + HV_DRV_VERSION); DPRINT_INFO(VMBUS, "+++++++ Vmbus supported version = %d +++++++", VMBUS_REVISION_NUMBER); DPRINT_INFO(VMBUS, "+++++++ Vmbus using SINT %d +++++++", diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c index 62b282844a53..635692d59954 100644 --- a/drivers/staging/hv/blkvsc_drv.c +++ b/drivers/staging/hv/blkvsc_drv.c @@ -31,6 +31,7 @@ #include #include "osd.h" #include "logging.h" +#include "VersionInfo.h" #include "vmbus.h" #include "StorVscApi.h" @@ -1507,6 +1508,7 @@ static void __exit blkvsc_exit(void) } MODULE_LICENSE("GPL"); +MODULE_VERSION(HV_DRV_VERSION); module_param(blkvsc_ringbuffer_size, int, S_IRUGO); module_init(blkvsc_init); module_exit(blkvsc_exit); diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c index 3234a7c4a429..0a780671cefe 100644 --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c @@ -35,11 +35,10 @@ #include #include "osd.h" #include "logging.h" +#include "VersionInfo.h" #include "vmbus.h" #include "NetVscApi.h" -MODULE_LICENSE("GPL"); - struct net_device_context { /* point back to our device context */ struct device_context *device_ctx; @@ -603,6 +602,8 @@ static void __exit netvsc_exit(void) DPRINT_EXIT(NETVSC_DRV); } +MODULE_LICENSE("GPL"); +MODULE_VERSION(HV_DRV_VERSION); module_param(netvsc_ringbuffer_size, int, S_IRUGO); module_init(netvsc_init); diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c index 12f8f3f64c61..a10fa0ea98e5 100644 --- a/drivers/staging/hv/storvsc_drv.c +++ b/drivers/staging/hv/storvsc_drv.c @@ -32,6 +32,7 @@ #include #include "osd.h" #include "logging.h" +#include "VersionInfo.h" #include "vmbus.h" #include "StorVscApi.h" @@ -990,6 +991,7 @@ static void __exit storvsc_exit(void) } MODULE_LICENSE("GPL"); +MODULE_VERSION(HV_DRV_VERSION); module_param(storvsc_ringbuffer_size, int, S_IRUGO); module_init(storvsc_init); module_exit(storvsc_exit); diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index 894eecfc63ca..92d70cd881ba 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c @@ -24,6 +24,7 @@ #include #include #include +#include "VersionInfo.h" #include "osd.h" #include "logging.h" #include "vmbus.h" @@ -974,6 +975,7 @@ static void __exit vmbus_exit(void) } MODULE_LICENSE("GPL"); +MODULE_VERSION(HV_DRV_VERSION); module_param(vmbus_irq, int, S_IRUGO); module_param(vmbus_loglevel, int, S_IRUGO); From f916a34dc066c13ff2c8986657634cef06c07719 Mon Sep 17 00:00:00 2001 From: Haiyang Zhang Date: Wed, 17 Feb 2010 20:58:47 +0000 Subject: [PATCH 097/367] Staging: hv: Rename struct device_context and re-arrange the fields inside Rename struct device_context and re-arrange the fields inside. Rename struct device_context to struct vm_device, and move struct device field to the end according to Document/driver-model standard. Signed-off-by: Hank Janssen Signed-off-by: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/blkvsc_drv.c | 8 +++---- drivers/staging/hv/netvsc_drv.c | 10 ++++----- drivers/staging/hv/storvsc_drv.c | 10 ++++----- drivers/staging/hv/vmbus.h | 12 +++++------ drivers/staging/hv/vmbus_drv.c | 36 ++++++++++++++++---------------- 5 files changed, 38 insertions(+), 38 deletions(-) diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c index 635692d59954..1d1a46f524d2 100644 --- a/drivers/staging/hv/blkvsc_drv.c +++ b/drivers/staging/hv/blkvsc_drv.c @@ -93,7 +93,7 @@ struct blkvsc_request { /* Per device structure */ struct block_device_context { /* point back to our device context */ - struct device_context *device_ctx; + struct vm_device *device_ctx; struct kmem_cache *request_pool; spinlock_t lock; struct gendisk *gd; @@ -255,7 +255,7 @@ static int blkvsc_probe(struct device *device) (struct blkvsc_driver_context *)driver_ctx; struct storvsc_driver_object *storvsc_drv_obj = &blkvsc_drv_ctx->drv_obj; - struct device_context *device_ctx = device_to_device_context(device); + struct vm_device *device_ctx = device_to_vm_device(device); struct hv_device *device_obj = &device_ctx->device_obj; struct block_device_context *blkdev = NULL; @@ -746,7 +746,7 @@ static int blkvsc_remove(struct device *device) (struct blkvsc_driver_context *)driver_ctx; struct storvsc_driver_object *storvsc_drv_obj = &blkvsc_drv_ctx->drv_obj; - struct device_context *device_ctx = device_to_device_context(device); + struct vm_device *device_ctx = device_to_vm_device(device); struct hv_device *device_obj = &device_ctx->device_obj; struct block_device_context *blkdev = dev_get_drvdata(device); unsigned long flags; @@ -866,7 +866,7 @@ static int blkvsc_submit_request(struct blkvsc_request *blkvsc_req, void (*request_completion)(struct hv_storvsc_request *)) { struct block_device_context *blkdev = blkvsc_req->dev; - struct device_context *device_ctx = blkdev->device_ctx; + struct vm_device *device_ctx = blkdev->device_ctx; struct driver_context *driver_ctx = driver_to_driver_context(device_ctx->device.driver); struct blkvsc_driver_context *blkvsc_drv_ctx = diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c index 0a780671cefe..1af3dcbafd65 100644 --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c @@ -41,7 +41,7 @@ struct net_device_context { /* point back to our device context */ - struct device_context *device_ctx; + struct vm_device *device_ctx; struct net_device_stats stats; }; @@ -271,7 +271,7 @@ retry_send: static void netvsc_linkstatus_callback(struct hv_device *device_obj, unsigned int status) { - struct device_context *device_ctx = to_device_context(device_obj); + struct vm_device *device_ctx = to_vm_device(device_obj); struct net_device *net = dev_get_drvdata(&device_ctx->device); DPRINT_ENTER(NETVSC_DRV); @@ -298,7 +298,7 @@ static void netvsc_linkstatus_callback(struct hv_device *device_obj, static int netvsc_recv_callback(struct hv_device *device_obj, struct hv_netvsc_packet *packet) { - struct device_context *device_ctx = to_device_context(device_obj); + struct vm_device *device_ctx = to_vm_device(device_obj); struct net_device *net = dev_get_drvdata(&device_ctx->device); struct net_device_context *net_device_ctx; struct sk_buff *skb; @@ -390,7 +390,7 @@ static int netvsc_probe(struct device *device) struct netvsc_driver_context *net_drv_ctx = (struct netvsc_driver_context *)driver_ctx; struct netvsc_driver *net_drv_obj = &net_drv_ctx->drv_obj; - struct device_context *device_ctx = device_to_device_context(device); + struct vm_device *device_ctx = device_to_vm_device(device); struct hv_device *device_obj = &device_ctx->device_obj; struct net_device *net = NULL; struct net_device_context *net_device_ctx; @@ -462,7 +462,7 @@ static int netvsc_remove(struct device *device) struct netvsc_driver_context *net_drv_ctx = (struct netvsc_driver_context *)driver_ctx; struct netvsc_driver *net_drv_obj = &net_drv_ctx->drv_obj; - struct device_context *device_ctx = device_to_device_context(device); + struct vm_device *device_ctx = device_to_vm_device(device); struct net_device *net = dev_get_drvdata(&device_ctx->device); struct hv_device *device_obj = &device_ctx->device_obj; int ret; diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c index a10fa0ea98e5..3988f4bec1ce 100644 --- a/drivers/staging/hv/storvsc_drv.c +++ b/drivers/staging/hv/storvsc_drv.c @@ -41,7 +41,7 @@ struct host_device_context { /* must be 1st field * FIXME this is a bug */ /* point back to our device context */ - struct device_context *device_ctx; + struct vm_device *device_ctx; struct kmem_cache *request_pool; unsigned int port; unsigned char path; @@ -234,7 +234,7 @@ static int storvsc_probe(struct device *device) (struct storvsc_driver_context *)driver_ctx; struct storvsc_driver_object *storvsc_drv_obj = &storvsc_drv_ctx->drv_obj; - struct device_context *device_ctx = device_to_device_context(device); + struct vm_device *device_ctx = device_to_vm_device(device); struct hv_device *device_obj = &device_ctx->device_obj; struct Scsi_Host *host; struct host_device_context *host_device_ctx; @@ -330,7 +330,7 @@ static int storvsc_remove(struct device *device) (struct storvsc_driver_context *)driver_ctx; struct storvsc_driver_object *storvsc_drv_obj = &storvsc_drv_ctx->drv_obj; - struct device_context *device_ctx = device_to_device_context(device); + struct vm_device *device_ctx = device_to_vm_device(device); struct hv_device *device_obj = &device_ctx->device_obj; struct Scsi_Host *host = dev_get_drvdata(device); struct host_device_context *host_device_ctx = @@ -631,7 +631,7 @@ static int storvsc_queuecommand(struct scsi_cmnd *scmnd, int ret; struct host_device_context *host_device_ctx = (struct host_device_context *)scmnd->device->host->hostdata; - struct device_context *device_ctx = host_device_ctx->device_ctx; + struct vm_device *device_ctx = host_device_ctx->device_ctx; struct driver_context *driver_ctx = driver_to_driver_context(device_ctx->device.driver); struct storvsc_driver_context *storvsc_drv_ctx = @@ -870,7 +870,7 @@ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd) int ret; struct host_device_context *host_device_ctx = (struct host_device_context *)scmnd->device->host->hostdata; - struct device_context *device_ctx = host_device_ctx->device_ctx; + struct vm_device *device_ctx = host_device_ctx->device_ctx; DPRINT_ENTER(STORVSC_DRV); diff --git a/drivers/staging/hv/vmbus.h b/drivers/staging/hv/vmbus.h index ae0a896eb392..6404b8424bef 100644 --- a/drivers/staging/hv/vmbus.h +++ b/drivers/staging/hv/vmbus.h @@ -43,23 +43,23 @@ struct driver_context { void (*shutdown)(struct device *); }; -struct device_context { +struct vm_device { struct work_struct probe_failed_work_item; struct hv_guid class_id; struct hv_guid device_id; int probe_error; - struct device device; struct hv_device device_obj; + struct device device; }; -static inline struct device_context *to_device_context(struct hv_device *d) +static inline struct vm_device *to_vm_device(struct hv_device *d) { - return container_of(d, struct device_context, device_obj); + return container_of(d, struct vm_device, device_obj); } -static inline struct device_context *device_to_device_context(struct device *d) +static inline struct vm_device *device_to_vm_device(struct device *d) { - return container_of(d, struct device_context, device); + return container_of(d, struct vm_device, device); } static inline struct driver_context *driver_to_driver_context(struct device_driver *d) diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index 92d70cd881ba..de8729d6820c 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c @@ -48,7 +48,7 @@ struct vmbus_driver_context { struct tasklet_struct event_dpc; /* The bus root device */ - struct device_context device_ctx; + struct vm_device device_ctx; }; static int vmbus_match(struct device *device, struct device_driver *driver); @@ -136,7 +136,7 @@ static ssize_t vmbus_show_device_attr(struct device *dev, struct device_attribute *dev_attr, char *buf) { - struct device_context *device_ctx = device_to_device_context(dev); + struct vm_device *device_ctx = device_to_vm_device(dev); struct hv_device_info device_info; memset(&device_info, 0, sizeof(struct hv_device_info)); @@ -246,7 +246,7 @@ static int vmbus_bus_init(int (*drv_init)(struct hv_driver *drv)) { struct vmbus_driver_context *vmbus_drv_ctx = &g_vmbus_drv; struct vmbus_driver *vmbus_drv_obj = &g_vmbus_drv.drv_obj; - struct device_context *dev_ctx = &g_vmbus_drv.device_ctx; + struct vm_device *dev_ctx = &g_vmbus_drv.device_ctx; int ret; unsigned int vector; @@ -308,7 +308,7 @@ static int vmbus_bus_init(int (*drv_init)(struct hv_driver *drv)) DPRINT_INFO(VMBUS_DRV, "irq 0x%x vector 0x%x", vmbus_irq, vector); /* Call to bus driver to add the root device */ - memset(dev_ctx, 0, sizeof(struct device_context)); + memset(dev_ctx, 0, sizeof(struct vm_device)); ret = vmbus_drv_obj->Base.OnDeviceAdd(&dev_ctx->device_obj, &vector); if (ret != 0) { @@ -369,7 +369,7 @@ static void vmbus_bus_exit(void) struct vmbus_driver *vmbus_drv_obj = &g_vmbus_drv.drv_obj; struct vmbus_driver_context *vmbus_drv_ctx = &g_vmbus_drv; - struct device_context *dev_ctx = &g_vmbus_drv.device_ctx; + struct vm_device *dev_ctx = &g_vmbus_drv.device_ctx; DPRINT_ENTER(VMBUS_DRV); @@ -472,13 +472,13 @@ static struct hv_device *vmbus_child_device_create(struct hv_guid *type, struct hv_guid *instance, void *context) { - struct device_context *child_device_ctx; + struct vm_device *child_device_ctx; struct hv_device *child_device_obj; DPRINT_ENTER(VMBUS_DRV); /* Allocate the new child device */ - child_device_ctx = kzalloc(sizeof(struct device_context), GFP_KERNEL); + child_device_ctx = kzalloc(sizeof(struct vm_device), GFP_KERNEL); if (!child_device_ctx) { DPRINT_ERR(VMBUS_DRV, "unable to allocate device_context for child device"); @@ -527,10 +527,10 @@ static int vmbus_child_device_register(struct hv_device *root_device_obj, struct hv_device *child_device_obj) { int ret = 0; - struct device_context *root_device_ctx = - to_device_context(root_device_obj); - struct device_context *child_device_ctx = - to_device_context(child_device_obj); + struct vm_device *root_device_ctx = + to_vm_device(root_device_obj); + struct vm_device *child_device_ctx = + to_vm_device(child_device_obj); static atomic_t device_num = ATOMIC_INIT(0); DPRINT_ENTER(VMBUS_DRV); @@ -573,7 +573,7 @@ static int vmbus_child_device_register(struct hv_device *root_device_obj, */ static void vmbus_child_device_unregister(struct hv_device *device_obj) { - struct device_context *device_ctx = to_device_context(device_obj); + struct vm_device *device_ctx = to_vm_device(device_obj); DPRINT_ENTER(VMBUS_DRV); @@ -611,7 +611,7 @@ static void vmbus_child_device_destroy(struct hv_device *device_obj) */ static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env) { - struct device_context *device_ctx = device_to_device_context(device); + struct vm_device *device_ctx = device_to_vm_device(device); int ret; DPRINT_ENTER(VMBUS_DRV); @@ -688,7 +688,7 @@ static int vmbus_match(struct device *device, struct device_driver *driver) { int match = 0; struct driver_context *driver_ctx = driver_to_driver_context(driver); - struct device_context *device_ctx = device_to_device_context(device); + struct vm_device *device_ctx = device_to_vm_device(device); DPRINT_ENTER(VMBUS_DRV); @@ -725,7 +725,7 @@ static int vmbus_match(struct device *device, struct device_driver *driver) */ static void vmbus_probe_failed_cb(struct work_struct *context) { - struct device_context *device_ctx = (struct device_context *)context; + struct vm_device *device_ctx = (struct vm_device *)context; DPRINT_ENTER(VMBUS_DRV); @@ -747,8 +747,8 @@ static int vmbus_probe(struct device *child_device) int ret = 0; struct driver_context *driver_ctx = driver_to_driver_context(child_device->driver); - struct device_context *device_ctx = - device_to_device_context(child_device); + struct vm_device *device_ctx = + device_to_vm_device(child_device); DPRINT_ENTER(VMBUS_DRV); @@ -872,7 +872,7 @@ static void vmbus_bus_release(struct device *device) */ static void vmbus_device_release(struct device *device) { - struct device_context *device_ctx = device_to_device_context(device); + struct vm_device *device_ctx = device_to_vm_device(device); DPRINT_ENTER(VMBUS_DRV); From 0fa37b1ee936811c8aa8fcb72d189d02cf1575b9 Mon Sep 17 00:00:00 2001 From: Chris Nicholson Date: Sat, 20 Feb 2010 20:36:23 +0000 Subject: [PATCH 098/367] Staging: hv: fix brace coding style issue in Channel.c This is a patch to the Channel.c file that fixes up a brace warning found by checkpatch.pl Signed-off-by: Chris Nicholson Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/Channel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c index 746370e82115..d46eb145484f 100644 --- a/drivers/staging/hv/Channel.c +++ b/drivers/staging/hv/Channel.c @@ -991,9 +991,8 @@ void VmbusChannelOnTimer(unsigned long data) { struct vmbus_channel *channel = (struct vmbus_channel *)data; - if (channel->OnChannelCallback) { + if (channel->OnChannelCallback) channel->OnChannelCallback(channel->ChannelCallbackContext); - } } /** From 9a775dbd4e8c87b7d35549183145321c7205404e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 25 Feb 2010 16:42:10 -0800 Subject: [PATCH 099/367] Staging: hv: add a pci device table This allows the HV core to be properly found and autoloaded by the system tools. It uses the Microsoft virtual VGA device to trigger this. Cc: Haiyang Zhang Cc: Hank Janssen Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/vmbus_drv.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index de8729d6820c..186cbe6983a9 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "VersionInfo.h" #include "osd.h" #include "logging.h" @@ -974,6 +975,22 @@ static void __exit vmbus_exit(void) return; } +/* + * We use a PCI table to determine if we should autoload this driver This is + * needed by distro tools to determine if the hyperv drivers should be + * installed and/or configured. We don't do anything else with the table, but + * it needs to be present. + * + * We might consider triggering off of DMI table info as well, as that does + * decribe the virtual machine being run on, but not all configuration tools + * seem to be able to handle DMI device ids properly. + */ +const static struct pci_device_id microsoft_hv_pci_table[] = { + { PCI_DEVICE(0x1414, 0x5353) }, /* VGA compatible controller */ + { 0 } +}; +MODULE_DEVICE_TABLE(pci, microsoft_hv_pci_table); + MODULE_LICENSE("GPL"); MODULE_VERSION(HV_DRV_VERSION); module_param(vmbus_irq, int, S_IRUGO); From c22090facd354749cfe99a46e903449c7ac07788 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 25 Feb 2010 16:43:15 -0800 Subject: [PATCH 100/367] Staging: hv: match on DMI values to know if we should run. The HV core mucks around with specific irqs and other low-level stuff and takes forever to determine that it really shouldn't be running on a machine. So instead, trigger off of the DMI system information and error out much sooner. This also allows the module loading tools to recognize that this code should be loaded on this type of system. Cc: Haiyang Zhang Cc: Hank Janssen Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/vmbus_drv.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index 186cbe6983a9..2c906195b9c8 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "VersionInfo.h" #include "osd.h" #include "logging.h" @@ -948,6 +949,19 @@ static irqreturn_t vmbus_isr(int irq, void *dev_id) } } +static struct dmi_system_id __initdata microsoft_hv_dmi_table[] = { + { + .ident = "Hyper-V", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"), + DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"), + DMI_MATCH(DMI_BOARD_NAME, "Virtual Machine"), + }, + }, + { }, +}; +MODULE_DEVICE_TABLE(dmi, microsoft_hv_dmi_table); + static int __init vmbus_init(void) { int ret = 0; @@ -959,6 +973,9 @@ static int __init vmbus_init(void) vmbus_loglevel, HIWORD(vmbus_loglevel), LOWORD(vmbus_loglevel)); /* Todo: it is used for loglevel, to be ported to new kernel. */ + if (!dmi_check_system(microsoft_hv_dmi_table)) + return -ENODEV; + ret = vmbus_bus_init(VmbusInitialize); DPRINT_EXIT(VMBUS_DRV); @@ -980,10 +997,6 @@ static void __exit vmbus_exit(void) * needed by distro tools to determine if the hyperv drivers should be * installed and/or configured. We don't do anything else with the table, but * it needs to be present. - * - * We might consider triggering off of DMI table info as well, as that does - * decribe the virtual machine being run on, but not all configuration tools - * seem to be able to handle DMI device ids properly. */ const static struct pci_device_id microsoft_hv_pci_table[] = { { PCI_DEVICE(0x1414, 0x5353) }, /* VGA compatible controller */ From 6910dadf3f11254bc0af79f578c7228b4e1334ac Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Thu, 24 Dec 2009 22:41:13 +1100 Subject: [PATCH 101/367] Staging: DT3155: Use pci_get_device() The use of pci_find_device() is deprecated. Signed-off-by: Simon Horman Cc: Scott Smedley Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dt3155/dt3155_drv.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/staging/dt3155/dt3155_drv.c b/drivers/staging/dt3155/dt3155_drv.c index 3efdeb9953ff..950956c08eda 100644 --- a/drivers/staging/dt3155/dt3155_drv.c +++ b/drivers/staging/dt3155/dt3155_drv.c @@ -963,7 +963,7 @@ static int find_PCI (void) unsigned long base; unsigned char irq; - while ((pci_dev = pci_find_device + while ((pci_dev = pci_get_device (DT3155_VENDORID, DT3155_DEVICEID, pci_dev)) != NULL) { pci_index ++; @@ -983,7 +983,7 @@ static int find_PCI (void) "for %d devices\n" "DT3155: Please change MAXBOARDS in dt3155.h\n", pci_index, MAXBOARDS); - return DT_3155_FAILURE; + goto err; } /* Now, just go out and make sure that this/these device(s) is/are @@ -992,7 +992,7 @@ static int find_PCI (void) (u_int *) &base))) { printk("DT3155: Was not able to find device \n"); - return DT_3155_FAILURE; + goto err; } DT_3155_DEBUG_MSG("DT3155: Base address 0 for device is %lx \n", base); @@ -1007,13 +1007,13 @@ static int find_PCI (void) if ( !dt3155_lbase[pci_index-1] ) { printk("DT3155: Unable to remap control registers\n"); - return DT_3155_FAILURE; + goto err; } if ( (error = pci_read_config_byte( pci_dev, PCI_INTERRUPT_LINE, &irq)) ) { printk("DT3155: Was not able to find device \n"); - return DT_3155_FAILURE; + goto err; } DT_3155_DEBUG_MSG("DT3155: IRQ is %d \n",irq); @@ -1029,6 +1029,10 @@ static int find_PCI (void) ndevices = pci_index; return DT_3155_SUCCESS; + +err: + pci_dev_put(pci_dev); + return DT_3155_FAILURE; } u_long allocatorAddr = 0; From c33c2065fc4d424e23547b58900ded5eb4444e9d Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Wed, 23 Dec 2009 19:54:50 +1100 Subject: [PATCH 102/367] Staging: rt2870: rtusb_probe() should be in section __devinit $ make CONFIG_DEBUG_SECTION_MISMATCH=y WARNING: drivers/staging/rt2870/rt2870sta.o(.text+0x2f4c5): Section mismatch in reference from the function rtusb_probe() to the function .devinit.text:rt2870_probe() The function rtusb_probe() references the function __devinit rt2870_probe(). This is often because rtusb_probe lacks a __devinit annotation or the annotation of rt2870_probe is wrong. Signed-off-by: Simon Horman Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rt2860/usb_main_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rt2860/usb_main_dev.c b/drivers/staging/rt2860/usb_main_dev.c index 925a236e1044..1e6e8a3b61ac 100644 --- a/drivers/staging/rt2860/usb_main_dev.c +++ b/drivers/staging/rt2860/usb_main_dev.c @@ -296,7 +296,7 @@ static BOOLEAN USBDevConfigInit(IN struct usb_device *dev, } -static int rtusb_probe(struct usb_interface *intf, +static int __devinit rtusb_probe(struct usb_interface *intf, const struct usb_device_id *id) { struct rt_rtmp_adapter *pAd; From db15438cd5be7380cdf27c8adb8fc71a72da0210 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Wed, 23 Dec 2009 19:54:51 +1100 Subject: [PATCH 103/367] Staging: rt2870: Remove unnecessary forward declarations Remove unnecessary forward declaration of rtusb_probe() and rtusb_disconnect() Signed-off-by: Simon Horman Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rt2860/usb_main_dev.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/staging/rt2860/usb_main_dev.c b/drivers/staging/rt2860/usb_main_dev.c index 1e6e8a3b61ac..1873a79bb033 100644 --- a/drivers/staging/rt2860/usb_main_dev.c +++ b/drivers/staging/rt2860/usb_main_dev.c @@ -216,10 +216,6 @@ static int rt2870_suspend(struct usb_interface *intf, pm_message_t state); static int rt2870_resume(struct usb_interface *intf); #endif /* CONFIG_PM // */ -static int rtusb_probe(struct usb_interface *intf, - const struct usb_device_id *id); -static void rtusb_disconnect(struct usb_interface *intf); - static BOOLEAN USBDevConfigInit(IN struct usb_device *dev, IN struct usb_interface *intf, struct rt_rtmp_adapter *pAd) From 9bfafe825d0af5f4cbb2aaaecad0cf9a459cf6b1 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Wed, 23 Dec 2009 19:54:52 +1100 Subject: [PATCH 104/367] Staging: rtl8192e: print the elements of tx_pn and rx_pn not the arrays themselves Signed-off-by: Simon Horman Signed-off-by: Greg Kroah-Hartman --- .../rtl8192e/ieee80211/ieee80211_crypt_ccmp.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c index 70159cf28bce..d5fe94d74b52 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c @@ -475,12 +475,19 @@ static int ieee80211_ccmp_get_key(void *key, int len, u8 *seq, void *priv) static char * ieee80211_ccmp_print_stats(char *p, void *priv) { struct ieee80211_ccmp_data *ccmp = priv; - p += sprintf(p, "key[%d] alg=CCMP key_set=%d " - "tx_pn=%02x%02x%02x%02x%02x%02x " - "rx_pn=%02x%02x%02x%02x%02x%02x " - "format_errors=%d replays=%d decrypt_errors=%d\n", - ccmp->key_idx, ccmp->key_set, - ccmp->tx_pn, ccmp->rx_pn, + int i; + + p += sprintf(p, "key[%d] alg=CCMP key_set=%d tx_pn=", + ccmp->key_idx, ccmp->key_set); + + for (i = 0; i < ARRAY_SIZE(ccmp->tx_pn); i++) + p += sprintf(p, "%02x", ccmp->tx_pn[i]); + + sprintf(p, " rx_pn="); + for (i = 0; i < ARRAY_SIZE(ccmp->rx_pn); i++) + p += sprintf(p, "%02x", ccmp->tx_pn[i]); + + p += sprintf(p, " format_errors=%d replays=%d decrypt_errors=%d\n", ccmp->dot11RSNAStatsCCMPFormatErrors, ccmp->dot11RSNAStatsCCMPReplays, ccmp->dot11RSNAStatsCCMPDecryptErrors); From 27b93f80e47a49a0584a4c8fb58bc44f9e026256 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Wed, 23 Dec 2009 19:54:53 +1100 Subject: [PATCH 105/367] Staging: rtl8192e: remove some functions from the __exit section ieee80211_crypto_tkip_exit(), ieee80211_crypto_deinit() and ieee80211_crypto_ccmp_exit() are called by ieee80211_rtl_init() which are in section __init, so they can't be in section __exit. Signed-off-by: Simon Horman Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192e/ieee80211/ieee80211_crypt.c | 2 +- drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c | 2 +- drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt.c index b1c54932da3e..b3c9bf4b4ea6 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt.c @@ -225,7 +225,7 @@ out: } -void __exit ieee80211_crypto_deinit(void) +void ieee80211_crypto_deinit(void) { struct list_head *ptr, *n; diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c index d5fe94d74b52..1776f7e69bfe 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c @@ -524,7 +524,7 @@ int __init ieee80211_crypto_ccmp_init(void) } -void __exit ieee80211_crypto_ccmp_exit(void) +void ieee80211_crypto_ccmp_exit(void) { ieee80211_unregister_crypto_ops(&ieee80211_crypt_ccmp); } diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c index 7056d932057b..03cb21eb0658 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c @@ -1012,7 +1012,7 @@ int __init ieee80211_crypto_tkip_init(void) } -void __exit ieee80211_crypto_tkip_exit(void) +void ieee80211_crypto_tkip_exit(void) { ieee80211_unregister_crypto_ops(&ieee80211_crypt_tkip); } From cf137d5c49379c5f05fba40baf1535b611410ec0 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Wed, 23 Dec 2009 19:54:54 +1100 Subject: [PATCH 106/367] Staging: rtl8192su, rtl8192u: use min_t() in store_debug_level() sizeof() returns a size_t but the other types involved are unsigned long, so using min() results in a warning. As sizeof() is called on an 11 character buffer defined immediately above unsigned long is obviously wide enough for the result. Signed-off-by: Simon Horman Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192su/ieee80211/ieee80211_module.c | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211_module.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_module.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_module.c index e8c67d5dfb76..c024fa600729 100644 --- a/drivers/staging/rtl8192su/ieee80211/ieee80211_module.c +++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_module.c @@ -262,7 +262,7 @@ static int store_debug_level(struct file *file, const char *buffer, unsigned long count, void *data) { char buf[] = "0x00000000"; - unsigned long len = min(sizeof(buf) - 1, count); + unsigned long len = min_t(unsigned long, sizeof(buf) - 1, count); char *p = (char *)buf; unsigned long val; diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c index 7a8690f449b4..b752017a4d18 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c @@ -260,7 +260,7 @@ static int store_debug_level(struct file *file, const char *buffer, unsigned long count, void *data) { char buf[] = "0x00000000"; - unsigned long len = min(sizeof(buf) - 1, count); + unsigned long len = min_t(unsigned long, sizeof(buf) - 1, count); char *p = (char *)buf; unsigned long val; From 2141ec629c9c9a70c905cfebcc8fa69373dd982a Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Thu, 24 Dec 2009 22:42:31 +1100 Subject: [PATCH 107/367] Staging: dt3155: remove compat code Remove compatibility code as this is not an older version of the kernel. Signed-off-by: Simon Horman Cc: Scott Smedley Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dt3155/allocator.c | 3 +- drivers/staging/dt3155/dt3155_drv.c | 115 +--- drivers/staging/dt3155/dt3155_drv.h | 5 - drivers/staging/dt3155/dt3155_isr.c | 41 +- drivers/staging/dt3155/pci-compat.h | 97 ---- drivers/staging/dt3155/sysdep.h | 820 ---------------------------- 6 files changed, 8 insertions(+), 1073 deletions(-) delete mode 100644 drivers/staging/dt3155/pci-compat.h delete mode 100644 drivers/staging/dt3155/sysdep.h diff --git a/drivers/staging/dt3155/allocator.c b/drivers/staging/dt3155/allocator.c index c1b85447c0e0..4983c9379e57 100644 --- a/drivers/staging/dt3155/allocator.c +++ b/drivers/staging/dt3155/allocator.c @@ -54,11 +54,10 @@ #include #include #include /* PAGE_ALIGN() */ +#include #include -#include "sysdep.h" - /*#define ALL_DEBUG*/ #define ALL_MSG "allocator: " diff --git a/drivers/staging/dt3155/dt3155_drv.c b/drivers/staging/dt3155/dt3155_drv.c index 950956c08eda..6b40d422ad0c 100644 --- a/drivers/staging/dt3155/dt3155_drv.c +++ b/drivers/staging/dt3155/dt3155_drv.c @@ -59,13 +59,10 @@ extern void printques(int); #ifdef MODULE #include -#include #include -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,10) MODULE_LICENSE("GPL"); -#endif #endif @@ -105,11 +102,7 @@ int dt3155_errno = 0; #endif /* wait queue for interrupts */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,1) wait_queue_head_t dt3155_read_wait_queue[ MAXBOARDS ]; -#else -struct wait_queue *dt3155_read_wait_queue[ MAXBOARDS ]; -#endif #define DT_3155_SUCCESS 0 #define DT_3155_FAILURE -EIO @@ -186,11 +179,7 @@ static inline void dt3155_isr( int irq, void *dev_id, struct pt_regs *regs ) { int minor = -1; int index; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) unsigned long flags; -#else - int flags; -#endif u_long buffer_addr; /* find out who issued the interrupt */ @@ -264,21 +253,12 @@ static inline void dt3155_isr( int irq, void *dev_id, struct pt_regs *regs ) buffer_addr = dt3155_fbuffer[ minor ]-> frame_info[ dt3155_fbuffer[ minor ]->active_buf ].addr + (DT3155_MAX_ROWS / 2) * stride; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) local_save_flags(flags); local_irq_disable(); -#else - save_flags( flags ); - cli(); -#endif wake_up_interruptible( &dt3155_read_wait_queue[ minor ] ); /* Set up the DMA address for the next field */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) local_irq_restore(flags); -#else - restore_flags( flags ); -#endif WriteMReg((dt3155_lbase[ minor ] + ODD_DMA_START), buffer_addr); } @@ -350,13 +330,8 @@ static inline void dt3155_isr( int irq, void *dev_id, struct pt_regs *regs ) DT3155_STATE_FLD ) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) local_save_flags(flags); local_irq_disable(); -#else - save_flags( flags ); - cli(); -#endif #ifdef DEBUG_QUES_B printques( minor ); @@ -412,11 +387,7 @@ static inline void dt3155_isr( int irq, void *dev_id, struct pt_regs *regs ) wake_up_interruptible( &dt3155_read_wait_queue[ minor ] ); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) local_irq_restore(flags); -#else - restore_flags( flags ); -#endif } @@ -675,11 +646,6 @@ static int dt3155_mmap (struct file * file, struct vm_area_struct * vma) /* which device are we mmapping? */ int minor = MINOR(file->f_dentry->d_inode->i_rdev); unsigned long offset; - - /* not actually sure when vm_area_struct changed, - but it was in 2.3 sometime */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,20) - offset = vma->vm_pgoff << PAGE_SHIFT; if (offset >= __pa(high_memory) || (file->f_flags & O_SYNC)) @@ -688,34 +654,17 @@ static int dt3155_mmap (struct file * file, struct vm_area_struct * vma) /* Don't try to swap out physical pages.. */ vma->vm_flags |= VM_RESERVED; -#else - - if (vma->vm_offset & ~PAGE_MASK) - return -ENXIO; - - offset = vma->vm_offset; - -#endif - /* they are mapping the registers or the buffer */ if ((offset == dt3155_status[minor].reg_addr && vma->vm_end - vma->vm_start == PCI_PAGE_SIZE) || (offset == dt3155_status[minor].mem_addr && vma->vm_end - vma->vm_start == dt3155_status[minor].mem_size)) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) if (remap_pfn_range(vma, vma->vm_start, offset >> PAGE_SHIFT, vma->vm_end - vma->vm_start, - vma->vm_page_prot)) -#else - if (remap_page_range(vma->vm_start, - offset, - vma->vm_end - vma->vm_start, - vma->vm_page_prot)) -#endif - { + vma->vm_page_prot)) { printk("DT3155: remap_page_range() failed.\n"); return -EAGAIN; } @@ -761,9 +710,6 @@ static int dt3155_open( struct inode* inode, struct file* filep) printk("DT3155: Device opened.\n"); dt3155_dev_open[ minor ] = 1 ; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - MOD_INC_USE_COUNT; -#endif dt3155_flush( minor ); @@ -771,11 +717,7 @@ static int dt3155_open( struct inode* inode, struct file* filep) int_csr_r.reg = 0; WriteMReg( (dt3155_lbase[ minor ] + INT_CSR), int_csr_r.reg ); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,1) init_waitqueue_head(&(dt3155_read_wait_queue[minor])); -#else - dt3155_read_wait_queue[minor] = NULL; -#endif return 0; } @@ -798,9 +740,6 @@ static int dt3155_close( struct inode *inode, struct file *filep) } else { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - MOD_DEC_USE_COUNT; -#endif dt3155_dev_open[ minor ] = 0; if (dt3155_status[ minor ].state != DT3155_STATE_IDLE) @@ -846,8 +785,6 @@ static int dt3155_read ( /* if (dt3155_status[minor].state == DT3155_STATE_IDLE)*/ /* return -EBUSY;*/ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,1) - /* non-blocking reads should return if no data */ if (filep->f_flags & O_NDELAY) { @@ -877,34 +814,6 @@ static int dt3155_read ( } } -#else - while ((frame_index = dt3155_get_ready_buffer(minor)) < 0 ) - { - int index; - if (filep->f_flags & O_NDELAY) - return 0; - - /* sleep till data arrives , or we get interrupted */ - interruptible_sleep_on(&dt3155_read_wait_queue[minor]); - for (index = 0; index < _NSIG_WORDS; index++) - { - /* - * Changing the next line of code below to this: - * if (current->pending.signal.sig[index] & - * ~current->blocked.sig[index]) - * would also work on a 2.4 kernel, however, the above - * method is preferred & more portable. - */ - if (current->signal.sig[index] & ~current->blocked.sig[index]) - { - printk ("DT3155: read: interrupted\n"); - return -EINTR; - } - } - } - -#endif - frame_info_p = &dt3155_status[minor].fbuffer.frame_info[frame_index]; /* make this an offset */ @@ -1046,12 +955,6 @@ int init_module(void) int rcode = 0; char *devname[ MAXBOARDS ]; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,1) -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - SET_MODULE_OWNER(&dt3155_fops); -#endif -#endif - devname[ 0 ] = "dt3155a"; #if MAXBOARDS == 2 devname[ 1 ] = "dt3155b"; @@ -1091,17 +994,6 @@ int init_module(void) /* Now let's find the hardware. find_PCI() will set ndevices to the * number of cards found in this machine. */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - if ( !(pcibios_present()) ) - { - printk("DT3155: Error: No PCI bios on this machine \n"); - if( unregister_chrdev( dt3155_major, "dt3155" ) != 0 ) - printk("DT3155: cleanup_module failed\n"); - - return DT_3155_FAILURE; - } - else -#endif { if ( (rcode = find_PCI()) != DT_3155_SUCCESS ) { @@ -1199,10 +1091,5 @@ void cleanup_module(void) free_irq( dt3155_status[ index ].irq, (void*)&dt3155_status[index] ); } } - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - if (MOD_IN_USE) - printk("DT3155: device busy, remove delayed\n"); -#endif } diff --git a/drivers/staging/dt3155/dt3155_drv.h b/drivers/staging/dt3155/dt3155_drv.h index dc110b76e463..215399a3d26a 100644 --- a/drivers/staging/dt3155/dt3155_drv.h +++ b/drivers/staging/dt3155/dt3155_drv.h @@ -33,13 +33,8 @@ extern u_char *dt3155_bbase; #ifdef __KERNEL__ #include -#include /* need access to LINUX_VERSION_CODE */ /* wait queue for reads */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 3, 1) extern wait_queue_head_t dt3155_read_wait_queue[MAXBOARDS]; -#else -extern struct wait_queue *dt3155_read_wait_queue[MAXBOARDS]; -#endif #endif /* number of devices */ diff --git a/drivers/staging/dt3155/dt3155_isr.c b/drivers/staging/dt3155/dt3155_isr.c index 339aee9a0925..54460dbb867a 100644 --- a/drivers/staging/dt3155/dt3155_isr.c +++ b/drivers/staging/dt3155/dt3155_isr.c @@ -435,20 +435,11 @@ static inline void internal_release_locked_buffer( int m ) *****************************************************/ inline void dt3155_release_locked_buffer( int m ) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) unsigned long int flags; local_save_flags(flags); local_irq_disable(); internal_release_locked_buffer(m); local_irq_restore(flags); -#else - int flags; - - save_flags( flags ); - cli(); - internal_release_locked_buffer( m ); - restore_flags( flags ); -#endif } @@ -460,15 +451,9 @@ inline void dt3155_release_locked_buffer( int m ) inline int dt3155_flush( int m ) { int index; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) - unsigned long int flags; - local_save_flags(flags); - local_irq_disable(); -#else - int flags; - save_flags( flags ); - cli(); -#endif + unsigned long int flags; + local_save_flags(flags); + local_irq_disable(); internal_release_locked_buffer( m ); dt3155_fbuffer[ m ]->empty_len = 0; @@ -486,11 +471,7 @@ inline int dt3155_flush( int m ) dt3155_fbuffer[ m ]->ready_head = 0; dt3155_fbuffer[ m ]->ready_len = 0; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) local_irq_restore(flags); -#else - restore_flags( flags ); -#endif return 0; } @@ -507,15 +488,9 @@ inline int dt3155_flush( int m ) inline int dt3155_get_ready_buffer( int m ) { int frame_index; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) - unsigned long int flags; - local_save_flags(flags); - local_irq_disable(); -#else - int flags; - save_flags( flags ); - cli(); -#endif + unsigned long int flags; + local_save_flags(flags); + local_irq_disable(); #ifdef DEBUG_QUES_A printques( m ); @@ -535,11 +510,7 @@ inline int dt3155_get_ready_buffer( int m ) printques( m ); #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) local_irq_restore(flags); -#else - restore_flags( flags ); -#endif return frame_index; } diff --git a/drivers/staging/dt3155/pci-compat.h b/drivers/staging/dt3155/pci-compat.h deleted file mode 100644 index 5f47d5a94d4b..000000000000 --- a/drivers/staging/dt3155/pci-compat.h +++ /dev/null @@ -1,97 +0,0 @@ - -/* This header only makes send when included in a 2.0 compile */ - -#ifndef _PCI_COMPAT_H_ -#define _PCI_COMPAT_H_ - -#ifdef __KERNEL__ - -#include /* pcibios_* */ -#include /* pcibios_* */ -#include /* kmalloc */ - -/* fake the new pci interface based on the old one: encapsulate bus/devfn */ -struct pci_fake_dev { - u8 bus; - u8 devfn; - int index; -}; -#define pci_dev pci_fake_dev /* the other pci_dev is unused by 2.0 drivers */ - -extern inline struct pci_dev *pci_find_device(unsigned int vendorid, - unsigned int devid, - struct pci_dev *from) -{ - struct pci_dev *pptr = kmalloc(sizeof(*pptr), GFP_KERNEL); - int index = 0; - int ret; - - if (!pptr) return NULL; - if (from) index = pptr->index + 1; - ret = pcibios_find_device(vendorid, devid, index, - &pptr->bus, &pptr->devfn); - if (ret) { kfree(pptr); return NULL; } - return pptr; -} - -extern inline struct pci_dev *pci_find_class(unsigned int class, - struct pci_dev *from) -{ - return NULL; /* FIXME */ -} - -extern inline void pci_release_device(struct pci_dev *dev) -{ - kfree(dev); -} - -/* struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); */ - -#define pci_present pcibios_present - -extern inline int -pci_read_config_byte(struct pci_dev *dev, u8 where, u8 *val) -{ - return pcibios_read_config_byte(dev->bus, dev->devfn, where, val); -} - -extern inline int -pci_read_config_word(struct pci_dev *dev, u8 where, u16 *val) -{ - return pcibios_read_config_word(dev->bus, dev->devfn, where, val); -} - -extern inline int -pci_read_config_dword(struct pci_dev *dev, u8 where, u32 *val) -{ - return pcibios_read_config_dword(dev->bus, dev->devfn, where, val); -} - -extern inline int -pci_write_config_byte(struct pci_dev *dev, u8 where, u8 val) -{ - return pcibios_write_config_byte(dev->bus, dev->devfn, where, val); -} - -extern inline int -pci_write_config_word(struct pci_dev *dev, u8 where, u16 val) -{ - return pcibios_write_config_word(dev->bus, dev->devfn, where, val); -} - -extern inline int -pci_write_config_dword(struct pci_dev *dev, u8 where, u32 val) -{ - return pcibios_write_config_dword(dev->bus, dev->devfn, where, val); -} - -extern inline void pci_set_master(struct pci_dev *dev) -{ - u16 cmd; - pcibios_read_config_word(dev->bus, dev->devfn, PCI_COMMAND, &cmd); - cmd |= PCI_COMMAND_MASTER; - pcibios_write_config_word(dev->bus, dev->devfn, PCI_COMMAND, cmd); -} - -#endif /* __KERNEL__ */ -#endif /* _PCI_COMPAT_H_ */ diff --git a/drivers/staging/dt3155/sysdep.h b/drivers/staging/dt3155/sysdep.h deleted file mode 100644 index 1d575d4a53ee..000000000000 --- a/drivers/staging/dt3155/sysdep.h +++ /dev/null @@ -1,820 +0,0 @@ -/* - * sysdep.h -- centralizing compatibility issues between 2.0, 2.2, 2.4 - * - * Copyright (C) 2001 Alessandro Rubini and Jonathan Corbet - * Copyright (C) 2001 O'Reilly & Associates - * - * The source code in this file can be freely used, adapted, - * and redistributed in source or binary form, so long as an - * acknowledgment appears in derived source files. The citation - * should list that the code comes from the book "Linux Device - * Drivers" by Alessandro Rubini and Jonathan Corbet, published - * by O'Reilly & Associates. No warranty is attached; - * we cannot take responsibility for errors or fitness for use. - * - * $Id: sysdep.h,v 1.2 2005/08/09 06:08:51 ssmedley Exp $ - */ - - -#ifndef _SYSDEP_H_ -#define _SYSDEP_H_ - -#ifndef LINUX_VERSION_CODE -# include -#endif - -#ifndef KERNEL_VERSION /* pre-2.1.90 didn't have it */ -# define KERNEL_VERSION(vers,rel,seq) ( ((vers)<<16) | ((rel)<<8) | (seq) ) -#endif - -/* only allow 2.0.x 2.2.y and 2.4.z */ - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,0,0) /* not < 2.0 */ -# error "This kernel is too old: not supported by this file" -#endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,7,0) /* not > 2.7, by now */ -# error "This kernel is too recent: not supported by this file" -#endif -#if (LINUX_VERSION_CODE & 0xff00) == 1 /* not 2.1 */ -# error "Please don't use linux-2.1, use 2.2, 2.4 or 2.6 instead" -#endif -#if (LINUX_VERSION_CODE & 0xff00) == 3 /* not 2.3 */ -# error "Please don't use linux-2.3, use 2.4 or 2.6 instead" -#endif - -/* remember about the current version */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0) -# define LINUX_20 -#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) -# define LINUX_22 -#else -# define LINUX_24 -#endif - -/* we can't support versioning in pre-2.4 because we #define some functions */ -#if !defined(LINUX_24) && defined(CONFIG_MODVERSIONS) -# error "This sysdep.h can't support CONFIG_MODVERSIONS" -# error "and old kernels at the same time." -# error "Either use 2.4 or avoid using versioning" -#endif - -#ifndef LINUX_20 /* include vmalloc.h if this is 2.2/2.4 */ -# ifdef VM_READ /* a typical flag defined by mm.h */ -# include -# endif -#endif - -#include - -/* Modularization issues */ -#ifdef LINUX_20 -# define __USE_OLD_SYMTAB__ -# define EXPORT_NO_SYMBOLS register_symtab(NULL); -# define REGISTER_SYMTAB(tab) register_symtab(tab) -#else -# define REGISTER_SYMTAB(tab) /* nothing */ -#endif - -#ifdef __USE_OLD_SYMTAB__ -# define __MODULE_STRING(s) /* nothing */ -# define MODULE_PARM(v,t) /* nothing */ -# define MODULE_PARM_DESC(v,t) /* nothing */ -# define MODULE_AUTHOR(n) /* nothing */ -# define MODULE_DESCRIPTION(d) /* nothing */ -# define MODULE_SUPPORTED_DEVICE(n) /* nothing */ -#endif - -/* - * In version 2.2 (up to 2.2.19, at least), the macro for request_module() - * when no kmod is there is wrong. It's a "do {} while 0" but it shouldbe int - */ -#ifdef LINUX_22 -# ifndef CONFIG_KMOD -# undef request_module -# define request_module(name) -ENOSYS -# endif -#endif - - -#ifndef LINUX_20 -# include /* module_init/module_exit */ -#endif - -#ifndef module_init -# define module_init(x) int init_module(void) { return x(); } -# define module_exit(x) void cleanup_module(void) { x(); } -#endif - -#ifndef SET_MODULE_OWNER -# define SET_MODULE_OWNER(structure) /* nothing */ -#endif - -/* - * "select" changed in 2.1.23. The implementation is twin, but this - * header is new - * - */ -#ifdef LINUX_20 -# define __USE_OLD_SELECT__ -#else -# include -#endif - -#ifdef LINUX_20 -# define INODE_FROM_F(filp) ((filp)->f_inode) -#else -# define INODE_FROM_F(filp) ((filp)->f_dentry->d_inode) -#endif - -/* Other changes in the fops are solved using wrappers */ - -/* - * Wait queues changed with 2.3 - */ -#ifndef DECLARE_WAIT_QUEUE_HEAD -# define DECLARE_WAIT_QUEUE_HEAD(head) struct wait_queue *head = NULL - typedef struct wait_queue *wait_queue_head_t; -# define init_waitqueue_head(head) (*(head)) = NULL - -/* offer wake_up_sync as an alias for wake_up */ -# define wake_up_sync(head) wake_up(head) -# define wake_up_interruptible_sync(head) wake_up_interruptible(head) - -/* Pretend we have add_wait_queue_exclusive */ -# define add_wait_queue_exclusive(q,entry) add_wait_queue ((q), (entry)) - -#endif /* no DECLARE_WAIT_QUEUE_HEAD */ - -/* - * Define wait_event for 2.0 kernels. (This ripped off directly from - * the 2.2.18 sched.h) - */ -#ifdef LINUX_20 - -#define __wait_event(wq, condition) \ -do { \ - struct wait_queue __wait; \ - \ - __wait.task = current; \ - add_wait_queue(&wq, &__wait); \ - for (;;) { \ - current->state = TASK_UNINTERRUPTIBLE; \ - mb(); \ - if (condition) \ - break; \ - schedule(); \ - } \ - current->state = TASK_RUNNING; \ - remove_wait_queue(&wq, &__wait); \ -} while (0) - -#define wait_event(wq, condition) \ -do { \ - if (condition) \ - break; \ - __wait_event(wq, condition); \ -} while (0) - -#define __wait_event_interruptible(wq, condition, ret) \ -do { \ - struct wait_queue __wait; \ - \ - __wait.task = current; \ - add_wait_queue(&wq, &__wait); \ - for (;;) { \ - current->state = TASK_INTERRUPTIBLE; \ - mb(); \ - if (condition) \ - break; \ - if (!signal_pending(current)) { \ - schedule(); \ - continue; \ - } \ - ret = -ERESTARTSYS; \ - break; \ - } \ - current->state = TASK_RUNNING; \ - remove_wait_queue(&wq, &__wait); \ -} while (0) - -#define wait_event_interruptible(wq, condition) \ -({ \ - int __ret = 0; \ - if (!(condition)) \ - __wait_event_interruptible(wq, condition, __ret); \ - __ret; \ -}) -#endif - - -/* - * 2.3 added tasklets - */ -#ifdef LINUX_24 -# define HAVE_TASKLETS -#endif - - - - -/* FIXME: implement the other versions of wake_up etc */ - - -/* - * access to user space: use the 2.2 functions, - * and implement them as macros for 2.0 - */ - -#ifdef LINUX_20 -# include -# define access_ok(t,a,sz) (verify_area((t),(void *) (a),(sz)) ? 0 : 1) -# define verify_area_20 verify_area -# define copy_to_user(t,f,n) (memcpy_tofs((t), (f), (n)), 0) -# define copy_from_user(t,f,n) (memcpy_fromfs((t), (f), (n)), 0) -# define __copy_to_user(t,f,n) copy_to_user((t), (f), (n)) -# define __copy_from_user(t,f,n) copy_from_user((t), (f), (n)) - -# define PUT_USER(val,add) (put_user((val),(add)), 0) -# define __PUT_USER(val,add) PUT_USER((val),(add)) - -# define GET_USER(dest,add) ((dest)=get_user((add)), 0) -# define __GET_USER(dest,add) GET_USER((dest),(add)) -#else -# include -# include -# define verify_area_20(t,a,sz) (0) /* == success */ -# define PUT_USER put_user -# define __PUT_USER __put_user -# define GET_USER get_user -# define __GET_USER __get_user -#endif - -/* - * Allocation issues - */ -#ifdef GFP_USER /* only if mm.h has been included */ -# ifdef LINUX_20 -# define __GFP_DMA GFP_DMA /* 2.0 didn't have the leading __ */ -# endif -# ifndef LINUX_24 -# define __GFP_HIGHMEM 0 /* was not there */ -# define GFP_HIGHUSER 0 /* idem */ -# endif - -# ifdef LINUX_20 -# define __get_free_pages(a,b) __get_free_pages((a),(b),0) -# endif -# ifndef LINUX_24 -# define get_zeroed_page get_free_page -# endif -#endif - -/* ioremap */ -#if defined(LINUX_20) && defined(_LINUX_MM_H) -# define ioremap_nocache ioremap -# ifndef __i386__ - /* This simple approach works for non-PC platforms. */ -# define ioremap vremap -# define iounmap vfree -# else /* the PC has ISA; 2.2 and 2.4 remap it, 2.0 needs not */ -extern inline void *ioremap(unsigned long phys_addr, unsigned long size) -{ - if (phys_addr >= 0xA0000 && phys_addr + size <= 0x100000) - return (void *)phys_addr; - return vremap(phys_addr, size); -} - -extern inline void iounmap(void *addr) -{ - if ((unsigned long)addr >= 0xA0000 - && (unsigned long)addr < 0x100000) - return; - vfree(addr); -} -# endif -#endif - -/* Also, define check_mem_region etc */ -#ifndef LINUX_24 -# define check_mem_region(a,b) 0 /* success */ -# define request_mem_region(a,b,c) /* nothing */ -# define release_mem_region(a,b) /* nothing */ -#endif - -/* implement capable() for 2.0 */ -#ifdef LINUX_20 -# define capable(anything) suser() -#endif - -/* The use_count of exec_domain and binfmt changed in 2.1.23 */ - -#ifdef LINUX_20 -# define INCRCOUNT(p) ((p)->module ? __MOD_INC_USE_COUNT((p)->module) : 0) -# define DECRCOUNT(p) ((p)->module ? __MOD_DEC_USE_COUNT((p)->module) : 0) -# define CURRCOUNT(p) ((p)->module && (p)->module->usecount) -#else -# define INCRCOUNT(p) ((p)->use_count++) -# define DECRCOUNT(p) ((p)->use_count--) -# define CURRCOUNT(p) ((p)->use_count) -#endif - -/* - * /proc has changed a lot across the versions... - */ -#ifdef LINUX_20 -# define USE_PROC_REGISTER -#endif - - -/* - * 2.2 didn't have create_proc_{read|info}_entry yet. - * And it looks like there are no other "interesting" entry point, as - * the rest is somehow esotique (mknod, symlink, ...) - */ -#ifdef LINUX_22 -# ifdef PROC_SUPER_MAGIC /* Only if procfs is being used */ -extern inline struct proc_dir_entry *create_proc_read_entry(const char *name, - mode_t mode, struct proc_dir_entry *base, - read_proc_t *read_proc, void * data) -{ - struct proc_dir_entry *res=create_proc_entry(name,mode,base); - if (res) { - res->read_proc=read_proc; - res->data=data; - } - return res; -} - -# ifndef create_proc_info_entry /* added in 2.2.18 */ -typedef int (get_info_t)(char *, char **, off_t, int, int); -extern inline struct proc_dir_entry *create_proc_info_entry(const char *name, - mode_t mode, struct proc_dir_entry *base, get_info_t *get_info) -{ - struct proc_dir_entry *res=create_proc_entry(name,mode,base); - if (res) res->get_info=get_info; - return res; -} -# endif /* no create_proc_info_entry */ -# endif -#endif - -#ifdef LINUX_20 -# define test_and_set_bit(nr,addr) test_bit((nr),(addr)) -# define test_and_clear_bit(nr,addr) clear_bit((nr),(addr)) -# define test_and_change_bit(nr,addr) change_bit((nr),(addr)) -#endif - - -/* 2.0 had no read and write memory barriers, and 2.2 lacks the - set_ functions */ -#ifndef LINUX_24 -# ifdef LINUX_20 -# define wmb() mb() /* this is a big penalty on non-reordering platfs */ -# define rmb() mb() /* this is a big penalty on non-reordering platfs */ -# endif /* LINUX_20 */ - -#define set_mb() do { var = value; mb(); } while (0) -#define set_wmb() do { var = value; wmb(); } while (0) -#endif /* ! LINUX_24 */ - - - -/* 2.1.30 removed these functions. Let's define them, just in case */ -#ifndef LINUX_20 -# define queue_task_irq queue_task -# define queue_task_irq_off queue_task -#endif - -/* 2.1.10 and 2.1.43 introduced new functions. They are worth using */ - -#ifdef LINUX_20 - -# include -# ifdef __LITTLE_ENDIAN -# define cpu_to_le16(x) (x) -# define cpu_to_le32(x) (x) -# define cpu_to_be16(x) htons((x)) -# define cpu_to_be32(x) htonl((x)) -# else -# define cpu_to_be16(x) (x) -# define cpu_to_be32(x) (x) - extern inline __u16 cpu_to_le16(__u16 x) { return (x<<8) | (x>>8);} - extern inline __u32 cpu_to_le32(__u32 x) { return (x>>24) | - ((x>>8)&0xff00) | ((x<<8)&0xff0000) | (x<<24);} -# endif - -# define le16_to_cpu(x) cpu_to_le16(x) -# define le32_to_cpu(x) cpu_to_le32(x) -# define be16_to_cpu(x) cpu_to_be16(x) -# define be32_to_cpu(x) cpu_to_be32(x) - -# define cpu_to_le16p(addr) (cpu_to_le16(*(addr))) -# define cpu_to_le32p(addr) (cpu_to_le32(*(addr))) -# define cpu_to_be16p(addr) (cpu_to_be16(*(addr))) -# define cpu_to_be32p(addr) (cpu_to_be32(*(addr))) - - extern inline void cpu_to_le16s(__u16 *a) {*a = cpu_to_le16(*a);} - extern inline void cpu_to_le32s(__u16 *a) {*a = cpu_to_le32(*a);} - extern inline void cpu_to_be16s(__u16 *a) {*a = cpu_to_be16(*a);} - extern inline void cpu_to_be32s(__u16 *a) {*a = cpu_to_be32(*a);} - -# define le16_to_cpup(x) cpu_to_le16p(x) -# define le32_to_cpup(x) cpu_to_le32p(x) -# define be16_to_cpup(x) cpu_to_be16p(x) -# define be32_to_cpup(x) cpu_to_be32p(x) - -# define le16_to_cpus(x) cpu_to_le16s(x) -# define le32_to_cpus(x) cpu_to_le32s(x) -# define be16_to_cpus(x) cpu_to_be16s(x) -# define be32_to_cpus(x) cpu_to_be32s(x) - -#endif - -#ifdef LINUX_20 -# define __USE_OLD_REBUILD_HEADER__ -#endif - -/* - * 2.0 didn't include sema_init, so we make our own - but only if it - * looks like semaphore.h got included. - */ -#ifdef LINUX_20 -# ifdef MUTEX_LOCKED /* Only if semaphore.h included */ - extern inline void sema_init (struct semaphore *sem, int val) - { - sem->count = val; - sem->waking = sem->lock = 0; - sem->wait = NULL; - } -# endif -#endif /* LINUX_20 */ - -/* - * In 2.0, there is no real need for spinlocks, and they weren't really - * implemented anyway. - * - * XXX the _irqsave variant should be defined eventually to do the - * right thing. - */ -#ifdef LINUX_20 -typedef int spinlock_t; -# define spin_lock(lock) -# define spin_unlock(lock) -# define spin_lock_init(lock) - -# define spin_lock_irqsave(lock,flags) do { \ - save_flags(flags); cli(); } while (0); -# define spin_unlock_irqrestore(lock,flags) restore_flags(flags); -#endif - -/* - * 2.1 stuffed the "flush" method into the middle of the file_operations - * structure. The FOP_NO_FLUSH symbol is for drivers that do not implement - * flush (most of them), it can be inserted in initializers for all 2.x - * kernel versions. - */ -#ifdef LINUX_20 -# define FOP_NO_FLUSH /* nothing */ -# define TAG_LLSEEK lseek -# define TAG_POLL select -#else -# define FOP_NO_FLUSH NULL, -# define TAG_LLSEEK llseek -# define TAG_POLL poll -#endif - - - -/* - * fasync changed in 2.2. - */ -#ifdef LINUX_20 -/* typedef struct inode *fasync_file; */ -# define fasync_file struct inode * -#else - typedef int fasync_file; -#endif - -/* kill_fasync had less arguments, and a different indirection in the first */ -#ifndef LINUX_24 -# define kill_fasync(ptrptr,sig,band) kill_fasync(*(ptrptr),(sig)) -#endif - -/* other things that are virtualized: define the new functions for the old k */ -#ifdef LINUX_20 -# define in_interrupt() (intr_count!=0) -# define mdelay(x) udelay((x)*1000) -# define signal_pending(current) ((current)->signal & ~(current)->blocked) -#endif - -#ifdef LINUX_PCI_H /* only if PCI stuff is being used */ -# ifdef LINUX_20 -# include "pci-compat.h" /* a whole set of replacement functions */ -# else -# define pci_release_device(d) /* placeholder, used in 2.0 to free stuff */ -# endif -#endif - - - -/* - * Some task state stuff - */ - -#ifndef set_current_state -# define set_current_state(s) current->state = (s); -#endif - -#ifdef LINUX_20 -extern inline void schedule_timeout(int timeout) -{ - current->timeout = jiffies + timeout; - current->state = TASK_INTERRUPTIBLE; - schedule(); - current->timeout = 0; -} - -extern inline long sleep_on_timeout(wait_queue_head_t *q, signed long timeout) -{ - signed long early = 0; - - current->timeout = jiffies + timeout; - sleep_on (q); - if (current->timeout > 0) { - early = current->timeout - jiffies; - current->timeout = 0; - } - return early; -} - - -extern inline long interruptible_sleep_on_timeout(wait_queue_head_t *q, - signed long timeout) -{ - signed long early = 0; - - current->timeout = jiffies + timeout; - interruptible_sleep_on (q); - if (current->timeout > 0) { - early = current->timeout - jiffies; - current->timeout = 0; - } - return early; -} - -#endif /* LINUX_20 */ - -/* - * Schedule_task was a late 2.4 addition. - */ -#ifndef LINUX_24 -extern inline int schedule_task(struct tq_struct *task) -{ - queue_task(task, &tq_scheduler); - return 1; -} -#endif - - -/* - * Timing issues - */ -#ifdef LINUX_20 -# define get_fast_time do_gettimeofday -#endif - -#ifdef _LINUX_DELAY_H /* only if linux/delay.h is included */ -# ifndef mdelay /* linux-2.0 */ -# ifndef MAX_UDELAY_MS -# define MAX_UDELAY_MS 5 -# endif -# define mdelay(n) (\ - (__builtin_constant_p(n) && (n)<=MAX_UDELAY_MS) ? udelay((n)*1000) : \ - ({unsigned long msec=(n); while (msec--) udelay(1000);})) -# endif /* mdelay */ -#endif /* _LINUX_DELAY_H */ - - -/* - * No del_timer_sync before 2.4 - */ -#ifndef LINUX_24 -# define del_timer_sync(timer) del_timer(timer) /* and hope */ -#endif - -/* - * mod_timer wasn't present in 2.0 - */ -#ifdef LINUX_20 -static inline int mod_timer(struct timer_list *timer, unsigned long expires) -{ - int pending = del_timer(timer); - if (pending) { - timer->expires = expires; - add_timer(timer); - } - return pending; -} -#endif -/* - * Various changes in mmap and friends. - */ - -#ifndef NOPAGE_SIGBUS -# define NOPAGE_SIGBUS NULL /* return value of the nopage memory method */ -# define NOPAGE_OOM NULL /* No real equivalent in older kernels */ -#endif - -#ifndef VM_RESERVED /* Added 2.4.0-test10 */ -# define VM_RESERVED 0 -#endif - -#ifdef LINUX_24 /* use "vm_pgoff" to get an offset */ -#define VMA_OFFSET(vma) ((vma)->vm_pgoff << PAGE_SHIFT) -#else /* use "vm_offset" */ -#define VMA_OFFSET(vma) ((vma)->vm_offset) -#endif - -#ifdef MAP_NR -#define virt_to_page(page) (mem_map + MAP_NR(page)) -#endif - -#ifndef get_page -# define get_page(p) atomic_inc(&(p)->count) -#endif - -/* - * No DMA lock in 2.0. - */ -#ifdef LINUX_20 -static inline unsigned long claim_dma_lock(void) -{ - unsigned long flags; - save_flags(flags); - cli(); - return flags; -} - -static inline void release_dma_lock(unsigned long flags) -{ - restore_flags(flags); -} -#endif - - -/* - * I/O memory was not managed by ealier kernels, define them as success - */ - -#if 0 /* FIXME: what is the right way to do request_mem_region? */ -#ifndef LINUX_24 -# define check_mem_region(start, len) 0 -# define request_mem_region(start, len, name) 0 -# define release_mem_region(start, len) 0 - - /* - * Also, request_ and release_ region used to return void. Return 0 instead - */ -# define request_region(s, l, n) ({request_region((s),(l),(n));0;}) -# define release_region(s, l) ({release_region((s),(l));0;}) - -#endif /* not LINUX_24 */ -#endif - -/* - * Block layer stuff. - */ -#ifndef LINUX_24 - -/* BLK_DEFAULT_QUEUE for use with these macros only!!!! */ -#define BLK_DEFAULT_QUEUE(major) blk_dev[(major)].request_fn -#define blk_init_queue(where,request_fn) where = request_fn; -#define blk_cleanup_queue(where) where = NULL; - -/* No QUEUE_EMPTY in older kernels */ -#ifndef QUEUE_EMPTY /* Driver can redefine it too */ -# define QUEUE_EMPTY (CURRENT != NULL) -#endif - -#ifdef RO_IOCTLS -static inline int blk_ioctl(kdev_t dev, unsigned int cmd, unsigned long arg) -{ - int err; - - switch (cmd) { - case BLKRAGET: /* return the readahead value */ - if (!arg) return -EINVAL; - err = ! access_ok(VERIFY_WRITE, arg, sizeof(long)); - if (err) return -EFAULT; - PUT_USER(read_ahead[MAJOR(dev)],(long *) arg); - return 0; - - case BLKRASET: /* set the readahead value */ - if (!capable(CAP_SYS_ADMIN)) return -EACCES; - if (arg > 0xff) return -EINVAL; /* limit it */ - read_ahead[MAJOR(dev)] = arg; - return 0; - - case BLKFLSBUF: /* flush */ - if (! capable(CAP_SYS_ADMIN)) return -EACCES; /* only root */ - fsync_dev(dev); - invalidate_buffers(dev); - return 0; - - RO_IOCTLS(dev, arg); - } - return -ENOTTY; -} -#endif /* RO_IOCTLS */ - -#ifdef LINUX_EXTENDED_PARTITION /* defined in genhd.h */ -static inline void register_disk(struct gendisk *gdev, kdev_t dev, - unsigned minors, struct file_operations *ops, long size) -{ - if (! gdev) - return; - resetup_one_dev(gdev, MINOR(dev) >> gdev->minor_shift); -} -#endif /* LINUX_EXTENDED_PARTITION */ - - -#else /* it is Linux 2.4 */ -#define HAVE_BLKPG_H -#endif /* LINUX_24 */ - - - -#ifdef LINUX_20 /* physical and virtual addresses had the same value */ -# define __pa(a) (a) -# define __va(a) (a) -#endif - -/* - * Network driver compatibility - */ - -/* - * 2.0 dev_kfree_skb had an extra arg. The following is a little dangerous - * in that it assumes that FREE_WRITE is always wanted. Very few 2.0 drivers - * use FREE_READ, but the number is *not* zero... - * - * Also: implement the non-checking versions of a couple skb functions - - * but they still check in 2.0. - */ -#ifdef LINUX_20 -# define dev_kfree_skb(skb) dev_kfree_skb((skb), FREE_WRITE); - -# define __skb_push(skb, len) skb_push((skb), (len)) -# define __skb_put(skb, len) skb_put((skb), (len)) -#endif - -/* - * Softnet changes in 2.4 - */ -#ifndef LINUX_24 -# ifdef _LINUX_NETDEVICE_H /* only if netdevice.h was included */ -# define netif_start_queue(dev) clear_bit(0, (void *) &(dev)->tbusy); -# define netif_stop_queue(dev) set_bit(0, (void *) &(dev)->tbusy); - -static inline void netif_wake_queue(struct device *dev) -{ - clear_bit(0, (void *) &(dev)->tbusy); - mark_bh(NET_BH); -} - -/* struct device became struct net_device */ -# define net_device device -# endif /* netdevice.h */ -#endif /* ! LINUX_24 */ - -/* - * Memory barrier stuff, define what's missing from older kernel versions - */ -#ifdef switch_to /* this is always a macro, defined in */ - -# ifndef set_mb -# define set_mb(var, value) do {(var) = (value); mb();} while 0 -# endif -# ifndef set_rmb -# define set_rmb(var, value) do {(var) = (value); rmb();} while 0 -# endif -# ifndef set_wmb -# define set_wmb(var, value) do {(var) = (value); wmb();} while 0 -# endif - -/* The hw barriers are defined as sw barriers. A correct thing if this - specific kernel/platform is supported but has no specific instruction */ -# ifndef mb -# define mb barrier -# endif -# ifndef rmb -# define rmb barrier -# endif -# ifndef wmb -# define wmb barrier -# endif - -#endif /* switch to (i.e. ) */ - - -#endif /* _SYSDEP_H_ */ From ef4ffb7ade54f7669172cf5cead69695e588c06a Mon Sep 17 00:00:00 2001 From: C yp Date: Wed, 6 Jan 2010 13:42:00 +0100 Subject: [PATCH 108/367] Staging: ramzswap: Minor spelling fixes Also removed an extra semicolon. Signed-off-by: Cyp Cc: Nitin Gupta Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ramzswap/Kconfig | 2 +- drivers/staging/ramzswap/ramzswap.txt | 6 +++--- drivers/staging/ramzswap/ramzswap_drv.c | 4 ++-- drivers/staging/ramzswap/ramzswap_drv.h | 6 +++--- drivers/staging/ramzswap/ramzswap_ioctl.h | 4 ++-- drivers/staging/ramzswap/xvmalloc.c | 2 +- drivers/staging/ramzswap/xvmalloc_int.h | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/ramzswap/Kconfig b/drivers/staging/ramzswap/Kconfig index 24e25691fae2..127b3c6c9596 100644 --- a/drivers/staging/ramzswap/Kconfig +++ b/drivers/staging/ramzswap/Kconfig @@ -5,7 +5,7 @@ config RAMZSWAP select LZO_DECOMPRESS default n help - Creates virtual block devices which can be used (only) as a swap + Creates virtual block devices which can (only) be used as swap disks. Pages swapped to these disks are compressed and stored in memory itself. diff --git a/drivers/staging/ramzswap/ramzswap.txt b/drivers/staging/ramzswap/ramzswap.txt index e9f1619505a0..9694acfeb43f 100644 --- a/drivers/staging/ramzswap/ramzswap.txt +++ b/drivers/staging/ramzswap/ramzswap.txt @@ -5,9 +5,9 @@ Project home: http://compcache.googlecode.com/ * Introduction -It creates RAM based block devices which can be used (only) as swap disks. -Pages swapped to these devices are compressed and stored in memory itself. -See project home for use cases, performance numbers and a lot more. +The ramzswap module creates RAM based block devices which can (only) be used as +swap disks. Pages swapped to these devices are compressed and stored in memory +itself. See project home for use cases, performance numbers and a lot more. Individual ramzswap devices are configured and initialized using rzscontrol userspace utility as shown in examples below. See rzscontrol man page for more diff --git a/drivers/staging/ramzswap/ramzswap_drv.c b/drivers/staging/ramzswap/ramzswap_drv.c index 18196f3852d8..7a7ead4e6c87 100644 --- a/drivers/staging/ramzswap/ramzswap_drv.c +++ b/drivers/staging/ramzswap/ramzswap_drv.c @@ -730,7 +730,7 @@ static int ramzswap_read(struct ramzswap *rzs, struct bio *bio) if (!rzs->table[index].page) return handle_ramzswap_fault(rzs, bio); - /* Page is stored uncompressed since its incompressible */ + /* Page is stored uncompressed since it's incompressible */ if (unlikely(rzs_test_flag(rzs, index, RZS_UNCOMPRESSED))) return handle_uncompressed_page(rzs, bio); @@ -792,7 +792,7 @@ static int ramzswap_write(struct ramzswap *rzs, struct bio *bio) ramzswap_free_page(rzs, index); /* - * No memory ia allocated for zero filled pages. + * No memory is allocated for zero filled pages. * Simply clear zero page flag. */ if (rzs_test_flag(rzs, index, RZS_ZERO)) { diff --git a/drivers/staging/ramzswap/ramzswap_drv.h b/drivers/staging/ramzswap/ramzswap_drv.h index a6ea240935b6..7ba98bfee2d6 100644 --- a/drivers/staging/ramzswap/ramzswap_drv.h +++ b/drivers/staging/ramzswap/ramzswap_drv.h @@ -102,7 +102,7 @@ struct table { u16 offset; u8 count; /* object ref count (not yet used) */ u8 flags; -} __attribute__((aligned(4)));; +} __attribute__((aligned(4))); /* * Swap extent information in case backing swap is a regular @@ -121,8 +121,8 @@ struct ramzswap_stats { #if defined(CONFIG_RAMZSWAP_STATS) u64 num_reads; /* failed + successful */ u64 num_writes; /* --do-- */ - u64 failed_reads; /* can happen when memory is too low */ - u64 failed_writes; /* should NEVER! happen */ + u64 failed_reads; /* should NEVER! happen */ + u64 failed_writes; /* can happen when memory is too low */ u64 invalid_io; /* non-swap I/O requests */ u32 pages_zero; /* no. of zero filled pages */ u32 pages_stored; /* no. of pages currently stored */ diff --git a/drivers/staging/ramzswap/ramzswap_ioctl.h b/drivers/staging/ramzswap/ramzswap_ioctl.h index c713a09af580..1bc54e22c915 100644 --- a/drivers/staging/ramzswap/ramzswap_ioctl.h +++ b/drivers/staging/ramzswap/ramzswap_ioctl.h @@ -24,8 +24,8 @@ struct ramzswap_ioctl_stats { * size (if present) */ u64 num_reads; /* failed + successful */ u64 num_writes; /* --do-- */ - u64 failed_reads; /* can happen when memory is too low */ - u64 failed_writes; /* should NEVER! happen */ + u64 failed_reads; /* should NEVER! happen */ + u64 failed_writes; /* can happen when memory is too low */ u64 invalid_io; /* non-swap I/O requests */ u32 pages_zero; /* no. of zero filled pages */ u32 good_compress_pct; /* no. of pages with compression ratio<=50% */ diff --git a/drivers/staging/ramzswap/xvmalloc.c b/drivers/staging/ramzswap/xvmalloc.c index b3e986c33141..dabd266a427b 100644 --- a/drivers/staging/ramzswap/xvmalloc.c +++ b/drivers/staging/ramzswap/xvmalloc.c @@ -273,7 +273,7 @@ static void remove_block(struct xv_pool *pool, struct page *page, u32 offset, } /* - * Allocate a page and add it freelist of given pool. + * Allocate a page and add it to freelist of given pool. */ static int grow_pool(struct xv_pool *pool, gfp_t flags) { diff --git a/drivers/staging/ramzswap/xvmalloc_int.h b/drivers/staging/ramzswap/xvmalloc_int.h index 03c1a652a3aa..263c72d1fb3d 100644 --- a/drivers/staging/ramzswap/xvmalloc_int.h +++ b/drivers/staging/ramzswap/xvmalloc_int.h @@ -62,7 +62,7 @@ struct link_free { struct block_header { union { - /* This common header must be ALIGN bytes */ + /* This common header must be XV_ALIGN bytes */ u8 common[XV_ALIGN]; struct { u16 size; From 5d3aed742498ffe5692e3f974f3f7ea0e99a93bb Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Mon, 28 Dec 2009 18:57:51 +0200 Subject: [PATCH 109/367] Staging: comedi: off by one in doDevConfig() Changed > to >= to avoid array overflow. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/comedi_bond.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/comedi_bond.c b/drivers/staging/comedi/drivers/comedi_bond.c index cf39a24ddd4c..d7260cc86985 100644 --- a/drivers/staging/comedi/drivers/comedi_bond.c +++ b/drivers/staging/comedi/drivers/comedi_bond.c @@ -417,7 +417,7 @@ static int doDevConfig(struct comedi_device *dev, struct comedi_devconfig *it) int sdev = -1, nchans, tmp; struct BondedDevice *bdev = NULL; - if (minor < 0 || minor > COMEDI_NUM_BOARD_MINORS) { + if (minor < 0 || minor >= COMEDI_NUM_BOARD_MINORS) { ERROR("Minor %d is invalid!\n", minor); return 0; } From 4b2ba24399cfcd7c80a20cd3bbedc5df0ebd4345 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Mon, 28 Dec 2009 18:59:01 +0200 Subject: [PATCH 110/367] Staging: comedi: reorder check in pcmmio_attach() The check for dio_num_asics is used to determine if there is more than 1 irq. If it is false then irq[1] is past the end of the array. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcmmio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drivers/staging/comedi/drivers/pcmmio.c index 35ba93989a36..6ca4105610c1 100644 --- a/drivers/staging/comedi/drivers/pcmmio.c +++ b/drivers/staging/comedi/drivers/pcmmio.c @@ -550,7 +550,7 @@ static int pcmmio_attach(struct comedi_device *dev, struct comedi_devconfig *it) if (irq[0]) { printk("irq: %u ", irq[0]); - if (irq[1] && thisboard->dio_num_asics == 2) + if (thisboard->dio_num_asics == 2 && irq[1]) printk("second ASIC irq: %u ", irq[1]); } else { printk("(IRQ mode disabled) "); From 7a02f549fcc30fe6be0c0024beae9a3db22e1af6 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Mon, 28 Dec 2009 18:59:46 +0200 Subject: [PATCH 111/367] Staging: cx25821: fix double unlock in medusa_video_init() medusa_set_videostandard() takes the lock but it always drops it before returning. This was found with a static checker and compile tested only. :/ Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- drivers/staging/cx25821/cx25821-medusa-video.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/cx25821/cx25821-medusa-video.c b/drivers/staging/cx25821/cx25821-medusa-video.c index 1eb079b3d429..d6016200d699 100644 --- a/drivers/staging/cx25821/cx25821-medusa-video.c +++ b/drivers/staging/cx25821/cx25821-medusa-video.c @@ -795,10 +795,8 @@ int medusa_video_init(struct cx25821_dev *dev) value &= 0xFFFFFFDF; ret_val = cx25821_i2c_write(&dev->i2c_bus[0], MON_A_CTRL, value); - if (ret_val < 0) { - mutex_unlock(&dev->lock); + if (ret_val < 0) return -EINVAL; - } mutex_unlock(&dev->lock); From ed30013207ef3e36da4f39db1298ae53f799e29c Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Mon, 28 Dec 2009 19:00:24 +0200 Subject: [PATCH 112/367] Staging: cx25821: off by one in cx25821_enum_input() The INPUT(n) macro indexes an array of size 2. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- drivers/staging/cx25821/cx25821-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/cx25821/cx25821-video.c b/drivers/staging/cx25821/cx25821-video.c index c7c14c7698a7..6e710ae067ad 100644 --- a/drivers/staging/cx25821/cx25821-video.c +++ b/drivers/staging/cx25821/cx25821-video.c @@ -876,7 +876,7 @@ int cx25821_enum_input(struct cx25821_dev *dev, struct v4l2_input *i) dprintk(1, "%s()\n", __func__); n = i->index; - if (n > 2) + if (n >= 2) return -EINVAL; if (0 == INPUT(n)->type) From 1c7e4a7c326c916918b5a29051db4f93973e775a Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Mon, 28 Dec 2009 19:01:34 +0200 Subject: [PATCH 113/367] Staging: otus: off by one in usbdrvwext_siwessid() A 33 char ESSID is too long and it could cause a buffer overflow a couple lines below when we put a NULL terminator on the end. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- drivers/staging/otus/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/otus/ioctl.c b/drivers/staging/otus/ioctl.c index 6808e69fb354..86d93330acad 100644 --- a/drivers/staging/otus/ioctl.c +++ b/drivers/staging/otus/ioctl.c @@ -930,7 +930,7 @@ int usbdrvwext_siwessid(struct net_device *dev, return -EINVAL; if (essid->flags == 1) { - if (essid->length > (IW_ESSID_MAX_SIZE + 1)) + if (essid->length > IW_ESSID_MAX_SIZE) return -E2BIG; if (copy_from_user(&EssidBuf, essid->pointer, essid->length)) From 28a2333413b2fbb74b35d55e1dd8c349dc825a16 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Mon, 28 Dec 2009 19:21:34 -0500 Subject: [PATCH 114/367] Staging: et131x_netdev.c: use %pM to shown MAC address Trivial, use the %pM kernel extension to display the MAC address. Signed-off-by: H Hartley Sweeten Cc: Olaf Hartmann Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et131x_netdev.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/et131x/et131x_netdev.c b/drivers/staging/et131x/et131x_netdev.c index 24d97b4fa6fb..c63032fa88c5 100644 --- a/drivers/staging/et131x/et131x_netdev.c +++ b/drivers/staging/et131x/et131x_netdev.c @@ -674,12 +674,8 @@ int et131x_set_mac_addr(struct net_device *netdev, void *new_mac) memcpy(netdev->dev_addr, address->sa_data, netdev->addr_len); - printk(KERN_INFO - "%s: Setting MAC address to %02x:%02x:%02x:%02x:%02x:%02x\n", - netdev->name, - netdev->dev_addr[0], netdev->dev_addr[1], - netdev->dev_addr[2], netdev->dev_addr[3], - netdev->dev_addr[4], netdev->dev_addr[5]); + printk(KERN_INFO "%s: Setting MAC address to %pM\n", + netdev->name, netdev->dev_addr); /* Free Rx DMA memory */ et131x_adapter_memory_free(adapter); From 820793c396846e5885b0d28c68512d08b5cb77cf Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Mon, 28 Dec 2009 19:28:11 -0500 Subject: [PATCH 115/367] Staging: r8192E_core.c: use %pM to shown MAC address Trivial, use the %pM kernel extension to display the MAC address. Signed-off-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192e/r8192E_core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c index d3105281d31e..50c760284df4 100644 --- a/drivers/staging/rtl8192e/r8192E_core.c +++ b/drivers/staging/rtl8192e/r8192E_core.c @@ -2814,10 +2814,7 @@ static void rtl8192_read_eeprom_info(struct net_device* dev) memcpy(dev->dev_addr, bMac_Tmp_Addr, 6); } - RT_TRACE(COMP_INIT, "Permanent Address = %02x-%02x-%02x-%02x-%02x-%02x\n", - dev->dev_addr[0], dev->dev_addr[1], - dev->dev_addr[2], dev->dev_addr[3], - dev->dev_addr[4], dev->dev_addr[5]); + RT_TRACE(COMP_INIT, "Permanent Address = %pM\n", dev->dev_addr); //2 TX Power Check EEPROM Fail or not if(priv->card_8192_version > VERSION_8190_BD) { From 6756993bafb436af088dacdef92b756f5f96134e Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Mon, 28 Dec 2009 19:33:17 -0500 Subject: [PATCH 116/367] r8192U_core.c: use %pM to shown MAC address Trivial, use the %pM kernel extension to display the MAC address. Signed-off-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192su/r8192U_core.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c index ecfa91b56c8d..27c45fbbcca5 100644 --- a/drivers/staging/rtl8192su/r8192U_core.c +++ b/drivers/staging/rtl8192su/r8192U_core.c @@ -3426,10 +3426,9 @@ rtl8192SU_ConfigAdapterInfo8192SForAutoLoadFail(struct net_device* dev) write_nic_dword(dev, IDR0, ((u32*)dev->dev_addr)[0]); write_nic_word(dev, IDR4, ((u16*)(dev->dev_addr + 4))[0]); - RT_TRACE(COMP_INIT, "ReadAdapterInfo8192SEFuse(), Permanent Address = %02x-%02x-%02x-%02x-%02x-%02x\n", - dev->dev_addr[0], dev->dev_addr[1], - dev->dev_addr[2], dev->dev_addr[3], - dev->dev_addr[4], dev->dev_addr[5]); + RT_TRACE(COMP_INIT, + "ReadAdapterInfo8192SEFuse(), Permanent Address = %pM\n", + dev->dev_addr); priv->EEPROMBoardType = EEPROM_Default_BoardType; priv->rf_type = RF_1T2R; //RF_2T2R @@ -3767,10 +3766,9 @@ rtl8192SU_ReadAdapterInfo8192SUsb(struct net_device* dev) write_nic_dword(dev, IDR0, ((u32*)dev->dev_addr)[0]); write_nic_word(dev, IDR4, ((u16*)(dev->dev_addr + 4))[0]); - RT_TRACE(COMP_INIT, "ReadAdapterInfo8192SEFuse(), Permanent Address = %02x-%02x-%02x-%02x-%02x-%02x\n", - dev->dev_addr[0], dev->dev_addr[1], - dev->dev_addr[2], dev->dev_addr[3], - dev->dev_addr[4], dev->dev_addr[5]); + RT_TRACE(COMP_INIT, + "ReadAdapterInfo8192SEFuse(), Permanent Address = %pM\n", + dev->dev_addr); // // Get CustomerID(Boad Type) From 00367a6d7caae9c6b077e177aeebad5b0a91ea62 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Mon, 28 Dec 2009 19:38:22 -0500 Subject: [PATCH 117/367] Staging: vt6655/device_main.c: use %pM to shown MAC address Trivial, use the %pM kernel extension to display the MAC address. Signed-off-by: H Hartley Sweeten Cc: Forest Bond Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vt6655/device_main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 0db8d7b6e79c..ddf3aa04db09 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -1105,10 +1105,7 @@ static void device_print_info(PSDevice pDevice) struct net_device* dev=pDevice->dev; DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "%s: %s\n",dev->name, get_chip_name(pDevice->chip_id)); - DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "%s: MAC=%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X", - dev->name, - dev->dev_addr[0],dev->dev_addr[1],dev->dev_addr[2], - dev->dev_addr[3],dev->dev_addr[4],dev->dev_addr[5]); + DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "%s: MAC=%pM", dev->name, dev->dev_addr); #ifdef IO_MAP DBG_PRT(MSG_LEVEL_INFO, KERN_INFO" IO=0x%lx ",(ULONG) pDevice->ioaddr); DBG_PRT(MSG_LEVEL_INFO, KERN_INFO" IRQ=%d \n", pDevice->dev->irq); From 88e05d854cbbd583d528be9295a74586f920492b Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 30 Dec 2009 18:10:18 +0200 Subject: [PATCH 118/367] Staging: rtl8192su: buffer overflow in r8192U_core.c There was a buffer overflow in the original code. rf_path was 2 and it should have been only 0 or 1. I don't have the hardware for this, so I can't test it. Looking at the code, there are two almost identical sections for updating the hal variables. The first one was clearly wrong and had the array overflow as well. The second one looked correct. I decided to use the second section as is except for whitespace changes. The differences between the two original sections: 1) The second one had more debug output. 2) The second one looped over rf_path instead of corrupting data. 3) The second one had these additional assigments. if (rf_path == 0) { priv->TxPowerLevelOFDM24G[i] = priv->RfTxPwrLevelOfdm1T[rf_path][i] ; priv->TxPowerLevelCCK[i] = priv->RfTxPwrLevelCck[rf_path][i]; } Signed-off-by: Dan Carpenter Cc: Jerry chuang Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192su/r8192U_core.c | 127 ++++++++---------------- 1 file changed, 43 insertions(+), 84 deletions(-) diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c index 27c45fbbcca5..f15be1eca324 100644 --- a/drivers/staging/rtl8192su/r8192U_core.c +++ b/drivers/staging/rtl8192su/r8192U_core.c @@ -3359,6 +3359,46 @@ u8 rtl8192SU_BoardTypeToRFtype(struct net_device* dev, u8 Boardtype) return RFtype; } +void update_hal_variables(struct r8192_priv *priv) +{ + int rf_path; + int i; + u8 index; + + for (rf_path = 0; rf_path < 2; rf_path++) { + for (i = 0; i < 3; i++) { + RT_TRACE((COMP_INIT), "CCK RF-%d CHan_Area-%d = 0x%x\n", rf_path, i, priv->RfCckChnlAreaTxPwr[rf_path][i]); + RT_TRACE((COMP_INIT), "OFDM-1T RF-%d CHan_Area-%d = 0x%x\n", rf_path, i, priv->RfOfdmChnlAreaTxPwr1T[rf_path][i]); + RT_TRACE((COMP_INIT), "OFDM-2T RF-%d CHan_Area-%d = 0x%x\n", rf_path, i, priv->RfOfdmChnlAreaTxPwr2T[rf_path][i]); + } + /* Assign dedicated channel tx power */ + for(i = 0; i < 14; i++) { + /* channel 1-3 use the same Tx Power Level. */ + if (i < 3) /* Channel 1-3 */ + index = 0; + else if (i < 9) /* Channel 4-9 */ + index = 1; + else /* Channel 10-14 */ + index = 2; + /* Record A & B CCK /OFDM - 1T/2T Channel area tx power */ + priv->RfTxPwrLevelCck[rf_path][i] = priv->RfCckChnlAreaTxPwr[rf_path][index]; + priv->RfTxPwrLevelOfdm1T[rf_path][i] = priv->RfOfdmChnlAreaTxPwr1T[rf_path][index]; + priv->RfTxPwrLevelOfdm2T[rf_path][i] = priv->RfOfdmChnlAreaTxPwr2T[rf_path][index]; + if (rf_path == 0) { + priv->TxPowerLevelOFDM24G[i] = priv->RfTxPwrLevelOfdm1T[rf_path][i] ; + priv->TxPowerLevelCCK[i] = priv->RfTxPwrLevelCck[rf_path][i]; + } + } + for(i = 0; i < 14; i++) { + RT_TRACE((COMP_INIT), + "Rf-%d TxPwr CH-%d CCK OFDM_1T OFDM_2T= 0x%x/0x%x/0x%x\n", + rf_path, i, priv->RfTxPwrLevelCck[rf_path][i], + priv->RfTxPwrLevelOfdm1T[rf_path][i] , + priv->RfTxPwrLevelOfdm2T[rf_path][i] ); + } + } +} + // // Description: // Config HW adapter information into initial value. @@ -3374,7 +3414,7 @@ rtl8192SU_ConfigAdapterInfo8192SForAutoLoadFail(struct net_device* dev) struct r8192_priv *priv = ieee80211_priv(dev); //u16 i,usValue; //u8 sMacAddr[6] = {0x00, 0xE0, 0x4C, 0x81, 0x92, 0x00}; - u8 rf_path, index; // For EEPROM/EFUSE After V0.6_1117 + u8 rf_path; // For EEPROM/EFUSE After V0.6_1117 int i; RT_TRACE(COMP_INIT, "====> ConfigAdapterInfo8192SForAutoLoadFail\n"); @@ -3454,42 +3494,7 @@ rtl8192SU_ConfigAdapterInfo8192SForAutoLoadFail(struct net_device* dev) } } - for (i = 0; i < 3; i++) - { - //RT_TRACE((COMP_EFUSE), "CCK RF-%d CHan_Area-%d = 0x%x\n", rf_path, i, - //priv->RfCckChnlAreaTxPwr[rf_path][i]); - //RT_TRACE((COMP_EFUSE), "OFDM-1T RF-%d CHan_Area-%d = 0x%x\n", rf_path, i, - //priv->RfOfdmChnlAreaTxPwr1T[rf_path][i]); - //RT_TRACE((COMP_EFUSE), "OFDM-2T RF-%d CHan_Area-%d = 0x%x\n", rf_path, i, - //priv->RfOfdmChnlAreaTxPwr2T[rf_path][i]); - } - - // Assign dedicated channel tx power - for(i=0; i<14; i++) // channel 1~3 use the same Tx Power Level. - { - if (i < 3) // Cjanel 1-3 - index = 0; - else if (i < 9) // Channel 4-9 - index = 1; - else // Channel 10-14 - index = 2; - - // Record A & B CCK /OFDM - 1T/2T Channel area tx power - priv->RfTxPwrLevelCck[rf_path][i] = - priv->RfCckChnlAreaTxPwr[rf_path][index]; - priv->RfTxPwrLevelOfdm1T[rf_path][i] = - priv->RfOfdmChnlAreaTxPwr1T[rf_path][index]; - priv->RfTxPwrLevelOfdm2T[rf_path][i] = - priv->RfOfdmChnlAreaTxPwr2T[rf_path][index]; - } - - for(i=0; i<14; i++) - { - //RT_TRACE((COMP_EFUSE), "Rf-%d TxPwr CH-%d CCK OFDM_1T OFDM_2T= 0x%x/0x%x/0x%x\n", - //rf_path, i, priv->RfTxPwrLevelCck[0][i], - //priv->RfTxPwrLevelOfdm1T[0][i] , - //priv->RfTxPwrLevelOfdm2T[0][i] ); - } + update_hal_variables(priv); // // Update remained HAL variables. @@ -3899,53 +3904,7 @@ rtl8192SU_ReadAdapterInfo8192SUsb(struct net_device* dev) } } -// - // Update Tx Power HAL variables. -// - for (rf_path = 0; rf_path < 2; rf_path++) - { - for (i = 0; i < 3; i++) - { - RT_TRACE((COMP_INIT), "CCK RF-%d CHan_Area-%d = 0x%x\n", rf_path, i, - priv->RfCckChnlAreaTxPwr[rf_path][i]); - RT_TRACE((COMP_INIT), "OFDM-1T RF-%d CHan_Area-%d = 0x%x\n", rf_path, i, - priv->RfOfdmChnlAreaTxPwr1T[rf_path][i]); - RT_TRACE((COMP_INIT), "OFDM-2T RF-%d CHan_Area-%d = 0x%x\n", rf_path, i, priv->RfOfdmChnlAreaTxPwr2T[rf_path][i]); - } - - // Assign dedicated channel tx power - for(i=0; i<14; i++) // channel 1~3 use the same Tx Power Level. - { - if (i < 3) // Cjanel 1-3 - index = 0; - else if (i < 9) // Channel 4-9 - index = 1; - else // Channel 10-14 - index = 2; - - // Record A & B CCK /OFDM - 1T/2T Channel area tx power - priv->RfTxPwrLevelCck[rf_path][i] = - priv->RfCckChnlAreaTxPwr[rf_path][index]; - priv->RfTxPwrLevelOfdm1T[rf_path][i] = - priv->RfOfdmChnlAreaTxPwr1T[rf_path][index]; - priv->RfTxPwrLevelOfdm2T[rf_path][i] = - priv->RfOfdmChnlAreaTxPwr2T[rf_path][index]; - if (rf_path == 0) - { - priv->TxPowerLevelOFDM24G[i] = priv->RfTxPwrLevelOfdm1T[rf_path][i] ; - priv->TxPowerLevelCCK[i] = priv->RfTxPwrLevelCck[rf_path][i]; - } - } - - for(i=0; i<14; i++) - { - RT_TRACE((COMP_INIT), - "Rf-%d TxPwr CH-%d CCK OFDM_1T OFDM_2T= 0x%x/0x%x/0x%x\n", - rf_path, i, priv->RfTxPwrLevelCck[rf_path][i], - priv->RfTxPwrLevelOfdm1T[rf_path][i] , - priv->RfTxPwrLevelOfdm2T[rf_path][i] ); - } - } + update_hal_variables(priv); } // From f3557cc180b73308048867b591111df6436987ff Mon Sep 17 00:00:00 2001 From: Benjamin Adolphi Date: Thu, 31 Dec 2009 21:54:46 +1300 Subject: [PATCH 119/367] Staging: rar: Fix all coding style issues. This fixes all coding style issues and some spelling mistakes. Signed-off-by: Benjamin Adolphi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rar/rar_driver.c | 132 +++++++++++++++---------------- drivers/staging/rar/rar_driver.h | 68 +++++++--------- 2 files changed, 93 insertions(+), 107 deletions(-) diff --git a/drivers/staging/rar/rar_driver.c b/drivers/staging/rar/rar_driver.c index d85d1890e81e..b91a90f4ce9e 100644 --- a/drivers/staging/rar/rar_driver.c +++ b/drivers/staging/rar/rar_driver.c @@ -68,7 +68,8 @@ static void __exit rar_exit_handler(void); /* function that is activated on the successfull probe of the RAR device */ -static int __devinit rar_probe(struct pci_dev *pdev, const struct pci_device_id *ent); +static int __devinit rar_probe(struct pci_dev *pdev, + const struct pci_device_id *ent); static struct pci_device_id rar_pci_id_tbl[] = { { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4110) }, @@ -86,9 +87,9 @@ static struct pci_driver rar_pci_driver = { /* This function is used to retrieved RAR info using the IPC message bus interface */ -static int memrar_get_rar_addr(struct pci_dev* pdev, - int offset, - u32 *addr) +static int memrar_get_rar_addr(struct pci_dev *pdev, + int offset, + u32 *addr) { /* * ======== The Lincroft Message Bus Interface ======== @@ -140,29 +141,29 @@ static int memrar_get_rar_addr(struct pci_dev* pdev, | (offset << 8) | (LNC_MESSAGE_BYTE_WRITE_ENABLES << 4); - printk(KERN_WARNING "rar- offset to LNC MSG is %x\n",offset); + printk(KERN_WARNING "rar- offset to LNC MSG is %x\n", offset); if (addr == 0) return -EINVAL; /* Send the control message */ result = pci_write_config_dword(pdev, - LNC_MCR_OFFSET, - message); + LNC_MCR_OFFSET, + message); - printk(KERN_WARNING "rar- result from send ctl register is %x\n" - ,result); + printk(KERN_WARNING "rar- result from send ctl register is %x\n", + result); if (!result) result = pci_read_config_dword(pdev, - LNC_MDR_OFFSET, - addr); + LNC_MDR_OFFSET, + addr); printk(KERN_WARNING "rar- result from read data register is %x\n", - result); + result); printk(KERN_WARNING "rar- value read from data register is %x\n", - *addr); + *addr); if (result) return -1; @@ -170,9 +171,9 @@ static int memrar_get_rar_addr(struct pci_dev* pdev, return 0; } -static int memrar_set_rar_addr(struct pci_dev* pdev, - int offset, - u32 addr) +static int memrar_set_rar_addr(struct pci_dev *pdev, + int offset, + u32 addr) { /* * ======== The Lincroft Message Bus Interface ======== @@ -225,29 +226,29 @@ static int memrar_set_rar_addr(struct pci_dev* pdev, | (offset << 8) | (LNC_MESSAGE_BYTE_WRITE_ENABLES << 4); - printk(KERN_WARNING "rar- offset to LNC MSG is %x\n",offset); + printk(KERN_WARNING "rar- offset to LNC MSG is %x\n", offset); if (addr == 0) return -EINVAL; /* Send the control message */ result = pci_write_config_dword(pdev, - LNC_MDR_OFFSET, - addr); + LNC_MDR_OFFSET, + addr); - printk(KERN_WARNING "rar- result from send ctl register is %x\n" - ,result); + printk(KERN_WARNING "rar- result from send ctl register is %x\n", + result); if (!result) result = pci_write_config_dword(pdev, - LNC_MCR_OFFSET, - message); + LNC_MCR_OFFSET, + message); printk(KERN_WARNING "rar- result from write data register is %x\n", - result); + result); printk(KERN_WARNING "rar- value read to data register is %x\n", - addr); + addr); if (result) return -1; @@ -284,35 +285,36 @@ static int memrar_init_rar_params(struct pci_dev *pdev) /* struct pci_dev *pdev = pci_get_bus_and_slot(0, PCI_DEVFN(0,0)); */ if (pdev == NULL) - return -ENODEV; + return -ENODEV; for (i = offsets; i != end; ++i, ++n) { - if (memrar_get_rar_addr (pdev, - (*i).low, - &(rar_addr[n].low)) != 0 - || memrar_get_rar_addr (pdev, - (*i).high, - &(rar_addr[n].high)) != 0) { - result = -1; - break; - } + if (memrar_get_rar_addr(pdev, + (*i).low, + &(rar_addr[n].low)) != 0 + || memrar_get_rar_addr(pdev, + (*i).high, + &(rar_addr[n].high)) != 0) { + result = -1; + break; + } } /* Done accessing the device. */ /* pci_dev_put(pdev); */ if (result == 0) { - if(1) { - size_t z; - for (z = 0; z != MRST_NUM_RAR; ++z) { - printk(KERN_WARNING "rar - BRAR[%Zd] physical address low\n" - "\tlow: 0x%08x\n" - "\thigh: 0x%08x\n", - z, - rar_addr[z].low, - rar_addr[z].high); + if (1) { + size_t z; + for (z = 0; z != MRST_NUM_RAR; ++z) { + printk(KERN_WARNING + "rar - BRAR[%Zd] physical address low\n" + "\tlow: 0x%08x\n" + "\thigh: 0x%08x\n", + z, + rar_addr[z].low, + rar_addr[z].high); } - } + } } return result; @@ -321,7 +323,8 @@ static int memrar_init_rar_params(struct pci_dev *pdev) /* function that is activated on the successfull probe of the RAR device */ -static int __devinit rar_probe(struct pci_dev *pdev, const struct pci_device_id *ent) +static int __devinit rar_probe(struct pci_dev *pdev, + const struct pci_device_id *ent) { /* error */ int error; @@ -347,7 +350,7 @@ static int __devinit rar_probe(struct pci_dev *pdev, const struct pci_device_id /* Initialize the RAR parameters, which have to be retrieved */ /* via the message bus service */ - error=memrar_init_rar_params(rar_dev); + error = memrar_init_rar_params(rar_dev); if (error) { DEBUG_PRINT_0(RAR_DEBUG_LEVEL_EXTENDED, @@ -362,8 +365,8 @@ end_function: } /* - this function registers th driver to - the device subsystem( either PCI, USB, etc) + this function registers the driver to + the device subsystem (either PCI, USB, etc) */ static int __init rar_init_handler(void) { @@ -396,25 +399,20 @@ MODULE_LICENSE("GPL"); * The function returns a 0 upon success or a -1 if there is no RAR * facility on this system. */ -int get_rar_address(int rar_index,struct RAR_address_struct *addresses) +int get_rar_address(int rar_index, struct RAR_address_struct *addresses) { if (registered && (rar_index < 3) && (rar_index >= 0)) { - *addresses=rar_addr[rar_index]; + *addresses = rar_addr[rar_index]; /* strip off lock bit information */ addresses->low = addresses->low & 0xfffffff0; addresses->high = addresses->high & 0xfffffff0; return 0; - } - - else { + } else return -ENODEV; - } } - - EXPORT_SYMBOL(get_rar_address); -/* The lock_rar function is ued by other device drivers to lock an RAR. +/* The lock_rar function is used by other device drivers to lock an RAR. * once an RAR is locked, it stays locked until the next system reboot. * The function takes one parameter: * @@ -429,16 +427,14 @@ int lock_rar(int rar_index) { u32 working_addr; int result; -if (registered && (rar_index < 3) && (rar_index >= 0)) { - /* first make sure that lock bits are clear (this does lock) */ - working_addr=rar_addr[rar_index].low & 0xfffffff0; - /* now send that value to the register using the IPC */ - result=memrar_set_rar_addr(rar_dev,rar_index,working_addr); - return result; - } + if (registered && (rar_index < 3) && (rar_index >= 0)) { + /* first make sure that lock bits are clear (this does lock) */ + working_addr = rar_addr[rar_index].low & 0xfffffff0; -else { - return -ENODEV; - } + /* now send that value to the register using the IPC */ + result = memrar_set_rar_addr(rar_dev, rar_index, working_addr); + return result; + } else + return -ENODEV; } diff --git a/drivers/staging/rar/rar_driver.h b/drivers/staging/rar/rar_driver.h index 3690f984ff55..4172fbf36327 100644 --- a/drivers/staging/rar/rar_driver.h +++ b/drivers/staging/rar/rar_driver.h @@ -1,7 +1,7 @@ /* === RAR Physical Addresses === */ struct RAR_address_struct { - u32 low; - u32 high; + u32 low; + u32 high; }; /* The get_rar_address function is used by other device drivers @@ -19,10 +19,10 @@ struct RAR_address_struct { * The function returns a 0 upon success or a -1 if there is no RAR * facility on this system. */ -int get_rar_address(int rar_index,struct RAR_address_struct *addresses); +int get_rar_address(int rar_index, struct RAR_address_struct *addresses); -/* The lock_rar function is ued by other device drivers to lock an RAR. +/* The lock_rar function is used by other device drivers to lock an RAR. * once an RAR is locked, it stays locked until the next system reboot. * The function takes one parameter: * @@ -49,51 +49,41 @@ int lock_rar(int rar_index); /* debug macro without paramaters */ #define DEBUG_PRINT_0(DEBUG_LEVEL , info) \ -do \ -{ \ - if(DEBUG_LEVEL) \ - { \ - printk(KERN_WARNING info); \ - } \ -}while(0) +do { \ + if (DEBUG_LEVEL) { \ + printk(KERN_WARNING info); \ + } \ +} while (0) /* debug macro with 1 paramater */ #define DEBUG_PRINT_1(DEBUG_LEVEL , info , param1) \ -do \ -{ \ - if(DEBUG_LEVEL) \ - { \ - printk(KERN_WARNING info , param1); \ - } \ -}while(0) +do { \ + if (DEBUG_LEVEL) { \ + printk(KERN_WARNING info , param1); \ + } \ +} while (0) /* debug macro with 2 paramaters */ #define DEBUG_PRINT_2(DEBUG_LEVEL , info , param1, param2) \ -do \ -{ \ - if(DEBUG_LEVEL) \ - { \ - printk(KERN_WARNING info , param1, param2); \ - } \ -}while(0) +do { \ + if (DEBUG_LEVEL) { \ + printk(KERN_WARNING info , param1, param2); \ + } \ +} while (0) /* debug macro with 3 paramaters */ #define DEBUG_PRINT_3(DEBUG_LEVEL , info , param1, param2 , param3) \ -do \ -{ \ - if(DEBUG_LEVEL) \ - { \ - printk(KERN_WARNING info , param1, param2 , param3); \ - } \ -}while(0) +do { \ + if (DEBUG_LEVEL) { \ + printk(KERN_WARNING info , param1, param2 , param3); \ + } \ +} while (0) /* debug macro with 4 paramaters */ #define DEBUG_PRINT_4(DEBUG_LEVEL , info , param1, param2 , param3 , param4) \ -do \ -{ \ - if(DEBUG_LEVEL) \ - { \ - printk(KERN_WARNING info , param1, param2 , param3 , param4); \ - } \ -}while(0) +do { \ + if (DEBUG_LEVEL) { \ + printk(KERN_WARNING info , param1, param2 , param3 , param4); \ + } \ +} while (0) From 274350fe401474d0c30cd10bbad74b5dbf34f4fe Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Thu, 31 Dec 2009 13:28:32 +0100 Subject: [PATCH 120/367] Staging: otus: 80211core: Fix &&/|| confusion This always evaluates to true. Signed-off-by: Roel Kluin Signed-off-by: Greg Kroah-Hartman --- drivers/staging/otus/80211core/cmmsta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/otus/80211core/cmmsta.c b/drivers/staging/otus/80211core/cmmsta.c index a11d559167b1..5c0dea7a3433 100644 --- a/drivers/staging/otus/80211core/cmmsta.c +++ b/drivers/staging/otus/80211core/cmmsta.c @@ -2808,7 +2808,7 @@ void zfStaProcessProbeReq(zdev_t* dev, zbuf_t* buf, u16_t* src) zmw_get_wlan_dev(dev); /* check mode : AP/IBSS */ - if ((wd->wlanMode != ZM_MODE_AP) || (wd->wlanMode != ZM_MODE_IBSS)) + if ((wd->wlanMode != ZM_MODE_AP) && (wd->wlanMode != ZM_MODE_IBSS)) { zm_msg0_mm(ZM_LV_3, "Ignore probe req"); return; From db376005ab4abe4a57fd96c8e007cf5d3b2e22bf Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 4 Jan 2010 16:24:47 +0000 Subject: [PATCH 121/367] Staging: sep: Fix build problems from header changes Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/sep/sep_driver.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c index e7bc9ec63a8c..a5d65b9afaab 100644 --- a/drivers/staging/sep/sep_driver.c +++ b/drivers/staging/sep/sep_driver.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -273,8 +274,8 @@ static dma_addr_t sep_shared_virt_to_bus(struct sep_device *sep, void *virt_address) { dma_addr_t pa = sep->shared_bus + (virt_address - sep->shared_addr); - edbg("sep: virt to bus b %08llx v %p\n", - (unsigned long long)pa, virt_address); + edbg("sep: virt to bus b %08llx v %p\n", (unsigned long long) pa, + virt_address); return pa; } @@ -1771,7 +1772,7 @@ static struct sep_flow_context_t *sep_find_flow_context(struct sep_device *sep, static int sep_create_flow_dma_tables_handler(struct sep_device *sep, unsigned long arg) { - int error; + int error = -ENOENT; struct sep_driver_build_flow_table_t command_args; /* first table - output */ struct sep_lli_entry_t first_table_data; From 74e1cd4555c7b8d2fe9de657658f92f859427025 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 4 Jan 2010 16:25:02 +0000 Subject: [PATCH 122/367] Staging: sep: Fix use of legacy ioctl fop SEP doesn't need lock_kernel. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/sep/sep_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c index a5d65b9afaab..92fa18655f87 100644 --- a/drivers/staging/sep/sep_driver.c +++ b/drivers/staging/sep/sep_driver.c @@ -2233,7 +2233,7 @@ static int sep_set_flow_id_handler(struct sep_device *sep, return error; } -static int sep_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) +static long sep_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) { int error = 0; struct sep_device *sep = filp->private_data; @@ -2608,7 +2608,7 @@ static dev_t sep_devno; /* the files operations structure of the driver */ static struct file_operations sep_file_operations = { .owner = THIS_MODULE, - .ioctl = sep_ioctl, + .unlocked_ioctl = sep_ioctl, .poll = sep_poll, .open = sep_open, .release = sep_release, From 0c14c06cc18bc0d7f968d0bf1e531bcb8ced387d Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Tue, 5 Jan 2010 17:20:14 -0800 Subject: [PATCH 123/367] Staging: pohmelfs: Remove uses of NIPQUAD, use %pI4 Signed-off-by: Joe Perches Signed-off-by: Greg Kroah-Hartman --- drivers/staging/pohmelfs/inode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/pohmelfs/inode.c b/drivers/staging/pohmelfs/inode.c index f69b7783027f..e286fd16fedc 100644 --- a/drivers/staging/pohmelfs/inode.c +++ b/drivers/staging/pohmelfs/inode.c @@ -1767,8 +1767,7 @@ static int pohmelfs_show_stats(struct seq_file *m, struct vfsmount *mnt) seq_printf(m, "%u ", ctl->idx); if (ctl->addr.sa_family == AF_INET) { struct sockaddr_in *sin = (struct sockaddr_in *)&st->ctl.addr; - /* seq_printf(m, "%pi4:%u", &sin->sin_addr.s_addr, ntohs(sin->sin_port)); */ - seq_printf(m, "%u.%u.%u.%u:%u", NIPQUAD(sin->sin_addr.s_addr), ntohs(sin->sin_port)); + seq_printf(m, "%pI4:%u", &sin->sin_addr.s_addr, ntohs(sin->sin_port)); } else if (ctl->addr.sa_family == AF_INET6) { struct sockaddr_in6 *sin = (struct sockaddr_in6 *)&st->ctl.addr; seq_printf(m, "%pi6:%u", &sin->sin6_addr, ntohs(sin->sin6_port)); From e3c0acf44d837d3095ab8222d3271f9ba0d3db44 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 8 Jan 2010 14:51:50 +0300 Subject: [PATCH 124/367] Staging: pohmelfs: avoid null dereference err_out_put is for when the netfs_trans_alloc() succeeded. Signed-off-by: Dan Carpenter Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman --- drivers/staging/pohmelfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/pohmelfs/inode.c b/drivers/staging/pohmelfs/inode.c index e286fd16fedc..6a978c8dd5d1 100644 --- a/drivers/staging/pohmelfs/inode.c +++ b/drivers/staging/pohmelfs/inode.c @@ -322,7 +322,7 @@ int pohmelfs_write_create_inode(struct pohmelfs_inode *pi) t = netfs_trans_alloc(psb, err + 1, 0, 0); if (!t) { err = -ENOMEM; - goto err_out_put; + goto err_out_exit; } t->complete = pohmelfs_write_inode_complete; t->private = igrab(inode); From 182374a0bddeef46769d2f8ab56fcccc433b96f3 Mon Sep 17 00:00:00 2001 From: Evgeniy Polyakov Date: Wed, 3 Feb 2010 01:04:30 +0300 Subject: [PATCH 125/367] Staging: Fixed pohmelfs regression because of per-bdi writeback. Since pohmelfs isn't tied to a single block device, it needs to setup a backing dev like nfs/btrfs/etc do. Signed-off-by: Jens Axboe Signed-off-by: Evgeniy Polyakov Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/staging/pohmelfs/inode.c | 20 ++++++++++++++++++-- drivers/staging/pohmelfs/netfs.h | 3 +++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers/staging/pohmelfs/inode.c b/drivers/staging/pohmelfs/inode.c index 6a978c8dd5d1..eec3798eaf25 100644 --- a/drivers/staging/pohmelfs/inode.c +++ b/drivers/staging/pohmelfs/inode.c @@ -36,6 +36,7 @@ #define POHMELFS_MAGIC_NUM 0x504f482e static struct kmem_cache *pohmelfs_inode_cache; +static atomic_t psb_bdi_num = ATOMIC_INIT(0); /* * Removes inode from all trees, drops local name cache and removes all queued @@ -1331,6 +1332,8 @@ static void pohmelfs_put_super(struct super_block *sb) pohmelfs_crypto_exit(psb); pohmelfs_state_exit(psb); + bdi_destroy(&psb->bdi); + kfree(psb); sb->s_fs_info = NULL; } @@ -1814,11 +1817,22 @@ static int pohmelfs_fill_super(struct super_block *sb, void *data, int silent) if (!psb) goto err_out_exit; + err = bdi_init(&psb->bdi); + if (err) + goto err_out_free_sb; + + err = bdi_register(&psb->bdi, NULL, "pfs-%d", atomic_inc_return(&psb_bdi_num)); + if (err) { + bdi_destroy(&psb->bdi); + goto err_out_free_sb; + } + sb->s_fs_info = psb; sb->s_op = &pohmelfs_sb_ops; sb->s_magic = POHMELFS_MAGIC_NUM; sb->s_maxbytes = MAX_LFS_FILESIZE; sb->s_blocksize = PAGE_SIZE; + sb->s_bdi = &psb->bdi; psb->sb = sb; @@ -1862,11 +1876,11 @@ static int pohmelfs_fill_super(struct super_block *sb, void *data, int silent) err = pohmelfs_parse_options((char *) data, psb, 0); if (err) - goto err_out_free_sb; + goto err_out_free_bdi; err = pohmelfs_copy_crypto(psb); if (err) - goto err_out_free_sb; + goto err_out_free_bdi; err = pohmelfs_state_init(psb); if (err) @@ -1915,6 +1929,8 @@ err_out_state_exit: err_out_free_strings: kfree(psb->cipher_string); kfree(psb->hash_string); +err_out_free_bdi: + bdi_destroy(&psb->bdi); err_out_free_sb: kfree(psb); err_out_exit: diff --git a/drivers/staging/pohmelfs/netfs.h b/drivers/staging/pohmelfs/netfs.h index 623a07d29dea..01cba006e07a 100644 --- a/drivers/staging/pohmelfs/netfs.h +++ b/drivers/staging/pohmelfs/netfs.h @@ -18,6 +18,7 @@ #include #include +#include #define POHMELFS_CN_IDX 5 #define POHMELFS_CN_VAL 0 @@ -624,6 +625,8 @@ struct pohmelfs_sb { struct super_block *sb; + struct backing_dev_info bdi; + /* * Algorithm strings. */ From 9d4682d070e1f90f75cb27dd44d9cc7ab79577f1 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Wed, 6 Jan 2010 07:30:48 +0100 Subject: [PATCH 126/367] Staging: batman-adv: Update the README for mainline usage. The module now only compiles inside mainline, so remove the comments about different versions of the kernel it can be used with. Also update comments about building with debug enabled and how to use the VIS data now that it no longer natively outputs dot or JSON. Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/README | 50 ++++++++----------------------- 1 file changed, 13 insertions(+), 37 deletions(-) diff --git a/drivers/staging/batman-adv/README b/drivers/staging/batman-adv/README index 2bedcbedb6af..7d666ad04359 100644 --- a/drivers/staging/batman-adv/README +++ b/drivers/staging/batman-adv/README @@ -1,4 +1,4 @@ -[state: 13-12-2009] +[state: 06-01-2010] BATMAN-ADV ---------- @@ -15,19 +15,6 @@ above B.A.T.M.A.N. Advanced, prominent examples are: IPv4, IPv6, DHCP, IPX. This is batman-advanced implemented as Linux kernel driver. It does not depend on any network (other) driver, and can be used on wifi as well as ethernet, vpn, etc ... (anything with ethernet-style layer 2). -It compiles against and should work with Linux 2.6.20 - 2.6.32. Supporting older -versions is not planned, but it's probably easy to backport it. If you work on a -backport, feel free to contact us. :-) - -COMPILE -------- -To compile against your currently installed kernel, just type: - -# make - -if you want to compile against some other kernel, use: - -# make KERNELPATH=/path/to/kernel USAGE ----- @@ -73,16 +60,9 @@ When configured as server, you can get a topology snapshot of your mesh: # cat /proc/net/batman-adv/vis -This output format is a graphviz formatted text file which can be -processed with graphviz-tools like dot. -The labels are similar/compatible to the ETX metric, 1.0 means perfect -connection (100%), 2.0 means 50%, 3.0 means 33% and so on. - -Alternatively, a JSON output format is available. The format can be set -using by writing either "dot_draw" or "json" into the vis_format file. -"dot_draw" is selected by default. - -echo "json" > /proc/net/batman-adv/vis_format +The output is in a generic raw format. Use the batctl tool (See below) +to convert this to other formats more suitable for graphing, eg +graphviz dot, or JSON data-interchange format. In very mobile scenarios, you might want to adjust the originator interval to a lower value. This will make the mesh more responsive to @@ -110,15 +90,11 @@ dmesg | grep batman-adv When investigating problems with your mesh network it is sometimes necessary to see more detail debug messages. This must be enabled when -compiling the batman-adv module. When building batman-adv as part of -kernel, use "make menuconfig" and enable the option -"B.A.T.M.A.N. debugging". When compiling outside of the kernel tree it -is necessary to edit the file Makefile.kbuild and uncomment the line - -#EXTRA_CFLAGS += -DCONFIG_BATMAN_ADV_DEBUG +compiling the batman-adv module. Use "make menuconfig" and enable the +option "B.A.T.M.A.N. debugging". The additional debug output is by default disabled. It can be enabled -either at kernel modules load time or during run time. To enable debug +either at kernel module load time or during run time. To enable debug output at module load time, add the module parameter debug=. can take one of four values. @@ -147,12 +123,12 @@ to see the debug messages. BATCTL ------ -B.A.T.M.A.N. advanced operates on layer 2 and thus all hosts partici- -pating in the virtual switch are completely transparent for all proto- -cols above layer 2. Therefore the common diagnosis tools do not work as -expected. To overcome these problems batctl was created. At the moment -the batctl contains ping, traceroute, tcpdump and interfaces to the -kernel module settings. +B.A.T.M.A.N. advanced operates on layer 2 and thus all hosts +participating in the virtual switch are completely transparent for all +protocols above layer 2. Therefore the common diagnosis tools do not +work as expected. To overcome these problems batctl was created. At +the moment the batctl contains ping, traceroute, tcpdump and +interfaces to the kernel module settings. For more information, please see the manpage (man batctl). From 267c39c918cd0c239148a281d51693f47d2e1e54 Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Wed, 6 Jan 2010 23:27:47 +0100 Subject: [PATCH 127/367] Staging: v56655: add missing parentheses (in comment) `!' has a higher precedence than `&' so parentheses are required. Signed-off-by: Roel Kluin Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vt6655/iwctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c index 108830ff3b32..78b49830a255 100644 --- a/drivers/staging/vt6655/iwctl.c +++ b/drivers/staging/vt6655/iwctl.c @@ -1472,7 +1472,7 @@ if((wrq->flags & IW_ENCODE_DISABLED)==0){ if ( index < 4 ) { pDevice->byKeyIndex = index; } - else if(!wrq->flags & IW_ENCODE_MODE) { + else if(!(wrq->flags & IW_ENCODE_MODE)) { rc = -EINVAL; return rc; } From c424d46fdc79df201707fe815aa8480751918025 Mon Sep 17 00:00:00 2001 From: Alexander Beregalov Date: Thu, 7 Jan 2010 03:21:48 +0300 Subject: [PATCH 128/367] staging: cx25821: avoid NULL pointer dereference Assign dev only if fh is not NULL. Signed-off-by: Alexander Beregalov Signed-off-by: Greg Kroah-Hartman --- drivers/staging/cx25821/cx25821-audups11.c | 3 ++- drivers/staging/cx25821/cx25821-video.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/cx25821/cx25821-audups11.c b/drivers/staging/cx25821/cx25821-audups11.c index 89c8fe2997fa..46c7f78bb972 100644 --- a/drivers/staging/cx25821/cx25821-audups11.c +++ b/drivers/staging/cx25821/cx25821-audups11.c @@ -343,10 +343,11 @@ static int vidioc_s_ctrl(struct file *file, void *priv, struct v4l2_control *ctl) { struct cx25821_fh *fh = priv; - struct cx25821_dev *dev = fh->dev; + struct cx25821_dev *dev; int err; if (fh) { + dev = fh->dev; err = v4l2_prio_check(&dev->prio, &fh->prio); if (0 != err) return err; diff --git a/drivers/staging/cx25821/cx25821-video.c b/drivers/staging/cx25821/cx25821-video.c index 6e710ae067ad..8cd3986d2e5c 100644 --- a/drivers/staging/cx25821/cx25821-video.c +++ b/drivers/staging/cx25821/cx25821-video.c @@ -963,10 +963,11 @@ int cx25821_set_freq(struct cx25821_dev *dev, struct v4l2_frequency *f) int vidioc_s_frequency(struct file *file, void *priv, struct v4l2_frequency *f) { struct cx25821_fh *fh = priv; - struct cx25821_dev *dev = fh->dev; + struct cx25821_dev *dev; int err; if (fh) { + dev = fh->dev; err = v4l2_prio_check(&dev->prio, &fh->prio); if (0 != err) return err; From 0df28be06e08b9a53c26a53974bf3afea4928b3e Mon Sep 17 00:00:00 2001 From: Peter Huewe Date: Thu, 7 Jan 2010 19:57:36 +0100 Subject: [PATCH 129/367] Staging: asus_oled: Add NULL test for kmalloc This patch adds a NULL test to check wether kmalloc was successful or not. Signed-off-by: Peter Huewe Signed-off-by: Greg Kroah-Hartman --- drivers/staging/asus_oled/asus_oled.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/staging/asus_oled/asus_oled.c b/drivers/staging/asus_oled/asus_oled.c index 0c1fb0d618a5..c597fb27bd53 100644 --- a/drivers/staging/asus_oled/asus_oled.c +++ b/drivers/staging/asus_oled/asus_oled.c @@ -430,6 +430,11 @@ static ssize_t odev_set_picture(struct asus_oled_dev *odev, kfree(odev->buf); odev->buf = kmalloc(odev->buf_size, GFP_KERNEL); + if (odev->buf == NULL) { + odev->buf_size = 0; + printk(ASUS_OLED_ERROR "Out of memory!\n"); + return -ENOMEM; + } memset(odev->buf, 0xff, odev->buf_size); From 95702ef05b9b6554c2669bdb9a6121af9f034171 Mon Sep 17 00:00:00 2001 From: Peter Huewe Date: Fri, 8 Jan 2010 09:09:12 +0100 Subject: [PATCH 130/367] Staging: otus: Add select WEXT_PRIV to Kconfig to prevent build failure Without WEXT_PRIV set the driver fails to build due to unknown fields in the iw_handler_def struct. Those fields are enclosed in WEXT_PRIV conditionals in the prototype of iw_handler_def in include/net/iw_handler.h Signed-off-by: Peter Huewe Acked-by: Simon Horman Signed-off-by: Greg Kroah-Hartman --- drivers/staging/otus/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/otus/Kconfig b/drivers/staging/otus/Kconfig index f6cc2625e341..e9181340bef1 100644 --- a/drivers/staging/otus/Kconfig +++ b/drivers/staging/otus/Kconfig @@ -1,6 +1,8 @@ config OTUS tristate "Atheros OTUS 802.11n USB wireless support" depends on USB && WLAN && MAC80211 + select WIRELESS_EXT + select WEXT_PRIV default N ---help--- Enable support for Atheros 802.11n USB hardware: From 733acf902fbafb6571fce45ee77b1516aaae1bc6 Mon Sep 17 00:00:00 2001 From: Peter Huewe Date: Fri, 8 Jan 2010 09:10:13 +0100 Subject: [PATCH 131/367] Staging: rtl8192u: Add select WEXT_PRIV to Kconfig to prevent build failure Without WEXT_PRIV set the driver fails to build due to unknown fields in the iw_handler_def struct. Those fields are enclosed in WEXT_PRIV conditionals in the prototype of iw_handler_def in include/net/iw_handler.h Signed-off-by: Peter Huewe Acked-by: Simon Horman Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192u/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192u/Kconfig b/drivers/staging/rtl8192u/Kconfig index 9913ab8fb359..0439c90b4163 100644 --- a/drivers/staging/rtl8192u/Kconfig +++ b/drivers/staging/rtl8192u/Kconfig @@ -1,6 +1,7 @@ config RTL8192U tristate "RealTek RTL8192U Wireless LAN NIC driver" depends on PCI && WLAN && USB - depends on WIRELESS_EXT + select WIRELESS_EXT + select WEXT_PRIV default N ---help--- From 8a8e29752dfdba014b866d3c587d3409e57263dd Mon Sep 17 00:00:00 2001 From: Peter Huewe Date: Thu, 7 Jan 2010 21:21:35 +0100 Subject: [PATCH 132/367] Staging: wlan-ng: Add select WEXT_PRIV to Kconfig to prevent build failure Without WEXT_PRIV set the p80211wext.c fails to build due to unknown fields in the iw_handler_def struct. Those fields are enclosed in WEXT_PRIV conditionals in the prototype of iw_handler_def in include/net/iw_handler.h Signed-off-by: Peter Huewe Acked-by: Simon Horman Cc: stable [2.6.33 only] Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/wlan-ng/Kconfig b/drivers/staging/wlan-ng/Kconfig index 704ebd26e628..82fcc1665e92 100644 --- a/drivers/staging/wlan-ng/Kconfig +++ b/drivers/staging/wlan-ng/Kconfig @@ -2,6 +2,7 @@ config PRISM2_USB tristate "Prism2.5/3 USB driver" depends on WLAN && USB select WIRELESS_EXT + select WEXT_PRIV default n ---help--- This is the wlan-ng prism 2.5/3 USB driver for a wide range of From 88d43000098017d93d9bb2f88d33950e6c7a6bf4 Mon Sep 17 00:00:00 2001 From: Jarod Wilson Date: Thu, 7 Jan 2010 18:35:58 -0500 Subject: [PATCH 133/367] staging: crystalhd: add missing fixes for userspace lib build I somehow managed to not actually include these two fixes in the submission that was committed to the staging tree. libcrystalhd should eventually be built against the kernel-provided header, and needs the stdint.h include. The VOID bit is to keep things in sync with the Mac OS X driver and library that Scott Davilla is also working on. Signed-off-by: Scott Davilla Signed-off-by: Jarod Wilson Signed-off-by: Greg Kroah-Hartman --- drivers/staging/crystalhd/bc_dts_types.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/staging/crystalhd/bc_dts_types.h b/drivers/staging/crystalhd/bc_dts_types.h index e073d7450c16..ac0c81717385 100644 --- a/drivers/staging/crystalhd/bc_dts_types.h +++ b/drivers/staging/crystalhd/bc_dts_types.h @@ -25,6 +25,10 @@ #ifndef _BC_DTS_TYPES_H_ #define _BC_DTS_TYPES_H_ +#ifdef __LINUX_USER__ // Don't include these for KERNEL.. +#include +#endif + #if defined(_WIN64) || defined(_WIN32) typedef uint32_t U32; typedef int32_t S32; @@ -62,7 +66,9 @@ typedef int BOOL; typedef uint32_t ULONG; typedef int32_t LONG; typedef void *HANDLE; +#ifndef VOID typedef void VOID; +#endif typedef void *LPVOID; typedef uint32_t DWORD; typedef uint32_t UINT32; From 90d49b4f32c243215c0620162e6cae6af980047c Mon Sep 17 00:00:00 2001 From: Jarod Wilson Date: Thu, 7 Jan 2010 18:37:36 -0500 Subject: [PATCH 134/367] staging: crystalhd: trim register defines We don't actually need most of the register defines to build, and most of the ones we don't need aren't currently interesting. We'll leave a full copy of all of them in libcrystalhd's source, and only include what we need and/or think might be interesting in the driver. Signed-off-by: Jarod Wilson Signed-off-by: Greg Kroah-Hartman --- drivers/staging/crystalhd/bcm_70012_regs.h | 11542 ------------------- 1 file changed, 11542 deletions(-) diff --git a/drivers/staging/crystalhd/bcm_70012_regs.h b/drivers/staging/crystalhd/bcm_70012_regs.h index b3b255769641..6922f54e432f 100644 --- a/drivers/staging/crystalhd/bcm_70012_regs.h +++ b/drivers/staging/crystalhd/bcm_70012_regs.h @@ -203,21 +203,6 @@ ***************************************************************************/ #define PCIE_TL_TL_CONTROL 0x00000400 /* TL_CONTROL Register */ #define PCIE_TL_TRANSACTION_CONFIGURATION 0x00000404 /* TRANSACTION_CONFIGURATION Register */ -#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC 0x00000408 /* WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC Register */ -#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2 0x0000040c /* WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2 Register */ -#define PCIE_TL_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC 0x00000410 /* DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC Register */ -#define PCIE_TL_DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2 0x00000414 /* DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2 Register */ -#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC 0x00000418 /* DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC Register */ -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC 0x0000041c /* DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC Register */ -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC 0x00000420 /* READ_DMA_SPLIT_IDS_DIAGNOSTIC Register */ -#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC 0x00000424 /* READ_DMA_SPLIT_LENGTH_DIAGNOSTIC Register */ -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC 0x0000043c /* XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC Register */ -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC 0x00000458 /* DMA_COMPLETION_MISC__DIAGNOSTIC Register */ -#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC 0x0000045c /* SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC Register */ -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC 0x00000460 /* SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC Register */ -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC 0x00000464 /* SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC Register */ -#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO 0x00000468 /* TL_BUS_NO_DEV__NO__FUNC__NO Register */ -#define PCIE_TL_TL_DEBUG 0x0000046c /* TL_DEBUG Register */ /**************************************************************************** @@ -225,47 +210,6 @@ ***************************************************************************/ #define PCIE_DLL_DATA_LINK_CONTROL 0x00000500 /* DATA_LINK_CONTROL Register */ #define PCIE_DLL_DATA_LINK_STATUS 0x00000504 /* DATA_LINK_STATUS Register */ -#define PCIE_DLL_DATA_LINK_ATTENTION 0x00000508 /* DATA_LINK_ATTENTION Register */ -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK 0x0000050c /* DATA_LINK_ATTENTION_MASK Register */ -#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG 0x00000510 /* NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG Register */ -#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG 0x00000514 /* ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG Register */ -#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG 0x00000518 /* PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG Register */ -#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG 0x0000051c /* RECEIVE_SEQUENCE_NUMBER_DEBUG Register */ -#define PCIE_DLL_DATA_LINK_REPLAY 0x00000520 /* DATA_LINK_REPLAY Register */ -#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT 0x00000524 /* DATA_LINK_ACK_TIMEOUT Register */ -#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD 0x00000528 /* POWER_MANAGEMENT_THRESHOLD Register */ -#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG 0x0000052c /* RETRY_BUFFER_WRITE_POINTER_DEBUG Register */ -#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG 0x00000530 /* RETRY_BUFFER_READ_POINTER_DEBUG Register */ -#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG 0x00000534 /* RETRY_BUFFER_PURGED_POINTER_DEBUG Register */ -#define PCIE_DLL_RETRY_BUFFER_READ_WRITE_DEBUG_PORT 0x00000538 /* RETRY_BUFFER_READ_WRITE_DEBUG_PORT Register */ -#define PCIE_DLL_ERROR_COUNT_THRESHOLD 0x0000053c /* ERROR_COUNT_THRESHOLD Register */ -#define PCIE_DLL_TL_ERROR_COUNTER 0x00000540 /* TL_ERROR_COUNTER Register */ -#define PCIE_DLL_DLLP_ERROR_COUNTER 0x00000544 /* DLLP_ERROR_COUNTER Register */ -#define PCIE_DLL_NAK_RECEIVED_COUNTER 0x00000548 /* NAK_RECEIVED_COUNTER Register */ -#define PCIE_DLL_DATA_LINK_TEST 0x0000054c /* DATA_LINK_TEST Register */ -#define PCIE_DLL_PACKET_BIST 0x00000550 /* PACKET_BIST Register */ -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL 0x00000554 /* LINK_PCIE_1_1_CONTROL Register */ - - -/**************************************************************************** - * BCM70012_TGT_TOP_PCIE_PHY - ***************************************************************************/ -#define PCIE_PHY_PHY_MODE 0x00000600 /* TYPE_PHY_MODE Register */ -#define PCIE_PHY_PHY_LINK_STATUS 0x00000604 /* TYPE_PHY_LINK_STATUS Register */ -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL 0x00000608 /* TYPE_PHY_LINK_LTSSM_CONTROL Register */ -#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER 0x0000060c /* TYPE_PHY_LINK_TRAINING_LINK_NUMBER Register */ -#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER 0x00000610 /* TYPE_PHY_LINK_TRAINING_LANE_NUMBER Register */ -#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS 0x00000614 /* TYPE_PHY_LINK_TRAINING_N_FTS Register */ -#define PCIE_PHY_PHY_ATTENTION 0x00000618 /* TYPE_PHY_ATTENTION Register */ -#define PCIE_PHY_PHY_ATTENTION_MASK 0x0000061c /* TYPE_PHY_ATTENTION_MASK Register */ -#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER 0x00000620 /* TYPE_PHY_RECEIVE_ERROR_COUNTER Register */ -#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER 0x00000624 /* TYPE_PHY_RECEIVE_FRAMING_ERROR_COUNTER Register */ -#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD 0x00000628 /* TYPE_PHY_RECEIVE_ERROR_THRESHOLD Register */ -#define PCIE_PHY_PHY_TEST_CONTROL 0x0000062c /* TYPE_PHY_TEST_CONTROL Register */ -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE 0x00000630 /* TYPE_PHY_SERDES_CONTROL_OVERRIDE Register */ -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE 0x00000634 /* TYPE_PHY_TIMING_PARAMETER_OVERRIDE Register */ -#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES 0x00000638 /* TYPE_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES Register */ -#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC2_LTSSM_STATES 0x0000063c /* TYPE_PHY_HARDWARE_DIAGNOSTIC2_LTSSM_STATES Register */ /**************************************************************************** @@ -280,60 +224,6 @@ #define INTR_EOI_CTRL 0x00000720 /* End of interrupt control register */ -/**************************************************************************** - * BCM70012_TGT_TOP_MDIO - ***************************************************************************/ -#define MDIO_CTRL0 0x00000730 /* PCIE Serdes MDIO Control Register 0 */ -#define MDIO_CTRL1 0x00000734 /* PCIE Serdes MDIO Control Register 1 */ -#define MDIO_CTRL2 0x00000738 /* PCIE Serdes MDIO Control Register 2 */ - - -/**************************************************************************** - * BCM70012_TGT_TOP_TGT_RGR_BRIDGE - ***************************************************************************/ -#define TGT_RGR_BRIDGE_REVISION 0x00000740 /* PCIE RGR Bridge Revision Register */ -#define TGT_RGR_BRIDGE_CTRL 0x00000744 /* RGR Bridge Control Register */ -#define TGT_RGR_BRIDGE_RBUS_TIMER 0x00000748 /* RGR Bridge RBUS Timer Register */ -#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0 0x0000074c /* RGR Bridge Spare Software Reset 0 Register */ -#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1 0x00000750 /* RGR Bridge Spare Software Reset 1 Register */ - - -/**************************************************************************** - * BCM70012_I2C_TOP_I2C - ***************************************************************************/ -#define I2C_CHIP_ADDRESS 0x00000800 /* I2C Chip Address And Read/Write Control */ -#define I2C_DATA_IN0 0x00000804 /* I2C Write Data Byte 0 */ -#define I2C_DATA_IN1 0x00000808 /* I2C Write Data Byte 1 */ -#define I2C_DATA_IN2 0x0000080c /* I2C Write Data Byte 2 */ -#define I2C_DATA_IN3 0x00000810 /* I2C Write Data Byte 3 */ -#define I2C_DATA_IN4 0x00000814 /* I2C Write Data Byte 4 */ -#define I2C_DATA_IN5 0x00000818 /* I2C Write Data Byte 5 */ -#define I2C_DATA_IN6 0x0000081c /* I2C Write Data Byte 6 */ -#define I2C_DATA_IN7 0x00000820 /* I2C Write Data Byte 7 */ -#define I2C_CNT_REG 0x00000824 /* I2C Transfer Count Register */ -#define I2C_CTL_REG 0x00000828 /* I2C Control Register */ -#define I2C_IIC_ENABLE 0x0000082c /* I2C Read/Write Enable And Interrupt */ -#define I2C_DATA_OUT0 0x00000830 /* I2C Read Data Byte 0 */ -#define I2C_DATA_OUT1 0x00000834 /* I2C Read Data Byte 1 */ -#define I2C_DATA_OUT2 0x00000838 /* I2C Read Data Byte 2 */ -#define I2C_DATA_OUT3 0x0000083c /* I2C Read Data Byte 3 */ -#define I2C_DATA_OUT4 0x00000840 /* I2C Read Data Byte 4 */ -#define I2C_DATA_OUT5 0x00000844 /* I2C Read Data Byte 5 */ -#define I2C_DATA_OUT6 0x00000848 /* I2C Read Data Byte 6 */ -#define I2C_DATA_OUT7 0x0000084c /* I2C Read Data Byte 7 */ -#define I2C_CTLHI_REG 0x00000850 /* I2C Control Register */ -#define I2C_SCL_PARAM 0x00000854 /* I2C SCL Parameter Register */ - - -/**************************************************************************** - * BCM70012_I2C_TOP_I2C_GR_BRIDGE - ***************************************************************************/ -#define I2C_GR_BRIDGE_REVISION 0x00000be0 /* GR Bridge Revision */ -#define I2C_GR_BRIDGE_CTRL 0x00000be4 /* GR Bridge Control Register */ -#define I2C_GR_BRIDGE_SPARE_SW_RESET_0 0x00000be8 /* GR Bridge Software Reset 0 Register */ -#define I2C_GR_BRIDGE_SPARE_SW_RESET_1 0x00000bec /* GR Bridge Software Reset 1 Register */ - - /**************************************************************************** * BCM70012_MISC_TOP_MISC1 ***************************************************************************/ @@ -420,87 +310,6 @@ #define GISB_ARBITER_SCRATCH 0x00000f04 /* GISB ARBITER Scratch Register */ #define GISB_ARBITER_REQ_MASK 0x00000f08 /* GISB ARBITER Master Request Mask Register */ #define GISB_ARBITER_TIMER 0x00000f0c /* GISB ARBITER Timer Value Register */ -#define GISB_ARBITER_BP_CTRL 0x00000f10 /* GISB ARBITER Breakpoint Control Register */ -#define GISB_ARBITER_BP_CAP_CLR 0x00000f14 /* GISB ARBITER Breakpoint Capture Clear Register */ -#define GISB_ARBITER_BP_START_ADDR_0 0x00000f18 /* GISB ARBITER Breakpoint Start Address 0 Register */ -#define GISB_ARBITER_BP_END_ADDR_0 0x00000f1c /* GISB ARBITER Breakpoint End Address 0 Register */ -#define GISB_ARBITER_BP_READ_0 0x00000f20 /* GISB ARBITER Breakpoint Master Read Control 0 Register */ -#define GISB_ARBITER_BP_WRITE_0 0x00000f24 /* GISB ARBITER Breakpoint Master Write Control 0 Register */ -#define GISB_ARBITER_BP_ENABLE_0 0x00000f28 /* GISB ARBITER Breakpoint Enable 0 Register */ -#define GISB_ARBITER_BP_START_ADDR_1 0x00000f2c /* GISB ARBITER Breakpoint Start Address 1 Register */ -#define GISB_ARBITER_BP_END_ADDR_1 0x00000f30 /* GISB ARBITER Breakpoint End Address 1 Register */ -#define GISB_ARBITER_BP_READ_1 0x00000f34 /* GISB ARBITER Breakpoint Master Read Control 1 Register */ -#define GISB_ARBITER_BP_WRITE_1 0x00000f38 /* GISB ARBITER Breakpoint Master Write Control 1 Register */ -#define GISB_ARBITER_BP_ENABLE_1 0x00000f3c /* GISB ARBITER Breakpoint Enable 1 Register */ -#define GISB_ARBITER_BP_START_ADDR_2 0x00000f40 /* GISB ARBITER Breakpoint Start Address 2 Register */ -#define GISB_ARBITER_BP_END_ADDR_2 0x00000f44 /* GISB ARBITER Breakpoint End Address 2 Register */ -#define GISB_ARBITER_BP_READ_2 0x00000f48 /* GISB ARBITER Breakpoint Master Read Control 2 Register */ -#define GISB_ARBITER_BP_WRITE_2 0x00000f4c /* GISB ARBITER Breakpoint Master Write Control 2 Register */ -#define GISB_ARBITER_BP_ENABLE_2 0x00000f50 /* GISB ARBITER Breakpoint Enable 2 Register */ -#define GISB_ARBITER_BP_START_ADDR_3 0x00000f54 /* GISB ARBITER Breakpoint Start Address 3 Register */ -#define GISB_ARBITER_BP_END_ADDR_3 0x00000f58 /* GISB ARBITER Breakpoint End Address 3 Register */ -#define GISB_ARBITER_BP_READ_3 0x00000f5c /* GISB ARBITER Breakpoint Master Read Control 3 Register */ -#define GISB_ARBITER_BP_WRITE_3 0x00000f60 /* GISB ARBITER Breakpoint Master Write Control 3 Register */ -#define GISB_ARBITER_BP_ENABLE_3 0x00000f64 /* GISB ARBITER Breakpoint Enable 3 Register */ -#define GISB_ARBITER_BP_START_ADDR_4 0x00000f68 /* GISB ARBITER Breakpoint Start Address 4 Register */ -#define GISB_ARBITER_BP_END_ADDR_4 0x00000f6c /* GISB ARBITER Breakpoint End Address 4 Register */ -#define GISB_ARBITER_BP_READ_4 0x00000f70 /* GISB ARBITER Breakpoint Master Read Control 4 Register */ -#define GISB_ARBITER_BP_WRITE_4 0x00000f74 /* GISB ARBITER Breakpoint Master Write Control 4 Register */ -#define GISB_ARBITER_BP_ENABLE_4 0x00000f78 /* GISB ARBITER Breakpoint Enable 4 Register */ -#define GISB_ARBITER_BP_START_ADDR_5 0x00000f7c /* GISB ARBITER Breakpoint Start Address 5 Register */ -#define GISB_ARBITER_BP_END_ADDR_5 0x00000f80 /* GISB ARBITER Breakpoint End Address 5 Register */ -#define GISB_ARBITER_BP_READ_5 0x00000f84 /* GISB ARBITER Breakpoint Master Read Control 5 Register */ -#define GISB_ARBITER_BP_WRITE_5 0x00000f88 /* GISB ARBITER Breakpoint Master Write Control 5 Register */ -#define GISB_ARBITER_BP_ENABLE_5 0x00000f8c /* GISB ARBITER Breakpoint Enable 5 Register */ -#define GISB_ARBITER_BP_START_ADDR_6 0x00000f90 /* GISB ARBITER Breakpoint Start Address 6 Register */ -#define GISB_ARBITER_BP_END_ADDR_6 0x00000f94 /* GISB ARBITER Breakpoint End Address 6 Register */ -#define GISB_ARBITER_BP_READ_6 0x00000f98 /* GISB ARBITER Breakpoint Master Read Control 6 Register */ -#define GISB_ARBITER_BP_WRITE_6 0x00000f9c /* GISB ARBITER Breakpoint Master Write Control 6 Register */ -#define GISB_ARBITER_BP_ENABLE_6 0x00000fa0 /* GISB ARBITER Breakpoint Enable 6 Register */ -#define GISB_ARBITER_BP_START_ADDR_7 0x00000fa4 /* GISB ARBITER Breakpoint Start Address 7 Register */ -#define GISB_ARBITER_BP_END_ADDR_7 0x00000fa8 /* GISB ARBITER Breakpoint End Address 7 Register */ -#define GISB_ARBITER_BP_READ_7 0x00000fac /* GISB ARBITER Breakpoint Master Read Control 7 Register */ -#define GISB_ARBITER_BP_WRITE_7 0x00000fb0 /* GISB ARBITER Breakpoint Master Write Control 7 Register */ -#define GISB_ARBITER_BP_ENABLE_7 0x00000fb4 /* GISB ARBITER Breakpoint Enable 7 Register */ -#define GISB_ARBITER_BP_CAP_ADDR 0x00000fb8 /* GISB ARBITER Breakpoint Capture Address Register */ -#define GISB_ARBITER_BP_CAP_DATA 0x00000fbc /* GISB ARBITER Breakpoint Capture Data Register */ -#define GISB_ARBITER_BP_CAP_STATUS 0x00000fc0 /* GISB ARBITER Breakpoint Capture Status Register */ -#define GISB_ARBITER_BP_CAP_MASTER 0x00000fc4 /* GISB ARBITER Breakpoint Capture GISB MASTER Register */ -#define GISB_ARBITER_ERR_CAP_CLR 0x00000fc8 /* GISB ARBITER Error Capture Clear Register */ -#define GISB_ARBITER_ERR_CAP_ADDR 0x00000fcc /* GISB ARBITER Error Capture Address Register */ -#define GISB_ARBITER_ERR_CAP_DATA 0x00000fd0 /* GISB ARBITER Error Capture Data Register */ -#define GISB_ARBITER_ERR_CAP_STATUS 0x00000fd4 /* GISB ARBITER Error Capture Status Register */ -#define GISB_ARBITER_ERR_CAP_MASTER 0x00000fd8 /* GISB ARBITER Error Capture GISB MASTER Register */ - - -/**************************************************************************** - * BCM70012_MISC_TOP_MISC_GR_BRIDGE - ***************************************************************************/ -#define MISC_GR_BRIDGE_REVISION 0x00000fe0 /* GR Bridge Revision */ -#define MISC_GR_BRIDGE_CTRL 0x00000fe4 /* GR Bridge Control Register */ -#define MISC_GR_BRIDGE_SPARE_SW_RESET_0 0x00000fe8 /* GR Bridge Software Reset 0 Register */ -#define MISC_GR_BRIDGE_SPARE_SW_RESET_1 0x00000fec /* GR Bridge Software Reset 1 Register */ - - -/**************************************************************************** - * BCM70012_DBU_TOP_DBU - ***************************************************************************/ -#define DBU_DBU_CMD 0x00001000 /* DBU (Debug UART) command register */ -#define DBU_DBU_STATUS 0x00001004 /* DBU (Debug UART) status register */ -#define DBU_DBU_CONFIG 0x00001008 /* DBU (Debug UART) configuration register */ -#define DBU_DBU_TIMING 0x0000100c /* DBU (Debug UART) timing register */ -#define DBU_DBU_RXDATA 0x00001010 /* DBU (Debug UART) recieve data register */ -#define DBU_DBU_TXDATA 0x00001014 /* DBU (Debug UART) transmit data register */ - - -/**************************************************************************** - * BCM70012_DBU_TOP_DBU_RGR_BRIDGE - ***************************************************************************/ -#define DBU_RGR_BRIDGE_REVISION 0x000013e0 /* RGR Bridge Revision */ -#define DBU_RGR_BRIDGE_CTRL 0x000013e4 /* RGR Bridge Control Register */ -#define DBU_RGR_BRIDGE_RBUS_TIMER 0x000013e8 /* RGR Bridge RBUS Timer Register */ -#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0 0x000013ec /* RGR Bridge Software Reset 0 Register */ -#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1 0x000013f0 /* RGR Bridge Software Reset 1 Register */ /**************************************************************************** @@ -532,15 +341,6 @@ #define OTP_DATA_OUTPUT 0x0000145c /* Data Output Register */ -/**************************************************************************** - * BCM70012_OTP_TOP_OTP_GR_BRIDGE - ***************************************************************************/ -#define OTP_GR_BRIDGE_REVISION 0x000017e0 /* GR Bridge Revision */ -#define OTP_GR_BRIDGE_CTRL 0x000017e4 /* GR Bridge Control Register */ -#define OTP_GR_BRIDGE_SPARE_SW_RESET_0 0x000017e8 /* GR Bridge Software Reset 0 Register */ -#define OTP_GR_BRIDGE_SPARE_SW_RESET_1 0x000017ec /* GR Bridge Software Reset 1 Register */ - - /**************************************************************************** * BCM70012_AES_TOP_AES ***************************************************************************/ @@ -554,16 +354,6 @@ #define AES_EEPROM_DATA_3 0x0000181c /* AES EEPROM Data Register 3 */ -/**************************************************************************** - * BCM70012_AES_TOP_AES_RGR_BRIDGE - ***************************************************************************/ -#define AES_RGR_BRIDGE_REVISION 0x00001be0 /* RGR Bridge Revision */ -#define AES_RGR_BRIDGE_CTRL 0x00001be4 /* RGR Bridge Control Register */ -#define AES_RGR_BRIDGE_RBUS_TIMER 0x00001be8 /* RGR Bridge RBUS Timer Register */ -#define AES_RGR_BRIDGE_SPARE_SW_RESET_0 0x00001bec /* RGR Bridge Software Reset 0 Register */ -#define AES_RGR_BRIDGE_SPARE_SW_RESET_1 0x00001bf0 /* RGR Bridge Software Reset 1 Register */ - - /**************************************************************************** * BCM70012_DCI_TOP_DCI ***************************************************************************/ @@ -582,5276 +372,6 @@ #define DCI_SIGNATURE_DATA_7 0x00001c30 /* Signature Data Register 7 */ -/**************************************************************************** - * BCM70012_DCI_TOP_DCI_RGR_BRIDGE - ***************************************************************************/ -#define DCI_RGR_BRIDGE_REVISION 0x00001fe0 /* RGR Bridge Revision */ -#define DCI_RGR_BRIDGE_CTRL 0x00001fe4 /* RGR Bridge Control Register */ -#define DCI_RGR_BRIDGE_RBUS_TIMER 0x00001fe8 /* RGR Bridge RBUS Timer Register */ -#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0 0x00001fec /* RGR Bridge Software Reset 0 Register */ -#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1 0x00001ff0 /* RGR Bridge Software Reset 1 Register */ - - -/**************************************************************************** - * BCM70012_CCE_TOP_CCE_RGR_BRIDGE - ***************************************************************************/ -#define CCE_RGR_BRIDGE_REVISION 0x000023e0 /* RGR Bridge Revision */ -#define CCE_RGR_BRIDGE_CTRL 0x000023e4 /* RGR Bridge Control Register */ -#define CCE_RGR_BRIDGE_RBUS_TIMER 0x000023e8 /* RGR Bridge RBUS Timer Register */ -#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0 0x000023ec /* RGR Bridge Software Reset 0 Register */ -#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1 0x000023f0 /* RGR Bridge Software Reset 1 Register */ - - -/**************************************************************************** - * BCM70012_TGT_TOP_PCIE_CFG - ***************************************************************************/ -/**************************************************************************** - * PCIE_CFG :: DEVICE_VENDOR_ID - ***************************************************************************/ -/* PCIE_CFG :: DEVICE_VENDOR_ID :: DEVICE_ID [31:16] */ -#define PCIE_CFG_DEVICE_VENDOR_ID_DEVICE_ID_MASK 0xffff0000 -#define PCIE_CFG_DEVICE_VENDOR_ID_DEVICE_ID_ALIGN 0 -#define PCIE_CFG_DEVICE_VENDOR_ID_DEVICE_ID_BITS 16 -#define PCIE_CFG_DEVICE_VENDOR_ID_DEVICE_ID_SHIFT 16 - -/* PCIE_CFG :: DEVICE_VENDOR_ID :: VENDOR_ID [15:00] */ -#define PCIE_CFG_DEVICE_VENDOR_ID_VENDOR_ID_MASK 0x0000ffff -#define PCIE_CFG_DEVICE_VENDOR_ID_VENDOR_ID_ALIGN 0 -#define PCIE_CFG_DEVICE_VENDOR_ID_VENDOR_ID_BITS 16 -#define PCIE_CFG_DEVICE_VENDOR_ID_VENDOR_ID_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: STATUS_COMMAND - ***************************************************************************/ -/* PCIE_CFG :: STATUS_COMMAND :: DETECTED_PARITY_ERROR [31:31] */ -#define PCIE_CFG_STATUS_COMMAND_DETECTED_PARITY_ERROR_MASK 0x80000000 -#define PCIE_CFG_STATUS_COMMAND_DETECTED_PARITY_ERROR_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_DETECTED_PARITY_ERROR_BITS 1 -#define PCIE_CFG_STATUS_COMMAND_DETECTED_PARITY_ERROR_SHIFT 31 - -/* PCIE_CFG :: STATUS_COMMAND :: SIGNALED_SYSTEM_ERROR [30:30] */ -#define PCIE_CFG_STATUS_COMMAND_SIGNALED_SYSTEM_ERROR_MASK 0x40000000 -#define PCIE_CFG_STATUS_COMMAND_SIGNALED_SYSTEM_ERROR_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_SIGNALED_SYSTEM_ERROR_BITS 1 -#define PCIE_CFG_STATUS_COMMAND_SIGNALED_SYSTEM_ERROR_SHIFT 30 - -/* PCIE_CFG :: STATUS_COMMAND :: RECEIVED_MASTER_ABORT [29:29] */ -#define PCIE_CFG_STATUS_COMMAND_RECEIVED_MASTER_ABORT_MASK 0x20000000 -#define PCIE_CFG_STATUS_COMMAND_RECEIVED_MASTER_ABORT_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_RECEIVED_MASTER_ABORT_BITS 1 -#define PCIE_CFG_STATUS_COMMAND_RECEIVED_MASTER_ABORT_SHIFT 29 - -/* PCIE_CFG :: STATUS_COMMAND :: RECEIVED_TARGET_ABORT [28:28] */ -#define PCIE_CFG_STATUS_COMMAND_RECEIVED_TARGET_ABORT_MASK 0x10000000 -#define PCIE_CFG_STATUS_COMMAND_RECEIVED_TARGET_ABORT_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_RECEIVED_TARGET_ABORT_BITS 1 -#define PCIE_CFG_STATUS_COMMAND_RECEIVED_TARGET_ABORT_SHIFT 28 - -/* PCIE_CFG :: STATUS_COMMAND :: SIGNALED_TARGET_ABORT [27:27] */ -#define PCIE_CFG_STATUS_COMMAND_SIGNALED_TARGET_ABORT_MASK 0x08000000 -#define PCIE_CFG_STATUS_COMMAND_SIGNALED_TARGET_ABORT_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_SIGNALED_TARGET_ABORT_BITS 1 -#define PCIE_CFG_STATUS_COMMAND_SIGNALED_TARGET_ABORT_SHIFT 27 - -/* PCIE_CFG :: STATUS_COMMAND :: DEVSEL_TIMING [26:25] */ -#define PCIE_CFG_STATUS_COMMAND_DEVSEL_TIMING_MASK 0x06000000 -#define PCIE_CFG_STATUS_COMMAND_DEVSEL_TIMING_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_DEVSEL_TIMING_BITS 2 -#define PCIE_CFG_STATUS_COMMAND_DEVSEL_TIMING_SHIFT 25 - -/* PCIE_CFG :: STATUS_COMMAND :: MASTER_DATA_PARITY_ERROR [24:24] */ -#define PCIE_CFG_STATUS_COMMAND_MASTER_DATA_PARITY_ERROR_MASK 0x01000000 -#define PCIE_CFG_STATUS_COMMAND_MASTER_DATA_PARITY_ERROR_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_MASTER_DATA_PARITY_ERROR_BITS 1 -#define PCIE_CFG_STATUS_COMMAND_MASTER_DATA_PARITY_ERROR_SHIFT 24 - -/* PCIE_CFG :: STATUS_COMMAND :: FAST_BACK_TO_BACK_CAPABLE [23:23] */ -#define PCIE_CFG_STATUS_COMMAND_FAST_BACK_TO_BACK_CAPABLE_MASK 0x00800000 -#define PCIE_CFG_STATUS_COMMAND_FAST_BACK_TO_BACK_CAPABLE_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_FAST_BACK_TO_BACK_CAPABLE_BITS 1 -#define PCIE_CFG_STATUS_COMMAND_FAST_BACK_TO_BACK_CAPABLE_SHIFT 23 - -/* PCIE_CFG :: STATUS_COMMAND :: RESERVED_0 [22:22] */ -#define PCIE_CFG_STATUS_COMMAND_RESERVED_0_MASK 0x00400000 -#define PCIE_CFG_STATUS_COMMAND_RESERVED_0_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_RESERVED_0_BITS 1 -#define PCIE_CFG_STATUS_COMMAND_RESERVED_0_SHIFT 22 - -/* PCIE_CFG :: STATUS_COMMAND :: CAPABLE_66MHZ [21:21] */ -#define PCIE_CFG_STATUS_COMMAND_CAPABLE_66MHZ_MASK 0x00200000 -#define PCIE_CFG_STATUS_COMMAND_CAPABLE_66MHZ_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_CAPABLE_66MHZ_BITS 1 -#define PCIE_CFG_STATUS_COMMAND_CAPABLE_66MHZ_SHIFT 21 - -/* PCIE_CFG :: STATUS_COMMAND :: CAPABILITIES_LIST [20:20] */ -#define PCIE_CFG_STATUS_COMMAND_CAPABILITIES_LIST_MASK 0x00100000 -#define PCIE_CFG_STATUS_COMMAND_CAPABILITIES_LIST_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_CAPABILITIES_LIST_BITS 1 -#define PCIE_CFG_STATUS_COMMAND_CAPABILITIES_LIST_SHIFT 20 - -/* PCIE_CFG :: STATUS_COMMAND :: INTERRUPT_STATUS [19:19] */ -#define PCIE_CFG_STATUS_COMMAND_INTERRUPT_STATUS_MASK 0x00080000 -#define PCIE_CFG_STATUS_COMMAND_INTERRUPT_STATUS_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_INTERRUPT_STATUS_BITS 1 -#define PCIE_CFG_STATUS_COMMAND_INTERRUPT_STATUS_SHIFT 19 - -/* PCIE_CFG :: STATUS_COMMAND :: RESERVED_1 [18:16] */ -#define PCIE_CFG_STATUS_COMMAND_RESERVED_1_MASK 0x00070000 -#define PCIE_CFG_STATUS_COMMAND_RESERVED_1_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_RESERVED_1_BITS 3 -#define PCIE_CFG_STATUS_COMMAND_RESERVED_1_SHIFT 16 - -/* PCIE_CFG :: STATUS_COMMAND :: RESERVED_2 [15:11] */ -#define PCIE_CFG_STATUS_COMMAND_RESERVED_2_MASK 0x0000f800 -#define PCIE_CFG_STATUS_COMMAND_RESERVED_2_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_RESERVED_2_BITS 5 -#define PCIE_CFG_STATUS_COMMAND_RESERVED_2_SHIFT 11 - -/* PCIE_CFG :: STATUS_COMMAND :: INTERRUPT_DISABLE [10:10] */ -#define PCIE_CFG_STATUS_COMMAND_INTERRUPT_DISABLE_MASK 0x00000400 -#define PCIE_CFG_STATUS_COMMAND_INTERRUPT_DISABLE_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_INTERRUPT_DISABLE_BITS 1 -#define PCIE_CFG_STATUS_COMMAND_INTERRUPT_DISABLE_SHIFT 10 - -/* PCIE_CFG :: STATUS_COMMAND :: FAST_BACK_TO_BACK_ENABLE [09:09] */ -#define PCIE_CFG_STATUS_COMMAND_FAST_BACK_TO_BACK_ENABLE_MASK 0x00000200 -#define PCIE_CFG_STATUS_COMMAND_FAST_BACK_TO_BACK_ENABLE_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_FAST_BACK_TO_BACK_ENABLE_BITS 1 -#define PCIE_CFG_STATUS_COMMAND_FAST_BACK_TO_BACK_ENABLE_SHIFT 9 - -/* PCIE_CFG :: STATUS_COMMAND :: SYSTEM_ERROR_ENABLE [08:08] */ -#define PCIE_CFG_STATUS_COMMAND_SYSTEM_ERROR_ENABLE_MASK 0x00000100 -#define PCIE_CFG_STATUS_COMMAND_SYSTEM_ERROR_ENABLE_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_SYSTEM_ERROR_ENABLE_BITS 1 -#define PCIE_CFG_STATUS_COMMAND_SYSTEM_ERROR_ENABLE_SHIFT 8 - -/* PCIE_CFG :: STATUS_COMMAND :: STEPPING_CONTROL [07:07] */ -#define PCIE_CFG_STATUS_COMMAND_STEPPING_CONTROL_MASK 0x00000080 -#define PCIE_CFG_STATUS_COMMAND_STEPPING_CONTROL_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_STEPPING_CONTROL_BITS 1 -#define PCIE_CFG_STATUS_COMMAND_STEPPING_CONTROL_SHIFT 7 - -/* PCIE_CFG :: STATUS_COMMAND :: PARITY_ERROR_ENABLE [06:06] */ -#define PCIE_CFG_STATUS_COMMAND_PARITY_ERROR_ENABLE_MASK 0x00000040 -#define PCIE_CFG_STATUS_COMMAND_PARITY_ERROR_ENABLE_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_PARITY_ERROR_ENABLE_BITS 1 -#define PCIE_CFG_STATUS_COMMAND_PARITY_ERROR_ENABLE_SHIFT 6 - -/* PCIE_CFG :: STATUS_COMMAND :: VGA_PALETTE_SNOOP [05:05] */ -#define PCIE_CFG_STATUS_COMMAND_VGA_PALETTE_SNOOP_MASK 0x00000020 -#define PCIE_CFG_STATUS_COMMAND_VGA_PALETTE_SNOOP_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_VGA_PALETTE_SNOOP_BITS 1 -#define PCIE_CFG_STATUS_COMMAND_VGA_PALETTE_SNOOP_SHIFT 5 - -/* PCIE_CFG :: STATUS_COMMAND :: MEMORY_WRITE_AND_INVALIDATE [04:04] */ -#define PCIE_CFG_STATUS_COMMAND_MEMORY_WRITE_AND_INVALIDATE_MASK 0x00000010 -#define PCIE_CFG_STATUS_COMMAND_MEMORY_WRITE_AND_INVALIDATE_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_MEMORY_WRITE_AND_INVALIDATE_BITS 1 -#define PCIE_CFG_STATUS_COMMAND_MEMORY_WRITE_AND_INVALIDATE_SHIFT 4 - -/* PCIE_CFG :: STATUS_COMMAND :: SPECIAL_CYCLES [03:03] */ -#define PCIE_CFG_STATUS_COMMAND_SPECIAL_CYCLES_MASK 0x00000008 -#define PCIE_CFG_STATUS_COMMAND_SPECIAL_CYCLES_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_SPECIAL_CYCLES_BITS 1 -#define PCIE_CFG_STATUS_COMMAND_SPECIAL_CYCLES_SHIFT 3 - -/* PCIE_CFG :: STATUS_COMMAND :: BUS_MASTER [02:02] */ -#define PCIE_CFG_STATUS_COMMAND_BUS_MASTER_MASK 0x00000004 -#define PCIE_CFG_STATUS_COMMAND_BUS_MASTER_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_BUS_MASTER_BITS 1 -#define PCIE_CFG_STATUS_COMMAND_BUS_MASTER_SHIFT 2 - -/* PCIE_CFG :: STATUS_COMMAND :: MEMORY_SPACE [01:01] */ -#define PCIE_CFG_STATUS_COMMAND_MEMORY_SPACE_MASK 0x00000002 -#define PCIE_CFG_STATUS_COMMAND_MEMORY_SPACE_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_MEMORY_SPACE_BITS 1 -#define PCIE_CFG_STATUS_COMMAND_MEMORY_SPACE_SHIFT 1 - -/* PCIE_CFG :: STATUS_COMMAND :: I_O_SPACE [00:00] */ -#define PCIE_CFG_STATUS_COMMAND_I_O_SPACE_MASK 0x00000001 -#define PCIE_CFG_STATUS_COMMAND_I_O_SPACE_ALIGN 0 -#define PCIE_CFG_STATUS_COMMAND_I_O_SPACE_BITS 1 -#define PCIE_CFG_STATUS_COMMAND_I_O_SPACE_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: PCI_CLASSCODE_AND_REVISION_ID - ***************************************************************************/ -/* PCIE_CFG :: PCI_CLASSCODE_AND_REVISION_ID :: PCI_CLASSCODE [31:08] */ -#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID_PCI_CLASSCODE_MASK 0xffffff00 -#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID_PCI_CLASSCODE_ALIGN 0 -#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID_PCI_CLASSCODE_BITS 24 -#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID_PCI_CLASSCODE_SHIFT 8 - -/* PCIE_CFG :: PCI_CLASSCODE_AND_REVISION_ID :: REVISION_ID [07:00] */ -#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID_REVISION_ID_MASK 0x000000ff -#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID_REVISION_ID_ALIGN 0 -#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID_REVISION_ID_BITS 8 -#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID_REVISION_ID_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE - ***************************************************************************/ -/* PCIE_CFG :: BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE :: BIST [31:24] */ -#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_BIST_MASK 0xff000000 -#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_BIST_ALIGN 0 -#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_BIST_BITS 8 -#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_BIST_SHIFT 24 - -/* PCIE_CFG :: BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE :: HEADER_TYPE [23:16] */ -#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_HEADER_TYPE_MASK 0x00ff0000 -#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_HEADER_TYPE_ALIGN 0 -#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_HEADER_TYPE_BITS 8 -#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_HEADER_TYPE_SHIFT 16 - -/* PCIE_CFG :: BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE :: LATENCY_TIMER [15:08] */ -#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_LATENCY_TIMER_MASK 0x0000ff00 -#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_LATENCY_TIMER_ALIGN 0 -#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_LATENCY_TIMER_BITS 8 -#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_LATENCY_TIMER_SHIFT 8 - -/* PCIE_CFG :: BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE :: CACHE_LINE_SIZE [07:00] */ -#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_CACHE_LINE_SIZE_MASK 0x000000ff -#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_CACHE_LINE_SIZE_ALIGN 0 -#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_CACHE_LINE_SIZE_BITS 8 -#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_CACHE_LINE_SIZE_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: BASE_ADDRESS_1 - ***************************************************************************/ -/* PCIE_CFG :: BASE_ADDRESS_1 :: BASE_ADDRESS [31:16] */ -#define PCIE_CFG_BASE_ADDRESS_1_BASE_ADDRESS_MASK 0xffff0000 -#define PCIE_CFG_BASE_ADDRESS_1_BASE_ADDRESS_ALIGN 0 -#define PCIE_CFG_BASE_ADDRESS_1_BASE_ADDRESS_BITS 16 -#define PCIE_CFG_BASE_ADDRESS_1_BASE_ADDRESS_SHIFT 16 - -/* PCIE_CFG :: BASE_ADDRESS_1 :: RESERVED_0 [15:04] */ -#define PCIE_CFG_BASE_ADDRESS_1_RESERVED_0_MASK 0x0000fff0 -#define PCIE_CFG_BASE_ADDRESS_1_RESERVED_0_ALIGN 0 -#define PCIE_CFG_BASE_ADDRESS_1_RESERVED_0_BITS 12 -#define PCIE_CFG_BASE_ADDRESS_1_RESERVED_0_SHIFT 4 - -/* PCIE_CFG :: BASE_ADDRESS_1 :: PREFETCHABLE [03:03] */ -#define PCIE_CFG_BASE_ADDRESS_1_PREFETCHABLE_MASK 0x00000008 -#define PCIE_CFG_BASE_ADDRESS_1_PREFETCHABLE_ALIGN 0 -#define PCIE_CFG_BASE_ADDRESS_1_PREFETCHABLE_BITS 1 -#define PCIE_CFG_BASE_ADDRESS_1_PREFETCHABLE_SHIFT 3 - -/* PCIE_CFG :: BASE_ADDRESS_1 :: TYPE [02:01] */ -#define PCIE_CFG_BASE_ADDRESS_1_TYPE_MASK 0x00000006 -#define PCIE_CFG_BASE_ADDRESS_1_TYPE_ALIGN 0 -#define PCIE_CFG_BASE_ADDRESS_1_TYPE_BITS 2 -#define PCIE_CFG_BASE_ADDRESS_1_TYPE_SHIFT 1 - -/* PCIE_CFG :: BASE_ADDRESS_1 :: MEMORY_SPACE_INDICATOR [00:00] */ -#define PCIE_CFG_BASE_ADDRESS_1_MEMORY_SPACE_INDICATOR_MASK 0x00000001 -#define PCIE_CFG_BASE_ADDRESS_1_MEMORY_SPACE_INDICATOR_ALIGN 0 -#define PCIE_CFG_BASE_ADDRESS_1_MEMORY_SPACE_INDICATOR_BITS 1 -#define PCIE_CFG_BASE_ADDRESS_1_MEMORY_SPACE_INDICATOR_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: BASE_ADDRESS_2 - ***************************************************************************/ -/* PCIE_CFG :: BASE_ADDRESS_2 :: EXTENDED_BASE_ADDRESS [31:00] */ -#define PCIE_CFG_BASE_ADDRESS_2_EXTENDED_BASE_ADDRESS_MASK 0xffffffff -#define PCIE_CFG_BASE_ADDRESS_2_EXTENDED_BASE_ADDRESS_ALIGN 0 -#define PCIE_CFG_BASE_ADDRESS_2_EXTENDED_BASE_ADDRESS_BITS 32 -#define PCIE_CFG_BASE_ADDRESS_2_EXTENDED_BASE_ADDRESS_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: BASE_ADDRESS_3 - ***************************************************************************/ -/* PCIE_CFG :: BASE_ADDRESS_3 :: BASE_ADDRESS_2 [31:22] */ -#define PCIE_CFG_BASE_ADDRESS_3_BASE_ADDRESS_2_MASK 0xffc00000 -#define PCIE_CFG_BASE_ADDRESS_3_BASE_ADDRESS_2_ALIGN 0 -#define PCIE_CFG_BASE_ADDRESS_3_BASE_ADDRESS_2_BITS 10 -#define PCIE_CFG_BASE_ADDRESS_3_BASE_ADDRESS_2_SHIFT 22 - -/* PCIE_CFG :: BASE_ADDRESS_3 :: RESERVED_0 [21:04] */ -#define PCIE_CFG_BASE_ADDRESS_3_RESERVED_0_MASK 0x003ffff0 -#define PCIE_CFG_BASE_ADDRESS_3_RESERVED_0_ALIGN 0 -#define PCIE_CFG_BASE_ADDRESS_3_RESERVED_0_BITS 18 -#define PCIE_CFG_BASE_ADDRESS_3_RESERVED_0_SHIFT 4 - -/* PCIE_CFG :: BASE_ADDRESS_3 :: PREFETCHABLE [03:03] */ -#define PCIE_CFG_BASE_ADDRESS_3_PREFETCHABLE_MASK 0x00000008 -#define PCIE_CFG_BASE_ADDRESS_3_PREFETCHABLE_ALIGN 0 -#define PCIE_CFG_BASE_ADDRESS_3_PREFETCHABLE_BITS 1 -#define PCIE_CFG_BASE_ADDRESS_3_PREFETCHABLE_SHIFT 3 - -/* PCIE_CFG :: BASE_ADDRESS_3 :: TYPE [02:01] */ -#define PCIE_CFG_BASE_ADDRESS_3_TYPE_MASK 0x00000006 -#define PCIE_CFG_BASE_ADDRESS_3_TYPE_ALIGN 0 -#define PCIE_CFG_BASE_ADDRESS_3_TYPE_BITS 2 -#define PCIE_CFG_BASE_ADDRESS_3_TYPE_SHIFT 1 - -/* PCIE_CFG :: BASE_ADDRESS_3 :: MEMORY_SPACE_INDICATOR [00:00] */ -#define PCIE_CFG_BASE_ADDRESS_3_MEMORY_SPACE_INDICATOR_MASK 0x00000001 -#define PCIE_CFG_BASE_ADDRESS_3_MEMORY_SPACE_INDICATOR_ALIGN 0 -#define PCIE_CFG_BASE_ADDRESS_3_MEMORY_SPACE_INDICATOR_BITS 1 -#define PCIE_CFG_BASE_ADDRESS_3_MEMORY_SPACE_INDICATOR_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: BASE_ADDRESS_4 - ***************************************************************************/ -/* PCIE_CFG :: BASE_ADDRESS_4 :: EXTENDED_BASE_ADDRESS_2 [31:00] */ -#define PCIE_CFG_BASE_ADDRESS_4_EXTENDED_BASE_ADDRESS_2_MASK 0xffffffff -#define PCIE_CFG_BASE_ADDRESS_4_EXTENDED_BASE_ADDRESS_2_ALIGN 0 -#define PCIE_CFG_BASE_ADDRESS_4_EXTENDED_BASE_ADDRESS_2_BITS 32 -#define PCIE_CFG_BASE_ADDRESS_4_EXTENDED_BASE_ADDRESS_2_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: CARDBUS_CIS_POINTER - ***************************************************************************/ -/* PCIE_CFG :: CARDBUS_CIS_POINTER :: CARDBUS_CIS_POINTER [31:00] */ -#define PCIE_CFG_CARDBUS_CIS_POINTER_CARDBUS_CIS_POINTER_MASK 0xffffffff -#define PCIE_CFG_CARDBUS_CIS_POINTER_CARDBUS_CIS_POINTER_ALIGN 0 -#define PCIE_CFG_CARDBUS_CIS_POINTER_CARDBUS_CIS_POINTER_BITS 32 -#define PCIE_CFG_CARDBUS_CIS_POINTER_CARDBUS_CIS_POINTER_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: SUBSYSTEM_DEVICE_VENDOR_ID - ***************************************************************************/ -/* PCIE_CFG :: SUBSYSTEM_DEVICE_VENDOR_ID :: SUBSYSTEM_DEVICE_ID [31:16] */ -#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID_SUBSYSTEM_DEVICE_ID_MASK 0xffff0000 -#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID_SUBSYSTEM_DEVICE_ID_ALIGN 0 -#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID_SUBSYSTEM_DEVICE_ID_BITS 16 -#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID_SUBSYSTEM_DEVICE_ID_SHIFT 16 - -/* PCIE_CFG :: SUBSYSTEM_DEVICE_VENDOR_ID :: SUBSYSTEM_VENDOR_ID [15:00] */ -#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID_SUBSYSTEM_VENDOR_ID_MASK 0x0000ffff -#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID_SUBSYSTEM_VENDOR_ID_ALIGN 0 -#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID_SUBSYSTEM_VENDOR_ID_BITS 16 -#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID_SUBSYSTEM_VENDOR_ID_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: EXPANSION_ROM_BASE_ADDRESS - ***************************************************************************/ -/* PCIE_CFG :: EXPANSION_ROM_BASE_ADDRESS :: ROM_BASE_ADDRESS [31:16] */ -#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_ROM_BASE_ADDRESS_MASK 0xffff0000 -#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_ROM_BASE_ADDRESS_ALIGN 0 -#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_ROM_BASE_ADDRESS_BITS 16 -#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_ROM_BASE_ADDRESS_SHIFT 16 - -/* PCIE_CFG :: EXPANSION_ROM_BASE_ADDRESS :: ROM_SIZE_INDICATION [15:11] */ -#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_ROM_SIZE_INDICATION_MASK 0x0000f800 -#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_ROM_SIZE_INDICATION_ALIGN 0 -#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_ROM_SIZE_INDICATION_BITS 5 -#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_ROM_SIZE_INDICATION_SHIFT 11 - -/* PCIE_CFG :: EXPANSION_ROM_BASE_ADDRESS :: RESERVED_0 [10:01] */ -#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_RESERVED_0_MASK 0x000007fe -#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_RESERVED_0_ALIGN 0 -#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_RESERVED_0_BITS 10 -#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_RESERVED_0_SHIFT 1 - -/* PCIE_CFG :: EXPANSION_ROM_BASE_ADDRESS :: EXPANSION_ROM_ENABLE [00:00] */ -#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_EXPANSION_ROM_ENABLE_MASK 0x00000001 -#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_EXPANSION_ROM_ENABLE_ALIGN 0 -#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_EXPANSION_ROM_ENABLE_BITS 1 -#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_EXPANSION_ROM_ENABLE_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: CAPABILITIES_POINTER - ***************************************************************************/ -/* PCIE_CFG :: CAPABILITIES_POINTER :: CAPABILITIES_POINTER [31:00] */ -#define PCIE_CFG_CAPABILITIES_POINTER_CAPABILITIES_POINTER_MASK 0xffffffff -#define PCIE_CFG_CAPABILITIES_POINTER_CAPABILITIES_POINTER_ALIGN 0 -#define PCIE_CFG_CAPABILITIES_POINTER_CAPABILITIES_POINTER_BITS 32 -#define PCIE_CFG_CAPABILITIES_POINTER_CAPABILITIES_POINTER_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: INTERRUPT - ***************************************************************************/ -/* PCIE_CFG :: INTERRUPT :: RESERVED_0 [31:16] */ -#define PCIE_CFG_INTERRUPT_RESERVED_0_MASK 0xffff0000 -#define PCIE_CFG_INTERRUPT_RESERVED_0_ALIGN 0 -#define PCIE_CFG_INTERRUPT_RESERVED_0_BITS 16 -#define PCIE_CFG_INTERRUPT_RESERVED_0_SHIFT 16 - -/* PCIE_CFG :: INTERRUPT :: INTERRUPT_PIN [15:08] */ -#define PCIE_CFG_INTERRUPT_INTERRUPT_PIN_MASK 0x0000ff00 -#define PCIE_CFG_INTERRUPT_INTERRUPT_PIN_ALIGN 0 -#define PCIE_CFG_INTERRUPT_INTERRUPT_PIN_BITS 8 -#define PCIE_CFG_INTERRUPT_INTERRUPT_PIN_SHIFT 8 - -/* PCIE_CFG :: INTERRUPT :: INTERRUPT_LINE [07:00] */ -#define PCIE_CFG_INTERRUPT_INTERRUPT_LINE_MASK 0x000000ff -#define PCIE_CFG_INTERRUPT_INTERRUPT_LINE_ALIGN 0 -#define PCIE_CFG_INTERRUPT_INTERRUPT_LINE_BITS 8 -#define PCIE_CFG_INTERRUPT_INTERRUPT_LINE_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: VPD_CAPABILITIES - ***************************************************************************/ -/* PCIE_CFG :: VPD_CAPABILITIES :: RESERVED_0 [31:00] */ -#define PCIE_CFG_VPD_CAPABILITIES_RESERVED_0_MASK 0xffffffff -#define PCIE_CFG_VPD_CAPABILITIES_RESERVED_0_ALIGN 0 -#define PCIE_CFG_VPD_CAPABILITIES_RESERVED_0_BITS 32 -#define PCIE_CFG_VPD_CAPABILITIES_RESERVED_0_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: VPD_DATA - ***************************************************************************/ -/* PCIE_CFG :: VPD_DATA :: RESERVED_0 [31:00] */ -#define PCIE_CFG_VPD_DATA_RESERVED_0_MASK 0xffffffff -#define PCIE_CFG_VPD_DATA_RESERVED_0_ALIGN 0 -#define PCIE_CFG_VPD_DATA_RESERVED_0_BITS 32 -#define PCIE_CFG_VPD_DATA_RESERVED_0_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY - ***************************************************************************/ -/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: PME_SUPPORT [31:27] */ -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_PME_SUPPORT_MASK 0xf8000000 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_PME_SUPPORT_ALIGN 0 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_PME_SUPPORT_BITS 5 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_PME_SUPPORT_SHIFT 27 - -/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: D2_SUPPORT [26:26] */ -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_D2_SUPPORT_MASK 0x04000000 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_D2_SUPPORT_ALIGN 0 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_D2_SUPPORT_BITS 1 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_D2_SUPPORT_SHIFT 26 - -/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: D1_SUPPORT [25:25] */ -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_D1_SUPPORT_MASK 0x02000000 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_D1_SUPPORT_ALIGN 0 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_D1_SUPPORT_BITS 1 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_D1_SUPPORT_SHIFT 25 - -/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: AUX_CURRENT [24:22] */ -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_AUX_CURRENT_MASK 0x01c00000 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_AUX_CURRENT_ALIGN 0 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_AUX_CURRENT_BITS 3 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_AUX_CURRENT_SHIFT 22 - -/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: DSI [21:21] */ -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_DSI_MASK 0x00200000 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_DSI_ALIGN 0 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_DSI_BITS 1 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_DSI_SHIFT 21 - -/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: RESERVED_0 [20:20] */ -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_RESERVED_0_MASK 0x00100000 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_RESERVED_0_ALIGN 0 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_RESERVED_0_BITS 1 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_RESERVED_0_SHIFT 20 - -/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: PME_CLOCK [19:19] */ -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_PME_CLOCK_MASK 0x00080000 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_PME_CLOCK_ALIGN 0 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_PME_CLOCK_BITS 1 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_PME_CLOCK_SHIFT 19 - -/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: VERSION [18:16] */ -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_VERSION_MASK 0x00070000 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_VERSION_ALIGN 0 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_VERSION_BITS 3 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_VERSION_SHIFT 16 - -/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: NEXT_POINTER [15:08] */ -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_NEXT_POINTER_MASK 0x0000ff00 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_NEXT_POINTER_ALIGN 0 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_NEXT_POINTER_BITS 8 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_NEXT_POINTER_SHIFT 8 - -/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: CAPABILITY_ID [07:00] */ -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_CAPABILITY_ID_MASK 0x000000ff -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_CAPABILITY_ID_ALIGN 0 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_CAPABILITY_ID_BITS 8 -#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_CAPABILITY_ID_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS - ***************************************************************************/ -/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: PM_DATA [31:24] */ -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PM_DATA_MASK 0xff000000 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PM_DATA_ALIGN 0 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PM_DATA_BITS 8 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PM_DATA_SHIFT 24 - -/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: RESERVED_0 [23:16] */ -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_0_MASK 0x00ff0000 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_0_ALIGN 0 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_0_BITS 8 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_0_SHIFT 16 - -/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: PME_STATUS [15:15] */ -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PME_STATUS_MASK 0x00008000 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PME_STATUS_ALIGN 0 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PME_STATUS_BITS 1 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PME_STATUS_SHIFT 15 - -/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: DATA_SCALE [14:13] */ -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_DATA_SCALE_MASK 0x00006000 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_DATA_SCALE_ALIGN 0 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_DATA_SCALE_BITS 2 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_DATA_SCALE_SHIFT 13 - -/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: DATA_SELECT [12:09] */ -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_DATA_SELECT_MASK 0x00001e00 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_DATA_SELECT_ALIGN 0 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_DATA_SELECT_BITS 4 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_DATA_SELECT_SHIFT 9 - -/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: PME_ENABLE [08:08] */ -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PME_ENABLE_MASK 0x00000100 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PME_ENABLE_ALIGN 0 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PME_ENABLE_BITS 1 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PME_ENABLE_SHIFT 8 - -/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: RESERVED_1 [07:04] */ -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_1_MASK 0x000000f0 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_1_ALIGN 0 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_1_BITS 4 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_1_SHIFT 4 - -/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: NO_SOFT_RESET [03:03] */ -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_NO_SOFT_RESET_MASK 0x00000008 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_NO_SOFT_RESET_ALIGN 0 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_NO_SOFT_RESET_BITS 1 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_NO_SOFT_RESET_SHIFT 3 - -/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: RESERVED_2 [02:02] */ -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_2_MASK 0x00000004 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_2_ALIGN 0 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_2_BITS 1 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_2_SHIFT 2 - -/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: POWER_STATE [01:00] */ -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_POWER_STATE_MASK 0x00000003 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_POWER_STATE_ALIGN 0 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_POWER_STATE_BITS 2 -#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_POWER_STATE_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: MSI_CAPABILITY_HEADER - ***************************************************************************/ -/* PCIE_CFG :: MSI_CAPABILITY_HEADER :: MSI_CONTROL [31:24] */ -#define PCIE_CFG_MSI_CAPABILITY_HEADER_MSI_CONTROL_MASK 0xff000000 -#define PCIE_CFG_MSI_CAPABILITY_HEADER_MSI_CONTROL_ALIGN 0 -#define PCIE_CFG_MSI_CAPABILITY_HEADER_MSI_CONTROL_BITS 8 -#define PCIE_CFG_MSI_CAPABILITY_HEADER_MSI_CONTROL_SHIFT 24 - -/* PCIE_CFG :: MSI_CAPABILITY_HEADER :: ADDRESS_CAPABLE_64_BIT [23:23] */ -#define PCIE_CFG_MSI_CAPABILITY_HEADER_ADDRESS_CAPABLE_64_BIT_MASK 0x00800000 -#define PCIE_CFG_MSI_CAPABILITY_HEADER_ADDRESS_CAPABLE_64_BIT_ALIGN 0 -#define PCIE_CFG_MSI_CAPABILITY_HEADER_ADDRESS_CAPABLE_64_BIT_BITS 1 -#define PCIE_CFG_MSI_CAPABILITY_HEADER_ADDRESS_CAPABLE_64_BIT_SHIFT 23 - -/* PCIE_CFG :: MSI_CAPABILITY_HEADER :: MULTIPLE_MESSAGE_ENABLE [22:20] */ -#define PCIE_CFG_MSI_CAPABILITY_HEADER_MULTIPLE_MESSAGE_ENABLE_MASK 0x00700000 -#define PCIE_CFG_MSI_CAPABILITY_HEADER_MULTIPLE_MESSAGE_ENABLE_ALIGN 0 -#define PCIE_CFG_MSI_CAPABILITY_HEADER_MULTIPLE_MESSAGE_ENABLE_BITS 3 -#define PCIE_CFG_MSI_CAPABILITY_HEADER_MULTIPLE_MESSAGE_ENABLE_SHIFT 20 - -/* PCIE_CFG :: MSI_CAPABILITY_HEADER :: MULTIPLE_MESSAGE_CAPABLE [19:17] */ -#define PCIE_CFG_MSI_CAPABILITY_HEADER_MULTIPLE_MESSAGE_CAPABLE_MASK 0x000e0000 -#define PCIE_CFG_MSI_CAPABILITY_HEADER_MULTIPLE_MESSAGE_CAPABLE_ALIGN 0 -#define PCIE_CFG_MSI_CAPABILITY_HEADER_MULTIPLE_MESSAGE_CAPABLE_BITS 3 -#define PCIE_CFG_MSI_CAPABILITY_HEADER_MULTIPLE_MESSAGE_CAPABLE_SHIFT 17 - -/* PCIE_CFG :: MSI_CAPABILITY_HEADER :: MSI_ENABLE [16:16] */ -#define PCIE_CFG_MSI_CAPABILITY_HEADER_MSI_ENABLE_MASK 0x00010000 -#define PCIE_CFG_MSI_CAPABILITY_HEADER_MSI_ENABLE_ALIGN 0 -#define PCIE_CFG_MSI_CAPABILITY_HEADER_MSI_ENABLE_BITS 1 -#define PCIE_CFG_MSI_CAPABILITY_HEADER_MSI_ENABLE_SHIFT 16 - -/* PCIE_CFG :: MSI_CAPABILITY_HEADER :: NEXT_POINTER [15:08] */ -#define PCIE_CFG_MSI_CAPABILITY_HEADER_NEXT_POINTER_MASK 0x0000ff00 -#define PCIE_CFG_MSI_CAPABILITY_HEADER_NEXT_POINTER_ALIGN 0 -#define PCIE_CFG_MSI_CAPABILITY_HEADER_NEXT_POINTER_BITS 8 -#define PCIE_CFG_MSI_CAPABILITY_HEADER_NEXT_POINTER_SHIFT 8 - -/* PCIE_CFG :: MSI_CAPABILITY_HEADER :: CAPABILITY_ID [07:00] */ -#define PCIE_CFG_MSI_CAPABILITY_HEADER_CAPABILITY_ID_MASK 0x000000ff -#define PCIE_CFG_MSI_CAPABILITY_HEADER_CAPABILITY_ID_ALIGN 0 -#define PCIE_CFG_MSI_CAPABILITY_HEADER_CAPABILITY_ID_BITS 8 -#define PCIE_CFG_MSI_CAPABILITY_HEADER_CAPABILITY_ID_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: MSI_LOWER_ADDRESS - ***************************************************************************/ -/* PCIE_CFG :: MSI_LOWER_ADDRESS :: MSI_LOWER_ADDRESS [31:02] */ -#define PCIE_CFG_MSI_LOWER_ADDRESS_MSI_LOWER_ADDRESS_MASK 0xfffffffc -#define PCIE_CFG_MSI_LOWER_ADDRESS_MSI_LOWER_ADDRESS_ALIGN 0 -#define PCIE_CFG_MSI_LOWER_ADDRESS_MSI_LOWER_ADDRESS_BITS 30 -#define PCIE_CFG_MSI_LOWER_ADDRESS_MSI_LOWER_ADDRESS_SHIFT 2 - -/* PCIE_CFG :: MSI_LOWER_ADDRESS :: RESERVED_0 [01:00] */ -#define PCIE_CFG_MSI_LOWER_ADDRESS_RESERVED_0_MASK 0x00000003 -#define PCIE_CFG_MSI_LOWER_ADDRESS_RESERVED_0_ALIGN 0 -#define PCIE_CFG_MSI_LOWER_ADDRESS_RESERVED_0_BITS 2 -#define PCIE_CFG_MSI_LOWER_ADDRESS_RESERVED_0_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: MSI_UPPER_ADDRESS_REGISTER - ***************************************************************************/ -/* PCIE_CFG :: MSI_UPPER_ADDRESS_REGISTER :: MSI_UPPER_ADDRESS [31:00] */ -#define PCIE_CFG_MSI_UPPER_ADDRESS_REGISTER_MSI_UPPER_ADDRESS_MASK 0xffffffff -#define PCIE_CFG_MSI_UPPER_ADDRESS_REGISTER_MSI_UPPER_ADDRESS_ALIGN 0 -#define PCIE_CFG_MSI_UPPER_ADDRESS_REGISTER_MSI_UPPER_ADDRESS_BITS 32 -#define PCIE_CFG_MSI_UPPER_ADDRESS_REGISTER_MSI_UPPER_ADDRESS_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: MSI_DATA - ***************************************************************************/ -/* PCIE_CFG :: MSI_DATA :: RESERVED_0 [31:16] */ -#define PCIE_CFG_MSI_DATA_RESERVED_0_MASK 0xffff0000 -#define PCIE_CFG_MSI_DATA_RESERVED_0_ALIGN 0 -#define PCIE_CFG_MSI_DATA_RESERVED_0_BITS 16 -#define PCIE_CFG_MSI_DATA_RESERVED_0_SHIFT 16 - -/* PCIE_CFG :: MSI_DATA :: MSI_DATA [15:00] */ -#define PCIE_CFG_MSI_DATA_MSI_DATA_MASK 0x0000ffff -#define PCIE_CFG_MSI_DATA_MSI_DATA_ALIGN 0 -#define PCIE_CFG_MSI_DATA_MSI_DATA_BITS 16 -#define PCIE_CFG_MSI_DATA_MSI_DATA_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER - ***************************************************************************/ -/* PCIE_CFG :: BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER :: RESERVED_0 [31:24] */ -#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_RESERVED_0_MASK 0xff000000 -#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_RESERVED_0_ALIGN 0 -#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_RESERVED_0_BITS 8 -#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_RESERVED_0_SHIFT 24 - -/* PCIE_CFG :: BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER :: VENDOR_SPECIFIC_CAPABILITY_LENGTH [23:16] */ -#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_VENDOR_SPECIFIC_CAPABILITY_LENGTH_MASK 0x00ff0000 -#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_VENDOR_SPECIFIC_CAPABILITY_LENGTH_ALIGN 0 -#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_VENDOR_SPECIFIC_CAPABILITY_LENGTH_BITS 8 -#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_VENDOR_SPECIFIC_CAPABILITY_LENGTH_SHIFT 16 - -/* PCIE_CFG :: BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER :: NEXT_POINTER [15:08] */ -#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_NEXT_POINTER_MASK 0x0000ff00 -#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_NEXT_POINTER_ALIGN 0 -#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_NEXT_POINTER_BITS 8 -#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_NEXT_POINTER_SHIFT 8 - -/* PCIE_CFG :: BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER :: CAPABILITY_ID [07:00] */ -#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_CAPABILITY_ID_MASK 0x000000ff -#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_CAPABILITY_ID_ALIGN 0 -#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_CAPABILITY_ID_BITS 8 -#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_CAPABILITY_ID_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: RESET_COUNTERS_INITIAL_VALUES - ***************************************************************************/ -/* PCIE_CFG :: RESET_COUNTERS_INITIAL_VALUES :: POR_RESET_COUNTER [31:28] */ -#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_POR_RESET_COUNTER_MASK 0xf0000000 -#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_POR_RESET_COUNTER_ALIGN 0 -#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_POR_RESET_COUNTER_BITS 4 -#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_POR_RESET_COUNTER_SHIFT 28 - -/* PCIE_CFG :: RESET_COUNTERS_INITIAL_VALUES :: HOT_RESET_COUNTER [27:24] */ -#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_HOT_RESET_COUNTER_MASK 0x0f000000 -#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_HOT_RESET_COUNTER_ALIGN 0 -#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_HOT_RESET_COUNTER_BITS 4 -#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_HOT_RESET_COUNTER_SHIFT 24 - -/* PCIE_CFG :: RESET_COUNTERS_INITIAL_VALUES :: GRC_RESET_COUNTER [23:16] */ -#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_GRC_RESET_COUNTER_MASK 0x00ff0000 -#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_GRC_RESET_COUNTER_ALIGN 0 -#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_GRC_RESET_COUNTER_BITS 8 -#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_GRC_RESET_COUNTER_SHIFT 16 - -/* PCIE_CFG :: RESET_COUNTERS_INITIAL_VALUES :: PERST_RESET_COUNTER [15:08] */ -#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_PERST_RESET_COUNTER_MASK 0x0000ff00 -#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_PERST_RESET_COUNTER_ALIGN 0 -#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_PERST_RESET_COUNTER_BITS 8 -#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_PERST_RESET_COUNTER_SHIFT 8 - -/* PCIE_CFG :: RESET_COUNTERS_INITIAL_VALUES :: LINKDOWN_RESET_COUNTER [07:00] */ -#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_LINKDOWN_RESET_COUNTER_MASK 0x000000ff -#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_LINKDOWN_RESET_COUNTER_ALIGN 0 -#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_LINKDOWN_RESET_COUNTER_BITS 8 -#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_LINKDOWN_RESET_COUNTER_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL - ***************************************************************************/ -/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: PRODUCT_ID [31:24] */ -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_PRODUCT_ID_MASK 0xff000000 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_PRODUCT_ID_ALIGN 0 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_PRODUCT_ID_BITS 8 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_PRODUCT_ID_SHIFT 24 - -/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ASIC_REVISION_ID [23:16] */ -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ASIC_REVISION_ID_MASK 0x00ff0000 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ASIC_REVISION_ID_ALIGN 0 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ASIC_REVISION_ID_BITS 8 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ASIC_REVISION_ID_SHIFT 16 - -/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ENABLE_TLP_MINOR_ERROR_TOLERANCE [15:15] */ -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_TLP_MINOR_ERROR_TOLERANCE_MASK 0x00008000 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_TLP_MINOR_ERROR_TOLERANCE_ALIGN 0 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_TLP_MINOR_ERROR_TOLERANCE_BITS 1 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_TLP_MINOR_ERROR_TOLERANCE_SHIFT 15 - -/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: LOG_HEADER_OVERFLOW [14:14] */ -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_LOG_HEADER_OVERFLOW_MASK 0x00004000 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_LOG_HEADER_OVERFLOW_ALIGN 0 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_LOG_HEADER_OVERFLOW_BITS 1 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_LOG_HEADER_OVERFLOW_SHIFT 14 - -/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: BOUNDARY_CHECK [13:13] */ -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_BOUNDARY_CHECK_MASK 0x00002000 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_BOUNDARY_CHECK_ALIGN 0 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_BOUNDARY_CHECK_BITS 1 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_BOUNDARY_CHECK_SHIFT 13 - -/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: BYTE_ENABLE_RULE_CHECK [12:12] */ -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_BYTE_ENABLE_RULE_CHECK_MASK 0x00001000 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_BYTE_ENABLE_RULE_CHECK_ALIGN 0 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_BYTE_ENABLE_RULE_CHECK_BITS 1 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_BYTE_ENABLE_RULE_CHECK_SHIFT 12 - -/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: INTERRUPT_CHECK [11:11] */ -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_INTERRUPT_CHECK_MASK 0x00000800 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_INTERRUPT_CHECK_ALIGN 0 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_INTERRUPT_CHECK_BITS 1 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_INTERRUPT_CHECK_SHIFT 11 - -/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: RCB_CHECK [10:10] */ -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_RCB_CHECK_MASK 0x00000400 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_RCB_CHECK_ALIGN 0 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_RCB_CHECK_BITS 1 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_RCB_CHECK_SHIFT 10 - -/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ENABLE_TAGGED_STATUS_MODE [09:09] */ -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_TAGGED_STATUS_MODE_MASK 0x00000200 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_TAGGED_STATUS_MODE_ALIGN 0 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_TAGGED_STATUS_MODE_BITS 1 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_TAGGED_STATUS_MODE_SHIFT 9 - -/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: MASK_INTERRUPT_MODE [08:08] */ -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_MASK_INTERRUPT_MODE_MASK 0x00000100 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_MASK_INTERRUPT_MODE_ALIGN 0 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_MASK_INTERRUPT_MODE_BITS 1 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_MASK_INTERRUPT_MODE_SHIFT 8 - -/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ENABLE_INDIRECT_ACCESS [07:07] */ -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_INDIRECT_ACCESS_MASK 0x00000080 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_INDIRECT_ACCESS_ALIGN 0 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_INDIRECT_ACCESS_BITS 1 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_INDIRECT_ACCESS_SHIFT 7 - -/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ENABLE_REGISTER_WORD_SWAP [06:06] */ -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_REGISTER_WORD_SWAP_MASK 0x00000040 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_REGISTER_WORD_SWAP_ALIGN 0 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_REGISTER_WORD_SWAP_BITS 1 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_REGISTER_WORD_SWAP_SHIFT 6 - -/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ENABLE_CLOCK_CONTROL_REGISTER_READ_WRITE_CAPABILITY [05:05] */ -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_CLOCK_CONTROL_REGISTER_READ_WRITE_CAPABILITY_MASK 0x00000020 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_CLOCK_CONTROL_REGISTER_READ_WRITE_CAPABILITY_ALIGN 0 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_CLOCK_CONTROL_REGISTER_READ_WRITE_CAPABILITY_BITS 1 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_CLOCK_CONTROL_REGISTER_READ_WRITE_CAPABILITY_SHIFT 5 - -/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ENABLE_PCI_STATE_REGISTER_READ_WRITE_CAPABILITY [04:04] */ -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_PCI_STATE_REGISTER_READ_WRITE_CAPABILITY_MASK 0x00000010 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_PCI_STATE_REGISTER_READ_WRITE_CAPABILITY_ALIGN 0 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_PCI_STATE_REGISTER_READ_WRITE_CAPABILITY_BITS 1 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_PCI_STATE_REGISTER_READ_WRITE_CAPABILITY_SHIFT 4 - -/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ENABLE_ENDIAN_WORD_SWAP [03:03] */ -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_ENDIAN_WORD_SWAP_MASK 0x00000008 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_ENDIAN_WORD_SWAP_ALIGN 0 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_ENDIAN_WORD_SWAP_BITS 1 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_ENDIAN_WORD_SWAP_SHIFT 3 - -/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ENABLE_ENDIAN_BYTE_SWAP [02:02] */ -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_ENDIAN_BYTE_SWAP_MASK 0x00000004 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_ENDIAN_BYTE_SWAP_ALIGN 0 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_ENDIAN_BYTE_SWAP_BITS 1 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_ENDIAN_BYTE_SWAP_SHIFT 2 - -/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: MASK_INTERRUPT [01:01] */ -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_MASK_INTERRUPT_MASK 0x00000002 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_MASK_INTERRUPT_ALIGN 0 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_MASK_INTERRUPT_BITS 1 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_MASK_INTERRUPT_SHIFT 1 - -/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: CLEAR_INTERRUPT [00:00] */ -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_CLEAR_INTERRUPT_MASK 0x00000001 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_CLEAR_INTERRUPT_ALIGN 0 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_CLEAR_INTERRUPT_BITS 1 -#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_CLEAR_INTERRUPT_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: SPARE - ***************************************************************************/ -/* PCIE_CFG :: SPARE :: UNUSED_0 [31:16] */ -#define PCIE_CFG_SPARE_UNUSED_0_MASK 0xffff0000 -#define PCIE_CFG_SPARE_UNUSED_0_ALIGN 0 -#define PCIE_CFG_SPARE_UNUSED_0_BITS 16 -#define PCIE_CFG_SPARE_UNUSED_0_SHIFT 16 - -/* PCIE_CFG :: SPARE :: RESERVED_0 [15:15] */ -#define PCIE_CFG_SPARE_RESERVED_0_MASK 0x00008000 -#define PCIE_CFG_SPARE_RESERVED_0_ALIGN 0 -#define PCIE_CFG_SPARE_RESERVED_0_BITS 1 -#define PCIE_CFG_SPARE_RESERVED_0_SHIFT 15 - -/* PCIE_CFG :: SPARE :: UNUSED_1 [14:02] */ -#define PCIE_CFG_SPARE_UNUSED_1_MASK 0x00007ffc -#define PCIE_CFG_SPARE_UNUSED_1_ALIGN 0 -#define PCIE_CFG_SPARE_UNUSED_1_BITS 13 -#define PCIE_CFG_SPARE_UNUSED_1_SHIFT 2 - -/* PCIE_CFG :: SPARE :: BAR2_TARGET_WORD_SWAP [01:01] */ -#define PCIE_CFG_SPARE_BAR2_TARGET_WORD_SWAP_MASK 0x00000002 -#define PCIE_CFG_SPARE_BAR2_TARGET_WORD_SWAP_ALIGN 0 -#define PCIE_CFG_SPARE_BAR2_TARGET_WORD_SWAP_BITS 1 -#define PCIE_CFG_SPARE_BAR2_TARGET_WORD_SWAP_SHIFT 1 - -/* PCIE_CFG :: SPARE :: BAR2_TARGET_BYTE_SWAP [00:00] */ -#define PCIE_CFG_SPARE_BAR2_TARGET_BYTE_SWAP_MASK 0x00000001 -#define PCIE_CFG_SPARE_BAR2_TARGET_BYTE_SWAP_ALIGN 0 -#define PCIE_CFG_SPARE_BAR2_TARGET_BYTE_SWAP_BITS 1 -#define PCIE_CFG_SPARE_BAR2_TARGET_BYTE_SWAP_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: PCI_STATE - ***************************************************************************/ -/* PCIE_CFG :: PCI_STATE :: RESERVED_0 [31:16] */ -#define PCIE_CFG_PCI_STATE_RESERVED_0_MASK 0xffff0000 -#define PCIE_CFG_PCI_STATE_RESERVED_0_ALIGN 0 -#define PCIE_CFG_PCI_STATE_RESERVED_0_BITS 16 -#define PCIE_CFG_PCI_STATE_RESERVED_0_SHIFT 16 - -/* PCIE_CFG :: PCI_STATE :: CONFIG_RETRY [15:15] */ -#define PCIE_CFG_PCI_STATE_CONFIG_RETRY_MASK 0x00008000 -#define PCIE_CFG_PCI_STATE_CONFIG_RETRY_ALIGN 0 -#define PCIE_CFG_PCI_STATE_CONFIG_RETRY_BITS 1 -#define PCIE_CFG_PCI_STATE_CONFIG_RETRY_SHIFT 15 - -/* PCIE_CFG :: PCI_STATE :: RESERVED_1 [14:12] */ -#define PCIE_CFG_PCI_STATE_RESERVED_1_MASK 0x00007000 -#define PCIE_CFG_PCI_STATE_RESERVED_1_ALIGN 0 -#define PCIE_CFG_PCI_STATE_RESERVED_1_BITS 3 -#define PCIE_CFG_PCI_STATE_RESERVED_1_SHIFT 12 - -/* PCIE_CFG :: PCI_STATE :: MAX_PCI_TARGET_RETRY [11:09] */ -#define PCIE_CFG_PCI_STATE_MAX_PCI_TARGET_RETRY_MASK 0x00000e00 -#define PCIE_CFG_PCI_STATE_MAX_PCI_TARGET_RETRY_ALIGN 0 -#define PCIE_CFG_PCI_STATE_MAX_PCI_TARGET_RETRY_BITS 3 -#define PCIE_CFG_PCI_STATE_MAX_PCI_TARGET_RETRY_SHIFT 9 - -/* PCIE_CFG :: PCI_STATE :: FLAT_VIEW [08:08] */ -#define PCIE_CFG_PCI_STATE_FLAT_VIEW_MASK 0x00000100 -#define PCIE_CFG_PCI_STATE_FLAT_VIEW_ALIGN 0 -#define PCIE_CFG_PCI_STATE_FLAT_VIEW_BITS 1 -#define PCIE_CFG_PCI_STATE_FLAT_VIEW_SHIFT 8 - -/* PCIE_CFG :: PCI_STATE :: VPD_AVAILABLE [07:07] */ -#define PCIE_CFG_PCI_STATE_VPD_AVAILABLE_MASK 0x00000080 -#define PCIE_CFG_PCI_STATE_VPD_AVAILABLE_ALIGN 0 -#define PCIE_CFG_PCI_STATE_VPD_AVAILABLE_BITS 1 -#define PCIE_CFG_PCI_STATE_VPD_AVAILABLE_SHIFT 7 - -/* PCIE_CFG :: PCI_STATE :: PCI_EXPANSION_ROM_RETRY [06:06] */ -#define PCIE_CFG_PCI_STATE_PCI_EXPANSION_ROM_RETRY_MASK 0x00000040 -#define PCIE_CFG_PCI_STATE_PCI_EXPANSION_ROM_RETRY_ALIGN 0 -#define PCIE_CFG_PCI_STATE_PCI_EXPANSION_ROM_RETRY_BITS 1 -#define PCIE_CFG_PCI_STATE_PCI_EXPANSION_ROM_RETRY_SHIFT 6 - -/* PCIE_CFG :: PCI_STATE :: PCI_EXPANSION_ROM_DESIRED [05:05] */ -#define PCIE_CFG_PCI_STATE_PCI_EXPANSION_ROM_DESIRED_MASK 0x00000020 -#define PCIE_CFG_PCI_STATE_PCI_EXPANSION_ROM_DESIRED_ALIGN 0 -#define PCIE_CFG_PCI_STATE_PCI_EXPANSION_ROM_DESIRED_BITS 1 -#define PCIE_CFG_PCI_STATE_PCI_EXPANSION_ROM_DESIRED_SHIFT 5 - -/* PCIE_CFG :: PCI_STATE :: RESERVED_2 [04:00] */ -#define PCIE_CFG_PCI_STATE_RESERVED_2_MASK 0x0000001f -#define PCIE_CFG_PCI_STATE_RESERVED_2_ALIGN 0 -#define PCIE_CFG_PCI_STATE_RESERVED_2_BITS 5 -#define PCIE_CFG_PCI_STATE_RESERVED_2_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: CLOCK_CONTROL - ***************************************************************************/ -/* PCIE_CFG :: CLOCK_CONTROL :: PL_CLOCK_DISABLE [31:31] */ -#define PCIE_CFG_CLOCK_CONTROL_PL_CLOCK_DISABLE_MASK 0x80000000 -#define PCIE_CFG_CLOCK_CONTROL_PL_CLOCK_DISABLE_ALIGN 0 -#define PCIE_CFG_CLOCK_CONTROL_PL_CLOCK_DISABLE_BITS 1 -#define PCIE_CFG_CLOCK_CONTROL_PL_CLOCK_DISABLE_SHIFT 31 - -/* PCIE_CFG :: CLOCK_CONTROL :: DLL_CLOCK_DISABLE [30:30] */ -#define PCIE_CFG_CLOCK_CONTROL_DLL_CLOCK_DISABLE_MASK 0x40000000 -#define PCIE_CFG_CLOCK_CONTROL_DLL_CLOCK_DISABLE_ALIGN 0 -#define PCIE_CFG_CLOCK_CONTROL_DLL_CLOCK_DISABLE_BITS 1 -#define PCIE_CFG_CLOCK_CONTROL_DLL_CLOCK_DISABLE_SHIFT 30 - -/* PCIE_CFG :: CLOCK_CONTROL :: TL_CLOCK_DISABLE [29:29] */ -#define PCIE_CFG_CLOCK_CONTROL_TL_CLOCK_DISABLE_MASK 0x20000000 -#define PCIE_CFG_CLOCK_CONTROL_TL_CLOCK_DISABLE_ALIGN 0 -#define PCIE_CFG_CLOCK_CONTROL_TL_CLOCK_DISABLE_BITS 1 -#define PCIE_CFG_CLOCK_CONTROL_TL_CLOCK_DISABLE_SHIFT 29 - -/* PCIE_CFG :: CLOCK_CONTROL :: PCI_EXPRESS_CLOCK_TO_CORE_CLOCK [28:28] */ -#define PCIE_CFG_CLOCK_CONTROL_PCI_EXPRESS_CLOCK_TO_CORE_CLOCK_MASK 0x10000000 -#define PCIE_CFG_CLOCK_CONTROL_PCI_EXPRESS_CLOCK_TO_CORE_CLOCK_ALIGN 0 -#define PCIE_CFG_CLOCK_CONTROL_PCI_EXPRESS_CLOCK_TO_CORE_CLOCK_BITS 1 -#define PCIE_CFG_CLOCK_CONTROL_PCI_EXPRESS_CLOCK_TO_CORE_CLOCK_SHIFT 28 - -/* PCIE_CFG :: CLOCK_CONTROL :: UNUSED_0 [27:21] */ -#define PCIE_CFG_CLOCK_CONTROL_UNUSED_0_MASK 0x0fe00000 -#define PCIE_CFG_CLOCK_CONTROL_UNUSED_0_ALIGN 0 -#define PCIE_CFG_CLOCK_CONTROL_UNUSED_0_BITS 7 -#define PCIE_CFG_CLOCK_CONTROL_UNUSED_0_SHIFT 21 - -/* PCIE_CFG :: CLOCK_CONTROL :: SELECT_FINAL_ALT_CLOCK_SOURCE [20:20] */ -#define PCIE_CFG_CLOCK_CONTROL_SELECT_FINAL_ALT_CLOCK_SOURCE_MASK 0x00100000 -#define PCIE_CFG_CLOCK_CONTROL_SELECT_FINAL_ALT_CLOCK_SOURCE_ALIGN 0 -#define PCIE_CFG_CLOCK_CONTROL_SELECT_FINAL_ALT_CLOCK_SOURCE_BITS 1 -#define PCIE_CFG_CLOCK_CONTROL_SELECT_FINAL_ALT_CLOCK_SOURCE_SHIFT 20 - -/* PCIE_CFG :: CLOCK_CONTROL :: UNUSED_1 [19:13] */ -#define PCIE_CFG_CLOCK_CONTROL_UNUSED_1_MASK 0x000fe000 -#define PCIE_CFG_CLOCK_CONTROL_UNUSED_1_ALIGN 0 -#define PCIE_CFG_CLOCK_CONTROL_UNUSED_1_BITS 7 -#define PCIE_CFG_CLOCK_CONTROL_UNUSED_1_SHIFT 13 - -/* PCIE_CFG :: CLOCK_CONTROL :: SELECT_ALT_CLOCK [12:12] */ -#define PCIE_CFG_CLOCK_CONTROL_SELECT_ALT_CLOCK_MASK 0x00001000 -#define PCIE_CFG_CLOCK_CONTROL_SELECT_ALT_CLOCK_ALIGN 0 -#define PCIE_CFG_CLOCK_CONTROL_SELECT_ALT_CLOCK_BITS 1 -#define PCIE_CFG_CLOCK_CONTROL_SELECT_ALT_CLOCK_SHIFT 12 - -/* PCIE_CFG :: CLOCK_CONTROL :: UNUSED_2 [11:08] */ -#define PCIE_CFG_CLOCK_CONTROL_UNUSED_2_MASK 0x00000f00 -#define PCIE_CFG_CLOCK_CONTROL_UNUSED_2_ALIGN 0 -#define PCIE_CFG_CLOCK_CONTROL_UNUSED_2_BITS 4 -#define PCIE_CFG_CLOCK_CONTROL_UNUSED_2_SHIFT 8 - -/* PCIE_CFG :: CLOCK_CONTROL :: UNUSED_3 [07:00] */ -#define PCIE_CFG_CLOCK_CONTROL_UNUSED_3_MASK 0x000000ff -#define PCIE_CFG_CLOCK_CONTROL_UNUSED_3_ALIGN 0 -#define PCIE_CFG_CLOCK_CONTROL_UNUSED_3_BITS 8 -#define PCIE_CFG_CLOCK_CONTROL_UNUSED_3_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: REGISTER_BASE - ***************************************************************************/ -/* PCIE_CFG :: REGISTER_BASE :: RESERVED_0 [31:18] */ -#define PCIE_CFG_REGISTER_BASE_RESERVED_0_MASK 0xfffc0000 -#define PCIE_CFG_REGISTER_BASE_RESERVED_0_ALIGN 0 -#define PCIE_CFG_REGISTER_BASE_RESERVED_0_BITS 14 -#define PCIE_CFG_REGISTER_BASE_RESERVED_0_SHIFT 18 - -/* PCIE_CFG :: REGISTER_BASE :: REGISTER_BASE_REGISTER [17:02] */ -#define PCIE_CFG_REGISTER_BASE_REGISTER_BASE_REGISTER_MASK 0x0003fffc -#define PCIE_CFG_REGISTER_BASE_REGISTER_BASE_REGISTER_ALIGN 0 -#define PCIE_CFG_REGISTER_BASE_REGISTER_BASE_REGISTER_BITS 16 -#define PCIE_CFG_REGISTER_BASE_REGISTER_BASE_REGISTER_SHIFT 2 - -/* PCIE_CFG :: REGISTER_BASE :: RESERVED_1 [01:00] */ -#define PCIE_CFG_REGISTER_BASE_RESERVED_1_MASK 0x00000003 -#define PCIE_CFG_REGISTER_BASE_RESERVED_1_ALIGN 0 -#define PCIE_CFG_REGISTER_BASE_RESERVED_1_BITS 2 -#define PCIE_CFG_REGISTER_BASE_RESERVED_1_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: MEMORY_BASE - ***************************************************************************/ -/* PCIE_CFG :: MEMORY_BASE :: RESERVED_0 [31:24] */ -#define PCIE_CFG_MEMORY_BASE_RESERVED_0_MASK 0xff000000 -#define PCIE_CFG_MEMORY_BASE_RESERVED_0_ALIGN 0 -#define PCIE_CFG_MEMORY_BASE_RESERVED_0_BITS 8 -#define PCIE_CFG_MEMORY_BASE_RESERVED_0_SHIFT 24 - -/* PCIE_CFG :: MEMORY_BASE :: MEMORY_BASE_REGISTER [23:02] */ -#define PCIE_CFG_MEMORY_BASE_MEMORY_BASE_REGISTER_MASK 0x00fffffc -#define PCIE_CFG_MEMORY_BASE_MEMORY_BASE_REGISTER_ALIGN 0 -#define PCIE_CFG_MEMORY_BASE_MEMORY_BASE_REGISTER_BITS 22 -#define PCIE_CFG_MEMORY_BASE_MEMORY_BASE_REGISTER_SHIFT 2 - -/* PCIE_CFG :: MEMORY_BASE :: RESERVED_1 [01:00] */ -#define PCIE_CFG_MEMORY_BASE_RESERVED_1_MASK 0x00000003 -#define PCIE_CFG_MEMORY_BASE_RESERVED_1_ALIGN 0 -#define PCIE_CFG_MEMORY_BASE_RESERVED_1_BITS 2 -#define PCIE_CFG_MEMORY_BASE_RESERVED_1_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: REGISTER_DATA - ***************************************************************************/ -/* PCIE_CFG :: REGISTER_DATA :: REGISTER_DATA_REGISTER [31:00] */ -#define PCIE_CFG_REGISTER_DATA_REGISTER_DATA_REGISTER_MASK 0xffffffff -#define PCIE_CFG_REGISTER_DATA_REGISTER_DATA_REGISTER_ALIGN 0 -#define PCIE_CFG_REGISTER_DATA_REGISTER_DATA_REGISTER_BITS 32 -#define PCIE_CFG_REGISTER_DATA_REGISTER_DATA_REGISTER_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: MEMORY_DATA - ***************************************************************************/ -/* PCIE_CFG :: MEMORY_DATA :: MEMORY_DATA_REGISTER [31:00] */ -#define PCIE_CFG_MEMORY_DATA_MEMORY_DATA_REGISTER_MASK 0xffffffff -#define PCIE_CFG_MEMORY_DATA_MEMORY_DATA_REGISTER_ALIGN 0 -#define PCIE_CFG_MEMORY_DATA_MEMORY_DATA_REGISTER_BITS 32 -#define PCIE_CFG_MEMORY_DATA_MEMORY_DATA_REGISTER_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: EXPANSION_ROM_BAR_SIZE - ***************************************************************************/ -/* PCIE_CFG :: EXPANSION_ROM_BAR_SIZE :: RESERVED_0 [31:04] */ -#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE_RESERVED_0_MASK 0xfffffff0 -#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE_RESERVED_0_ALIGN 0 -#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE_RESERVED_0_BITS 28 -#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE_RESERVED_0_SHIFT 4 - -/* PCIE_CFG :: EXPANSION_ROM_BAR_SIZE :: BAR_SIZE [03:00] */ -#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE_BAR_SIZE_MASK 0x0000000f -#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE_BAR_SIZE_ALIGN 0 -#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE_BAR_SIZE_BITS 4 -#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE_BAR_SIZE_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: EXPANSION_ROM_ADDRESS - ***************************************************************************/ -/* PCIE_CFG :: EXPANSION_ROM_ADDRESS :: ROM_CTL_ADDR [31:00] */ -#define PCIE_CFG_EXPANSION_ROM_ADDRESS_ROM_CTL_ADDR_MASK 0xffffffff -#define PCIE_CFG_EXPANSION_ROM_ADDRESS_ROM_CTL_ADDR_ALIGN 0 -#define PCIE_CFG_EXPANSION_ROM_ADDRESS_ROM_CTL_ADDR_BITS 32 -#define PCIE_CFG_EXPANSION_ROM_ADDRESS_ROM_CTL_ADDR_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: EXPANSION_ROM_DATA - ***************************************************************************/ -/* PCIE_CFG :: EXPANSION_ROM_DATA :: ROM_DATA [31:00] */ -#define PCIE_CFG_EXPANSION_ROM_DATA_ROM_DATA_MASK 0xffffffff -#define PCIE_CFG_EXPANSION_ROM_DATA_ROM_DATA_ALIGN 0 -#define PCIE_CFG_EXPANSION_ROM_DATA_ROM_DATA_BITS 32 -#define PCIE_CFG_EXPANSION_ROM_DATA_ROM_DATA_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: VPD_INTERFACE - ***************************************************************************/ -/* PCIE_CFG :: VPD_INTERFACE :: RESERVED_0 [31:01] */ -#define PCIE_CFG_VPD_INTERFACE_RESERVED_0_MASK 0xfffffffe -#define PCIE_CFG_VPD_INTERFACE_RESERVED_0_ALIGN 0 -#define PCIE_CFG_VPD_INTERFACE_RESERVED_0_BITS 31 -#define PCIE_CFG_VPD_INTERFACE_RESERVED_0_SHIFT 1 - -/* PCIE_CFG :: VPD_INTERFACE :: VPD_REQUEST [00:00] */ -#define PCIE_CFG_VPD_INTERFACE_VPD_REQUEST_MASK 0x00000001 -#define PCIE_CFG_VPD_INTERFACE_VPD_REQUEST_ALIGN 0 -#define PCIE_CFG_VPD_INTERFACE_VPD_REQUEST_BITS 1 -#define PCIE_CFG_VPD_INTERFACE_VPD_REQUEST_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_UPPER - ***************************************************************************/ -/* PCIE_CFG :: UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_UPPER :: UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX [31:00] */ -#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_UPPER_UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX_MASK 0xffffffff -#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_UPPER_UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX_ALIGN 0 -#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_UPPER_UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX_BITS 32 -#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_UPPER_UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_LOWER - ***************************************************************************/ -/* PCIE_CFG :: UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_LOWER :: UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX [31:00] */ -#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_LOWER_UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX_MASK 0xffffffff -#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_LOWER_UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX_ALIGN 0 -#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_LOWER_UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX_BITS 32 -#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_LOWER_UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_UPPER - ***************************************************************************/ -/* PCIE_CFG :: UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_UPPER :: UNDI_RECEIVE_RETURN_C_IDX [31:00] */ -#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_UPPER_UNDI_RECEIVE_RETURN_C_IDX_MASK 0xffffffff -#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_UPPER_UNDI_RECEIVE_RETURN_C_IDX_ALIGN 0 -#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_UPPER_UNDI_RECEIVE_RETURN_C_IDX_BITS 32 -#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_UPPER_UNDI_RECEIVE_RETURN_C_IDX_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_LOWER - ***************************************************************************/ -/* PCIE_CFG :: UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_LOWER :: UNDI_RECEIVE_RETURN_C_IDX [31:00] */ -#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_LOWER_UNDI_RECEIVE_RETURN_C_IDX_MASK 0xffffffff -#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_LOWER_UNDI_RECEIVE_RETURN_C_IDX_ALIGN 0 -#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_LOWER_UNDI_RECEIVE_RETURN_C_IDX_BITS 32 -#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_LOWER_UNDI_RECEIVE_RETURN_C_IDX_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_UPPER - ***************************************************************************/ -/* PCIE_CFG :: UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_UPPER :: UNDI_SEND_BD_NIC_P_IDX [31:00] */ -#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_UPPER_UNDI_SEND_BD_NIC_P_IDX_MASK 0xffffffff -#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_UPPER_UNDI_SEND_BD_NIC_P_IDX_ALIGN 0 -#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_UPPER_UNDI_SEND_BD_NIC_P_IDX_BITS 32 -#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_UPPER_UNDI_SEND_BD_NIC_P_IDX_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_LOWER - ***************************************************************************/ -/* PCIE_CFG :: UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_LOWER :: UNDI_SEND_BD_NIC_P_IDX [31:00] */ -#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_LOWER_UNDI_SEND_BD_NIC_P_IDX_MASK 0xffffffff -#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_LOWER_UNDI_SEND_BD_NIC_P_IDX_ALIGN 0 -#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_LOWER_UNDI_SEND_BD_NIC_P_IDX_BITS 32 -#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_LOWER_UNDI_SEND_BD_NIC_P_IDX_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: INT_MAILBOX_UPPER - ***************************************************************************/ -/* PCIE_CFG :: INT_MAILBOX_UPPER :: INDIRECT_INTERRUPT_MAIL_BOX [31:00] */ -#define PCIE_CFG_INT_MAILBOX_UPPER_INDIRECT_INTERRUPT_MAIL_BOX_MASK 0xffffffff -#define PCIE_CFG_INT_MAILBOX_UPPER_INDIRECT_INTERRUPT_MAIL_BOX_ALIGN 0 -#define PCIE_CFG_INT_MAILBOX_UPPER_INDIRECT_INTERRUPT_MAIL_BOX_BITS 32 -#define PCIE_CFG_INT_MAILBOX_UPPER_INDIRECT_INTERRUPT_MAIL_BOX_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: INT_MAILBOX_LOWER - ***************************************************************************/ -/* PCIE_CFG :: INT_MAILBOX_LOWER :: INDIRECT_INTERRUPT_MAIL_BOX [31:00] */ -#define PCIE_CFG_INT_MAILBOX_LOWER_INDIRECT_INTERRUPT_MAIL_BOX_MASK 0xffffffff -#define PCIE_CFG_INT_MAILBOX_LOWER_INDIRECT_INTERRUPT_MAIL_BOX_ALIGN 0 -#define PCIE_CFG_INT_MAILBOX_LOWER_INDIRECT_INTERRUPT_MAIL_BOX_BITS 32 -#define PCIE_CFG_INT_MAILBOX_LOWER_INDIRECT_INTERRUPT_MAIL_BOX_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: PRODUCT_ID_AND_ASIC_REVISION - ***************************************************************************/ -/* PCIE_CFG :: PRODUCT_ID_AND_ASIC_REVISION :: RESERVED_0 [31:28] */ -#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_RESERVED_0_MASK 0xf0000000 -#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_RESERVED_0_ALIGN 0 -#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_RESERVED_0_BITS 4 -#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_RESERVED_0_SHIFT 28 - -/* PCIE_CFG :: PRODUCT_ID_AND_ASIC_REVISION :: PRODUCT_ID [27:08] */ -#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_PRODUCT_ID_MASK 0x0fffff00 -#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_PRODUCT_ID_ALIGN 0 -#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_PRODUCT_ID_BITS 20 -#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_PRODUCT_ID_SHIFT 8 - -/* PCIE_CFG :: PRODUCT_ID_AND_ASIC_REVISION :: ASIC_REVISION_ID [07:00] */ -#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_ASIC_REVISION_ID_MASK 0x000000ff -#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_ASIC_REVISION_ID_ALIGN 0 -#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_ASIC_REVISION_ID_BITS 8 -#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_ASIC_REVISION_ID_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: FUNCTION_EVENT - ***************************************************************************/ -/* PCIE_CFG :: FUNCTION_EVENT :: RESERVED_0 [31:16] */ -#define PCIE_CFG_FUNCTION_EVENT_RESERVED_0_MASK 0xffff0000 -#define PCIE_CFG_FUNCTION_EVENT_RESERVED_0_ALIGN 0 -#define PCIE_CFG_FUNCTION_EVENT_RESERVED_0_BITS 16 -#define PCIE_CFG_FUNCTION_EVENT_RESERVED_0_SHIFT 16 - -/* PCIE_CFG :: FUNCTION_EVENT :: INTA_EVENT [15:15] */ -#define PCIE_CFG_FUNCTION_EVENT_INTA_EVENT_MASK 0x00008000 -#define PCIE_CFG_FUNCTION_EVENT_INTA_EVENT_ALIGN 0 -#define PCIE_CFG_FUNCTION_EVENT_INTA_EVENT_BITS 1 -#define PCIE_CFG_FUNCTION_EVENT_INTA_EVENT_SHIFT 15 - -/* PCIE_CFG :: FUNCTION_EVENT :: RESERVED_1 [14:05] */ -#define PCIE_CFG_FUNCTION_EVENT_RESERVED_1_MASK 0x00007fe0 -#define PCIE_CFG_FUNCTION_EVENT_RESERVED_1_ALIGN 0 -#define PCIE_CFG_FUNCTION_EVENT_RESERVED_1_BITS 10 -#define PCIE_CFG_FUNCTION_EVENT_RESERVED_1_SHIFT 5 - -/* PCIE_CFG :: FUNCTION_EVENT :: GWAKE_EVENT [04:04] */ -#define PCIE_CFG_FUNCTION_EVENT_GWAKE_EVENT_MASK 0x00000010 -#define PCIE_CFG_FUNCTION_EVENT_GWAKE_EVENT_ALIGN 0 -#define PCIE_CFG_FUNCTION_EVENT_GWAKE_EVENT_BITS 1 -#define PCIE_CFG_FUNCTION_EVENT_GWAKE_EVENT_SHIFT 4 - -/* PCIE_CFG :: FUNCTION_EVENT :: RESERVED_2 [03:00] */ -#define PCIE_CFG_FUNCTION_EVENT_RESERVED_2_MASK 0x0000000f -#define PCIE_CFG_FUNCTION_EVENT_RESERVED_2_ALIGN 0 -#define PCIE_CFG_FUNCTION_EVENT_RESERVED_2_BITS 4 -#define PCIE_CFG_FUNCTION_EVENT_RESERVED_2_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: FUNCTION_EVENT_MASK - ***************************************************************************/ -/* PCIE_CFG :: FUNCTION_EVENT_MASK :: RESERVED_0 [31:16] */ -#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_0_MASK 0xffff0000 -#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_0_ALIGN 0 -#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_0_BITS 16 -#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_0_SHIFT 16 - -/* PCIE_CFG :: FUNCTION_EVENT_MASK :: INTA_MASK [15:15] */ -#define PCIE_CFG_FUNCTION_EVENT_MASK_INTA_MASK_MASK 0x00008000 -#define PCIE_CFG_FUNCTION_EVENT_MASK_INTA_MASK_ALIGN 0 -#define PCIE_CFG_FUNCTION_EVENT_MASK_INTA_MASK_BITS 1 -#define PCIE_CFG_FUNCTION_EVENT_MASK_INTA_MASK_SHIFT 15 - -/* PCIE_CFG :: FUNCTION_EVENT_MASK :: WAKE_UP_MASK [14:14] */ -#define PCIE_CFG_FUNCTION_EVENT_MASK_WAKE_UP_MASK_MASK 0x00004000 -#define PCIE_CFG_FUNCTION_EVENT_MASK_WAKE_UP_MASK_ALIGN 0 -#define PCIE_CFG_FUNCTION_EVENT_MASK_WAKE_UP_MASK_BITS 1 -#define PCIE_CFG_FUNCTION_EVENT_MASK_WAKE_UP_MASK_SHIFT 14 - -/* PCIE_CFG :: FUNCTION_EVENT_MASK :: RESERVED_1 [13:05] */ -#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_1_MASK 0x00003fe0 -#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_1_ALIGN 0 -#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_1_BITS 9 -#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_1_SHIFT 5 - -/* PCIE_CFG :: FUNCTION_EVENT_MASK :: GWAKE_MASK [04:04] */ -#define PCIE_CFG_FUNCTION_EVENT_MASK_GWAKE_MASK_MASK 0x00000010 -#define PCIE_CFG_FUNCTION_EVENT_MASK_GWAKE_MASK_ALIGN 0 -#define PCIE_CFG_FUNCTION_EVENT_MASK_GWAKE_MASK_BITS 1 -#define PCIE_CFG_FUNCTION_EVENT_MASK_GWAKE_MASK_SHIFT 4 - -/* PCIE_CFG :: FUNCTION_EVENT_MASK :: RESERVED_2 [03:00] */ -#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_2_MASK 0x0000000f -#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_2_ALIGN 0 -#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_2_BITS 4 -#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_2_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: FUNCTION_PRESENT - ***************************************************************************/ -/* PCIE_CFG :: FUNCTION_PRESENT :: RESERVED_0 [31:16] */ -#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_0_MASK 0xffff0000 -#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_0_ALIGN 0 -#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_0_BITS 16 -#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_0_SHIFT 16 - -/* PCIE_CFG :: FUNCTION_PRESENT :: INTA_STATUS [15:15] */ -#define PCIE_CFG_FUNCTION_PRESENT_INTA_STATUS_MASK 0x00008000 -#define PCIE_CFG_FUNCTION_PRESENT_INTA_STATUS_ALIGN 0 -#define PCIE_CFG_FUNCTION_PRESENT_INTA_STATUS_BITS 1 -#define PCIE_CFG_FUNCTION_PRESENT_INTA_STATUS_SHIFT 15 - -/* PCIE_CFG :: FUNCTION_PRESENT :: RESERVED_1 [14:05] */ -#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_1_MASK 0x00007fe0 -#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_1_ALIGN 0 -#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_1_BITS 10 -#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_1_SHIFT 5 - -/* PCIE_CFG :: FUNCTION_PRESENT :: PME_STATUS [04:04] */ -#define PCIE_CFG_FUNCTION_PRESENT_PME_STATUS_MASK 0x00000010 -#define PCIE_CFG_FUNCTION_PRESENT_PME_STATUS_ALIGN 0 -#define PCIE_CFG_FUNCTION_PRESENT_PME_STATUS_BITS 1 -#define PCIE_CFG_FUNCTION_PRESENT_PME_STATUS_SHIFT 4 - -/* PCIE_CFG :: FUNCTION_PRESENT :: RESERVED_2 [03:00] */ -#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_2_MASK 0x0000000f -#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_2_ALIGN 0 -#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_2_BITS 4 -#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_2_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: PCIE_CAPABILITIES - ***************************************************************************/ -/* PCIE_CFG :: PCIE_CAPABILITIES :: RESERVED_0 [31:30] */ -#define PCIE_CFG_PCIE_CAPABILITIES_RESERVED_0_MASK 0xc0000000 -#define PCIE_CFG_PCIE_CAPABILITIES_RESERVED_0_ALIGN 0 -#define PCIE_CFG_PCIE_CAPABILITIES_RESERVED_0_BITS 2 -#define PCIE_CFG_PCIE_CAPABILITIES_RESERVED_0_SHIFT 30 - -/* PCIE_CFG :: PCIE_CAPABILITIES :: INTERRUPT_MESSAGE_NUMBER [29:25] */ -#define PCIE_CFG_PCIE_CAPABILITIES_INTERRUPT_MESSAGE_NUMBER_MASK 0x3e000000 -#define PCIE_CFG_PCIE_CAPABILITIES_INTERRUPT_MESSAGE_NUMBER_ALIGN 0 -#define PCIE_CFG_PCIE_CAPABILITIES_INTERRUPT_MESSAGE_NUMBER_BITS 5 -#define PCIE_CFG_PCIE_CAPABILITIES_INTERRUPT_MESSAGE_NUMBER_SHIFT 25 - -/* PCIE_CFG :: PCIE_CAPABILITIES :: SLOT_IMPLEMENTED [24:24] */ -#define PCIE_CFG_PCIE_CAPABILITIES_SLOT_IMPLEMENTED_MASK 0x01000000 -#define PCIE_CFG_PCIE_CAPABILITIES_SLOT_IMPLEMENTED_ALIGN 0 -#define PCIE_CFG_PCIE_CAPABILITIES_SLOT_IMPLEMENTED_BITS 1 -#define PCIE_CFG_PCIE_CAPABILITIES_SLOT_IMPLEMENTED_SHIFT 24 - -/* PCIE_CFG :: PCIE_CAPABILITIES :: DEVICE_PORT_TYPE [23:20] */ -#define PCIE_CFG_PCIE_CAPABILITIES_DEVICE_PORT_TYPE_MASK 0x00f00000 -#define PCIE_CFG_PCIE_CAPABILITIES_DEVICE_PORT_TYPE_ALIGN 0 -#define PCIE_CFG_PCIE_CAPABILITIES_DEVICE_PORT_TYPE_BITS 4 -#define PCIE_CFG_PCIE_CAPABILITIES_DEVICE_PORT_TYPE_SHIFT 20 - -/* PCIE_CFG :: PCIE_CAPABILITIES :: CAPABILITY_VERSION [19:16] */ -#define PCIE_CFG_PCIE_CAPABILITIES_CAPABILITY_VERSION_MASK 0x000f0000 -#define PCIE_CFG_PCIE_CAPABILITIES_CAPABILITY_VERSION_ALIGN 0 -#define PCIE_CFG_PCIE_CAPABILITIES_CAPABILITY_VERSION_BITS 4 -#define PCIE_CFG_PCIE_CAPABILITIES_CAPABILITY_VERSION_SHIFT 16 - -/* PCIE_CFG :: PCIE_CAPABILITIES :: NEXT_POINTER [15:08] */ -#define PCIE_CFG_PCIE_CAPABILITIES_NEXT_POINTER_MASK 0x0000ff00 -#define PCIE_CFG_PCIE_CAPABILITIES_NEXT_POINTER_ALIGN 0 -#define PCIE_CFG_PCIE_CAPABILITIES_NEXT_POINTER_BITS 8 -#define PCIE_CFG_PCIE_CAPABILITIES_NEXT_POINTER_SHIFT 8 - -/* PCIE_CFG :: PCIE_CAPABILITIES :: CAPABILITY_ID [07:00] */ -#define PCIE_CFG_PCIE_CAPABILITIES_CAPABILITY_ID_MASK 0x000000ff -#define PCIE_CFG_PCIE_CAPABILITIES_CAPABILITY_ID_ALIGN 0 -#define PCIE_CFG_PCIE_CAPABILITIES_CAPABILITY_ID_BITS 8 -#define PCIE_CFG_PCIE_CAPABILITIES_CAPABILITY_ID_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: DEVICE_CAPABILITIES - ***************************************************************************/ -/* PCIE_CFG :: DEVICE_CAPABILITIES :: RESERVED_0 [31:28] */ -#define PCIE_CFG_DEVICE_CAPABILITIES_RESERVED_0_MASK 0xf0000000 -#define PCIE_CFG_DEVICE_CAPABILITIES_RESERVED_0_ALIGN 0 -#define PCIE_CFG_DEVICE_CAPABILITIES_RESERVED_0_BITS 4 -#define PCIE_CFG_DEVICE_CAPABILITIES_RESERVED_0_SHIFT 28 - -/* PCIE_CFG :: DEVICE_CAPABILITIES :: CAPTURED_SLOT_POWER_LIMIT_SCALE [27:26] */ -#define PCIE_CFG_DEVICE_CAPABILITIES_CAPTURED_SLOT_POWER_LIMIT_SCALE_MASK 0x0c000000 -#define PCIE_CFG_DEVICE_CAPABILITIES_CAPTURED_SLOT_POWER_LIMIT_SCALE_ALIGN 0 -#define PCIE_CFG_DEVICE_CAPABILITIES_CAPTURED_SLOT_POWER_LIMIT_SCALE_BITS 2 -#define PCIE_CFG_DEVICE_CAPABILITIES_CAPTURED_SLOT_POWER_LIMIT_SCALE_SHIFT 26 - -/* PCIE_CFG :: DEVICE_CAPABILITIES :: CAPTURED_SLOT_POWER_LIMIT_VALUE [25:18] */ -#define PCIE_CFG_DEVICE_CAPABILITIES_CAPTURED_SLOT_POWER_LIMIT_VALUE_MASK 0x03fc0000 -#define PCIE_CFG_DEVICE_CAPABILITIES_CAPTURED_SLOT_POWER_LIMIT_VALUE_ALIGN 0 -#define PCIE_CFG_DEVICE_CAPABILITIES_CAPTURED_SLOT_POWER_LIMIT_VALUE_BITS 8 -#define PCIE_CFG_DEVICE_CAPABILITIES_CAPTURED_SLOT_POWER_LIMIT_VALUE_SHIFT 18 - -/* PCIE_CFG :: DEVICE_CAPABILITIES :: RESERVED_1 [17:16] */ -#define PCIE_CFG_DEVICE_CAPABILITIES_RESERVED_1_MASK 0x00030000 -#define PCIE_CFG_DEVICE_CAPABILITIES_RESERVED_1_ALIGN 0 -#define PCIE_CFG_DEVICE_CAPABILITIES_RESERVED_1_BITS 2 -#define PCIE_CFG_DEVICE_CAPABILITIES_RESERVED_1_SHIFT 16 - -/* PCIE_CFG :: DEVICE_CAPABILITIES :: ROLE_BASED_ERROR_SUPPORT [15:15] */ -#define PCIE_CFG_DEVICE_CAPABILITIES_ROLE_BASED_ERROR_SUPPORT_MASK 0x00008000 -#define PCIE_CFG_DEVICE_CAPABILITIES_ROLE_BASED_ERROR_SUPPORT_ALIGN 0 -#define PCIE_CFG_DEVICE_CAPABILITIES_ROLE_BASED_ERROR_SUPPORT_BITS 1 -#define PCIE_CFG_DEVICE_CAPABILITIES_ROLE_BASED_ERROR_SUPPORT_SHIFT 15 - -/* PCIE_CFG :: DEVICE_CAPABILITIES :: POWER_INDICATOR_PRESENT [14:14] */ -#define PCIE_CFG_DEVICE_CAPABILITIES_POWER_INDICATOR_PRESENT_MASK 0x00004000 -#define PCIE_CFG_DEVICE_CAPABILITIES_POWER_INDICATOR_PRESENT_ALIGN 0 -#define PCIE_CFG_DEVICE_CAPABILITIES_POWER_INDICATOR_PRESENT_BITS 1 -#define PCIE_CFG_DEVICE_CAPABILITIES_POWER_INDICATOR_PRESENT_SHIFT 14 - -/* PCIE_CFG :: DEVICE_CAPABILITIES :: ATTENTION_INDICATOR_PRESENT [13:13] */ -#define PCIE_CFG_DEVICE_CAPABILITIES_ATTENTION_INDICATOR_PRESENT_MASK 0x00002000 -#define PCIE_CFG_DEVICE_CAPABILITIES_ATTENTION_INDICATOR_PRESENT_ALIGN 0 -#define PCIE_CFG_DEVICE_CAPABILITIES_ATTENTION_INDICATOR_PRESENT_BITS 1 -#define PCIE_CFG_DEVICE_CAPABILITIES_ATTENTION_INDICATOR_PRESENT_SHIFT 13 - -/* PCIE_CFG :: DEVICE_CAPABILITIES :: ATTENTION_BUTTON_PRESENT [12:12] */ -#define PCIE_CFG_DEVICE_CAPABILITIES_ATTENTION_BUTTON_PRESENT_MASK 0x00001000 -#define PCIE_CFG_DEVICE_CAPABILITIES_ATTENTION_BUTTON_PRESENT_ALIGN 0 -#define PCIE_CFG_DEVICE_CAPABILITIES_ATTENTION_BUTTON_PRESENT_BITS 1 -#define PCIE_CFG_DEVICE_CAPABILITIES_ATTENTION_BUTTON_PRESENT_SHIFT 12 - -/* PCIE_CFG :: DEVICE_CAPABILITIES :: ENDPOINT_L1_ACCEPTABLE_LATENCY [11:09] */ -#define PCIE_CFG_DEVICE_CAPABILITIES_ENDPOINT_L1_ACCEPTABLE_LATENCY_MASK 0x00000e00 -#define PCIE_CFG_DEVICE_CAPABILITIES_ENDPOINT_L1_ACCEPTABLE_LATENCY_ALIGN 0 -#define PCIE_CFG_DEVICE_CAPABILITIES_ENDPOINT_L1_ACCEPTABLE_LATENCY_BITS 3 -#define PCIE_CFG_DEVICE_CAPABILITIES_ENDPOINT_L1_ACCEPTABLE_LATENCY_SHIFT 9 - -/* PCIE_CFG :: DEVICE_CAPABILITIES :: ENDPOINT_L0S_ACCEPTABLE_LATENCY [08:06] */ -#define PCIE_CFG_DEVICE_CAPABILITIES_ENDPOINT_L0S_ACCEPTABLE_LATENCY_MASK 0x000001c0 -#define PCIE_CFG_DEVICE_CAPABILITIES_ENDPOINT_L0S_ACCEPTABLE_LATENCY_ALIGN 0 -#define PCIE_CFG_DEVICE_CAPABILITIES_ENDPOINT_L0S_ACCEPTABLE_LATENCY_BITS 3 -#define PCIE_CFG_DEVICE_CAPABILITIES_ENDPOINT_L0S_ACCEPTABLE_LATENCY_SHIFT 6 - -/* PCIE_CFG :: DEVICE_CAPABILITIES :: EXTENDED_TAG_FIELD_SUPPORTED [05:05] */ -#define PCIE_CFG_DEVICE_CAPABILITIES_EXTENDED_TAG_FIELD_SUPPORTED_MASK 0x00000020 -#define PCIE_CFG_DEVICE_CAPABILITIES_EXTENDED_TAG_FIELD_SUPPORTED_ALIGN 0 -#define PCIE_CFG_DEVICE_CAPABILITIES_EXTENDED_TAG_FIELD_SUPPORTED_BITS 1 -#define PCIE_CFG_DEVICE_CAPABILITIES_EXTENDED_TAG_FIELD_SUPPORTED_SHIFT 5 - -/* PCIE_CFG :: DEVICE_CAPABILITIES :: PHANTOM_FUNCTIONS_SUPPORTED [04:03] */ -#define PCIE_CFG_DEVICE_CAPABILITIES_PHANTOM_FUNCTIONS_SUPPORTED_MASK 0x00000018 -#define PCIE_CFG_DEVICE_CAPABILITIES_PHANTOM_FUNCTIONS_SUPPORTED_ALIGN 0 -#define PCIE_CFG_DEVICE_CAPABILITIES_PHANTOM_FUNCTIONS_SUPPORTED_BITS 2 -#define PCIE_CFG_DEVICE_CAPABILITIES_PHANTOM_FUNCTIONS_SUPPORTED_SHIFT 3 - -/* PCIE_CFG :: DEVICE_CAPABILITIES :: MAX_PAYLOAD_SIZE_SUPPORTED [02:00] */ -#define PCIE_CFG_DEVICE_CAPABILITIES_MAX_PAYLOAD_SIZE_SUPPORTED_MASK 0x00000007 -#define PCIE_CFG_DEVICE_CAPABILITIES_MAX_PAYLOAD_SIZE_SUPPORTED_ALIGN 0 -#define PCIE_CFG_DEVICE_CAPABILITIES_MAX_PAYLOAD_SIZE_SUPPORTED_BITS 3 -#define PCIE_CFG_DEVICE_CAPABILITIES_MAX_PAYLOAD_SIZE_SUPPORTED_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: DEVICE_STATUS_CONTROL - ***************************************************************************/ -/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: RESERVED_0 [31:22] */ -#define PCIE_CFG_DEVICE_STATUS_CONTROL_RESERVED_0_MASK 0xffc00000 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_RESERVED_0_ALIGN 0 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_RESERVED_0_BITS 10 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_RESERVED_0_SHIFT 22 - -/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: TRANSACTION_PENDING [21:21] */ -#define PCIE_CFG_DEVICE_STATUS_CONTROL_TRANSACTION_PENDING_MASK 0x00200000 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_TRANSACTION_PENDING_ALIGN 0 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_TRANSACTION_PENDING_BITS 1 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_TRANSACTION_PENDING_SHIFT 21 - -/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: AUX_POWER_DETECTED [20:20] */ -#define PCIE_CFG_DEVICE_STATUS_CONTROL_AUX_POWER_DETECTED_MASK 0x00100000 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_AUX_POWER_DETECTED_ALIGN 0 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_AUX_POWER_DETECTED_BITS 1 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_AUX_POWER_DETECTED_SHIFT 20 - -/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: UNSUPPORTED_REQUEST_DETECTED [19:19] */ -#define PCIE_CFG_DEVICE_STATUS_CONTROL_UNSUPPORTED_REQUEST_DETECTED_MASK 0x00080000 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_UNSUPPORTED_REQUEST_DETECTED_ALIGN 0 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_UNSUPPORTED_REQUEST_DETECTED_BITS 1 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_UNSUPPORTED_REQUEST_DETECTED_SHIFT 19 - -/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: FATAL_ERROR_DETECTED [18:18] */ -#define PCIE_CFG_DEVICE_STATUS_CONTROL_FATAL_ERROR_DETECTED_MASK 0x00040000 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_FATAL_ERROR_DETECTED_ALIGN 0 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_FATAL_ERROR_DETECTED_BITS 1 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_FATAL_ERROR_DETECTED_SHIFT 18 - -/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: NON_FATAL_ERROR_DETECTED [17:17] */ -#define PCIE_CFG_DEVICE_STATUS_CONTROL_NON_FATAL_ERROR_DETECTED_MASK 0x00020000 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_NON_FATAL_ERROR_DETECTED_ALIGN 0 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_NON_FATAL_ERROR_DETECTED_BITS 1 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_NON_FATAL_ERROR_DETECTED_SHIFT 17 - -/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: CORRECTABLE_ERROR_DETECTED [16:16] */ -#define PCIE_CFG_DEVICE_STATUS_CONTROL_CORRECTABLE_ERROR_DETECTED_MASK 0x00010000 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_CORRECTABLE_ERROR_DETECTED_ALIGN 0 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_CORRECTABLE_ERROR_DETECTED_BITS 1 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_CORRECTABLE_ERROR_DETECTED_SHIFT 16 - -/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: RESERVED_1 [15:15] */ -#define PCIE_CFG_DEVICE_STATUS_CONTROL_RESERVED_1_MASK 0x00008000 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_RESERVED_1_ALIGN 0 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_RESERVED_1_BITS 1 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_RESERVED_1_SHIFT 15 - -/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: MAX_READ_REQUEST_SIZE [14:12] */ -#define PCIE_CFG_DEVICE_STATUS_CONTROL_MAX_READ_REQUEST_SIZE_MASK 0x00007000 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_MAX_READ_REQUEST_SIZE_ALIGN 0 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_MAX_READ_REQUEST_SIZE_BITS 3 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_MAX_READ_REQUEST_SIZE_SHIFT 12 - -/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: ENABLE_NO_SNOOP [11:11] */ -#define PCIE_CFG_DEVICE_STATUS_CONTROL_ENABLE_NO_SNOOP_MASK 0x00000800 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_ENABLE_NO_SNOOP_ALIGN 0 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_ENABLE_NO_SNOOP_BITS 1 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_ENABLE_NO_SNOOP_SHIFT 11 - -/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: AUX_POWER_PM_ENABLE [10:10] */ -#define PCIE_CFG_DEVICE_STATUS_CONTROL_AUX_POWER_PM_ENABLE_MASK 0x00000400 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_AUX_POWER_PM_ENABLE_ALIGN 0 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_AUX_POWER_PM_ENABLE_BITS 1 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_AUX_POWER_PM_ENABLE_SHIFT 10 - -/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: PHANTOM_FUNCTIONS_ENABLE [09:09] */ -#define PCIE_CFG_DEVICE_STATUS_CONTROL_PHANTOM_FUNCTIONS_ENABLE_MASK 0x00000200 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_PHANTOM_FUNCTIONS_ENABLE_ALIGN 0 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_PHANTOM_FUNCTIONS_ENABLE_BITS 1 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_PHANTOM_FUNCTIONS_ENABLE_SHIFT 9 - -/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: EXTENDED_TAG_FIELD_ENABLE [08:08] */ -#define PCIE_CFG_DEVICE_STATUS_CONTROL_EXTENDED_TAG_FIELD_ENABLE_MASK 0x00000100 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_EXTENDED_TAG_FIELD_ENABLE_ALIGN 0 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_EXTENDED_TAG_FIELD_ENABLE_BITS 1 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_EXTENDED_TAG_FIELD_ENABLE_SHIFT 8 - -/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: MAX_PAYLOAD_SIZE [07:05] */ -#define PCIE_CFG_DEVICE_STATUS_CONTROL_MAX_PAYLOAD_SIZE_MASK 0x000000e0 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_MAX_PAYLOAD_SIZE_ALIGN 0 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_MAX_PAYLOAD_SIZE_BITS 3 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_MAX_PAYLOAD_SIZE_SHIFT 5 - -/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: ENABLED_RELAXED_ORDERING [04:04] */ -#define PCIE_CFG_DEVICE_STATUS_CONTROL_ENABLED_RELAXED_ORDERING_MASK 0x00000010 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_ENABLED_RELAXED_ORDERING_ALIGN 0 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_ENABLED_RELAXED_ORDERING_BITS 1 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_ENABLED_RELAXED_ORDERING_SHIFT 4 - -/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: UNSUPPORTED_REQUEST_REPORTING_ENABLE [03:03] */ -#define PCIE_CFG_DEVICE_STATUS_CONTROL_UNSUPPORTED_REQUEST_REPORTING_ENABLE_MASK 0x00000008 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_UNSUPPORTED_REQUEST_REPORTING_ENABLE_ALIGN 0 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_UNSUPPORTED_REQUEST_REPORTING_ENABLE_BITS 1 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_UNSUPPORTED_REQUEST_REPORTING_ENABLE_SHIFT 3 - -/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: FATAL_ERROR_REPORTING_ENABLED [02:02] */ -#define PCIE_CFG_DEVICE_STATUS_CONTROL_FATAL_ERROR_REPORTING_ENABLED_MASK 0x00000004 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_FATAL_ERROR_REPORTING_ENABLED_ALIGN 0 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_FATAL_ERROR_REPORTING_ENABLED_BITS 1 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_FATAL_ERROR_REPORTING_ENABLED_SHIFT 2 - -/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: NON_FATAL_ERROR_REPORTING_ENABLED [01:01] */ -#define PCIE_CFG_DEVICE_STATUS_CONTROL_NON_FATAL_ERROR_REPORTING_ENABLED_MASK 0x00000002 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_NON_FATAL_ERROR_REPORTING_ENABLED_ALIGN 0 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_NON_FATAL_ERROR_REPORTING_ENABLED_BITS 1 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_NON_FATAL_ERROR_REPORTING_ENABLED_SHIFT 1 - -/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: CORRECTABLE_ERROR_REPORTING_ENABLED [00:00] */ -#define PCIE_CFG_DEVICE_STATUS_CONTROL_CORRECTABLE_ERROR_REPORTING_ENABLED_MASK 0x00000001 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_CORRECTABLE_ERROR_REPORTING_ENABLED_ALIGN 0 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_CORRECTABLE_ERROR_REPORTING_ENABLED_BITS 1 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_CORRECTABLE_ERROR_REPORTING_ENABLED_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: LINK_CAPABILITY - ***************************************************************************/ -/* PCIE_CFG :: LINK_CAPABILITY :: PORT_NUMBER [31:24] */ -#define PCIE_CFG_LINK_CAPABILITY_PORT_NUMBER_MASK 0xff000000 -#define PCIE_CFG_LINK_CAPABILITY_PORT_NUMBER_ALIGN 0 -#define PCIE_CFG_LINK_CAPABILITY_PORT_NUMBER_BITS 8 -#define PCIE_CFG_LINK_CAPABILITY_PORT_NUMBER_SHIFT 24 - -/* PCIE_CFG :: LINK_CAPABILITY :: RESERVED_0 [23:19] */ -#define PCIE_CFG_LINK_CAPABILITY_RESERVED_0_MASK 0x00f80000 -#define PCIE_CFG_LINK_CAPABILITY_RESERVED_0_ALIGN 0 -#define PCIE_CFG_LINK_CAPABILITY_RESERVED_0_BITS 5 -#define PCIE_CFG_LINK_CAPABILITY_RESERVED_0_SHIFT 19 - -/* PCIE_CFG :: LINK_CAPABILITY :: CLOCK_POWER_MANAGEMENT [18:18] */ -#define PCIE_CFG_LINK_CAPABILITY_CLOCK_POWER_MANAGEMENT_MASK 0x00040000 -#define PCIE_CFG_LINK_CAPABILITY_CLOCK_POWER_MANAGEMENT_ALIGN 0 -#define PCIE_CFG_LINK_CAPABILITY_CLOCK_POWER_MANAGEMENT_BITS 1 -#define PCIE_CFG_LINK_CAPABILITY_CLOCK_POWER_MANAGEMENT_SHIFT 18 - -/* PCIE_CFG :: LINK_CAPABILITY :: L1_EXIT_LATENCY [17:15] */ -#define PCIE_CFG_LINK_CAPABILITY_L1_EXIT_LATENCY_MASK 0x00038000 -#define PCIE_CFG_LINK_CAPABILITY_L1_EXIT_LATENCY_ALIGN 0 -#define PCIE_CFG_LINK_CAPABILITY_L1_EXIT_LATENCY_BITS 3 -#define PCIE_CFG_LINK_CAPABILITY_L1_EXIT_LATENCY_SHIFT 15 - -/* PCIE_CFG :: LINK_CAPABILITY :: L0S_EXIT_LATENCY [14:12] */ -#define PCIE_CFG_LINK_CAPABILITY_L0S_EXIT_LATENCY_MASK 0x00007000 -#define PCIE_CFG_LINK_CAPABILITY_L0S_EXIT_LATENCY_ALIGN 0 -#define PCIE_CFG_LINK_CAPABILITY_L0S_EXIT_LATENCY_BITS 3 -#define PCIE_CFG_LINK_CAPABILITY_L0S_EXIT_LATENCY_SHIFT 12 - -/* PCIE_CFG :: LINK_CAPABILITY :: ACTIVE_STATE_POWER_MANAGEMENT_SUPPORT [11:10] */ -#define PCIE_CFG_LINK_CAPABILITY_ACTIVE_STATE_POWER_MANAGEMENT_SUPPORT_MASK 0x00000c00 -#define PCIE_CFG_LINK_CAPABILITY_ACTIVE_STATE_POWER_MANAGEMENT_SUPPORT_ALIGN 0 -#define PCIE_CFG_LINK_CAPABILITY_ACTIVE_STATE_POWER_MANAGEMENT_SUPPORT_BITS 2 -#define PCIE_CFG_LINK_CAPABILITY_ACTIVE_STATE_POWER_MANAGEMENT_SUPPORT_SHIFT 10 - -/* PCIE_CFG :: LINK_CAPABILITY :: MAXIMUM_LINK_WIDTH [09:04] */ -#define PCIE_CFG_LINK_CAPABILITY_MAXIMUM_LINK_WIDTH_MASK 0x000003f0 -#define PCIE_CFG_LINK_CAPABILITY_MAXIMUM_LINK_WIDTH_ALIGN 0 -#define PCIE_CFG_LINK_CAPABILITY_MAXIMUM_LINK_WIDTH_BITS 6 -#define PCIE_CFG_LINK_CAPABILITY_MAXIMUM_LINK_WIDTH_SHIFT 4 - -/* PCIE_CFG :: LINK_CAPABILITY :: MAXIMUM_LINK_SPEED [03:00] */ -#define PCIE_CFG_LINK_CAPABILITY_MAXIMUM_LINK_SPEED_MASK 0x0000000f -#define PCIE_CFG_LINK_CAPABILITY_MAXIMUM_LINK_SPEED_ALIGN 0 -#define PCIE_CFG_LINK_CAPABILITY_MAXIMUM_LINK_SPEED_BITS 4 -#define PCIE_CFG_LINK_CAPABILITY_MAXIMUM_LINK_SPEED_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: LINK_STATUS_CONTROL - ***************************************************************************/ -/* PCIE_CFG :: LINK_STATUS_CONTROL :: RESERVED_0 [31:29] */ -#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_0_MASK 0xe0000000 -#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_0_ALIGN 0 -#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_0_BITS 3 -#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_0_SHIFT 29 - -/* PCIE_CFG :: LINK_STATUS_CONTROL :: SLOT_CLOCK_CONFIGURATION [28:28] */ -#define PCIE_CFG_LINK_STATUS_CONTROL_SLOT_CLOCK_CONFIGURATION_MASK 0x10000000 -#define PCIE_CFG_LINK_STATUS_CONTROL_SLOT_CLOCK_CONFIGURATION_ALIGN 0 -#define PCIE_CFG_LINK_STATUS_CONTROL_SLOT_CLOCK_CONFIGURATION_BITS 1 -#define PCIE_CFG_LINK_STATUS_CONTROL_SLOT_CLOCK_CONFIGURATION_SHIFT 28 - -/* PCIE_CFG :: LINK_STATUS_CONTROL :: RESERVED_1 [27:26] */ -#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_1_MASK 0x0c000000 -#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_1_ALIGN 0 -#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_1_BITS 2 -#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_1_SHIFT 26 - -/* PCIE_CFG :: LINK_STATUS_CONTROL :: NEGOTIATED_LINK_WIDTH [25:20] */ -#define PCIE_CFG_LINK_STATUS_CONTROL_NEGOTIATED_LINK_WIDTH_MASK 0x03f00000 -#define PCIE_CFG_LINK_STATUS_CONTROL_NEGOTIATED_LINK_WIDTH_ALIGN 0 -#define PCIE_CFG_LINK_STATUS_CONTROL_NEGOTIATED_LINK_WIDTH_BITS 6 -#define PCIE_CFG_LINK_STATUS_CONTROL_NEGOTIATED_LINK_WIDTH_SHIFT 20 - -/* PCIE_CFG :: LINK_STATUS_CONTROL :: LINK_SPEED [19:16] */ -#define PCIE_CFG_LINK_STATUS_CONTROL_LINK_SPEED_MASK 0x000f0000 -#define PCIE_CFG_LINK_STATUS_CONTROL_LINK_SPEED_ALIGN 0 -#define PCIE_CFG_LINK_STATUS_CONTROL_LINK_SPEED_BITS 4 -#define PCIE_CFG_LINK_STATUS_CONTROL_LINK_SPEED_SHIFT 16 - -/* PCIE_CFG :: LINK_STATUS_CONTROL :: RESERVED_2 [15:09] */ -#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_2_MASK 0x0000fe00 -#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_2_ALIGN 0 -#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_2_BITS 7 -#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_2_SHIFT 9 - -/* PCIE_CFG :: LINK_STATUS_CONTROL :: CLOCK_REQUEST_ENABLE [08:08] */ -#define PCIE_CFG_LINK_STATUS_CONTROL_CLOCK_REQUEST_ENABLE_MASK 0x00000100 -#define PCIE_CFG_LINK_STATUS_CONTROL_CLOCK_REQUEST_ENABLE_ALIGN 0 -#define PCIE_CFG_LINK_STATUS_CONTROL_CLOCK_REQUEST_ENABLE_BITS 1 -#define PCIE_CFG_LINK_STATUS_CONTROL_CLOCK_REQUEST_ENABLE_SHIFT 8 - -/* PCIE_CFG :: LINK_STATUS_CONTROL :: EXTENDED_SYNCH [07:07] */ -#define PCIE_CFG_LINK_STATUS_CONTROL_EXTENDED_SYNCH_MASK 0x00000080 -#define PCIE_CFG_LINK_STATUS_CONTROL_EXTENDED_SYNCH_ALIGN 0 -#define PCIE_CFG_LINK_STATUS_CONTROL_EXTENDED_SYNCH_BITS 1 -#define PCIE_CFG_LINK_STATUS_CONTROL_EXTENDED_SYNCH_SHIFT 7 - -/* PCIE_CFG :: LINK_STATUS_CONTROL :: COMMON_CLOCK_CONFIGURATION [06:06] */ -#define PCIE_CFG_LINK_STATUS_CONTROL_COMMON_CLOCK_CONFIGURATION_MASK 0x00000040 -#define PCIE_CFG_LINK_STATUS_CONTROL_COMMON_CLOCK_CONFIGURATION_ALIGN 0 -#define PCIE_CFG_LINK_STATUS_CONTROL_COMMON_CLOCK_CONFIGURATION_BITS 1 -#define PCIE_CFG_LINK_STATUS_CONTROL_COMMON_CLOCK_CONFIGURATION_SHIFT 6 - -/* PCIE_CFG :: LINK_STATUS_CONTROL :: RESERVED_3 [05:05] */ -#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_3_MASK 0x00000020 -#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_3_ALIGN 0 -#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_3_BITS 1 -#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_3_SHIFT 5 - -/* PCIE_CFG :: LINK_STATUS_CONTROL :: RESERVED_4 [04:04] */ -#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_4_MASK 0x00000010 -#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_4_ALIGN 0 -#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_4_BITS 1 -#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_4_SHIFT 4 - -/* PCIE_CFG :: LINK_STATUS_CONTROL :: READ_COMPLETION_BOUNDARY [03:03] */ -#define PCIE_CFG_LINK_STATUS_CONTROL_READ_COMPLETION_BOUNDARY_MASK 0x00000008 -#define PCIE_CFG_LINK_STATUS_CONTROL_READ_COMPLETION_BOUNDARY_ALIGN 0 -#define PCIE_CFG_LINK_STATUS_CONTROL_READ_COMPLETION_BOUNDARY_BITS 1 -#define PCIE_CFG_LINK_STATUS_CONTROL_READ_COMPLETION_BOUNDARY_SHIFT 3 - -/* PCIE_CFG :: LINK_STATUS_CONTROL :: RESERVED_5 [02:02] */ -#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_5_MASK 0x00000004 -#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_5_ALIGN 0 -#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_5_BITS 1 -#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_5_SHIFT 2 - -/* PCIE_CFG :: LINK_STATUS_CONTROL :: ACTIVE_STATE_POWER_MANAGEMENT_CONTROL [01:00] */ -#define PCIE_CFG_LINK_STATUS_CONTROL_ACTIVE_STATE_POWER_MANAGEMENT_CONTROL_MASK 0x00000003 -#define PCIE_CFG_LINK_STATUS_CONTROL_ACTIVE_STATE_POWER_MANAGEMENT_CONTROL_ALIGN 0 -#define PCIE_CFG_LINK_STATUS_CONTROL_ACTIVE_STATE_POWER_MANAGEMENT_CONTROL_BITS 2 -#define PCIE_CFG_LINK_STATUS_CONTROL_ACTIVE_STATE_POWER_MANAGEMENT_CONTROL_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: DEVICE_CAPABILITIES_2 - ***************************************************************************/ -/* PCIE_CFG :: DEVICE_CAPABILITIES_2 :: RESERVED_0 [31:05] */ -#define PCIE_CFG_DEVICE_CAPABILITIES_2_RESERVED_0_MASK 0xffffffe0 -#define PCIE_CFG_DEVICE_CAPABILITIES_2_RESERVED_0_ALIGN 0 -#define PCIE_CFG_DEVICE_CAPABILITIES_2_RESERVED_0_BITS 27 -#define PCIE_CFG_DEVICE_CAPABILITIES_2_RESERVED_0_SHIFT 5 - -/* PCIE_CFG :: DEVICE_CAPABILITIES_2 :: CPL_DISABLE_SUPPORTED [04:04] */ -#define PCIE_CFG_DEVICE_CAPABILITIES_2_CPL_DISABLE_SUPPORTED_MASK 0x00000010 -#define PCIE_CFG_DEVICE_CAPABILITIES_2_CPL_DISABLE_SUPPORTED_ALIGN 0 -#define PCIE_CFG_DEVICE_CAPABILITIES_2_CPL_DISABLE_SUPPORTED_BITS 1 -#define PCIE_CFG_DEVICE_CAPABILITIES_2_CPL_DISABLE_SUPPORTED_SHIFT 4 - -/* PCIE_CFG :: DEVICE_CAPABILITIES_2 :: CPL_TIMEOUT_RANGE_SUPPORTED [03:00] */ -#define PCIE_CFG_DEVICE_CAPABILITIES_2_CPL_TIMEOUT_RANGE_SUPPORTED_MASK 0x0000000f -#define PCIE_CFG_DEVICE_CAPABILITIES_2_CPL_TIMEOUT_RANGE_SUPPORTED_ALIGN 0 -#define PCIE_CFG_DEVICE_CAPABILITIES_2_CPL_TIMEOUT_RANGE_SUPPORTED_BITS 4 -#define PCIE_CFG_DEVICE_CAPABILITIES_2_CPL_TIMEOUT_RANGE_SUPPORTED_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: DEVICE_STATUS_CONTROL_2 - ***************************************************************************/ -/* PCIE_CFG :: DEVICE_STATUS_CONTROL_2 :: RESERVED_0 [31:05] */ -#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_RESERVED_0_MASK 0xffffffe0 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_RESERVED_0_ALIGN 0 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_RESERVED_0_BITS 27 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_RESERVED_0_SHIFT 5 - -/* PCIE_CFG :: DEVICE_STATUS_CONTROL_2 :: CPL_TIMEOUT_DISABLE [04:04] */ -#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_CPL_TIMEOUT_DISABLE_MASK 0x00000010 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_CPL_TIMEOUT_DISABLE_ALIGN 0 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_CPL_TIMEOUT_DISABLE_BITS 1 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_CPL_TIMEOUT_DISABLE_SHIFT 4 - -/* PCIE_CFG :: DEVICE_STATUS_CONTROL_2 :: CPL_TIMEOUT_VALUE [03:00] */ -#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_CPL_TIMEOUT_VALUE_MASK 0x0000000f -#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_CPL_TIMEOUT_VALUE_ALIGN 0 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_CPL_TIMEOUT_VALUE_BITS 4 -#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_CPL_TIMEOUT_VALUE_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: LINK_CAPABILITIES_2 - ***************************************************************************/ -/* PCIE_CFG :: LINK_CAPABILITIES_2 :: RESERVED_0 [31:00] */ -#define PCIE_CFG_LINK_CAPABILITIES_2_RESERVED_0_MASK 0xffffffff -#define PCIE_CFG_LINK_CAPABILITIES_2_RESERVED_0_ALIGN 0 -#define PCIE_CFG_LINK_CAPABILITIES_2_RESERVED_0_BITS 32 -#define PCIE_CFG_LINK_CAPABILITIES_2_RESERVED_0_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: LINK_STATUS_CONTROL_2 - ***************************************************************************/ -/* PCIE_CFG :: LINK_STATUS_CONTROL_2 :: RESERVED_0 [31:00] */ -#define PCIE_CFG_LINK_STATUS_CONTROL_2_RESERVED_0_MASK 0xffffffff -#define PCIE_CFG_LINK_STATUS_CONTROL_2_RESERVED_0_ALIGN 0 -#define PCIE_CFG_LINK_STATUS_CONTROL_2_RESERVED_0_BITS 32 -#define PCIE_CFG_LINK_STATUS_CONTROL_2_RESERVED_0_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER - ***************************************************************************/ -/* PCIE_CFG :: ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER :: NEXT_CAPABILITY_OFFSET [31:20] */ -#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_MASK 0xfff00000 -#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_ALIGN 0 -#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_BITS 12 -#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_SHIFT 20 - -/* PCIE_CFG :: ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER :: CAPABILITY_VERSION [19:16] */ -#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_MASK 0x000f0000 -#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_ALIGN 0 -#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_BITS 4 -#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_SHIFT 16 - -/* PCIE_CFG :: ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER :: PCIE_EXTENDED_CAPABILITY_ID [15:00] */ -#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_MASK 0x0000ffff -#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_ALIGN 0 -#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_BITS 16 -#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS - ***************************************************************************/ -/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: RESERVED_0 [31:21] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_0_MASK 0xffe00000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_0_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_0_BITS 11 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_0_SHIFT 21 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: UNSUPPORTED_REQUEST_ERROR_STATUS [20:20] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_UNSUPPORTED_REQUEST_ERROR_STATUS_MASK 0x00100000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_UNSUPPORTED_REQUEST_ERROR_STATUS_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_UNSUPPORTED_REQUEST_ERROR_STATUS_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_UNSUPPORTED_REQUEST_ERROR_STATUS_SHIFT 20 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: ECRC_ERROR_STATUS [19:19] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_ECRC_ERROR_STATUS_MASK 0x00080000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_ECRC_ERROR_STATUS_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_ECRC_ERROR_STATUS_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_ECRC_ERROR_STATUS_SHIFT 19 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: MALFORMED_TLP_STATUS [18:18] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_MALFORMED_TLP_STATUS_MASK 0x00040000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_MALFORMED_TLP_STATUS_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_MALFORMED_TLP_STATUS_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_MALFORMED_TLP_STATUS_SHIFT 18 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: RECEIVER_OVERFLOW_STATUS [17:17] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RECEIVER_OVERFLOW_STATUS_MASK 0x00020000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RECEIVER_OVERFLOW_STATUS_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RECEIVER_OVERFLOW_STATUS_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RECEIVER_OVERFLOW_STATUS_SHIFT 17 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: UNEXPECTED_COMPLETION_STATUS [16:16] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_UNEXPECTED_COMPLETION_STATUS_MASK 0x00010000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_UNEXPECTED_COMPLETION_STATUS_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_UNEXPECTED_COMPLETION_STATUS_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_UNEXPECTED_COMPLETION_STATUS_SHIFT 16 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: COMPLETER_ABORT_STATUS [15:15] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_COMPLETER_ABORT_STATUS_MASK 0x00008000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_COMPLETER_ABORT_STATUS_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_COMPLETER_ABORT_STATUS_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_COMPLETER_ABORT_STATUS_SHIFT 15 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: COMPLETION_TIMEOUT_STATUS [14:14] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_COMPLETION_TIMEOUT_STATUS_MASK 0x00004000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_COMPLETION_TIMEOUT_STATUS_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_COMPLETION_TIMEOUT_STATUS_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_COMPLETION_TIMEOUT_STATUS_SHIFT 14 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: FLOW_CONTROL_PROTOCOL_ERROR_STATUS [13:13] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_FLOW_CONTROL_PROTOCOL_ERROR_STATUS_MASK 0x00002000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_FLOW_CONTROL_PROTOCOL_ERROR_STATUS_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_FLOW_CONTROL_PROTOCOL_ERROR_STATUS_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_FLOW_CONTROL_PROTOCOL_ERROR_STATUS_SHIFT 13 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: POISONED_TLP_STATUS [12:12] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_POISONED_TLP_STATUS_MASK 0x00001000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_POISONED_TLP_STATUS_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_POISONED_TLP_STATUS_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_POISONED_TLP_STATUS_SHIFT 12 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: RESERVED_1 [11:05] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_1_MASK 0x00000fe0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_1_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_1_BITS 7 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_1_SHIFT 5 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: DATA_LINK_PROTOCOL_ERROR_STATUS [04:04] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_DATA_LINK_PROTOCOL_ERROR_STATUS_MASK 0x00000010 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_DATA_LINK_PROTOCOL_ERROR_STATUS_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_DATA_LINK_PROTOCOL_ERROR_STATUS_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_DATA_LINK_PROTOCOL_ERROR_STATUS_SHIFT 4 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: RESERVED_2 [03:01] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_2_MASK 0x0000000e -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_2_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_2_BITS 3 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_2_SHIFT 1 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: TRAINING_ERROR_STATUS [00:00] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_TRAINING_ERROR_STATUS_MASK 0x00000001 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_TRAINING_ERROR_STATUS_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_TRAINING_ERROR_STATUS_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_TRAINING_ERROR_STATUS_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: UNCORRECTABLE_ERROR_MASK - ***************************************************************************/ -/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: RESERVED_0 [31:21] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_0_MASK 0xffe00000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_0_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_0_BITS 11 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_0_SHIFT 21 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: UNSUPPORTED_REQUEST_ERROR_MASK [20:20] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_UNSUPPORTED_REQUEST_ERROR_MASK_MASK 0x00100000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_UNSUPPORTED_REQUEST_ERROR_MASK_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_UNSUPPORTED_REQUEST_ERROR_MASK_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_UNSUPPORTED_REQUEST_ERROR_MASK_SHIFT 20 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: ECRC_ERROR_MASK [19:19] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_ECRC_ERROR_MASK_MASK 0x00080000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_ECRC_ERROR_MASK_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_ECRC_ERROR_MASK_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_ECRC_ERROR_MASK_SHIFT 19 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: MALFORMED_TLP_MASK [18:18] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_MALFORMED_TLP_MASK_MASK 0x00040000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_MALFORMED_TLP_MASK_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_MALFORMED_TLP_MASK_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_MALFORMED_TLP_MASK_SHIFT 18 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: RECEIVER_OVERFLOW_MASK [17:17] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RECEIVER_OVERFLOW_MASK_MASK 0x00020000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RECEIVER_OVERFLOW_MASK_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RECEIVER_OVERFLOW_MASK_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RECEIVER_OVERFLOW_MASK_SHIFT 17 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: UNEXPECTED_COMPLETION_MASK [16:16] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_UNEXPECTED_COMPLETION_MASK_MASK 0x00010000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_UNEXPECTED_COMPLETION_MASK_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_UNEXPECTED_COMPLETION_MASK_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_UNEXPECTED_COMPLETION_MASK_SHIFT 16 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: COMPLETER_ABORT_MASK [15:15] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_COMPLETER_ABORT_MASK_MASK 0x00008000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_COMPLETER_ABORT_MASK_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_COMPLETER_ABORT_MASK_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_COMPLETER_ABORT_MASK_SHIFT 15 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: COMPLETION_TIMEOUT_MASK [14:14] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_COMPLETION_TIMEOUT_MASK_MASK 0x00004000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_COMPLETION_TIMEOUT_MASK_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_COMPLETION_TIMEOUT_MASK_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_COMPLETION_TIMEOUT_MASK_SHIFT 14 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: FLOW_CONTROL_PROTOCOL_ERROR_MASK [13:13] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_FLOW_CONTROL_PROTOCOL_ERROR_MASK_MASK 0x00002000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_FLOW_CONTROL_PROTOCOL_ERROR_MASK_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_FLOW_CONTROL_PROTOCOL_ERROR_MASK_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_FLOW_CONTROL_PROTOCOL_ERROR_MASK_SHIFT 13 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: POISONED_TLP_MASK [12:12] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_POISONED_TLP_MASK_MASK 0x00001000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_POISONED_TLP_MASK_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_POISONED_TLP_MASK_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_POISONED_TLP_MASK_SHIFT 12 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: RESERVED_1 [11:05] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_1_MASK 0x00000fe0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_1_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_1_BITS 7 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_1_SHIFT 5 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: DATA_LINK_PROTOCOL_ERROR_MASK [04:04] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_DATA_LINK_PROTOCOL_ERROR_MASK_MASK 0x00000010 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_DATA_LINK_PROTOCOL_ERROR_MASK_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_DATA_LINK_PROTOCOL_ERROR_MASK_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_DATA_LINK_PROTOCOL_ERROR_MASK_SHIFT 4 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: RESERVED_2 [03:01] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_2_MASK 0x0000000e -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_2_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_2_BITS 3 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_2_SHIFT 1 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: TRAINING_ERROR_MASK [00:00] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_TRAINING_ERROR_MASK_MASK 0x00000001 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_TRAINING_ERROR_MASK_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_TRAINING_ERROR_MASK_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_TRAINING_ERROR_MASK_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY - ***************************************************************************/ -/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: RESERVED_0 [31:21] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_0_MASK 0xffe00000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_0_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_0_BITS 11 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_0_SHIFT 21 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: UNSUPPORTED_REQUEST_ERROR_SEVERITY [20:20] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_UNSUPPORTED_REQUEST_ERROR_SEVERITY_MASK 0x00100000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_UNSUPPORTED_REQUEST_ERROR_SEVERITY_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_UNSUPPORTED_REQUEST_ERROR_SEVERITY_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_UNSUPPORTED_REQUEST_ERROR_SEVERITY_SHIFT 20 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: ECRC_ERROR_SEVERITY [19:19] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_ECRC_ERROR_SEVERITY_MASK 0x00080000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_ECRC_ERROR_SEVERITY_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_ECRC_ERROR_SEVERITY_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_ECRC_ERROR_SEVERITY_SHIFT 19 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: MALFORMED_TLP_SEVERITY [18:18] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_MALFORMED_TLP_SEVERITY_MASK 0x00040000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_MALFORMED_TLP_SEVERITY_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_MALFORMED_TLP_SEVERITY_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_MALFORMED_TLP_SEVERITY_SHIFT 18 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: RECEIVER_OVERFLOW_ERROR_SEVERITY [17:17] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RECEIVER_OVERFLOW_ERROR_SEVERITY_MASK 0x00020000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RECEIVER_OVERFLOW_ERROR_SEVERITY_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RECEIVER_OVERFLOW_ERROR_SEVERITY_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RECEIVER_OVERFLOW_ERROR_SEVERITY_SHIFT 17 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: UNEXPECTED_COMPLETION_ERROR_SEVERITY [16:16] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_UNEXPECTED_COMPLETION_ERROR_SEVERITY_MASK 0x00010000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_UNEXPECTED_COMPLETION_ERROR_SEVERITY_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_UNEXPECTED_COMPLETION_ERROR_SEVERITY_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_UNEXPECTED_COMPLETION_ERROR_SEVERITY_SHIFT 16 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: COMPLETER_ABORT_ERROR_SEVERITY [15:15] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_COMPLETER_ABORT_ERROR_SEVERITY_MASK 0x00008000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_COMPLETER_ABORT_ERROR_SEVERITY_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_COMPLETER_ABORT_ERROR_SEVERITY_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_COMPLETER_ABORT_ERROR_SEVERITY_SHIFT 15 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: COMPLETION_TIMEOUT_ERROR_SEVERITY [14:14] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_COMPLETION_TIMEOUT_ERROR_SEVERITY_MASK 0x00004000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_COMPLETION_TIMEOUT_ERROR_SEVERITY_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_COMPLETION_TIMEOUT_ERROR_SEVERITY_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_COMPLETION_TIMEOUT_ERROR_SEVERITY_SHIFT 14 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: FLOW_CONTROL_PROTOCOL_ERROR_SEVERITY [13:13] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_FLOW_CONTROL_PROTOCOL_ERROR_SEVERITY_MASK 0x00002000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_FLOW_CONTROL_PROTOCOL_ERROR_SEVERITY_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_FLOW_CONTROL_PROTOCOL_ERROR_SEVERITY_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_FLOW_CONTROL_PROTOCOL_ERROR_SEVERITY_SHIFT 13 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: POISONED_TLP_SEVERITY [12:12] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_POISONED_TLP_SEVERITY_MASK 0x00001000 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_POISONED_TLP_SEVERITY_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_POISONED_TLP_SEVERITY_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_POISONED_TLP_SEVERITY_SHIFT 12 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: RESERVED_1 [11:05] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_1_MASK 0x00000fe0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_1_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_1_BITS 7 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_1_SHIFT 5 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: DATA_LINK_PROTOCOL_ERROR_SEVERITY [04:04] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_DATA_LINK_PROTOCOL_ERROR_SEVERITY_MASK 0x00000010 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_DATA_LINK_PROTOCOL_ERROR_SEVERITY_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_DATA_LINK_PROTOCOL_ERROR_SEVERITY_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_DATA_LINK_PROTOCOL_ERROR_SEVERITY_SHIFT 4 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: RESERVED_2 [03:01] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_2_MASK 0x0000000e -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_2_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_2_BITS 3 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_2_SHIFT 1 - -/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: TRAINING_ERROR_SEVERITY [00:00] */ -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_TRAINING_ERROR_SEVERITY_MASK 0x00000001 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_TRAINING_ERROR_SEVERITY_ALIGN 0 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_TRAINING_ERROR_SEVERITY_BITS 1 -#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_TRAINING_ERROR_SEVERITY_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: CORRECTABLE_ERROR_STATUS - ***************************************************************************/ -/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: RESERVED_0 [31:14] */ -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_0_MASK 0xffffc000 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_0_ALIGN 0 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_0_BITS 18 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_0_SHIFT 14 - -/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: ADVISORY_NON_FATAL_ERROR_STATUS [13:13] */ -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_ADVISORY_NON_FATAL_ERROR_STATUS_MASK 0x00002000 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_ADVISORY_NON_FATAL_ERROR_STATUS_ALIGN 0 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_ADVISORY_NON_FATAL_ERROR_STATUS_BITS 1 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_ADVISORY_NON_FATAL_ERROR_STATUS_SHIFT 13 - -/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: REPLAY_TIMER_TIMEOUT_STATUS [12:12] */ -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_REPLAY_TIMER_TIMEOUT_STATUS_MASK 0x00001000 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_REPLAY_TIMER_TIMEOUT_STATUS_ALIGN 0 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_REPLAY_TIMER_TIMEOUT_STATUS_BITS 1 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_REPLAY_TIMER_TIMEOUT_STATUS_SHIFT 12 - -/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: RESERVED_1 [11:09] */ -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_1_MASK 0x00000e00 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_1_ALIGN 0 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_1_BITS 3 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_1_SHIFT 9 - -/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: REPLAY_NUM_ROLLOVER_STATUS [08:08] */ -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_REPLAY_NUM_ROLLOVER_STATUS_MASK 0x00000100 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_REPLAY_NUM_ROLLOVER_STATUS_ALIGN 0 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_REPLAY_NUM_ROLLOVER_STATUS_BITS 1 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_REPLAY_NUM_ROLLOVER_STATUS_SHIFT 8 - -/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: BAD_DLLP_STATUS [07:07] */ -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_BAD_DLLP_STATUS_MASK 0x00000080 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_BAD_DLLP_STATUS_ALIGN 0 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_BAD_DLLP_STATUS_BITS 1 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_BAD_DLLP_STATUS_SHIFT 7 - -/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: BAD_TLP_STATUS [06:06] */ -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_BAD_TLP_STATUS_MASK 0x00000040 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_BAD_TLP_STATUS_ALIGN 0 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_BAD_TLP_STATUS_BITS 1 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_BAD_TLP_STATUS_SHIFT 6 - -/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: RESERVED_2 [05:01] */ -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_2_MASK 0x0000003e -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_2_ALIGN 0 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_2_BITS 5 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_2_SHIFT 1 - -/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: RECEIVER_ERROR_STATUS [00:00] */ -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RECEIVER_ERROR_STATUS_MASK 0x00000001 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RECEIVER_ERROR_STATUS_ALIGN 0 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RECEIVER_ERROR_STATUS_BITS 1 -#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RECEIVER_ERROR_STATUS_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: CORRECTABLE_ERROR_MASK - ***************************************************************************/ -/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: RESERVED_0 [31:14] */ -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_0_MASK 0xffffc000 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_0_ALIGN 0 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_0_BITS 18 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_0_SHIFT 14 - -/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: ADVISORY_NON_FATAL_ERROR_MASK [13:13] */ -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_ADVISORY_NON_FATAL_ERROR_MASK_MASK 0x00002000 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_ADVISORY_NON_FATAL_ERROR_MASK_ALIGN 0 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_ADVISORY_NON_FATAL_ERROR_MASK_BITS 1 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_ADVISORY_NON_FATAL_ERROR_MASK_SHIFT 13 - -/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: REPLAY_TIMER_TIMEOUT_MASK [12:12] */ -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_REPLAY_TIMER_TIMEOUT_MASK_MASK 0x00001000 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_REPLAY_TIMER_TIMEOUT_MASK_ALIGN 0 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_REPLAY_TIMER_TIMEOUT_MASK_BITS 1 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_REPLAY_TIMER_TIMEOUT_MASK_SHIFT 12 - -/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: RESERVED_1 [11:09] */ -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_1_MASK 0x00000e00 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_1_ALIGN 0 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_1_BITS 3 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_1_SHIFT 9 - -/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: REPLAY_NUM_ROLLOVER_MASK [08:08] */ -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_REPLAY_NUM_ROLLOVER_MASK_MASK 0x00000100 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_REPLAY_NUM_ROLLOVER_MASK_ALIGN 0 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_REPLAY_NUM_ROLLOVER_MASK_BITS 1 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_REPLAY_NUM_ROLLOVER_MASK_SHIFT 8 - -/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: BAD_DLLP_MASK [07:07] */ -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_BAD_DLLP_MASK_MASK 0x00000080 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_BAD_DLLP_MASK_ALIGN 0 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_BAD_DLLP_MASK_BITS 1 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_BAD_DLLP_MASK_SHIFT 7 - -/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: BAD_TLP_MASK [06:06] */ -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_BAD_TLP_MASK_MASK 0x00000040 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_BAD_TLP_MASK_ALIGN 0 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_BAD_TLP_MASK_BITS 1 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_BAD_TLP_MASK_SHIFT 6 - -/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: RESERVED_2 [05:01] */ -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_2_MASK 0x0000003e -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_2_ALIGN 0 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_2_BITS 5 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_2_SHIFT 1 - -/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: RECEIVER_ERROR_MASK [00:00] */ -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RECEIVER_ERROR_MASK_MASK 0x00000001 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RECEIVER_ERROR_MASK_ALIGN 0 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RECEIVER_ERROR_MASK_BITS 1 -#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RECEIVER_ERROR_MASK_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: ADVANCED_ERROR_CAPABILITIES_AND_CONTROL - ***************************************************************************/ -/* PCIE_CFG :: ADVANCED_ERROR_CAPABILITIES_AND_CONTROL :: RESERVED_0 [31:09] */ -#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_RESERVED_0_MASK 0xfffffe00 -#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_RESERVED_0_ALIGN 0 -#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_RESERVED_0_BITS 23 -#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_RESERVED_0_SHIFT 9 - -/* PCIE_CFG :: ADVANCED_ERROR_CAPABILITIES_AND_CONTROL :: ECRC_CHECK_ENABLE [08:08] */ -#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_CHECK_ENABLE_MASK 0x00000100 -#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_CHECK_ENABLE_ALIGN 0 -#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_CHECK_ENABLE_BITS 1 -#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_CHECK_ENABLE_SHIFT 8 - -/* PCIE_CFG :: ADVANCED_ERROR_CAPABILITIES_AND_CONTROL :: ECRC_CHECK_CAPABLE [07:07] */ -#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_CHECK_CAPABLE_MASK 0x00000080 -#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_CHECK_CAPABLE_ALIGN 0 -#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_CHECK_CAPABLE_BITS 1 -#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_CHECK_CAPABLE_SHIFT 7 - -/* PCIE_CFG :: ADVANCED_ERROR_CAPABILITIES_AND_CONTROL :: ECRC_GENERATION_ENABLE [06:06] */ -#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_GENERATION_ENABLE_MASK 0x00000040 -#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_GENERATION_ENABLE_ALIGN 0 -#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_GENERATION_ENABLE_BITS 1 -#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_GENERATION_ENABLE_SHIFT 6 - -/* PCIE_CFG :: ADVANCED_ERROR_CAPABILITIES_AND_CONTROL :: ECRC_GENERATION_CAPABLE [05:05] */ -#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_GENERATION_CAPABLE_MASK 0x00000020 -#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_GENERATION_CAPABLE_ALIGN 0 -#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_GENERATION_CAPABLE_BITS 1 -#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_GENERATION_CAPABLE_SHIFT 5 - -/* PCIE_CFG :: ADVANCED_ERROR_CAPABILITIES_AND_CONTROL :: FIRST_ERROR_POINTER [04:00] */ -#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_FIRST_ERROR_POINTER_MASK 0x0000001f -#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_FIRST_ERROR_POINTER_ALIGN 0 -#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_FIRST_ERROR_POINTER_BITS 5 -#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_FIRST_ERROR_POINTER_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: HEADER_LOG_1 - ***************************************************************************/ -/* PCIE_CFG :: HEADER_LOG_1 :: HEADER_BYTE_0 [31:24] */ -#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_0_MASK 0xff000000 -#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_0_ALIGN 0 -#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_0_BITS 8 -#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_0_SHIFT 24 - -/* PCIE_CFG :: HEADER_LOG_1 :: HEADER_BYTE_1 [23:16] */ -#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_1_MASK 0x00ff0000 -#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_1_ALIGN 0 -#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_1_BITS 8 -#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_1_SHIFT 16 - -/* PCIE_CFG :: HEADER_LOG_1 :: HEADER_BYTE_2 [15:08] */ -#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_2_MASK 0x0000ff00 -#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_2_ALIGN 0 -#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_2_BITS 8 -#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_2_SHIFT 8 - -/* PCIE_CFG :: HEADER_LOG_1 :: HEADER_BYTE_3 [07:00] */ -#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_3_MASK 0x000000ff -#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_3_ALIGN 0 -#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_3_BITS 8 -#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_3_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: HEADER_LOG_2 - ***************************************************************************/ -/* PCIE_CFG :: HEADER_LOG_2 :: HEADER_BYTE_4 [31:24] */ -#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_4_MASK 0xff000000 -#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_4_ALIGN 0 -#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_4_BITS 8 -#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_4_SHIFT 24 - -/* PCIE_CFG :: HEADER_LOG_2 :: HEADER_BYTE_5 [23:16] */ -#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_5_MASK 0x00ff0000 -#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_5_ALIGN 0 -#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_5_BITS 8 -#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_5_SHIFT 16 - -/* PCIE_CFG :: HEADER_LOG_2 :: HEADER_BYTE_6 [15:08] */ -#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_6_MASK 0x0000ff00 -#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_6_ALIGN 0 -#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_6_BITS 8 -#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_6_SHIFT 8 - -/* PCIE_CFG :: HEADER_LOG_2 :: HEADER_BYTE_7 [07:00] */ -#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_7_MASK 0x000000ff -#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_7_ALIGN 0 -#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_7_BITS 8 -#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_7_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: HEADER_LOG_3 - ***************************************************************************/ -/* PCIE_CFG :: HEADER_LOG_3 :: HEADER_BYTE_8 [31:24] */ -#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_8_MASK 0xff000000 -#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_8_ALIGN 0 -#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_8_BITS 8 -#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_8_SHIFT 24 - -/* PCIE_CFG :: HEADER_LOG_3 :: HEADER_BYTE_9 [23:16] */ -#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_9_MASK 0x00ff0000 -#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_9_ALIGN 0 -#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_9_BITS 8 -#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_9_SHIFT 16 - -/* PCIE_CFG :: HEADER_LOG_3 :: HEADER_BYTE_10 [15:08] */ -#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_10_MASK 0x0000ff00 -#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_10_ALIGN 0 -#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_10_BITS 8 -#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_10_SHIFT 8 - -/* PCIE_CFG :: HEADER_LOG_3 :: HEADER_BYTE_11 [07:00] */ -#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_11_MASK 0x000000ff -#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_11_ALIGN 0 -#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_11_BITS 8 -#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_11_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: HEADER_LOG_4 - ***************************************************************************/ -/* PCIE_CFG :: HEADER_LOG_4 :: HEADER_BYTE_12 [31:24] */ -#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_12_MASK 0xff000000 -#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_12_ALIGN 0 -#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_12_BITS 8 -#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_12_SHIFT 24 - -/* PCIE_CFG :: HEADER_LOG_4 :: HEADER_BYTE_13 [23:16] */ -#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_13_MASK 0x00ff0000 -#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_13_ALIGN 0 -#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_13_BITS 8 -#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_13_SHIFT 16 - -/* PCIE_CFG :: HEADER_LOG_4 :: HEADER_BYTE_14 [15:08] */ -#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_14_MASK 0x0000ff00 -#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_14_ALIGN 0 -#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_14_BITS 8 -#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_14_SHIFT 8 - -/* PCIE_CFG :: HEADER_LOG_4 :: HEADER_BYTE_15 [07:00] */ -#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_15_MASK 0x000000ff -#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_15_ALIGN 0 -#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_15_BITS 8 -#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_15_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER - ***************************************************************************/ -/* PCIE_CFG :: VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER :: NEXT_CAPABILITY_OFFSET [31:20] */ -#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_MASK 0xfff00000 -#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_ALIGN 0 -#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_BITS 12 -#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_SHIFT 20 - -/* PCIE_CFG :: VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER :: CAPABILITY_VERSION [19:16] */ -#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_MASK 0x000f0000 -#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_ALIGN 0 -#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_BITS 4 -#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_SHIFT 16 - -/* PCIE_CFG :: VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER :: PCIE_EXTENDED_CAPABILITY_ID [15:00] */ -#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_MASK 0x0000ffff -#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_ALIGN 0 -#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_BITS 16 -#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: PORT_VC_CAPABILITY - ***************************************************************************/ -/* PCIE_CFG :: PORT_VC_CAPABILITY :: RESERVED_0 [31:12] */ -#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_0_MASK 0xfffff000 -#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_0_ALIGN 0 -#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_0_BITS 20 -#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_0_SHIFT 12 - -/* PCIE_CFG :: PORT_VC_CAPABILITY :: PORT_ARBITRATION_TABLE_ENTRY_SIZE [11:10] */ -#define PCIE_CFG_PORT_VC_CAPABILITY_PORT_ARBITRATION_TABLE_ENTRY_SIZE_MASK 0x00000c00 -#define PCIE_CFG_PORT_VC_CAPABILITY_PORT_ARBITRATION_TABLE_ENTRY_SIZE_ALIGN 0 -#define PCIE_CFG_PORT_VC_CAPABILITY_PORT_ARBITRATION_TABLE_ENTRY_SIZE_BITS 2 -#define PCIE_CFG_PORT_VC_CAPABILITY_PORT_ARBITRATION_TABLE_ENTRY_SIZE_SHIFT 10 - -/* PCIE_CFG :: PORT_VC_CAPABILITY :: REFERENCE_CLOCK [09:08] */ -#define PCIE_CFG_PORT_VC_CAPABILITY_REFERENCE_CLOCK_MASK 0x00000300 -#define PCIE_CFG_PORT_VC_CAPABILITY_REFERENCE_CLOCK_ALIGN 0 -#define PCIE_CFG_PORT_VC_CAPABILITY_REFERENCE_CLOCK_BITS 2 -#define PCIE_CFG_PORT_VC_CAPABILITY_REFERENCE_CLOCK_SHIFT 8 - -/* PCIE_CFG :: PORT_VC_CAPABILITY :: RESERVED_1 [07:07] */ -#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_1_MASK 0x00000080 -#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_1_ALIGN 0 -#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_1_BITS 1 -#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_1_SHIFT 7 - -/* PCIE_CFG :: PORT_VC_CAPABILITY :: LOW_PRIORITY_EXTENDED_VC_COUNT [06:04] */ -#define PCIE_CFG_PORT_VC_CAPABILITY_LOW_PRIORITY_EXTENDED_VC_COUNT_MASK 0x00000070 -#define PCIE_CFG_PORT_VC_CAPABILITY_LOW_PRIORITY_EXTENDED_VC_COUNT_ALIGN 0 -#define PCIE_CFG_PORT_VC_CAPABILITY_LOW_PRIORITY_EXTENDED_VC_COUNT_BITS 3 -#define PCIE_CFG_PORT_VC_CAPABILITY_LOW_PRIORITY_EXTENDED_VC_COUNT_SHIFT 4 - -/* PCIE_CFG :: PORT_VC_CAPABILITY :: RESERVED_2 [03:03] */ -#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_2_MASK 0x00000008 -#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_2_ALIGN 0 -#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_2_BITS 1 -#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_2_SHIFT 3 - -/* PCIE_CFG :: PORT_VC_CAPABILITY :: EXTENDED_VC_COUNT [02:00] */ -#define PCIE_CFG_PORT_VC_CAPABILITY_EXTENDED_VC_COUNT_MASK 0x00000007 -#define PCIE_CFG_PORT_VC_CAPABILITY_EXTENDED_VC_COUNT_ALIGN 0 -#define PCIE_CFG_PORT_VC_CAPABILITY_EXTENDED_VC_COUNT_BITS 3 -#define PCIE_CFG_PORT_VC_CAPABILITY_EXTENDED_VC_COUNT_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: PORT_VC_CAPABILITY_2 - ***************************************************************************/ -/* PCIE_CFG :: PORT_VC_CAPABILITY_2 :: VC_ARBITRATION_TABLE_OFFSET [31:24] */ -#define PCIE_CFG_PORT_VC_CAPABILITY_2_VC_ARBITRATION_TABLE_OFFSET_MASK 0xff000000 -#define PCIE_CFG_PORT_VC_CAPABILITY_2_VC_ARBITRATION_TABLE_OFFSET_ALIGN 0 -#define PCIE_CFG_PORT_VC_CAPABILITY_2_VC_ARBITRATION_TABLE_OFFSET_BITS 8 -#define PCIE_CFG_PORT_VC_CAPABILITY_2_VC_ARBITRATION_TABLE_OFFSET_SHIFT 24 - -/* PCIE_CFG :: PORT_VC_CAPABILITY_2 :: RESERVED_0 [23:08] */ -#define PCIE_CFG_PORT_VC_CAPABILITY_2_RESERVED_0_MASK 0x00ffff00 -#define PCIE_CFG_PORT_VC_CAPABILITY_2_RESERVED_0_ALIGN 0 -#define PCIE_CFG_PORT_VC_CAPABILITY_2_RESERVED_0_BITS 16 -#define PCIE_CFG_PORT_VC_CAPABILITY_2_RESERVED_0_SHIFT 8 - -/* PCIE_CFG :: PORT_VC_CAPABILITY_2 :: VC_ARBITRATION_CAPABILITY [07:00] */ -#define PCIE_CFG_PORT_VC_CAPABILITY_2_VC_ARBITRATION_CAPABILITY_MASK 0x000000ff -#define PCIE_CFG_PORT_VC_CAPABILITY_2_VC_ARBITRATION_CAPABILITY_ALIGN 0 -#define PCIE_CFG_PORT_VC_CAPABILITY_2_VC_ARBITRATION_CAPABILITY_BITS 8 -#define PCIE_CFG_PORT_VC_CAPABILITY_2_VC_ARBITRATION_CAPABILITY_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: PORT_VC_STATUS_CONTROL - ***************************************************************************/ -/* PCIE_CFG :: PORT_VC_STATUS_CONTROL :: RESERVED_0 [31:17] */ -#define PCIE_CFG_PORT_VC_STATUS_CONTROL_RESERVED_0_MASK 0xfffe0000 -#define PCIE_CFG_PORT_VC_STATUS_CONTROL_RESERVED_0_ALIGN 0 -#define PCIE_CFG_PORT_VC_STATUS_CONTROL_RESERVED_0_BITS 15 -#define PCIE_CFG_PORT_VC_STATUS_CONTROL_RESERVED_0_SHIFT 17 - -/* PCIE_CFG :: PORT_VC_STATUS_CONTROL :: VC_ARBITRATION_TABLE_STATUS [16:16] */ -#define PCIE_CFG_PORT_VC_STATUS_CONTROL_VC_ARBITRATION_TABLE_STATUS_MASK 0x00010000 -#define PCIE_CFG_PORT_VC_STATUS_CONTROL_VC_ARBITRATION_TABLE_STATUS_ALIGN 0 -#define PCIE_CFG_PORT_VC_STATUS_CONTROL_VC_ARBITRATION_TABLE_STATUS_BITS 1 -#define PCIE_CFG_PORT_VC_STATUS_CONTROL_VC_ARBITRATION_TABLE_STATUS_SHIFT 16 - -/* PCIE_CFG :: PORT_VC_STATUS_CONTROL :: RESERVED_1 [15:04] */ -#define PCIE_CFG_PORT_VC_STATUS_CONTROL_RESERVED_1_MASK 0x0000fff0 -#define PCIE_CFG_PORT_VC_STATUS_CONTROL_RESERVED_1_ALIGN 0 -#define PCIE_CFG_PORT_VC_STATUS_CONTROL_RESERVED_1_BITS 12 -#define PCIE_CFG_PORT_VC_STATUS_CONTROL_RESERVED_1_SHIFT 4 - -/* PCIE_CFG :: PORT_VC_STATUS_CONTROL :: VC_ARBITRATION_SELECT [03:01] */ -#define PCIE_CFG_PORT_VC_STATUS_CONTROL_VC_ARBITRATION_SELECT_MASK 0x0000000e -#define PCIE_CFG_PORT_VC_STATUS_CONTROL_VC_ARBITRATION_SELECT_ALIGN 0 -#define PCIE_CFG_PORT_VC_STATUS_CONTROL_VC_ARBITRATION_SELECT_BITS 3 -#define PCIE_CFG_PORT_VC_STATUS_CONTROL_VC_ARBITRATION_SELECT_SHIFT 1 - -/* PCIE_CFG :: PORT_VC_STATUS_CONTROL :: LOAD_VC_ARBITRATION_TABLE [00:00] */ -#define PCIE_CFG_PORT_VC_STATUS_CONTROL_LOAD_VC_ARBITRATION_TABLE_MASK 0x00000001 -#define PCIE_CFG_PORT_VC_STATUS_CONTROL_LOAD_VC_ARBITRATION_TABLE_ALIGN 0 -#define PCIE_CFG_PORT_VC_STATUS_CONTROL_LOAD_VC_ARBITRATION_TABLE_BITS 1 -#define PCIE_CFG_PORT_VC_STATUS_CONTROL_LOAD_VC_ARBITRATION_TABLE_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: VC_RESOURCE_CAPABILITY - ***************************************************************************/ -/* PCIE_CFG :: VC_RESOURCE_CAPABILITY :: PORT_ARBITRATION_TABLE_OFFSET [31:24] */ -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_PORT_ARBITRATION_TABLE_OFFSET_MASK 0xff000000 -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_PORT_ARBITRATION_TABLE_OFFSET_ALIGN 0 -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_PORT_ARBITRATION_TABLE_OFFSET_BITS 8 -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_PORT_ARBITRATION_TABLE_OFFSET_SHIFT 24 - -/* PCIE_CFG :: VC_RESOURCE_CAPABILITY :: RESERVED_0 [23:23] */ -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_RESERVED_0_MASK 0x00800000 -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_RESERVED_0_ALIGN 0 -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_RESERVED_0_BITS 1 -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_RESERVED_0_SHIFT 23 - -/* PCIE_CFG :: VC_RESOURCE_CAPABILITY :: MAXIMUM_TIME_SLOTS [22:16] */ -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_MAXIMUM_TIME_SLOTS_MASK 0x007f0000 -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_MAXIMUM_TIME_SLOTS_ALIGN 0 -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_MAXIMUM_TIME_SLOTS_BITS 7 -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_MAXIMUM_TIME_SLOTS_SHIFT 16 - -/* PCIE_CFG :: VC_RESOURCE_CAPABILITY :: REJECT_SNOOP_TRANSACTIONS [15:15] */ -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_REJECT_SNOOP_TRANSACTIONS_MASK 0x00008000 -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_REJECT_SNOOP_TRANSACTIONS_ALIGN 0 -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_REJECT_SNOOP_TRANSACTIONS_BITS 1 -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_REJECT_SNOOP_TRANSACTIONS_SHIFT 15 - -/* PCIE_CFG :: VC_RESOURCE_CAPABILITY :: ADVANCED_PACKET_SWITCHING [14:14] */ -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_ADVANCED_PACKET_SWITCHING_MASK 0x00004000 -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_ADVANCED_PACKET_SWITCHING_ALIGN 0 -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_ADVANCED_PACKET_SWITCHING_BITS 1 -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_ADVANCED_PACKET_SWITCHING_SHIFT 14 - -/* PCIE_CFG :: VC_RESOURCE_CAPABILITY :: RESERVED_1 [13:08] */ -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_RESERVED_1_MASK 0x00003f00 -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_RESERVED_1_ALIGN 0 -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_RESERVED_1_BITS 6 -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_RESERVED_1_SHIFT 8 - -/* PCIE_CFG :: VC_RESOURCE_CAPABILITY :: PORT_ARBITRATION_CAPABILITY [07:00] */ -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_PORT_ARBITRATION_CAPABILITY_MASK 0x000000ff -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_PORT_ARBITRATION_CAPABILITY_ALIGN 0 -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_PORT_ARBITRATION_CAPABILITY_BITS 8 -#define PCIE_CFG_VC_RESOURCE_CAPABILITY_PORT_ARBITRATION_CAPABILITY_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: VC_RESOURCE_CONTROL - ***************************************************************************/ -/* PCIE_CFG :: VC_RESOURCE_CONTROL :: VC_ENABLE [31:31] */ -#define PCIE_CFG_VC_RESOURCE_CONTROL_VC_ENABLE_MASK 0x80000000 -#define PCIE_CFG_VC_RESOURCE_CONTROL_VC_ENABLE_ALIGN 0 -#define PCIE_CFG_VC_RESOURCE_CONTROL_VC_ENABLE_BITS 1 -#define PCIE_CFG_VC_RESOURCE_CONTROL_VC_ENABLE_SHIFT 31 - -/* PCIE_CFG :: VC_RESOURCE_CONTROL :: RESERVED_0 [30:27] */ -#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_0_MASK 0x78000000 -#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_0_ALIGN 0 -#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_0_BITS 4 -#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_0_SHIFT 27 - -/* PCIE_CFG :: VC_RESOURCE_CONTROL :: VC_ID [26:24] */ -#define PCIE_CFG_VC_RESOURCE_CONTROL_VC_ID_MASK 0x07000000 -#define PCIE_CFG_VC_RESOURCE_CONTROL_VC_ID_ALIGN 0 -#define PCIE_CFG_VC_RESOURCE_CONTROL_VC_ID_BITS 3 -#define PCIE_CFG_VC_RESOURCE_CONTROL_VC_ID_SHIFT 24 - -/* PCIE_CFG :: VC_RESOURCE_CONTROL :: RESERVED_1 [23:20] */ -#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_1_MASK 0x00f00000 -#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_1_ALIGN 0 -#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_1_BITS 4 -#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_1_SHIFT 20 - -/* PCIE_CFG :: VC_RESOURCE_CONTROL :: PORT_ARBITRATION_SELECT [19:17] */ -#define PCIE_CFG_VC_RESOURCE_CONTROL_PORT_ARBITRATION_SELECT_MASK 0x000e0000 -#define PCIE_CFG_VC_RESOURCE_CONTROL_PORT_ARBITRATION_SELECT_ALIGN 0 -#define PCIE_CFG_VC_RESOURCE_CONTROL_PORT_ARBITRATION_SELECT_BITS 3 -#define PCIE_CFG_VC_RESOURCE_CONTROL_PORT_ARBITRATION_SELECT_SHIFT 17 - -/* PCIE_CFG :: VC_RESOURCE_CONTROL :: LOAD_PORT_ARBITRATION_TABLE [16:16] */ -#define PCIE_CFG_VC_RESOURCE_CONTROL_LOAD_PORT_ARBITRATION_TABLE_MASK 0x00010000 -#define PCIE_CFG_VC_RESOURCE_CONTROL_LOAD_PORT_ARBITRATION_TABLE_ALIGN 0 -#define PCIE_CFG_VC_RESOURCE_CONTROL_LOAD_PORT_ARBITRATION_TABLE_BITS 1 -#define PCIE_CFG_VC_RESOURCE_CONTROL_LOAD_PORT_ARBITRATION_TABLE_SHIFT 16 - -/* PCIE_CFG :: VC_RESOURCE_CONTROL :: RESERVED_2 [15:08] */ -#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_2_MASK 0x0000ff00 -#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_2_ALIGN 0 -#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_2_BITS 8 -#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_2_SHIFT 8 - -/* PCIE_CFG :: VC_RESOURCE_CONTROL :: TC_VC_MAP [07:00] */ -#define PCIE_CFG_VC_RESOURCE_CONTROL_TC_VC_MAP_MASK 0x000000ff -#define PCIE_CFG_VC_RESOURCE_CONTROL_TC_VC_MAP_ALIGN 0 -#define PCIE_CFG_VC_RESOURCE_CONTROL_TC_VC_MAP_BITS 8 -#define PCIE_CFG_VC_RESOURCE_CONTROL_TC_VC_MAP_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: VC_RESOURCE_STATUS - ***************************************************************************/ -/* PCIE_CFG :: VC_RESOURCE_STATUS :: RESERVED_0 [31:18] */ -#define PCIE_CFG_VC_RESOURCE_STATUS_RESERVED_0_MASK 0xfffc0000 -#define PCIE_CFG_VC_RESOURCE_STATUS_RESERVED_0_ALIGN 0 -#define PCIE_CFG_VC_RESOURCE_STATUS_RESERVED_0_BITS 14 -#define PCIE_CFG_VC_RESOURCE_STATUS_RESERVED_0_SHIFT 18 - -/* PCIE_CFG :: VC_RESOURCE_STATUS :: VC_NEGOTIATION_PENDING [17:17] */ -#define PCIE_CFG_VC_RESOURCE_STATUS_VC_NEGOTIATION_PENDING_MASK 0x00020000 -#define PCIE_CFG_VC_RESOURCE_STATUS_VC_NEGOTIATION_PENDING_ALIGN 0 -#define PCIE_CFG_VC_RESOURCE_STATUS_VC_NEGOTIATION_PENDING_BITS 1 -#define PCIE_CFG_VC_RESOURCE_STATUS_VC_NEGOTIATION_PENDING_SHIFT 17 - -/* PCIE_CFG :: VC_RESOURCE_STATUS :: PORT_ARBITRATION_TABLE_STATUS [16:16] */ -#define PCIE_CFG_VC_RESOURCE_STATUS_PORT_ARBITRATION_TABLE_STATUS_MASK 0x00010000 -#define PCIE_CFG_VC_RESOURCE_STATUS_PORT_ARBITRATION_TABLE_STATUS_ALIGN 0 -#define PCIE_CFG_VC_RESOURCE_STATUS_PORT_ARBITRATION_TABLE_STATUS_BITS 1 -#define PCIE_CFG_VC_RESOURCE_STATUS_PORT_ARBITRATION_TABLE_STATUS_SHIFT 16 - -/* PCIE_CFG :: VC_RESOURCE_STATUS :: RESERVED_1 [15:00] */ -#define PCIE_CFG_VC_RESOURCE_STATUS_RESERVED_1_MASK 0x0000ffff -#define PCIE_CFG_VC_RESOURCE_STATUS_RESERVED_1_ALIGN 0 -#define PCIE_CFG_VC_RESOURCE_STATUS_RESERVED_1_BITS 16 -#define PCIE_CFG_VC_RESOURCE_STATUS_RESERVED_1_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER - ***************************************************************************/ -/* PCIE_CFG :: DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER :: NEXT_CAPABILITY_OFFSET [31:20] */ -#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_MASK 0xfff00000 -#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_ALIGN 0 -#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_BITS 12 -#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_SHIFT 20 - -/* PCIE_CFG :: DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER :: CAPABILITY_VERSION [19:16] */ -#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_MASK 0x000f0000 -#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_ALIGN 0 -#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_BITS 4 -#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_SHIFT 16 - -/* PCIE_CFG :: DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER :: PCIE_EXTENDED_CAPABILITY_ID [15:00] */ -#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_MASK 0x0000ffff -#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_ALIGN 0 -#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_BITS 16 -#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: DEVICE_SERIAL_NO_LOWER_DW - ***************************************************************************/ -/* PCIE_CFG :: DEVICE_SERIAL_NO_LOWER_DW :: SERIAL_NO_LOWER [31:00] */ -#define PCIE_CFG_DEVICE_SERIAL_NO_LOWER_DW_SERIAL_NO_LOWER_MASK 0xffffffff -#define PCIE_CFG_DEVICE_SERIAL_NO_LOWER_DW_SERIAL_NO_LOWER_ALIGN 0 -#define PCIE_CFG_DEVICE_SERIAL_NO_LOWER_DW_SERIAL_NO_LOWER_BITS 32 -#define PCIE_CFG_DEVICE_SERIAL_NO_LOWER_DW_SERIAL_NO_LOWER_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: DEVICE_SERIAL_NO_UPPER_DW - ***************************************************************************/ -/* PCIE_CFG :: DEVICE_SERIAL_NO_UPPER_DW :: SERIAL_NO_UPPER [31:00] */ -#define PCIE_CFG_DEVICE_SERIAL_NO_UPPER_DW_SERIAL_NO_UPPER_MASK 0xffffffff -#define PCIE_CFG_DEVICE_SERIAL_NO_UPPER_DW_SERIAL_NO_UPPER_ALIGN 0 -#define PCIE_CFG_DEVICE_SERIAL_NO_UPPER_DW_SERIAL_NO_UPPER_BITS 32 -#define PCIE_CFG_DEVICE_SERIAL_NO_UPPER_DW_SERIAL_NO_UPPER_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER - ***************************************************************************/ -/* PCIE_CFG :: POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER :: NEXT_CAPABILITY_OFFSET [31:20] */ -#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_MASK 0xfff00000 -#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_ALIGN 0 -#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_BITS 12 -#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_SHIFT 20 - -/* PCIE_CFG :: POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER :: CAPABILITY_VERSION [19:16] */ -#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_MASK 0x000f0000 -#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_ALIGN 0 -#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_BITS 4 -#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_SHIFT 16 - -/* PCIE_CFG :: POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER :: PCIE_EXTENDED_CAPABILITY_ID [15:00] */ -#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_MASK 0x0000ffff -#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_ALIGN 0 -#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_BITS 16 -#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: POWER_BUDGETING_DATA_SELECT - ***************************************************************************/ -/* PCIE_CFG :: POWER_BUDGETING_DATA_SELECT :: RESERVED_0 [31:08] */ -#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT_RESERVED_0_MASK 0xffffff00 -#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT_RESERVED_0_ALIGN 0 -#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT_RESERVED_0_BITS 24 -#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT_RESERVED_0_SHIFT 8 - -/* PCIE_CFG :: POWER_BUDGETING_DATA_SELECT :: DATA_SELECT [07:00] */ -#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT_DATA_SELECT_MASK 0x000000ff -#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT_DATA_SELECT_ALIGN 0 -#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT_DATA_SELECT_BITS 8 -#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT_DATA_SELECT_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: POWER_BUDGETING_DATA - ***************************************************************************/ -/* PCIE_CFG :: POWER_BUDGETING_DATA :: RESERVED_0 [31:21] */ -#define PCIE_CFG_POWER_BUDGETING_DATA_RESERVED_0_MASK 0xffe00000 -#define PCIE_CFG_POWER_BUDGETING_DATA_RESERVED_0_ALIGN 0 -#define PCIE_CFG_POWER_BUDGETING_DATA_RESERVED_0_BITS 11 -#define PCIE_CFG_POWER_BUDGETING_DATA_RESERVED_0_SHIFT 21 - -/* PCIE_CFG :: POWER_BUDGETING_DATA :: POWER_RAIL [20:18] */ -#define PCIE_CFG_POWER_BUDGETING_DATA_POWER_RAIL_MASK 0x001c0000 -#define PCIE_CFG_POWER_BUDGETING_DATA_POWER_RAIL_ALIGN 0 -#define PCIE_CFG_POWER_BUDGETING_DATA_POWER_RAIL_BITS 3 -#define PCIE_CFG_POWER_BUDGETING_DATA_POWER_RAIL_SHIFT 18 - -/* PCIE_CFG :: POWER_BUDGETING_DATA :: TYPE [17:15] */ -#define PCIE_CFG_POWER_BUDGETING_DATA_TYPE_MASK 0x00038000 -#define PCIE_CFG_POWER_BUDGETING_DATA_TYPE_ALIGN 0 -#define PCIE_CFG_POWER_BUDGETING_DATA_TYPE_BITS 3 -#define PCIE_CFG_POWER_BUDGETING_DATA_TYPE_SHIFT 15 - -/* PCIE_CFG :: POWER_BUDGETING_DATA :: PM_STATE [14:13] */ -#define PCIE_CFG_POWER_BUDGETING_DATA_PM_STATE_MASK 0x00006000 -#define PCIE_CFG_POWER_BUDGETING_DATA_PM_STATE_ALIGN 0 -#define PCIE_CFG_POWER_BUDGETING_DATA_PM_STATE_BITS 2 -#define PCIE_CFG_POWER_BUDGETING_DATA_PM_STATE_SHIFT 13 - -/* PCIE_CFG :: POWER_BUDGETING_DATA :: PM_SUB_STATE [12:10] */ -#define PCIE_CFG_POWER_BUDGETING_DATA_PM_SUB_STATE_MASK 0x00001c00 -#define PCIE_CFG_POWER_BUDGETING_DATA_PM_SUB_STATE_ALIGN 0 -#define PCIE_CFG_POWER_BUDGETING_DATA_PM_SUB_STATE_BITS 3 -#define PCIE_CFG_POWER_BUDGETING_DATA_PM_SUB_STATE_SHIFT 10 - -/* PCIE_CFG :: POWER_BUDGETING_DATA :: DATA_SCALE [09:08] */ -#define PCIE_CFG_POWER_BUDGETING_DATA_DATA_SCALE_MASK 0x00000300 -#define PCIE_CFG_POWER_BUDGETING_DATA_DATA_SCALE_ALIGN 0 -#define PCIE_CFG_POWER_BUDGETING_DATA_DATA_SCALE_BITS 2 -#define PCIE_CFG_POWER_BUDGETING_DATA_DATA_SCALE_SHIFT 8 - -/* PCIE_CFG :: POWER_BUDGETING_DATA :: BASE_POWER [07:00] */ -#define PCIE_CFG_POWER_BUDGETING_DATA_BASE_POWER_MASK 0x000000ff -#define PCIE_CFG_POWER_BUDGETING_DATA_BASE_POWER_ALIGN 0 -#define PCIE_CFG_POWER_BUDGETING_DATA_BASE_POWER_BITS 8 -#define PCIE_CFG_POWER_BUDGETING_DATA_BASE_POWER_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: POWER_BUDGETING_CAPABILITY - ***************************************************************************/ -/* PCIE_CFG :: POWER_BUDGETING_CAPABILITY :: RESERVED_0 [31:01] */ -#define PCIE_CFG_POWER_BUDGETING_CAPABILITY_RESERVED_0_MASK 0xfffffffe -#define PCIE_CFG_POWER_BUDGETING_CAPABILITY_RESERVED_0_ALIGN 0 -#define PCIE_CFG_POWER_BUDGETING_CAPABILITY_RESERVED_0_BITS 31 -#define PCIE_CFG_POWER_BUDGETING_CAPABILITY_RESERVED_0_SHIFT 1 - -/* PCIE_CFG :: POWER_BUDGETING_CAPABILITY :: LOM_CONFIGURATION [00:00] */ -#define PCIE_CFG_POWER_BUDGETING_CAPABILITY_LOM_CONFIGURATION_MASK 0x00000001 -#define PCIE_CFG_POWER_BUDGETING_CAPABILITY_LOM_CONFIGURATION_ALIGN 0 -#define PCIE_CFG_POWER_BUDGETING_CAPABILITY_LOM_CONFIGURATION_BITS 1 -#define PCIE_CFG_POWER_BUDGETING_CAPABILITY_LOM_CONFIGURATION_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 - ***************************************************************************/ -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 :: POWER_RAIL_2 [31:29] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_POWER_RAIL_2_MASK 0xe0000000 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_POWER_RAIL_2_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_POWER_RAIL_2_BITS 3 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_POWER_RAIL_2_SHIFT 29 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 :: TYPE_2 [28:26] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_TYPE_2_MASK 0x1c000000 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_TYPE_2_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_TYPE_2_BITS 3 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_TYPE_2_SHIFT 26 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 :: PM_STATE_2 [25:24] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_PM_STATE_2_MASK 0x03000000 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_PM_STATE_2_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_PM_STATE_2_BITS 2 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_PM_STATE_2_SHIFT 24 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 :: BASE_POWER_2 [23:16] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_BASE_POWER_2_MASK 0x00ff0000 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_BASE_POWER_2_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_BASE_POWER_2_BITS 8 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_BASE_POWER_2_SHIFT 16 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 :: POWER_RAIL_1 [15:13] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_POWER_RAIL_1_MASK 0x0000e000 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_POWER_RAIL_1_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_POWER_RAIL_1_BITS 3 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_POWER_RAIL_1_SHIFT 13 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 :: TYPE_1 [12:10] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_TYPE_1_MASK 0x00001c00 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_TYPE_1_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_TYPE_1_BITS 3 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_TYPE_1_SHIFT 10 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 :: PM_STATE_1 [09:08] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_PM_STATE_1_MASK 0x00000300 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_PM_STATE_1_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_PM_STATE_1_BITS 2 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_PM_STATE_1_SHIFT 8 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 :: BASE_POWER_1 [07:00] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_BASE_POWER_1_MASK 0x000000ff -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_BASE_POWER_1_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_BASE_POWER_1_BITS 8 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_BASE_POWER_1_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 - ***************************************************************************/ -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 :: POWER_RAIL_4 [31:29] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_POWER_RAIL_4_MASK 0xe0000000 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_POWER_RAIL_4_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_POWER_RAIL_4_BITS 3 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_POWER_RAIL_4_SHIFT 29 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 :: TYPE_4 [28:26] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_TYPE_4_MASK 0x1c000000 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_TYPE_4_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_TYPE_4_BITS 3 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_TYPE_4_SHIFT 26 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 :: PM_STATE_4 [25:24] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_PM_STATE_4_MASK 0x03000000 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_PM_STATE_4_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_PM_STATE_4_BITS 2 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_PM_STATE_4_SHIFT 24 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 :: BASE_POWER_4 [23:16] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_BASE_POWER_4_MASK 0x00ff0000 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_BASE_POWER_4_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_BASE_POWER_4_BITS 8 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_BASE_POWER_4_SHIFT 16 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 :: POWER_RAIL_3 [15:13] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_POWER_RAIL_3_MASK 0x0000e000 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_POWER_RAIL_3_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_POWER_RAIL_3_BITS 3 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_POWER_RAIL_3_SHIFT 13 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 :: TYPE_3 [12:10] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_TYPE_3_MASK 0x00001c00 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_TYPE_3_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_TYPE_3_BITS 3 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_TYPE_3_SHIFT 10 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 :: PM_STATE_3 [09:08] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_PM_STATE_3_MASK 0x00000300 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_PM_STATE_3_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_PM_STATE_3_BITS 2 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_PM_STATE_3_SHIFT 8 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 :: BASE_POWER_3 [07:00] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_BASE_POWER_3_MASK 0x000000ff -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_BASE_POWER_3_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_BASE_POWER_3_BITS 8 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_BASE_POWER_3_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 - ***************************************************************************/ -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 :: POWER_RAIL_6 [31:29] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_POWER_RAIL_6_MASK 0xe0000000 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_POWER_RAIL_6_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_POWER_RAIL_6_BITS 3 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_POWER_RAIL_6_SHIFT 29 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 :: TYPE_6 [28:26] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_TYPE_6_MASK 0x1c000000 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_TYPE_6_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_TYPE_6_BITS 3 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_TYPE_6_SHIFT 26 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 :: PM_STATE_6 [25:24] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_PM_STATE_6_MASK 0x03000000 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_PM_STATE_6_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_PM_STATE_6_BITS 2 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_PM_STATE_6_SHIFT 24 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 :: BASE_POWER_6 [23:16] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_BASE_POWER_6_MASK 0x00ff0000 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_BASE_POWER_6_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_BASE_POWER_6_BITS 8 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_BASE_POWER_6_SHIFT 16 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 :: POWER_RAIL_5 [15:13] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_POWER_RAIL_5_MASK 0x0000e000 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_POWER_RAIL_5_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_POWER_RAIL_5_BITS 3 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_POWER_RAIL_5_SHIFT 13 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 :: TYPE_5 [12:10] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_TYPE_5_MASK 0x00001c00 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_TYPE_5_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_TYPE_5_BITS 3 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_TYPE_5_SHIFT 10 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 :: PM_STATE_5 [09:08] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_PM_STATE_5_MASK 0x00000300 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_PM_STATE_5_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_PM_STATE_5_BITS 2 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_PM_STATE_5_SHIFT 8 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 :: BASE_POWER_5 [07:00] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_BASE_POWER_5_MASK 0x000000ff -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_BASE_POWER_5_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_BASE_POWER_5_BITS 8 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_BASE_POWER_5_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 - ***************************************************************************/ -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 :: POWER_RAIL_8 [31:29] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_POWER_RAIL_8_MASK 0xe0000000 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_POWER_RAIL_8_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_POWER_RAIL_8_BITS 3 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_POWER_RAIL_8_SHIFT 29 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 :: TYPE_8 [28:26] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_TYPE_8_MASK 0x1c000000 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_TYPE_8_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_TYPE_8_BITS 3 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_TYPE_8_SHIFT 26 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 :: PM_STATE_8 [25:24] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_PM_STATE_8_MASK 0x03000000 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_PM_STATE_8_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_PM_STATE_8_BITS 2 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_PM_STATE_8_SHIFT 24 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 :: BASE_POWER_8 [23:16] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_BASE_POWER_8_MASK 0x00ff0000 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_BASE_POWER_8_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_BASE_POWER_8_BITS 8 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_BASE_POWER_8_SHIFT 16 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 :: POWER_RAIL_7 [15:13] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_POWER_RAIL_7_MASK 0x0000e000 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_POWER_RAIL_7_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_POWER_RAIL_7_BITS 3 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_POWER_RAIL_7_SHIFT 13 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 :: TYPE_7 [12:10] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_TYPE_7_MASK 0x00001c00 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_TYPE_7_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_TYPE_7_BITS 3 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_TYPE_7_SHIFT 10 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 :: PM_STATE_7 [09:08] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_PM_STATE_7_MASK 0x00000300 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_PM_STATE_7_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_PM_STATE_7_BITS 2 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_PM_STATE_7_SHIFT 8 - -/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 :: BASE_POWER_7 [07:00] */ -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_BASE_POWER_7_MASK 0x000000ff -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_BASE_POWER_7_ALIGN 0 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_BASE_POWER_7_BITS 8 -#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_BASE_POWER_7_SHIFT 0 - - -/**************************************************************************** - * PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING - ***************************************************************************/ -/* PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING :: UNUSED_0 [31:07] */ -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_UNUSED_0_MASK 0xffffff80 -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_UNUSED_0_ALIGN 0 -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_UNUSED_0_BITS 25 -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_UNUSED_0_SHIFT 7 - -/* PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING :: D3HOT_MEMORY_READ_ADVISORY_NON_FATAL [06:06] */ -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_D3HOT_MEMORY_READ_ADVISORY_NON_FATAL_MASK 0x00000040 -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_D3HOT_MEMORY_READ_ADVISORY_NON_FATAL_ALIGN 0 -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_D3HOT_MEMORY_READ_ADVISORY_NON_FATAL_BITS 1 -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_D3HOT_MEMORY_READ_ADVISORY_NON_FATAL_SHIFT 6 - -/* PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING :: RETRY_POISON_ENABLE [05:05] */ -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_RETRY_POISON_ENABLE_MASK 0x00000020 -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_RETRY_POISON_ENABLE_ALIGN 0 -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_RETRY_POISON_ENABLE_BITS 1 -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_RETRY_POISON_ENABLE_SHIFT 5 - -/* PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING :: POISON_ADVISORY_NON_FATAL_ENABLE [04:04] */ -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_POISON_ADVISORY_NON_FATAL_ENABLE_MASK 0x00000010 -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_POISON_ADVISORY_NON_FATAL_ENABLE_ALIGN 0 -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_POISON_ADVISORY_NON_FATAL_ENABLE_BITS 1 -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_POISON_ADVISORY_NON_FATAL_ENABLE_SHIFT 4 - -/* PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING :: UNEXPECTED_ADVISORY_NON_FATAL_ENABLE [03:03] */ -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_UNEXPECTED_ADVISORY_NON_FATAL_ENABLE_MASK 0x00000008 -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_UNEXPECTED_ADVISORY_NON_FATAL_ENABLE_ALIGN 0 -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_UNEXPECTED_ADVISORY_NON_FATAL_ENABLE_BITS 1 -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_UNEXPECTED_ADVISORY_NON_FATAL_ENABLE_SHIFT 3 - -/* PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING :: NON_POSTED_CFG_ADVISORY_NON_FATAL_ENABLE [02:02] */ -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_NON_POSTED_CFG_ADVISORY_NON_FATAL_ENABLE_MASK 0x00000004 -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_NON_POSTED_CFG_ADVISORY_NON_FATAL_ENABLE_ALIGN 0 -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_NON_POSTED_CFG_ADVISORY_NON_FATAL_ENABLE_BITS 1 -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_NON_POSTED_CFG_ADVISORY_NON_FATAL_ENABLE_SHIFT 2 - -/* PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING :: NP_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE [01:01] */ -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_NP_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE_MASK 0x00000002 -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_NP_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE_ALIGN 0 -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_NP_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE_BITS 1 -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_NP_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE_SHIFT 1 - -/* PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING :: COMPLETION_ABORT_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE [00:00] */ -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_COMPLETION_ABORT_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE_MASK 0x00000001 -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_COMPLETION_ABORT_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE_ALIGN 0 -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_COMPLETION_ABORT_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE_BITS 1 -#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_COMPLETION_ABORT_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE_SHIFT 0 - - -/**************************************************************************** - * BCM70012_TGT_TOP_PCIE_TL - ***************************************************************************/ -/**************************************************************************** - * PCIE_TL :: TL_CONTROL - ***************************************************************************/ -/* PCIE_TL :: TL_CONTROL :: RESERVED_0 [31:31] */ -#define PCIE_TL_TL_CONTROL_RESERVED_0_MASK 0x80000000 -#define PCIE_TL_TL_CONTROL_RESERVED_0_ALIGN 0 -#define PCIE_TL_TL_CONTROL_RESERVED_0_BITS 1 -#define PCIE_TL_TL_CONTROL_RESERVED_0_SHIFT 31 - -/* PCIE_TL :: TL_CONTROL :: CQ14298_FIX_ENA_N [30:30] */ -#define PCIE_TL_TL_CONTROL_CQ14298_FIX_ENA_N_MASK 0x40000000 -#define PCIE_TL_TL_CONTROL_CQ14298_FIX_ENA_N_ALIGN 0 -#define PCIE_TL_TL_CONTROL_CQ14298_FIX_ENA_N_BITS 1 -#define PCIE_TL_TL_CONTROL_CQ14298_FIX_ENA_N_SHIFT 30 - -/* PCIE_TL :: TL_CONTROL :: RESERVED_1 [29:29] */ -#define PCIE_TL_TL_CONTROL_RESERVED_1_MASK 0x20000000 -#define PCIE_TL_TL_CONTROL_RESERVED_1_ALIGN 0 -#define PCIE_TL_TL_CONTROL_RESERVED_1_BITS 1 -#define PCIE_TL_TL_CONTROL_RESERVED_1_SHIFT 29 - -/* PCIE_TL :: TL_CONTROL :: INTA_WAKEUP_LINK_CLKREQ_DA [28:28] */ -#define PCIE_TL_TL_CONTROL_INTA_WAKEUP_LINK_CLKREQ_DA_MASK 0x10000000 -#define PCIE_TL_TL_CONTROL_INTA_WAKEUP_LINK_CLKREQ_DA_ALIGN 0 -#define PCIE_TL_TL_CONTROL_INTA_WAKEUP_LINK_CLKREQ_DA_BITS 1 -#define PCIE_TL_TL_CONTROL_INTA_WAKEUP_LINK_CLKREQ_DA_SHIFT 28 - -/* PCIE_TL :: TL_CONTROL :: RESERVED_2 [27:27] */ -#define PCIE_TL_TL_CONTROL_RESERVED_2_MASK 0x08000000 -#define PCIE_TL_TL_CONTROL_RESERVED_2_ALIGN 0 -#define PCIE_TL_TL_CONTROL_RESERVED_2_BITS 1 -#define PCIE_TL_TL_CONTROL_RESERVED_2_SHIFT 27 - -/* PCIE_TL :: TL_CONTROL :: CQ9583_TYPE_1_VENDOR_DEFINED_MESSAGE_FIX [26:26] */ -#define PCIE_TL_TL_CONTROL_CQ9583_TYPE_1_VENDOR_DEFINED_MESSAGE_FIX_MASK 0x04000000 -#define PCIE_TL_TL_CONTROL_CQ9583_TYPE_1_VENDOR_DEFINED_MESSAGE_FIX_ALIGN 0 -#define PCIE_TL_TL_CONTROL_CQ9583_TYPE_1_VENDOR_DEFINED_MESSAGE_FIX_BITS 1 -#define PCIE_TL_TL_CONTROL_CQ9583_TYPE_1_VENDOR_DEFINED_MESSAGE_FIX_SHIFT 26 - -/* PCIE_TL :: TL_CONTROL :: RESERVED_3 [25:25] */ -#define PCIE_TL_TL_CONTROL_RESERVED_3_MASK 0x02000000 -#define PCIE_TL_TL_CONTROL_RESERVED_3_ALIGN 0 -#define PCIE_TL_TL_CONTROL_RESERVED_3_BITS 1 -#define PCIE_TL_TL_CONTROL_RESERVED_3_SHIFT 25 - -/* PCIE_TL :: TL_CONTROL :: RESERVED_4 [24:24] */ -#define PCIE_TL_TL_CONTROL_RESERVED_4_MASK 0x01000000 -#define PCIE_TL_TL_CONTROL_RESERVED_4_ALIGN 0 -#define PCIE_TL_TL_CONTROL_RESERVED_4_BITS 1 -#define PCIE_TL_TL_CONTROL_RESERVED_4_SHIFT 24 - -/* PCIE_TL :: TL_CONTROL :: RESERVED_5 [23:23] */ -#define PCIE_TL_TL_CONTROL_RESERVED_5_MASK 0x00800000 -#define PCIE_TL_TL_CONTROL_RESERVED_5_ALIGN 0 -#define PCIE_TL_TL_CONTROL_RESERVED_5_BITS 1 -#define PCIE_TL_TL_CONTROL_RESERVED_5_SHIFT 23 - -/* PCIE_TL :: TL_CONTROL :: CRC_SWAP [22:22] */ -#define PCIE_TL_TL_CONTROL_CRC_SWAP_MASK 0x00400000 -#define PCIE_TL_TL_CONTROL_CRC_SWAP_ALIGN 0 -#define PCIE_TL_TL_CONTROL_CRC_SWAP_BITS 1 -#define PCIE_TL_TL_CONTROL_CRC_SWAP_SHIFT 22 - -/* PCIE_TL :: TL_CONTROL :: SLV_CMP_DIS_CA_ERROR [21:21] */ -#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_CA_ERROR_MASK 0x00200000 -#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_CA_ERROR_ALIGN 0 -#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_CA_ERROR_BITS 1 -#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_CA_ERROR_SHIFT 21 - -/* PCIE_TL :: TL_CONTROL :: SLV_CMP_DIS_UR_ERROR [20:20] */ -#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_UR_ERROR_MASK 0x00100000 -#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_UR_ERROR_ALIGN 0 -#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_UR_ERROR_BITS 1 -#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_UR_ERROR_SHIFT 20 - -/* PCIE_TL :: TL_CONTROL :: SLV_CMP_DIS_RSV_ERROR [19:19] */ -#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_RSV_ERROR_MASK 0x00080000 -#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_RSV_ERROR_ALIGN 0 -#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_RSV_ERROR_BITS 1 -#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_RSV_ERROR_SHIFT 19 - -/* PCIE_TL :: TL_CONTROL :: RESERVED_6 [18:18] */ -#define PCIE_TL_TL_CONTROL_RESERVED_6_MASK 0x00040000 -#define PCIE_TL_TL_CONTROL_RESERVED_6_ALIGN 0 -#define PCIE_TL_TL_CONTROL_RESERVED_6_BITS 1 -#define PCIE_TL_TL_CONTROL_RESERVED_6_SHIFT 18 - -/* PCIE_TL :: TL_CONTROL :: SLV_CMP_DIS_EP_ERROR [17:17] */ -#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_EP_ERROR_MASK 0x00020000 -#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_EP_ERROR_ALIGN 0 -#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_EP_ERROR_BITS 1 -#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_EP_ERROR_SHIFT 17 - -/* PCIE_TL :: TL_CONTROL :: ENABLE_BYTECOUNT_CHECK [16:16] */ -#define PCIE_TL_TL_CONTROL_ENABLE_BYTECOUNT_CHECK_MASK 0x00010000 -#define PCIE_TL_TL_CONTROL_ENABLE_BYTECOUNT_CHECK_ALIGN 0 -#define PCIE_TL_TL_CONTROL_ENABLE_BYTECOUNT_CHECK_BITS 1 -#define PCIE_TL_TL_CONTROL_ENABLE_BYTECOUNT_CHECK_SHIFT 16 - -/* PCIE_TL :: TL_CONTROL :: NOT_USED [15:14] */ -#define PCIE_TL_TL_CONTROL_NOT_USED_MASK 0x0000c000 -#define PCIE_TL_TL_CONTROL_NOT_USED_ALIGN 0 -#define PCIE_TL_TL_CONTROL_NOT_USED_BITS 2 -#define PCIE_TL_TL_CONTROL_NOT_USED_SHIFT 14 - -/* PCIE_TL :: TL_CONTROL :: TRAFFIC_CLASS_DR [13:11] */ -#define PCIE_TL_TL_CONTROL_TRAFFIC_CLASS_DR_MASK 0x00003800 -#define PCIE_TL_TL_CONTROL_TRAFFIC_CLASS_DR_ALIGN 0 -#define PCIE_TL_TL_CONTROL_TRAFFIC_CLASS_DR_BITS 3 -#define PCIE_TL_TL_CONTROL_TRAFFIC_CLASS_DR_SHIFT 11 - -/* PCIE_TL :: TL_CONTROL :: TRAFFIC_CLASS_DW [10:08] */ -#define PCIE_TL_TL_CONTROL_TRAFFIC_CLASS_DW_MASK 0x00000700 -#define PCIE_TL_TL_CONTROL_TRAFFIC_CLASS_DW_ALIGN 0 -#define PCIE_TL_TL_CONTROL_TRAFFIC_CLASS_DW_BITS 3 -#define PCIE_TL_TL_CONTROL_TRAFFIC_CLASS_DW_SHIFT 8 - -/* PCIE_TL :: TL_CONTROL :: NOT_USED_0 [07:06] */ -#define PCIE_TL_TL_CONTROL_NOT_USED_0_MASK 0x000000c0 -#define PCIE_TL_TL_CONTROL_NOT_USED_0_ALIGN 0 -#define PCIE_TL_TL_CONTROL_NOT_USED_0_BITS 2 -#define PCIE_TL_TL_CONTROL_NOT_USED_0_SHIFT 6 - -/* PCIE_TL :: TL_CONTROL :: NOT_USED_1 [05:00] */ -#define PCIE_TL_TL_CONTROL_NOT_USED_1_MASK 0x0000003f -#define PCIE_TL_TL_CONTROL_NOT_USED_1_ALIGN 0 -#define PCIE_TL_TL_CONTROL_NOT_USED_1_BITS 6 -#define PCIE_TL_TL_CONTROL_NOT_USED_1_SHIFT 0 - - -/**************************************************************************** - * PCIE_TL :: TRANSACTION_CONFIGURATION - ***************************************************************************/ -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_RETRY_BUFFER_TIMING_MOD [31:31] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_RETRY_BUFFER_TIMING_MOD_MASK 0x80000000 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_RETRY_BUFFER_TIMING_MOD_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_RETRY_BUFFER_TIMING_MOD_BITS 1 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_RETRY_BUFFER_TIMING_MOD_SHIFT 31 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: RESERVED_0 [30:30] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_0_MASK 0x40000000 -#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_0_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_0_BITS 1 -#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_0_SHIFT 30 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: MSI_SINGLE_SHOT_ENABLE [29:29] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_MSI_SINGLE_SHOT_ENABLE_MASK 0x20000000 -#define PCIE_TL_TRANSACTION_CONFIGURATION_MSI_SINGLE_SHOT_ENABLE_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_MSI_SINGLE_SHOT_ENABLE_BITS 1 -#define PCIE_TL_TRANSACTION_CONFIGURATION_MSI_SINGLE_SHOT_ENABLE_SHIFT 29 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: RESERVED_1 [28:28] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_1_MASK 0x10000000 -#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_1_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_1_BITS 1 -#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_1_SHIFT 28 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: SELECT_CORE_CLOCK_OVERRIDE [27:27] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_SELECT_CORE_CLOCK_OVERRIDE_MASK 0x08000000 -#define PCIE_TL_TRANSACTION_CONFIGURATION_SELECT_CORE_CLOCK_OVERRIDE_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_SELECT_CORE_CLOCK_OVERRIDE_BITS 1 -#define PCIE_TL_TRANSACTION_CONFIGURATION_SELECT_CORE_CLOCK_OVERRIDE_SHIFT 27 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: CQ9139_FIX_ENABLE [26:26] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_CQ9139_FIX_ENABLE_MASK 0x04000000 -#define PCIE_TL_TRANSACTION_CONFIGURATION_CQ9139_FIX_ENABLE_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_CQ9139_FIX_ENABLE_BITS 1 -#define PCIE_TL_TRANSACTION_CONFIGURATION_CQ9139_FIX_ENABLE_SHIFT 26 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_CMPT_PWR_CHECK [25:25] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CMPT_PWR_CHECK_MASK 0x02000000 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CMPT_PWR_CHECK_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CMPT_PWR_CHECK_BITS 1 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CMPT_PWR_CHECK_SHIFT 25 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_CQ12696_FIX [24:24] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CQ12696_FIX_MASK 0x01000000 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CQ12696_FIX_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CQ12696_FIX_BITS 1 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CQ12696_FIX_SHIFT 24 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: DEVICE_SERIAL_NO_OVERRIDE [23:23] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_DEVICE_SERIAL_NO_OVERRIDE_MASK 0x00800000 -#define PCIE_TL_TRANSACTION_CONFIGURATION_DEVICE_SERIAL_NO_OVERRIDE_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_DEVICE_SERIAL_NO_OVERRIDE_BITS 1 -#define PCIE_TL_TRANSACTION_CONFIGURATION_DEVICE_SERIAL_NO_OVERRIDE_SHIFT 23 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_CQ12455_FIX [22:22] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CQ12455_FIX_MASK 0x00400000 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CQ12455_FIX_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CQ12455_FIX_BITS 1 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CQ12455_FIX_SHIFT 22 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_TC_VC_FILTERING_CHECK [21:21] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_TC_VC_FILTERING_CHECK_MASK 0x00200000 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_TC_VC_FILTERING_CHECK_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_TC_VC_FILTERING_CHECK_BITS 1 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_TC_VC_FILTERING_CHECK_SHIFT 21 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: DONT_GEN_HOT_PLUG_MSG [20:20] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_DONT_GEN_HOT_PLUG_MSG_MASK 0x00100000 -#define PCIE_TL_TRANSACTION_CONFIGURATION_DONT_GEN_HOT_PLUG_MSG_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_DONT_GEN_HOT_PLUG_MSG_BITS 1 -#define PCIE_TL_TRANSACTION_CONFIGURATION_DONT_GEN_HOT_PLUG_MSG_SHIFT 20 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: IGNORE_HOTPLUG_MSG [19:19] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_IGNORE_HOTPLUG_MSG_MASK 0x00080000 -#define PCIE_TL_TRANSACTION_CONFIGURATION_IGNORE_HOTPLUG_MSG_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_IGNORE_HOTPLUG_MSG_BITS 1 -#define PCIE_TL_TRANSACTION_CONFIGURATION_IGNORE_HOTPLUG_MSG_SHIFT 19 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: MSI_MULTMSG_CAPABLE [18:16] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_MSI_MULTMSG_CAPABLE_MASK 0x00070000 -#define PCIE_TL_TRANSACTION_CONFIGURATION_MSI_MULTMSG_CAPABLE_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_MSI_MULTMSG_CAPABLE_BITS 3 -#define PCIE_TL_TRANSACTION_CONFIGURATION_MSI_MULTMSG_CAPABLE_SHIFT 16 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: DATA_SELECT_LIMIT [15:12] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_DATA_SELECT_LIMIT_MASK 0x0000f000 -#define PCIE_TL_TRANSACTION_CONFIGURATION_DATA_SELECT_LIMIT_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_DATA_SELECT_LIMIT_BITS 4 -#define PCIE_TL_TRANSACTION_CONFIGURATION_DATA_SELECT_LIMIT_SHIFT 12 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_PCIE_1_1_PL [11:11] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_PL_MASK 0x00000800 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_PL_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_PL_BITS 1 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_PL_SHIFT 11 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_PCIE_1_1_DL [10:10] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_DL_MASK 0x00000400 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_DL_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_DL_BITS 1 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_DL_SHIFT 10 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_PCIE_1_1_TL [09:09] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_TL_MASK 0x00000200 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_TL_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_TL_BITS 1 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_TL_SHIFT 9 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: RESERVED_2 [08:07] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_2_MASK 0x00000180 -#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_2_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_2_BITS 2 -#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_2_SHIFT 7 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: PCIE_POWER_BUDGET_CAP_ENABLE [06:06] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_PCIE_POWER_BUDGET_CAP_ENABLE_MASK 0x00000040 -#define PCIE_TL_TRANSACTION_CONFIGURATION_PCIE_POWER_BUDGET_CAP_ENABLE_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_PCIE_POWER_BUDGET_CAP_ENABLE_BITS 1 -#define PCIE_TL_TRANSACTION_CONFIGURATION_PCIE_POWER_BUDGET_CAP_ENABLE_SHIFT 6 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: LOM_CONFIGURATION [05:05] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_LOM_CONFIGURATION_MASK 0x00000020 -#define PCIE_TL_TRANSACTION_CONFIGURATION_LOM_CONFIGURATION_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_LOM_CONFIGURATION_BITS 1 -#define PCIE_TL_TRANSACTION_CONFIGURATION_LOM_CONFIGURATION_SHIFT 5 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: CONCATE_SELECT [04:04] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_CONCATE_SELECT_MASK 0x00000010 -#define PCIE_TL_TRANSACTION_CONFIGURATION_CONCATE_SELECT_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_CONCATE_SELECT_BITS 1 -#define PCIE_TL_TRANSACTION_CONFIGURATION_CONCATE_SELECT_SHIFT 4 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: RESERVED_3 [03:03] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_3_MASK 0x00000008 -#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_3_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_3_BITS 1 -#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_3_SHIFT 3 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_9468_FIX [02:02] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_9468_FIX_MASK 0x00000004 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_9468_FIX_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_9468_FIX_BITS 1 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_9468_FIX_SHIFT 2 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: POWER_STATE_WRITE_MEM_ENABLE [01:01] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_POWER_STATE_WRITE_MEM_ENABLE_MASK 0x00000002 -#define PCIE_TL_TRANSACTION_CONFIGURATION_POWER_STATE_WRITE_MEM_ENABLE_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_POWER_STATE_WRITE_MEM_ENABLE_BITS 1 -#define PCIE_TL_TRANSACTION_CONFIGURATION_POWER_STATE_WRITE_MEM_ENABLE_SHIFT 1 - -/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_9709_ENABLE [00:00] */ -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_9709_ENABLE_MASK 0x00000001 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_9709_ENABLE_ALIGN 0 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_9709_ENABLE_BITS 1 -#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_9709_ENABLE_SHIFT 0 - - -/**************************************************************************** - * PCIE_TL :: WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC - ***************************************************************************/ -/* PCIE_TL :: WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC :: RESERVED_0 [31:00] */ -#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_RESERVED_0_MASK 0xffffffff -#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_RESERVED_0_ALIGN 0 -#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_RESERVED_0_BITS 32 -#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_RESERVED_0_SHIFT 0 - - -/**************************************************************************** - * PCIE_TL :: WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2 - ***************************************************************************/ -/* PCIE_TL :: WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2 :: RESERVED_0 [31:00] */ -#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2_RESERVED_0_MASK 0xffffffff -#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2_RESERVED_0_ALIGN 0 -#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2_RESERVED_0_BITS 32 -#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2_RESERVED_0_SHIFT 0 - - -/**************************************************************************** - * PCIE_TL :: DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC - ***************************************************************************/ -/* PCIE_TL :: DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC :: REG_MADDR_UPR [31:00] */ -#define PCIE_TL_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_REG_MADDR_UPR_MASK 0xffffffff -#define PCIE_TL_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_REG_MADDR_UPR_ALIGN 0 -#define PCIE_TL_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_REG_MADDR_UPR_BITS 32 -#define PCIE_TL_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_REG_MADDR_UPR_SHIFT 0 - - -/**************************************************************************** - * PCIE_TL :: DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2 - ***************************************************************************/ -/* PCIE_TL :: DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2 :: REG_MADDR_LWR [31:00] */ -#define PCIE_TL_DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2_REG_MADDR_LWR_MASK 0xffffffff -#define PCIE_TL_DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2_REG_MADDR_LWR_ALIGN 0 -#define PCIE_TL_DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2_REG_MADDR_LWR_BITS 32 -#define PCIE_TL_DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2_REG_MADDR_LWR_SHIFT 0 - - -/**************************************************************************** - * PCIE_TL :: DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC - ***************************************************************************/ -/* PCIE_TL :: DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC :: REG_MLEN_BE [31:24] */ -#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_REG_MLEN_BE_MASK 0xff000000 -#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_REG_MLEN_BE_ALIGN 0 -#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_REG_MLEN_BE_BITS 8 -#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_REG_MLEN_BE_SHIFT 24 - -/* PCIE_TL :: DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC :: DMA_REQUEST_FIRST_DW_BYTE_ENABLES [23:20] */ -#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_FIRST_DW_BYTE_ENABLES_MASK 0x00f00000 -#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_FIRST_DW_BYTE_ENABLES_ALIGN 0 -#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_FIRST_DW_BYTE_ENABLES_BITS 4 -#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_FIRST_DW_BYTE_ENABLES_SHIFT 20 - -/* PCIE_TL :: DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC :: DMA_REQUEST_LAST_DW_BYTE_ENABLES [19:16] */ -#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_LAST_DW_BYTE_ENABLES_MASK 0x000f0000 -#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_LAST_DW_BYTE_ENABLES_ALIGN 0 -#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_LAST_DW_BYTE_ENABLES_BITS 4 -#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_LAST_DW_BYTE_ENABLES_SHIFT 16 - -/* PCIE_TL :: DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC :: RESERVED_0 [15:11] */ -#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_RESERVED_0_MASK 0x0000f800 -#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_RESERVED_0_ALIGN 0 -#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_RESERVED_0_BITS 5 -#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_RESERVED_0_SHIFT 11 - -/* PCIE_TL :: DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC :: DMA_REQUEST_DW_LENGTH [10:00] */ -#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_DW_LENGTH_MASK 0x000007ff -#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_DW_LENGTH_ALIGN 0 -#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_DW_LENGTH_BITS 11 -#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_DW_LENGTH_SHIFT 0 - - -/**************************************************************************** - * PCIE_TL :: DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC - ***************************************************************************/ -/* PCIE_TL :: DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC :: REG_MTAG_ATTR [31:19] */ -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_REG_MTAG_ATTR_MASK 0xfff80000 -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_REG_MTAG_ATTR_ALIGN 0 -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_REG_MTAG_ATTR_BITS 13 -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_REG_MTAG_ATTR_SHIFT 19 - -/* PCIE_TL :: DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC :: DMA_REQUEST_FUNCTION [18:16] */ -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_FUNCTION_MASK 0x00070000 -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_FUNCTION_ALIGN 0 -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_FUNCTION_BITS 3 -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_FUNCTION_SHIFT 16 - -/* PCIE_TL :: DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC :: RESERVED_0 [15:13] */ -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_RESERVED_0_MASK 0x0000e000 -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_RESERVED_0_ALIGN 0 -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_RESERVED_0_BITS 3 -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_RESERVED_0_SHIFT 13 - -/* PCIE_TL :: DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC :: DMA_REQUEST_ATTRIBUTES [12:08] */ -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_ATTRIBUTES_MASK 0x00001f00 -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_ATTRIBUTES_ALIGN 0 -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_ATTRIBUTES_BITS 5 -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_ATTRIBUTES_SHIFT 8 - -/* PCIE_TL :: DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC :: RESERVED_1 [07:05] */ -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_RESERVED_1_MASK 0x000000e0 -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_RESERVED_1_ALIGN 0 -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_RESERVED_1_BITS 3 -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_RESERVED_1_SHIFT 5 - -/* PCIE_TL :: DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC :: DMA_REQUEST_TAG [04:00] */ -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_TAG_MASK 0x0000001f -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_TAG_ALIGN 0 -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_TAG_BITS 5 -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_TAG_SHIFT 0 - - -/**************************************************************************** - * PCIE_TL :: READ_DMA_SPLIT_IDS_DIAGNOSTIC - ***************************************************************************/ -/* PCIE_TL :: READ_DMA_SPLIT_IDS_DIAGNOSTIC :: REG_SPLIT_ID [31:16] */ -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_REG_SPLIT_ID_MASK 0xffff0000 -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_REG_SPLIT_ID_ALIGN 0 -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_REG_SPLIT_ID_BITS 16 -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_REG_SPLIT_ID_SHIFT 16 - -/* PCIE_TL :: READ_DMA_SPLIT_IDS_DIAGNOSTIC :: RESERVED_0 [15:13] */ -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_RESERVED_0_MASK 0x0000e000 -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_RESERVED_0_ALIGN 0 -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_RESERVED_0_BITS 3 -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_RESERVED_0_SHIFT 13 - -/* PCIE_TL :: READ_DMA_SPLIT_IDS_DIAGNOSTIC :: READ_DMA_SPLIT_ATTRIBUTES [12:11] */ -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_ATTRIBUTES_MASK 0x00001800 -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_ATTRIBUTES_ALIGN 0 -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_ATTRIBUTES_BITS 2 -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_ATTRIBUTES_SHIFT 11 - -/* PCIE_TL :: READ_DMA_SPLIT_IDS_DIAGNOSTIC :: READ_DMA_SPLIT_TC [10:08] */ -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_TC_MASK 0x00000700 -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_TC_ALIGN 0 -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_TC_BITS 3 -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_TC_SHIFT 8 - -/* PCIE_TL :: READ_DMA_SPLIT_IDS_DIAGNOSTIC :: RESERVED_1 [07:05] */ -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_RESERVED_1_MASK 0x000000e0 -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_RESERVED_1_ALIGN 0 -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_RESERVED_1_BITS 3 -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_RESERVED_1_SHIFT 5 - -/* PCIE_TL :: READ_DMA_SPLIT_IDS_DIAGNOSTIC :: READ_DMA_SPLIT_TAG [04:00] */ -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_TAG_MASK 0x0000001f -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_TAG_ALIGN 0 -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_TAG_BITS 5 -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_TAG_SHIFT 0 - - -/**************************************************************************** - * PCIE_TL :: READ_DMA_SPLIT_LENGTH_DIAGNOSTIC - ***************************************************************************/ -/* PCIE_TL :: READ_DMA_SPLIT_LENGTH_DIAGNOSTIC :: REG_SPLIT_LEN [31:13] */ -#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC_REG_SPLIT_LEN_MASK 0xffffe000 -#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC_REG_SPLIT_LEN_ALIGN 0 -#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC_REG_SPLIT_LEN_BITS 19 -#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC_REG_SPLIT_LEN_SHIFT 13 - -/* PCIE_TL :: READ_DMA_SPLIT_LENGTH_DIAGNOSTIC :: READ_DMA_SPLIT_INITIAL_BYTE_COUNT [12:00] */ -#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC_READ_DMA_SPLIT_INITIAL_BYTE_COUNT_MASK 0x00001fff -#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC_READ_DMA_SPLIT_INITIAL_BYTE_COUNT_ALIGN 0 -#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC_READ_DMA_SPLIT_INITIAL_BYTE_COUNT_BITS 13 -#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC_READ_DMA_SPLIT_INITIAL_BYTE_COUNT_SHIFT 0 - - -/**************************************************************************** - * PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC - ***************************************************************************/ -/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: REG_SM_R0_R3 [31:31] */ -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_REG_SM_R0_R3_MASK 0x80000000 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_REG_SM_R0_R3_ALIGN 0 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_REG_SM_R0_R3_BITS 1 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_REG_SM_R0_R3_SHIFT 31 - -/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: TLP_TRANSMITTER_DATA_STATE_MACHINE [30:28] */ -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TLP_TRANSMITTER_DATA_STATE_MACHINE_MASK 0x70000000 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TLP_TRANSMITTER_DATA_STATE_MACHINE_ALIGN 0 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TLP_TRANSMITTER_DATA_STATE_MACHINE_BITS 3 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TLP_TRANSMITTER_DATA_STATE_MACHINE_SHIFT 28 - -/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: TLP_TRANSMITTER_ARBITRATION_STATE_MACHINE [27:23] */ -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TLP_TRANSMITTER_ARBITRATION_STATE_MACHINE_MASK 0x0f800000 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TLP_TRANSMITTER_ARBITRATION_STATE_MACHINE_ALIGN 0 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TLP_TRANSMITTER_ARBITRATION_STATE_MACHINE_BITS 5 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TLP_TRANSMITTER_ARBITRATION_STATE_MACHINE_SHIFT 23 - -/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: RESERVED_0 [22:07] */ -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_RESERVED_0_MASK 0x007fff80 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_RESERVED_0_ALIGN 0 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_RESERVED_0_BITS 16 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_RESERVED_0_SHIFT 7 - -/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: READ_DMA_RAW_REQUEST [06:06] */ -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_READ_DMA_RAW_REQUEST_MASK 0x00000040 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_READ_DMA_RAW_REQUEST_ALIGN 0 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_READ_DMA_RAW_REQUEST_BITS 1 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_READ_DMA_RAW_REQUEST_SHIFT 6 - -/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: WRITE_DMA_RAW_REQUEST [05:05] */ -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_WRITE_DMA_RAW_REQUEST_MASK 0x00000020 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_WRITE_DMA_RAW_REQUEST_ALIGN 0 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_WRITE_DMA_RAW_REQUEST_BITS 1 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_WRITE_DMA_RAW_REQUEST_SHIFT 5 - -/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: INTERRUPT_MSG_GATED_REQUEST [04:04] */ -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_INTERRUPT_MSG_GATED_REQUEST_MASK 0x00000010 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_INTERRUPT_MSG_GATED_REQUEST_ALIGN 0 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_INTERRUPT_MSG_GATED_REQUEST_BITS 1 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_INTERRUPT_MSG_GATED_REQUEST_SHIFT 4 - -/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: MSI_DMA_GATED_REQUEST [03:03] */ -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_MSI_DMA_GATED_REQUEST_MASK 0x00000008 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_MSI_DMA_GATED_REQUEST_ALIGN 0 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_MSI_DMA_GATED_REQUEST_BITS 1 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_MSI_DMA_GATED_REQUEST_SHIFT 3 - -/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: TARGET_COMPLETION_OR_MSG_GATED_REQUEST [02:02] */ -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TARGET_COMPLETION_OR_MSG_GATED_REQUEST_MASK 0x00000004 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TARGET_COMPLETION_OR_MSG_GATED_REQUEST_ALIGN 0 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TARGET_COMPLETION_OR_MSG_GATED_REQUEST_BITS 1 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TARGET_COMPLETION_OR_MSG_GATED_REQUEST_SHIFT 2 - -/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: READ_DMA_GATED_REQUEST [01:01] */ -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_READ_DMA_GATED_REQUEST_MASK 0x00000002 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_READ_DMA_GATED_REQUEST_ALIGN 0 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_READ_DMA_GATED_REQUEST_BITS 1 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_READ_DMA_GATED_REQUEST_SHIFT 1 - -/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: WRITE_DMA_GATED_REQUEST [00:00] */ -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_WRITE_DMA_GATED_REQUEST_MASK 0x00000001 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_WRITE_DMA_GATED_REQUEST_ALIGN 0 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_WRITE_DMA_GATED_REQUEST_BITS 1 -#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_WRITE_DMA_GATED_REQUEST_SHIFT 0 - - -/**************************************************************************** - * PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC - ***************************************************************************/ -/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: REG_DMA_CMPT_MISC2 [31:29] */ -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_REG_DMA_CMPT_MISC2_MASK 0xe0000000 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_REG_DMA_CMPT_MISC2_ALIGN 0 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_REG_DMA_CMPT_MISC2_BITS 3 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_REG_DMA_CMPT_MISC2_SHIFT 29 - -/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: SPLIT_BYTE_LENGTH_REMAINING [28:16] */ -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_BYTE_LENGTH_REMAINING_MASK 0x1fff0000 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_BYTE_LENGTH_REMAINING_ALIGN 0 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_BYTE_LENGTH_REMAINING_BITS 13 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_BYTE_LENGTH_REMAINING_SHIFT 16 - -/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: NOT_USED [15:15] */ -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_NOT_USED_MASK 0x00008000 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_NOT_USED_ALIGN 0 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_NOT_USED_BITS 1 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_NOT_USED_SHIFT 15 - -/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: LAST_COMPLETION_TLP_INDICATOR_SPLITCTL_GENERATED [14:14] */ -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_LAST_COMPLETION_TLP_INDICATOR_SPLITCTL_GENERATED_MASK 0x00004000 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_LAST_COMPLETION_TLP_INDICATOR_SPLITCTL_GENERATED_ALIGN 0 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_LAST_COMPLETION_TLP_INDICATOR_SPLITCTL_GENERATED_BITS 1 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_LAST_COMPLETION_TLP_INDICATOR_SPLITCTL_GENERATED_SHIFT 14 - -/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: LAST_COMPLETION_TLP_INDICATOR_DMA_CMPT_GENERATED [13:13] */ -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_LAST_COMPLETION_TLP_INDICATOR_DMA_CMPT_GENERATED_MASK 0x00002000 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_LAST_COMPLETION_TLP_INDICATOR_DMA_CMPT_GENERATED_ALIGN 0 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_LAST_COMPLETION_TLP_INDICATOR_DMA_CMPT_GENERATED_BITS 1 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_LAST_COMPLETION_TLP_INDICATOR_DMA_CMPT_GENERATED_SHIFT 13 - -/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: DW_LENGTH_REMAINING_IN_CURRENT_COMPLETION_TLP_IS_GREATER_THAN_1 [12:12] */ -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_DW_LENGTH_REMAINING_IN_CURRENT_COMPLETION_TLP_IS_GREATER_THAN_1_MASK 0x00001000 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_DW_LENGTH_REMAINING_IN_CURRENT_COMPLETION_TLP_IS_GREATER_THAN_1_ALIGN 0 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_DW_LENGTH_REMAINING_IN_CURRENT_COMPLETION_TLP_IS_GREATER_THAN_1_BITS 1 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_DW_LENGTH_REMAINING_IN_CURRENT_COMPLETION_TLP_IS_GREATER_THAN_1_SHIFT 12 - -/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: SPLIT_TRANSACTION_ACTIVE_SPLIT_PENDING_BLOCK_REQUEST [11:11] */ -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_TRANSACTION_ACTIVE_SPLIT_PENDING_BLOCK_REQUEST_MASK 0x00000800 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_TRANSACTION_ACTIVE_SPLIT_PENDING_BLOCK_REQUEST_ALIGN 0 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_TRANSACTION_ACTIVE_SPLIT_PENDING_BLOCK_REQUEST_BITS 1 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_TRANSACTION_ACTIVE_SPLIT_PENDING_BLOCK_REQUEST_SHIFT 11 - -/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: COMPLETION_TLP_MATCHES_REQUEST_WITHOUT_BC_LADDR_CHECKS [10:10] */ -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TLP_MATCHES_REQUEST_WITHOUT_BC_LADDR_CHECKS_MASK 0x00000400 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TLP_MATCHES_REQUEST_WITHOUT_BC_LADDR_CHECKS_ALIGN 0 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TLP_MATCHES_REQUEST_WITHOUT_BC_LADDR_CHECKS_BITS 1 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TLP_MATCHES_REQUEST_WITHOUT_BC_LADDR_CHECKS_SHIFT 10 - -/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: COMPLETION_TLP_MATCHES_REQUEST_FULLY [09:09] */ -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TLP_MATCHES_REQUEST_FULLY_MASK 0x00000200 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TLP_MATCHES_REQUEST_FULLY_ALIGN 0 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TLP_MATCHES_REQUEST_FULLY_BITS 1 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TLP_MATCHES_REQUEST_FULLY_SHIFT 9 - -/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: SPLIT_DW_DATA_VALID_ADDRESS_ACK [08:08] */ -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_DW_DATA_VALID_ADDRESS_ACK_MASK 0x00000100 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_DW_DATA_VALID_ADDRESS_ACK_ALIGN 0 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_DW_DATA_VALID_ADDRESS_ACK_BITS 1 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_DW_DATA_VALID_ADDRESS_ACK_SHIFT 8 - -/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: COMPLETION_TOO_MUCH_DATA_ERROR_COUNTER [07:04] */ -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TOO_MUCH_DATA_ERROR_COUNTER_MASK 0x000000f0 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TOO_MUCH_DATA_ERROR_COUNTER_ALIGN 0 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TOO_MUCH_DATA_ERROR_COUNTER_BITS 4 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TOO_MUCH_DATA_ERROR_COUNTER_SHIFT 4 - -/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: FRAME_DEAD_TIME_ERROR_COUNTER [03:00] */ -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_FRAME_DEAD_TIME_ERROR_COUNTER_MASK 0x0000000f -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_FRAME_DEAD_TIME_ERROR_COUNTER_ALIGN 0 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_FRAME_DEAD_TIME_ERROR_COUNTER_BITS 4 -#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_FRAME_DEAD_TIME_ERROR_COUNTER_SHIFT 0 - - -/**************************************************************************** - * PCIE_TL :: SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC - ***************************************************************************/ -/* PCIE_TL :: SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC :: REG_SPLITCTL_MISC0 [31:29] */ -#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_REG_SPLITCTL_MISC0_MASK 0xe0000000 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_REG_SPLITCTL_MISC0_ALIGN 0 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_REG_SPLITCTL_MISC0_BITS 3 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_REG_SPLITCTL_MISC0_SHIFT 29 - -/* PCIE_TL :: SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC :: LOOKUP_RESULT_FOR_EXPECTED_BYTE_COUNT_REMAINING [28:16] */ -#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_BYTE_COUNT_REMAINING_MASK 0x1fff0000 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_BYTE_COUNT_REMAINING_ALIGN 0 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_BYTE_COUNT_REMAINING_BITS 13 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_BYTE_COUNT_REMAINING_SHIFT 16 - -/* PCIE_TL :: SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC :: LOOKUP_RESULT_FOR_EXPECTED_REQUESTER_ID [15:00] */ -#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_REQUESTER_ID_MASK 0x0000ffff -#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_REQUESTER_ID_ALIGN 0 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_REQUESTER_ID_BITS 16 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_REQUESTER_ID_SHIFT 0 - - -/**************************************************************************** - * PCIE_TL :: SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC - ***************************************************************************/ -/* PCIE_TL :: SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC :: REG_SPLITCTL_MISC1 [31:16] */ -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_REG_SPLITCTL_MISC1_MASK 0xffff0000 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_REG_SPLITCTL_MISC1_ALIGN 0 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_REG_SPLITCTL_MISC1_BITS 16 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_REG_SPLITCTL_MISC1_SHIFT 16 - -/* PCIE_TL :: SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC :: RESERVED_0 [15:15] */ -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_RESERVED_0_MASK 0x00008000 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_RESERVED_0_ALIGN 0 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_RESERVED_0_BITS 1 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_RESERVED_0_SHIFT 15 - -/* PCIE_TL :: SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC :: LOOKUP_RESULT_FOR_EXPECTED_LOWER_ADDRESS [14:08] */ -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_LOWER_ADDRESS_MASK 0x00007f00 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_LOWER_ADDRESS_ALIGN 0 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_LOWER_ADDRESS_BITS 7 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_LOWER_ADDRESS_SHIFT 8 - -/* PCIE_TL :: SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC :: RESERVED_1 [07:07] */ -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_RESERVED_1_MASK 0x00000080 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_RESERVED_1_ALIGN 0 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_RESERVED_1_BITS 1 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_RESERVED_1_SHIFT 7 - -/* PCIE_TL :: SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC :: LOOKUP_RESULT_FOR_EXPECTED_ATTRIBUTE [06:05] */ -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_ATTRIBUTE_MASK 0x00000060 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_ATTRIBUTE_ALIGN 0 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_ATTRIBUTE_BITS 2 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_ATTRIBUTE_SHIFT 5 - -/* PCIE_TL :: SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC :: LOOKUP_TAG [04:00] */ -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_TAG_MASK 0x0000001f -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_TAG_ALIGN 0 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_TAG_BITS 5 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_TAG_SHIFT 0 - - -/**************************************************************************** - * PCIE_TL :: SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC - ***************************************************************************/ -/* PCIE_TL :: SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC :: REG_SPLITCTL_MISC2 [31:31] */ -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_REG_SPLITCTL_MISC2_MASK 0x80000000 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_REG_SPLITCTL_MISC2_ALIGN 0 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_REG_SPLITCTL_MISC2_BITS 1 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_REG_SPLITCTL_MISC2_SHIFT 31 - -/* PCIE_TL :: SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC :: COMPLETION_TLP_MATCHES_EXPECTED_LOWER_ADDRESS [30:30] */ -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_COMPLETION_TLP_MATCHES_EXPECTED_LOWER_ADDRESS_MASK 0x40000000 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_COMPLETION_TLP_MATCHES_EXPECTED_LOWER_ADDRESS_ALIGN 0 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_COMPLETION_TLP_MATCHES_EXPECTED_LOWER_ADDRESS_BITS 1 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_COMPLETION_TLP_MATCHES_EXPECTED_LOWER_ADDRESS_SHIFT 30 - -/* PCIE_TL :: SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC :: COMPLETION_TLP_MATCHES_VALID_TAG [29:29] */ -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_COMPLETION_TLP_MATCHES_VALID_TAG_MASK 0x20000000 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_COMPLETION_TLP_MATCHES_VALID_TAG_ALIGN 0 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_COMPLETION_TLP_MATCHES_VALID_TAG_BITS 1 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_COMPLETION_TLP_MATCHES_VALID_TAG_SHIFT 29 - -/* PCIE_TL :: SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC :: UPDATED_BYTE_COUNT [28:16] */ -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_UPDATED_BYTE_COUNT_MASK 0x1fff0000 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_UPDATED_BYTE_COUNT_ALIGN 0 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_UPDATED_BYTE_COUNT_BITS 13 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_UPDATED_BYTE_COUNT_SHIFT 16 - -/* PCIE_TL :: SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC :: RESERVED_0 [15:08] */ -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_RESERVED_0_MASK 0x0000ff00 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_RESERVED_0_ALIGN 0 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_RESERVED_0_BITS 8 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_RESERVED_0_SHIFT 8 - -/* PCIE_TL :: SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC :: SPLIT_TABLE_VALID_ARRAY [07:00] */ -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_SPLIT_TABLE_VALID_ARRAY_MASK 0x000000ff -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_SPLIT_TABLE_VALID_ARRAY_ALIGN 0 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_SPLIT_TABLE_VALID_ARRAY_BITS 8 -#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_SPLIT_TABLE_VALID_ARRAY_SHIFT 0 - - -/**************************************************************************** - * PCIE_TL :: TL_BUS_NO_DEV__NO__FUNC__NO - ***************************************************************************/ -/* PCIE_TL :: TL_BUS_NO_DEV__NO__FUNC__NO :: RESERVED_0 [31:17] */ -#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_RESERVED_0_MASK 0xfffe0000 -#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_RESERVED_0_ALIGN 0 -#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_RESERVED_0_BITS 15 -#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_RESERVED_0_SHIFT 17 - -/* PCIE_TL :: TL_BUS_NO_DEV__NO__FUNC__NO :: CONFIG_WRITE_INDICATER [16:16] */ -#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_CONFIG_WRITE_INDICATER_MASK 0x00010000 -#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_CONFIG_WRITE_INDICATER_ALIGN 0 -#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_CONFIG_WRITE_INDICATER_BITS 1 -#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_CONFIG_WRITE_INDICATER_SHIFT 16 - -/* PCIE_TL :: TL_BUS_NO_DEV__NO__FUNC__NO :: BUS_NUMBER [15:08] */ -#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_BUS_NUMBER_MASK 0x0000ff00 -#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_BUS_NUMBER_ALIGN 0 -#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_BUS_NUMBER_BITS 8 -#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_BUS_NUMBER_SHIFT 8 - -/* PCIE_TL :: TL_BUS_NO_DEV__NO__FUNC__NO :: DEVICE_NUMBER [07:03] */ -#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_DEVICE_NUMBER_MASK 0x000000f8 -#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_DEVICE_NUMBER_ALIGN 0 -#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_DEVICE_NUMBER_BITS 5 -#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_DEVICE_NUMBER_SHIFT 3 - -/* PCIE_TL :: TL_BUS_NO_DEV__NO__FUNC__NO :: FUNCTION_NUMBER [02:00] */ -#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_FUNCTION_NUMBER_MASK 0x00000007 -#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_FUNCTION_NUMBER_ALIGN 0 -#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_FUNCTION_NUMBER_BITS 3 -#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_FUNCTION_NUMBER_SHIFT 0 - - -/**************************************************************************** - * PCIE_TL :: TL_DEBUG - ***************************************************************************/ -/* PCIE_TL :: TL_DEBUG :: A4_DEVICE_INDICATION_BIT [31:31] */ -#define PCIE_TL_TL_DEBUG_A4_DEVICE_INDICATION_BIT_MASK 0x80000000 -#define PCIE_TL_TL_DEBUG_A4_DEVICE_INDICATION_BIT_ALIGN 0 -#define PCIE_TL_TL_DEBUG_A4_DEVICE_INDICATION_BIT_BITS 1 -#define PCIE_TL_TL_DEBUG_A4_DEVICE_INDICATION_BIT_SHIFT 31 - -/* PCIE_TL :: TL_DEBUG :: B1_DEVICE_INDICATION_BIT [30:30] */ -#define PCIE_TL_TL_DEBUG_B1_DEVICE_INDICATION_BIT_MASK 0x40000000 -#define PCIE_TL_TL_DEBUG_B1_DEVICE_INDICATION_BIT_ALIGN 0 -#define PCIE_TL_TL_DEBUG_B1_DEVICE_INDICATION_BIT_BITS 1 -#define PCIE_TL_TL_DEBUG_B1_DEVICE_INDICATION_BIT_SHIFT 30 - -/* PCIE_TL :: TL_DEBUG :: RESERVED_0 [29:00] */ -#define PCIE_TL_TL_DEBUG_RESERVED_0_MASK 0x3fffffff -#define PCIE_TL_TL_DEBUG_RESERVED_0_ALIGN 0 -#define PCIE_TL_TL_DEBUG_RESERVED_0_BITS 30 -#define PCIE_TL_TL_DEBUG_RESERVED_0_SHIFT 0 - - -/**************************************************************************** - * BCM70012_TGT_TOP_PCIE_DLL - ***************************************************************************/ -/**************************************************************************** - * PCIE_DLL :: DATA_LINK_CONTROL - ***************************************************************************/ -/* PCIE_DLL :: DATA_LINK_CONTROL :: RESERVED_0 [31:30] */ -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_0_MASK 0xc0000000 -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_0_ALIGN 0 -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_0_BITS 2 -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_0_SHIFT 30 - -/* PCIE_DLL :: DATA_LINK_CONTROL :: CQ28001_FIX_ENABLE [29:29] */ -#define PCIE_DLL_DATA_LINK_CONTROL_CQ28001_FIX_ENABLE_MASK 0x20000000 -#define PCIE_DLL_DATA_LINK_CONTROL_CQ28001_FIX_ENABLE_ALIGN 0 -#define PCIE_DLL_DATA_LINK_CONTROL_CQ28001_FIX_ENABLE_BITS 1 -#define PCIE_DLL_DATA_LINK_CONTROL_CQ28001_FIX_ENABLE_SHIFT 29 - -/* PCIE_DLL :: DATA_LINK_CONTROL :: CQ27820_FIX_ENABLE [28:28] */ -#define PCIE_DLL_DATA_LINK_CONTROL_CQ27820_FIX_ENABLE_MASK 0x10000000 -#define PCIE_DLL_DATA_LINK_CONTROL_CQ27820_FIX_ENABLE_ALIGN 0 -#define PCIE_DLL_DATA_LINK_CONTROL_CQ27820_FIX_ENABLE_BITS 1 -#define PCIE_DLL_DATA_LINK_CONTROL_CQ27820_FIX_ENABLE_SHIFT 28 - -/* PCIE_DLL :: DATA_LINK_CONTROL :: ASPM_L1_ENABLE [27:27] */ -#define PCIE_DLL_DATA_LINK_CONTROL_ASPM_L1_ENABLE_MASK 0x08000000 -#define PCIE_DLL_DATA_LINK_CONTROL_ASPM_L1_ENABLE_ALIGN 0 -#define PCIE_DLL_DATA_LINK_CONTROL_ASPM_L1_ENABLE_BITS 1 -#define PCIE_DLL_DATA_LINK_CONTROL_ASPM_L1_ENABLE_SHIFT 27 - -/* PCIE_DLL :: DATA_LINK_CONTROL :: RESERVED_1 [26:25] */ -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_1_MASK 0x06000000 -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_1_ALIGN 0 -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_1_BITS 2 -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_1_SHIFT 25 - -/* PCIE_DLL :: DATA_LINK_CONTROL :: CQ11211 [24:24] */ -#define PCIE_DLL_DATA_LINK_CONTROL_CQ11211_MASK 0x01000000 -#define PCIE_DLL_DATA_LINK_CONTROL_CQ11211_ALIGN 0 -#define PCIE_DLL_DATA_LINK_CONTROL_CQ11211_BITS 1 -#define PCIE_DLL_DATA_LINK_CONTROL_CQ11211_SHIFT 24 - -/* PCIE_DLL :: DATA_LINK_CONTROL :: RESERVED_2 [23:23] */ -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_2_MASK 0x00800000 -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_2_ALIGN 0 -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_2_BITS 1 -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_2_SHIFT 23 - -/* PCIE_DLL :: DATA_LINK_CONTROL :: RESERVED_3 [22:22] */ -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_3_MASK 0x00400000 -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_3_ALIGN 0 -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_3_BITS 1 -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_3_SHIFT 22 - -/* PCIE_DLL :: DATA_LINK_CONTROL :: RESERVED_4 [21:21] */ -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_4_MASK 0x00200000 -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_4_ALIGN 0 -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_4_BITS 1 -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_4_SHIFT 21 - -/* PCIE_DLL :: DATA_LINK_CONTROL :: RESERVED_5 [20:20] */ -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_5_MASK 0x00100000 -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_5_ALIGN 0 -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_5_BITS 1 -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_5_SHIFT 20 - -/* PCIE_DLL :: DATA_LINK_CONTROL :: RESERVED_6 [19:19] */ -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_6_MASK 0x00080000 -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_6_ALIGN 0 -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_6_BITS 1 -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_6_SHIFT 19 - -/* PCIE_DLL :: DATA_LINK_CONTROL :: PLL_REFSEL_SWITCH_CONTROL_CQ11011 [18:18] */ -#define PCIE_DLL_DATA_LINK_CONTROL_PLL_REFSEL_SWITCH_CONTROL_CQ11011_MASK 0x00040000 -#define PCIE_DLL_DATA_LINK_CONTROL_PLL_REFSEL_SWITCH_CONTROL_CQ11011_ALIGN 0 -#define PCIE_DLL_DATA_LINK_CONTROL_PLL_REFSEL_SWITCH_CONTROL_CQ11011_BITS 1 -#define PCIE_DLL_DATA_LINK_CONTROL_PLL_REFSEL_SWITCH_CONTROL_CQ11011_SHIFT 18 - -/* PCIE_DLL :: DATA_LINK_CONTROL :: RESERVED_7 [17:17] */ -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_7_MASK 0x00020000 -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_7_ALIGN 0 -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_7_BITS 1 -#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_7_SHIFT 17 - -/* PCIE_DLL :: DATA_LINK_CONTROL :: POWER_MANAGEMENT_CONTROL [16:16] */ -#define PCIE_DLL_DATA_LINK_CONTROL_POWER_MANAGEMENT_CONTROL_MASK 0x00010000 -#define PCIE_DLL_DATA_LINK_CONTROL_POWER_MANAGEMENT_CONTROL_ALIGN 0 -#define PCIE_DLL_DATA_LINK_CONTROL_POWER_MANAGEMENT_CONTROL_BITS 1 -#define PCIE_DLL_DATA_LINK_CONTROL_POWER_MANAGEMENT_CONTROL_SHIFT 16 - -/* PCIE_DLL :: DATA_LINK_CONTROL :: POWER_DOWN_SERDES_TRANSMITTER [15:15] */ -#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_TRANSMITTER_MASK 0x00008000 -#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_TRANSMITTER_ALIGN 0 -#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_TRANSMITTER_BITS 1 -#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_TRANSMITTER_SHIFT 15 - -/* PCIE_DLL :: DATA_LINK_CONTROL :: POWER_DOWN_SERDES_PLL [14:14] */ -#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_PLL_MASK 0x00004000 -#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_PLL_ALIGN 0 -#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_PLL_BITS 1 -#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_PLL_SHIFT 14 - -/* PCIE_DLL :: DATA_LINK_CONTROL :: POWER_DOWN_SERDES_RECEIVER [13:13] */ -#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_RECEIVER_MASK 0x00002000 -#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_RECEIVER_ALIGN 0 -#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_RECEIVER_BITS 1 -#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_RECEIVER_SHIFT 13 - -/* PCIE_DLL :: DATA_LINK_CONTROL :: ENABLE_BEACON [12:12] */ -#define PCIE_DLL_DATA_LINK_CONTROL_ENABLE_BEACON_MASK 0x00001000 -#define PCIE_DLL_DATA_LINK_CONTROL_ENABLE_BEACON_ALIGN 0 -#define PCIE_DLL_DATA_LINK_CONTROL_ENABLE_BEACON_BITS 1 -#define PCIE_DLL_DATA_LINK_CONTROL_ENABLE_BEACON_SHIFT 12 - -/* PCIE_DLL :: DATA_LINK_CONTROL :: AUTOMATIC_TIMER_THRESHOLD_ENABLE [11:11] */ -#define PCIE_DLL_DATA_LINK_CONTROL_AUTOMATIC_TIMER_THRESHOLD_ENABLE_MASK 0x00000800 -#define PCIE_DLL_DATA_LINK_CONTROL_AUTOMATIC_TIMER_THRESHOLD_ENABLE_ALIGN 0 -#define PCIE_DLL_DATA_LINK_CONTROL_AUTOMATIC_TIMER_THRESHOLD_ENABLE_BITS 1 -#define PCIE_DLL_DATA_LINK_CONTROL_AUTOMATIC_TIMER_THRESHOLD_ENABLE_SHIFT 11 - -/* PCIE_DLL :: DATA_LINK_CONTROL :: ENABLE_DLLP_TIMEOUT_MECHANISM [10:10] */ -#define PCIE_DLL_DATA_LINK_CONTROL_ENABLE_DLLP_TIMEOUT_MECHANISM_MASK 0x00000400 -#define PCIE_DLL_DATA_LINK_CONTROL_ENABLE_DLLP_TIMEOUT_MECHANISM_ALIGN 0 -#define PCIE_DLL_DATA_LINK_CONTROL_ENABLE_DLLP_TIMEOUT_MECHANISM_BITS 1 -#define PCIE_DLL_DATA_LINK_CONTROL_ENABLE_DLLP_TIMEOUT_MECHANISM_SHIFT 10 - -/* PCIE_DLL :: DATA_LINK_CONTROL :: CHECK_RECEIVE_FLOW_CONTROL_CREDITS [09:09] */ -#define PCIE_DLL_DATA_LINK_CONTROL_CHECK_RECEIVE_FLOW_CONTROL_CREDITS_MASK 0x00000200 -#define PCIE_DLL_DATA_LINK_CONTROL_CHECK_RECEIVE_FLOW_CONTROL_CREDITS_ALIGN 0 -#define PCIE_DLL_DATA_LINK_CONTROL_CHECK_RECEIVE_FLOW_CONTROL_CREDITS_BITS 1 -#define PCIE_DLL_DATA_LINK_CONTROL_CHECK_RECEIVE_FLOW_CONTROL_CREDITS_SHIFT 9 - -/* PCIE_DLL :: DATA_LINK_CONTROL :: LINK_ENABLE [08:08] */ -#define PCIE_DLL_DATA_LINK_CONTROL_LINK_ENABLE_MASK 0x00000100 -#define PCIE_DLL_DATA_LINK_CONTROL_LINK_ENABLE_ALIGN 0 -#define PCIE_DLL_DATA_LINK_CONTROL_LINK_ENABLE_BITS 1 -#define PCIE_DLL_DATA_LINK_CONTROL_LINK_ENABLE_SHIFT 8 - -/* PCIE_DLL :: DATA_LINK_CONTROL :: POWER_MANAGEMENT_CONTROL_2 [07:00] */ -#define PCIE_DLL_DATA_LINK_CONTROL_POWER_MANAGEMENT_CONTROL_2_MASK 0x000000ff -#define PCIE_DLL_DATA_LINK_CONTROL_POWER_MANAGEMENT_CONTROL_2_ALIGN 0 -#define PCIE_DLL_DATA_LINK_CONTROL_POWER_MANAGEMENT_CONTROL_2_BITS 8 -#define PCIE_DLL_DATA_LINK_CONTROL_POWER_MANAGEMENT_CONTROL_2_SHIFT 0 - - -/**************************************************************************** - * PCIE_DLL :: DATA_LINK_STATUS - ***************************************************************************/ -/* PCIE_DLL :: DATA_LINK_STATUS :: RESERVED_0 [31:26] */ -#define PCIE_DLL_DATA_LINK_STATUS_RESERVED_0_MASK 0xfc000000 -#define PCIE_DLL_DATA_LINK_STATUS_RESERVED_0_ALIGN 0 -#define PCIE_DLL_DATA_LINK_STATUS_RESERVED_0_BITS 6 -#define PCIE_DLL_DATA_LINK_STATUS_RESERVED_0_SHIFT 26 - -/* PCIE_DLL :: DATA_LINK_STATUS :: PHY_LINK_STATE [25:23] */ -#define PCIE_DLL_DATA_LINK_STATUS_PHY_LINK_STATE_MASK 0x03800000 -#define PCIE_DLL_DATA_LINK_STATUS_PHY_LINK_STATE_ALIGN 0 -#define PCIE_DLL_DATA_LINK_STATUS_PHY_LINK_STATE_BITS 3 -#define PCIE_DLL_DATA_LINK_STATUS_PHY_LINK_STATE_SHIFT 23 - -/* PCIE_DLL :: DATA_LINK_STATUS :: POWER_MANAGEMENT_STATE [22:19] */ -#define PCIE_DLL_DATA_LINK_STATUS_POWER_MANAGEMENT_STATE_MASK 0x00780000 -#define PCIE_DLL_DATA_LINK_STATUS_POWER_MANAGEMENT_STATE_ALIGN 0 -#define PCIE_DLL_DATA_LINK_STATUS_POWER_MANAGEMENT_STATE_BITS 4 -#define PCIE_DLL_DATA_LINK_STATUS_POWER_MANAGEMENT_STATE_SHIFT 19 - -/* PCIE_DLL :: DATA_LINK_STATUS :: POWER_MANAGEMENT_SUB_STATE [18:17] */ -#define PCIE_DLL_DATA_LINK_STATUS_POWER_MANAGEMENT_SUB_STATE_MASK 0x00060000 -#define PCIE_DLL_DATA_LINK_STATUS_POWER_MANAGEMENT_SUB_STATE_ALIGN 0 -#define PCIE_DLL_DATA_LINK_STATUS_POWER_MANAGEMENT_SUB_STATE_BITS 2 -#define PCIE_DLL_DATA_LINK_STATUS_POWER_MANAGEMENT_SUB_STATE_SHIFT 17 - -/* PCIE_DLL :: DATA_LINK_STATUS :: DATA_LINK_UP [16:16] */ -#define PCIE_DLL_DATA_LINK_STATUS_DATA_LINK_UP_MASK 0x00010000 -#define PCIE_DLL_DATA_LINK_STATUS_DATA_LINK_UP_ALIGN 0 -#define PCIE_DLL_DATA_LINK_STATUS_DATA_LINK_UP_BITS 1 -#define PCIE_DLL_DATA_LINK_STATUS_DATA_LINK_UP_SHIFT 16 - -/* PCIE_DLL :: DATA_LINK_STATUS :: RESERVED_1 [15:11] */ -#define PCIE_DLL_DATA_LINK_STATUS_RESERVED_1_MASK 0x0000f800 -#define PCIE_DLL_DATA_LINK_STATUS_RESERVED_1_ALIGN 0 -#define PCIE_DLL_DATA_LINK_STATUS_RESERVED_1_BITS 5 -#define PCIE_DLL_DATA_LINK_STATUS_RESERVED_1_SHIFT 11 - -/* PCIE_DLL :: DATA_LINK_STATUS :: PME_TURN_OFF_STATUS_IN_D0 [10:10] */ -#define PCIE_DLL_DATA_LINK_STATUS_PME_TURN_OFF_STATUS_IN_D0_MASK 0x00000400 -#define PCIE_DLL_DATA_LINK_STATUS_PME_TURN_OFF_STATUS_IN_D0_ALIGN 0 -#define PCIE_DLL_DATA_LINK_STATUS_PME_TURN_OFF_STATUS_IN_D0_BITS 1 -#define PCIE_DLL_DATA_LINK_STATUS_PME_TURN_OFF_STATUS_IN_D0_SHIFT 10 - -/* PCIE_DLL :: DATA_LINK_STATUS :: FLOW_CONTROL_UPDATE_TIMEOUT [09:09] */ -#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_UPDATE_TIMEOUT_MASK 0x00000200 -#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_UPDATE_TIMEOUT_ALIGN 0 -#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_UPDATE_TIMEOUT_BITS 1 -#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_UPDATE_TIMEOUT_SHIFT 9 - -/* PCIE_DLL :: DATA_LINK_STATUS :: FLOW_CONTROL_RECEIVE_OVERFLOW [08:08] */ -#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_RECEIVE_OVERFLOW_MASK 0x00000100 -#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_RECEIVE_OVERFLOW_ALIGN 0 -#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_RECEIVE_OVERFLOW_BITS 1 -#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_RECEIVE_OVERFLOW_SHIFT 8 - -/* PCIE_DLL :: DATA_LINK_STATUS :: FLOW_CONTROL_PROTOCOL_ERROR [07:07] */ -#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_PROTOCOL_ERROR_MASK 0x00000080 -#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_PROTOCOL_ERROR_ALIGN 0 -#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_PROTOCOL_ERROR_BITS 1 -#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_PROTOCOL_ERROR_SHIFT 7 - -/* PCIE_DLL :: DATA_LINK_STATUS :: DATA_LINK_PROTOCOL_ERROR [06:06] */ -#define PCIE_DLL_DATA_LINK_STATUS_DATA_LINK_PROTOCOL_ERROR_MASK 0x00000040 -#define PCIE_DLL_DATA_LINK_STATUS_DATA_LINK_PROTOCOL_ERROR_ALIGN 0 -#define PCIE_DLL_DATA_LINK_STATUS_DATA_LINK_PROTOCOL_ERROR_BITS 1 -#define PCIE_DLL_DATA_LINK_STATUS_DATA_LINK_PROTOCOL_ERROR_SHIFT 6 - -/* PCIE_DLL :: DATA_LINK_STATUS :: REPLAY_ROLLOVER [05:05] */ -#define PCIE_DLL_DATA_LINK_STATUS_REPLAY_ROLLOVER_MASK 0x00000020 -#define PCIE_DLL_DATA_LINK_STATUS_REPLAY_ROLLOVER_ALIGN 0 -#define PCIE_DLL_DATA_LINK_STATUS_REPLAY_ROLLOVER_BITS 1 -#define PCIE_DLL_DATA_LINK_STATUS_REPLAY_ROLLOVER_SHIFT 5 - -/* PCIE_DLL :: DATA_LINK_STATUS :: REPLAY_TIMEOUT [04:04] */ -#define PCIE_DLL_DATA_LINK_STATUS_REPLAY_TIMEOUT_MASK 0x00000010 -#define PCIE_DLL_DATA_LINK_STATUS_REPLAY_TIMEOUT_ALIGN 0 -#define PCIE_DLL_DATA_LINK_STATUS_REPLAY_TIMEOUT_BITS 1 -#define PCIE_DLL_DATA_LINK_STATUS_REPLAY_TIMEOUT_SHIFT 4 - -/* PCIE_DLL :: DATA_LINK_STATUS :: NAK_RECEIVED [03:03] */ -#define PCIE_DLL_DATA_LINK_STATUS_NAK_RECEIVED_MASK 0x00000008 -#define PCIE_DLL_DATA_LINK_STATUS_NAK_RECEIVED_ALIGN 0 -#define PCIE_DLL_DATA_LINK_STATUS_NAK_RECEIVED_BITS 1 -#define PCIE_DLL_DATA_LINK_STATUS_NAK_RECEIVED_SHIFT 3 - -/* PCIE_DLL :: DATA_LINK_STATUS :: DLLP_ERROR [02:02] */ -#define PCIE_DLL_DATA_LINK_STATUS_DLLP_ERROR_MASK 0x00000004 -#define PCIE_DLL_DATA_LINK_STATUS_DLLP_ERROR_ALIGN 0 -#define PCIE_DLL_DATA_LINK_STATUS_DLLP_ERROR_BITS 1 -#define PCIE_DLL_DATA_LINK_STATUS_DLLP_ERROR_SHIFT 2 - -/* PCIE_DLL :: DATA_LINK_STATUS :: BAD_TLP_SEQUENCE_NUMBER [01:01] */ -#define PCIE_DLL_DATA_LINK_STATUS_BAD_TLP_SEQUENCE_NUMBER_MASK 0x00000002 -#define PCIE_DLL_DATA_LINK_STATUS_BAD_TLP_SEQUENCE_NUMBER_ALIGN 0 -#define PCIE_DLL_DATA_LINK_STATUS_BAD_TLP_SEQUENCE_NUMBER_BITS 1 -#define PCIE_DLL_DATA_LINK_STATUS_BAD_TLP_SEQUENCE_NUMBER_SHIFT 1 - -/* PCIE_DLL :: DATA_LINK_STATUS :: TLP_ERROR [00:00] */ -#define PCIE_DLL_DATA_LINK_STATUS_TLP_ERROR_MASK 0x00000001 -#define PCIE_DLL_DATA_LINK_STATUS_TLP_ERROR_ALIGN 0 -#define PCIE_DLL_DATA_LINK_STATUS_TLP_ERROR_BITS 1 -#define PCIE_DLL_DATA_LINK_STATUS_TLP_ERROR_SHIFT 0 - - -/**************************************************************************** - * PCIE_DLL :: DATA_LINK_ATTENTION - ***************************************************************************/ -/* PCIE_DLL :: DATA_LINK_ATTENTION :: RESERVED_0 [31:06] */ -#define PCIE_DLL_DATA_LINK_ATTENTION_RESERVED_0_MASK 0xffffffc0 -#define PCIE_DLL_DATA_LINK_ATTENTION_RESERVED_0_ALIGN 0 -#define PCIE_DLL_DATA_LINK_ATTENTION_RESERVED_0_BITS 26 -#define PCIE_DLL_DATA_LINK_ATTENTION_RESERVED_0_SHIFT 6 - -/* PCIE_DLL :: DATA_LINK_ATTENTION :: DATA_LINK_LAYER_PACKET_TEST_INDICATOR [05:05] */ -#define PCIE_DLL_DATA_LINK_ATTENTION_DATA_LINK_LAYER_PACKET_TEST_INDICATOR_MASK 0x00000020 -#define PCIE_DLL_DATA_LINK_ATTENTION_DATA_LINK_LAYER_PACKET_TEST_INDICATOR_ALIGN 0 -#define PCIE_DLL_DATA_LINK_ATTENTION_DATA_LINK_LAYER_PACKET_TEST_INDICATOR_BITS 1 -#define PCIE_DLL_DATA_LINK_ATTENTION_DATA_LINK_LAYER_PACKET_TEST_INDICATOR_SHIFT 5 - -/* PCIE_DLL :: DATA_LINK_ATTENTION :: DATA_LINK_LAYER_ERROR_ATTENTION_INDICATOR [04:04] */ -#define PCIE_DLL_DATA_LINK_ATTENTION_DATA_LINK_LAYER_ERROR_ATTENTION_INDICATOR_MASK 0x00000010 -#define PCIE_DLL_DATA_LINK_ATTENTION_DATA_LINK_LAYER_ERROR_ATTENTION_INDICATOR_ALIGN 0 -#define PCIE_DLL_DATA_LINK_ATTENTION_DATA_LINK_LAYER_ERROR_ATTENTION_INDICATOR_BITS 1 -#define PCIE_DLL_DATA_LINK_ATTENTION_DATA_LINK_LAYER_ERROR_ATTENTION_INDICATOR_SHIFT 4 - -/* PCIE_DLL :: DATA_LINK_ATTENTION :: NAK_RECEIVED_COUNTER_ATTENTION_INDICATOR [03:03] */ -#define PCIE_DLL_DATA_LINK_ATTENTION_NAK_RECEIVED_COUNTER_ATTENTION_INDICATOR_MASK 0x00000008 -#define PCIE_DLL_DATA_LINK_ATTENTION_NAK_RECEIVED_COUNTER_ATTENTION_INDICATOR_ALIGN 0 -#define PCIE_DLL_DATA_LINK_ATTENTION_NAK_RECEIVED_COUNTER_ATTENTION_INDICATOR_BITS 1 -#define PCIE_DLL_DATA_LINK_ATTENTION_NAK_RECEIVED_COUNTER_ATTENTION_INDICATOR_SHIFT 3 - -/* PCIE_DLL :: DATA_LINK_ATTENTION :: DLLP_ERROR_COUNTER_ATTENTION_INDICATOR [02:02] */ -#define PCIE_DLL_DATA_LINK_ATTENTION_DLLP_ERROR_COUNTER_ATTENTION_INDICATOR_MASK 0x00000004 -#define PCIE_DLL_DATA_LINK_ATTENTION_DLLP_ERROR_COUNTER_ATTENTION_INDICATOR_ALIGN 0 -#define PCIE_DLL_DATA_LINK_ATTENTION_DLLP_ERROR_COUNTER_ATTENTION_INDICATOR_BITS 1 -#define PCIE_DLL_DATA_LINK_ATTENTION_DLLP_ERROR_COUNTER_ATTENTION_INDICATOR_SHIFT 2 - -/* PCIE_DLL :: DATA_LINK_ATTENTION :: TLP_BAD_SEQUENCE_COUNTER_ATTENTION_INDICATOR [01:01] */ -#define PCIE_DLL_DATA_LINK_ATTENTION_TLP_BAD_SEQUENCE_COUNTER_ATTENTION_INDICATOR_MASK 0x00000002 -#define PCIE_DLL_DATA_LINK_ATTENTION_TLP_BAD_SEQUENCE_COUNTER_ATTENTION_INDICATOR_ALIGN 0 -#define PCIE_DLL_DATA_LINK_ATTENTION_TLP_BAD_SEQUENCE_COUNTER_ATTENTION_INDICATOR_BITS 1 -#define PCIE_DLL_DATA_LINK_ATTENTION_TLP_BAD_SEQUENCE_COUNTER_ATTENTION_INDICATOR_SHIFT 1 - -/* PCIE_DLL :: DATA_LINK_ATTENTION :: TLP_ERROR_COUNTER_ATTENTION_INDICATOR [00:00] */ -#define PCIE_DLL_DATA_LINK_ATTENTION_TLP_ERROR_COUNTER_ATTENTION_INDICATOR_MASK 0x00000001 -#define PCIE_DLL_DATA_LINK_ATTENTION_TLP_ERROR_COUNTER_ATTENTION_INDICATOR_ALIGN 0 -#define PCIE_DLL_DATA_LINK_ATTENTION_TLP_ERROR_COUNTER_ATTENTION_INDICATOR_BITS 1 -#define PCIE_DLL_DATA_LINK_ATTENTION_TLP_ERROR_COUNTER_ATTENTION_INDICATOR_SHIFT 0 - - -/**************************************************************************** - * PCIE_DLL :: DATA_LINK_ATTENTION_MASK - ***************************************************************************/ -/* PCIE_DLL :: DATA_LINK_ATTENTION_MASK :: RESERVED_0 [31:08] */ -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_RESERVED_0_MASK 0xffffff00 -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_RESERVED_0_ALIGN 0 -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_RESERVED_0_BITS 24 -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_RESERVED_0_SHIFT 8 - -/* PCIE_DLL :: DATA_LINK_ATTENTION_MASK :: UNUSED_0 [07:06] */ -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_UNUSED_0_MASK 0x000000c0 -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_UNUSED_0_ALIGN 0 -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_UNUSED_0_BITS 2 -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_UNUSED_0_SHIFT 6 - -/* PCIE_DLL :: DATA_LINK_ATTENTION_MASK :: DATA_LINK_LAYER_PACKET_TEST_ATTENTION_MASK [05:05] */ -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DATA_LINK_LAYER_PACKET_TEST_ATTENTION_MASK_MASK 0x00000020 -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DATA_LINK_LAYER_PACKET_TEST_ATTENTION_MASK_ALIGN 0 -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DATA_LINK_LAYER_PACKET_TEST_ATTENTION_MASK_BITS 1 -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DATA_LINK_LAYER_PACKET_TEST_ATTENTION_MASK_SHIFT 5 - -/* PCIE_DLL :: DATA_LINK_ATTENTION_MASK :: DATA_LINK_LAYER_ERROR_ATTENTION_MASK [04:04] */ -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DATA_LINK_LAYER_ERROR_ATTENTION_MASK_MASK 0x00000010 -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DATA_LINK_LAYER_ERROR_ATTENTION_MASK_ALIGN 0 -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DATA_LINK_LAYER_ERROR_ATTENTION_MASK_BITS 1 -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DATA_LINK_LAYER_ERROR_ATTENTION_MASK_SHIFT 4 - -/* PCIE_DLL :: DATA_LINK_ATTENTION_MASK :: NAK_RECEIVED_COUNTER_ATTENTION_MASK [03:03] */ -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_NAK_RECEIVED_COUNTER_ATTENTION_MASK_MASK 0x00000008 -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_NAK_RECEIVED_COUNTER_ATTENTION_MASK_ALIGN 0 -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_NAK_RECEIVED_COUNTER_ATTENTION_MASK_BITS 1 -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_NAK_RECEIVED_COUNTER_ATTENTION_MASK_SHIFT 3 - -/* PCIE_DLL :: DATA_LINK_ATTENTION_MASK :: DLLP_ERROR_COUNTER_ATTENTION_MASK [02:02] */ -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DLLP_ERROR_COUNTER_ATTENTION_MASK_MASK 0x00000004 -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DLLP_ERROR_COUNTER_ATTENTION_MASK_ALIGN 0 -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DLLP_ERROR_COUNTER_ATTENTION_MASK_BITS 1 -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DLLP_ERROR_COUNTER_ATTENTION_MASK_SHIFT 2 - -/* PCIE_DLL :: DATA_LINK_ATTENTION_MASK :: TLP_BAD_SEQUENCE_COUNTER_ATTENTION_MASK [01:01] */ -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_TLP_BAD_SEQUENCE_COUNTER_ATTENTION_MASK_MASK 0x00000002 -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_TLP_BAD_SEQUENCE_COUNTER_ATTENTION_MASK_ALIGN 0 -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_TLP_BAD_SEQUENCE_COUNTER_ATTENTION_MASK_BITS 1 -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_TLP_BAD_SEQUENCE_COUNTER_ATTENTION_MASK_SHIFT 1 - -/* PCIE_DLL :: DATA_LINK_ATTENTION_MASK :: TLP_ERROR_COUNTER_ATTENTION_MASK [00:00] */ -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_TLP_ERROR_COUNTER_ATTENTION_MASK_MASK 0x00000001 -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_TLP_ERROR_COUNTER_ATTENTION_MASK_ALIGN 0 -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_TLP_ERROR_COUNTER_ATTENTION_MASK_BITS 1 -#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_TLP_ERROR_COUNTER_ATTENTION_MASK_SHIFT 0 - - -/**************************************************************************** - * PCIE_DLL :: NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG - ***************************************************************************/ -/* PCIE_DLL :: NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG :: RESERVED_0 [31:12] */ -#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_MASK 0xfffff000 -#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_ALIGN 0 -#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_BITS 20 -#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_SHIFT 12 - -/* PCIE_DLL :: NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG :: NEXT_TRANSMIT_SEQUENCE_NUMBER [11:00] */ -#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG_NEXT_TRANSMIT_SEQUENCE_NUMBER_MASK 0x00000fff -#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG_NEXT_TRANSMIT_SEQUENCE_NUMBER_ALIGN 0 -#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG_NEXT_TRANSMIT_SEQUENCE_NUMBER_BITS 12 -#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG_NEXT_TRANSMIT_SEQUENCE_NUMBER_SHIFT 0 - - -/**************************************************************************** - * PCIE_DLL :: ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG - ***************************************************************************/ -/* PCIE_DLL :: ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG :: RESERVED_0 [31:12] */ -#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_MASK 0xfffff000 -#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_ALIGN 0 -#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_BITS 20 -#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_SHIFT 12 - -/* PCIE_DLL :: ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG :: ACK_ED_TRANSMIT_SEQUENCE_NUMBER [11:00] */ -#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_MASK 0x00000fff -#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_ALIGN 0 -#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_BITS 12 -#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_SHIFT 0 - - -/**************************************************************************** - * PCIE_DLL :: PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG - ***************************************************************************/ -/* PCIE_DLL :: PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG :: RESERVED_0 [31:12] */ -#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_MASK 0xfffff000 -#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_ALIGN 0 -#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_BITS 20 -#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_SHIFT 12 - -/* PCIE_DLL :: PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG :: PURGED_TRANSMIT_SEQUENCE_NUMBER [11:00] */ -#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_PURGED_TRANSMIT_SEQUENCE_NUMBER_MASK 0x00000fff -#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_PURGED_TRANSMIT_SEQUENCE_NUMBER_ALIGN 0 -#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_PURGED_TRANSMIT_SEQUENCE_NUMBER_BITS 12 -#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_PURGED_TRANSMIT_SEQUENCE_NUMBER_SHIFT 0 - - -/**************************************************************************** - * PCIE_DLL :: RECEIVE_SEQUENCE_NUMBER_DEBUG - ***************************************************************************/ -/* PCIE_DLL :: RECEIVE_SEQUENCE_NUMBER_DEBUG :: RESERVED_0 [31:12] */ -#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG_RESERVED_0_MASK 0xfffff000 -#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG_RESERVED_0_ALIGN 0 -#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG_RESERVED_0_BITS 20 -#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG_RESERVED_0_SHIFT 12 - -/* PCIE_DLL :: RECEIVE_SEQUENCE_NUMBER_DEBUG :: RECEIVE_SEQUENCE_NUMBER [11:00] */ -#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG_RECEIVE_SEQUENCE_NUMBER_MASK 0x00000fff -#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG_RECEIVE_SEQUENCE_NUMBER_ALIGN 0 -#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG_RECEIVE_SEQUENCE_NUMBER_BITS 12 -#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG_RECEIVE_SEQUENCE_NUMBER_SHIFT 0 - - -/**************************************************************************** - * PCIE_DLL :: DATA_LINK_REPLAY - ***************************************************************************/ -/* PCIE_DLL :: DATA_LINK_REPLAY :: RESERVED_0 [31:23] */ -#define PCIE_DLL_DATA_LINK_REPLAY_RESERVED_0_MASK 0xff800000 -#define PCIE_DLL_DATA_LINK_REPLAY_RESERVED_0_ALIGN 0 -#define PCIE_DLL_DATA_LINK_REPLAY_RESERVED_0_BITS 9 -#define PCIE_DLL_DATA_LINK_REPLAY_RESERVED_0_SHIFT 23 - -/* PCIE_DLL :: DATA_LINK_REPLAY :: REPLAY_TIMEOUT_VALUE [22:10] */ -#define PCIE_DLL_DATA_LINK_REPLAY_REPLAY_TIMEOUT_VALUE_MASK 0x007ffc00 -#define PCIE_DLL_DATA_LINK_REPLAY_REPLAY_TIMEOUT_VALUE_ALIGN 0 -#define PCIE_DLL_DATA_LINK_REPLAY_REPLAY_TIMEOUT_VALUE_BITS 13 -#define PCIE_DLL_DATA_LINK_REPLAY_REPLAY_TIMEOUT_VALUE_SHIFT 10 - -/* PCIE_DLL :: DATA_LINK_REPLAY :: REPLAY_BUFFER_SIZE [09:00] */ -#define PCIE_DLL_DATA_LINK_REPLAY_REPLAY_BUFFER_SIZE_MASK 0x000003ff -#define PCIE_DLL_DATA_LINK_REPLAY_REPLAY_BUFFER_SIZE_ALIGN 0 -#define PCIE_DLL_DATA_LINK_REPLAY_REPLAY_BUFFER_SIZE_BITS 10 -#define PCIE_DLL_DATA_LINK_REPLAY_REPLAY_BUFFER_SIZE_SHIFT 0 - - -/**************************************************************************** - * PCIE_DLL :: DATA_LINK_ACK_TIMEOUT - ***************************************************************************/ -/* PCIE_DLL :: DATA_LINK_ACK_TIMEOUT :: RESERVED_0 [31:11] */ -#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT_RESERVED_0_MASK 0xfffff800 -#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT_RESERVED_0_ALIGN 0 -#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT_RESERVED_0_BITS 21 -#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT_RESERVED_0_SHIFT 11 - -/* PCIE_DLL :: DATA_LINK_ACK_TIMEOUT :: ACK_LATENCY_TIMEOUT_VALUE [10:00] */ -#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT_ACK_LATENCY_TIMEOUT_VALUE_MASK 0x000007ff -#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT_ACK_LATENCY_TIMEOUT_VALUE_ALIGN 0 -#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT_ACK_LATENCY_TIMEOUT_VALUE_BITS 11 -#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT_ACK_LATENCY_TIMEOUT_VALUE_SHIFT 0 - - -/**************************************************************************** - * PCIE_DLL :: POWER_MANAGEMENT_THRESHOLD - ***************************************************************************/ -/* PCIE_DLL :: POWER_MANAGEMENT_THRESHOLD :: RESERVED_0 [31:24] */ -#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_RESERVED_0_MASK 0xff000000 -#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_RESERVED_0_ALIGN 0 -#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_RESERVED_0_BITS 8 -#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_RESERVED_0_SHIFT 24 - -/* PCIE_DLL :: POWER_MANAGEMENT_THRESHOLD :: L0_STAY_TIME [23:20] */ -#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L0_STAY_TIME_MASK 0x00f00000 -#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L0_STAY_TIME_ALIGN 0 -#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L0_STAY_TIME_BITS 4 -#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L0_STAY_TIME_SHIFT 20 - -/* PCIE_DLL :: POWER_MANAGEMENT_THRESHOLD :: L1_STAY_TIME [19:16] */ -#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L1_STAY_TIME_MASK 0x000f0000 -#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L1_STAY_TIME_ALIGN 0 -#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L1_STAY_TIME_BITS 4 -#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L1_STAY_TIME_SHIFT 16 - -/* PCIE_DLL :: POWER_MANAGEMENT_THRESHOLD :: L1_THRESHOLD [15:08] */ -#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L1_THRESHOLD_MASK 0x0000ff00 -#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L1_THRESHOLD_ALIGN 0 -#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L1_THRESHOLD_BITS 8 -#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L1_THRESHOLD_SHIFT 8 - -/* PCIE_DLL :: POWER_MANAGEMENT_THRESHOLD :: L0S_THRESHOLD [07:00] */ -#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L0S_THRESHOLD_MASK 0x000000ff -#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L0S_THRESHOLD_ALIGN 0 -#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L0S_THRESHOLD_BITS 8 -#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L0S_THRESHOLD_SHIFT 0 - - -/**************************************************************************** - * PCIE_DLL :: RETRY_BUFFER_WRITE_POINTER_DEBUG - ***************************************************************************/ -/* PCIE_DLL :: RETRY_BUFFER_WRITE_POINTER_DEBUG :: RESERVED_0 [31:11] */ -#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG_RESERVED_0_MASK 0xfffff800 -#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG_RESERVED_0_ALIGN 0 -#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG_RESERVED_0_BITS 21 -#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG_RESERVED_0_SHIFT 11 - -/* PCIE_DLL :: RETRY_BUFFER_WRITE_POINTER_DEBUG :: RETRY_BUFFER_WRITE_POINTER [10:00] */ -#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG_RETRY_BUFFER_WRITE_POINTER_MASK 0x000007ff -#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG_RETRY_BUFFER_WRITE_POINTER_ALIGN 0 -#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG_RETRY_BUFFER_WRITE_POINTER_BITS 11 -#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG_RETRY_BUFFER_WRITE_POINTER_SHIFT 0 - - -/**************************************************************************** - * PCIE_DLL :: RETRY_BUFFER_READ_POINTER_DEBUG - ***************************************************************************/ -/* PCIE_DLL :: RETRY_BUFFER_READ_POINTER_DEBUG :: RESERVED_0 [31:11] */ -#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG_RESERVED_0_MASK 0xfffff800 -#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG_RESERVED_0_ALIGN 0 -#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG_RESERVED_0_BITS 21 -#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG_RESERVED_0_SHIFT 11 - -/* PCIE_DLL :: RETRY_BUFFER_READ_POINTER_DEBUG :: RETRY_BUFFER_READ_POINTER [10:00] */ -#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG_RETRY_BUFFER_READ_POINTER_MASK 0x000007ff -#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG_RETRY_BUFFER_READ_POINTER_ALIGN 0 -#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG_RETRY_BUFFER_READ_POINTER_BITS 11 -#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG_RETRY_BUFFER_READ_POINTER_SHIFT 0 - - -/**************************************************************************** - * PCIE_DLL :: RETRY_BUFFER_PURGED_POINTER_DEBUG - ***************************************************************************/ -/* PCIE_DLL :: RETRY_BUFFER_PURGED_POINTER_DEBUG :: RESERVED_0 [31:11] */ -#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG_RESERVED_0_MASK 0xfffff800 -#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG_RESERVED_0_ALIGN 0 -#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG_RESERVED_0_BITS 21 -#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG_RESERVED_0_SHIFT 11 - -/* PCIE_DLL :: RETRY_BUFFER_PURGED_POINTER_DEBUG :: RETRY_BUFFER_PURGED_POINTER [10:00] */ -#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG_RETRY_BUFFER_PURGED_POINTER_MASK 0x000007ff -#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG_RETRY_BUFFER_PURGED_POINTER_ALIGN 0 -#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG_RETRY_BUFFER_PURGED_POINTER_BITS 11 -#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG_RETRY_BUFFER_PURGED_POINTER_SHIFT 0 - - -/**************************************************************************** - * PCIE_DLL :: RETRY_BUFFER_READ_WRITE_DEBUG_PORT - ***************************************************************************/ -/* PCIE_DLL :: RETRY_BUFFER_READ_WRITE_DEBUG_PORT :: RETRY_BUFFER_DATA [31:00] */ -#define PCIE_DLL_RETRY_BUFFER_READ_WRITE_DEBUG_PORT_RETRY_BUFFER_DATA_MASK 0xffffffff -#define PCIE_DLL_RETRY_BUFFER_READ_WRITE_DEBUG_PORT_RETRY_BUFFER_DATA_ALIGN 0 -#define PCIE_DLL_RETRY_BUFFER_READ_WRITE_DEBUG_PORT_RETRY_BUFFER_DATA_BITS 32 -#define PCIE_DLL_RETRY_BUFFER_READ_WRITE_DEBUG_PORT_RETRY_BUFFER_DATA_SHIFT 0 - - -/**************************************************************************** - * PCIE_DLL :: ERROR_COUNT_THRESHOLD - ***************************************************************************/ -/* PCIE_DLL :: ERROR_COUNT_THRESHOLD :: RESERVED_0 [31:15] */ -#define PCIE_DLL_ERROR_COUNT_THRESHOLD_RESERVED_0_MASK 0xffff8000 -#define PCIE_DLL_ERROR_COUNT_THRESHOLD_RESERVED_0_ALIGN 0 -#define PCIE_DLL_ERROR_COUNT_THRESHOLD_RESERVED_0_BITS 17 -#define PCIE_DLL_ERROR_COUNT_THRESHOLD_RESERVED_0_SHIFT 15 - -/* PCIE_DLL :: ERROR_COUNT_THRESHOLD :: BAD_SEQUENCE_NUMBER_COUNT_THRESHOLD [14:12] */ -#define PCIE_DLL_ERROR_COUNT_THRESHOLD_BAD_SEQUENCE_NUMBER_COUNT_THRESHOLD_MASK 0x00007000 -#define PCIE_DLL_ERROR_COUNT_THRESHOLD_BAD_SEQUENCE_NUMBER_COUNT_THRESHOLD_ALIGN 0 -#define PCIE_DLL_ERROR_COUNT_THRESHOLD_BAD_SEQUENCE_NUMBER_COUNT_THRESHOLD_BITS 3 -#define PCIE_DLL_ERROR_COUNT_THRESHOLD_BAD_SEQUENCE_NUMBER_COUNT_THRESHOLD_SHIFT 12 - -/* PCIE_DLL :: ERROR_COUNT_THRESHOLD :: NAK_RECEIVED_COUNT_THRESHOLD [11:08] */ -#define PCIE_DLL_ERROR_COUNT_THRESHOLD_NAK_RECEIVED_COUNT_THRESHOLD_MASK 0x00000f00 -#define PCIE_DLL_ERROR_COUNT_THRESHOLD_NAK_RECEIVED_COUNT_THRESHOLD_ALIGN 0 -#define PCIE_DLL_ERROR_COUNT_THRESHOLD_NAK_RECEIVED_COUNT_THRESHOLD_BITS 4 -#define PCIE_DLL_ERROR_COUNT_THRESHOLD_NAK_RECEIVED_COUNT_THRESHOLD_SHIFT 8 - -/* PCIE_DLL :: ERROR_COUNT_THRESHOLD :: DLLP_ERROR_COUNT_THRESHOLD [07:04] */ -#define PCIE_DLL_ERROR_COUNT_THRESHOLD_DLLP_ERROR_COUNT_THRESHOLD_MASK 0x000000f0 -#define PCIE_DLL_ERROR_COUNT_THRESHOLD_DLLP_ERROR_COUNT_THRESHOLD_ALIGN 0 -#define PCIE_DLL_ERROR_COUNT_THRESHOLD_DLLP_ERROR_COUNT_THRESHOLD_BITS 4 -#define PCIE_DLL_ERROR_COUNT_THRESHOLD_DLLP_ERROR_COUNT_THRESHOLD_SHIFT 4 - -/* PCIE_DLL :: ERROR_COUNT_THRESHOLD :: TLP_ERROR_COUNT_THRESHOLD [03:00] */ -#define PCIE_DLL_ERROR_COUNT_THRESHOLD_TLP_ERROR_COUNT_THRESHOLD_MASK 0x0000000f -#define PCIE_DLL_ERROR_COUNT_THRESHOLD_TLP_ERROR_COUNT_THRESHOLD_ALIGN 0 -#define PCIE_DLL_ERROR_COUNT_THRESHOLD_TLP_ERROR_COUNT_THRESHOLD_BITS 4 -#define PCIE_DLL_ERROR_COUNT_THRESHOLD_TLP_ERROR_COUNT_THRESHOLD_SHIFT 0 - - -/**************************************************************************** - * PCIE_DLL :: TL_ERROR_COUNTER - ***************************************************************************/ -/* PCIE_DLL :: TL_ERROR_COUNTER :: RESERVED_0 [31:24] */ -#define PCIE_DLL_TL_ERROR_COUNTER_RESERVED_0_MASK 0xff000000 -#define PCIE_DLL_TL_ERROR_COUNTER_RESERVED_0_ALIGN 0 -#define PCIE_DLL_TL_ERROR_COUNTER_RESERVED_0_BITS 8 -#define PCIE_DLL_TL_ERROR_COUNTER_RESERVED_0_SHIFT 24 - -/* PCIE_DLL :: TL_ERROR_COUNTER :: TLP_BAD_SEQUENCE_NUMBER_COUNTER [23:16] */ -#define PCIE_DLL_TL_ERROR_COUNTER_TLP_BAD_SEQUENCE_NUMBER_COUNTER_MASK 0x00ff0000 -#define PCIE_DLL_TL_ERROR_COUNTER_TLP_BAD_SEQUENCE_NUMBER_COUNTER_ALIGN 0 -#define PCIE_DLL_TL_ERROR_COUNTER_TLP_BAD_SEQUENCE_NUMBER_COUNTER_BITS 8 -#define PCIE_DLL_TL_ERROR_COUNTER_TLP_BAD_SEQUENCE_NUMBER_COUNTER_SHIFT 16 - -/* PCIE_DLL :: TL_ERROR_COUNTER :: TLP_ERROR_COUNTER [15:00] */ -#define PCIE_DLL_TL_ERROR_COUNTER_TLP_ERROR_COUNTER_MASK 0x0000ffff -#define PCIE_DLL_TL_ERROR_COUNTER_TLP_ERROR_COUNTER_ALIGN 0 -#define PCIE_DLL_TL_ERROR_COUNTER_TLP_ERROR_COUNTER_BITS 16 -#define PCIE_DLL_TL_ERROR_COUNTER_TLP_ERROR_COUNTER_SHIFT 0 - - -/**************************************************************************** - * PCIE_DLL :: DLLP_ERROR_COUNTER - ***************************************************************************/ -/* PCIE_DLL :: DLLP_ERROR_COUNTER :: RESERVED_0 [31:16] */ -#define PCIE_DLL_DLLP_ERROR_COUNTER_RESERVED_0_MASK 0xffff0000 -#define PCIE_DLL_DLLP_ERROR_COUNTER_RESERVED_0_ALIGN 0 -#define PCIE_DLL_DLLP_ERROR_COUNTER_RESERVED_0_BITS 16 -#define PCIE_DLL_DLLP_ERROR_COUNTER_RESERVED_0_SHIFT 16 - -/* PCIE_DLL :: DLLP_ERROR_COUNTER :: DLLP_ERROR_COUNTER [15:00] */ -#define PCIE_DLL_DLLP_ERROR_COUNTER_DLLP_ERROR_COUNTER_MASK 0x0000ffff -#define PCIE_DLL_DLLP_ERROR_COUNTER_DLLP_ERROR_COUNTER_ALIGN 0 -#define PCIE_DLL_DLLP_ERROR_COUNTER_DLLP_ERROR_COUNTER_BITS 16 -#define PCIE_DLL_DLLP_ERROR_COUNTER_DLLP_ERROR_COUNTER_SHIFT 0 - - -/**************************************************************************** - * PCIE_DLL :: NAK_RECEIVED_COUNTER - ***************************************************************************/ -/* PCIE_DLL :: NAK_RECEIVED_COUNTER :: RESERVED_0 [31:16] */ -#define PCIE_DLL_NAK_RECEIVED_COUNTER_RESERVED_0_MASK 0xffff0000 -#define PCIE_DLL_NAK_RECEIVED_COUNTER_RESERVED_0_ALIGN 0 -#define PCIE_DLL_NAK_RECEIVED_COUNTER_RESERVED_0_BITS 16 -#define PCIE_DLL_NAK_RECEIVED_COUNTER_RESERVED_0_SHIFT 16 - -/* PCIE_DLL :: NAK_RECEIVED_COUNTER :: NAK_RECEIVED_COUNTER [15:00] */ -#define PCIE_DLL_NAK_RECEIVED_COUNTER_NAK_RECEIVED_COUNTER_MASK 0x0000ffff -#define PCIE_DLL_NAK_RECEIVED_COUNTER_NAK_RECEIVED_COUNTER_ALIGN 0 -#define PCIE_DLL_NAK_RECEIVED_COUNTER_NAK_RECEIVED_COUNTER_BITS 16 -#define PCIE_DLL_NAK_RECEIVED_COUNTER_NAK_RECEIVED_COUNTER_SHIFT 0 - - -/**************************************************************************** - * PCIE_DLL :: DATA_LINK_TEST - ***************************************************************************/ -/* PCIE_DLL :: DATA_LINK_TEST :: RESERVED_0 [31:16] */ -#define PCIE_DLL_DATA_LINK_TEST_RESERVED_0_MASK 0xffff0000 -#define PCIE_DLL_DATA_LINK_TEST_RESERVED_0_ALIGN 0 -#define PCIE_DLL_DATA_LINK_TEST_RESERVED_0_BITS 16 -#define PCIE_DLL_DATA_LINK_TEST_RESERVED_0_SHIFT 16 - -/* PCIE_DLL :: DATA_LINK_TEST :: STORE_RECEIVE_TLPS [15:15] */ -#define PCIE_DLL_DATA_LINK_TEST_STORE_RECEIVE_TLPS_MASK 0x00008000 -#define PCIE_DLL_DATA_LINK_TEST_STORE_RECEIVE_TLPS_ALIGN 0 -#define PCIE_DLL_DATA_LINK_TEST_STORE_RECEIVE_TLPS_BITS 1 -#define PCIE_DLL_DATA_LINK_TEST_STORE_RECEIVE_TLPS_SHIFT 15 - -/* PCIE_DLL :: DATA_LINK_TEST :: DISABLE_TLPS [14:14] */ -#define PCIE_DLL_DATA_LINK_TEST_DISABLE_TLPS_MASK 0x00004000 -#define PCIE_DLL_DATA_LINK_TEST_DISABLE_TLPS_ALIGN 0 -#define PCIE_DLL_DATA_LINK_TEST_DISABLE_TLPS_BITS 1 -#define PCIE_DLL_DATA_LINK_TEST_DISABLE_TLPS_SHIFT 14 - -/* PCIE_DLL :: DATA_LINK_TEST :: DISABLE_DLLPS [13:13] */ -#define PCIE_DLL_DATA_LINK_TEST_DISABLE_DLLPS_MASK 0x00002000 -#define PCIE_DLL_DATA_LINK_TEST_DISABLE_DLLPS_ALIGN 0 -#define PCIE_DLL_DATA_LINK_TEST_DISABLE_DLLPS_BITS 1 -#define PCIE_DLL_DATA_LINK_TEST_DISABLE_DLLPS_SHIFT 13 - -/* PCIE_DLL :: DATA_LINK_TEST :: FORCE_PHY_LINK_UP [12:12] */ -#define PCIE_DLL_DATA_LINK_TEST_FORCE_PHY_LINK_UP_MASK 0x00001000 -#define PCIE_DLL_DATA_LINK_TEST_FORCE_PHY_LINK_UP_ALIGN 0 -#define PCIE_DLL_DATA_LINK_TEST_FORCE_PHY_LINK_UP_BITS 1 -#define PCIE_DLL_DATA_LINK_TEST_FORCE_PHY_LINK_UP_SHIFT 12 - -/* PCIE_DLL :: DATA_LINK_TEST :: BYPASS_FLOW_CONTROL [11:11] */ -#define PCIE_DLL_DATA_LINK_TEST_BYPASS_FLOW_CONTROL_MASK 0x00000800 -#define PCIE_DLL_DATA_LINK_TEST_BYPASS_FLOW_CONTROL_ALIGN 0 -#define PCIE_DLL_DATA_LINK_TEST_BYPASS_FLOW_CONTROL_BITS 1 -#define PCIE_DLL_DATA_LINK_TEST_BYPASS_FLOW_CONTROL_SHIFT 11 - -/* PCIE_DLL :: DATA_LINK_TEST :: ENABLE_RAM_CORE_CLOCK_MARGIN_TEST_MODE [10:10] */ -#define PCIE_DLL_DATA_LINK_TEST_ENABLE_RAM_CORE_CLOCK_MARGIN_TEST_MODE_MASK 0x00000400 -#define PCIE_DLL_DATA_LINK_TEST_ENABLE_RAM_CORE_CLOCK_MARGIN_TEST_MODE_ALIGN 0 -#define PCIE_DLL_DATA_LINK_TEST_ENABLE_RAM_CORE_CLOCK_MARGIN_TEST_MODE_BITS 1 -#define PCIE_DLL_DATA_LINK_TEST_ENABLE_RAM_CORE_CLOCK_MARGIN_TEST_MODE_SHIFT 10 - -/* PCIE_DLL :: DATA_LINK_TEST :: ENABLE_RAM_OVERSTRESS_TEST_MODE [09:09] */ -#define PCIE_DLL_DATA_LINK_TEST_ENABLE_RAM_OVERSTRESS_TEST_MODE_MASK 0x00000200 -#define PCIE_DLL_DATA_LINK_TEST_ENABLE_RAM_OVERSTRESS_TEST_MODE_ALIGN 0 -#define PCIE_DLL_DATA_LINK_TEST_ENABLE_RAM_OVERSTRESS_TEST_MODE_BITS 1 -#define PCIE_DLL_DATA_LINK_TEST_ENABLE_RAM_OVERSTRESS_TEST_MODE_SHIFT 9 - -/* PCIE_DLL :: DATA_LINK_TEST :: SPEED_UP_SLOW_CLOCK [08:08] */ -#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_SLOW_CLOCK_MASK 0x00000100 -#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_SLOW_CLOCK_ALIGN 0 -#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_SLOW_CLOCK_BITS 1 -#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_SLOW_CLOCK_SHIFT 8 - -/* PCIE_DLL :: DATA_LINK_TEST :: SPEED_UP_COMPLETION_TIMER [07:07] */ -#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_COMPLETION_TIMER_MASK 0x00000080 -#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_COMPLETION_TIMER_ALIGN 0 -#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_COMPLETION_TIMER_BITS 1 -#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_COMPLETION_TIMER_SHIFT 7 - -/* PCIE_DLL :: DATA_LINK_TEST :: SPEED_UP_REPLAY_TIMER [06:06] */ -#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_REPLAY_TIMER_MASK 0x00000040 -#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_REPLAY_TIMER_ALIGN 0 -#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_REPLAY_TIMER_BITS 1 -#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_REPLAY_TIMER_SHIFT 6 - -/* PCIE_DLL :: DATA_LINK_TEST :: SPEED_UP_ACK_LATENCY_TIMER [05:05] */ -#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_ACK_LATENCY_TIMER_MASK 0x00000020 -#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_ACK_LATENCY_TIMER_ALIGN 0 -#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_ACK_LATENCY_TIMER_BITS 1 -#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_ACK_LATENCY_TIMER_SHIFT 5 - -/* PCIE_DLL :: DATA_LINK_TEST :: SPEED_UP_PME_SERVICE_TIMER [04:04] */ -#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_PME_SERVICE_TIMER_MASK 0x00000010 -#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_PME_SERVICE_TIMER_ALIGN 0 -#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_PME_SERVICE_TIMER_BITS 1 -#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_PME_SERVICE_TIMER_SHIFT 4 - -/* PCIE_DLL :: DATA_LINK_TEST :: FORCE_PURGE [03:03] */ -#define PCIE_DLL_DATA_LINK_TEST_FORCE_PURGE_MASK 0x00000008 -#define PCIE_DLL_DATA_LINK_TEST_FORCE_PURGE_ALIGN 0 -#define PCIE_DLL_DATA_LINK_TEST_FORCE_PURGE_BITS 1 -#define PCIE_DLL_DATA_LINK_TEST_FORCE_PURGE_SHIFT 3 - -/* PCIE_DLL :: DATA_LINK_TEST :: FORCE_RETRY [02:02] */ -#define PCIE_DLL_DATA_LINK_TEST_FORCE_RETRY_MASK 0x00000004 -#define PCIE_DLL_DATA_LINK_TEST_FORCE_RETRY_ALIGN 0 -#define PCIE_DLL_DATA_LINK_TEST_FORCE_RETRY_BITS 1 -#define PCIE_DLL_DATA_LINK_TEST_FORCE_RETRY_SHIFT 2 - -/* PCIE_DLL :: DATA_LINK_TEST :: INVERT_CRC [01:01] */ -#define PCIE_DLL_DATA_LINK_TEST_INVERT_CRC_MASK 0x00000002 -#define PCIE_DLL_DATA_LINK_TEST_INVERT_CRC_ALIGN 0 -#define PCIE_DLL_DATA_LINK_TEST_INVERT_CRC_BITS 1 -#define PCIE_DLL_DATA_LINK_TEST_INVERT_CRC_SHIFT 1 - -/* PCIE_DLL :: DATA_LINK_TEST :: SEND_BAD_CRC_BIT [00:00] */ -#define PCIE_DLL_DATA_LINK_TEST_SEND_BAD_CRC_BIT_MASK 0x00000001 -#define PCIE_DLL_DATA_LINK_TEST_SEND_BAD_CRC_BIT_ALIGN 0 -#define PCIE_DLL_DATA_LINK_TEST_SEND_BAD_CRC_BIT_BITS 1 -#define PCIE_DLL_DATA_LINK_TEST_SEND_BAD_CRC_BIT_SHIFT 0 - - -/**************************************************************************** - * PCIE_DLL :: PACKET_BIST - ***************************************************************************/ -/* PCIE_DLL :: PACKET_BIST :: RESERVED_0 [31:24] */ -#define PCIE_DLL_PACKET_BIST_RESERVED_0_MASK 0xff000000 -#define PCIE_DLL_PACKET_BIST_RESERVED_0_ALIGN 0 -#define PCIE_DLL_PACKET_BIST_RESERVED_0_BITS 8 -#define PCIE_DLL_PACKET_BIST_RESERVED_0_SHIFT 24 - -/* PCIE_DLL :: PACKET_BIST :: PACKET_CHECKER_LOCKED [23:23] */ -#define PCIE_DLL_PACKET_BIST_PACKET_CHECKER_LOCKED_MASK 0x00800000 -#define PCIE_DLL_PACKET_BIST_PACKET_CHECKER_LOCKED_ALIGN 0 -#define PCIE_DLL_PACKET_BIST_PACKET_CHECKER_LOCKED_BITS 1 -#define PCIE_DLL_PACKET_BIST_PACKET_CHECKER_LOCKED_SHIFT 23 - -/* PCIE_DLL :: PACKET_BIST :: RECEIVE_MISMATCH [22:22] */ -#define PCIE_DLL_PACKET_BIST_RECEIVE_MISMATCH_MASK 0x00400000 -#define PCIE_DLL_PACKET_BIST_RECEIVE_MISMATCH_ALIGN 0 -#define PCIE_DLL_PACKET_BIST_RECEIVE_MISMATCH_BITS 1 -#define PCIE_DLL_PACKET_BIST_RECEIVE_MISMATCH_SHIFT 22 - -/* PCIE_DLL :: PACKET_BIST :: ENABLE_RANDOM_TLP_LENGTH [21:21] */ -#define PCIE_DLL_PACKET_BIST_ENABLE_RANDOM_TLP_LENGTH_MASK 0x00200000 -#define PCIE_DLL_PACKET_BIST_ENABLE_RANDOM_TLP_LENGTH_ALIGN 0 -#define PCIE_DLL_PACKET_BIST_ENABLE_RANDOM_TLP_LENGTH_BITS 1 -#define PCIE_DLL_PACKET_BIST_ENABLE_RANDOM_TLP_LENGTH_SHIFT 21 - -/* PCIE_DLL :: PACKET_BIST :: TLP_LENGTH [20:10] */ -#define PCIE_DLL_PACKET_BIST_TLP_LENGTH_MASK 0x001ffc00 -#define PCIE_DLL_PACKET_BIST_TLP_LENGTH_ALIGN 0 -#define PCIE_DLL_PACKET_BIST_TLP_LENGTH_BITS 11 -#define PCIE_DLL_PACKET_BIST_TLP_LENGTH_SHIFT 10 - -/* PCIE_DLL :: PACKET_BIST :: ENABLE_RANDOM_IPG_LENGTH [09:09] */ -#define PCIE_DLL_PACKET_BIST_ENABLE_RANDOM_IPG_LENGTH_MASK 0x00000200 -#define PCIE_DLL_PACKET_BIST_ENABLE_RANDOM_IPG_LENGTH_ALIGN 0 -#define PCIE_DLL_PACKET_BIST_ENABLE_RANDOM_IPG_LENGTH_BITS 1 -#define PCIE_DLL_PACKET_BIST_ENABLE_RANDOM_IPG_LENGTH_SHIFT 9 - -/* PCIE_DLL :: PACKET_BIST :: IPG_LENGTH [08:02] */ -#define PCIE_DLL_PACKET_BIST_IPG_LENGTH_MASK 0x000001fc -#define PCIE_DLL_PACKET_BIST_IPG_LENGTH_ALIGN 0 -#define PCIE_DLL_PACKET_BIST_IPG_LENGTH_BITS 7 -#define PCIE_DLL_PACKET_BIST_IPG_LENGTH_SHIFT 2 - -/* PCIE_DLL :: PACKET_BIST :: TRANSMIT_START [01:01] */ -#define PCIE_DLL_PACKET_BIST_TRANSMIT_START_MASK 0x00000002 -#define PCIE_DLL_PACKET_BIST_TRANSMIT_START_ALIGN 0 -#define PCIE_DLL_PACKET_BIST_TRANSMIT_START_BITS 1 -#define PCIE_DLL_PACKET_BIST_TRANSMIT_START_SHIFT 1 - -/* PCIE_DLL :: PACKET_BIST :: ENABLE_PACKET_GENERATOR_TEST_MODE [00:00] */ -#define PCIE_DLL_PACKET_BIST_ENABLE_PACKET_GENERATOR_TEST_MODE_MASK 0x00000001 -#define PCIE_DLL_PACKET_BIST_ENABLE_PACKET_GENERATOR_TEST_MODE_ALIGN 0 -#define PCIE_DLL_PACKET_BIST_ENABLE_PACKET_GENERATOR_TEST_MODE_BITS 1 -#define PCIE_DLL_PACKET_BIST_ENABLE_PACKET_GENERATOR_TEST_MODE_SHIFT 0 - - -/**************************************************************************** - * PCIE_DLL :: LINK_PCIE_1_1_CONTROL - ***************************************************************************/ -/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: RTBF_CT_2_0 [31:29] */ -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_RTBF_CT_2_0_MASK 0xe0000000 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_RTBF_CT_2_0_ALIGN 0 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_RTBF_CT_2_0_BITS 3 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_RTBF_CT_2_0_SHIFT 29 - -/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: RTBF_SAM_1_0 [28:27] */ -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_RTBF_SAM_1_0_MASK 0x18000000 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_RTBF_SAM_1_0_ALIGN 0 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_RTBF_SAM_1_0_BITS 2 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_RTBF_SAM_1_0_SHIFT 27 - -/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: UNUSED_0 [26:10] */ -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_UNUSED_0_MASK 0x07fffc00 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_UNUSED_0_ALIGN 0 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_UNUSED_0_BITS 17 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_UNUSED_0_SHIFT 10 - -/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: SELOCALXTAL [09:09] */ -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_SELOCALXTAL_MASK 0x00000200 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_SELOCALXTAL_ALIGN 0 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_SELOCALXTAL_BITS 1 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_SELOCALXTAL_SHIFT 9 - -/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: L2_PLL_POWERDOWN_DISABLE [08:08] */ -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L2_PLL_POWERDOWN_DISABLE_MASK 0x00000100 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L2_PLL_POWERDOWN_DISABLE_ALIGN 0 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L2_PLL_POWERDOWN_DISABLE_BITS 1 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L2_PLL_POWERDOWN_DISABLE_SHIFT 8 - -/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: L1_PLL_POWERDOWN_DISABLE [07:07] */ -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_PLL_POWERDOWN_DISABLE_MASK 0x00000080 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_PLL_POWERDOWN_DISABLE_ALIGN 0 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_PLL_POWERDOWN_DISABLE_BITS 1 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_PLL_POWERDOWN_DISABLE_SHIFT 7 - -/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: L2_D3PM_CLKREQ_DISABLE [06:06] */ -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L2_D3PM_CLKREQ_DISABLE_MASK 0x00000040 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L2_D3PM_CLKREQ_DISABLE_ALIGN 0 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L2_D3PM_CLKREQ_DISABLE_BITS 1 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L2_D3PM_CLKREQ_DISABLE_SHIFT 6 - -/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: L1_D3PM_CLKREQ_DISABLE [05:05] */ -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_D3PM_CLKREQ_DISABLE_MASK 0x00000020 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_D3PM_CLKREQ_DISABLE_ALIGN 0 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_D3PM_CLKREQ_DISABLE_BITS 1 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_D3PM_CLKREQ_DISABLE_SHIFT 5 - -/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: L1_ASPM_CLKREQ_DISABLE [04:04] */ -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_ASPM_CLKREQ_DISABLE_MASK 0x00000010 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_ASPM_CLKREQ_DISABLE_ALIGN 0 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_ASPM_CLKREQ_DISABLE_BITS 1 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_ASPM_CLKREQ_DISABLE_SHIFT 4 - -/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: L1_PLL_PD_W_O_CLKREQ [03:03] */ -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_PLL_PD_W_O_CLKREQ_MASK 0x00000008 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_PLL_PD_W_O_CLKREQ_ALIGN 0 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_PLL_PD_W_O_CLKREQ_BITS 1 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_PLL_PD_W_O_CLKREQ_SHIFT 3 - -/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: DASPM10USTIMER [02:02] */ -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DASPM10USTIMER_MASK 0x00000004 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DASPM10USTIMER_ALIGN 0 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DASPM10USTIMER_BITS 1 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DASPM10USTIMER_SHIFT 2 - -/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: DFFU_EL1 [01:01] */ -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DFFU_EL1_MASK 0x00000002 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DFFU_EL1_ALIGN 0 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DFFU_EL1_BITS 1 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DFFU_EL1_SHIFT 1 - -/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: DFLOWCTLUPDATE1_1 [00:00] */ -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DFLOWCTLUPDATE1_1_MASK 0x00000001 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DFLOWCTLUPDATE1_1_ALIGN 0 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DFLOWCTLUPDATE1_1_BITS 1 -#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DFLOWCTLUPDATE1_1_SHIFT 0 - - -/**************************************************************************** - * BCM70012_TGT_TOP_PCIE_PHY - ***************************************************************************/ -/**************************************************************************** - * PCIE_PHY :: PHY_MODE - ***************************************************************************/ -/* PCIE_PHY :: PHY_MODE :: RESERVED_0 [31:04] */ -#define PCIE_PHY_PHY_MODE_RESERVED_0_MASK 0xfffffff0 -#define PCIE_PHY_PHY_MODE_RESERVED_0_ALIGN 0 -#define PCIE_PHY_PHY_MODE_RESERVED_0_BITS 28 -#define PCIE_PHY_PHY_MODE_RESERVED_0_SHIFT 4 - -/* PCIE_PHY :: PHY_MODE :: UPSTREAM_DEV [03:03] */ -#define PCIE_PHY_PHY_MODE_UPSTREAM_DEV_MASK 0x00000008 -#define PCIE_PHY_PHY_MODE_UPSTREAM_DEV_ALIGN 0 -#define PCIE_PHY_PHY_MODE_UPSTREAM_DEV_BITS 1 -#define PCIE_PHY_PHY_MODE_UPSTREAM_DEV_SHIFT 3 - -/* PCIE_PHY :: PHY_MODE :: SERDES_SA_MODE [02:02] */ -#define PCIE_PHY_PHY_MODE_SERDES_SA_MODE_MASK 0x00000004 -#define PCIE_PHY_PHY_MODE_SERDES_SA_MODE_ALIGN 0 -#define PCIE_PHY_PHY_MODE_SERDES_SA_MODE_BITS 1 -#define PCIE_PHY_PHY_MODE_SERDES_SA_MODE_SHIFT 2 - -/* PCIE_PHY :: PHY_MODE :: LINK_DISABLE [01:01] */ -#define PCIE_PHY_PHY_MODE_LINK_DISABLE_MASK 0x00000002 -#define PCIE_PHY_PHY_MODE_LINK_DISABLE_ALIGN 0 -#define PCIE_PHY_PHY_MODE_LINK_DISABLE_BITS 1 -#define PCIE_PHY_PHY_MODE_LINK_DISABLE_SHIFT 1 - -/* PCIE_PHY :: PHY_MODE :: SOFT_RESET [00:00] */ -#define PCIE_PHY_PHY_MODE_SOFT_RESET_MASK 0x00000001 -#define PCIE_PHY_PHY_MODE_SOFT_RESET_ALIGN 0 -#define PCIE_PHY_PHY_MODE_SOFT_RESET_BITS 1 -#define PCIE_PHY_PHY_MODE_SOFT_RESET_SHIFT 0 - - -/**************************************************************************** - * PCIE_PHY :: PHY_LINK_STATUS - ***************************************************************************/ -/* PCIE_PHY :: PHY_LINK_STATUS :: RESERVED_0 [31:10] */ -#define PCIE_PHY_PHY_LINK_STATUS_RESERVED_0_MASK 0xfffffc00 -#define PCIE_PHY_PHY_LINK_STATUS_RESERVED_0_ALIGN 0 -#define PCIE_PHY_PHY_LINK_STATUS_RESERVED_0_BITS 22 -#define PCIE_PHY_PHY_LINK_STATUS_RESERVED_0_SHIFT 10 - -/* PCIE_PHY :: PHY_LINK_STATUS :: BUFFER_OVERRUN [09:09] */ -#define PCIE_PHY_PHY_LINK_STATUS_BUFFER_OVERRUN_MASK 0x00000200 -#define PCIE_PHY_PHY_LINK_STATUS_BUFFER_OVERRUN_ALIGN 0 -#define PCIE_PHY_PHY_LINK_STATUS_BUFFER_OVERRUN_BITS 1 -#define PCIE_PHY_PHY_LINK_STATUS_BUFFER_OVERRUN_SHIFT 9 - -/* PCIE_PHY :: PHY_LINK_STATUS :: BUFFER_UNDERRUN [08:08] */ -#define PCIE_PHY_PHY_LINK_STATUS_BUFFER_UNDERRUN_MASK 0x00000100 -#define PCIE_PHY_PHY_LINK_STATUS_BUFFER_UNDERRUN_ALIGN 0 -#define PCIE_PHY_PHY_LINK_STATUS_BUFFER_UNDERRUN_BITS 1 -#define PCIE_PHY_PHY_LINK_STATUS_BUFFER_UNDERRUN_SHIFT 8 - -/* PCIE_PHY :: PHY_LINK_STATUS :: LINK_PARTNER_REQUEST_LOOPBACK [07:07] */ -#define PCIE_PHY_PHY_LINK_STATUS_LINK_PARTNER_REQUEST_LOOPBACK_MASK 0x00000080 -#define PCIE_PHY_PHY_LINK_STATUS_LINK_PARTNER_REQUEST_LOOPBACK_ALIGN 0 -#define PCIE_PHY_PHY_LINK_STATUS_LINK_PARTNER_REQUEST_LOOPBACK_BITS 1 -#define PCIE_PHY_PHY_LINK_STATUS_LINK_PARTNER_REQUEST_LOOPBACK_SHIFT 7 - -/* PCIE_PHY :: PHY_LINK_STATUS :: LINK_PARTNER_DISABLE_SCRAMBLER [06:06] */ -#define PCIE_PHY_PHY_LINK_STATUS_LINK_PARTNER_DISABLE_SCRAMBLER_MASK 0x00000040 -#define PCIE_PHY_PHY_LINK_STATUS_LINK_PARTNER_DISABLE_SCRAMBLER_ALIGN 0 -#define PCIE_PHY_PHY_LINK_STATUS_LINK_PARTNER_DISABLE_SCRAMBLER_BITS 1 -#define PCIE_PHY_PHY_LINK_STATUS_LINK_PARTNER_DISABLE_SCRAMBLER_SHIFT 6 - -/* PCIE_PHY :: PHY_LINK_STATUS :: EXTENDED_SYNCH [05:05] */ -#define PCIE_PHY_PHY_LINK_STATUS_EXTENDED_SYNCH_MASK 0x00000020 -#define PCIE_PHY_PHY_LINK_STATUS_EXTENDED_SYNCH_ALIGN 0 -#define PCIE_PHY_PHY_LINK_STATUS_EXTENDED_SYNCH_BITS 1 -#define PCIE_PHY_PHY_LINK_STATUS_EXTENDED_SYNCH_SHIFT 5 - -/* PCIE_PHY :: PHY_LINK_STATUS :: POLARITY_INVERTED [04:04] */ -#define PCIE_PHY_PHY_LINK_STATUS_POLARITY_INVERTED_MASK 0x00000010 -#define PCIE_PHY_PHY_LINK_STATUS_POLARITY_INVERTED_ALIGN 0 -#define PCIE_PHY_PHY_LINK_STATUS_POLARITY_INVERTED_BITS 1 -#define PCIE_PHY_PHY_LINK_STATUS_POLARITY_INVERTED_SHIFT 4 - -/* PCIE_PHY :: PHY_LINK_STATUS :: LINK_UP [03:03] */ -#define PCIE_PHY_PHY_LINK_STATUS_LINK_UP_MASK 0x00000008 -#define PCIE_PHY_PHY_LINK_STATUS_LINK_UP_ALIGN 0 -#define PCIE_PHY_PHY_LINK_STATUS_LINK_UP_BITS 1 -#define PCIE_PHY_PHY_LINK_STATUS_LINK_UP_SHIFT 3 - -/* PCIE_PHY :: PHY_LINK_STATUS :: LINK_TRAINING [02:02] */ -#define PCIE_PHY_PHY_LINK_STATUS_LINK_TRAINING_MASK 0x00000004 -#define PCIE_PHY_PHY_LINK_STATUS_LINK_TRAINING_ALIGN 0 -#define PCIE_PHY_PHY_LINK_STATUS_LINK_TRAINING_BITS 1 -#define PCIE_PHY_PHY_LINK_STATUS_LINK_TRAINING_SHIFT 2 - -/* PCIE_PHY :: PHY_LINK_STATUS :: RECEIVE_DATA_VALID [01:01] */ -#define PCIE_PHY_PHY_LINK_STATUS_RECEIVE_DATA_VALID_MASK 0x00000002 -#define PCIE_PHY_PHY_LINK_STATUS_RECEIVE_DATA_VALID_ALIGN 0 -#define PCIE_PHY_PHY_LINK_STATUS_RECEIVE_DATA_VALID_BITS 1 -#define PCIE_PHY_PHY_LINK_STATUS_RECEIVE_DATA_VALID_SHIFT 1 - -/* PCIE_PHY :: PHY_LINK_STATUS :: RESERVED_1 [00:00] */ -#define PCIE_PHY_PHY_LINK_STATUS_RESERVED_1_MASK 0x00000001 -#define PCIE_PHY_PHY_LINK_STATUS_RESERVED_1_ALIGN 0 -#define PCIE_PHY_PHY_LINK_STATUS_RESERVED_1_BITS 1 -#define PCIE_PHY_PHY_LINK_STATUS_RESERVED_1_SHIFT 0 - - -/**************************************************************************** - * PCIE_PHY :: PHY_LINK_LTSSM_CONTROL - ***************************************************************************/ -/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: RESERVED_0 [31:08] */ -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RESERVED_0_MASK 0xffffff00 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RESERVED_0_ALIGN 0 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RESERVED_0_BITS 24 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RESERVED_0_SHIFT 8 - -/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: DISABLESCRAMBLE [07:07] */ -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DISABLESCRAMBLE_MASK 0x00000080 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DISABLESCRAMBLE_ALIGN 0 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DISABLESCRAMBLE_BITS 1 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DISABLESCRAMBLE_SHIFT 7 - -/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: DETECTSTATE [06:06] */ -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DETECTSTATE_MASK 0x00000040 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DETECTSTATE_ALIGN 0 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DETECTSTATE_BITS 1 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DETECTSTATE_SHIFT 6 - -/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: POLLINGSTATE [05:05] */ -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_POLLINGSTATE_MASK 0x00000020 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_POLLINGSTATE_ALIGN 0 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_POLLINGSTATE_BITS 1 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_POLLINGSTATE_SHIFT 5 - -/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: CONFIGSTATE [04:04] */ -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_CONFIGSTATE_MASK 0x00000010 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_CONFIGSTATE_ALIGN 0 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_CONFIGSTATE_BITS 1 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_CONFIGSTATE_SHIFT 4 - -/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: RECOVSTATE [03:03] */ -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RECOVSTATE_MASK 0x00000008 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RECOVSTATE_ALIGN 0 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RECOVSTATE_BITS 1 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RECOVSTATE_SHIFT 3 - -/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: EXTLBSTATE [02:02] */ -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_EXTLBSTATE_MASK 0x00000004 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_EXTLBSTATE_ALIGN 0 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_EXTLBSTATE_BITS 1 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_EXTLBSTATE_SHIFT 2 - -/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: RESETSTATE [01:01] */ -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RESETSTATE_MASK 0x00000002 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RESETSTATE_ALIGN 0 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RESETSTATE_BITS 1 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RESETSTATE_SHIFT 1 - -/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: DISABLESTATE [00:00] */ -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DISABLESTATE_MASK 0x00000001 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DISABLESTATE_ALIGN 0 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DISABLESTATE_BITS 1 -#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DISABLESTATE_SHIFT 0 - - -/**************************************************************************** - * PCIE_PHY :: PHY_LINK_TRAINING_LINK_NUMBER - ***************************************************************************/ -/* PCIE_PHY :: PHY_LINK_TRAINING_LINK_NUMBER :: RESERVED_0 [31:08] */ -#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER_RESERVED_0_MASK 0xffffff00 -#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER_RESERVED_0_ALIGN 0 -#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER_RESERVED_0_BITS 24 -#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER_RESERVED_0_SHIFT 8 - -/* PCIE_PHY :: PHY_LINK_TRAINING_LINK_NUMBER :: LANE_NUMBER [07:00] */ -#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER_LANE_NUMBER_MASK 0x000000ff -#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER_LANE_NUMBER_ALIGN 0 -#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER_LANE_NUMBER_BITS 8 -#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER_LANE_NUMBER_SHIFT 0 - - -/**************************************************************************** - * PCIE_PHY :: PHY_LINK_TRAINING_LANE_NUMBER - ***************************************************************************/ -/* PCIE_PHY :: PHY_LINK_TRAINING_LANE_NUMBER :: RESERVED_0 [31:08] */ -#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER_RESERVED_0_MASK 0xffffff00 -#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER_RESERVED_0_ALIGN 0 -#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER_RESERVED_0_BITS 24 -#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER_RESERVED_0_SHIFT 8 - -/* PCIE_PHY :: PHY_LINK_TRAINING_LANE_NUMBER :: LANE_NUMBER [07:00] */ -#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER_LANE_NUMBER_MASK 0x000000ff -#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER_LANE_NUMBER_ALIGN 0 -#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER_LANE_NUMBER_BITS 8 -#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER_LANE_NUMBER_SHIFT 0 - - -/**************************************************************************** - * PCIE_PHY :: PHY_LINK_TRAINING_N_FTS - ***************************************************************************/ -/* PCIE_PHY :: PHY_LINK_TRAINING_N_FTS :: RESERVED_0 [31:25] */ -#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_RESERVED_0_MASK 0xfe000000 -#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_RESERVED_0_ALIGN 0 -#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_RESERVED_0_BITS 7 -#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_RESERVED_0_SHIFT 25 - -/* PCIE_PHY :: PHY_LINK_TRAINING_N_FTS :: TRANSMITTER_N_FTS_OVERRIDE [24:24] */ -#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_OVERRIDE_MASK 0x01000000 -#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_OVERRIDE_ALIGN 0 -#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_OVERRIDE_BITS 1 -#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_OVERRIDE_SHIFT 24 - -/* PCIE_PHY :: PHY_LINK_TRAINING_N_FTS :: TRANSMITTER_N_FTS_OVERRIDE_VALUE [23:16] */ -#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_OVERRIDE_VALUE_MASK 0x00ff0000 -#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_OVERRIDE_VALUE_ALIGN 0 -#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_OVERRIDE_VALUE_BITS 8 -#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_OVERRIDE_VALUE_SHIFT 16 - -/* PCIE_PHY :: PHY_LINK_TRAINING_N_FTS :: TRANSMITTER_N_FTS [15:08] */ -#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_MASK 0x0000ff00 -#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_ALIGN 0 -#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_BITS 8 -#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_SHIFT 8 - -/* PCIE_PHY :: PHY_LINK_TRAINING_N_FTS :: RECEIVER_N_FTS [07:00] */ -#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_RECEIVER_N_FTS_MASK 0x000000ff -#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_RECEIVER_N_FTS_ALIGN 0 -#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_RECEIVER_N_FTS_BITS 8 -#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_RECEIVER_N_FTS_SHIFT 0 - - -/**************************************************************************** - * PCIE_PHY :: PHY_ATTENTION - ***************************************************************************/ -/* PCIE_PHY :: PHY_ATTENTION :: RESERVED_0 [31:08] */ -#define PCIE_PHY_PHY_ATTENTION_RESERVED_0_MASK 0xffffff00 -#define PCIE_PHY_PHY_ATTENTION_RESERVED_0_ALIGN 0 -#define PCIE_PHY_PHY_ATTENTION_RESERVED_0_BITS 24 -#define PCIE_PHY_PHY_ATTENTION_RESERVED_0_SHIFT 8 - -/* PCIE_PHY :: PHY_ATTENTION :: HOT_RESET [07:07] */ -#define PCIE_PHY_PHY_ATTENTION_HOT_RESET_MASK 0x00000080 -#define PCIE_PHY_PHY_ATTENTION_HOT_RESET_ALIGN 0 -#define PCIE_PHY_PHY_ATTENTION_HOT_RESET_BITS 1 -#define PCIE_PHY_PHY_ATTENTION_HOT_RESET_SHIFT 7 - -/* PCIE_PHY :: PHY_ATTENTION :: LINK_DOWN [06:06] */ -#define PCIE_PHY_PHY_ATTENTION_LINK_DOWN_MASK 0x00000040 -#define PCIE_PHY_PHY_ATTENTION_LINK_DOWN_ALIGN 0 -#define PCIE_PHY_PHY_ATTENTION_LINK_DOWN_BITS 1 -#define PCIE_PHY_PHY_ATTENTION_LINK_DOWN_SHIFT 6 - -/* PCIE_PHY :: PHY_ATTENTION :: TRAINING_ERROR [05:05] */ -#define PCIE_PHY_PHY_ATTENTION_TRAINING_ERROR_MASK 0x00000020 -#define PCIE_PHY_PHY_ATTENTION_TRAINING_ERROR_ALIGN 0 -#define PCIE_PHY_PHY_ATTENTION_TRAINING_ERROR_BITS 1 -#define PCIE_PHY_PHY_ATTENTION_TRAINING_ERROR_SHIFT 5 - -/* PCIE_PHY :: PHY_ATTENTION :: BUFFER_OVERRUN [04:04] */ -#define PCIE_PHY_PHY_ATTENTION_BUFFER_OVERRUN_MASK 0x00000010 -#define PCIE_PHY_PHY_ATTENTION_BUFFER_OVERRUN_ALIGN 0 -#define PCIE_PHY_PHY_ATTENTION_BUFFER_OVERRUN_BITS 1 -#define PCIE_PHY_PHY_ATTENTION_BUFFER_OVERRUN_SHIFT 4 - -/* PCIE_PHY :: PHY_ATTENTION :: BUFFER_UNDERRUN [03:03] */ -#define PCIE_PHY_PHY_ATTENTION_BUFFER_UNDERRUN_MASK 0x00000008 -#define PCIE_PHY_PHY_ATTENTION_BUFFER_UNDERRUN_ALIGN 0 -#define PCIE_PHY_PHY_ATTENTION_BUFFER_UNDERRUN_BITS 1 -#define PCIE_PHY_PHY_ATTENTION_BUFFER_UNDERRUN_SHIFT 3 - -/* PCIE_PHY :: PHY_ATTENTION :: RECEIVE_FRAMING_ERROR [02:02] */ -#define PCIE_PHY_PHY_ATTENTION_RECEIVE_FRAMING_ERROR_MASK 0x00000004 -#define PCIE_PHY_PHY_ATTENTION_RECEIVE_FRAMING_ERROR_ALIGN 0 -#define PCIE_PHY_PHY_ATTENTION_RECEIVE_FRAMING_ERROR_BITS 1 -#define PCIE_PHY_PHY_ATTENTION_RECEIVE_FRAMING_ERROR_SHIFT 2 - -/* PCIE_PHY :: PHY_ATTENTION :: RECEIVE_DISPARITY_ERROR [01:01] */ -#define PCIE_PHY_PHY_ATTENTION_RECEIVE_DISPARITY_ERROR_MASK 0x00000002 -#define PCIE_PHY_PHY_ATTENTION_RECEIVE_DISPARITY_ERROR_ALIGN 0 -#define PCIE_PHY_PHY_ATTENTION_RECEIVE_DISPARITY_ERROR_BITS 1 -#define PCIE_PHY_PHY_ATTENTION_RECEIVE_DISPARITY_ERROR_SHIFT 1 - -/* PCIE_PHY :: PHY_ATTENTION :: RECEIVE_CODE_ERROR [00:00] */ -#define PCIE_PHY_PHY_ATTENTION_RECEIVE_CODE_ERROR_MASK 0x00000001 -#define PCIE_PHY_PHY_ATTENTION_RECEIVE_CODE_ERROR_ALIGN 0 -#define PCIE_PHY_PHY_ATTENTION_RECEIVE_CODE_ERROR_BITS 1 -#define PCIE_PHY_PHY_ATTENTION_RECEIVE_CODE_ERROR_SHIFT 0 - - -/**************************************************************************** - * PCIE_PHY :: PHY_ATTENTION_MASK - ***************************************************************************/ -/* PCIE_PHY :: PHY_ATTENTION_MASK :: RESERVED_0 [31:08] */ -#define PCIE_PHY_PHY_ATTENTION_MASK_RESERVED_0_MASK 0xffffff00 -#define PCIE_PHY_PHY_ATTENTION_MASK_RESERVED_0_ALIGN 0 -#define PCIE_PHY_PHY_ATTENTION_MASK_RESERVED_0_BITS 24 -#define PCIE_PHY_PHY_ATTENTION_MASK_RESERVED_0_SHIFT 8 - -/* PCIE_PHY :: PHY_ATTENTION_MASK :: HOT_RESET_MASK [07:07] */ -#define PCIE_PHY_PHY_ATTENTION_MASK_HOT_RESET_MASK_MASK 0x00000080 -#define PCIE_PHY_PHY_ATTENTION_MASK_HOT_RESET_MASK_ALIGN 0 -#define PCIE_PHY_PHY_ATTENTION_MASK_HOT_RESET_MASK_BITS 1 -#define PCIE_PHY_PHY_ATTENTION_MASK_HOT_RESET_MASK_SHIFT 7 - -/* PCIE_PHY :: PHY_ATTENTION_MASK :: LINK_DOWN_MASK [06:06] */ -#define PCIE_PHY_PHY_ATTENTION_MASK_LINK_DOWN_MASK_MASK 0x00000040 -#define PCIE_PHY_PHY_ATTENTION_MASK_LINK_DOWN_MASK_ALIGN 0 -#define PCIE_PHY_PHY_ATTENTION_MASK_LINK_DOWN_MASK_BITS 1 -#define PCIE_PHY_PHY_ATTENTION_MASK_LINK_DOWN_MASK_SHIFT 6 - -/* PCIE_PHY :: PHY_ATTENTION_MASK :: TRAINING_ERROR_MASK [05:05] */ -#define PCIE_PHY_PHY_ATTENTION_MASK_TRAINING_ERROR_MASK_MASK 0x00000020 -#define PCIE_PHY_PHY_ATTENTION_MASK_TRAINING_ERROR_MASK_ALIGN 0 -#define PCIE_PHY_PHY_ATTENTION_MASK_TRAINING_ERROR_MASK_BITS 1 -#define PCIE_PHY_PHY_ATTENTION_MASK_TRAINING_ERROR_MASK_SHIFT 5 - -/* PCIE_PHY :: PHY_ATTENTION_MASK :: BUFFER_OVERRUN_MASK [04:04] */ -#define PCIE_PHY_PHY_ATTENTION_MASK_BUFFER_OVERRUN_MASK_MASK 0x00000010 -#define PCIE_PHY_PHY_ATTENTION_MASK_BUFFER_OVERRUN_MASK_ALIGN 0 -#define PCIE_PHY_PHY_ATTENTION_MASK_BUFFER_OVERRUN_MASK_BITS 1 -#define PCIE_PHY_PHY_ATTENTION_MASK_BUFFER_OVERRUN_MASK_SHIFT 4 - -/* PCIE_PHY :: PHY_ATTENTION_MASK :: BUFFER_UNDERRUN_MASK [03:03] */ -#define PCIE_PHY_PHY_ATTENTION_MASK_BUFFER_UNDERRUN_MASK_MASK 0x00000008 -#define PCIE_PHY_PHY_ATTENTION_MASK_BUFFER_UNDERRUN_MASK_ALIGN 0 -#define PCIE_PHY_PHY_ATTENTION_MASK_BUFFER_UNDERRUN_MASK_BITS 1 -#define PCIE_PHY_PHY_ATTENTION_MASK_BUFFER_UNDERRUN_MASK_SHIFT 3 - -/* PCIE_PHY :: PHY_ATTENTION_MASK :: RECEIVE_FRAME_ERROR_MASK [02:02] */ -#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_FRAME_ERROR_MASK_MASK 0x00000004 -#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_FRAME_ERROR_MASK_ALIGN 0 -#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_FRAME_ERROR_MASK_BITS 1 -#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_FRAME_ERROR_MASK_SHIFT 2 - -/* PCIE_PHY :: PHY_ATTENTION_MASK :: RECEIVE_DISPARITY_ERROR_MASK [01:01] */ -#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_DISPARITY_ERROR_MASK_MASK 0x00000002 -#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_DISPARITY_ERROR_MASK_ALIGN 0 -#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_DISPARITY_ERROR_MASK_BITS 1 -#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_DISPARITY_ERROR_MASK_SHIFT 1 - -/* PCIE_PHY :: PHY_ATTENTION_MASK :: RECEIVE_CODE_ERROR_MASK [00:00] */ -#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_CODE_ERROR_MASK_MASK 0x00000001 -#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_CODE_ERROR_MASK_ALIGN 0 -#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_CODE_ERROR_MASK_BITS 1 -#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_CODE_ERROR_MASK_SHIFT 0 - - -/**************************************************************************** - * PCIE_PHY :: PHY_RECEIVE_ERROR_COUNTER - ***************************************************************************/ -/* PCIE_PHY :: PHY_RECEIVE_ERROR_COUNTER :: DISPARITY_ERROR_COUNT [31:16] */ -#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER_DISPARITY_ERROR_COUNT_MASK 0xffff0000 -#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER_DISPARITY_ERROR_COUNT_ALIGN 0 -#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER_DISPARITY_ERROR_COUNT_BITS 16 -#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER_DISPARITY_ERROR_COUNT_SHIFT 16 - -/* PCIE_PHY :: PHY_RECEIVE_ERROR_COUNTER :: CODE_ERROR_COUNT [15:00] */ -#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER_CODE_ERROR_COUNT_MASK 0x0000ffff -#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER_CODE_ERROR_COUNT_ALIGN 0 -#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER_CODE_ERROR_COUNT_BITS 16 -#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER_CODE_ERROR_COUNT_SHIFT 0 - - -/**************************************************************************** - * PCIE_PHY :: PHY_RECEIVE_FRAMING_ERROR_COUNTER - ***************************************************************************/ -/* PCIE_PHY :: PHY_RECEIVE_FRAMING_ERROR_COUNTER :: RESERVED_0 [31:16] */ -#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER_RESERVED_0_MASK 0xffff0000 -#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER_RESERVED_0_ALIGN 0 -#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER_RESERVED_0_BITS 16 -#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER_RESERVED_0_SHIFT 16 - -/* PCIE_PHY :: PHY_RECEIVE_FRAMING_ERROR_COUNTER :: FRAMING_ERROR_COUNT [15:00] */ -#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER_FRAMING_ERROR_COUNT_MASK 0x0000ffff -#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER_FRAMING_ERROR_COUNT_ALIGN 0 -#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER_FRAMING_ERROR_COUNT_BITS 16 -#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER_FRAMING_ERROR_COUNT_SHIFT 0 - - -/**************************************************************************** - * PCIE_PHY :: PHY_RECEIVE_ERROR_THRESHOLD - ***************************************************************************/ -/* PCIE_PHY :: PHY_RECEIVE_ERROR_THRESHOLD :: RESERVED_0 [31:12] */ -#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_RESERVED_0_MASK 0xfffff000 -#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_RESERVED_0_ALIGN 0 -#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_RESERVED_0_BITS 20 -#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_RESERVED_0_SHIFT 12 - -/* PCIE_PHY :: PHY_RECEIVE_ERROR_THRESHOLD :: FRAME_ERROR_THRESHOLD [11:08] */ -#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_FRAME_ERROR_THRESHOLD_MASK 0x00000f00 -#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_FRAME_ERROR_THRESHOLD_ALIGN 0 -#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_FRAME_ERROR_THRESHOLD_BITS 4 -#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_FRAME_ERROR_THRESHOLD_SHIFT 8 - -/* PCIE_PHY :: PHY_RECEIVE_ERROR_THRESHOLD :: DISPARITY_ERROR_THRESHOLD [07:04] */ -#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_DISPARITY_ERROR_THRESHOLD_MASK 0x000000f0 -#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_DISPARITY_ERROR_THRESHOLD_ALIGN 0 -#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_DISPARITY_ERROR_THRESHOLD_BITS 4 -#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_DISPARITY_ERROR_THRESHOLD_SHIFT 4 - -/* PCIE_PHY :: PHY_RECEIVE_ERROR_THRESHOLD :: CODE_ERROR_THRESHOLD [03:00] */ -#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_CODE_ERROR_THRESHOLD_MASK 0x0000000f -#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_CODE_ERROR_THRESHOLD_ALIGN 0 -#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_CODE_ERROR_THRESHOLD_BITS 4 -#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_CODE_ERROR_THRESHOLD_SHIFT 0 - - -/**************************************************************************** - * PCIE_PHY :: PHY_TEST_CONTROL - ***************************************************************************/ -/* PCIE_PHY :: PHY_TEST_CONTROL :: UNUSED_0 [31:31] */ -#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_0_MASK 0x80000000 -#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_0_ALIGN 0 -#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_0_BITS 1 -#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_0_SHIFT 31 - -/* PCIE_PHY :: PHY_TEST_CONTROL :: DELAY_HOTRESET_ENABLE [30:30] */ -#define PCIE_PHY_PHY_TEST_CONTROL_DELAY_HOTRESET_ENABLE_MASK 0x40000000 -#define PCIE_PHY_PHY_TEST_CONTROL_DELAY_HOTRESET_ENABLE_ALIGN 0 -#define PCIE_PHY_PHY_TEST_CONTROL_DELAY_HOTRESET_ENABLE_BITS 1 -#define PCIE_PHY_PHY_TEST_CONTROL_DELAY_HOTRESET_ENABLE_SHIFT 30 - -/* PCIE_PHY :: PHY_TEST_CONTROL :: CQ27039_TSX_MAJORITY_CHECK [29:29] */ -#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_TSX_MAJORITY_CHECK_MASK 0x20000000 -#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_TSX_MAJORITY_CHECK_ALIGN 0 -#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_TSX_MAJORITY_CHECK_BITS 1 -#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_TSX_MAJORITY_CHECK_SHIFT 29 - -/* PCIE_PHY :: PHY_TEST_CONTROL :: CQ27039_MASK_OFF_BOGUS [28:28] */ -#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_MASK_OFF_BOGUS_MASK 0x10000000 -#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_MASK_OFF_BOGUS_ALIGN 0 -#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_MASK_OFF_BOGUS_BITS 1 -#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_MASK_OFF_BOGUS_SHIFT 28 - -/* PCIE_PHY :: PHY_TEST_CONTROL :: CQ27039_POLARITY_CHECK [27:27] */ -#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_POLARITY_CHECK_MASK 0x08000000 -#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_POLARITY_CHECK_ALIGN 0 -#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_POLARITY_CHECK_BITS 1 -#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_POLARITY_CHECK_SHIFT 27 - -/* PCIE_PHY :: PHY_TEST_CONTROL :: CQ27039_STICKY_POLARITY_CHECK [26:26] */ -#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_STICKY_POLARITY_CHECK_MASK 0x04000000 -#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_STICKY_POLARITY_CHECK_ALIGN 0 -#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_STICKY_POLARITY_CHECK_BITS 1 -#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_STICKY_POLARITY_CHECK_SHIFT 26 - -/* PCIE_PHY :: PHY_TEST_CONTROL :: UNUSED_1 [25:23] */ -#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_1_MASK 0x03800000 -#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_1_ALIGN 0 -#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_1_BITS 3 -#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_1_SHIFT 23 - -/* PCIE_PHY :: PHY_TEST_CONTROL :: TWO_OS_RULE_RELAXING [22:22] */ -#define PCIE_PHY_PHY_TEST_CONTROL_TWO_OS_RULE_RELAXING_MASK 0x00400000 -#define PCIE_PHY_PHY_TEST_CONTROL_TWO_OS_RULE_RELAXING_ALIGN 0 -#define PCIE_PHY_PHY_TEST_CONTROL_TWO_OS_RULE_RELAXING_BITS 1 -#define PCIE_PHY_PHY_TEST_CONTROL_TWO_OS_RULE_RELAXING_SHIFT 22 - -/* PCIE_PHY :: PHY_TEST_CONTROL :: DISABLE_HOT_RESET [21:21] */ -#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_HOT_RESET_MASK 0x00200000 -#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_HOT_RESET_ALIGN 0 -#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_HOT_RESET_BITS 1 -#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_HOT_RESET_SHIFT 21 - -/* PCIE_PHY :: PHY_TEST_CONTROL :: DISABLE_LINK_DOWN_RESET [20:20] */ -#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_LINK_DOWN_RESET_MASK 0x00100000 -#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_LINK_DOWN_RESET_ALIGN 0 -#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_LINK_DOWN_RESET_BITS 1 -#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_LINK_DOWN_RESET_SHIFT 20 - -/* PCIE_PHY :: PHY_TEST_CONTROL :: DISABLE_EIDLE_SET_TRANSMITTING_AT_TIME_OUT_TO_DETECT_STATE [19:19] */ -#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_EIDLE_SET_TRANSMITTING_AT_TIME_OUT_TO_DETECT_STATE_MASK 0x00080000 -#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_EIDLE_SET_TRANSMITTING_AT_TIME_OUT_TO_DETECT_STATE_ALIGN 0 -#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_EIDLE_SET_TRANSMITTING_AT_TIME_OUT_TO_DETECT_STATE_BITS 1 -#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_EIDLE_SET_TRANSMITTING_AT_TIME_OUT_TO_DETECT_STATE_SHIFT 19 - -/* PCIE_PHY :: PHY_TEST_CONTROL :: DISABLE_ERROR_EXIT [18:18] */ -#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_EXIT_MASK 0x00040000 -#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_EXIT_ALIGN 0 -#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_EXIT_BITS 1 -#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_EXIT_SHIFT 18 - -/* PCIE_PHY :: PHY_TEST_CONTROL :: DISABLE_ERROR_MASK [17:17] */ -#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_MASK_MASK 0x00020000 -#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_MASK_ALIGN 0 -#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_MASK_BITS 1 -#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_MASK_SHIFT 17 - -/* PCIE_PHY :: PHY_TEST_CONTROL :: DISABLE_ERROR_RECOVERY [16:16] */ -#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_RECOVERY_MASK 0x00010000 -#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_RECOVERY_ALIGN 0 -#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_RECOVERY_BITS 1 -#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_RECOVERY_SHIFT 16 - -/* PCIE_PHY :: PHY_TEST_CONTROL :: RESERVED_0 [15:08] */ -#define PCIE_PHY_PHY_TEST_CONTROL_RESERVED_0_MASK 0x0000ff00 -#define PCIE_PHY_PHY_TEST_CONTROL_RESERVED_0_ALIGN 0 -#define PCIE_PHY_PHY_TEST_CONTROL_RESERVED_0_BITS 8 -#define PCIE_PHY_PHY_TEST_CONTROL_RESERVED_0_SHIFT 8 - -/* PCIE_PHY :: PHY_TEST_CONTROL :: UNUSED_2 [07:04] */ -#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_2_MASK 0x000000f0 -#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_2_ALIGN 0 -#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_2_BITS 4 -#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_2_SHIFT 4 - -/* PCIE_PHY :: PHY_TEST_CONTROL :: CQ22100_FIX_DISABLE [03:03] */ -#define PCIE_PHY_PHY_TEST_CONTROL_CQ22100_FIX_DISABLE_MASK 0x00000008 -#define PCIE_PHY_PHY_TEST_CONTROL_CQ22100_FIX_DISABLE_ALIGN 0 -#define PCIE_PHY_PHY_TEST_CONTROL_CQ22100_FIX_DISABLE_BITS 1 -#define PCIE_PHY_PHY_TEST_CONTROL_CQ22100_FIX_DISABLE_SHIFT 3 - -/* PCIE_PHY :: PHY_TEST_CONTROL :: TRAINING_BYPASS [02:02] */ -#define PCIE_PHY_PHY_TEST_CONTROL_TRAINING_BYPASS_MASK 0x00000004 -#define PCIE_PHY_PHY_TEST_CONTROL_TRAINING_BYPASS_ALIGN 0 -#define PCIE_PHY_PHY_TEST_CONTROL_TRAINING_BYPASS_BITS 1 -#define PCIE_PHY_PHY_TEST_CONTROL_TRAINING_BYPASS_SHIFT 2 - -/* PCIE_PHY :: PHY_TEST_CONTROL :: EXTERNAL_LOOPBACK [01:01] */ -#define PCIE_PHY_PHY_TEST_CONTROL_EXTERNAL_LOOPBACK_MASK 0x00000002 -#define PCIE_PHY_PHY_TEST_CONTROL_EXTERNAL_LOOPBACK_ALIGN 0 -#define PCIE_PHY_PHY_TEST_CONTROL_EXTERNAL_LOOPBACK_BITS 1 -#define PCIE_PHY_PHY_TEST_CONTROL_EXTERNAL_LOOPBACK_SHIFT 1 - -/* PCIE_PHY :: PHY_TEST_CONTROL :: INTERNAL_LOOPBACK [00:00] */ -#define PCIE_PHY_PHY_TEST_CONTROL_INTERNAL_LOOPBACK_MASK 0x00000001 -#define PCIE_PHY_PHY_TEST_CONTROL_INTERNAL_LOOPBACK_ALIGN 0 -#define PCIE_PHY_PHY_TEST_CONTROL_INTERNAL_LOOPBACK_BITS 1 -#define PCIE_PHY_PHY_TEST_CONTROL_INTERNAL_LOOPBACK_SHIFT 0 - - -/**************************************************************************** - * PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE - ***************************************************************************/ -/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: RESERVED_0 [31:18] */ -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RESERVED_0_MASK 0xfffc0000 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RESERVED_0_ALIGN 0 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RESERVED_0_BITS 14 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RESERVED_0_SHIFT 18 - -/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: OBSVELECIDLEVALUE [17:17] */ -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_OBSVELECIDLEVALUE_MASK 0x00020000 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_OBSVELECIDLEVALUE_ALIGN 0 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_OBSVELECIDLEVALUE_BITS 1 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_OBSVELECIDLEVALUE_SHIFT 17 - -/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: OBSVELECIDLEOVERRIDE [16:16] */ -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_OBSVELECIDLEOVERRIDE_MASK 0x00010000 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_OBSVELECIDLEOVERRIDE_ALIGN 0 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_OBSVELECIDLEOVERRIDE_BITS 1 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_OBSVELECIDLEOVERRIDE_SHIFT 16 - -/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: PLLISUPVALUE [15:15] */ -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_PLLISUPVALUE_MASK 0x00008000 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_PLLISUPVALUE_ALIGN 0 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_PLLISUPVALUE_BITS 1 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_PLLISUPVALUE_SHIFT 15 - -/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: PLLISUPOVERRIDE [14:14] */ -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_PLLISUPOVERRIDE_MASK 0x00004000 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_PLLISUPOVERRIDE_ALIGN 0 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_PLLISUPOVERRIDE_BITS 1 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_PLLISUPOVERRIDE_SHIFT 14 - -/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: RCVRDETVALUE [13:13] */ -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETVALUE_MASK 0x00002000 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETVALUE_ALIGN 0 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETVALUE_BITS 1 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETVALUE_SHIFT 13 - -/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: RCVRDETOVERRIDE [12:12] */ -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETOVERRIDE_MASK 0x00001000 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETOVERRIDE_ALIGN 0 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETOVERRIDE_BITS 1 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETOVERRIDE_SHIFT 12 - -/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: RCVRDETTIMECONTROL [11:10] */ -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETTIMECONTROL_MASK 0x00000c00 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETTIMECONTROL_ALIGN 0 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETTIMECONTROL_BITS 2 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETTIMECONTROL_SHIFT 10 - -/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: RCVRDETECTIONTIME [09:00] */ -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETECTIONTIME_MASK 0x000003ff -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETECTIONTIME_ALIGN 0 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETECTIONTIME_BITS 10 -#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETECTIONTIME_SHIFT 0 - - -/**************************************************************************** - * PCIE_PHY :: PHY_TIMING_PARAMETER_OVERRIDE - ***************************************************************************/ -/* PCIE_PHY :: PHY_TIMING_PARAMETER_OVERRIDE :: TS1NUMOVERRIDE [31:31] */ -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TS1NUMOVERRIDE_MASK 0x80000000 -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TS1NUMOVERRIDE_ALIGN 0 -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TS1NUMOVERRIDE_BITS 1 -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TS1NUMOVERRIDE_SHIFT 31 - -/* PCIE_PHY :: PHY_TIMING_PARAMETER_OVERRIDE :: TXIDLEMINOVERRIDE [30:30] */ -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLEMINOVERRIDE_MASK 0x40000000 -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLEMINOVERRIDE_ALIGN 0 -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLEMINOVERRIDE_BITS 1 -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLEMINOVERRIDE_SHIFT 30 - -/* PCIE_PHY :: PHY_TIMING_PARAMETER_OVERRIDE :: TXIDLE2IDLEOVERRIDE [29:29] */ -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLE2IDLEOVERRIDE_MASK 0x20000000 -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLE2IDLEOVERRIDE_ALIGN 0 -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLE2IDLEOVERRIDE_BITS 1 -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLE2IDLEOVERRIDE_SHIFT 29 - -/* PCIE_PHY :: PHY_TIMING_PARAMETER_OVERRIDE :: UNUSED_0 [28:28] */ -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_UNUSED_0_MASK 0x10000000 -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_UNUSED_0_ALIGN 0 -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_UNUSED_0_BITS 1 -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_UNUSED_0_SHIFT 28 - -/* PCIE_PHY :: PHY_TIMING_PARAMETER_OVERRIDE :: N_TS1INPOLLINGACTIVE [27:16] */ -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_N_TS1INPOLLINGACTIVE_MASK 0x0fff0000 -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_N_TS1INPOLLINGACTIVE_ALIGN 0 -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_N_TS1INPOLLINGACTIVE_BITS 12 -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_N_TS1INPOLLINGACTIVE_SHIFT 16 - -/* PCIE_PHY :: PHY_TIMING_PARAMETER_OVERRIDE :: TXIDLEMINTIME [15:08] */ -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLEMINTIME_MASK 0x0000ff00 -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLEMINTIME_ALIGN 0 -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLEMINTIME_BITS 8 -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLEMINTIME_SHIFT 8 - -/* PCIE_PHY :: PHY_TIMING_PARAMETER_OVERRIDE :: TXIDLESETTOIDLETIME [07:00] */ -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLESETTOIDLETIME_MASK 0x000000ff -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLESETTOIDLETIME_ALIGN 0 -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLESETTOIDLETIME_BITS 8 -#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLESETTOIDLETIME_SHIFT 0 - - -/**************************************************************************** - * PCIE_PHY :: PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES - ***************************************************************************/ -/* PCIE_PHY :: PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES :: RESERVED_0 [31:10] */ -#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_RESERVED_0_MASK 0xfffffc00 -#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_RESERVED_0_ALIGN 0 -#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_RESERVED_0_BITS 22 -#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_RESERVED_0_SHIFT 10 - -/* PCIE_PHY :: PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES :: TRANSMIT_STATE_MACHINE_STATE [09:04] */ -#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_TRANSMIT_STATE_MACHINE_STATE_MASK 0x000003f0 -#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_TRANSMIT_STATE_MACHINE_STATE_ALIGN 0 -#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_TRANSMIT_STATE_MACHINE_STATE_BITS 6 -#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_TRANSMIT_STATE_MACHINE_STATE_SHIFT 4 - -/* PCIE_PHY :: PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES :: RECEIVE_STATE_MACHINE_STATE [03:00] */ -#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_RECEIVE_STATE_MACHINE_STATE_MASK 0x0000000f -#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_RECEIVE_STATE_MACHINE_STATE_ALIGN 0 -#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_RECEIVE_STATE_MACHINE_STATE_BITS 4 -#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_RECEIVE_STATE_MACHINE_STATE_SHIFT 0 - - -/**************************************************************************** - * PCIE_PHY :: PHY_HARDWARE_DIAGNOSTIC2_LTSSM_STATES - ***************************************************************************/ -/* PCIE_PHY :: PHY_HARDWARE_DIAGNOSTIC2_LTSSM_STATES :: LTSSM_STATE_MACHINE_STATE [31:00] */ -#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC2_LTSSM_STATES_LTSSM_STATE_MACHINE_STATE_MASK 0xffffffff -#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC2_LTSSM_STATES_LTSSM_STATE_MACHINE_STATE_ALIGN 0 -#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC2_LTSSM_STATES_LTSSM_STATE_MACHINE_STATE_BITS 32 -#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC2_LTSSM_STATES_LTSSM_STATE_MACHINE_STATE_SHIFT 0 - - /**************************************************************************** * BCM70012_TGT_TOP_INTR ***************************************************************************/ @@ -5961,1307 +481,6 @@ #define INTR_INTR_STATUS_L0_TX_DMA_DONE_INTR_SHIFT 0 -/**************************************************************************** - * INTR :: INTR_SET - ***************************************************************************/ -/* INTR :: INTR_SET :: reserved0 [31:26] */ -#define INTR_INTR_SET_reserved0_MASK 0xfc000000 -#define INTR_INTR_SET_reserved0_ALIGN 0 -#define INTR_INTR_SET_reserved0_BITS 6 -#define INTR_INTR_SET_reserved0_SHIFT 26 - -/* INTR :: INTR_SET :: PCIE_TGT_CA_ATTN [25:25] */ -#define INTR_INTR_SET_PCIE_TGT_CA_ATTN_MASK 0x02000000 -#define INTR_INTR_SET_PCIE_TGT_CA_ATTN_ALIGN 0 -#define INTR_INTR_SET_PCIE_TGT_CA_ATTN_BITS 1 -#define INTR_INTR_SET_PCIE_TGT_CA_ATTN_SHIFT 25 - -/* INTR :: INTR_SET :: PCIE_TGT_UR_ATTN [24:24] */ -#define INTR_INTR_SET_PCIE_TGT_UR_ATTN_MASK 0x01000000 -#define INTR_INTR_SET_PCIE_TGT_UR_ATTN_ALIGN 0 -#define INTR_INTR_SET_PCIE_TGT_UR_ATTN_BITS 1 -#define INTR_INTR_SET_PCIE_TGT_UR_ATTN_SHIFT 24 - -/* INTR :: INTR_SET :: reserved1 [23:14] */ -#define INTR_INTR_SET_reserved1_MASK 0x00ffc000 -#define INTR_INTR_SET_reserved1_ALIGN 0 -#define INTR_INTR_SET_reserved1_BITS 10 -#define INTR_INTR_SET_reserved1_SHIFT 14 - -/* INTR :: INTR_SET :: UV_RX_DMA_L1_ERR_INTR [13:13] */ -#define INTR_INTR_SET_UV_RX_DMA_L1_ERR_INTR_MASK 0x00002000 -#define INTR_INTR_SET_UV_RX_DMA_L1_ERR_INTR_ALIGN 0 -#define INTR_INTR_SET_UV_RX_DMA_L1_ERR_INTR_BITS 1 -#define INTR_INTR_SET_UV_RX_DMA_L1_ERR_INTR_SHIFT 13 - -/* INTR :: INTR_SET :: UV_RX_DMA_L1_DONE_INTR [12:12] */ -#define INTR_INTR_SET_UV_RX_DMA_L1_DONE_INTR_MASK 0x00001000 -#define INTR_INTR_SET_UV_RX_DMA_L1_DONE_INTR_ALIGN 0 -#define INTR_INTR_SET_UV_RX_DMA_L1_DONE_INTR_BITS 1 -#define INTR_INTR_SET_UV_RX_DMA_L1_DONE_INTR_SHIFT 12 - -/* INTR :: INTR_SET :: Y_RX_DMA_L1_ERR_INTR [11:11] */ -#define INTR_INTR_SET_Y_RX_DMA_L1_ERR_INTR_MASK 0x00000800 -#define INTR_INTR_SET_Y_RX_DMA_L1_ERR_INTR_ALIGN 0 -#define INTR_INTR_SET_Y_RX_DMA_L1_ERR_INTR_BITS 1 -#define INTR_INTR_SET_Y_RX_DMA_L1_ERR_INTR_SHIFT 11 - -/* INTR :: INTR_SET :: Y_RX_DMA_L1_DONE_INTR [10:10] */ -#define INTR_INTR_SET_Y_RX_DMA_L1_DONE_INTR_MASK 0x00000400 -#define INTR_INTR_SET_Y_RX_DMA_L1_DONE_INTR_ALIGN 0 -#define INTR_INTR_SET_Y_RX_DMA_L1_DONE_INTR_BITS 1 -#define INTR_INTR_SET_Y_RX_DMA_L1_DONE_INTR_SHIFT 10 - -/* INTR :: INTR_SET :: TX_DMA_L1_ERR_INTR [09:09] */ -#define INTR_INTR_SET_TX_DMA_L1_ERR_INTR_MASK 0x00000200 -#define INTR_INTR_SET_TX_DMA_L1_ERR_INTR_ALIGN 0 -#define INTR_INTR_SET_TX_DMA_L1_ERR_INTR_BITS 1 -#define INTR_INTR_SET_TX_DMA_L1_ERR_INTR_SHIFT 9 - -/* INTR :: INTR_SET :: TX_DMA_L1_DONE_INTR [08:08] */ -#define INTR_INTR_SET_TX_DMA_L1_DONE_INTR_MASK 0x00000100 -#define INTR_INTR_SET_TX_DMA_L1_DONE_INTR_ALIGN 0 -#define INTR_INTR_SET_TX_DMA_L1_DONE_INTR_BITS 1 -#define INTR_INTR_SET_TX_DMA_L1_DONE_INTR_SHIFT 8 - -/* INTR :: INTR_SET :: reserved2 [07:06] */ -#define INTR_INTR_SET_reserved2_MASK 0x000000c0 -#define INTR_INTR_SET_reserved2_ALIGN 0 -#define INTR_INTR_SET_reserved2_BITS 2 -#define INTR_INTR_SET_reserved2_SHIFT 6 - -/* INTR :: INTR_SET :: UV_RX_DMA_L0_ERR_INTR [05:05] */ -#define INTR_INTR_SET_UV_RX_DMA_L0_ERR_INTR_MASK 0x00000020 -#define INTR_INTR_SET_UV_RX_DMA_L0_ERR_INTR_ALIGN 0 -#define INTR_INTR_SET_UV_RX_DMA_L0_ERR_INTR_BITS 1 -#define INTR_INTR_SET_UV_RX_DMA_L0_ERR_INTR_SHIFT 5 - -/* INTR :: INTR_SET :: UV_RX_DMA_L0_DONE_INTR [04:04] */ -#define INTR_INTR_SET_UV_RX_DMA_L0_DONE_INTR_MASK 0x00000010 -#define INTR_INTR_SET_UV_RX_DMA_L0_DONE_INTR_ALIGN 0 -#define INTR_INTR_SET_UV_RX_DMA_L0_DONE_INTR_BITS 1 -#define INTR_INTR_SET_UV_RX_DMA_L0_DONE_INTR_SHIFT 4 - -/* INTR :: INTR_SET :: Y_RX_DMA_L0_ERR_INTR [03:03] */ -#define INTR_INTR_SET_Y_RX_DMA_L0_ERR_INTR_MASK 0x00000008 -#define INTR_INTR_SET_Y_RX_DMA_L0_ERR_INTR_ALIGN 0 -#define INTR_INTR_SET_Y_RX_DMA_L0_ERR_INTR_BITS 1 -#define INTR_INTR_SET_Y_RX_DMA_L0_ERR_INTR_SHIFT 3 - -/* INTR :: INTR_SET :: Y_RX_DMA_L0_DONE_INTR [02:02] */ -#define INTR_INTR_SET_Y_RX_DMA_L0_DONE_INTR_MASK 0x00000004 -#define INTR_INTR_SET_Y_RX_DMA_L0_DONE_INTR_ALIGN 0 -#define INTR_INTR_SET_Y_RX_DMA_L0_DONE_INTR_BITS 1 -#define INTR_INTR_SET_Y_RX_DMA_L0_DONE_INTR_SHIFT 2 - -/* INTR :: INTR_SET :: TX_DMA_L0_ERR_INTR [01:01] */ -#define INTR_INTR_SET_TX_DMA_L0_ERR_INTR_MASK 0x00000002 -#define INTR_INTR_SET_TX_DMA_L0_ERR_INTR_ALIGN 0 -#define INTR_INTR_SET_TX_DMA_L0_ERR_INTR_BITS 1 -#define INTR_INTR_SET_TX_DMA_L0_ERR_INTR_SHIFT 1 - -/* INTR :: INTR_SET :: TX_DMA_L0_DONE_INTR [00:00] */ -#define INTR_INTR_SET_TX_DMA_L0_DONE_INTR_MASK 0x00000001 -#define INTR_INTR_SET_TX_DMA_L0_DONE_INTR_ALIGN 0 -#define INTR_INTR_SET_TX_DMA_L0_DONE_INTR_BITS 1 -#define INTR_INTR_SET_TX_DMA_L0_DONE_INTR_SHIFT 0 - - -/**************************************************************************** - * INTR :: INTR_CLR_REG - ***************************************************************************/ -/* INTR :: INTR_CLR_REG :: reserved0 [31:26] */ -#define INTR_INTR_CLR_REG_reserved0_MASK 0xfc000000 -#define INTR_INTR_CLR_REG_reserved0_ALIGN 0 -#define INTR_INTR_CLR_REG_reserved0_BITS 6 -#define INTR_INTR_CLR_REG_reserved0_SHIFT 26 - -/* INTR :: INTR_CLR_REG :: PCIE_TGT_CA_ATTN [25:25] */ -#define INTR_INTR_CLR_REG_PCIE_TGT_CA_ATTN_MASK 0x02000000 -#define INTR_INTR_CLR_REG_PCIE_TGT_CA_ATTN_ALIGN 0 -#define INTR_INTR_CLR_REG_PCIE_TGT_CA_ATTN_BITS 1 -#define INTR_INTR_CLR_REG_PCIE_TGT_CA_ATTN_SHIFT 25 - -/* INTR :: INTR_CLR_REG :: PCIE_TGT_UR_ATTN [24:24] */ -#define INTR_INTR_CLR_REG_PCIE_TGT_UR_ATTN_MASK 0x01000000 -#define INTR_INTR_CLR_REG_PCIE_TGT_UR_ATTN_ALIGN 0 -#define INTR_INTR_CLR_REG_PCIE_TGT_UR_ATTN_BITS 1 -#define INTR_INTR_CLR_REG_PCIE_TGT_UR_ATTN_SHIFT 24 - -/* INTR :: INTR_CLR_REG :: reserved1 [23:14] */ -#define INTR_INTR_CLR_REG_reserved1_MASK 0x00ffc000 -#define INTR_INTR_CLR_REG_reserved1_ALIGN 0 -#define INTR_INTR_CLR_REG_reserved1_BITS 10 -#define INTR_INTR_CLR_REG_reserved1_SHIFT 14 - -/* INTR :: INTR_CLR_REG :: L1_UV_RX_DMA_ERR_INTR_CLR [13:13] */ -#define INTR_INTR_CLR_REG_L1_UV_RX_DMA_ERR_INTR_CLR_MASK 0x00002000 -#define INTR_INTR_CLR_REG_L1_UV_RX_DMA_ERR_INTR_CLR_ALIGN 0 -#define INTR_INTR_CLR_REG_L1_UV_RX_DMA_ERR_INTR_CLR_BITS 1 -#define INTR_INTR_CLR_REG_L1_UV_RX_DMA_ERR_INTR_CLR_SHIFT 13 - -/* INTR :: INTR_CLR_REG :: L1_UV_RX_DMA_DONE_INTR_CLR [12:12] */ -#define INTR_INTR_CLR_REG_L1_UV_RX_DMA_DONE_INTR_CLR_MASK 0x00001000 -#define INTR_INTR_CLR_REG_L1_UV_RX_DMA_DONE_INTR_CLR_ALIGN 0 -#define INTR_INTR_CLR_REG_L1_UV_RX_DMA_DONE_INTR_CLR_BITS 1 -#define INTR_INTR_CLR_REG_L1_UV_RX_DMA_DONE_INTR_CLR_SHIFT 12 - -/* INTR :: INTR_CLR_REG :: L1_Y_RX_DMA_ERR_INTR_CLR [11:11] */ -#define INTR_INTR_CLR_REG_L1_Y_RX_DMA_ERR_INTR_CLR_MASK 0x00000800 -#define INTR_INTR_CLR_REG_L1_Y_RX_DMA_ERR_INTR_CLR_ALIGN 0 -#define INTR_INTR_CLR_REG_L1_Y_RX_DMA_ERR_INTR_CLR_BITS 1 -#define INTR_INTR_CLR_REG_L1_Y_RX_DMA_ERR_INTR_CLR_SHIFT 11 - -/* INTR :: INTR_CLR_REG :: L1_Y_RX_DMA_DONE_INTR_CLR [10:10] */ -#define INTR_INTR_CLR_REG_L1_Y_RX_DMA_DONE_INTR_CLR_MASK 0x00000400 -#define INTR_INTR_CLR_REG_L1_Y_RX_DMA_DONE_INTR_CLR_ALIGN 0 -#define INTR_INTR_CLR_REG_L1_Y_RX_DMA_DONE_INTR_CLR_BITS 1 -#define INTR_INTR_CLR_REG_L1_Y_RX_DMA_DONE_INTR_CLR_SHIFT 10 - -/* INTR :: INTR_CLR_REG :: L1_TX_DMA_ERR_INTR_CLR [09:09] */ -#define INTR_INTR_CLR_REG_L1_TX_DMA_ERR_INTR_CLR_MASK 0x00000200 -#define INTR_INTR_CLR_REG_L1_TX_DMA_ERR_INTR_CLR_ALIGN 0 -#define INTR_INTR_CLR_REG_L1_TX_DMA_ERR_INTR_CLR_BITS 1 -#define INTR_INTR_CLR_REG_L1_TX_DMA_ERR_INTR_CLR_SHIFT 9 - -/* INTR :: INTR_CLR_REG :: L1_TX_DMA_DONE_INTR_CLR [08:08] */ -#define INTR_INTR_CLR_REG_L1_TX_DMA_DONE_INTR_CLR_MASK 0x00000100 -#define INTR_INTR_CLR_REG_L1_TX_DMA_DONE_INTR_CLR_ALIGN 0 -#define INTR_INTR_CLR_REG_L1_TX_DMA_DONE_INTR_CLR_BITS 1 -#define INTR_INTR_CLR_REG_L1_TX_DMA_DONE_INTR_CLR_SHIFT 8 - -/* INTR :: INTR_CLR_REG :: reserved2 [07:06] */ -#define INTR_INTR_CLR_REG_reserved2_MASK 0x000000c0 -#define INTR_INTR_CLR_REG_reserved2_ALIGN 0 -#define INTR_INTR_CLR_REG_reserved2_BITS 2 -#define INTR_INTR_CLR_REG_reserved2_SHIFT 6 - -/* INTR :: INTR_CLR_REG :: L0_UV_RX_DMA_ERR_INTR_CLR [05:05] */ -#define INTR_INTR_CLR_REG_L0_UV_RX_DMA_ERR_INTR_CLR_MASK 0x00000020 -#define INTR_INTR_CLR_REG_L0_UV_RX_DMA_ERR_INTR_CLR_ALIGN 0 -#define INTR_INTR_CLR_REG_L0_UV_RX_DMA_ERR_INTR_CLR_BITS 1 -#define INTR_INTR_CLR_REG_L0_UV_RX_DMA_ERR_INTR_CLR_SHIFT 5 - -/* INTR :: INTR_CLR_REG :: L0_UV_RX_DMA_DONE_INTR_CLR [04:04] */ -#define INTR_INTR_CLR_REG_L0_UV_RX_DMA_DONE_INTR_CLR_MASK 0x00000010 -#define INTR_INTR_CLR_REG_L0_UV_RX_DMA_DONE_INTR_CLR_ALIGN 0 -#define INTR_INTR_CLR_REG_L0_UV_RX_DMA_DONE_INTR_CLR_BITS 1 -#define INTR_INTR_CLR_REG_L0_UV_RX_DMA_DONE_INTR_CLR_SHIFT 4 - -/* INTR :: INTR_CLR_REG :: L0_Y_RX_DMA_ERR_INTR_CLR [03:03] */ -#define INTR_INTR_CLR_REG_L0_Y_RX_DMA_ERR_INTR_CLR_MASK 0x00000008 -#define INTR_INTR_CLR_REG_L0_Y_RX_DMA_ERR_INTR_CLR_ALIGN 0 -#define INTR_INTR_CLR_REG_L0_Y_RX_DMA_ERR_INTR_CLR_BITS 1 -#define INTR_INTR_CLR_REG_L0_Y_RX_DMA_ERR_INTR_CLR_SHIFT 3 - -/* INTR :: INTR_CLR_REG :: L0_Y_RX_DMA_DONE_INTR_CLR [02:02] */ -#define INTR_INTR_CLR_REG_L0_Y_RX_DMA_DONE_INTR_CLR_MASK 0x00000004 -#define INTR_INTR_CLR_REG_L0_Y_RX_DMA_DONE_INTR_CLR_ALIGN 0 -#define INTR_INTR_CLR_REG_L0_Y_RX_DMA_DONE_INTR_CLR_BITS 1 -#define INTR_INTR_CLR_REG_L0_Y_RX_DMA_DONE_INTR_CLR_SHIFT 2 - -/* INTR :: INTR_CLR_REG :: L0_TX_DMA_ERR_INTR_CLR [01:01] */ -#define INTR_INTR_CLR_REG_L0_TX_DMA_ERR_INTR_CLR_MASK 0x00000002 -#define INTR_INTR_CLR_REG_L0_TX_DMA_ERR_INTR_CLR_ALIGN 0 -#define INTR_INTR_CLR_REG_L0_TX_DMA_ERR_INTR_CLR_BITS 1 -#define INTR_INTR_CLR_REG_L0_TX_DMA_ERR_INTR_CLR_SHIFT 1 - -/* INTR :: INTR_CLR_REG :: L0_TX_DMA_DONE_INTR_CLR [00:00] */ -#define INTR_INTR_CLR_REG_L0_TX_DMA_DONE_INTR_CLR_MASK 0x00000001 -#define INTR_INTR_CLR_REG_L0_TX_DMA_DONE_INTR_CLR_ALIGN 0 -#define INTR_INTR_CLR_REG_L0_TX_DMA_DONE_INTR_CLR_BITS 1 -#define INTR_INTR_CLR_REG_L0_TX_DMA_DONE_INTR_CLR_SHIFT 0 - - -/**************************************************************************** - * INTR :: INTR_MSK_STS_REG - ***************************************************************************/ -/* INTR :: INTR_MSK_STS_REG :: reserved0 [31:26] */ -#define INTR_INTR_MSK_STS_REG_reserved0_MASK 0xfc000000 -#define INTR_INTR_MSK_STS_REG_reserved0_ALIGN 0 -#define INTR_INTR_MSK_STS_REG_reserved0_BITS 6 -#define INTR_INTR_MSK_STS_REG_reserved0_SHIFT 26 - -/* INTR :: INTR_MSK_STS_REG :: PCIE_TGT_CA_ATTN [25:25] */ -#define INTR_INTR_MSK_STS_REG_PCIE_TGT_CA_ATTN_MASK 0x02000000 -#define INTR_INTR_MSK_STS_REG_PCIE_TGT_CA_ATTN_ALIGN 0 -#define INTR_INTR_MSK_STS_REG_PCIE_TGT_CA_ATTN_BITS 1 -#define INTR_INTR_MSK_STS_REG_PCIE_TGT_CA_ATTN_SHIFT 25 - -/* INTR :: INTR_MSK_STS_REG :: PCIE_TGT_UR_ATTN [24:24] */ -#define INTR_INTR_MSK_STS_REG_PCIE_TGT_UR_ATTN_MASK 0x01000000 -#define INTR_INTR_MSK_STS_REG_PCIE_TGT_UR_ATTN_ALIGN 0 -#define INTR_INTR_MSK_STS_REG_PCIE_TGT_UR_ATTN_BITS 1 -#define INTR_INTR_MSK_STS_REG_PCIE_TGT_UR_ATTN_SHIFT 24 - -/* INTR :: INTR_MSK_STS_REG :: reserved1 [23:14] */ -#define INTR_INTR_MSK_STS_REG_reserved1_MASK 0x00ffc000 -#define INTR_INTR_MSK_STS_REG_reserved1_ALIGN 0 -#define INTR_INTR_MSK_STS_REG_reserved1_BITS 10 -#define INTR_INTR_MSK_STS_REG_reserved1_SHIFT 14 - -/* INTR :: INTR_MSK_STS_REG :: L1_UV_RX_DMA_ERR_INTR_MSK [13:13] */ -#define INTR_INTR_MSK_STS_REG_L1_UV_RX_DMA_ERR_INTR_MSK_MASK 0x00002000 -#define INTR_INTR_MSK_STS_REG_L1_UV_RX_DMA_ERR_INTR_MSK_ALIGN 0 -#define INTR_INTR_MSK_STS_REG_L1_UV_RX_DMA_ERR_INTR_MSK_BITS 1 -#define INTR_INTR_MSK_STS_REG_L1_UV_RX_DMA_ERR_INTR_MSK_SHIFT 13 - -/* INTR :: INTR_MSK_STS_REG :: L1_UV_RX_DMA_DONE_INTR_MSK [12:12] */ -#define INTR_INTR_MSK_STS_REG_L1_UV_RX_DMA_DONE_INTR_MSK_MASK 0x00001000 -#define INTR_INTR_MSK_STS_REG_L1_UV_RX_DMA_DONE_INTR_MSK_ALIGN 0 -#define INTR_INTR_MSK_STS_REG_L1_UV_RX_DMA_DONE_INTR_MSK_BITS 1 -#define INTR_INTR_MSK_STS_REG_L1_UV_RX_DMA_DONE_INTR_MSK_SHIFT 12 - -/* INTR :: INTR_MSK_STS_REG :: LIST1_Y_RX_DMA_ERR_INTR_MSK [11:11] */ -#define INTR_INTR_MSK_STS_REG_LIST1_Y_RX_DMA_ERR_INTR_MSK_MASK 0x00000800 -#define INTR_INTR_MSK_STS_REG_LIST1_Y_RX_DMA_ERR_INTR_MSK_ALIGN 0 -#define INTR_INTR_MSK_STS_REG_LIST1_Y_RX_DMA_ERR_INTR_MSK_BITS 1 -#define INTR_INTR_MSK_STS_REG_LIST1_Y_RX_DMA_ERR_INTR_MSK_SHIFT 11 - -/* INTR :: INTR_MSK_STS_REG :: L1_Y_RX_DMA_DONE_INTR_MSK [10:10] */ -#define INTR_INTR_MSK_STS_REG_L1_Y_RX_DMA_DONE_INTR_MSK_MASK 0x00000400 -#define INTR_INTR_MSK_STS_REG_L1_Y_RX_DMA_DONE_INTR_MSK_ALIGN 0 -#define INTR_INTR_MSK_STS_REG_L1_Y_RX_DMA_DONE_INTR_MSK_BITS 1 -#define INTR_INTR_MSK_STS_REG_L1_Y_RX_DMA_DONE_INTR_MSK_SHIFT 10 - -/* INTR :: INTR_MSK_STS_REG :: L1_TX_DMA_ERR_INTR_MSK [09:09] */ -#define INTR_INTR_MSK_STS_REG_L1_TX_DMA_ERR_INTR_MSK_MASK 0x00000200 -#define INTR_INTR_MSK_STS_REG_L1_TX_DMA_ERR_INTR_MSK_ALIGN 0 -#define INTR_INTR_MSK_STS_REG_L1_TX_DMA_ERR_INTR_MSK_BITS 1 -#define INTR_INTR_MSK_STS_REG_L1_TX_DMA_ERR_INTR_MSK_SHIFT 9 - -/* INTR :: INTR_MSK_STS_REG :: L1_TX_DMA_DONE_INTR_MSK [08:08] */ -#define INTR_INTR_MSK_STS_REG_L1_TX_DMA_DONE_INTR_MSK_MASK 0x00000100 -#define INTR_INTR_MSK_STS_REG_L1_TX_DMA_DONE_INTR_MSK_ALIGN 0 -#define INTR_INTR_MSK_STS_REG_L1_TX_DMA_DONE_INTR_MSK_BITS 1 -#define INTR_INTR_MSK_STS_REG_L1_TX_DMA_DONE_INTR_MSK_SHIFT 8 - -/* INTR :: INTR_MSK_STS_REG :: reserved2 [07:06] */ -#define INTR_INTR_MSK_STS_REG_reserved2_MASK 0x000000c0 -#define INTR_INTR_MSK_STS_REG_reserved2_ALIGN 0 -#define INTR_INTR_MSK_STS_REG_reserved2_BITS 2 -#define INTR_INTR_MSK_STS_REG_reserved2_SHIFT 6 - -/* INTR :: INTR_MSK_STS_REG :: L0_UV_RX_DMA_ERR_INTR_MSK [05:05] */ -#define INTR_INTR_MSK_STS_REG_L0_UV_RX_DMA_ERR_INTR_MSK_MASK 0x00000020 -#define INTR_INTR_MSK_STS_REG_L0_UV_RX_DMA_ERR_INTR_MSK_ALIGN 0 -#define INTR_INTR_MSK_STS_REG_L0_UV_RX_DMA_ERR_INTR_MSK_BITS 1 -#define INTR_INTR_MSK_STS_REG_L0_UV_RX_DMA_ERR_INTR_MSK_SHIFT 5 - -/* INTR :: INTR_MSK_STS_REG :: L0_UV_RX_DMA_DONE_INTR_MSK [04:04] */ -#define INTR_INTR_MSK_STS_REG_L0_UV_RX_DMA_DONE_INTR_MSK_MASK 0x00000010 -#define INTR_INTR_MSK_STS_REG_L0_UV_RX_DMA_DONE_INTR_MSK_ALIGN 0 -#define INTR_INTR_MSK_STS_REG_L0_UV_RX_DMA_DONE_INTR_MSK_BITS 1 -#define INTR_INTR_MSK_STS_REG_L0_UV_RX_DMA_DONE_INTR_MSK_SHIFT 4 - -/* INTR :: INTR_MSK_STS_REG :: LIST0_Y_RX_DMA_ERR_INTR_MSK [03:03] */ -#define INTR_INTR_MSK_STS_REG_LIST0_Y_RX_DMA_ERR_INTR_MSK_MASK 0x00000008 -#define INTR_INTR_MSK_STS_REG_LIST0_Y_RX_DMA_ERR_INTR_MSK_ALIGN 0 -#define INTR_INTR_MSK_STS_REG_LIST0_Y_RX_DMA_ERR_INTR_MSK_BITS 1 -#define INTR_INTR_MSK_STS_REG_LIST0_Y_RX_DMA_ERR_INTR_MSK_SHIFT 3 - -/* INTR :: INTR_MSK_STS_REG :: L0_Y_RX_DMA_DONE_INTR_MSK [02:02] */ -#define INTR_INTR_MSK_STS_REG_L0_Y_RX_DMA_DONE_INTR_MSK_MASK 0x00000004 -#define INTR_INTR_MSK_STS_REG_L0_Y_RX_DMA_DONE_INTR_MSK_ALIGN 0 -#define INTR_INTR_MSK_STS_REG_L0_Y_RX_DMA_DONE_INTR_MSK_BITS 1 -#define INTR_INTR_MSK_STS_REG_L0_Y_RX_DMA_DONE_INTR_MSK_SHIFT 2 - -/* INTR :: INTR_MSK_STS_REG :: L0_TX_DMA_ERR_INTR_MSK [01:01] */ -#define INTR_INTR_MSK_STS_REG_L0_TX_DMA_ERR_INTR_MSK_MASK 0x00000002 -#define INTR_INTR_MSK_STS_REG_L0_TX_DMA_ERR_INTR_MSK_ALIGN 0 -#define INTR_INTR_MSK_STS_REG_L0_TX_DMA_ERR_INTR_MSK_BITS 1 -#define INTR_INTR_MSK_STS_REG_L0_TX_DMA_ERR_INTR_MSK_SHIFT 1 - -/* INTR :: INTR_MSK_STS_REG :: L0_TX_DMA_DONE_INTR_MSK [00:00] */ -#define INTR_INTR_MSK_STS_REG_L0_TX_DMA_DONE_INTR_MSK_MASK 0x00000001 -#define INTR_INTR_MSK_STS_REG_L0_TX_DMA_DONE_INTR_MSK_ALIGN 0 -#define INTR_INTR_MSK_STS_REG_L0_TX_DMA_DONE_INTR_MSK_BITS 1 -#define INTR_INTR_MSK_STS_REG_L0_TX_DMA_DONE_INTR_MSK_SHIFT 0 - - -/**************************************************************************** - * INTR :: INTR_MSK_SET_REG - ***************************************************************************/ -/* INTR :: INTR_MSK_SET_REG :: reserved0 [31:26] */ -#define INTR_INTR_MSK_SET_REG_reserved0_MASK 0xfc000000 -#define INTR_INTR_MSK_SET_REG_reserved0_ALIGN 0 -#define INTR_INTR_MSK_SET_REG_reserved0_BITS 6 -#define INTR_INTR_MSK_SET_REG_reserved0_SHIFT 26 - -/* INTR :: INTR_MSK_SET_REG :: PCIE_TGT_CA_ATTN [25:25] */ -#define INTR_INTR_MSK_SET_REG_PCIE_TGT_CA_ATTN_MASK 0x02000000 -#define INTR_INTR_MSK_SET_REG_PCIE_TGT_CA_ATTN_ALIGN 0 -#define INTR_INTR_MSK_SET_REG_PCIE_TGT_CA_ATTN_BITS 1 -#define INTR_INTR_MSK_SET_REG_PCIE_TGT_CA_ATTN_SHIFT 25 - -/* INTR :: INTR_MSK_SET_REG :: PCIE_TGT_UR_ATTN [24:24] */ -#define INTR_INTR_MSK_SET_REG_PCIE_TGT_UR_ATTN_MASK 0x01000000 -#define INTR_INTR_MSK_SET_REG_PCIE_TGT_UR_ATTN_ALIGN 0 -#define INTR_INTR_MSK_SET_REG_PCIE_TGT_UR_ATTN_BITS 1 -#define INTR_INTR_MSK_SET_REG_PCIE_TGT_UR_ATTN_SHIFT 24 - -/* INTR :: INTR_MSK_SET_REG :: reserved1 [23:14] */ -#define INTR_INTR_MSK_SET_REG_reserved1_MASK 0x00ffc000 -#define INTR_INTR_MSK_SET_REG_reserved1_ALIGN 0 -#define INTR_INTR_MSK_SET_REG_reserved1_BITS 10 -#define INTR_INTR_MSK_SET_REG_reserved1_SHIFT 14 - -/* INTR :: INTR_MSK_SET_REG :: L1_UV_RX_DMA_ERR_INTR_MSK_SET [13:13] */ -#define INTR_INTR_MSK_SET_REG_L1_UV_RX_DMA_ERR_INTR_MSK_SET_MASK 0x00002000 -#define INTR_INTR_MSK_SET_REG_L1_UV_RX_DMA_ERR_INTR_MSK_SET_ALIGN 0 -#define INTR_INTR_MSK_SET_REG_L1_UV_RX_DMA_ERR_INTR_MSK_SET_BITS 1 -#define INTR_INTR_MSK_SET_REG_L1_UV_RX_DMA_ERR_INTR_MSK_SET_SHIFT 13 - -/* INTR :: INTR_MSK_SET_REG :: L1_UV_RX_DMA_DONE_INTR_MSK_SET [12:12] */ -#define INTR_INTR_MSK_SET_REG_L1_UV_RX_DMA_DONE_INTR_MSK_SET_MASK 0x00001000 -#define INTR_INTR_MSK_SET_REG_L1_UV_RX_DMA_DONE_INTR_MSK_SET_ALIGN 0 -#define INTR_INTR_MSK_SET_REG_L1_UV_RX_DMA_DONE_INTR_MSK_SET_BITS 1 -#define INTR_INTR_MSK_SET_REG_L1_UV_RX_DMA_DONE_INTR_MSK_SET_SHIFT 12 - -/* INTR :: INTR_MSK_SET_REG :: L1_Y_RX_DMA_ERR_INTR_MSK_SET [11:11] */ -#define INTR_INTR_MSK_SET_REG_L1_Y_RX_DMA_ERR_INTR_MSK_SET_MASK 0x00000800 -#define INTR_INTR_MSK_SET_REG_L1_Y_RX_DMA_ERR_INTR_MSK_SET_ALIGN 0 -#define INTR_INTR_MSK_SET_REG_L1_Y_RX_DMA_ERR_INTR_MSK_SET_BITS 1 -#define INTR_INTR_MSK_SET_REG_L1_Y_RX_DMA_ERR_INTR_MSK_SET_SHIFT 11 - -/* INTR :: INTR_MSK_SET_REG :: L1_Y_RX_DMA_DONE_INTR_MSK_SET [10:10] */ -#define INTR_INTR_MSK_SET_REG_L1_Y_RX_DMA_DONE_INTR_MSK_SET_MASK 0x00000400 -#define INTR_INTR_MSK_SET_REG_L1_Y_RX_DMA_DONE_INTR_MSK_SET_ALIGN 0 -#define INTR_INTR_MSK_SET_REG_L1_Y_RX_DMA_DONE_INTR_MSK_SET_BITS 1 -#define INTR_INTR_MSK_SET_REG_L1_Y_RX_DMA_DONE_INTR_MSK_SET_SHIFT 10 - -/* INTR :: INTR_MSK_SET_REG :: L1_TX_DMA_ERR_INTR_MSK_SET [09:09] */ -#define INTR_INTR_MSK_SET_REG_L1_TX_DMA_ERR_INTR_MSK_SET_MASK 0x00000200 -#define INTR_INTR_MSK_SET_REG_L1_TX_DMA_ERR_INTR_MSK_SET_ALIGN 0 -#define INTR_INTR_MSK_SET_REG_L1_TX_DMA_ERR_INTR_MSK_SET_BITS 1 -#define INTR_INTR_MSK_SET_REG_L1_TX_DMA_ERR_INTR_MSK_SET_SHIFT 9 - -/* INTR :: INTR_MSK_SET_REG :: L1_TX_DMA_DONE_INTR_MSK_SET [08:08] */ -#define INTR_INTR_MSK_SET_REG_L1_TX_DMA_DONE_INTR_MSK_SET_MASK 0x00000100 -#define INTR_INTR_MSK_SET_REG_L1_TX_DMA_DONE_INTR_MSK_SET_ALIGN 0 -#define INTR_INTR_MSK_SET_REG_L1_TX_DMA_DONE_INTR_MSK_SET_BITS 1 -#define INTR_INTR_MSK_SET_REG_L1_TX_DMA_DONE_INTR_MSK_SET_SHIFT 8 - -/* INTR :: INTR_MSK_SET_REG :: reserved2 [07:06] */ -#define INTR_INTR_MSK_SET_REG_reserved2_MASK 0x000000c0 -#define INTR_INTR_MSK_SET_REG_reserved2_ALIGN 0 -#define INTR_INTR_MSK_SET_REG_reserved2_BITS 2 -#define INTR_INTR_MSK_SET_REG_reserved2_SHIFT 6 - -/* INTR :: INTR_MSK_SET_REG :: L0_UV_RX_DMA_ERR_INTR_MSK_SET [05:05] */ -#define INTR_INTR_MSK_SET_REG_L0_UV_RX_DMA_ERR_INTR_MSK_SET_MASK 0x00000020 -#define INTR_INTR_MSK_SET_REG_L0_UV_RX_DMA_ERR_INTR_MSK_SET_ALIGN 0 -#define INTR_INTR_MSK_SET_REG_L0_UV_RX_DMA_ERR_INTR_MSK_SET_BITS 1 -#define INTR_INTR_MSK_SET_REG_L0_UV_RX_DMA_ERR_INTR_MSK_SET_SHIFT 5 - -/* INTR :: INTR_MSK_SET_REG :: L0_UV_RX_DMA_DONE_INTR_MSK_SET [04:04] */ -#define INTR_INTR_MSK_SET_REG_L0_UV_RX_DMA_DONE_INTR_MSK_SET_MASK 0x00000010 -#define INTR_INTR_MSK_SET_REG_L0_UV_RX_DMA_DONE_INTR_MSK_SET_ALIGN 0 -#define INTR_INTR_MSK_SET_REG_L0_UV_RX_DMA_DONE_INTR_MSK_SET_BITS 1 -#define INTR_INTR_MSK_SET_REG_L0_UV_RX_DMA_DONE_INTR_MSK_SET_SHIFT 4 - -/* INTR :: INTR_MSK_SET_REG :: L0_Y_RX_DMA_ERR_INTR_MSK_SET [03:03] */ -#define INTR_INTR_MSK_SET_REG_L0_Y_RX_DMA_ERR_INTR_MSK_SET_MASK 0x00000008 -#define INTR_INTR_MSK_SET_REG_L0_Y_RX_DMA_ERR_INTR_MSK_SET_ALIGN 0 -#define INTR_INTR_MSK_SET_REG_L0_Y_RX_DMA_ERR_INTR_MSK_SET_BITS 1 -#define INTR_INTR_MSK_SET_REG_L0_Y_RX_DMA_ERR_INTR_MSK_SET_SHIFT 3 - -/* INTR :: INTR_MSK_SET_REG :: L0_Y_RX_DMA_DONE_INTR_MSK_SET [02:02] */ -#define INTR_INTR_MSK_SET_REG_L0_Y_RX_DMA_DONE_INTR_MSK_SET_MASK 0x00000004 -#define INTR_INTR_MSK_SET_REG_L0_Y_RX_DMA_DONE_INTR_MSK_SET_ALIGN 0 -#define INTR_INTR_MSK_SET_REG_L0_Y_RX_DMA_DONE_INTR_MSK_SET_BITS 1 -#define INTR_INTR_MSK_SET_REG_L0_Y_RX_DMA_DONE_INTR_MSK_SET_SHIFT 2 - -/* INTR :: INTR_MSK_SET_REG :: L0_TX_DMA_ERR_INTR_MSK_SET [01:01] */ -#define INTR_INTR_MSK_SET_REG_L0_TX_DMA_ERR_INTR_MSK_SET_MASK 0x00000002 -#define INTR_INTR_MSK_SET_REG_L0_TX_DMA_ERR_INTR_MSK_SET_ALIGN 0 -#define INTR_INTR_MSK_SET_REG_L0_TX_DMA_ERR_INTR_MSK_SET_BITS 1 -#define INTR_INTR_MSK_SET_REG_L0_TX_DMA_ERR_INTR_MSK_SET_SHIFT 1 - -/* INTR :: INTR_MSK_SET_REG :: L0_TX_DMA_DONE_INTR_MSK_SET [00:00] */ -#define INTR_INTR_MSK_SET_REG_L0_TX_DMA_DONE_INTR_MSK_SET_MASK 0x00000001 -#define INTR_INTR_MSK_SET_REG_L0_TX_DMA_DONE_INTR_MSK_SET_ALIGN 0 -#define INTR_INTR_MSK_SET_REG_L0_TX_DMA_DONE_INTR_MSK_SET_BITS 1 -#define INTR_INTR_MSK_SET_REG_L0_TX_DMA_DONE_INTR_MSK_SET_SHIFT 0 - - -/**************************************************************************** - * INTR :: INTR_MSK_CLR_REG - ***************************************************************************/ -/* INTR :: INTR_MSK_CLR_REG :: reserved0 [31:26] */ -#define INTR_INTR_MSK_CLR_REG_reserved0_MASK 0xfc000000 -#define INTR_INTR_MSK_CLR_REG_reserved0_ALIGN 0 -#define INTR_INTR_MSK_CLR_REG_reserved0_BITS 6 -#define INTR_INTR_MSK_CLR_REG_reserved0_SHIFT 26 - -/* INTR :: INTR_MSK_CLR_REG :: PCIE_TGT_CA_ATTN [25:25] */ -#define INTR_INTR_MSK_CLR_REG_PCIE_TGT_CA_ATTN_MASK 0x02000000 -#define INTR_INTR_MSK_CLR_REG_PCIE_TGT_CA_ATTN_ALIGN 0 -#define INTR_INTR_MSK_CLR_REG_PCIE_TGT_CA_ATTN_BITS 1 -#define INTR_INTR_MSK_CLR_REG_PCIE_TGT_CA_ATTN_SHIFT 25 - -/* INTR :: INTR_MSK_CLR_REG :: PCIE_TGT_UR_ATTN [24:24] */ -#define INTR_INTR_MSK_CLR_REG_PCIE_TGT_UR_ATTN_MASK 0x01000000 -#define INTR_INTR_MSK_CLR_REG_PCIE_TGT_UR_ATTN_ALIGN 0 -#define INTR_INTR_MSK_CLR_REG_PCIE_TGT_UR_ATTN_BITS 1 -#define INTR_INTR_MSK_CLR_REG_PCIE_TGT_UR_ATTN_SHIFT 24 - -/* INTR :: INTR_MSK_CLR_REG :: reserved1 [23:14] */ -#define INTR_INTR_MSK_CLR_REG_reserved1_MASK 0x00ffc000 -#define INTR_INTR_MSK_CLR_REG_reserved1_ALIGN 0 -#define INTR_INTR_MSK_CLR_REG_reserved1_BITS 10 -#define INTR_INTR_MSK_CLR_REG_reserved1_SHIFT 14 - -/* INTR :: INTR_MSK_CLR_REG :: L1_UV_RX_DMA_ERR_INTR_MSK_CLR [13:13] */ -#define INTR_INTR_MSK_CLR_REG_L1_UV_RX_DMA_ERR_INTR_MSK_CLR_MASK 0x00002000 -#define INTR_INTR_MSK_CLR_REG_L1_UV_RX_DMA_ERR_INTR_MSK_CLR_ALIGN 0 -#define INTR_INTR_MSK_CLR_REG_L1_UV_RX_DMA_ERR_INTR_MSK_CLR_BITS 1 -#define INTR_INTR_MSK_CLR_REG_L1_UV_RX_DMA_ERR_INTR_MSK_CLR_SHIFT 13 - -/* INTR :: INTR_MSK_CLR_REG :: L1_UV_RX_DMA_DONE_INTR_MSK_CLR [12:12] */ -#define INTR_INTR_MSK_CLR_REG_L1_UV_RX_DMA_DONE_INTR_MSK_CLR_MASK 0x00001000 -#define INTR_INTR_MSK_CLR_REG_L1_UV_RX_DMA_DONE_INTR_MSK_CLR_ALIGN 0 -#define INTR_INTR_MSK_CLR_REG_L1_UV_RX_DMA_DONE_INTR_MSK_CLR_BITS 1 -#define INTR_INTR_MSK_CLR_REG_L1_UV_RX_DMA_DONE_INTR_MSK_CLR_SHIFT 12 - -/* INTR :: INTR_MSK_CLR_REG :: L1_Y_RX_DMA_ERR_INTR_MSK_CLR [11:11] */ -#define INTR_INTR_MSK_CLR_REG_L1_Y_RX_DMA_ERR_INTR_MSK_CLR_MASK 0x00000800 -#define INTR_INTR_MSK_CLR_REG_L1_Y_RX_DMA_ERR_INTR_MSK_CLR_ALIGN 0 -#define INTR_INTR_MSK_CLR_REG_L1_Y_RX_DMA_ERR_INTR_MSK_CLR_BITS 1 -#define INTR_INTR_MSK_CLR_REG_L1_Y_RX_DMA_ERR_INTR_MSK_CLR_SHIFT 11 - -/* INTR :: INTR_MSK_CLR_REG :: L1_Y_RX_DMA_DONE_INTR_MSK_CLR [10:10] */ -#define INTR_INTR_MSK_CLR_REG_L1_Y_RX_DMA_DONE_INTR_MSK_CLR_MASK 0x00000400 -#define INTR_INTR_MSK_CLR_REG_L1_Y_RX_DMA_DONE_INTR_MSK_CLR_ALIGN 0 -#define INTR_INTR_MSK_CLR_REG_L1_Y_RX_DMA_DONE_INTR_MSK_CLR_BITS 1 -#define INTR_INTR_MSK_CLR_REG_L1_Y_RX_DMA_DONE_INTR_MSK_CLR_SHIFT 10 - -/* INTR :: INTR_MSK_CLR_REG :: L1_TX_DMA_ERR_INTR_MSK_CLR [09:09] */ -#define INTR_INTR_MSK_CLR_REG_L1_TX_DMA_ERR_INTR_MSK_CLR_MASK 0x00000200 -#define INTR_INTR_MSK_CLR_REG_L1_TX_DMA_ERR_INTR_MSK_CLR_ALIGN 0 -#define INTR_INTR_MSK_CLR_REG_L1_TX_DMA_ERR_INTR_MSK_CLR_BITS 1 -#define INTR_INTR_MSK_CLR_REG_L1_TX_DMA_ERR_INTR_MSK_CLR_SHIFT 9 - -/* INTR :: INTR_MSK_CLR_REG :: L1_TX_DMA_DONE_INTR_MSK_CLR [08:08] */ -#define INTR_INTR_MSK_CLR_REG_L1_TX_DMA_DONE_INTR_MSK_CLR_MASK 0x00000100 -#define INTR_INTR_MSK_CLR_REG_L1_TX_DMA_DONE_INTR_MSK_CLR_ALIGN 0 -#define INTR_INTR_MSK_CLR_REG_L1_TX_DMA_DONE_INTR_MSK_CLR_BITS 1 -#define INTR_INTR_MSK_CLR_REG_L1_TX_DMA_DONE_INTR_MSK_CLR_SHIFT 8 - -/* INTR :: INTR_MSK_CLR_REG :: reserved2 [07:06] */ -#define INTR_INTR_MSK_CLR_REG_reserved2_MASK 0x000000c0 -#define INTR_INTR_MSK_CLR_REG_reserved2_ALIGN 0 -#define INTR_INTR_MSK_CLR_REG_reserved2_BITS 2 -#define INTR_INTR_MSK_CLR_REG_reserved2_SHIFT 6 - -/* INTR :: INTR_MSK_CLR_REG :: L0_UV_RX_DMA_ERR_INTR_MSK_CLR [05:05] */ -#define INTR_INTR_MSK_CLR_REG_L0_UV_RX_DMA_ERR_INTR_MSK_CLR_MASK 0x00000020 -#define INTR_INTR_MSK_CLR_REG_L0_UV_RX_DMA_ERR_INTR_MSK_CLR_ALIGN 0 -#define INTR_INTR_MSK_CLR_REG_L0_UV_RX_DMA_ERR_INTR_MSK_CLR_BITS 1 -#define INTR_INTR_MSK_CLR_REG_L0_UV_RX_DMA_ERR_INTR_MSK_CLR_SHIFT 5 - -/* INTR :: INTR_MSK_CLR_REG :: L0_UV_RX_DMA_DONE_INTR_MSK_CLR [04:04] */ -#define INTR_INTR_MSK_CLR_REG_L0_UV_RX_DMA_DONE_INTR_MSK_CLR_MASK 0x00000010 -#define INTR_INTR_MSK_CLR_REG_L0_UV_RX_DMA_DONE_INTR_MSK_CLR_ALIGN 0 -#define INTR_INTR_MSK_CLR_REG_L0_UV_RX_DMA_DONE_INTR_MSK_CLR_BITS 1 -#define INTR_INTR_MSK_CLR_REG_L0_UV_RX_DMA_DONE_INTR_MSK_CLR_SHIFT 4 - -/* INTR :: INTR_MSK_CLR_REG :: L0_Y_RX_DMA_ERR_INTR_MSK_CLR [03:03] */ -#define INTR_INTR_MSK_CLR_REG_L0_Y_RX_DMA_ERR_INTR_MSK_CLR_MASK 0x00000008 -#define INTR_INTR_MSK_CLR_REG_L0_Y_RX_DMA_ERR_INTR_MSK_CLR_ALIGN 0 -#define INTR_INTR_MSK_CLR_REG_L0_Y_RX_DMA_ERR_INTR_MSK_CLR_BITS 1 -#define INTR_INTR_MSK_CLR_REG_L0_Y_RX_DMA_ERR_INTR_MSK_CLR_SHIFT 3 - -/* INTR :: INTR_MSK_CLR_REG :: L0_Y_RX_DMA_DONE_INTR_MSK_CLR [02:02] */ -#define INTR_INTR_MSK_CLR_REG_L0_Y_RX_DMA_DONE_INTR_MSK_CLR_MASK 0x00000004 -#define INTR_INTR_MSK_CLR_REG_L0_Y_RX_DMA_DONE_INTR_MSK_CLR_ALIGN 0 -#define INTR_INTR_MSK_CLR_REG_L0_Y_RX_DMA_DONE_INTR_MSK_CLR_BITS 1 -#define INTR_INTR_MSK_CLR_REG_L0_Y_RX_DMA_DONE_INTR_MSK_CLR_SHIFT 2 - -/* INTR :: INTR_MSK_CLR_REG :: L0_TX_DMA_ERR_INTR_MSK_CLR [01:01] */ -#define INTR_INTR_MSK_CLR_REG_L0_TX_DMA_ERR_INTR_MSK_CLR_MASK 0x00000002 -#define INTR_INTR_MSK_CLR_REG_L0_TX_DMA_ERR_INTR_MSK_CLR_ALIGN 0 -#define INTR_INTR_MSK_CLR_REG_L0_TX_DMA_ERR_INTR_MSK_CLR_BITS 1 -#define INTR_INTR_MSK_CLR_REG_L0_TX_DMA_ERR_INTR_MSK_CLR_SHIFT 1 - -/* INTR :: INTR_MSK_CLR_REG :: L0_TX_DMA_DONE_INTR_MSK_CLR [00:00] */ -#define INTR_INTR_MSK_CLR_REG_L0_TX_DMA_DONE_INTR_MSK_CLR_MASK 0x00000001 -#define INTR_INTR_MSK_CLR_REG_L0_TX_DMA_DONE_INTR_MSK_CLR_ALIGN 0 -#define INTR_INTR_MSK_CLR_REG_L0_TX_DMA_DONE_INTR_MSK_CLR_BITS 1 -#define INTR_INTR_MSK_CLR_REG_L0_TX_DMA_DONE_INTR_MSK_CLR_SHIFT 0 - - -/**************************************************************************** - * INTR :: EOI_CTRL - ***************************************************************************/ -/* INTR :: EOI_CTRL :: reserved0 [31:01] */ -#define INTR_EOI_CTRL_reserved0_MASK 0xfffffffe -#define INTR_EOI_CTRL_reserved0_ALIGN 0 -#define INTR_EOI_CTRL_reserved0_BITS 31 -#define INTR_EOI_CTRL_reserved0_SHIFT 1 - -/* INTR :: EOI_CTRL :: EOI [00:00] */ -#define INTR_EOI_CTRL_EOI_MASK 0x00000001 -#define INTR_EOI_CTRL_EOI_ALIGN 0 -#define INTR_EOI_CTRL_EOI_BITS 1 -#define INTR_EOI_CTRL_EOI_SHIFT 0 - - -/**************************************************************************** - * BCM70012_TGT_TOP_MDIO - ***************************************************************************/ -/**************************************************************************** - * MDIO :: CTRL0 - ***************************************************************************/ -/* MDIO :: CTRL0 :: reserved0 [31:22] */ -#define MDIO_CTRL0_reserved0_MASK 0xffc00000 -#define MDIO_CTRL0_reserved0_ALIGN 0 -#define MDIO_CTRL0_reserved0_BITS 10 -#define MDIO_CTRL0_reserved0_SHIFT 22 - -/* MDIO :: CTRL0 :: WRITE_READ_COMMAND [21:21] */ -#define MDIO_CTRL0_WRITE_READ_COMMAND_MASK 0x00200000 -#define MDIO_CTRL0_WRITE_READ_COMMAND_ALIGN 0 -#define MDIO_CTRL0_WRITE_READ_COMMAND_BITS 1 -#define MDIO_CTRL0_WRITE_READ_COMMAND_SHIFT 21 - -/* MDIO :: CTRL0 :: PHYAD [20:16] */ -#define MDIO_CTRL0_PHYAD_MASK 0x001f0000 -#define MDIO_CTRL0_PHYAD_ALIGN 0 -#define MDIO_CTRL0_PHYAD_BITS 5 -#define MDIO_CTRL0_PHYAD_SHIFT 16 - -/* MDIO :: CTRL0 :: reserved1 [15:05] */ -#define MDIO_CTRL0_reserved1_MASK 0x0000ffe0 -#define MDIO_CTRL0_reserved1_ALIGN 0 -#define MDIO_CTRL0_reserved1_BITS 11 -#define MDIO_CTRL0_reserved1_SHIFT 5 - -/* MDIO :: CTRL0 :: REGAD [04:00] */ -#define MDIO_CTRL0_REGAD_MASK 0x0000001f -#define MDIO_CTRL0_REGAD_ALIGN 0 -#define MDIO_CTRL0_REGAD_BITS 5 -#define MDIO_CTRL0_REGAD_SHIFT 0 - - -/**************************************************************************** - * MDIO :: CTRL1 - ***************************************************************************/ -/* MDIO :: CTRL1 :: WR_STATUS [31:31] */ -#define MDIO_CTRL1_WR_STATUS_MASK 0x80000000 -#define MDIO_CTRL1_WR_STATUS_ALIGN 0 -#define MDIO_CTRL1_WR_STATUS_BITS 1 -#define MDIO_CTRL1_WR_STATUS_SHIFT 31 - -/* MDIO :: CTRL1 :: reserved0 [30:16] */ -#define MDIO_CTRL1_reserved0_MASK 0x7fff0000 -#define MDIO_CTRL1_reserved0_ALIGN 0 -#define MDIO_CTRL1_reserved0_BITS 15 -#define MDIO_CTRL1_reserved0_SHIFT 16 - -/* MDIO :: CTRL1 :: Write_Data [15:00] */ -#define MDIO_CTRL1_Write_Data_MASK 0x0000ffff -#define MDIO_CTRL1_Write_Data_ALIGN 0 -#define MDIO_CTRL1_Write_Data_BITS 16 -#define MDIO_CTRL1_Write_Data_SHIFT 0 - - -/**************************************************************************** - * MDIO :: CTRL2 - ***************************************************************************/ -/* MDIO :: CTRL2 :: RD_STATUS [31:31] */ -#define MDIO_CTRL2_RD_STATUS_MASK 0x80000000 -#define MDIO_CTRL2_RD_STATUS_ALIGN 0 -#define MDIO_CTRL2_RD_STATUS_BITS 1 -#define MDIO_CTRL2_RD_STATUS_SHIFT 31 - -/* MDIO :: CTRL2 :: reserved0 [30:16] */ -#define MDIO_CTRL2_reserved0_MASK 0x7fff0000 -#define MDIO_CTRL2_reserved0_ALIGN 0 -#define MDIO_CTRL2_reserved0_BITS 15 -#define MDIO_CTRL2_reserved0_SHIFT 16 - -/* MDIO :: CTRL2 :: Read_Data [15:00] */ -#define MDIO_CTRL2_Read_Data_MASK 0x0000ffff -#define MDIO_CTRL2_Read_Data_ALIGN 0 -#define MDIO_CTRL2_Read_Data_BITS 16 -#define MDIO_CTRL2_Read_Data_SHIFT 0 - - -/**************************************************************************** - * BCM70012_TGT_TOP_TGT_RGR_BRIDGE - ***************************************************************************/ -/**************************************************************************** - * TGT_RGR_BRIDGE :: REVISION - ***************************************************************************/ -/* TGT_RGR_BRIDGE :: REVISION :: reserved0 [31:16] */ -#define TGT_RGR_BRIDGE_REVISION_reserved0_MASK 0xffff0000 -#define TGT_RGR_BRIDGE_REVISION_reserved0_ALIGN 0 -#define TGT_RGR_BRIDGE_REVISION_reserved0_BITS 16 -#define TGT_RGR_BRIDGE_REVISION_reserved0_SHIFT 16 - -/* TGT_RGR_BRIDGE :: REVISION :: MAJOR [15:08] */ -#define TGT_RGR_BRIDGE_REVISION_MAJOR_MASK 0x0000ff00 -#define TGT_RGR_BRIDGE_REVISION_MAJOR_ALIGN 0 -#define TGT_RGR_BRIDGE_REVISION_MAJOR_BITS 8 -#define TGT_RGR_BRIDGE_REVISION_MAJOR_SHIFT 8 - -/* TGT_RGR_BRIDGE :: REVISION :: MINOR [07:00] */ -#define TGT_RGR_BRIDGE_REVISION_MINOR_MASK 0x000000ff -#define TGT_RGR_BRIDGE_REVISION_MINOR_ALIGN 0 -#define TGT_RGR_BRIDGE_REVISION_MINOR_BITS 8 -#define TGT_RGR_BRIDGE_REVISION_MINOR_SHIFT 0 - - -/**************************************************************************** - * TGT_RGR_BRIDGE :: CTRL - ***************************************************************************/ -/* TGT_RGR_BRIDGE :: CTRL :: reserved0 [31:02] */ -#define TGT_RGR_BRIDGE_CTRL_reserved0_MASK 0xfffffffc -#define TGT_RGR_BRIDGE_CTRL_reserved0_ALIGN 0 -#define TGT_RGR_BRIDGE_CTRL_reserved0_BITS 30 -#define TGT_RGR_BRIDGE_CTRL_reserved0_SHIFT 2 - -/* TGT_RGR_BRIDGE :: CTRL :: RBUS_ERROR_INTR [01:01] */ -#define TGT_RGR_BRIDGE_CTRL_RBUS_ERROR_INTR_MASK 0x00000002 -#define TGT_RGR_BRIDGE_CTRL_RBUS_ERROR_INTR_ALIGN 0 -#define TGT_RGR_BRIDGE_CTRL_RBUS_ERROR_INTR_BITS 1 -#define TGT_RGR_BRIDGE_CTRL_RBUS_ERROR_INTR_SHIFT 1 - -/* TGT_RGR_BRIDGE :: CTRL :: GISB_ERROR_INTR [00:00] */ -#define TGT_RGR_BRIDGE_CTRL_GISB_ERROR_INTR_MASK 0x00000001 -#define TGT_RGR_BRIDGE_CTRL_GISB_ERROR_INTR_ALIGN 0 -#define TGT_RGR_BRIDGE_CTRL_GISB_ERROR_INTR_BITS 1 -#define TGT_RGR_BRIDGE_CTRL_GISB_ERROR_INTR_SHIFT 0 - - -/**************************************************************************** - * TGT_RGR_BRIDGE :: RBUS_TIMER - ***************************************************************************/ -/* TGT_RGR_BRIDGE :: RBUS_TIMER :: reserved0 [31:16] */ -#define TGT_RGR_BRIDGE_RBUS_TIMER_reserved0_MASK 0xffff0000 -#define TGT_RGR_BRIDGE_RBUS_TIMER_reserved0_ALIGN 0 -#define TGT_RGR_BRIDGE_RBUS_TIMER_reserved0_BITS 16 -#define TGT_RGR_BRIDGE_RBUS_TIMER_reserved0_SHIFT 16 - -/* TGT_RGR_BRIDGE :: RBUS_TIMER :: RBUS_TO_RBUS_TRANS_TIMER_CNT [15:00] */ -#define TGT_RGR_BRIDGE_RBUS_TIMER_RBUS_TO_RBUS_TRANS_TIMER_CNT_MASK 0x0000ffff -#define TGT_RGR_BRIDGE_RBUS_TIMER_RBUS_TO_RBUS_TRANS_TIMER_CNT_ALIGN 0 -#define TGT_RGR_BRIDGE_RBUS_TIMER_RBUS_TO_RBUS_TRANS_TIMER_CNT_BITS 16 -#define TGT_RGR_BRIDGE_RBUS_TIMER_RBUS_TO_RBUS_TRANS_TIMER_CNT_SHIFT 0 - - -/**************************************************************************** - * TGT_RGR_BRIDGE :: SPARE_SW_RESET_0 - ***************************************************************************/ -/* TGT_RGR_BRIDGE :: SPARE_SW_RESET_0 :: reserved0 [31:01] */ -#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_MASK 0xfffffffe -#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_ALIGN 0 -#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_BITS 31 -#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_SHIFT 1 - -/* TGT_RGR_BRIDGE :: SPARE_SW_RESET_0 :: SPARE_SW_RESET [00:00] */ -#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_MASK 0x00000001 -#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ALIGN 0 -#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_BITS 1 -#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_SHIFT 0 - - -/**************************************************************************** - * TGT_RGR_BRIDGE :: SPARE_SW_RESET_1 - ***************************************************************************/ -/* TGT_RGR_BRIDGE :: SPARE_SW_RESET_1 :: reserved0 [31:01] */ -#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_MASK 0xfffffffe -#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_ALIGN 0 -#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_BITS 31 -#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_SHIFT 1 - -/* TGT_RGR_BRIDGE :: SPARE_SW_RESET_1 :: SPARE_SW_RESET [00:00] */ -#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_MASK 0x00000001 -#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ALIGN 0 -#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_BITS 1 -#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_SHIFT 0 - - -/**************************************************************************** - * BCM70012_I2C_TOP_I2C - ***************************************************************************/ -/**************************************************************************** - * I2C :: CHIP_ADDRESS - ***************************************************************************/ -/* I2C :: CHIP_ADDRESS :: reserved0 [31:08] */ -#define I2C_CHIP_ADDRESS_reserved0_MASK 0xffffff00 -#define I2C_CHIP_ADDRESS_reserved0_ALIGN 0 -#define I2C_CHIP_ADDRESS_reserved0_BITS 24 -#define I2C_CHIP_ADDRESS_reserved0_SHIFT 8 - -/* I2C :: CHIP_ADDRESS :: CHIP_ADDRESS [07:01] */ -#define I2C_CHIP_ADDRESS_CHIP_ADDRESS_MASK 0x000000fe -#define I2C_CHIP_ADDRESS_CHIP_ADDRESS_ALIGN 0 -#define I2C_CHIP_ADDRESS_CHIP_ADDRESS_BITS 7 -#define I2C_CHIP_ADDRESS_CHIP_ADDRESS_SHIFT 1 - -/* I2C :: CHIP_ADDRESS :: RESERVED [00:00] */ -#define I2C_CHIP_ADDRESS_RESERVED_MASK 0x00000001 -#define I2C_CHIP_ADDRESS_RESERVED_ALIGN 0 -#define I2C_CHIP_ADDRESS_RESERVED_BITS 1 -#define I2C_CHIP_ADDRESS_RESERVED_SHIFT 0 - - -/**************************************************************************** - * I2C :: DATA_IN0 - ***************************************************************************/ -/* I2C :: DATA_IN0 :: reserved0 [31:08] */ -#define I2C_DATA_IN0_reserved0_MASK 0xffffff00 -#define I2C_DATA_IN0_reserved0_ALIGN 0 -#define I2C_DATA_IN0_reserved0_BITS 24 -#define I2C_DATA_IN0_reserved0_SHIFT 8 - -/* I2C :: DATA_IN0 :: DATA_IN0 [07:00] */ -#define I2C_DATA_IN0_DATA_IN0_MASK 0x000000ff -#define I2C_DATA_IN0_DATA_IN0_ALIGN 0 -#define I2C_DATA_IN0_DATA_IN0_BITS 8 -#define I2C_DATA_IN0_DATA_IN0_SHIFT 0 - - -/**************************************************************************** - * I2C :: DATA_IN1 - ***************************************************************************/ -/* I2C :: DATA_IN1 :: reserved0 [31:08] */ -#define I2C_DATA_IN1_reserved0_MASK 0xffffff00 -#define I2C_DATA_IN1_reserved0_ALIGN 0 -#define I2C_DATA_IN1_reserved0_BITS 24 -#define I2C_DATA_IN1_reserved0_SHIFT 8 - -/* I2C :: DATA_IN1 :: DATA_IN1 [07:00] */ -#define I2C_DATA_IN1_DATA_IN1_MASK 0x000000ff -#define I2C_DATA_IN1_DATA_IN1_ALIGN 0 -#define I2C_DATA_IN1_DATA_IN1_BITS 8 -#define I2C_DATA_IN1_DATA_IN1_SHIFT 0 - - -/**************************************************************************** - * I2C :: DATA_IN2 - ***************************************************************************/ -/* I2C :: DATA_IN2 :: reserved0 [31:08] */ -#define I2C_DATA_IN2_reserved0_MASK 0xffffff00 -#define I2C_DATA_IN2_reserved0_ALIGN 0 -#define I2C_DATA_IN2_reserved0_BITS 24 -#define I2C_DATA_IN2_reserved0_SHIFT 8 - -/* I2C :: DATA_IN2 :: DATA_IN2 [07:00] */ -#define I2C_DATA_IN2_DATA_IN2_MASK 0x000000ff -#define I2C_DATA_IN2_DATA_IN2_ALIGN 0 -#define I2C_DATA_IN2_DATA_IN2_BITS 8 -#define I2C_DATA_IN2_DATA_IN2_SHIFT 0 - - -/**************************************************************************** - * I2C :: DATA_IN3 - ***************************************************************************/ -/* I2C :: DATA_IN3 :: reserved0 [31:08] */ -#define I2C_DATA_IN3_reserved0_MASK 0xffffff00 -#define I2C_DATA_IN3_reserved0_ALIGN 0 -#define I2C_DATA_IN3_reserved0_BITS 24 -#define I2C_DATA_IN3_reserved0_SHIFT 8 - -/* I2C :: DATA_IN3 :: DATA_IN3 [07:00] */ -#define I2C_DATA_IN3_DATA_IN3_MASK 0x000000ff -#define I2C_DATA_IN3_DATA_IN3_ALIGN 0 -#define I2C_DATA_IN3_DATA_IN3_BITS 8 -#define I2C_DATA_IN3_DATA_IN3_SHIFT 0 - - -/**************************************************************************** - * I2C :: DATA_IN4 - ***************************************************************************/ -/* I2C :: DATA_IN4 :: reserved0 [31:08] */ -#define I2C_DATA_IN4_reserved0_MASK 0xffffff00 -#define I2C_DATA_IN4_reserved0_ALIGN 0 -#define I2C_DATA_IN4_reserved0_BITS 24 -#define I2C_DATA_IN4_reserved0_SHIFT 8 - -/* I2C :: DATA_IN4 :: DATA_IN4 [07:00] */ -#define I2C_DATA_IN4_DATA_IN4_MASK 0x000000ff -#define I2C_DATA_IN4_DATA_IN4_ALIGN 0 -#define I2C_DATA_IN4_DATA_IN4_BITS 8 -#define I2C_DATA_IN4_DATA_IN4_SHIFT 0 - - -/**************************************************************************** - * I2C :: DATA_IN5 - ***************************************************************************/ -/* I2C :: DATA_IN5 :: reserved0 [31:08] */ -#define I2C_DATA_IN5_reserved0_MASK 0xffffff00 -#define I2C_DATA_IN5_reserved0_ALIGN 0 -#define I2C_DATA_IN5_reserved0_BITS 24 -#define I2C_DATA_IN5_reserved0_SHIFT 8 - -/* I2C :: DATA_IN5 :: DATA_IN5 [07:00] */ -#define I2C_DATA_IN5_DATA_IN5_MASK 0x000000ff -#define I2C_DATA_IN5_DATA_IN5_ALIGN 0 -#define I2C_DATA_IN5_DATA_IN5_BITS 8 -#define I2C_DATA_IN5_DATA_IN5_SHIFT 0 - - -/**************************************************************************** - * I2C :: DATA_IN6 - ***************************************************************************/ -/* I2C :: DATA_IN6 :: reserved0 [31:08] */ -#define I2C_DATA_IN6_reserved0_MASK 0xffffff00 -#define I2C_DATA_IN6_reserved0_ALIGN 0 -#define I2C_DATA_IN6_reserved0_BITS 24 -#define I2C_DATA_IN6_reserved0_SHIFT 8 - -/* I2C :: DATA_IN6 :: DATA_IN6 [07:00] */ -#define I2C_DATA_IN6_DATA_IN6_MASK 0x000000ff -#define I2C_DATA_IN6_DATA_IN6_ALIGN 0 -#define I2C_DATA_IN6_DATA_IN6_BITS 8 -#define I2C_DATA_IN6_DATA_IN6_SHIFT 0 - - -/**************************************************************************** - * I2C :: DATA_IN7 - ***************************************************************************/ -/* I2C :: DATA_IN7 :: reserved0 [31:08] */ -#define I2C_DATA_IN7_reserved0_MASK 0xffffff00 -#define I2C_DATA_IN7_reserved0_ALIGN 0 -#define I2C_DATA_IN7_reserved0_BITS 24 -#define I2C_DATA_IN7_reserved0_SHIFT 8 - -/* I2C :: DATA_IN7 :: DATA_IN7 [07:00] */ -#define I2C_DATA_IN7_DATA_IN7_MASK 0x000000ff -#define I2C_DATA_IN7_DATA_IN7_ALIGN 0 -#define I2C_DATA_IN7_DATA_IN7_BITS 8 -#define I2C_DATA_IN7_DATA_IN7_SHIFT 0 - - -/**************************************************************************** - * I2C :: CNT_REG - ***************************************************************************/ -/* I2C :: CNT_REG :: reserved0 [31:08] */ -#define I2C_CNT_REG_reserved0_MASK 0xffffff00 -#define I2C_CNT_REG_reserved0_ALIGN 0 -#define I2C_CNT_REG_reserved0_BITS 24 -#define I2C_CNT_REG_reserved0_SHIFT 8 - -/* I2C :: CNT_REG :: CNT_REG2 [07:04] */ -#define I2C_CNT_REG_CNT_REG2_MASK 0x000000f0 -#define I2C_CNT_REG_CNT_REG2_ALIGN 0 -#define I2C_CNT_REG_CNT_REG2_BITS 4 -#define I2C_CNT_REG_CNT_REG2_SHIFT 4 - -/* I2C :: CNT_REG :: CNT_REG1 [03:00] */ -#define I2C_CNT_REG_CNT_REG1_MASK 0x0000000f -#define I2C_CNT_REG_CNT_REG1_ALIGN 0 -#define I2C_CNT_REG_CNT_REG1_BITS 4 -#define I2C_CNT_REG_CNT_REG1_SHIFT 0 - - -/**************************************************************************** - * I2C :: CTL_REG - ***************************************************************************/ -/* I2C :: CTL_REG :: reserved0 [31:08] */ -#define I2C_CTL_REG_reserved0_MASK 0xffffff00 -#define I2C_CTL_REG_reserved0_ALIGN 0 -#define I2C_CTL_REG_reserved0_BITS 24 -#define I2C_CTL_REG_reserved0_SHIFT 8 - -/* I2C :: CTL_REG :: DIV_CLK [07:07] */ -#define I2C_CTL_REG_DIV_CLK_MASK 0x00000080 -#define I2C_CTL_REG_DIV_CLK_ALIGN 0 -#define I2C_CTL_REG_DIV_CLK_BITS 1 -#define I2C_CTL_REG_DIV_CLK_SHIFT 7 - -/* I2C :: CTL_REG :: INT_EN [06:06] */ -#define I2C_CTL_REG_INT_EN_MASK 0x00000040 -#define I2C_CTL_REG_INT_EN_ALIGN 0 -#define I2C_CTL_REG_INT_EN_BITS 1 -#define I2C_CTL_REG_INT_EN_SHIFT 6 - -/* I2C :: CTL_REG :: SCL_SEL [05:04] */ -#define I2C_CTL_REG_SCL_SEL_MASK 0x00000030 -#define I2C_CTL_REG_SCL_SEL_ALIGN 0 -#define I2C_CTL_REG_SCL_SEL_BITS 2 -#define I2C_CTL_REG_SCL_SEL_SHIFT 4 - -/* I2C :: CTL_REG :: DELAY_DIS [03:03] */ -#define I2C_CTL_REG_DELAY_DIS_MASK 0x00000008 -#define I2C_CTL_REG_DELAY_DIS_ALIGN 0 -#define I2C_CTL_REG_DELAY_DIS_BITS 1 -#define I2C_CTL_REG_DELAY_DIS_SHIFT 3 - -/* I2C :: CTL_REG :: DEGLITCH_DIS [02:02] */ -#define I2C_CTL_REG_DEGLITCH_DIS_MASK 0x00000004 -#define I2C_CTL_REG_DEGLITCH_DIS_ALIGN 0 -#define I2C_CTL_REG_DEGLITCH_DIS_BITS 1 -#define I2C_CTL_REG_DEGLITCH_DIS_SHIFT 2 - -/* I2C :: CTL_REG :: DTF [01:00] */ -#define I2C_CTL_REG_DTF_MASK 0x00000003 -#define I2C_CTL_REG_DTF_ALIGN 0 -#define I2C_CTL_REG_DTF_BITS 2 -#define I2C_CTL_REG_DTF_SHIFT 0 - - -/**************************************************************************** - * I2C :: IIC_ENABLE - ***************************************************************************/ -/* I2C :: IIC_ENABLE :: reserved0 [31:07] */ -#define I2C_IIC_ENABLE_reserved0_MASK 0xffffff80 -#define I2C_IIC_ENABLE_reserved0_ALIGN 0 -#define I2C_IIC_ENABLE_reserved0_BITS 25 -#define I2C_IIC_ENABLE_reserved0_SHIFT 7 - -/* I2C :: IIC_ENABLE :: RESTART [06:06] */ -#define I2C_IIC_ENABLE_RESTART_MASK 0x00000040 -#define I2C_IIC_ENABLE_RESTART_ALIGN 0 -#define I2C_IIC_ENABLE_RESTART_BITS 1 -#define I2C_IIC_ENABLE_RESTART_SHIFT 6 - -/* I2C :: IIC_ENABLE :: NO_START [05:05] */ -#define I2C_IIC_ENABLE_NO_START_MASK 0x00000020 -#define I2C_IIC_ENABLE_NO_START_ALIGN 0 -#define I2C_IIC_ENABLE_NO_START_BITS 1 -#define I2C_IIC_ENABLE_NO_START_SHIFT 5 - -/* I2C :: IIC_ENABLE :: NO_STOP [04:04] */ -#define I2C_IIC_ENABLE_NO_STOP_MASK 0x00000010 -#define I2C_IIC_ENABLE_NO_STOP_ALIGN 0 -#define I2C_IIC_ENABLE_NO_STOP_BITS 1 -#define I2C_IIC_ENABLE_NO_STOP_SHIFT 4 - -/* I2C :: IIC_ENABLE :: reserved1 [03:03] */ -#define I2C_IIC_ENABLE_reserved1_MASK 0x00000008 -#define I2C_IIC_ENABLE_reserved1_ALIGN 0 -#define I2C_IIC_ENABLE_reserved1_BITS 1 -#define I2C_IIC_ENABLE_reserved1_SHIFT 3 - -/* I2C :: IIC_ENABLE :: NO_ACK [02:02] */ -#define I2C_IIC_ENABLE_NO_ACK_MASK 0x00000004 -#define I2C_IIC_ENABLE_NO_ACK_ALIGN 0 -#define I2C_IIC_ENABLE_NO_ACK_BITS 1 -#define I2C_IIC_ENABLE_NO_ACK_SHIFT 2 - -/* I2C :: IIC_ENABLE :: INTRP [01:01] */ -#define I2C_IIC_ENABLE_INTRP_MASK 0x00000002 -#define I2C_IIC_ENABLE_INTRP_ALIGN 0 -#define I2C_IIC_ENABLE_INTRP_BITS 1 -#define I2C_IIC_ENABLE_INTRP_SHIFT 1 - -/* I2C :: IIC_ENABLE :: ENABLE [00:00] */ -#define I2C_IIC_ENABLE_ENABLE_MASK 0x00000001 -#define I2C_IIC_ENABLE_ENABLE_ALIGN 0 -#define I2C_IIC_ENABLE_ENABLE_BITS 1 -#define I2C_IIC_ENABLE_ENABLE_SHIFT 0 - - -/**************************************************************************** - * I2C :: DATA_OUT0 - ***************************************************************************/ -/* I2C :: DATA_OUT0 :: reserved0 [31:08] */ -#define I2C_DATA_OUT0_reserved0_MASK 0xffffff00 -#define I2C_DATA_OUT0_reserved0_ALIGN 0 -#define I2C_DATA_OUT0_reserved0_BITS 24 -#define I2C_DATA_OUT0_reserved0_SHIFT 8 - -/* I2C :: DATA_OUT0 :: DATA_OUT0 [07:00] */ -#define I2C_DATA_OUT0_DATA_OUT0_MASK 0x000000ff -#define I2C_DATA_OUT0_DATA_OUT0_ALIGN 0 -#define I2C_DATA_OUT0_DATA_OUT0_BITS 8 -#define I2C_DATA_OUT0_DATA_OUT0_SHIFT 0 - - -/**************************************************************************** - * I2C :: DATA_OUT1 - ***************************************************************************/ -/* I2C :: DATA_OUT1 :: reserved0 [31:08] */ -#define I2C_DATA_OUT1_reserved0_MASK 0xffffff00 -#define I2C_DATA_OUT1_reserved0_ALIGN 0 -#define I2C_DATA_OUT1_reserved0_BITS 24 -#define I2C_DATA_OUT1_reserved0_SHIFT 8 - -/* I2C :: DATA_OUT1 :: DATA_OUT1 [07:00] */ -#define I2C_DATA_OUT1_DATA_OUT1_MASK 0x000000ff -#define I2C_DATA_OUT1_DATA_OUT1_ALIGN 0 -#define I2C_DATA_OUT1_DATA_OUT1_BITS 8 -#define I2C_DATA_OUT1_DATA_OUT1_SHIFT 0 - - -/**************************************************************************** - * I2C :: DATA_OUT2 - ***************************************************************************/ -/* I2C :: DATA_OUT2 :: reserved0 [31:08] */ -#define I2C_DATA_OUT2_reserved0_MASK 0xffffff00 -#define I2C_DATA_OUT2_reserved0_ALIGN 0 -#define I2C_DATA_OUT2_reserved0_BITS 24 -#define I2C_DATA_OUT2_reserved0_SHIFT 8 - -/* I2C :: DATA_OUT2 :: DATA_OUT2 [07:00] */ -#define I2C_DATA_OUT2_DATA_OUT2_MASK 0x000000ff -#define I2C_DATA_OUT2_DATA_OUT2_ALIGN 0 -#define I2C_DATA_OUT2_DATA_OUT2_BITS 8 -#define I2C_DATA_OUT2_DATA_OUT2_SHIFT 0 - - -/**************************************************************************** - * I2C :: DATA_OUT3 - ***************************************************************************/ -/* I2C :: DATA_OUT3 :: reserved0 [31:08] */ -#define I2C_DATA_OUT3_reserved0_MASK 0xffffff00 -#define I2C_DATA_OUT3_reserved0_ALIGN 0 -#define I2C_DATA_OUT3_reserved0_BITS 24 -#define I2C_DATA_OUT3_reserved0_SHIFT 8 - -/* I2C :: DATA_OUT3 :: DATA_OUT3 [07:00] */ -#define I2C_DATA_OUT3_DATA_OUT3_MASK 0x000000ff -#define I2C_DATA_OUT3_DATA_OUT3_ALIGN 0 -#define I2C_DATA_OUT3_DATA_OUT3_BITS 8 -#define I2C_DATA_OUT3_DATA_OUT3_SHIFT 0 - - -/**************************************************************************** - * I2C :: DATA_OUT4 - ***************************************************************************/ -/* I2C :: DATA_OUT4 :: reserved0 [31:08] */ -#define I2C_DATA_OUT4_reserved0_MASK 0xffffff00 -#define I2C_DATA_OUT4_reserved0_ALIGN 0 -#define I2C_DATA_OUT4_reserved0_BITS 24 -#define I2C_DATA_OUT4_reserved0_SHIFT 8 - -/* I2C :: DATA_OUT4 :: DATA_OUT4 [07:00] */ -#define I2C_DATA_OUT4_DATA_OUT4_MASK 0x000000ff -#define I2C_DATA_OUT4_DATA_OUT4_ALIGN 0 -#define I2C_DATA_OUT4_DATA_OUT4_BITS 8 -#define I2C_DATA_OUT4_DATA_OUT4_SHIFT 0 - - -/**************************************************************************** - * I2C :: DATA_OUT5 - ***************************************************************************/ -/* I2C :: DATA_OUT5 :: reserved0 [31:08] */ -#define I2C_DATA_OUT5_reserved0_MASK 0xffffff00 -#define I2C_DATA_OUT5_reserved0_ALIGN 0 -#define I2C_DATA_OUT5_reserved0_BITS 24 -#define I2C_DATA_OUT5_reserved0_SHIFT 8 - -/* I2C :: DATA_OUT5 :: DATA_OUT5 [07:00] */ -#define I2C_DATA_OUT5_DATA_OUT5_MASK 0x000000ff -#define I2C_DATA_OUT5_DATA_OUT5_ALIGN 0 -#define I2C_DATA_OUT5_DATA_OUT5_BITS 8 -#define I2C_DATA_OUT5_DATA_OUT5_SHIFT 0 - - -/**************************************************************************** - * I2C :: DATA_OUT6 - ***************************************************************************/ -/* I2C :: DATA_OUT6 :: reserved0 [31:08] */ -#define I2C_DATA_OUT6_reserved0_MASK 0xffffff00 -#define I2C_DATA_OUT6_reserved0_ALIGN 0 -#define I2C_DATA_OUT6_reserved0_BITS 24 -#define I2C_DATA_OUT6_reserved0_SHIFT 8 - -/* I2C :: DATA_OUT6 :: DATA_OUT6 [07:00] */ -#define I2C_DATA_OUT6_DATA_OUT6_MASK 0x000000ff -#define I2C_DATA_OUT6_DATA_OUT6_ALIGN 0 -#define I2C_DATA_OUT6_DATA_OUT6_BITS 8 -#define I2C_DATA_OUT6_DATA_OUT6_SHIFT 0 - - -/**************************************************************************** - * I2C :: DATA_OUT7 - ***************************************************************************/ -/* I2C :: DATA_OUT7 :: reserved0 [31:08] */ -#define I2C_DATA_OUT7_reserved0_MASK 0xffffff00 -#define I2C_DATA_OUT7_reserved0_ALIGN 0 -#define I2C_DATA_OUT7_reserved0_BITS 24 -#define I2C_DATA_OUT7_reserved0_SHIFT 8 - -/* I2C :: DATA_OUT7 :: DATA_OUT7 [07:00] */ -#define I2C_DATA_OUT7_DATA_OUT7_MASK 0x000000ff -#define I2C_DATA_OUT7_DATA_OUT7_ALIGN 0 -#define I2C_DATA_OUT7_DATA_OUT7_BITS 8 -#define I2C_DATA_OUT7_DATA_OUT7_SHIFT 0 - - -/**************************************************************************** - * I2C :: CTLHI_REG - ***************************************************************************/ -/* I2C :: CTLHI_REG :: reserved0 [31:02] */ -#define I2C_CTLHI_REG_reserved0_MASK 0xfffffffc -#define I2C_CTLHI_REG_reserved0_ALIGN 0 -#define I2C_CTLHI_REG_reserved0_BITS 30 -#define I2C_CTLHI_REG_reserved0_SHIFT 2 - -/* I2C :: CTLHI_REG :: IGNORE_ACK [01:01] */ -#define I2C_CTLHI_REG_IGNORE_ACK_MASK 0x00000002 -#define I2C_CTLHI_REG_IGNORE_ACK_ALIGN 0 -#define I2C_CTLHI_REG_IGNORE_ACK_BITS 1 -#define I2C_CTLHI_REG_IGNORE_ACK_SHIFT 1 - -/* I2C :: CTLHI_REG :: WAIT_DIS [00:00] */ -#define I2C_CTLHI_REG_WAIT_DIS_MASK 0x00000001 -#define I2C_CTLHI_REG_WAIT_DIS_ALIGN 0 -#define I2C_CTLHI_REG_WAIT_DIS_BITS 1 -#define I2C_CTLHI_REG_WAIT_DIS_SHIFT 0 - - -/**************************************************************************** - * I2C :: SCL_PARAM - ***************************************************************************/ -/* I2C :: SCL_PARAM :: reserved0 [31:00] */ -#define I2C_SCL_PARAM_reserved0_MASK 0xffffffff -#define I2C_SCL_PARAM_reserved0_ALIGN 0 -#define I2C_SCL_PARAM_reserved0_BITS 32 -#define I2C_SCL_PARAM_reserved0_SHIFT 0 - - -/**************************************************************************** - * BCM70012_I2C_TOP_I2C_GR_BRIDGE - ***************************************************************************/ -/**************************************************************************** - * I2C_GR_BRIDGE :: REVISION - ***************************************************************************/ -/* I2C_GR_BRIDGE :: REVISION :: reserved0 [31:16] */ -#define I2C_GR_BRIDGE_REVISION_reserved0_MASK 0xffff0000 -#define I2C_GR_BRIDGE_REVISION_reserved0_ALIGN 0 -#define I2C_GR_BRIDGE_REVISION_reserved0_BITS 16 -#define I2C_GR_BRIDGE_REVISION_reserved0_SHIFT 16 - -/* I2C_GR_BRIDGE :: REVISION :: MAJOR [15:08] */ -#define I2C_GR_BRIDGE_REVISION_MAJOR_MASK 0x0000ff00 -#define I2C_GR_BRIDGE_REVISION_MAJOR_ALIGN 0 -#define I2C_GR_BRIDGE_REVISION_MAJOR_BITS 8 -#define I2C_GR_BRIDGE_REVISION_MAJOR_SHIFT 8 - -/* I2C_GR_BRIDGE :: REVISION :: MINOR [07:00] */ -#define I2C_GR_BRIDGE_REVISION_MINOR_MASK 0x000000ff -#define I2C_GR_BRIDGE_REVISION_MINOR_ALIGN 0 -#define I2C_GR_BRIDGE_REVISION_MINOR_BITS 8 -#define I2C_GR_BRIDGE_REVISION_MINOR_SHIFT 0 - - -/**************************************************************************** - * I2C_GR_BRIDGE :: CTRL - ***************************************************************************/ -/* I2C_GR_BRIDGE :: CTRL :: reserved0 [31:01] */ -#define I2C_GR_BRIDGE_CTRL_reserved0_MASK 0xfffffffe -#define I2C_GR_BRIDGE_CTRL_reserved0_ALIGN 0 -#define I2C_GR_BRIDGE_CTRL_reserved0_BITS 31 -#define I2C_GR_BRIDGE_CTRL_reserved0_SHIFT 1 - -/* I2C_GR_BRIDGE :: CTRL :: gisb_error_intr [00:00] */ -#define I2C_GR_BRIDGE_CTRL_gisb_error_intr_MASK 0x00000001 -#define I2C_GR_BRIDGE_CTRL_gisb_error_intr_ALIGN 0 -#define I2C_GR_BRIDGE_CTRL_gisb_error_intr_BITS 1 -#define I2C_GR_BRIDGE_CTRL_gisb_error_intr_SHIFT 0 -#define I2C_GR_BRIDGE_CTRL_gisb_error_intr_INTR_DISABLE 0 -#define I2C_GR_BRIDGE_CTRL_gisb_error_intr_INTR_ENABLE 1 - - -/**************************************************************************** - * I2C_GR_BRIDGE :: SPARE_SW_RESET_0 - ***************************************************************************/ -/* I2C_GR_BRIDGE :: SPARE_SW_RESET_0 :: reserved0 [31:01] */ -#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_MASK 0xfffffffe -#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_ALIGN 0 -#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_BITS 31 -#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_SHIFT 1 - -/* I2C_GR_BRIDGE :: SPARE_SW_RESET_0 :: SPARE_SW_RESET [00:00] */ -#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_MASK 0x00000001 -#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ALIGN 0 -#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_BITS 1 -#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_SHIFT 0 -#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_DEASSERT 0 -#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ASSERT 1 - - -/**************************************************************************** - * I2C_GR_BRIDGE :: SPARE_SW_RESET_1 - ***************************************************************************/ -/* I2C_GR_BRIDGE :: SPARE_SW_RESET_1 :: reserved0 [31:01] */ -#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_MASK 0xfffffffe -#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_ALIGN 0 -#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_BITS 31 -#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_SHIFT 1 - -/* I2C_GR_BRIDGE :: SPARE_SW_RESET_1 :: SPARE_SW_RESET [00:00] */ -#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_MASK 0x00000001 -#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ALIGN 0 -#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_BITS 1 -#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_SHIFT 0 -#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_DEASSERT 0 -#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ASSERT 1 - - -/**************************************************************************** - * BCM70012_MISC_TOP_MISC1 - ***************************************************************************/ -/**************************************************************************** - * MISC1 :: TX_FIRST_DESC_L_ADDR_LIST0 - ***************************************************************************/ -/* MISC1 :: TX_FIRST_DESC_L_ADDR_LIST0 :: DESC_ADDR [31:05] */ -#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_MASK 0xffffffe0 -#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_ALIGN 0 -#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_BITS 27 -#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_SHIFT 5 - -/* MISC1 :: TX_FIRST_DESC_L_ADDR_LIST0 :: reserved0 [04:01] */ -#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_reserved0_MASK 0x0000001e -#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_reserved0_ALIGN 0 -#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_reserved0_BITS 4 -#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_reserved0_SHIFT 1 - -/* MISC1 :: TX_FIRST_DESC_L_ADDR_LIST0 :: TX_DESC_LIST0_VALID [00:00] */ -#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_TX_DESC_LIST0_VALID_MASK 0x00000001 -#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_TX_DESC_LIST0_VALID_ALIGN 0 -#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_TX_DESC_LIST0_VALID_BITS 1 -#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_TX_DESC_LIST0_VALID_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: TX_FIRST_DESC_U_ADDR_LIST0 - ***************************************************************************/ -/* MISC1 :: TX_FIRST_DESC_U_ADDR_LIST0 :: DESC_ADDR [31:00] */ -#define MISC1_TX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_MASK 0xffffffff -#define MISC1_TX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_ALIGN 0 -#define MISC1_TX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_BITS 32 -#define MISC1_TX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: TX_FIRST_DESC_L_ADDR_LIST1 - ***************************************************************************/ -/* MISC1 :: TX_FIRST_DESC_L_ADDR_LIST1 :: DESC_ADDR [31:05] */ -#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_MASK 0xffffffe0 -#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_ALIGN 0 -#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_BITS 27 -#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_SHIFT 5 - -/* MISC1 :: TX_FIRST_DESC_L_ADDR_LIST1 :: reserved0 [04:01] */ -#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_reserved0_MASK 0x0000001e -#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_reserved0_ALIGN 0 -#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_reserved0_BITS 4 -#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_reserved0_SHIFT 1 - -/* MISC1 :: TX_FIRST_DESC_L_ADDR_LIST1 :: TX_DESC_LIST1_VALID [00:00] */ -#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_TX_DESC_LIST1_VALID_MASK 0x00000001 -#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_TX_DESC_LIST1_VALID_ALIGN 0 -#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_TX_DESC_LIST1_VALID_BITS 1 -#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_TX_DESC_LIST1_VALID_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: TX_FIRST_DESC_U_ADDR_LIST1 - ***************************************************************************/ -/* MISC1 :: TX_FIRST_DESC_U_ADDR_LIST1 :: DESC_ADDR [31:00] */ -#define MISC1_TX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_MASK 0xffffffff -#define MISC1_TX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_ALIGN 0 -#define MISC1_TX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_BITS 32 -#define MISC1_TX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_SHIFT 0 - - /**************************************************************************** * MISC1 :: TX_SW_DESC_LIST_CTRL_STS ***************************************************************************/ @@ -7366,200 +585,6 @@ #define MISC1_TX_DMA_ERROR_STATUS_reserved4_SHIFT 0 -/**************************************************************************** - * MISC1 :: TX_DMA_LIST0_CUR_DESC_L_ADDR - ***************************************************************************/ -/* MISC1 :: TX_DMA_LIST0_CUR_DESC_L_ADDR :: TX_DMA_L0_CUR_DESC_L_ADDR [31:05] */ -#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR_TX_DMA_L0_CUR_DESC_L_ADDR_MASK 0xffffffe0 -#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR_TX_DMA_L0_CUR_DESC_L_ADDR_ALIGN 0 -#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR_TX_DMA_L0_CUR_DESC_L_ADDR_BITS 27 -#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR_TX_DMA_L0_CUR_DESC_L_ADDR_SHIFT 5 - -/* MISC1 :: TX_DMA_LIST0_CUR_DESC_L_ADDR :: reserved0 [04:00] */ -#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR_reserved0_MASK 0x0000001f -#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR_reserved0_ALIGN 0 -#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR_reserved0_BITS 5 -#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR_reserved0_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: TX_DMA_LIST0_CUR_DESC_U_ADDR - ***************************************************************************/ -/* MISC1 :: TX_DMA_LIST0_CUR_DESC_U_ADDR :: TX_DMA_L0_CUR_DESC_U_ADDR [31:00] */ -#define MISC1_TX_DMA_LIST0_CUR_DESC_U_ADDR_TX_DMA_L0_CUR_DESC_U_ADDR_MASK 0xffffffff -#define MISC1_TX_DMA_LIST0_CUR_DESC_U_ADDR_TX_DMA_L0_CUR_DESC_U_ADDR_ALIGN 0 -#define MISC1_TX_DMA_LIST0_CUR_DESC_U_ADDR_TX_DMA_L0_CUR_DESC_U_ADDR_BITS 32 -#define MISC1_TX_DMA_LIST0_CUR_DESC_U_ADDR_TX_DMA_L0_CUR_DESC_U_ADDR_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: TX_DMA_LIST0_CUR_BYTE_CNT_REM - ***************************************************************************/ -/* MISC1 :: TX_DMA_LIST0_CUR_BYTE_CNT_REM :: reserved0 [31:24] */ -#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_reserved0_MASK 0xff000000 -#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_reserved0_ALIGN 0 -#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_reserved0_BITS 8 -#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_reserved0_SHIFT 24 - -/* MISC1 :: TX_DMA_LIST0_CUR_BYTE_CNT_REM :: TX_DMA_L0_CUR_BYTE_CNT_REM [23:02] */ -#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_TX_DMA_L0_CUR_BYTE_CNT_REM_MASK 0x00fffffc -#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_TX_DMA_L0_CUR_BYTE_CNT_REM_ALIGN 0 -#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_TX_DMA_L0_CUR_BYTE_CNT_REM_BITS 22 -#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_TX_DMA_L0_CUR_BYTE_CNT_REM_SHIFT 2 - -/* MISC1 :: TX_DMA_LIST0_CUR_BYTE_CNT_REM :: reserved1 [01:00] */ -#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_reserved1_MASK 0x00000003 -#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_reserved1_ALIGN 0 -#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_reserved1_BITS 2 -#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_reserved1_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: TX_DMA_LIST1_CUR_DESC_L_ADDR - ***************************************************************************/ -/* MISC1 :: TX_DMA_LIST1_CUR_DESC_L_ADDR :: TX_DMA_L1_CUR_DESC_L_ADDR [31:05] */ -#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR_TX_DMA_L1_CUR_DESC_L_ADDR_MASK 0xffffffe0 -#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR_TX_DMA_L1_CUR_DESC_L_ADDR_ALIGN 0 -#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR_TX_DMA_L1_CUR_DESC_L_ADDR_BITS 27 -#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR_TX_DMA_L1_CUR_DESC_L_ADDR_SHIFT 5 - -/* MISC1 :: TX_DMA_LIST1_CUR_DESC_L_ADDR :: reserved0 [04:00] */ -#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR_reserved0_MASK 0x0000001f -#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR_reserved0_ALIGN 0 -#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR_reserved0_BITS 5 -#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR_reserved0_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: TX_DMA_LIST1_CUR_DESC_U_ADDR - ***************************************************************************/ -/* MISC1 :: TX_DMA_LIST1_CUR_DESC_U_ADDR :: TX_DMA_L1_CUR_DESC_U_ADDR [31:00] */ -#define MISC1_TX_DMA_LIST1_CUR_DESC_U_ADDR_TX_DMA_L1_CUR_DESC_U_ADDR_MASK 0xffffffff -#define MISC1_TX_DMA_LIST1_CUR_DESC_U_ADDR_TX_DMA_L1_CUR_DESC_U_ADDR_ALIGN 0 -#define MISC1_TX_DMA_LIST1_CUR_DESC_U_ADDR_TX_DMA_L1_CUR_DESC_U_ADDR_BITS 32 -#define MISC1_TX_DMA_LIST1_CUR_DESC_U_ADDR_TX_DMA_L1_CUR_DESC_U_ADDR_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: TX_DMA_LIST1_CUR_BYTE_CNT_REM - ***************************************************************************/ -/* MISC1 :: TX_DMA_LIST1_CUR_BYTE_CNT_REM :: reserved0 [31:24] */ -#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_reserved0_MASK 0xff000000 -#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_reserved0_ALIGN 0 -#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_reserved0_BITS 8 -#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_reserved0_SHIFT 24 - -/* MISC1 :: TX_DMA_LIST1_CUR_BYTE_CNT_REM :: TX_DMA_L1_CUR_BYTE_CNT_REM [23:02] */ -#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_TX_DMA_L1_CUR_BYTE_CNT_REM_MASK 0x00fffffc -#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_TX_DMA_L1_CUR_BYTE_CNT_REM_ALIGN 0 -#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_TX_DMA_L1_CUR_BYTE_CNT_REM_BITS 22 -#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_TX_DMA_L1_CUR_BYTE_CNT_REM_SHIFT 2 - -/* MISC1 :: TX_DMA_LIST1_CUR_BYTE_CNT_REM :: reserved1 [01:00] */ -#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_reserved1_MASK 0x00000003 -#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_reserved1_ALIGN 0 -#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_reserved1_BITS 2 -#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_reserved1_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: Y_RX_FIRST_DESC_L_ADDR_LIST0 - ***************************************************************************/ -/* MISC1 :: Y_RX_FIRST_DESC_L_ADDR_LIST0 :: DESC_ADDR [31:05] */ -#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_MASK 0xffffffe0 -#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_ALIGN 0 -#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_BITS 27 -#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_SHIFT 5 - -/* MISC1 :: Y_RX_FIRST_DESC_L_ADDR_LIST0 :: reserved0 [04:01] */ -#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_reserved0_MASK 0x0000001e -#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_reserved0_ALIGN 0 -#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_reserved0_BITS 4 -#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_reserved0_SHIFT 1 - -/* MISC1 :: Y_RX_FIRST_DESC_L_ADDR_LIST0 :: RX_DESC_LIST0_VALID [00:00] */ -#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_RX_DESC_LIST0_VALID_MASK 0x00000001 -#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_RX_DESC_LIST0_VALID_ALIGN 0 -#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_RX_DESC_LIST0_VALID_BITS 1 -#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_RX_DESC_LIST0_VALID_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: Y_RX_FIRST_DESC_U_ADDR_LIST0 - ***************************************************************************/ -/* MISC1 :: Y_RX_FIRST_DESC_U_ADDR_LIST0 :: DESC_ADDR [31:00] */ -#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_MASK 0xffffffff -#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_ALIGN 0 -#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_BITS 32 -#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: Y_RX_FIRST_DESC_L_ADDR_LIST1 - ***************************************************************************/ -/* MISC1 :: Y_RX_FIRST_DESC_L_ADDR_LIST1 :: DESC_ADDR [31:05] */ -#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_MASK 0xffffffe0 -#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_ALIGN 0 -#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_BITS 27 -#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_SHIFT 5 - -/* MISC1 :: Y_RX_FIRST_DESC_L_ADDR_LIST1 :: reserved0 [04:01] */ -#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_reserved0_MASK 0x0000001e -#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_reserved0_ALIGN 0 -#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_reserved0_BITS 4 -#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_reserved0_SHIFT 1 - -/* MISC1 :: Y_RX_FIRST_DESC_L_ADDR_LIST1 :: RX_DESC_LIST1_VALID [00:00] */ -#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_RX_DESC_LIST1_VALID_MASK 0x00000001 -#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_RX_DESC_LIST1_VALID_ALIGN 0 -#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_RX_DESC_LIST1_VALID_BITS 1 -#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_RX_DESC_LIST1_VALID_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: Y_RX_FIRST_DESC_U_ADDR_LIST1 - ***************************************************************************/ -/* MISC1 :: Y_RX_FIRST_DESC_U_ADDR_LIST1 :: DESC_ADDR [31:00] */ -#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_MASK 0xffffffff -#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_ALIGN 0 -#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_BITS 32 -#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: Y_RX_SW_DESC_LIST_CTRL_STS - ***************************************************************************/ -/* MISC1 :: Y_RX_SW_DESC_LIST_CTRL_STS :: reserved0 [31:04] */ -#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_reserved0_MASK 0xfffffff0 -#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_reserved0_ALIGN 0 -#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_reserved0_BITS 28 -#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_reserved0_SHIFT 4 - -/* MISC1 :: Y_RX_SW_DESC_LIST_CTRL_STS :: DMA_DATA_SERV_PTR [03:03] */ -#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_MASK 0x00000008 -#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_ALIGN 0 -#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_BITS 1 -#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_SHIFT 3 - -/* MISC1 :: Y_RX_SW_DESC_LIST_CTRL_STS :: DESC_SERV_PTR [02:02] */ -#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_MASK 0x00000004 -#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_ALIGN 0 -#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_BITS 1 -#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_SHIFT 2 - -/* MISC1 :: Y_RX_SW_DESC_LIST_CTRL_STS :: RX_HALT_ON_ERROR [01:01] */ -#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_RX_HALT_ON_ERROR_MASK 0x00000002 -#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_RX_HALT_ON_ERROR_ALIGN 0 -#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_RX_HALT_ON_ERROR_BITS 1 -#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_RX_HALT_ON_ERROR_SHIFT 1 - -/* MISC1 :: Y_RX_SW_DESC_LIST_CTRL_STS :: RX_RUN_STOP [00:00] */ -#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_RX_RUN_STOP_MASK 0x00000001 -#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_RX_RUN_STOP_ALIGN 0 -#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_RX_RUN_STOP_BITS 1 -#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_RX_RUN_STOP_SHIFT 0 - - /**************************************************************************** * MISC1 :: Y_RX_ERROR_STATUS ***************************************************************************/ @@ -7642,176 +667,6 @@ #define MISC1_Y_RX_ERROR_STATUS_reserved4_SHIFT 0 -/**************************************************************************** - * MISC1 :: Y_RX_LIST0_CUR_DESC_L_ADDR - ***************************************************************************/ -/* MISC1 :: Y_RX_LIST0_CUR_DESC_L_ADDR :: RX_L0_CUR_DESC_L_ADDR [31:05] */ -#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR_RX_L0_CUR_DESC_L_ADDR_MASK 0xffffffe0 -#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR_RX_L0_CUR_DESC_L_ADDR_ALIGN 0 -#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR_RX_L0_CUR_DESC_L_ADDR_BITS 27 -#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR_RX_L0_CUR_DESC_L_ADDR_SHIFT 5 - -/* MISC1 :: Y_RX_LIST0_CUR_DESC_L_ADDR :: reserved0 [04:00] */ -#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR_reserved0_MASK 0x0000001f -#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR_reserved0_ALIGN 0 -#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR_reserved0_BITS 5 -#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR_reserved0_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: Y_RX_LIST0_CUR_DESC_U_ADDR - ***************************************************************************/ -/* MISC1 :: Y_RX_LIST0_CUR_DESC_U_ADDR :: RX_L0_CUR_DESC_U_ADDR [31:00] */ -#define MISC1_Y_RX_LIST0_CUR_DESC_U_ADDR_RX_L0_CUR_DESC_U_ADDR_MASK 0xffffffff -#define MISC1_Y_RX_LIST0_CUR_DESC_U_ADDR_RX_L0_CUR_DESC_U_ADDR_ALIGN 0 -#define MISC1_Y_RX_LIST0_CUR_DESC_U_ADDR_RX_L0_CUR_DESC_U_ADDR_BITS 32 -#define MISC1_Y_RX_LIST0_CUR_DESC_U_ADDR_RX_L0_CUR_DESC_U_ADDR_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: Y_RX_LIST0_CUR_BYTE_CNT - ***************************************************************************/ -/* MISC1 :: Y_RX_LIST0_CUR_BYTE_CNT :: RX_L0_CUR_BYTE_CNT [31:00] */ -#define MISC1_Y_RX_LIST0_CUR_BYTE_CNT_RX_L0_CUR_BYTE_CNT_MASK 0xffffffff -#define MISC1_Y_RX_LIST0_CUR_BYTE_CNT_RX_L0_CUR_BYTE_CNT_ALIGN 0 -#define MISC1_Y_RX_LIST0_CUR_BYTE_CNT_RX_L0_CUR_BYTE_CNT_BITS 32 -#define MISC1_Y_RX_LIST0_CUR_BYTE_CNT_RX_L0_CUR_BYTE_CNT_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: Y_RX_LIST1_CUR_DESC_L_ADDR - ***************************************************************************/ -/* MISC1 :: Y_RX_LIST1_CUR_DESC_L_ADDR :: RX_L1_CUR_DESC_L_ADDR [31:05] */ -#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR_RX_L1_CUR_DESC_L_ADDR_MASK 0xffffffe0 -#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR_RX_L1_CUR_DESC_L_ADDR_ALIGN 0 -#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR_RX_L1_CUR_DESC_L_ADDR_BITS 27 -#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR_RX_L1_CUR_DESC_L_ADDR_SHIFT 5 - -/* MISC1 :: Y_RX_LIST1_CUR_DESC_L_ADDR :: reserved0 [04:00] */ -#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR_reserved0_MASK 0x0000001f -#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR_reserved0_ALIGN 0 -#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR_reserved0_BITS 5 -#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR_reserved0_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: Y_RX_LIST1_CUR_DESC_U_ADDR - ***************************************************************************/ -/* MISC1 :: Y_RX_LIST1_CUR_DESC_U_ADDR :: RX_L1_CUR_DESC_U_ADDR [31:00] */ -#define MISC1_Y_RX_LIST1_CUR_DESC_U_ADDR_RX_L1_CUR_DESC_U_ADDR_MASK 0xffffffff -#define MISC1_Y_RX_LIST1_CUR_DESC_U_ADDR_RX_L1_CUR_DESC_U_ADDR_ALIGN 0 -#define MISC1_Y_RX_LIST1_CUR_DESC_U_ADDR_RX_L1_CUR_DESC_U_ADDR_BITS 32 -#define MISC1_Y_RX_LIST1_CUR_DESC_U_ADDR_RX_L1_CUR_DESC_U_ADDR_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: Y_RX_LIST1_CUR_BYTE_CNT - ***************************************************************************/ -/* MISC1 :: Y_RX_LIST1_CUR_BYTE_CNT :: RX_L1_CUR_BYTE_CNT [31:00] */ -#define MISC1_Y_RX_LIST1_CUR_BYTE_CNT_RX_L1_CUR_BYTE_CNT_MASK 0xffffffff -#define MISC1_Y_RX_LIST1_CUR_BYTE_CNT_RX_L1_CUR_BYTE_CNT_ALIGN 0 -#define MISC1_Y_RX_LIST1_CUR_BYTE_CNT_RX_L1_CUR_BYTE_CNT_BITS 32 -#define MISC1_Y_RX_LIST1_CUR_BYTE_CNT_RX_L1_CUR_BYTE_CNT_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: UV_RX_FIRST_DESC_L_ADDR_LIST0 - ***************************************************************************/ -/* MISC1 :: UV_RX_FIRST_DESC_L_ADDR_LIST0 :: DESC_ADDR [31:05] */ -#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_MASK 0xffffffe0 -#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_ALIGN 0 -#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_BITS 27 -#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_SHIFT 5 - -/* MISC1 :: UV_RX_FIRST_DESC_L_ADDR_LIST0 :: reserved0 [04:01] */ -#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_reserved0_MASK 0x0000001e -#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_reserved0_ALIGN 0 -#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_reserved0_BITS 4 -#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_reserved0_SHIFT 1 - -/* MISC1 :: UV_RX_FIRST_DESC_L_ADDR_LIST0 :: RX_DESC_LIST0_VALID [00:00] */ -#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_RX_DESC_LIST0_VALID_MASK 0x00000001 -#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_RX_DESC_LIST0_VALID_ALIGN 0 -#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_RX_DESC_LIST0_VALID_BITS 1 -#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_RX_DESC_LIST0_VALID_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: UV_RX_FIRST_DESC_U_ADDR_LIST0 - ***************************************************************************/ -/* MISC1 :: UV_RX_FIRST_DESC_U_ADDR_LIST0 :: DESC_ADDR [31:00] */ -#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_MASK 0xffffffff -#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_ALIGN 0 -#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_BITS 32 -#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: UV_RX_FIRST_DESC_L_ADDR_LIST1 - ***************************************************************************/ -/* MISC1 :: UV_RX_FIRST_DESC_L_ADDR_LIST1 :: DESC_ADDR [31:05] */ -#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_MASK 0xffffffe0 -#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_ALIGN 0 -#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_BITS 27 -#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_SHIFT 5 - -/* MISC1 :: UV_RX_FIRST_DESC_L_ADDR_LIST1 :: reserved0 [04:01] */ -#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_reserved0_MASK 0x0000001e -#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_reserved0_ALIGN 0 -#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_reserved0_BITS 4 -#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_reserved0_SHIFT 1 - -/* MISC1 :: UV_RX_FIRST_DESC_L_ADDR_LIST1 :: RX_DESC_LIST1_VALID [00:00] */ -#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_RX_DESC_LIST1_VALID_MASK 0x00000001 -#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_RX_DESC_LIST1_VALID_ALIGN 0 -#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_RX_DESC_LIST1_VALID_BITS 1 -#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_RX_DESC_LIST1_VALID_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: UV_RX_FIRST_DESC_U_ADDR_LIST1 - ***************************************************************************/ -/* MISC1 :: UV_RX_FIRST_DESC_U_ADDR_LIST1 :: DESC_ADDR [31:00] */ -#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_MASK 0xffffffff -#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_ALIGN 0 -#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_BITS 32 -#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: UV_RX_SW_DESC_LIST_CTRL_STS - ***************************************************************************/ -/* MISC1 :: UV_RX_SW_DESC_LIST_CTRL_STS :: reserved0 [31:04] */ -#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_reserved0_MASK 0xfffffff0 -#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_reserved0_ALIGN 0 -#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_reserved0_BITS 28 -#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_reserved0_SHIFT 4 - -/* MISC1 :: UV_RX_SW_DESC_LIST_CTRL_STS :: DMA_DATA_SERV_PTR [03:03] */ -#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_MASK 0x00000008 -#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_ALIGN 0 -#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_BITS 1 -#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_SHIFT 3 - -/* MISC1 :: UV_RX_SW_DESC_LIST_CTRL_STS :: DESC_SERV_PTR [02:02] */ -#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_MASK 0x00000004 -#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_ALIGN 0 -#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_BITS 1 -#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_SHIFT 2 - -/* MISC1 :: UV_RX_SW_DESC_LIST_CTRL_STS :: RX_HALT_ON_ERROR [01:01] */ -#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_RX_HALT_ON_ERROR_MASK 0x00000002 -#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_RX_HALT_ON_ERROR_ALIGN 0 -#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_RX_HALT_ON_ERROR_BITS 1 -#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_RX_HALT_ON_ERROR_SHIFT 1 - -/* MISC1 :: UV_RX_SW_DESC_LIST_CTRL_STS :: RX_RUN_STOP [00:00] */ -#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_RX_RUN_STOP_MASK 0x00000001 -#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_RX_RUN_STOP_ALIGN 0 -#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_RX_RUN_STOP_BITS 1 -#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_RX_RUN_STOP_SHIFT 0 - - /**************************************************************************** * MISC1 :: UV_RX_ERROR_STATUS ***************************************************************************/ @@ -7893,4403 +748,6 @@ #define MISC1_UV_RX_ERROR_STATUS_reserved4_BITS 1 #define MISC1_UV_RX_ERROR_STATUS_reserved4_SHIFT 0 - -/**************************************************************************** - * MISC1 :: UV_RX_LIST0_CUR_DESC_L_ADDR - ***************************************************************************/ -/* MISC1 :: UV_RX_LIST0_CUR_DESC_L_ADDR :: RX_L0_CUR_DESC_L_ADDR [31:05] */ -#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR_RX_L0_CUR_DESC_L_ADDR_MASK 0xffffffe0 -#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR_RX_L0_CUR_DESC_L_ADDR_ALIGN 0 -#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR_RX_L0_CUR_DESC_L_ADDR_BITS 27 -#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR_RX_L0_CUR_DESC_L_ADDR_SHIFT 5 - -/* MISC1 :: UV_RX_LIST0_CUR_DESC_L_ADDR :: reserved0 [04:00] */ -#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR_reserved0_MASK 0x0000001f -#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR_reserved0_ALIGN 0 -#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR_reserved0_BITS 5 -#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR_reserved0_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: UV_RX_LIST0_CUR_DESC_U_ADDR - ***************************************************************************/ -/* MISC1 :: UV_RX_LIST0_CUR_DESC_U_ADDR :: RX_L0_CUR_DESC_U_ADDR [31:00] */ -#define MISC1_UV_RX_LIST0_CUR_DESC_U_ADDR_RX_L0_CUR_DESC_U_ADDR_MASK 0xffffffff -#define MISC1_UV_RX_LIST0_CUR_DESC_U_ADDR_RX_L0_CUR_DESC_U_ADDR_ALIGN 0 -#define MISC1_UV_RX_LIST0_CUR_DESC_U_ADDR_RX_L0_CUR_DESC_U_ADDR_BITS 32 -#define MISC1_UV_RX_LIST0_CUR_DESC_U_ADDR_RX_L0_CUR_DESC_U_ADDR_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: UV_RX_LIST0_CUR_BYTE_CNT - ***************************************************************************/ -/* MISC1 :: UV_RX_LIST0_CUR_BYTE_CNT :: RX_L0_CUR_BYTE_CNT [31:00] */ -#define MISC1_UV_RX_LIST0_CUR_BYTE_CNT_RX_L0_CUR_BYTE_CNT_MASK 0xffffffff -#define MISC1_UV_RX_LIST0_CUR_BYTE_CNT_RX_L0_CUR_BYTE_CNT_ALIGN 0 -#define MISC1_UV_RX_LIST0_CUR_BYTE_CNT_RX_L0_CUR_BYTE_CNT_BITS 32 -#define MISC1_UV_RX_LIST0_CUR_BYTE_CNT_RX_L0_CUR_BYTE_CNT_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: UV_RX_LIST1_CUR_DESC_L_ADDR - ***************************************************************************/ -/* MISC1 :: UV_RX_LIST1_CUR_DESC_L_ADDR :: RX_L1_CUR_DESC_L_ADDR [31:05] */ -#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR_RX_L1_CUR_DESC_L_ADDR_MASK 0xffffffe0 -#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR_RX_L1_CUR_DESC_L_ADDR_ALIGN 0 -#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR_RX_L1_CUR_DESC_L_ADDR_BITS 27 -#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR_RX_L1_CUR_DESC_L_ADDR_SHIFT 5 - -/* MISC1 :: UV_RX_LIST1_CUR_DESC_L_ADDR :: reserved0 [04:00] */ -#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR_reserved0_MASK 0x0000001f -#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR_reserved0_ALIGN 0 -#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR_reserved0_BITS 5 -#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR_reserved0_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: UV_RX_LIST1_CUR_DESC_U_ADDR - ***************************************************************************/ -/* MISC1 :: UV_RX_LIST1_CUR_DESC_U_ADDR :: RX_L1_CUR_DESC_U_ADDR [31:00] */ -#define MISC1_UV_RX_LIST1_CUR_DESC_U_ADDR_RX_L1_CUR_DESC_U_ADDR_MASK 0xffffffff -#define MISC1_UV_RX_LIST1_CUR_DESC_U_ADDR_RX_L1_CUR_DESC_U_ADDR_ALIGN 0 -#define MISC1_UV_RX_LIST1_CUR_DESC_U_ADDR_RX_L1_CUR_DESC_U_ADDR_BITS 32 -#define MISC1_UV_RX_LIST1_CUR_DESC_U_ADDR_RX_L1_CUR_DESC_U_ADDR_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: UV_RX_LIST1_CUR_BYTE_CNT - ***************************************************************************/ -/* MISC1 :: UV_RX_LIST1_CUR_BYTE_CNT :: RX_L1_CUR_BYTE_CNT [31:00] */ -#define MISC1_UV_RX_LIST1_CUR_BYTE_CNT_RX_L1_CUR_BYTE_CNT_MASK 0xffffffff -#define MISC1_UV_RX_LIST1_CUR_BYTE_CNT_RX_L1_CUR_BYTE_CNT_ALIGN 0 -#define MISC1_UV_RX_LIST1_CUR_BYTE_CNT_RX_L1_CUR_BYTE_CNT_BITS 32 -#define MISC1_UV_RX_LIST1_CUR_BYTE_CNT_RX_L1_CUR_BYTE_CNT_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: DMA_DEBUG_OPTIONS_REG - ***************************************************************************/ -/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: DMA_DEBUG_TX_DMA_SOFT_RST [31:31] */ -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_TX_DMA_SOFT_RST_MASK 0x80000000 -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_TX_DMA_SOFT_RST_ALIGN 0 -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_TX_DMA_SOFT_RST_BITS 1 -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_TX_DMA_SOFT_RST_SHIFT 31 - -/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: DMA_DEBUG_RX_DMA_SOFT_RST [30:30] */ -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_RX_DMA_SOFT_RST_MASK 0x40000000 -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_RX_DMA_SOFT_RST_ALIGN 0 -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_RX_DMA_SOFT_RST_BITS 1 -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_RX_DMA_SOFT_RST_SHIFT 30 - -/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: DMA_DEBUG_TX_DMA_RD_Q_SOFT_RST [29:29] */ -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_TX_DMA_RD_Q_SOFT_RST_MASK 0x20000000 -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_TX_DMA_RD_Q_SOFT_RST_ALIGN 0 -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_TX_DMA_RD_Q_SOFT_RST_BITS 1 -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_TX_DMA_RD_Q_SOFT_RST_SHIFT 29 - -/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: DMA_DEBUG_RX_DMA_WR_Q_SOFT_RST [28:28] */ -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_RX_DMA_WR_Q_SOFT_RST_MASK 0x10000000 -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_RX_DMA_WR_Q_SOFT_RST_ALIGN 0 -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_RX_DMA_WR_Q_SOFT_RST_BITS 1 -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_RX_DMA_WR_Q_SOFT_RST_SHIFT 28 - -/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: RSVD_DMA_DEBUG_0 [27:05] */ -#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_0_MASK 0x0fffffe0 -#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_0_ALIGN 0 -#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_0_BITS 23 -#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_0_SHIFT 5 - -/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: DMA_DEBUG_EN_RX_DMA_XFER_CNT [04:04] */ -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_EN_RX_DMA_XFER_CNT_MASK 0x00000010 -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_EN_RX_DMA_XFER_CNT_ALIGN 0 -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_EN_RX_DMA_XFER_CNT_BITS 1 -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_EN_RX_DMA_XFER_CNT_SHIFT 4 - -/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: RSVD_DMA_DEBUG_1 [03:03] */ -#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_1_MASK 0x00000008 -#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_1_ALIGN 0 -#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_1_BITS 1 -#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_1_SHIFT 3 - -/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: DMA_DEBUG_SINGLE_RD_Q [02:02] */ -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_SINGLE_RD_Q_MASK 0x00000004 -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_SINGLE_RD_Q_ALIGN 0 -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_SINGLE_RD_Q_BITS 1 -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_SINGLE_RD_Q_SHIFT 2 - -/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: DMA_DEBUG_SINGLE_WR_Q [01:01] */ -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_SINGLE_WR_Q_MASK 0x00000002 -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_SINGLE_WR_Q_ALIGN 0 -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_SINGLE_WR_Q_BITS 1 -#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_SINGLE_WR_Q_SHIFT 1 - -/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: RSVD_DMA_DEBUG_2 [00:00] */ -#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_2_MASK 0x00000001 -#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_2_ALIGN 0 -#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_2_BITS 1 -#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_2_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: READ_CHANNEL_ERROR_STATUS - ***************************************************************************/ -/* MISC1 :: READ_CHANNEL_ERROR_STATUS :: TX_ERR_STS_CHAN_7 [31:28] */ -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_7_MASK 0xf0000000 -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_7_ALIGN 0 -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_7_BITS 4 -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_7_SHIFT 28 - -/* MISC1 :: READ_CHANNEL_ERROR_STATUS :: TX_ERR_STS_CHAN_6 [27:24] */ -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_6_MASK 0x0f000000 -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_6_ALIGN 0 -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_6_BITS 4 -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_6_SHIFT 24 - -/* MISC1 :: READ_CHANNEL_ERROR_STATUS :: TX_ERR_STS_CHAN_5 [23:20] */ -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_5_MASK 0x00f00000 -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_5_ALIGN 0 -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_5_BITS 4 -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_5_SHIFT 20 - -/* MISC1 :: READ_CHANNEL_ERROR_STATUS :: TX_ERR_STS_CHAN_4 [19:16] */ -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_4_MASK 0x000f0000 -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_4_ALIGN 0 -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_4_BITS 4 -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_4_SHIFT 16 - -/* MISC1 :: READ_CHANNEL_ERROR_STATUS :: TX_ERR_STS_CHAN_3 [15:12] */ -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_3_MASK 0x0000f000 -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_3_ALIGN 0 -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_3_BITS 4 -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_3_SHIFT 12 - -/* MISC1 :: READ_CHANNEL_ERROR_STATUS :: TX_ERR_STS_CHAN_2 [11:08] */ -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_2_MASK 0x00000f00 -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_2_ALIGN 0 -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_2_BITS 4 -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_2_SHIFT 8 - -/* MISC1 :: READ_CHANNEL_ERROR_STATUS :: TX_ERR_STS_CHAN_1 [07:04] */ -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_1_MASK 0x000000f0 -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_1_ALIGN 0 -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_1_BITS 4 -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_1_SHIFT 4 - -/* MISC1 :: READ_CHANNEL_ERROR_STATUS :: TX_ERR_STS_CHAN_0 [03:00] */ -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_0_MASK 0x0000000f -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_0_ALIGN 0 -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_0_BITS 4 -#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_0_SHIFT 0 - - -/**************************************************************************** - * MISC1 :: PCIE_DMA_CTRL - ***************************************************************************/ -/* MISC1 :: PCIE_DMA_CTRL :: reserved0 [31:18] */ -#define MISC1_PCIE_DMA_CTRL_reserved0_MASK 0xfffc0000 -#define MISC1_PCIE_DMA_CTRL_reserved0_ALIGN 0 -#define MISC1_PCIE_DMA_CTRL_reserved0_BITS 14 -#define MISC1_PCIE_DMA_CTRL_reserved0_SHIFT 18 - -/* MISC1 :: PCIE_DMA_CTRL :: DESC_ENDIAN_MODE [17:16] */ -#define MISC1_PCIE_DMA_CTRL_DESC_ENDIAN_MODE_MASK 0x00030000 -#define MISC1_PCIE_DMA_CTRL_DESC_ENDIAN_MODE_ALIGN 0 -#define MISC1_PCIE_DMA_CTRL_DESC_ENDIAN_MODE_BITS 2 -#define MISC1_PCIE_DMA_CTRL_DESC_ENDIAN_MODE_SHIFT 16 - -/* MISC1 :: PCIE_DMA_CTRL :: reserved1 [15:10] */ -#define MISC1_PCIE_DMA_CTRL_reserved1_MASK 0x0000fc00 -#define MISC1_PCIE_DMA_CTRL_reserved1_ALIGN 0 -#define MISC1_PCIE_DMA_CTRL_reserved1_BITS 6 -#define MISC1_PCIE_DMA_CTRL_reserved1_SHIFT 10 - -/* MISC1 :: PCIE_DMA_CTRL :: EN_WEIGHTED_RR [09:09] */ -#define MISC1_PCIE_DMA_CTRL_EN_WEIGHTED_RR_MASK 0x00000200 -#define MISC1_PCIE_DMA_CTRL_EN_WEIGHTED_RR_ALIGN 0 -#define MISC1_PCIE_DMA_CTRL_EN_WEIGHTED_RR_BITS 1 -#define MISC1_PCIE_DMA_CTRL_EN_WEIGHTED_RR_SHIFT 9 - -/* MISC1 :: PCIE_DMA_CTRL :: EN_ROUND_ROBIN [08:08] */ -#define MISC1_PCIE_DMA_CTRL_EN_ROUND_ROBIN_MASK 0x00000100 -#define MISC1_PCIE_DMA_CTRL_EN_ROUND_ROBIN_ALIGN 0 -#define MISC1_PCIE_DMA_CTRL_EN_ROUND_ROBIN_BITS 1 -#define MISC1_PCIE_DMA_CTRL_EN_ROUND_ROBIN_SHIFT 8 - -/* MISC1 :: PCIE_DMA_CTRL :: reserved2 [07:05] */ -#define MISC1_PCIE_DMA_CTRL_reserved2_MASK 0x000000e0 -#define MISC1_PCIE_DMA_CTRL_reserved2_ALIGN 0 -#define MISC1_PCIE_DMA_CTRL_reserved2_BITS 3 -#define MISC1_PCIE_DMA_CTRL_reserved2_SHIFT 5 - -/* MISC1 :: PCIE_DMA_CTRL :: RELAXED_ORDERING [04:04] */ -#define MISC1_PCIE_DMA_CTRL_RELAXED_ORDERING_MASK 0x00000010 -#define MISC1_PCIE_DMA_CTRL_RELAXED_ORDERING_ALIGN 0 -#define MISC1_PCIE_DMA_CTRL_RELAXED_ORDERING_BITS 1 -#define MISC1_PCIE_DMA_CTRL_RELAXED_ORDERING_SHIFT 4 - -/* MISC1 :: PCIE_DMA_CTRL :: NO_SNOOP [03:03] */ -#define MISC1_PCIE_DMA_CTRL_NO_SNOOP_MASK 0x00000008 -#define MISC1_PCIE_DMA_CTRL_NO_SNOOP_ALIGN 0 -#define MISC1_PCIE_DMA_CTRL_NO_SNOOP_BITS 1 -#define MISC1_PCIE_DMA_CTRL_NO_SNOOP_SHIFT 3 - -/* MISC1 :: PCIE_DMA_CTRL :: TRAFFIC_CLASS [02:00] */ -#define MISC1_PCIE_DMA_CTRL_TRAFFIC_CLASS_MASK 0x00000007 -#define MISC1_PCIE_DMA_CTRL_TRAFFIC_CLASS_ALIGN 0 -#define MISC1_PCIE_DMA_CTRL_TRAFFIC_CLASS_BITS 3 -#define MISC1_PCIE_DMA_CTRL_TRAFFIC_CLASS_SHIFT 0 - - -/**************************************************************************** - * BCM70012_MISC_TOP_MISC2 - ***************************************************************************/ -/**************************************************************************** - * MISC2 :: GLOBAL_CTRL - ***************************************************************************/ -/* MISC2 :: GLOBAL_CTRL :: reserved0 [31:21] */ -#define MISC2_GLOBAL_CTRL_reserved0_MASK 0xffe00000 -#define MISC2_GLOBAL_CTRL_reserved0_ALIGN 0 -#define MISC2_GLOBAL_CTRL_reserved0_BITS 11 -#define MISC2_GLOBAL_CTRL_reserved0_SHIFT 21 - -/* MISC2 :: GLOBAL_CTRL :: EN_WRITE_ALL [20:20] */ -#define MISC2_GLOBAL_CTRL_EN_WRITE_ALL_MASK 0x00100000 -#define MISC2_GLOBAL_CTRL_EN_WRITE_ALL_ALIGN 0 -#define MISC2_GLOBAL_CTRL_EN_WRITE_ALL_BITS 1 -#define MISC2_GLOBAL_CTRL_EN_WRITE_ALL_SHIFT 20 - -/* MISC2 :: GLOBAL_CTRL :: reserved1 [19:17] */ -#define MISC2_GLOBAL_CTRL_reserved1_MASK 0x000e0000 -#define MISC2_GLOBAL_CTRL_reserved1_ALIGN 0 -#define MISC2_GLOBAL_CTRL_reserved1_BITS 3 -#define MISC2_GLOBAL_CTRL_reserved1_SHIFT 17 - -/* MISC2 :: GLOBAL_CTRL :: EN_SINGLE_DMA [16:16] */ -#define MISC2_GLOBAL_CTRL_EN_SINGLE_DMA_MASK 0x00010000 -#define MISC2_GLOBAL_CTRL_EN_SINGLE_DMA_ALIGN 0 -#define MISC2_GLOBAL_CTRL_EN_SINGLE_DMA_BITS 1 -#define MISC2_GLOBAL_CTRL_EN_SINGLE_DMA_SHIFT 16 - -/* MISC2 :: GLOBAL_CTRL :: reserved2 [15:11] */ -#define MISC2_GLOBAL_CTRL_reserved2_MASK 0x0000f800 -#define MISC2_GLOBAL_CTRL_reserved2_ALIGN 0 -#define MISC2_GLOBAL_CTRL_reserved2_BITS 5 -#define MISC2_GLOBAL_CTRL_reserved2_SHIFT 11 - -/* MISC2 :: GLOBAL_CTRL :: Y_UV_FIFO_LEN_SEL [10:10] */ -#define MISC2_GLOBAL_CTRL_Y_UV_FIFO_LEN_SEL_MASK 0x00000400 -#define MISC2_GLOBAL_CTRL_Y_UV_FIFO_LEN_SEL_ALIGN 0 -#define MISC2_GLOBAL_CTRL_Y_UV_FIFO_LEN_SEL_BITS 1 -#define MISC2_GLOBAL_CTRL_Y_UV_FIFO_LEN_SEL_SHIFT 10 - -/* MISC2 :: GLOBAL_CTRL :: ODD_DE_EOFRST_DIS [09:09] */ -#define MISC2_GLOBAL_CTRL_ODD_DE_EOFRST_DIS_MASK 0x00000200 -#define MISC2_GLOBAL_CTRL_ODD_DE_EOFRST_DIS_ALIGN 0 -#define MISC2_GLOBAL_CTRL_ODD_DE_EOFRST_DIS_BITS 1 -#define MISC2_GLOBAL_CTRL_ODD_DE_EOFRST_DIS_SHIFT 9 - -/* MISC2 :: GLOBAL_CTRL :: DIS_BIT_STUFFING [08:08] */ -#define MISC2_GLOBAL_CTRL_DIS_BIT_STUFFING_MASK 0x00000100 -#define MISC2_GLOBAL_CTRL_DIS_BIT_STUFFING_ALIGN 0 -#define MISC2_GLOBAL_CTRL_DIS_BIT_STUFFING_BITS 1 -#define MISC2_GLOBAL_CTRL_DIS_BIT_STUFFING_SHIFT 8 - -/* MISC2 :: GLOBAL_CTRL :: reserved3 [07:05] */ -#define MISC2_GLOBAL_CTRL_reserved3_MASK 0x000000e0 -#define MISC2_GLOBAL_CTRL_reserved3_ALIGN 0 -#define MISC2_GLOBAL_CTRL_reserved3_BITS 3 -#define MISC2_GLOBAL_CTRL_reserved3_SHIFT 5 - -/* MISC2 :: GLOBAL_CTRL :: EN_PROG_MODE [04:04] */ -#define MISC2_GLOBAL_CTRL_EN_PROG_MODE_MASK 0x00000010 -#define MISC2_GLOBAL_CTRL_EN_PROG_MODE_ALIGN 0 -#define MISC2_GLOBAL_CTRL_EN_PROG_MODE_BITS 1 -#define MISC2_GLOBAL_CTRL_EN_PROG_MODE_SHIFT 4 - -/* MISC2 :: GLOBAL_CTRL :: reserved4 [03:01] */ -#define MISC2_GLOBAL_CTRL_reserved4_MASK 0x0000000e -#define MISC2_GLOBAL_CTRL_reserved4_ALIGN 0 -#define MISC2_GLOBAL_CTRL_reserved4_BITS 3 -#define MISC2_GLOBAL_CTRL_reserved4_SHIFT 1 - -/* MISC2 :: GLOBAL_CTRL :: EN_188B [00:00] */ -#define MISC2_GLOBAL_CTRL_EN_188B_MASK 0x00000001 -#define MISC2_GLOBAL_CTRL_EN_188B_ALIGN 0 -#define MISC2_GLOBAL_CTRL_EN_188B_BITS 1 -#define MISC2_GLOBAL_CTRL_EN_188B_SHIFT 0 - - -/**************************************************************************** - * MISC2 :: INTERNAL_STATUS - ***************************************************************************/ -/* MISC2 :: INTERNAL_STATUS :: reserved0 [31:12] */ -#define MISC2_INTERNAL_STATUS_reserved0_MASK 0xfffff000 -#define MISC2_INTERNAL_STATUS_reserved0_ALIGN 0 -#define MISC2_INTERNAL_STATUS_reserved0_BITS 20 -#define MISC2_INTERNAL_STATUS_reserved0_SHIFT 12 - -/* MISC2 :: INTERNAL_STATUS :: UV_BYTE_COUNT_FIFO_FULL [11:11] */ -#define MISC2_INTERNAL_STATUS_UV_BYTE_COUNT_FIFO_FULL_MASK 0x00000800 -#define MISC2_INTERNAL_STATUS_UV_BYTE_COUNT_FIFO_FULL_ALIGN 0 -#define MISC2_INTERNAL_STATUS_UV_BYTE_COUNT_FIFO_FULL_BITS 1 -#define MISC2_INTERNAL_STATUS_UV_BYTE_COUNT_FIFO_FULL_SHIFT 11 - -/* MISC2 :: INTERNAL_STATUS :: UV_DATA_FIFO_FULL [10:10] */ -#define MISC2_INTERNAL_STATUS_UV_DATA_FIFO_FULL_MASK 0x00000400 -#define MISC2_INTERNAL_STATUS_UV_DATA_FIFO_FULL_ALIGN 0 -#define MISC2_INTERNAL_STATUS_UV_DATA_FIFO_FULL_BITS 1 -#define MISC2_INTERNAL_STATUS_UV_DATA_FIFO_FULL_SHIFT 10 - -/* MISC2 :: INTERNAL_STATUS :: Y_BYTE_COUNT_FIFO_FULL [09:09] */ -#define MISC2_INTERNAL_STATUS_Y_BYTE_COUNT_FIFO_FULL_MASK 0x00000200 -#define MISC2_INTERNAL_STATUS_Y_BYTE_COUNT_FIFO_FULL_ALIGN 0 -#define MISC2_INTERNAL_STATUS_Y_BYTE_COUNT_FIFO_FULL_BITS 1 -#define MISC2_INTERNAL_STATUS_Y_BYTE_COUNT_FIFO_FULL_SHIFT 9 - -/* MISC2 :: INTERNAL_STATUS :: Y_DATA_FIFO_FULL [08:08] */ -#define MISC2_INTERNAL_STATUS_Y_DATA_FIFO_FULL_MASK 0x00000100 -#define MISC2_INTERNAL_STATUS_Y_DATA_FIFO_FULL_ALIGN 0 -#define MISC2_INTERNAL_STATUS_Y_DATA_FIFO_FULL_BITS 1 -#define MISC2_INTERNAL_STATUS_Y_DATA_FIFO_FULL_SHIFT 8 - -/* MISC2 :: INTERNAL_STATUS :: UV_BYTE_COUNT_FIFO_EMPTY [07:07] */ -#define MISC2_INTERNAL_STATUS_UV_BYTE_COUNT_FIFO_EMPTY_MASK 0x00000080 -#define MISC2_INTERNAL_STATUS_UV_BYTE_COUNT_FIFO_EMPTY_ALIGN 0 -#define MISC2_INTERNAL_STATUS_UV_BYTE_COUNT_FIFO_EMPTY_BITS 1 -#define MISC2_INTERNAL_STATUS_UV_BYTE_COUNT_FIFO_EMPTY_SHIFT 7 - -/* MISC2 :: INTERNAL_STATUS :: UV_DATA_FIFO_EMPTY [06:06] */ -#define MISC2_INTERNAL_STATUS_UV_DATA_FIFO_EMPTY_MASK 0x00000040 -#define MISC2_INTERNAL_STATUS_UV_DATA_FIFO_EMPTY_ALIGN 0 -#define MISC2_INTERNAL_STATUS_UV_DATA_FIFO_EMPTY_BITS 1 -#define MISC2_INTERNAL_STATUS_UV_DATA_FIFO_EMPTY_SHIFT 6 - -/* MISC2 :: INTERNAL_STATUS :: Y_BYTE_COUNT_FIFO_EMPTY [05:05] */ -#define MISC2_INTERNAL_STATUS_Y_BYTE_COUNT_FIFO_EMPTY_MASK 0x00000020 -#define MISC2_INTERNAL_STATUS_Y_BYTE_COUNT_FIFO_EMPTY_ALIGN 0 -#define MISC2_INTERNAL_STATUS_Y_BYTE_COUNT_FIFO_EMPTY_BITS 1 -#define MISC2_INTERNAL_STATUS_Y_BYTE_COUNT_FIFO_EMPTY_SHIFT 5 - -/* MISC2 :: INTERNAL_STATUS :: Y_DATA_FIFO_EMPTY [04:04] */ -#define MISC2_INTERNAL_STATUS_Y_DATA_FIFO_EMPTY_MASK 0x00000010 -#define MISC2_INTERNAL_STATUS_Y_DATA_FIFO_EMPTY_ALIGN 0 -#define MISC2_INTERNAL_STATUS_Y_DATA_FIFO_EMPTY_BITS 1 -#define MISC2_INTERNAL_STATUS_Y_DATA_FIFO_EMPTY_SHIFT 4 - -/* MISC2 :: INTERNAL_STATUS :: reserved1 [03:00] */ -#define MISC2_INTERNAL_STATUS_reserved1_MASK 0x0000000f -#define MISC2_INTERNAL_STATUS_reserved1_ALIGN 0 -#define MISC2_INTERNAL_STATUS_reserved1_BITS 4 -#define MISC2_INTERNAL_STATUS_reserved1_SHIFT 0 - - -/**************************************************************************** - * MISC2 :: INTERNAL_STATUS_MUX_CTRL - ***************************************************************************/ -/* MISC2 :: INTERNAL_STATUS_MUX_CTRL :: reserved0 [31:16] */ -#define MISC2_INTERNAL_STATUS_MUX_CTRL_reserved0_MASK 0xffff0000 -#define MISC2_INTERNAL_STATUS_MUX_CTRL_reserved0_ALIGN 0 -#define MISC2_INTERNAL_STATUS_MUX_CTRL_reserved0_BITS 16 -#define MISC2_INTERNAL_STATUS_MUX_CTRL_reserved0_SHIFT 16 - -/* MISC2 :: INTERNAL_STATUS_MUX_CTRL :: CLK_OUT_ALT_SRC [15:15] */ -#define MISC2_INTERNAL_STATUS_MUX_CTRL_CLK_OUT_ALT_SRC_MASK 0x00008000 -#define MISC2_INTERNAL_STATUS_MUX_CTRL_CLK_OUT_ALT_SRC_ALIGN 0 -#define MISC2_INTERNAL_STATUS_MUX_CTRL_CLK_OUT_ALT_SRC_BITS 1 -#define MISC2_INTERNAL_STATUS_MUX_CTRL_CLK_OUT_ALT_SRC_SHIFT 15 - -/* MISC2 :: INTERNAL_STATUS_MUX_CTRL :: DEBUG_CLK_SEL [14:12] */ -#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_CLK_SEL_MASK 0x00007000 -#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_CLK_SEL_ALIGN 0 -#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_CLK_SEL_BITS 3 -#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_CLK_SEL_SHIFT 12 - -/* MISC2 :: INTERNAL_STATUS_MUX_CTRL :: reserved1 [11:09] */ -#define MISC2_INTERNAL_STATUS_MUX_CTRL_reserved1_MASK 0x00000e00 -#define MISC2_INTERNAL_STATUS_MUX_CTRL_reserved1_ALIGN 0 -#define MISC2_INTERNAL_STATUS_MUX_CTRL_reserved1_BITS 3 -#define MISC2_INTERNAL_STATUS_MUX_CTRL_reserved1_SHIFT 9 - -/* MISC2 :: INTERNAL_STATUS_MUX_CTRL :: DEBUG_TOP_CORE_SEL [08:08] */ -#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_TOP_CORE_SEL_MASK 0x00000100 -#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_TOP_CORE_SEL_ALIGN 0 -#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_TOP_CORE_SEL_BITS 1 -#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_TOP_CORE_SEL_SHIFT 8 - -/* MISC2 :: INTERNAL_STATUS_MUX_CTRL :: DEBUG_CORE_BLK_SEL [07:04] */ -#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_CORE_BLK_SEL_MASK 0x000000f0 -#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_CORE_BLK_SEL_ALIGN 0 -#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_CORE_BLK_SEL_BITS 4 -#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_CORE_BLK_SEL_SHIFT 4 - -/* MISC2 :: INTERNAL_STATUS_MUX_CTRL :: DEBUG_VECTOR_SEL [03:00] */ -#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_VECTOR_SEL_MASK 0x0000000f -#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_VECTOR_SEL_ALIGN 0 -#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_VECTOR_SEL_BITS 4 -#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_VECTOR_SEL_SHIFT 0 - - -/**************************************************************************** - * MISC2 :: DEBUG_FIFO_LENGTH - ***************************************************************************/ -/* MISC2 :: DEBUG_FIFO_LENGTH :: reserved0 [31:21] */ -#define MISC2_DEBUG_FIFO_LENGTH_reserved0_MASK 0xffe00000 -#define MISC2_DEBUG_FIFO_LENGTH_reserved0_ALIGN 0 -#define MISC2_DEBUG_FIFO_LENGTH_reserved0_BITS 11 -#define MISC2_DEBUG_FIFO_LENGTH_reserved0_SHIFT 21 - -/* MISC2 :: DEBUG_FIFO_LENGTH :: FIFO_LENGTH [20:00] */ -#define MISC2_DEBUG_FIFO_LENGTH_FIFO_LENGTH_MASK 0x001fffff -#define MISC2_DEBUG_FIFO_LENGTH_FIFO_LENGTH_ALIGN 0 -#define MISC2_DEBUG_FIFO_LENGTH_FIFO_LENGTH_BITS 21 -#define MISC2_DEBUG_FIFO_LENGTH_FIFO_LENGTH_SHIFT 0 - - -/**************************************************************************** - * BCM70012_MISC_TOP_MISC3 - ***************************************************************************/ -/**************************************************************************** - * MISC3 :: RESET_CTRL - ***************************************************************************/ -/* MISC3 :: RESET_CTRL :: reserved0 [31:09] */ -#define MISC3_RESET_CTRL_reserved0_MASK 0xfffffe00 -#define MISC3_RESET_CTRL_reserved0_ALIGN 0 -#define MISC3_RESET_CTRL_reserved0_BITS 23 -#define MISC3_RESET_CTRL_reserved0_SHIFT 9 - -/* MISC3 :: RESET_CTRL :: PLL_RESET [08:08] */ -#define MISC3_RESET_CTRL_PLL_RESET_MASK 0x00000100 -#define MISC3_RESET_CTRL_PLL_RESET_ALIGN 0 -#define MISC3_RESET_CTRL_PLL_RESET_BITS 1 -#define MISC3_RESET_CTRL_PLL_RESET_SHIFT 8 - -/* MISC3 :: RESET_CTRL :: reserved1 [07:02] */ -#define MISC3_RESET_CTRL_reserved1_MASK 0x000000fc -#define MISC3_RESET_CTRL_reserved1_ALIGN 0 -#define MISC3_RESET_CTRL_reserved1_BITS 6 -#define MISC3_RESET_CTRL_reserved1_SHIFT 2 - -/* MISC3 :: RESET_CTRL :: POR_RESET [01:01] */ -#define MISC3_RESET_CTRL_POR_RESET_MASK 0x00000002 -#define MISC3_RESET_CTRL_POR_RESET_ALIGN 0 -#define MISC3_RESET_CTRL_POR_RESET_BITS 1 -#define MISC3_RESET_CTRL_POR_RESET_SHIFT 1 - -/* MISC3 :: RESET_CTRL :: CORE_RESET [00:00] */ -#define MISC3_RESET_CTRL_CORE_RESET_MASK 0x00000001 -#define MISC3_RESET_CTRL_CORE_RESET_ALIGN 0 -#define MISC3_RESET_CTRL_CORE_RESET_BITS 1 -#define MISC3_RESET_CTRL_CORE_RESET_SHIFT 0 - - -/**************************************************************************** - * MISC3 :: BIST_CTRL - ***************************************************************************/ -/* MISC3 :: BIST_CTRL :: MBIST_OVERRIDE [31:31] */ -#define MISC3_BIST_CTRL_MBIST_OVERRIDE_MASK 0x80000000 -#define MISC3_BIST_CTRL_MBIST_OVERRIDE_ALIGN 0 -#define MISC3_BIST_CTRL_MBIST_OVERRIDE_BITS 1 -#define MISC3_BIST_CTRL_MBIST_OVERRIDE_SHIFT 31 - -/* MISC3 :: BIST_CTRL :: reserved0 [30:15] */ -#define MISC3_BIST_CTRL_reserved0_MASK 0x7fff8000 -#define MISC3_BIST_CTRL_reserved0_ALIGN 0 -#define MISC3_BIST_CTRL_reserved0_BITS 16 -#define MISC3_BIST_CTRL_reserved0_SHIFT 15 - -/* MISC3 :: BIST_CTRL :: MBIST_EN_2 [14:14] */ -#define MISC3_BIST_CTRL_MBIST_EN_2_MASK 0x00004000 -#define MISC3_BIST_CTRL_MBIST_EN_2_ALIGN 0 -#define MISC3_BIST_CTRL_MBIST_EN_2_BITS 1 -#define MISC3_BIST_CTRL_MBIST_EN_2_SHIFT 14 - -/* MISC3 :: BIST_CTRL :: MBIST_EN_1 [13:13] */ -#define MISC3_BIST_CTRL_MBIST_EN_1_MASK 0x00002000 -#define MISC3_BIST_CTRL_MBIST_EN_1_ALIGN 0 -#define MISC3_BIST_CTRL_MBIST_EN_1_BITS 1 -#define MISC3_BIST_CTRL_MBIST_EN_1_SHIFT 13 - -/* MISC3 :: BIST_CTRL :: MBIST_EN_0 [12:12] */ -#define MISC3_BIST_CTRL_MBIST_EN_0_MASK 0x00001000 -#define MISC3_BIST_CTRL_MBIST_EN_0_ALIGN 0 -#define MISC3_BIST_CTRL_MBIST_EN_0_BITS 1 -#define MISC3_BIST_CTRL_MBIST_EN_0_SHIFT 12 - -/* MISC3 :: BIST_CTRL :: reserved1 [11:06] */ -#define MISC3_BIST_CTRL_reserved1_MASK 0x00000fc0 -#define MISC3_BIST_CTRL_reserved1_ALIGN 0 -#define MISC3_BIST_CTRL_reserved1_BITS 6 -#define MISC3_BIST_CTRL_reserved1_SHIFT 6 - -/* MISC3 :: BIST_CTRL :: MBIST_SETUP [05:04] */ -#define MISC3_BIST_CTRL_MBIST_SETUP_MASK 0x00000030 -#define MISC3_BIST_CTRL_MBIST_SETUP_ALIGN 0 -#define MISC3_BIST_CTRL_MBIST_SETUP_BITS 2 -#define MISC3_BIST_CTRL_MBIST_SETUP_SHIFT 4 - -/* MISC3 :: BIST_CTRL :: reserved2 [03:01] */ -#define MISC3_BIST_CTRL_reserved2_MASK 0x0000000e -#define MISC3_BIST_CTRL_reserved2_ALIGN 0 -#define MISC3_BIST_CTRL_reserved2_BITS 3 -#define MISC3_BIST_CTRL_reserved2_SHIFT 1 - -/* MISC3 :: BIST_CTRL :: MBIST_ASYNC_RESET [00:00] */ -#define MISC3_BIST_CTRL_MBIST_ASYNC_RESET_MASK 0x00000001 -#define MISC3_BIST_CTRL_MBIST_ASYNC_RESET_ALIGN 0 -#define MISC3_BIST_CTRL_MBIST_ASYNC_RESET_BITS 1 -#define MISC3_BIST_CTRL_MBIST_ASYNC_RESET_SHIFT 0 - - -/**************************************************************************** - * MISC3 :: BIST_STATUS - ***************************************************************************/ -/* MISC3 :: BIST_STATUS :: reserved0 [31:31] */ -#define MISC3_BIST_STATUS_reserved0_MASK 0x80000000 -#define MISC3_BIST_STATUS_reserved0_ALIGN 0 -#define MISC3_BIST_STATUS_reserved0_BITS 1 -#define MISC3_BIST_STATUS_reserved0_SHIFT 31 - -/* MISC3 :: BIST_STATUS :: MBIST_GO_2 [30:30] */ -#define MISC3_BIST_STATUS_MBIST_GO_2_MASK 0x40000000 -#define MISC3_BIST_STATUS_MBIST_GO_2_ALIGN 0 -#define MISC3_BIST_STATUS_MBIST_GO_2_BITS 1 -#define MISC3_BIST_STATUS_MBIST_GO_2_SHIFT 30 - -/* MISC3 :: BIST_STATUS :: MBIST_GO_1 [29:29] */ -#define MISC3_BIST_STATUS_MBIST_GO_1_MASK 0x20000000 -#define MISC3_BIST_STATUS_MBIST_GO_1_ALIGN 0 -#define MISC3_BIST_STATUS_MBIST_GO_1_BITS 1 -#define MISC3_BIST_STATUS_MBIST_GO_1_SHIFT 29 - -/* MISC3 :: BIST_STATUS :: MBIST_GO_0 [28:28] */ -#define MISC3_BIST_STATUS_MBIST_GO_0_MASK 0x10000000 -#define MISC3_BIST_STATUS_MBIST_GO_0_ALIGN 0 -#define MISC3_BIST_STATUS_MBIST_GO_0_BITS 1 -#define MISC3_BIST_STATUS_MBIST_GO_0_SHIFT 28 - -/* MISC3 :: BIST_STATUS :: reserved1 [27:27] */ -#define MISC3_BIST_STATUS_reserved1_MASK 0x08000000 -#define MISC3_BIST_STATUS_reserved1_ALIGN 0 -#define MISC3_BIST_STATUS_reserved1_BITS 1 -#define MISC3_BIST_STATUS_reserved1_SHIFT 27 - -/* MISC3 :: BIST_STATUS :: MBIST_DONE_2 [26:26] */ -#define MISC3_BIST_STATUS_MBIST_DONE_2_MASK 0x04000000 -#define MISC3_BIST_STATUS_MBIST_DONE_2_ALIGN 0 -#define MISC3_BIST_STATUS_MBIST_DONE_2_BITS 1 -#define MISC3_BIST_STATUS_MBIST_DONE_2_SHIFT 26 - -/* MISC3 :: BIST_STATUS :: MBIST_DONE_1 [25:25] */ -#define MISC3_BIST_STATUS_MBIST_DONE_1_MASK 0x02000000 -#define MISC3_BIST_STATUS_MBIST_DONE_1_ALIGN 0 -#define MISC3_BIST_STATUS_MBIST_DONE_1_BITS 1 -#define MISC3_BIST_STATUS_MBIST_DONE_1_SHIFT 25 - -/* MISC3 :: BIST_STATUS :: MBIST_DONE_0 [24:24] */ -#define MISC3_BIST_STATUS_MBIST_DONE_0_MASK 0x01000000 -#define MISC3_BIST_STATUS_MBIST_DONE_0_ALIGN 0 -#define MISC3_BIST_STATUS_MBIST_DONE_0_BITS 1 -#define MISC3_BIST_STATUS_MBIST_DONE_0_SHIFT 24 - -/* MISC3 :: BIST_STATUS :: reserved2 [23:06] */ -#define MISC3_BIST_STATUS_reserved2_MASK 0x00ffffc0 -#define MISC3_BIST_STATUS_reserved2_ALIGN 0 -#define MISC3_BIST_STATUS_reserved2_BITS 18 -#define MISC3_BIST_STATUS_reserved2_SHIFT 6 - -/* MISC3 :: BIST_STATUS :: MBIST_MBIST_MEMORY_GO_2 [05:04] */ -#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_2_MASK 0x00000030 -#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_2_ALIGN 0 -#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_2_BITS 2 -#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_2_SHIFT 4 - -/* MISC3 :: BIST_STATUS :: MBIST_MBIST_MEMORY_GO_1 [03:02] */ -#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_1_MASK 0x0000000c -#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_1_ALIGN 0 -#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_1_BITS 2 -#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_1_SHIFT 2 - -/* MISC3 :: BIST_STATUS :: MBIST_MBIST_MEMORY_GO_0 [01:00] */ -#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_0_MASK 0x00000003 -#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_0_ALIGN 0 -#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_0_BITS 2 -#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_0_SHIFT 0 - - -/**************************************************************************** - * MISC3 :: RX_CHECKSUM - ***************************************************************************/ -/* MISC3 :: RX_CHECKSUM :: RX_CHECKSUM [31:00] */ -#define MISC3_RX_CHECKSUM_RX_CHECKSUM_MASK 0xffffffff -#define MISC3_RX_CHECKSUM_RX_CHECKSUM_ALIGN 0 -#define MISC3_RX_CHECKSUM_RX_CHECKSUM_BITS 32 -#define MISC3_RX_CHECKSUM_RX_CHECKSUM_SHIFT 0 - - -/**************************************************************************** - * MISC3 :: TX_CHECKSUM - ***************************************************************************/ -/* MISC3 :: TX_CHECKSUM :: TX_CHECKSUM [31:00] */ -#define MISC3_TX_CHECKSUM_TX_CHECKSUM_MASK 0xffffffff -#define MISC3_TX_CHECKSUM_TX_CHECKSUM_ALIGN 0 -#define MISC3_TX_CHECKSUM_TX_CHECKSUM_BITS 32 -#define MISC3_TX_CHECKSUM_TX_CHECKSUM_SHIFT 0 - - -/**************************************************************************** - * MISC3 :: ECO_CTRL_CORE - ***************************************************************************/ -/* MISC3 :: ECO_CTRL_CORE :: reserved0 [31:16] */ -#define MISC3_ECO_CTRL_CORE_reserved0_MASK 0xffff0000 -#define MISC3_ECO_CTRL_CORE_reserved0_ALIGN 0 -#define MISC3_ECO_CTRL_CORE_reserved0_BITS 16 -#define MISC3_ECO_CTRL_CORE_reserved0_SHIFT 16 - -/* MISC3 :: ECO_CTRL_CORE :: ECO_CORE_RST_N [15:00] */ -#define MISC3_ECO_CTRL_CORE_ECO_CORE_RST_N_MASK 0x0000ffff -#define MISC3_ECO_CTRL_CORE_ECO_CORE_RST_N_ALIGN 0 -#define MISC3_ECO_CTRL_CORE_ECO_CORE_RST_N_BITS 16 -#define MISC3_ECO_CTRL_CORE_ECO_CORE_RST_N_SHIFT 0 - - -/**************************************************************************** - * MISC3 :: CSI_TEST_CTRL - ***************************************************************************/ -/* MISC3 :: CSI_TEST_CTRL :: ENABLE_CSI_TEST [31:31] */ -#define MISC3_CSI_TEST_CTRL_ENABLE_CSI_TEST_MASK 0x80000000 -#define MISC3_CSI_TEST_CTRL_ENABLE_CSI_TEST_ALIGN 0 -#define MISC3_CSI_TEST_CTRL_ENABLE_CSI_TEST_BITS 1 -#define MISC3_CSI_TEST_CTRL_ENABLE_CSI_TEST_SHIFT 31 - -/* MISC3 :: CSI_TEST_CTRL :: reserved0 [30:24] */ -#define MISC3_CSI_TEST_CTRL_reserved0_MASK 0x7f000000 -#define MISC3_CSI_TEST_CTRL_reserved0_ALIGN 0 -#define MISC3_CSI_TEST_CTRL_reserved0_BITS 7 -#define MISC3_CSI_TEST_CTRL_reserved0_SHIFT 24 - -/* MISC3 :: CSI_TEST_CTRL :: CSI_CLOCK_ENABLE [23:16] */ -#define MISC3_CSI_TEST_CTRL_CSI_CLOCK_ENABLE_MASK 0x00ff0000 -#define MISC3_CSI_TEST_CTRL_CSI_CLOCK_ENABLE_ALIGN 0 -#define MISC3_CSI_TEST_CTRL_CSI_CLOCK_ENABLE_BITS 8 -#define MISC3_CSI_TEST_CTRL_CSI_CLOCK_ENABLE_SHIFT 16 - -/* MISC3 :: CSI_TEST_CTRL :: CSI_SYNC [15:08] */ -#define MISC3_CSI_TEST_CTRL_CSI_SYNC_MASK 0x0000ff00 -#define MISC3_CSI_TEST_CTRL_CSI_SYNC_ALIGN 0 -#define MISC3_CSI_TEST_CTRL_CSI_SYNC_BITS 8 -#define MISC3_CSI_TEST_CTRL_CSI_SYNC_SHIFT 8 - -/* MISC3 :: CSI_TEST_CTRL :: CSI_DATA [07:00] */ -#define MISC3_CSI_TEST_CTRL_CSI_DATA_MASK 0x000000ff -#define MISC3_CSI_TEST_CTRL_CSI_DATA_ALIGN 0 -#define MISC3_CSI_TEST_CTRL_CSI_DATA_BITS 8 -#define MISC3_CSI_TEST_CTRL_CSI_DATA_SHIFT 0 - - -/**************************************************************************** - * MISC3 :: HD_DVI_TEST_CTRL - ***************************************************************************/ -/* MISC3 :: HD_DVI_TEST_CTRL :: reserved0 [31:25] */ -#define MISC3_HD_DVI_TEST_CTRL_reserved0_MASK 0xfe000000 -#define MISC3_HD_DVI_TEST_CTRL_reserved0_ALIGN 0 -#define MISC3_HD_DVI_TEST_CTRL_reserved0_BITS 7 -#define MISC3_HD_DVI_TEST_CTRL_reserved0_SHIFT 25 - -/* MISC3 :: HD_DVI_TEST_CTRL :: POS_VIDO_VBLANK_N [24:24] */ -#define MISC3_HD_DVI_TEST_CTRL_POS_VIDO_VBLANK_N_MASK 0x01000000 -#define MISC3_HD_DVI_TEST_CTRL_POS_VIDO_VBLANK_N_ALIGN 0 -#define MISC3_HD_DVI_TEST_CTRL_POS_VIDO_VBLANK_N_BITS 1 -#define MISC3_HD_DVI_TEST_CTRL_POS_VIDO_VBLANK_N_SHIFT 24 - -/* MISC3 :: HD_DVI_TEST_CTRL :: NEG_VIDO_DVI_DATA [23:12] */ -#define MISC3_HD_DVI_TEST_CTRL_NEG_VIDO_DVI_DATA_MASK 0x00fff000 -#define MISC3_HD_DVI_TEST_CTRL_NEG_VIDO_DVI_DATA_ALIGN 0 -#define MISC3_HD_DVI_TEST_CTRL_NEG_VIDO_DVI_DATA_BITS 12 -#define MISC3_HD_DVI_TEST_CTRL_NEG_VIDO_DVI_DATA_SHIFT 12 - -/* MISC3 :: HD_DVI_TEST_CTRL :: POS_VIDO_DVI_DATA [11:00] */ -#define MISC3_HD_DVI_TEST_CTRL_POS_VIDO_DVI_DATA_MASK 0x00000fff -#define MISC3_HD_DVI_TEST_CTRL_POS_VIDO_DVI_DATA_ALIGN 0 -#define MISC3_HD_DVI_TEST_CTRL_POS_VIDO_DVI_DATA_BITS 12 -#define MISC3_HD_DVI_TEST_CTRL_POS_VIDO_DVI_DATA_SHIFT 0 - - -/**************************************************************************** - * BCM70012_MISC_TOP_MISC_PERST - ***************************************************************************/ -/**************************************************************************** - * MISC_PERST :: ECO_CTRL_PERST - ***************************************************************************/ -/* MISC_PERST :: ECO_CTRL_PERST :: reserved0 [31:16] */ -#define MISC_PERST_ECO_CTRL_PERST_reserved0_MASK 0xffff0000 -#define MISC_PERST_ECO_CTRL_PERST_reserved0_ALIGN 0 -#define MISC_PERST_ECO_CTRL_PERST_reserved0_BITS 16 -#define MISC_PERST_ECO_CTRL_PERST_reserved0_SHIFT 16 - -/* MISC_PERST :: ECO_CTRL_PERST :: ECO_PERST_N [15:00] */ -#define MISC_PERST_ECO_CTRL_PERST_ECO_PERST_N_MASK 0x0000ffff -#define MISC_PERST_ECO_CTRL_PERST_ECO_PERST_N_ALIGN 0 -#define MISC_PERST_ECO_CTRL_PERST_ECO_PERST_N_BITS 16 -#define MISC_PERST_ECO_CTRL_PERST_ECO_PERST_N_SHIFT 0 - - -/**************************************************************************** - * MISC_PERST :: DECODER_CTRL - ***************************************************************************/ -/* MISC_PERST :: DECODER_CTRL :: reserved0 [31:05] */ -#define MISC_PERST_DECODER_CTRL_reserved0_MASK 0xffffffe0 -#define MISC_PERST_DECODER_CTRL_reserved0_ALIGN 0 -#define MISC_PERST_DECODER_CTRL_reserved0_BITS 27 -#define MISC_PERST_DECODER_CTRL_reserved0_SHIFT 5 - -/* MISC_PERST :: DECODER_CTRL :: STOP_BCM7412_CLK [04:04] */ -#define MISC_PERST_DECODER_CTRL_STOP_BCM7412_CLK_MASK 0x00000010 -#define MISC_PERST_DECODER_CTRL_STOP_BCM7412_CLK_ALIGN 0 -#define MISC_PERST_DECODER_CTRL_STOP_BCM7412_CLK_BITS 1 -#define MISC_PERST_DECODER_CTRL_STOP_BCM7412_CLK_SHIFT 4 - -/* MISC_PERST :: DECODER_CTRL :: reserved1 [03:01] */ -#define MISC_PERST_DECODER_CTRL_reserved1_MASK 0x0000000e -#define MISC_PERST_DECODER_CTRL_reserved1_ALIGN 0 -#define MISC_PERST_DECODER_CTRL_reserved1_BITS 3 -#define MISC_PERST_DECODER_CTRL_reserved1_SHIFT 1 - -/* MISC_PERST :: DECODER_CTRL :: BCM7412_RESET [00:00] */ -#define MISC_PERST_DECODER_CTRL_BCM7412_RESET_MASK 0x00000001 -#define MISC_PERST_DECODER_CTRL_BCM7412_RESET_ALIGN 0 -#define MISC_PERST_DECODER_CTRL_BCM7412_RESET_BITS 1 -#define MISC_PERST_DECODER_CTRL_BCM7412_RESET_SHIFT 0 - - -/**************************************************************************** - * MISC_PERST :: CCE_STATUS - ***************************************************************************/ -/* MISC_PERST :: CCE_STATUS :: CCE_DONE [31:31] */ -#define MISC_PERST_CCE_STATUS_CCE_DONE_MASK 0x80000000 -#define MISC_PERST_CCE_STATUS_CCE_DONE_ALIGN 0 -#define MISC_PERST_CCE_STATUS_CCE_DONE_BITS 1 -#define MISC_PERST_CCE_STATUS_CCE_DONE_SHIFT 31 - -/* MISC_PERST :: CCE_STATUS :: reserved0 [30:03] */ -#define MISC_PERST_CCE_STATUS_reserved0_MASK 0x7ffffff8 -#define MISC_PERST_CCE_STATUS_reserved0_ALIGN 0 -#define MISC_PERST_CCE_STATUS_reserved0_BITS 28 -#define MISC_PERST_CCE_STATUS_reserved0_SHIFT 3 - -/* MISC_PERST :: CCE_STATUS :: CCE_BAD_GISB_ACCESS [02:02] */ -#define MISC_PERST_CCE_STATUS_CCE_BAD_GISB_ACCESS_MASK 0x00000004 -#define MISC_PERST_CCE_STATUS_CCE_BAD_GISB_ACCESS_ALIGN 0 -#define MISC_PERST_CCE_STATUS_CCE_BAD_GISB_ACCESS_BITS 1 -#define MISC_PERST_CCE_STATUS_CCE_BAD_GISB_ACCESS_SHIFT 2 - -/* MISC_PERST :: CCE_STATUS :: CCE_BAD_I2C_ACCESS [01:01] */ -#define MISC_PERST_CCE_STATUS_CCE_BAD_I2C_ACCESS_MASK 0x00000002 -#define MISC_PERST_CCE_STATUS_CCE_BAD_I2C_ACCESS_ALIGN 0 -#define MISC_PERST_CCE_STATUS_CCE_BAD_I2C_ACCESS_BITS 1 -#define MISC_PERST_CCE_STATUS_CCE_BAD_I2C_ACCESS_SHIFT 1 - -/* MISC_PERST :: CCE_STATUS :: CCE_BAD_SECTION_ID [00:00] */ -#define MISC_PERST_CCE_STATUS_CCE_BAD_SECTION_ID_MASK 0x00000001 -#define MISC_PERST_CCE_STATUS_CCE_BAD_SECTION_ID_ALIGN 0 -#define MISC_PERST_CCE_STATUS_CCE_BAD_SECTION_ID_BITS 1 -#define MISC_PERST_CCE_STATUS_CCE_BAD_SECTION_ID_SHIFT 0 - - -/**************************************************************************** - * MISC_PERST :: PCIE_DEBUG - ***************************************************************************/ -/* MISC_PERST :: PCIE_DEBUG :: SERDES_TERM_CNT [31:16] */ -#define MISC_PERST_PCIE_DEBUG_SERDES_TERM_CNT_MASK 0xffff0000 -#define MISC_PERST_PCIE_DEBUG_SERDES_TERM_CNT_ALIGN 0 -#define MISC_PERST_PCIE_DEBUG_SERDES_TERM_CNT_BITS 16 -#define MISC_PERST_PCIE_DEBUG_SERDES_TERM_CNT_SHIFT 16 - -/* MISC_PERST :: PCIE_DEBUG :: reserved0 [15:11] */ -#define MISC_PERST_PCIE_DEBUG_reserved0_MASK 0x0000f800 -#define MISC_PERST_PCIE_DEBUG_reserved0_ALIGN 0 -#define MISC_PERST_PCIE_DEBUG_reserved0_BITS 5 -#define MISC_PERST_PCIE_DEBUG_reserved0_SHIFT 11 - -/* MISC_PERST :: PCIE_DEBUG :: PLL_VCO_RESCUE [10:10] */ -#define MISC_PERST_PCIE_DEBUG_PLL_VCO_RESCUE_MASK 0x00000400 -#define MISC_PERST_PCIE_DEBUG_PLL_VCO_RESCUE_ALIGN 0 -#define MISC_PERST_PCIE_DEBUG_PLL_VCO_RESCUE_BITS 1 -#define MISC_PERST_PCIE_DEBUG_PLL_VCO_RESCUE_SHIFT 10 - -/* MISC_PERST :: PCIE_DEBUG :: PLL_PDN_OVERRIDE [09:09] */ -#define MISC_PERST_PCIE_DEBUG_PLL_PDN_OVERRIDE_MASK 0x00000200 -#define MISC_PERST_PCIE_DEBUG_PLL_PDN_OVERRIDE_ALIGN 0 -#define MISC_PERST_PCIE_DEBUG_PLL_PDN_OVERRIDE_BITS 1 -#define MISC_PERST_PCIE_DEBUG_PLL_PDN_OVERRIDE_SHIFT 9 - -/* MISC_PERST :: PCIE_DEBUG :: CORE_CLOCK_OVR [08:08] */ -#define MISC_PERST_PCIE_DEBUG_CORE_CLOCK_OVR_MASK 0x00000100 -#define MISC_PERST_PCIE_DEBUG_CORE_CLOCK_OVR_ALIGN 0 -#define MISC_PERST_PCIE_DEBUG_CORE_CLOCK_OVR_BITS 1 -#define MISC_PERST_PCIE_DEBUG_CORE_CLOCK_OVR_SHIFT 8 - -/* MISC_PERST :: PCIE_DEBUG :: reserved1 [07:04] */ -#define MISC_PERST_PCIE_DEBUG_reserved1_MASK 0x000000f0 -#define MISC_PERST_PCIE_DEBUG_reserved1_ALIGN 0 -#define MISC_PERST_PCIE_DEBUG_reserved1_BITS 4 -#define MISC_PERST_PCIE_DEBUG_reserved1_SHIFT 4 - -/* MISC_PERST :: PCIE_DEBUG :: PCIE_TMUX_SEL [03:00] */ -#define MISC_PERST_PCIE_DEBUG_PCIE_TMUX_SEL_MASK 0x0000000f -#define MISC_PERST_PCIE_DEBUG_PCIE_TMUX_SEL_ALIGN 0 -#define MISC_PERST_PCIE_DEBUG_PCIE_TMUX_SEL_BITS 4 -#define MISC_PERST_PCIE_DEBUG_PCIE_TMUX_SEL_SHIFT 0 - - -/**************************************************************************** - * MISC_PERST :: PCIE_DEBUG_STATUS - ***************************************************************************/ -/* MISC_PERST :: PCIE_DEBUG_STATUS :: reserved0 [31:06] */ -#define MISC_PERST_PCIE_DEBUG_STATUS_reserved0_MASK 0xffffffc0 -#define MISC_PERST_PCIE_DEBUG_STATUS_reserved0_ALIGN 0 -#define MISC_PERST_PCIE_DEBUG_STATUS_reserved0_BITS 26 -#define MISC_PERST_PCIE_DEBUG_STATUS_reserved0_SHIFT 6 - -/* MISC_PERST :: PCIE_DEBUG_STATUS :: DATALINKATTN [05:05] */ -#define MISC_PERST_PCIE_DEBUG_STATUS_DATALINKATTN_MASK 0x00000020 -#define MISC_PERST_PCIE_DEBUG_STATUS_DATALINKATTN_ALIGN 0 -#define MISC_PERST_PCIE_DEBUG_STATUS_DATALINKATTN_BITS 1 -#define MISC_PERST_PCIE_DEBUG_STATUS_DATALINKATTN_SHIFT 5 - -/* MISC_PERST :: PCIE_DEBUG_STATUS :: PHYLINKATTN [04:04] */ -#define MISC_PERST_PCIE_DEBUG_STATUS_PHYLINKATTN_MASK 0x00000010 -#define MISC_PERST_PCIE_DEBUG_STATUS_PHYLINKATTN_ALIGN 0 -#define MISC_PERST_PCIE_DEBUG_STATUS_PHYLINKATTN_BITS 1 -#define MISC_PERST_PCIE_DEBUG_STATUS_PHYLINKATTN_SHIFT 4 - -/* MISC_PERST :: PCIE_DEBUG_STATUS :: reserved1 [03:02] */ -#define MISC_PERST_PCIE_DEBUG_STATUS_reserved1_MASK 0x0000000c -#define MISC_PERST_PCIE_DEBUG_STATUS_reserved1_ALIGN 0 -#define MISC_PERST_PCIE_DEBUG_STATUS_reserved1_BITS 2 -#define MISC_PERST_PCIE_DEBUG_STATUS_reserved1_SHIFT 2 - -/* MISC_PERST :: PCIE_DEBUG_STATUS :: DATA_LINKUP [01:01] */ -#define MISC_PERST_PCIE_DEBUG_STATUS_DATA_LINKUP_MASK 0x00000002 -#define MISC_PERST_PCIE_DEBUG_STATUS_DATA_LINKUP_ALIGN 0 -#define MISC_PERST_PCIE_DEBUG_STATUS_DATA_LINKUP_BITS 1 -#define MISC_PERST_PCIE_DEBUG_STATUS_DATA_LINKUP_SHIFT 1 - -/* MISC_PERST :: PCIE_DEBUG_STATUS :: PHY_LINKUP [00:00] */ -#define MISC_PERST_PCIE_DEBUG_STATUS_PHY_LINKUP_MASK 0x00000001 -#define MISC_PERST_PCIE_DEBUG_STATUS_PHY_LINKUP_ALIGN 0 -#define MISC_PERST_PCIE_DEBUG_STATUS_PHY_LINKUP_BITS 1 -#define MISC_PERST_PCIE_DEBUG_STATUS_PHY_LINKUP_SHIFT 0 - - -/**************************************************************************** - * MISC_PERST :: VREG_CTRL - ***************************************************************************/ -/* MISC_PERST :: VREG_CTRL :: reserved0 [31:08] */ -#define MISC_PERST_VREG_CTRL_reserved0_MASK 0xffffff00 -#define MISC_PERST_VREG_CTRL_reserved0_ALIGN 0 -#define MISC_PERST_VREG_CTRL_reserved0_BITS 24 -#define MISC_PERST_VREG_CTRL_reserved0_SHIFT 8 - -/* MISC_PERST :: VREG_CTRL :: VREG1P2_SEL [07:04] */ -#define MISC_PERST_VREG_CTRL_VREG1P2_SEL_MASK 0x000000f0 -#define MISC_PERST_VREG_CTRL_VREG1P2_SEL_ALIGN 0 -#define MISC_PERST_VREG_CTRL_VREG1P2_SEL_BITS 4 -#define MISC_PERST_VREG_CTRL_VREG1P2_SEL_SHIFT 4 - -/* MISC_PERST :: VREG_CTRL :: VREG2P5_SEL [03:00] */ -#define MISC_PERST_VREG_CTRL_VREG2P5_SEL_MASK 0x0000000f -#define MISC_PERST_VREG_CTRL_VREG2P5_SEL_ALIGN 0 -#define MISC_PERST_VREG_CTRL_VREG2P5_SEL_BITS 4 -#define MISC_PERST_VREG_CTRL_VREG2P5_SEL_SHIFT 0 - - -/**************************************************************************** - * MISC_PERST :: MEM_CTRL - ***************************************************************************/ -/* MISC_PERST :: MEM_CTRL :: reserved0 [31:04] */ -#define MISC_PERST_MEM_CTRL_reserved0_MASK 0xfffffff0 -#define MISC_PERST_MEM_CTRL_reserved0_ALIGN 0 -#define MISC_PERST_MEM_CTRL_reserved0_BITS 28 -#define MISC_PERST_MEM_CTRL_reserved0_SHIFT 4 - -/* MISC_PERST :: MEM_CTRL :: Y_RM [03:03] */ -#define MISC_PERST_MEM_CTRL_Y_RM_MASK 0x00000008 -#define MISC_PERST_MEM_CTRL_Y_RM_ALIGN 0 -#define MISC_PERST_MEM_CTRL_Y_RM_BITS 1 -#define MISC_PERST_MEM_CTRL_Y_RM_SHIFT 3 - -/* MISC_PERST :: MEM_CTRL :: Y_CCM [02:02] */ -#define MISC_PERST_MEM_CTRL_Y_CCM_MASK 0x00000004 -#define MISC_PERST_MEM_CTRL_Y_CCM_ALIGN 0 -#define MISC_PERST_MEM_CTRL_Y_CCM_BITS 1 -#define MISC_PERST_MEM_CTRL_Y_CCM_SHIFT 2 - -/* MISC_PERST :: MEM_CTRL :: UV_RM [01:01] */ -#define MISC_PERST_MEM_CTRL_UV_RM_MASK 0x00000002 -#define MISC_PERST_MEM_CTRL_UV_RM_ALIGN 0 -#define MISC_PERST_MEM_CTRL_UV_RM_BITS 1 -#define MISC_PERST_MEM_CTRL_UV_RM_SHIFT 1 - -/* MISC_PERST :: MEM_CTRL :: UV_CCM [00:00] */ -#define MISC_PERST_MEM_CTRL_UV_CCM_MASK 0x00000001 -#define MISC_PERST_MEM_CTRL_UV_CCM_ALIGN 0 -#define MISC_PERST_MEM_CTRL_UV_CCM_BITS 1 -#define MISC_PERST_MEM_CTRL_UV_CCM_SHIFT 0 - - -/**************************************************************************** - * MISC_PERST :: CLOCK_CTRL - ***************************************************************************/ -/* MISC_PERST :: CLOCK_CTRL :: reserved0 [31:20] */ -#define MISC_PERST_CLOCK_CTRL_reserved0_MASK 0xfff00000 -#define MISC_PERST_CLOCK_CTRL_reserved0_ALIGN 0 -#define MISC_PERST_CLOCK_CTRL_reserved0_BITS 12 -#define MISC_PERST_CLOCK_CTRL_reserved0_SHIFT 20 - -/* MISC_PERST :: CLOCK_CTRL :: PLL_DIV [19:16] */ -#define MISC_PERST_CLOCK_CTRL_PLL_DIV_MASK 0x000f0000 -#define MISC_PERST_CLOCK_CTRL_PLL_DIV_ALIGN 0 -#define MISC_PERST_CLOCK_CTRL_PLL_DIV_BITS 4 -#define MISC_PERST_CLOCK_CTRL_PLL_DIV_SHIFT 16 - -/* MISC_PERST :: CLOCK_CTRL :: PLL_MULT [15:08] */ -#define MISC_PERST_CLOCK_CTRL_PLL_MULT_MASK 0x0000ff00 -#define MISC_PERST_CLOCK_CTRL_PLL_MULT_ALIGN 0 -#define MISC_PERST_CLOCK_CTRL_PLL_MULT_BITS 8 -#define MISC_PERST_CLOCK_CTRL_PLL_MULT_SHIFT 8 - -/* MISC_PERST :: CLOCK_CTRL :: reserved1 [07:03] */ -#define MISC_PERST_CLOCK_CTRL_reserved1_MASK 0x000000f8 -#define MISC_PERST_CLOCK_CTRL_reserved1_ALIGN 0 -#define MISC_PERST_CLOCK_CTRL_reserved1_BITS 5 -#define MISC_PERST_CLOCK_CTRL_reserved1_SHIFT 3 - -/* MISC_PERST :: CLOCK_CTRL :: PLL_PWRDOWN [02:02] */ -#define MISC_PERST_CLOCK_CTRL_PLL_PWRDOWN_MASK 0x00000004 -#define MISC_PERST_CLOCK_CTRL_PLL_PWRDOWN_ALIGN 0 -#define MISC_PERST_CLOCK_CTRL_PLL_PWRDOWN_BITS 1 -#define MISC_PERST_CLOCK_CTRL_PLL_PWRDOWN_SHIFT 2 - -/* MISC_PERST :: CLOCK_CTRL :: STOP_CORE_CLK [01:01] */ -#define MISC_PERST_CLOCK_CTRL_STOP_CORE_CLK_MASK 0x00000002 -#define MISC_PERST_CLOCK_CTRL_STOP_CORE_CLK_ALIGN 0 -#define MISC_PERST_CLOCK_CTRL_STOP_CORE_CLK_BITS 1 -#define MISC_PERST_CLOCK_CTRL_STOP_CORE_CLK_SHIFT 1 - -/* MISC_PERST :: CLOCK_CTRL :: SEL_ALT_CLK [00:00] */ -#define MISC_PERST_CLOCK_CTRL_SEL_ALT_CLK_MASK 0x00000001 -#define MISC_PERST_CLOCK_CTRL_SEL_ALT_CLK_ALIGN 0 -#define MISC_PERST_CLOCK_CTRL_SEL_ALT_CLK_BITS 1 -#define MISC_PERST_CLOCK_CTRL_SEL_ALT_CLK_SHIFT 0 - - -/**************************************************************************** - * BCM70012_MISC_TOP_GISB_ARBITER - ***************************************************************************/ -/**************************************************************************** - * GISB_ARBITER :: REVISION - ***************************************************************************/ -/* GISB_ARBITER :: REVISION :: reserved0 [31:16] */ -#define GISB_ARBITER_REVISION_reserved0_MASK 0xffff0000 -#define GISB_ARBITER_REVISION_reserved0_ALIGN 0 -#define GISB_ARBITER_REVISION_reserved0_BITS 16 -#define GISB_ARBITER_REVISION_reserved0_SHIFT 16 - -/* GISB_ARBITER :: REVISION :: MAJOR [15:08] */ -#define GISB_ARBITER_REVISION_MAJOR_MASK 0x0000ff00 -#define GISB_ARBITER_REVISION_MAJOR_ALIGN 0 -#define GISB_ARBITER_REVISION_MAJOR_BITS 8 -#define GISB_ARBITER_REVISION_MAJOR_SHIFT 8 - -/* GISB_ARBITER :: REVISION :: MINOR [07:00] */ -#define GISB_ARBITER_REVISION_MINOR_MASK 0x000000ff -#define GISB_ARBITER_REVISION_MINOR_ALIGN 0 -#define GISB_ARBITER_REVISION_MINOR_BITS 8 -#define GISB_ARBITER_REVISION_MINOR_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: SCRATCH - ***************************************************************************/ -/* GISB_ARBITER :: SCRATCH :: scratch_bit [31:00] */ -#define GISB_ARBITER_SCRATCH_scratch_bit_MASK 0xffffffff -#define GISB_ARBITER_SCRATCH_scratch_bit_ALIGN 0 -#define GISB_ARBITER_SCRATCH_scratch_bit_BITS 32 -#define GISB_ARBITER_SCRATCH_scratch_bit_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: REQ_MASK - ***************************************************************************/ -/* GISB_ARBITER :: REQ_MASK :: reserved0 [31:06] */ -#define GISB_ARBITER_REQ_MASK_reserved0_MASK 0xffffffc0 -#define GISB_ARBITER_REQ_MASK_reserved0_ALIGN 0 -#define GISB_ARBITER_REQ_MASK_reserved0_BITS 26 -#define GISB_ARBITER_REQ_MASK_reserved0_SHIFT 6 - -/* GISB_ARBITER :: REQ_MASK :: bsp [05:05] */ -#define GISB_ARBITER_REQ_MASK_bsp_MASK 0x00000020 -#define GISB_ARBITER_REQ_MASK_bsp_ALIGN 0 -#define GISB_ARBITER_REQ_MASK_bsp_BITS 1 -#define GISB_ARBITER_REQ_MASK_bsp_SHIFT 5 -#define GISB_ARBITER_REQ_MASK_bsp_UNMASK 0 - -/* GISB_ARBITER :: REQ_MASK :: tgt [04:04] */ -#define GISB_ARBITER_REQ_MASK_tgt_MASK 0x00000010 -#define GISB_ARBITER_REQ_MASK_tgt_ALIGN 0 -#define GISB_ARBITER_REQ_MASK_tgt_BITS 1 -#define GISB_ARBITER_REQ_MASK_tgt_SHIFT 4 -#define GISB_ARBITER_REQ_MASK_tgt_UNMASK 0 - -/* GISB_ARBITER :: REQ_MASK :: aes [03:03] */ -#define GISB_ARBITER_REQ_MASK_aes_MASK 0x00000008 -#define GISB_ARBITER_REQ_MASK_aes_ALIGN 0 -#define GISB_ARBITER_REQ_MASK_aes_BITS 1 -#define GISB_ARBITER_REQ_MASK_aes_SHIFT 3 -#define GISB_ARBITER_REQ_MASK_aes_UNMASK 0 - -/* GISB_ARBITER :: REQ_MASK :: dci [02:02] */ -#define GISB_ARBITER_REQ_MASK_dci_MASK 0x00000004 -#define GISB_ARBITER_REQ_MASK_dci_ALIGN 0 -#define GISB_ARBITER_REQ_MASK_dci_BITS 1 -#define GISB_ARBITER_REQ_MASK_dci_SHIFT 2 -#define GISB_ARBITER_REQ_MASK_dci_UNMASK 0 - -/* GISB_ARBITER :: REQ_MASK :: cce [01:01] */ -#define GISB_ARBITER_REQ_MASK_cce_MASK 0x00000002 -#define GISB_ARBITER_REQ_MASK_cce_ALIGN 0 -#define GISB_ARBITER_REQ_MASK_cce_BITS 1 -#define GISB_ARBITER_REQ_MASK_cce_SHIFT 1 -#define GISB_ARBITER_REQ_MASK_cce_UNMASK 0 - -/* GISB_ARBITER :: REQ_MASK :: dbu [00:00] */ -#define GISB_ARBITER_REQ_MASK_dbu_MASK 0x00000001 -#define GISB_ARBITER_REQ_MASK_dbu_ALIGN 0 -#define GISB_ARBITER_REQ_MASK_dbu_BITS 1 -#define GISB_ARBITER_REQ_MASK_dbu_SHIFT 0 -#define GISB_ARBITER_REQ_MASK_dbu_UNMASK 0 - - -/**************************************************************************** - * GISB_ARBITER :: TIMER - ***************************************************************************/ -/* GISB_ARBITER :: TIMER :: hi_count [31:16] */ -#define GISB_ARBITER_TIMER_hi_count_MASK 0xffff0000 -#define GISB_ARBITER_TIMER_hi_count_ALIGN 0 -#define GISB_ARBITER_TIMER_hi_count_BITS 16 -#define GISB_ARBITER_TIMER_hi_count_SHIFT 16 - -/* GISB_ARBITER :: TIMER :: lo_count [15:00] */ -#define GISB_ARBITER_TIMER_lo_count_MASK 0x0000ffff -#define GISB_ARBITER_TIMER_lo_count_ALIGN 0 -#define GISB_ARBITER_TIMER_lo_count_BITS 16 -#define GISB_ARBITER_TIMER_lo_count_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: BP_CTRL - ***************************************************************************/ -/* GISB_ARBITER :: BP_CTRL :: reserved0 [31:02] */ -#define GISB_ARBITER_BP_CTRL_reserved0_MASK 0xfffffffc -#define GISB_ARBITER_BP_CTRL_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_CTRL_reserved0_BITS 30 -#define GISB_ARBITER_BP_CTRL_reserved0_SHIFT 2 - -/* GISB_ARBITER :: BP_CTRL :: breakpoint_tea [01:01] */ -#define GISB_ARBITER_BP_CTRL_breakpoint_tea_MASK 0x00000002 -#define GISB_ARBITER_BP_CTRL_breakpoint_tea_ALIGN 0 -#define GISB_ARBITER_BP_CTRL_breakpoint_tea_BITS 1 -#define GISB_ARBITER_BP_CTRL_breakpoint_tea_SHIFT 1 -#define GISB_ARBITER_BP_CTRL_breakpoint_tea_DISABLE 0 -#define GISB_ARBITER_BP_CTRL_breakpoint_tea_ENABLE 1 - -/* GISB_ARBITER :: BP_CTRL :: repeat_capture [00:00] */ -#define GISB_ARBITER_BP_CTRL_repeat_capture_MASK 0x00000001 -#define GISB_ARBITER_BP_CTRL_repeat_capture_ALIGN 0 -#define GISB_ARBITER_BP_CTRL_repeat_capture_BITS 1 -#define GISB_ARBITER_BP_CTRL_repeat_capture_SHIFT 0 -#define GISB_ARBITER_BP_CTRL_repeat_capture_DISABLE 0 -#define GISB_ARBITER_BP_CTRL_repeat_capture_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_CAP_CLR - ***************************************************************************/ -/* GISB_ARBITER :: BP_CAP_CLR :: reserved0 [31:01] */ -#define GISB_ARBITER_BP_CAP_CLR_reserved0_MASK 0xfffffffe -#define GISB_ARBITER_BP_CAP_CLR_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_CAP_CLR_reserved0_BITS 31 -#define GISB_ARBITER_BP_CAP_CLR_reserved0_SHIFT 1 - -/* GISB_ARBITER :: BP_CAP_CLR :: clear [00:00] */ -#define GISB_ARBITER_BP_CAP_CLR_clear_MASK 0x00000001 -#define GISB_ARBITER_BP_CAP_CLR_clear_ALIGN 0 -#define GISB_ARBITER_BP_CAP_CLR_clear_BITS 1 -#define GISB_ARBITER_BP_CAP_CLR_clear_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: BP_START_ADDR_0 - ***************************************************************************/ -/* GISB_ARBITER :: BP_START_ADDR_0 :: start [31:00] */ -#define GISB_ARBITER_BP_START_ADDR_0_start_MASK 0xffffffff -#define GISB_ARBITER_BP_START_ADDR_0_start_ALIGN 0 -#define GISB_ARBITER_BP_START_ADDR_0_start_BITS 32 -#define GISB_ARBITER_BP_START_ADDR_0_start_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: BP_END_ADDR_0 - ***************************************************************************/ -/* GISB_ARBITER :: BP_END_ADDR_0 :: end [31:00] */ -#define GISB_ARBITER_BP_END_ADDR_0_end_MASK 0xffffffff -#define GISB_ARBITER_BP_END_ADDR_0_end_ALIGN 0 -#define GISB_ARBITER_BP_END_ADDR_0_end_BITS 32 -#define GISB_ARBITER_BP_END_ADDR_0_end_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: BP_READ_0 - ***************************************************************************/ -/* GISB_ARBITER :: BP_READ_0 :: reserved0 [31:06] */ -#define GISB_ARBITER_BP_READ_0_reserved0_MASK 0xffffffc0 -#define GISB_ARBITER_BP_READ_0_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_READ_0_reserved0_BITS 26 -#define GISB_ARBITER_BP_READ_0_reserved0_SHIFT 6 - -/* GISB_ARBITER :: BP_READ_0 :: bsp [05:05] */ -#define GISB_ARBITER_BP_READ_0_bsp_MASK 0x00000020 -#define GISB_ARBITER_BP_READ_0_bsp_ALIGN 0 -#define GISB_ARBITER_BP_READ_0_bsp_BITS 1 -#define GISB_ARBITER_BP_READ_0_bsp_SHIFT 5 -#define GISB_ARBITER_BP_READ_0_bsp_DISABLE 0 -#define GISB_ARBITER_BP_READ_0_bsp_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_0 :: aes [04:04] */ -#define GISB_ARBITER_BP_READ_0_aes_MASK 0x00000010 -#define GISB_ARBITER_BP_READ_0_aes_ALIGN 0 -#define GISB_ARBITER_BP_READ_0_aes_BITS 1 -#define GISB_ARBITER_BP_READ_0_aes_SHIFT 4 -#define GISB_ARBITER_BP_READ_0_aes_DISABLE 0 -#define GISB_ARBITER_BP_READ_0_aes_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_0 :: fve [03:03] */ -#define GISB_ARBITER_BP_READ_0_fve_MASK 0x00000008 -#define GISB_ARBITER_BP_READ_0_fve_ALIGN 0 -#define GISB_ARBITER_BP_READ_0_fve_BITS 1 -#define GISB_ARBITER_BP_READ_0_fve_SHIFT 3 -#define GISB_ARBITER_BP_READ_0_fve_DISABLE 0 -#define GISB_ARBITER_BP_READ_0_fve_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_0 :: tgt [02:02] */ -#define GISB_ARBITER_BP_READ_0_tgt_MASK 0x00000004 -#define GISB_ARBITER_BP_READ_0_tgt_ALIGN 0 -#define GISB_ARBITER_BP_READ_0_tgt_BITS 1 -#define GISB_ARBITER_BP_READ_0_tgt_SHIFT 2 -#define GISB_ARBITER_BP_READ_0_tgt_DISABLE 0 -#define GISB_ARBITER_BP_READ_0_tgt_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_0 :: dbu [01:01] */ -#define GISB_ARBITER_BP_READ_0_dbu_MASK 0x00000002 -#define GISB_ARBITER_BP_READ_0_dbu_ALIGN 0 -#define GISB_ARBITER_BP_READ_0_dbu_BITS 1 -#define GISB_ARBITER_BP_READ_0_dbu_SHIFT 1 -#define GISB_ARBITER_BP_READ_0_dbu_DISABLE 0 -#define GISB_ARBITER_BP_READ_0_dbu_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_0 :: cce [00:00] */ -#define GISB_ARBITER_BP_READ_0_cce_MASK 0x00000001 -#define GISB_ARBITER_BP_READ_0_cce_ALIGN 0 -#define GISB_ARBITER_BP_READ_0_cce_BITS 1 -#define GISB_ARBITER_BP_READ_0_cce_SHIFT 0 -#define GISB_ARBITER_BP_READ_0_cce_DISABLE 0 -#define GISB_ARBITER_BP_READ_0_cce_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_WRITE_0 - ***************************************************************************/ -/* GISB_ARBITER :: BP_WRITE_0 :: reserved0 [31:06] */ -#define GISB_ARBITER_BP_WRITE_0_reserved0_MASK 0xffffffc0 -#define GISB_ARBITER_BP_WRITE_0_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_0_reserved0_BITS 26 -#define GISB_ARBITER_BP_WRITE_0_reserved0_SHIFT 6 - -/* GISB_ARBITER :: BP_WRITE_0 :: bsp [05:05] */ -#define GISB_ARBITER_BP_WRITE_0_bsp_MASK 0x00000020 -#define GISB_ARBITER_BP_WRITE_0_bsp_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_0_bsp_BITS 1 -#define GISB_ARBITER_BP_WRITE_0_bsp_SHIFT 5 -#define GISB_ARBITER_BP_WRITE_0_bsp_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_0_bsp_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_0 :: aes [04:04] */ -#define GISB_ARBITER_BP_WRITE_0_aes_MASK 0x00000010 -#define GISB_ARBITER_BP_WRITE_0_aes_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_0_aes_BITS 1 -#define GISB_ARBITER_BP_WRITE_0_aes_SHIFT 4 -#define GISB_ARBITER_BP_WRITE_0_aes_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_0_aes_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_0 :: fve [03:03] */ -#define GISB_ARBITER_BP_WRITE_0_fve_MASK 0x00000008 -#define GISB_ARBITER_BP_WRITE_0_fve_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_0_fve_BITS 1 -#define GISB_ARBITER_BP_WRITE_0_fve_SHIFT 3 -#define GISB_ARBITER_BP_WRITE_0_fve_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_0_fve_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_0 :: tgt [02:02] */ -#define GISB_ARBITER_BP_WRITE_0_tgt_MASK 0x00000004 -#define GISB_ARBITER_BP_WRITE_0_tgt_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_0_tgt_BITS 1 -#define GISB_ARBITER_BP_WRITE_0_tgt_SHIFT 2 -#define GISB_ARBITER_BP_WRITE_0_tgt_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_0_tgt_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_0 :: dbu [01:01] */ -#define GISB_ARBITER_BP_WRITE_0_dbu_MASK 0x00000002 -#define GISB_ARBITER_BP_WRITE_0_dbu_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_0_dbu_BITS 1 -#define GISB_ARBITER_BP_WRITE_0_dbu_SHIFT 1 -#define GISB_ARBITER_BP_WRITE_0_dbu_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_0_dbu_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_0 :: cce [00:00] */ -#define GISB_ARBITER_BP_WRITE_0_cce_MASK 0x00000001 -#define GISB_ARBITER_BP_WRITE_0_cce_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_0_cce_BITS 1 -#define GISB_ARBITER_BP_WRITE_0_cce_SHIFT 0 -#define GISB_ARBITER_BP_WRITE_0_cce_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_0_cce_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_ENABLE_0 - ***************************************************************************/ -/* GISB_ARBITER :: BP_ENABLE_0 :: reserved0 [31:03] */ -#define GISB_ARBITER_BP_ENABLE_0_reserved0_MASK 0xfffffff8 -#define GISB_ARBITER_BP_ENABLE_0_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_0_reserved0_BITS 29 -#define GISB_ARBITER_BP_ENABLE_0_reserved0_SHIFT 3 - -/* GISB_ARBITER :: BP_ENABLE_0 :: block [02:02] */ -#define GISB_ARBITER_BP_ENABLE_0_block_MASK 0x00000004 -#define GISB_ARBITER_BP_ENABLE_0_block_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_0_block_BITS 1 -#define GISB_ARBITER_BP_ENABLE_0_block_SHIFT 2 -#define GISB_ARBITER_BP_ENABLE_0_block_DISABLE 0 -#define GISB_ARBITER_BP_ENABLE_0_block_ENABLE 1 - -/* GISB_ARBITER :: BP_ENABLE_0 :: address [01:01] */ -#define GISB_ARBITER_BP_ENABLE_0_address_MASK 0x00000002 -#define GISB_ARBITER_BP_ENABLE_0_address_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_0_address_BITS 1 -#define GISB_ARBITER_BP_ENABLE_0_address_SHIFT 1 -#define GISB_ARBITER_BP_ENABLE_0_address_DISABLE 0 -#define GISB_ARBITER_BP_ENABLE_0_address_ENABLE 1 - -/* GISB_ARBITER :: BP_ENABLE_0 :: access [00:00] */ -#define GISB_ARBITER_BP_ENABLE_0_access_MASK 0x00000001 -#define GISB_ARBITER_BP_ENABLE_0_access_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_0_access_BITS 1 -#define GISB_ARBITER_BP_ENABLE_0_access_SHIFT 0 -#define GISB_ARBITER_BP_ENABLE_0_access_DISABLE 0 -#define GISB_ARBITER_BP_ENABLE_0_access_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_START_ADDR_1 - ***************************************************************************/ -/* GISB_ARBITER :: BP_START_ADDR_1 :: start [31:00] */ -#define GISB_ARBITER_BP_START_ADDR_1_start_MASK 0xffffffff -#define GISB_ARBITER_BP_START_ADDR_1_start_ALIGN 0 -#define GISB_ARBITER_BP_START_ADDR_1_start_BITS 32 -#define GISB_ARBITER_BP_START_ADDR_1_start_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: BP_END_ADDR_1 - ***************************************************************************/ -/* GISB_ARBITER :: BP_END_ADDR_1 :: end [31:00] */ -#define GISB_ARBITER_BP_END_ADDR_1_end_MASK 0xffffffff -#define GISB_ARBITER_BP_END_ADDR_1_end_ALIGN 0 -#define GISB_ARBITER_BP_END_ADDR_1_end_BITS 32 -#define GISB_ARBITER_BP_END_ADDR_1_end_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: BP_READ_1 - ***************************************************************************/ -/* GISB_ARBITER :: BP_READ_1 :: reserved0 [31:06] */ -#define GISB_ARBITER_BP_READ_1_reserved0_MASK 0xffffffc0 -#define GISB_ARBITER_BP_READ_1_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_READ_1_reserved0_BITS 26 -#define GISB_ARBITER_BP_READ_1_reserved0_SHIFT 6 - -/* GISB_ARBITER :: BP_READ_1 :: bsp [05:05] */ -#define GISB_ARBITER_BP_READ_1_bsp_MASK 0x00000020 -#define GISB_ARBITER_BP_READ_1_bsp_ALIGN 0 -#define GISB_ARBITER_BP_READ_1_bsp_BITS 1 -#define GISB_ARBITER_BP_READ_1_bsp_SHIFT 5 -#define GISB_ARBITER_BP_READ_1_bsp_DISABLE 0 -#define GISB_ARBITER_BP_READ_1_bsp_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_1 :: aes [04:04] */ -#define GISB_ARBITER_BP_READ_1_aes_MASK 0x00000010 -#define GISB_ARBITER_BP_READ_1_aes_ALIGN 0 -#define GISB_ARBITER_BP_READ_1_aes_BITS 1 -#define GISB_ARBITER_BP_READ_1_aes_SHIFT 4 -#define GISB_ARBITER_BP_READ_1_aes_DISABLE 0 -#define GISB_ARBITER_BP_READ_1_aes_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_1 :: fve [03:03] */ -#define GISB_ARBITER_BP_READ_1_fve_MASK 0x00000008 -#define GISB_ARBITER_BP_READ_1_fve_ALIGN 0 -#define GISB_ARBITER_BP_READ_1_fve_BITS 1 -#define GISB_ARBITER_BP_READ_1_fve_SHIFT 3 -#define GISB_ARBITER_BP_READ_1_fve_DISABLE 0 -#define GISB_ARBITER_BP_READ_1_fve_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_1 :: tgt [02:02] */ -#define GISB_ARBITER_BP_READ_1_tgt_MASK 0x00000004 -#define GISB_ARBITER_BP_READ_1_tgt_ALIGN 0 -#define GISB_ARBITER_BP_READ_1_tgt_BITS 1 -#define GISB_ARBITER_BP_READ_1_tgt_SHIFT 2 -#define GISB_ARBITER_BP_READ_1_tgt_DISABLE 0 -#define GISB_ARBITER_BP_READ_1_tgt_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_1 :: dbu [01:01] */ -#define GISB_ARBITER_BP_READ_1_dbu_MASK 0x00000002 -#define GISB_ARBITER_BP_READ_1_dbu_ALIGN 0 -#define GISB_ARBITER_BP_READ_1_dbu_BITS 1 -#define GISB_ARBITER_BP_READ_1_dbu_SHIFT 1 -#define GISB_ARBITER_BP_READ_1_dbu_DISABLE 0 -#define GISB_ARBITER_BP_READ_1_dbu_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_1 :: cce [00:00] */ -#define GISB_ARBITER_BP_READ_1_cce_MASK 0x00000001 -#define GISB_ARBITER_BP_READ_1_cce_ALIGN 0 -#define GISB_ARBITER_BP_READ_1_cce_BITS 1 -#define GISB_ARBITER_BP_READ_1_cce_SHIFT 0 -#define GISB_ARBITER_BP_READ_1_cce_DISABLE 0 -#define GISB_ARBITER_BP_READ_1_cce_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_WRITE_1 - ***************************************************************************/ -/* GISB_ARBITER :: BP_WRITE_1 :: reserved0 [31:06] */ -#define GISB_ARBITER_BP_WRITE_1_reserved0_MASK 0xffffffc0 -#define GISB_ARBITER_BP_WRITE_1_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_1_reserved0_BITS 26 -#define GISB_ARBITER_BP_WRITE_1_reserved0_SHIFT 6 - -/* GISB_ARBITER :: BP_WRITE_1 :: bsp [05:05] */ -#define GISB_ARBITER_BP_WRITE_1_bsp_MASK 0x00000020 -#define GISB_ARBITER_BP_WRITE_1_bsp_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_1_bsp_BITS 1 -#define GISB_ARBITER_BP_WRITE_1_bsp_SHIFT 5 -#define GISB_ARBITER_BP_WRITE_1_bsp_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_1_bsp_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_1 :: aes [04:04] */ -#define GISB_ARBITER_BP_WRITE_1_aes_MASK 0x00000010 -#define GISB_ARBITER_BP_WRITE_1_aes_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_1_aes_BITS 1 -#define GISB_ARBITER_BP_WRITE_1_aes_SHIFT 4 -#define GISB_ARBITER_BP_WRITE_1_aes_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_1_aes_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_1 :: fve [03:03] */ -#define GISB_ARBITER_BP_WRITE_1_fve_MASK 0x00000008 -#define GISB_ARBITER_BP_WRITE_1_fve_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_1_fve_BITS 1 -#define GISB_ARBITER_BP_WRITE_1_fve_SHIFT 3 -#define GISB_ARBITER_BP_WRITE_1_fve_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_1_fve_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_1 :: tgt [02:02] */ -#define GISB_ARBITER_BP_WRITE_1_tgt_MASK 0x00000004 -#define GISB_ARBITER_BP_WRITE_1_tgt_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_1_tgt_BITS 1 -#define GISB_ARBITER_BP_WRITE_1_tgt_SHIFT 2 -#define GISB_ARBITER_BP_WRITE_1_tgt_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_1_tgt_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_1 :: dbu [01:01] */ -#define GISB_ARBITER_BP_WRITE_1_dbu_MASK 0x00000002 -#define GISB_ARBITER_BP_WRITE_1_dbu_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_1_dbu_BITS 1 -#define GISB_ARBITER_BP_WRITE_1_dbu_SHIFT 1 -#define GISB_ARBITER_BP_WRITE_1_dbu_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_1_dbu_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_1 :: cce [00:00] */ -#define GISB_ARBITER_BP_WRITE_1_cce_MASK 0x00000001 -#define GISB_ARBITER_BP_WRITE_1_cce_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_1_cce_BITS 1 -#define GISB_ARBITER_BP_WRITE_1_cce_SHIFT 0 -#define GISB_ARBITER_BP_WRITE_1_cce_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_1_cce_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_ENABLE_1 - ***************************************************************************/ -/* GISB_ARBITER :: BP_ENABLE_1 :: reserved0 [31:03] */ -#define GISB_ARBITER_BP_ENABLE_1_reserved0_MASK 0xfffffff8 -#define GISB_ARBITER_BP_ENABLE_1_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_1_reserved0_BITS 29 -#define GISB_ARBITER_BP_ENABLE_1_reserved0_SHIFT 3 - -/* GISB_ARBITER :: BP_ENABLE_1 :: block [02:02] */ -#define GISB_ARBITER_BP_ENABLE_1_block_MASK 0x00000004 -#define GISB_ARBITER_BP_ENABLE_1_block_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_1_block_BITS 1 -#define GISB_ARBITER_BP_ENABLE_1_block_SHIFT 2 -#define GISB_ARBITER_BP_ENABLE_1_block_DISABLE 0 -#define GISB_ARBITER_BP_ENABLE_1_block_ENABLE 1 - -/* GISB_ARBITER :: BP_ENABLE_1 :: address [01:01] */ -#define GISB_ARBITER_BP_ENABLE_1_address_MASK 0x00000002 -#define GISB_ARBITER_BP_ENABLE_1_address_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_1_address_BITS 1 -#define GISB_ARBITER_BP_ENABLE_1_address_SHIFT 1 -#define GISB_ARBITER_BP_ENABLE_1_address_DISABLE 0 -#define GISB_ARBITER_BP_ENABLE_1_address_ENABLE 1 - -/* GISB_ARBITER :: BP_ENABLE_1 :: access [00:00] */ -#define GISB_ARBITER_BP_ENABLE_1_access_MASK 0x00000001 -#define GISB_ARBITER_BP_ENABLE_1_access_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_1_access_BITS 1 -#define GISB_ARBITER_BP_ENABLE_1_access_SHIFT 0 -#define GISB_ARBITER_BP_ENABLE_1_access_DISABLE 0 -#define GISB_ARBITER_BP_ENABLE_1_access_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_START_ADDR_2 - ***************************************************************************/ -/* GISB_ARBITER :: BP_START_ADDR_2 :: start [31:00] */ -#define GISB_ARBITER_BP_START_ADDR_2_start_MASK 0xffffffff -#define GISB_ARBITER_BP_START_ADDR_2_start_ALIGN 0 -#define GISB_ARBITER_BP_START_ADDR_2_start_BITS 32 -#define GISB_ARBITER_BP_START_ADDR_2_start_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: BP_END_ADDR_2 - ***************************************************************************/ -/* GISB_ARBITER :: BP_END_ADDR_2 :: end [31:00] */ -#define GISB_ARBITER_BP_END_ADDR_2_end_MASK 0xffffffff -#define GISB_ARBITER_BP_END_ADDR_2_end_ALIGN 0 -#define GISB_ARBITER_BP_END_ADDR_2_end_BITS 32 -#define GISB_ARBITER_BP_END_ADDR_2_end_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: BP_READ_2 - ***************************************************************************/ -/* GISB_ARBITER :: BP_READ_2 :: reserved0 [31:06] */ -#define GISB_ARBITER_BP_READ_2_reserved0_MASK 0xffffffc0 -#define GISB_ARBITER_BP_READ_2_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_READ_2_reserved0_BITS 26 -#define GISB_ARBITER_BP_READ_2_reserved0_SHIFT 6 - -/* GISB_ARBITER :: BP_READ_2 :: bsp [05:05] */ -#define GISB_ARBITER_BP_READ_2_bsp_MASK 0x00000020 -#define GISB_ARBITER_BP_READ_2_bsp_ALIGN 0 -#define GISB_ARBITER_BP_READ_2_bsp_BITS 1 -#define GISB_ARBITER_BP_READ_2_bsp_SHIFT 5 -#define GISB_ARBITER_BP_READ_2_bsp_DISABLE 0 -#define GISB_ARBITER_BP_READ_2_bsp_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_2 :: aes [04:04] */ -#define GISB_ARBITER_BP_READ_2_aes_MASK 0x00000010 -#define GISB_ARBITER_BP_READ_2_aes_ALIGN 0 -#define GISB_ARBITER_BP_READ_2_aes_BITS 1 -#define GISB_ARBITER_BP_READ_2_aes_SHIFT 4 -#define GISB_ARBITER_BP_READ_2_aes_DISABLE 0 -#define GISB_ARBITER_BP_READ_2_aes_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_2 :: fve [03:03] */ -#define GISB_ARBITER_BP_READ_2_fve_MASK 0x00000008 -#define GISB_ARBITER_BP_READ_2_fve_ALIGN 0 -#define GISB_ARBITER_BP_READ_2_fve_BITS 1 -#define GISB_ARBITER_BP_READ_2_fve_SHIFT 3 -#define GISB_ARBITER_BP_READ_2_fve_DISABLE 0 -#define GISB_ARBITER_BP_READ_2_fve_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_2 :: tgt [02:02] */ -#define GISB_ARBITER_BP_READ_2_tgt_MASK 0x00000004 -#define GISB_ARBITER_BP_READ_2_tgt_ALIGN 0 -#define GISB_ARBITER_BP_READ_2_tgt_BITS 1 -#define GISB_ARBITER_BP_READ_2_tgt_SHIFT 2 -#define GISB_ARBITER_BP_READ_2_tgt_DISABLE 0 -#define GISB_ARBITER_BP_READ_2_tgt_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_2 :: dbu [01:01] */ -#define GISB_ARBITER_BP_READ_2_dbu_MASK 0x00000002 -#define GISB_ARBITER_BP_READ_2_dbu_ALIGN 0 -#define GISB_ARBITER_BP_READ_2_dbu_BITS 1 -#define GISB_ARBITER_BP_READ_2_dbu_SHIFT 1 -#define GISB_ARBITER_BP_READ_2_dbu_DISABLE 0 -#define GISB_ARBITER_BP_READ_2_dbu_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_2 :: cce [00:00] */ -#define GISB_ARBITER_BP_READ_2_cce_MASK 0x00000001 -#define GISB_ARBITER_BP_READ_2_cce_ALIGN 0 -#define GISB_ARBITER_BP_READ_2_cce_BITS 1 -#define GISB_ARBITER_BP_READ_2_cce_SHIFT 0 -#define GISB_ARBITER_BP_READ_2_cce_DISABLE 0 -#define GISB_ARBITER_BP_READ_2_cce_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_WRITE_2 - ***************************************************************************/ -/* GISB_ARBITER :: BP_WRITE_2 :: reserved0 [31:06] */ -#define GISB_ARBITER_BP_WRITE_2_reserved0_MASK 0xffffffc0 -#define GISB_ARBITER_BP_WRITE_2_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_2_reserved0_BITS 26 -#define GISB_ARBITER_BP_WRITE_2_reserved0_SHIFT 6 - -/* GISB_ARBITER :: BP_WRITE_2 :: bsp [05:05] */ -#define GISB_ARBITER_BP_WRITE_2_bsp_MASK 0x00000020 -#define GISB_ARBITER_BP_WRITE_2_bsp_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_2_bsp_BITS 1 -#define GISB_ARBITER_BP_WRITE_2_bsp_SHIFT 5 -#define GISB_ARBITER_BP_WRITE_2_bsp_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_2_bsp_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_2 :: aes [04:04] */ -#define GISB_ARBITER_BP_WRITE_2_aes_MASK 0x00000010 -#define GISB_ARBITER_BP_WRITE_2_aes_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_2_aes_BITS 1 -#define GISB_ARBITER_BP_WRITE_2_aes_SHIFT 4 -#define GISB_ARBITER_BP_WRITE_2_aes_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_2_aes_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_2 :: fve [03:03] */ -#define GISB_ARBITER_BP_WRITE_2_fve_MASK 0x00000008 -#define GISB_ARBITER_BP_WRITE_2_fve_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_2_fve_BITS 1 -#define GISB_ARBITER_BP_WRITE_2_fve_SHIFT 3 -#define GISB_ARBITER_BP_WRITE_2_fve_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_2_fve_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_2 :: tgt [02:02] */ -#define GISB_ARBITER_BP_WRITE_2_tgt_MASK 0x00000004 -#define GISB_ARBITER_BP_WRITE_2_tgt_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_2_tgt_BITS 1 -#define GISB_ARBITER_BP_WRITE_2_tgt_SHIFT 2 -#define GISB_ARBITER_BP_WRITE_2_tgt_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_2_tgt_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_2 :: dbu [01:01] */ -#define GISB_ARBITER_BP_WRITE_2_dbu_MASK 0x00000002 -#define GISB_ARBITER_BP_WRITE_2_dbu_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_2_dbu_BITS 1 -#define GISB_ARBITER_BP_WRITE_2_dbu_SHIFT 1 -#define GISB_ARBITER_BP_WRITE_2_dbu_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_2_dbu_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_2 :: cce [00:00] */ -#define GISB_ARBITER_BP_WRITE_2_cce_MASK 0x00000001 -#define GISB_ARBITER_BP_WRITE_2_cce_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_2_cce_BITS 1 -#define GISB_ARBITER_BP_WRITE_2_cce_SHIFT 0 -#define GISB_ARBITER_BP_WRITE_2_cce_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_2_cce_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_ENABLE_2 - ***************************************************************************/ -/* GISB_ARBITER :: BP_ENABLE_2 :: reserved0 [31:03] */ -#define GISB_ARBITER_BP_ENABLE_2_reserved0_MASK 0xfffffff8 -#define GISB_ARBITER_BP_ENABLE_2_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_2_reserved0_BITS 29 -#define GISB_ARBITER_BP_ENABLE_2_reserved0_SHIFT 3 - -/* GISB_ARBITER :: BP_ENABLE_2 :: block [02:02] */ -#define GISB_ARBITER_BP_ENABLE_2_block_MASK 0x00000004 -#define GISB_ARBITER_BP_ENABLE_2_block_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_2_block_BITS 1 -#define GISB_ARBITER_BP_ENABLE_2_block_SHIFT 2 -#define GISB_ARBITER_BP_ENABLE_2_block_DISABLE 0 -#define GISB_ARBITER_BP_ENABLE_2_block_ENABLE 1 - -/* GISB_ARBITER :: BP_ENABLE_2 :: address [01:01] */ -#define GISB_ARBITER_BP_ENABLE_2_address_MASK 0x00000002 -#define GISB_ARBITER_BP_ENABLE_2_address_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_2_address_BITS 1 -#define GISB_ARBITER_BP_ENABLE_2_address_SHIFT 1 -#define GISB_ARBITER_BP_ENABLE_2_address_DISABLE 0 -#define GISB_ARBITER_BP_ENABLE_2_address_ENABLE 1 - -/* GISB_ARBITER :: BP_ENABLE_2 :: access [00:00] */ -#define GISB_ARBITER_BP_ENABLE_2_access_MASK 0x00000001 -#define GISB_ARBITER_BP_ENABLE_2_access_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_2_access_BITS 1 -#define GISB_ARBITER_BP_ENABLE_2_access_SHIFT 0 -#define GISB_ARBITER_BP_ENABLE_2_access_DISABLE 0 -#define GISB_ARBITER_BP_ENABLE_2_access_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_START_ADDR_3 - ***************************************************************************/ -/* GISB_ARBITER :: BP_START_ADDR_3 :: start [31:00] */ -#define GISB_ARBITER_BP_START_ADDR_3_start_MASK 0xffffffff -#define GISB_ARBITER_BP_START_ADDR_3_start_ALIGN 0 -#define GISB_ARBITER_BP_START_ADDR_3_start_BITS 32 -#define GISB_ARBITER_BP_START_ADDR_3_start_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: BP_END_ADDR_3 - ***************************************************************************/ -/* GISB_ARBITER :: BP_END_ADDR_3 :: end [31:00] */ -#define GISB_ARBITER_BP_END_ADDR_3_end_MASK 0xffffffff -#define GISB_ARBITER_BP_END_ADDR_3_end_ALIGN 0 -#define GISB_ARBITER_BP_END_ADDR_3_end_BITS 32 -#define GISB_ARBITER_BP_END_ADDR_3_end_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: BP_READ_3 - ***************************************************************************/ -/* GISB_ARBITER :: BP_READ_3 :: reserved0 [31:06] */ -#define GISB_ARBITER_BP_READ_3_reserved0_MASK 0xffffffc0 -#define GISB_ARBITER_BP_READ_3_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_READ_3_reserved0_BITS 26 -#define GISB_ARBITER_BP_READ_3_reserved0_SHIFT 6 - -/* GISB_ARBITER :: BP_READ_3 :: bsp [05:05] */ -#define GISB_ARBITER_BP_READ_3_bsp_MASK 0x00000020 -#define GISB_ARBITER_BP_READ_3_bsp_ALIGN 0 -#define GISB_ARBITER_BP_READ_3_bsp_BITS 1 -#define GISB_ARBITER_BP_READ_3_bsp_SHIFT 5 -#define GISB_ARBITER_BP_READ_3_bsp_DISABLE 0 -#define GISB_ARBITER_BP_READ_3_bsp_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_3 :: aes [04:04] */ -#define GISB_ARBITER_BP_READ_3_aes_MASK 0x00000010 -#define GISB_ARBITER_BP_READ_3_aes_ALIGN 0 -#define GISB_ARBITER_BP_READ_3_aes_BITS 1 -#define GISB_ARBITER_BP_READ_3_aes_SHIFT 4 -#define GISB_ARBITER_BP_READ_3_aes_DISABLE 0 -#define GISB_ARBITER_BP_READ_3_aes_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_3 :: fve [03:03] */ -#define GISB_ARBITER_BP_READ_3_fve_MASK 0x00000008 -#define GISB_ARBITER_BP_READ_3_fve_ALIGN 0 -#define GISB_ARBITER_BP_READ_3_fve_BITS 1 -#define GISB_ARBITER_BP_READ_3_fve_SHIFT 3 -#define GISB_ARBITER_BP_READ_3_fve_DISABLE 0 -#define GISB_ARBITER_BP_READ_3_fve_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_3 :: tgt [02:02] */ -#define GISB_ARBITER_BP_READ_3_tgt_MASK 0x00000004 -#define GISB_ARBITER_BP_READ_3_tgt_ALIGN 0 -#define GISB_ARBITER_BP_READ_3_tgt_BITS 1 -#define GISB_ARBITER_BP_READ_3_tgt_SHIFT 2 -#define GISB_ARBITER_BP_READ_3_tgt_DISABLE 0 -#define GISB_ARBITER_BP_READ_3_tgt_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_3 :: dbu [01:01] */ -#define GISB_ARBITER_BP_READ_3_dbu_MASK 0x00000002 -#define GISB_ARBITER_BP_READ_3_dbu_ALIGN 0 -#define GISB_ARBITER_BP_READ_3_dbu_BITS 1 -#define GISB_ARBITER_BP_READ_3_dbu_SHIFT 1 -#define GISB_ARBITER_BP_READ_3_dbu_DISABLE 0 -#define GISB_ARBITER_BP_READ_3_dbu_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_3 :: cce [00:00] */ -#define GISB_ARBITER_BP_READ_3_cce_MASK 0x00000001 -#define GISB_ARBITER_BP_READ_3_cce_ALIGN 0 -#define GISB_ARBITER_BP_READ_3_cce_BITS 1 -#define GISB_ARBITER_BP_READ_3_cce_SHIFT 0 -#define GISB_ARBITER_BP_READ_3_cce_DISABLE 0 -#define GISB_ARBITER_BP_READ_3_cce_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_WRITE_3 - ***************************************************************************/ -/* GISB_ARBITER :: BP_WRITE_3 :: reserved0 [31:06] */ -#define GISB_ARBITER_BP_WRITE_3_reserved0_MASK 0xffffffc0 -#define GISB_ARBITER_BP_WRITE_3_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_3_reserved0_BITS 26 -#define GISB_ARBITER_BP_WRITE_3_reserved0_SHIFT 6 - -/* GISB_ARBITER :: BP_WRITE_3 :: bsp [05:05] */ -#define GISB_ARBITER_BP_WRITE_3_bsp_MASK 0x00000020 -#define GISB_ARBITER_BP_WRITE_3_bsp_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_3_bsp_BITS 1 -#define GISB_ARBITER_BP_WRITE_3_bsp_SHIFT 5 -#define GISB_ARBITER_BP_WRITE_3_bsp_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_3_bsp_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_3 :: aes [04:04] */ -#define GISB_ARBITER_BP_WRITE_3_aes_MASK 0x00000010 -#define GISB_ARBITER_BP_WRITE_3_aes_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_3_aes_BITS 1 -#define GISB_ARBITER_BP_WRITE_3_aes_SHIFT 4 -#define GISB_ARBITER_BP_WRITE_3_aes_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_3_aes_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_3 :: fve [03:03] */ -#define GISB_ARBITER_BP_WRITE_3_fve_MASK 0x00000008 -#define GISB_ARBITER_BP_WRITE_3_fve_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_3_fve_BITS 1 -#define GISB_ARBITER_BP_WRITE_3_fve_SHIFT 3 -#define GISB_ARBITER_BP_WRITE_3_fve_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_3_fve_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_3 :: tgt [02:02] */ -#define GISB_ARBITER_BP_WRITE_3_tgt_MASK 0x00000004 -#define GISB_ARBITER_BP_WRITE_3_tgt_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_3_tgt_BITS 1 -#define GISB_ARBITER_BP_WRITE_3_tgt_SHIFT 2 -#define GISB_ARBITER_BP_WRITE_3_tgt_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_3_tgt_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_3 :: dbu [01:01] */ -#define GISB_ARBITER_BP_WRITE_3_dbu_MASK 0x00000002 -#define GISB_ARBITER_BP_WRITE_3_dbu_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_3_dbu_BITS 1 -#define GISB_ARBITER_BP_WRITE_3_dbu_SHIFT 1 -#define GISB_ARBITER_BP_WRITE_3_dbu_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_3_dbu_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_3 :: cce [00:00] */ -#define GISB_ARBITER_BP_WRITE_3_cce_MASK 0x00000001 -#define GISB_ARBITER_BP_WRITE_3_cce_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_3_cce_BITS 1 -#define GISB_ARBITER_BP_WRITE_3_cce_SHIFT 0 -#define GISB_ARBITER_BP_WRITE_3_cce_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_3_cce_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_ENABLE_3 - ***************************************************************************/ -/* GISB_ARBITER :: BP_ENABLE_3 :: reserved0 [31:03] */ -#define GISB_ARBITER_BP_ENABLE_3_reserved0_MASK 0xfffffff8 -#define GISB_ARBITER_BP_ENABLE_3_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_3_reserved0_BITS 29 -#define GISB_ARBITER_BP_ENABLE_3_reserved0_SHIFT 3 - -/* GISB_ARBITER :: BP_ENABLE_3 :: block [02:02] */ -#define GISB_ARBITER_BP_ENABLE_3_block_MASK 0x00000004 -#define GISB_ARBITER_BP_ENABLE_3_block_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_3_block_BITS 1 -#define GISB_ARBITER_BP_ENABLE_3_block_SHIFT 2 -#define GISB_ARBITER_BP_ENABLE_3_block_DISABLE 0 -#define GISB_ARBITER_BP_ENABLE_3_block_ENABLE 1 - -/* GISB_ARBITER :: BP_ENABLE_3 :: address [01:01] */ -#define GISB_ARBITER_BP_ENABLE_3_address_MASK 0x00000002 -#define GISB_ARBITER_BP_ENABLE_3_address_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_3_address_BITS 1 -#define GISB_ARBITER_BP_ENABLE_3_address_SHIFT 1 -#define GISB_ARBITER_BP_ENABLE_3_address_DISABLE 0 -#define GISB_ARBITER_BP_ENABLE_3_address_ENABLE 1 - -/* GISB_ARBITER :: BP_ENABLE_3 :: access [00:00] */ -#define GISB_ARBITER_BP_ENABLE_3_access_MASK 0x00000001 -#define GISB_ARBITER_BP_ENABLE_3_access_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_3_access_BITS 1 -#define GISB_ARBITER_BP_ENABLE_3_access_SHIFT 0 -#define GISB_ARBITER_BP_ENABLE_3_access_DISABLE 0 -#define GISB_ARBITER_BP_ENABLE_3_access_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_START_ADDR_4 - ***************************************************************************/ -/* GISB_ARBITER :: BP_START_ADDR_4 :: start [31:00] */ -#define GISB_ARBITER_BP_START_ADDR_4_start_MASK 0xffffffff -#define GISB_ARBITER_BP_START_ADDR_4_start_ALIGN 0 -#define GISB_ARBITER_BP_START_ADDR_4_start_BITS 32 -#define GISB_ARBITER_BP_START_ADDR_4_start_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: BP_END_ADDR_4 - ***************************************************************************/ -/* GISB_ARBITER :: BP_END_ADDR_4 :: end [31:00] */ -#define GISB_ARBITER_BP_END_ADDR_4_end_MASK 0xffffffff -#define GISB_ARBITER_BP_END_ADDR_4_end_ALIGN 0 -#define GISB_ARBITER_BP_END_ADDR_4_end_BITS 32 -#define GISB_ARBITER_BP_END_ADDR_4_end_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: BP_READ_4 - ***************************************************************************/ -/* GISB_ARBITER :: BP_READ_4 :: reserved0 [31:06] */ -#define GISB_ARBITER_BP_READ_4_reserved0_MASK 0xffffffc0 -#define GISB_ARBITER_BP_READ_4_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_READ_4_reserved0_BITS 26 -#define GISB_ARBITER_BP_READ_4_reserved0_SHIFT 6 - -/* GISB_ARBITER :: BP_READ_4 :: bsp [05:05] */ -#define GISB_ARBITER_BP_READ_4_bsp_MASK 0x00000020 -#define GISB_ARBITER_BP_READ_4_bsp_ALIGN 0 -#define GISB_ARBITER_BP_READ_4_bsp_BITS 1 -#define GISB_ARBITER_BP_READ_4_bsp_SHIFT 5 -#define GISB_ARBITER_BP_READ_4_bsp_DISABLE 0 -#define GISB_ARBITER_BP_READ_4_bsp_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_4 :: aes [04:04] */ -#define GISB_ARBITER_BP_READ_4_aes_MASK 0x00000010 -#define GISB_ARBITER_BP_READ_4_aes_ALIGN 0 -#define GISB_ARBITER_BP_READ_4_aes_BITS 1 -#define GISB_ARBITER_BP_READ_4_aes_SHIFT 4 -#define GISB_ARBITER_BP_READ_4_aes_DISABLE 0 -#define GISB_ARBITER_BP_READ_4_aes_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_4 :: fve [03:03] */ -#define GISB_ARBITER_BP_READ_4_fve_MASK 0x00000008 -#define GISB_ARBITER_BP_READ_4_fve_ALIGN 0 -#define GISB_ARBITER_BP_READ_4_fve_BITS 1 -#define GISB_ARBITER_BP_READ_4_fve_SHIFT 3 -#define GISB_ARBITER_BP_READ_4_fve_DISABLE 0 -#define GISB_ARBITER_BP_READ_4_fve_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_4 :: tgt [02:02] */ -#define GISB_ARBITER_BP_READ_4_tgt_MASK 0x00000004 -#define GISB_ARBITER_BP_READ_4_tgt_ALIGN 0 -#define GISB_ARBITER_BP_READ_4_tgt_BITS 1 -#define GISB_ARBITER_BP_READ_4_tgt_SHIFT 2 -#define GISB_ARBITER_BP_READ_4_tgt_DISABLE 0 -#define GISB_ARBITER_BP_READ_4_tgt_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_4 :: dbu [01:01] */ -#define GISB_ARBITER_BP_READ_4_dbu_MASK 0x00000002 -#define GISB_ARBITER_BP_READ_4_dbu_ALIGN 0 -#define GISB_ARBITER_BP_READ_4_dbu_BITS 1 -#define GISB_ARBITER_BP_READ_4_dbu_SHIFT 1 -#define GISB_ARBITER_BP_READ_4_dbu_DISABLE 0 -#define GISB_ARBITER_BP_READ_4_dbu_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_4 :: cce [00:00] */ -#define GISB_ARBITER_BP_READ_4_cce_MASK 0x00000001 -#define GISB_ARBITER_BP_READ_4_cce_ALIGN 0 -#define GISB_ARBITER_BP_READ_4_cce_BITS 1 -#define GISB_ARBITER_BP_READ_4_cce_SHIFT 0 -#define GISB_ARBITER_BP_READ_4_cce_DISABLE 0 -#define GISB_ARBITER_BP_READ_4_cce_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_WRITE_4 - ***************************************************************************/ -/* GISB_ARBITER :: BP_WRITE_4 :: reserved0 [31:06] */ -#define GISB_ARBITER_BP_WRITE_4_reserved0_MASK 0xffffffc0 -#define GISB_ARBITER_BP_WRITE_4_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_4_reserved0_BITS 26 -#define GISB_ARBITER_BP_WRITE_4_reserved0_SHIFT 6 - -/* GISB_ARBITER :: BP_WRITE_4 :: bsp [05:05] */ -#define GISB_ARBITER_BP_WRITE_4_bsp_MASK 0x00000020 -#define GISB_ARBITER_BP_WRITE_4_bsp_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_4_bsp_BITS 1 -#define GISB_ARBITER_BP_WRITE_4_bsp_SHIFT 5 -#define GISB_ARBITER_BP_WRITE_4_bsp_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_4_bsp_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_4 :: aes [04:04] */ -#define GISB_ARBITER_BP_WRITE_4_aes_MASK 0x00000010 -#define GISB_ARBITER_BP_WRITE_4_aes_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_4_aes_BITS 1 -#define GISB_ARBITER_BP_WRITE_4_aes_SHIFT 4 -#define GISB_ARBITER_BP_WRITE_4_aes_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_4_aes_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_4 :: fve [03:03] */ -#define GISB_ARBITER_BP_WRITE_4_fve_MASK 0x00000008 -#define GISB_ARBITER_BP_WRITE_4_fve_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_4_fve_BITS 1 -#define GISB_ARBITER_BP_WRITE_4_fve_SHIFT 3 -#define GISB_ARBITER_BP_WRITE_4_fve_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_4_fve_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_4 :: tgt [02:02] */ -#define GISB_ARBITER_BP_WRITE_4_tgt_MASK 0x00000004 -#define GISB_ARBITER_BP_WRITE_4_tgt_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_4_tgt_BITS 1 -#define GISB_ARBITER_BP_WRITE_4_tgt_SHIFT 2 -#define GISB_ARBITER_BP_WRITE_4_tgt_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_4_tgt_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_4 :: dbu [01:01] */ -#define GISB_ARBITER_BP_WRITE_4_dbu_MASK 0x00000002 -#define GISB_ARBITER_BP_WRITE_4_dbu_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_4_dbu_BITS 1 -#define GISB_ARBITER_BP_WRITE_4_dbu_SHIFT 1 -#define GISB_ARBITER_BP_WRITE_4_dbu_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_4_dbu_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_4 :: cce [00:00] */ -#define GISB_ARBITER_BP_WRITE_4_cce_MASK 0x00000001 -#define GISB_ARBITER_BP_WRITE_4_cce_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_4_cce_BITS 1 -#define GISB_ARBITER_BP_WRITE_4_cce_SHIFT 0 -#define GISB_ARBITER_BP_WRITE_4_cce_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_4_cce_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_ENABLE_4 - ***************************************************************************/ -/* GISB_ARBITER :: BP_ENABLE_4 :: reserved0 [31:03] */ -#define GISB_ARBITER_BP_ENABLE_4_reserved0_MASK 0xfffffff8 -#define GISB_ARBITER_BP_ENABLE_4_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_4_reserved0_BITS 29 -#define GISB_ARBITER_BP_ENABLE_4_reserved0_SHIFT 3 - -/* GISB_ARBITER :: BP_ENABLE_4 :: block [02:02] */ -#define GISB_ARBITER_BP_ENABLE_4_block_MASK 0x00000004 -#define GISB_ARBITER_BP_ENABLE_4_block_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_4_block_BITS 1 -#define GISB_ARBITER_BP_ENABLE_4_block_SHIFT 2 -#define GISB_ARBITER_BP_ENABLE_4_block_DISABLE 0 -#define GISB_ARBITER_BP_ENABLE_4_block_ENABLE 1 - -/* GISB_ARBITER :: BP_ENABLE_4 :: address [01:01] */ -#define GISB_ARBITER_BP_ENABLE_4_address_MASK 0x00000002 -#define GISB_ARBITER_BP_ENABLE_4_address_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_4_address_BITS 1 -#define GISB_ARBITER_BP_ENABLE_4_address_SHIFT 1 -#define GISB_ARBITER_BP_ENABLE_4_address_DISABLE 0 -#define GISB_ARBITER_BP_ENABLE_4_address_ENABLE 1 - -/* GISB_ARBITER :: BP_ENABLE_4 :: access [00:00] */ -#define GISB_ARBITER_BP_ENABLE_4_access_MASK 0x00000001 -#define GISB_ARBITER_BP_ENABLE_4_access_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_4_access_BITS 1 -#define GISB_ARBITER_BP_ENABLE_4_access_SHIFT 0 -#define GISB_ARBITER_BP_ENABLE_4_access_DISABLE 0 -#define GISB_ARBITER_BP_ENABLE_4_access_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_START_ADDR_5 - ***************************************************************************/ -/* GISB_ARBITER :: BP_START_ADDR_5 :: start [31:00] */ -#define GISB_ARBITER_BP_START_ADDR_5_start_MASK 0xffffffff -#define GISB_ARBITER_BP_START_ADDR_5_start_ALIGN 0 -#define GISB_ARBITER_BP_START_ADDR_5_start_BITS 32 -#define GISB_ARBITER_BP_START_ADDR_5_start_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: BP_END_ADDR_5 - ***************************************************************************/ -/* GISB_ARBITER :: BP_END_ADDR_5 :: end [31:00] */ -#define GISB_ARBITER_BP_END_ADDR_5_end_MASK 0xffffffff -#define GISB_ARBITER_BP_END_ADDR_5_end_ALIGN 0 -#define GISB_ARBITER_BP_END_ADDR_5_end_BITS 32 -#define GISB_ARBITER_BP_END_ADDR_5_end_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: BP_READ_5 - ***************************************************************************/ -/* GISB_ARBITER :: BP_READ_5 :: reserved0 [31:06] */ -#define GISB_ARBITER_BP_READ_5_reserved0_MASK 0xffffffc0 -#define GISB_ARBITER_BP_READ_5_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_READ_5_reserved0_BITS 26 -#define GISB_ARBITER_BP_READ_5_reserved0_SHIFT 6 - -/* GISB_ARBITER :: BP_READ_5 :: bsp [05:05] */ -#define GISB_ARBITER_BP_READ_5_bsp_MASK 0x00000020 -#define GISB_ARBITER_BP_READ_5_bsp_ALIGN 0 -#define GISB_ARBITER_BP_READ_5_bsp_BITS 1 -#define GISB_ARBITER_BP_READ_5_bsp_SHIFT 5 -#define GISB_ARBITER_BP_READ_5_bsp_DISABLE 0 -#define GISB_ARBITER_BP_READ_5_bsp_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_5 :: aes [04:04] */ -#define GISB_ARBITER_BP_READ_5_aes_MASK 0x00000010 -#define GISB_ARBITER_BP_READ_5_aes_ALIGN 0 -#define GISB_ARBITER_BP_READ_5_aes_BITS 1 -#define GISB_ARBITER_BP_READ_5_aes_SHIFT 4 -#define GISB_ARBITER_BP_READ_5_aes_DISABLE 0 -#define GISB_ARBITER_BP_READ_5_aes_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_5 :: fve [03:03] */ -#define GISB_ARBITER_BP_READ_5_fve_MASK 0x00000008 -#define GISB_ARBITER_BP_READ_5_fve_ALIGN 0 -#define GISB_ARBITER_BP_READ_5_fve_BITS 1 -#define GISB_ARBITER_BP_READ_5_fve_SHIFT 3 -#define GISB_ARBITER_BP_READ_5_fve_DISABLE 0 -#define GISB_ARBITER_BP_READ_5_fve_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_5 :: tgt [02:02] */ -#define GISB_ARBITER_BP_READ_5_tgt_MASK 0x00000004 -#define GISB_ARBITER_BP_READ_5_tgt_ALIGN 0 -#define GISB_ARBITER_BP_READ_5_tgt_BITS 1 -#define GISB_ARBITER_BP_READ_5_tgt_SHIFT 2 -#define GISB_ARBITER_BP_READ_5_tgt_DISABLE 0 -#define GISB_ARBITER_BP_READ_5_tgt_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_5 :: dbu [01:01] */ -#define GISB_ARBITER_BP_READ_5_dbu_MASK 0x00000002 -#define GISB_ARBITER_BP_READ_5_dbu_ALIGN 0 -#define GISB_ARBITER_BP_READ_5_dbu_BITS 1 -#define GISB_ARBITER_BP_READ_5_dbu_SHIFT 1 -#define GISB_ARBITER_BP_READ_5_dbu_DISABLE 0 -#define GISB_ARBITER_BP_READ_5_dbu_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_5 :: cce [00:00] */ -#define GISB_ARBITER_BP_READ_5_cce_MASK 0x00000001 -#define GISB_ARBITER_BP_READ_5_cce_ALIGN 0 -#define GISB_ARBITER_BP_READ_5_cce_BITS 1 -#define GISB_ARBITER_BP_READ_5_cce_SHIFT 0 -#define GISB_ARBITER_BP_READ_5_cce_DISABLE 0 -#define GISB_ARBITER_BP_READ_5_cce_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_WRITE_5 - ***************************************************************************/ -/* GISB_ARBITER :: BP_WRITE_5 :: reserved0 [31:06] */ -#define GISB_ARBITER_BP_WRITE_5_reserved0_MASK 0xffffffc0 -#define GISB_ARBITER_BP_WRITE_5_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_5_reserved0_BITS 26 -#define GISB_ARBITER_BP_WRITE_5_reserved0_SHIFT 6 - -/* GISB_ARBITER :: BP_WRITE_5 :: bsp [05:05] */ -#define GISB_ARBITER_BP_WRITE_5_bsp_MASK 0x00000020 -#define GISB_ARBITER_BP_WRITE_5_bsp_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_5_bsp_BITS 1 -#define GISB_ARBITER_BP_WRITE_5_bsp_SHIFT 5 -#define GISB_ARBITER_BP_WRITE_5_bsp_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_5_bsp_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_5 :: aes [04:04] */ -#define GISB_ARBITER_BP_WRITE_5_aes_MASK 0x00000010 -#define GISB_ARBITER_BP_WRITE_5_aes_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_5_aes_BITS 1 -#define GISB_ARBITER_BP_WRITE_5_aes_SHIFT 4 -#define GISB_ARBITER_BP_WRITE_5_aes_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_5_aes_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_5 :: fve [03:03] */ -#define GISB_ARBITER_BP_WRITE_5_fve_MASK 0x00000008 -#define GISB_ARBITER_BP_WRITE_5_fve_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_5_fve_BITS 1 -#define GISB_ARBITER_BP_WRITE_5_fve_SHIFT 3 -#define GISB_ARBITER_BP_WRITE_5_fve_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_5_fve_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_5 :: tgt [02:02] */ -#define GISB_ARBITER_BP_WRITE_5_tgt_MASK 0x00000004 -#define GISB_ARBITER_BP_WRITE_5_tgt_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_5_tgt_BITS 1 -#define GISB_ARBITER_BP_WRITE_5_tgt_SHIFT 2 -#define GISB_ARBITER_BP_WRITE_5_tgt_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_5_tgt_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_5 :: dbu [01:01] */ -#define GISB_ARBITER_BP_WRITE_5_dbu_MASK 0x00000002 -#define GISB_ARBITER_BP_WRITE_5_dbu_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_5_dbu_BITS 1 -#define GISB_ARBITER_BP_WRITE_5_dbu_SHIFT 1 -#define GISB_ARBITER_BP_WRITE_5_dbu_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_5_dbu_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_5 :: cce [00:00] */ -#define GISB_ARBITER_BP_WRITE_5_cce_MASK 0x00000001 -#define GISB_ARBITER_BP_WRITE_5_cce_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_5_cce_BITS 1 -#define GISB_ARBITER_BP_WRITE_5_cce_SHIFT 0 -#define GISB_ARBITER_BP_WRITE_5_cce_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_5_cce_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_ENABLE_5 - ***************************************************************************/ -/* GISB_ARBITER :: BP_ENABLE_5 :: reserved0 [31:03] */ -#define GISB_ARBITER_BP_ENABLE_5_reserved0_MASK 0xfffffff8 -#define GISB_ARBITER_BP_ENABLE_5_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_5_reserved0_BITS 29 -#define GISB_ARBITER_BP_ENABLE_5_reserved0_SHIFT 3 - -/* GISB_ARBITER :: BP_ENABLE_5 :: block [02:02] */ -#define GISB_ARBITER_BP_ENABLE_5_block_MASK 0x00000004 -#define GISB_ARBITER_BP_ENABLE_5_block_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_5_block_BITS 1 -#define GISB_ARBITER_BP_ENABLE_5_block_SHIFT 2 -#define GISB_ARBITER_BP_ENABLE_5_block_DISABLE 0 -#define GISB_ARBITER_BP_ENABLE_5_block_ENABLE 1 - -/* GISB_ARBITER :: BP_ENABLE_5 :: address [01:01] */ -#define GISB_ARBITER_BP_ENABLE_5_address_MASK 0x00000002 -#define GISB_ARBITER_BP_ENABLE_5_address_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_5_address_BITS 1 -#define GISB_ARBITER_BP_ENABLE_5_address_SHIFT 1 -#define GISB_ARBITER_BP_ENABLE_5_address_DISABLE 0 -#define GISB_ARBITER_BP_ENABLE_5_address_ENABLE 1 - -/* GISB_ARBITER :: BP_ENABLE_5 :: access [00:00] */ -#define GISB_ARBITER_BP_ENABLE_5_access_MASK 0x00000001 -#define GISB_ARBITER_BP_ENABLE_5_access_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_5_access_BITS 1 -#define GISB_ARBITER_BP_ENABLE_5_access_SHIFT 0 -#define GISB_ARBITER_BP_ENABLE_5_access_DISABLE 0 -#define GISB_ARBITER_BP_ENABLE_5_access_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_START_ADDR_6 - ***************************************************************************/ -/* GISB_ARBITER :: BP_START_ADDR_6 :: start [31:00] */ -#define GISB_ARBITER_BP_START_ADDR_6_start_MASK 0xffffffff -#define GISB_ARBITER_BP_START_ADDR_6_start_ALIGN 0 -#define GISB_ARBITER_BP_START_ADDR_6_start_BITS 32 -#define GISB_ARBITER_BP_START_ADDR_6_start_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: BP_END_ADDR_6 - ***************************************************************************/ -/* GISB_ARBITER :: BP_END_ADDR_6 :: end [31:00] */ -#define GISB_ARBITER_BP_END_ADDR_6_end_MASK 0xffffffff -#define GISB_ARBITER_BP_END_ADDR_6_end_ALIGN 0 -#define GISB_ARBITER_BP_END_ADDR_6_end_BITS 32 -#define GISB_ARBITER_BP_END_ADDR_6_end_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: BP_READ_6 - ***************************************************************************/ -/* GISB_ARBITER :: BP_READ_6 :: reserved0 [31:06] */ -#define GISB_ARBITER_BP_READ_6_reserved0_MASK 0xffffffc0 -#define GISB_ARBITER_BP_READ_6_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_READ_6_reserved0_BITS 26 -#define GISB_ARBITER_BP_READ_6_reserved0_SHIFT 6 - -/* GISB_ARBITER :: BP_READ_6 :: bsp [05:05] */ -#define GISB_ARBITER_BP_READ_6_bsp_MASK 0x00000020 -#define GISB_ARBITER_BP_READ_6_bsp_ALIGN 0 -#define GISB_ARBITER_BP_READ_6_bsp_BITS 1 -#define GISB_ARBITER_BP_READ_6_bsp_SHIFT 5 -#define GISB_ARBITER_BP_READ_6_bsp_DISABLE 0 -#define GISB_ARBITER_BP_READ_6_bsp_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_6 :: aes [04:04] */ -#define GISB_ARBITER_BP_READ_6_aes_MASK 0x00000010 -#define GISB_ARBITER_BP_READ_6_aes_ALIGN 0 -#define GISB_ARBITER_BP_READ_6_aes_BITS 1 -#define GISB_ARBITER_BP_READ_6_aes_SHIFT 4 -#define GISB_ARBITER_BP_READ_6_aes_DISABLE 0 -#define GISB_ARBITER_BP_READ_6_aes_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_6 :: fve [03:03] */ -#define GISB_ARBITER_BP_READ_6_fve_MASK 0x00000008 -#define GISB_ARBITER_BP_READ_6_fve_ALIGN 0 -#define GISB_ARBITER_BP_READ_6_fve_BITS 1 -#define GISB_ARBITER_BP_READ_6_fve_SHIFT 3 -#define GISB_ARBITER_BP_READ_6_fve_DISABLE 0 -#define GISB_ARBITER_BP_READ_6_fve_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_6 :: tgt [02:02] */ -#define GISB_ARBITER_BP_READ_6_tgt_MASK 0x00000004 -#define GISB_ARBITER_BP_READ_6_tgt_ALIGN 0 -#define GISB_ARBITER_BP_READ_6_tgt_BITS 1 -#define GISB_ARBITER_BP_READ_6_tgt_SHIFT 2 -#define GISB_ARBITER_BP_READ_6_tgt_DISABLE 0 -#define GISB_ARBITER_BP_READ_6_tgt_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_6 :: dbu [01:01] */ -#define GISB_ARBITER_BP_READ_6_dbu_MASK 0x00000002 -#define GISB_ARBITER_BP_READ_6_dbu_ALIGN 0 -#define GISB_ARBITER_BP_READ_6_dbu_BITS 1 -#define GISB_ARBITER_BP_READ_6_dbu_SHIFT 1 -#define GISB_ARBITER_BP_READ_6_dbu_DISABLE 0 -#define GISB_ARBITER_BP_READ_6_dbu_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_6 :: cce [00:00] */ -#define GISB_ARBITER_BP_READ_6_cce_MASK 0x00000001 -#define GISB_ARBITER_BP_READ_6_cce_ALIGN 0 -#define GISB_ARBITER_BP_READ_6_cce_BITS 1 -#define GISB_ARBITER_BP_READ_6_cce_SHIFT 0 -#define GISB_ARBITER_BP_READ_6_cce_DISABLE 0 -#define GISB_ARBITER_BP_READ_6_cce_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_WRITE_6 - ***************************************************************************/ -/* GISB_ARBITER :: BP_WRITE_6 :: reserved0 [31:06] */ -#define GISB_ARBITER_BP_WRITE_6_reserved0_MASK 0xffffffc0 -#define GISB_ARBITER_BP_WRITE_6_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_6_reserved0_BITS 26 -#define GISB_ARBITER_BP_WRITE_6_reserved0_SHIFT 6 - -/* GISB_ARBITER :: BP_WRITE_6 :: bsp [05:05] */ -#define GISB_ARBITER_BP_WRITE_6_bsp_MASK 0x00000020 -#define GISB_ARBITER_BP_WRITE_6_bsp_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_6_bsp_BITS 1 -#define GISB_ARBITER_BP_WRITE_6_bsp_SHIFT 5 -#define GISB_ARBITER_BP_WRITE_6_bsp_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_6_bsp_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_6 :: aes [04:04] */ -#define GISB_ARBITER_BP_WRITE_6_aes_MASK 0x00000010 -#define GISB_ARBITER_BP_WRITE_6_aes_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_6_aes_BITS 1 -#define GISB_ARBITER_BP_WRITE_6_aes_SHIFT 4 -#define GISB_ARBITER_BP_WRITE_6_aes_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_6_aes_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_6 :: fve [03:03] */ -#define GISB_ARBITER_BP_WRITE_6_fve_MASK 0x00000008 -#define GISB_ARBITER_BP_WRITE_6_fve_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_6_fve_BITS 1 -#define GISB_ARBITER_BP_WRITE_6_fve_SHIFT 3 -#define GISB_ARBITER_BP_WRITE_6_fve_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_6_fve_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_6 :: tgt [02:02] */ -#define GISB_ARBITER_BP_WRITE_6_tgt_MASK 0x00000004 -#define GISB_ARBITER_BP_WRITE_6_tgt_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_6_tgt_BITS 1 -#define GISB_ARBITER_BP_WRITE_6_tgt_SHIFT 2 -#define GISB_ARBITER_BP_WRITE_6_tgt_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_6_tgt_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_6 :: dbu [01:01] */ -#define GISB_ARBITER_BP_WRITE_6_dbu_MASK 0x00000002 -#define GISB_ARBITER_BP_WRITE_6_dbu_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_6_dbu_BITS 1 -#define GISB_ARBITER_BP_WRITE_6_dbu_SHIFT 1 -#define GISB_ARBITER_BP_WRITE_6_dbu_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_6_dbu_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_6 :: cce [00:00] */ -#define GISB_ARBITER_BP_WRITE_6_cce_MASK 0x00000001 -#define GISB_ARBITER_BP_WRITE_6_cce_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_6_cce_BITS 1 -#define GISB_ARBITER_BP_WRITE_6_cce_SHIFT 0 -#define GISB_ARBITER_BP_WRITE_6_cce_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_6_cce_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_ENABLE_6 - ***************************************************************************/ -/* GISB_ARBITER :: BP_ENABLE_6 :: reserved0 [31:03] */ -#define GISB_ARBITER_BP_ENABLE_6_reserved0_MASK 0xfffffff8 -#define GISB_ARBITER_BP_ENABLE_6_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_6_reserved0_BITS 29 -#define GISB_ARBITER_BP_ENABLE_6_reserved0_SHIFT 3 - -/* GISB_ARBITER :: BP_ENABLE_6 :: block [02:02] */ -#define GISB_ARBITER_BP_ENABLE_6_block_MASK 0x00000004 -#define GISB_ARBITER_BP_ENABLE_6_block_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_6_block_BITS 1 -#define GISB_ARBITER_BP_ENABLE_6_block_SHIFT 2 -#define GISB_ARBITER_BP_ENABLE_6_block_DISABLE 0 -#define GISB_ARBITER_BP_ENABLE_6_block_ENABLE 1 - -/* GISB_ARBITER :: BP_ENABLE_6 :: address [01:01] */ -#define GISB_ARBITER_BP_ENABLE_6_address_MASK 0x00000002 -#define GISB_ARBITER_BP_ENABLE_6_address_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_6_address_BITS 1 -#define GISB_ARBITER_BP_ENABLE_6_address_SHIFT 1 -#define GISB_ARBITER_BP_ENABLE_6_address_DISABLE 0 -#define GISB_ARBITER_BP_ENABLE_6_address_ENABLE 1 - -/* GISB_ARBITER :: BP_ENABLE_6 :: access [00:00] */ -#define GISB_ARBITER_BP_ENABLE_6_access_MASK 0x00000001 -#define GISB_ARBITER_BP_ENABLE_6_access_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_6_access_BITS 1 -#define GISB_ARBITER_BP_ENABLE_6_access_SHIFT 0 -#define GISB_ARBITER_BP_ENABLE_6_access_DISABLE 0 -#define GISB_ARBITER_BP_ENABLE_6_access_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_START_ADDR_7 - ***************************************************************************/ -/* GISB_ARBITER :: BP_START_ADDR_7 :: start [31:00] */ -#define GISB_ARBITER_BP_START_ADDR_7_start_MASK 0xffffffff -#define GISB_ARBITER_BP_START_ADDR_7_start_ALIGN 0 -#define GISB_ARBITER_BP_START_ADDR_7_start_BITS 32 -#define GISB_ARBITER_BP_START_ADDR_7_start_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: BP_END_ADDR_7 - ***************************************************************************/ -/* GISB_ARBITER :: BP_END_ADDR_7 :: end [31:00] */ -#define GISB_ARBITER_BP_END_ADDR_7_end_MASK 0xffffffff -#define GISB_ARBITER_BP_END_ADDR_7_end_ALIGN 0 -#define GISB_ARBITER_BP_END_ADDR_7_end_BITS 32 -#define GISB_ARBITER_BP_END_ADDR_7_end_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: BP_READ_7 - ***************************************************************************/ -/* GISB_ARBITER :: BP_READ_7 :: reserved0 [31:06] */ -#define GISB_ARBITER_BP_READ_7_reserved0_MASK 0xffffffc0 -#define GISB_ARBITER_BP_READ_7_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_READ_7_reserved0_BITS 26 -#define GISB_ARBITER_BP_READ_7_reserved0_SHIFT 6 - -/* GISB_ARBITER :: BP_READ_7 :: bsp [05:05] */ -#define GISB_ARBITER_BP_READ_7_bsp_MASK 0x00000020 -#define GISB_ARBITER_BP_READ_7_bsp_ALIGN 0 -#define GISB_ARBITER_BP_READ_7_bsp_BITS 1 -#define GISB_ARBITER_BP_READ_7_bsp_SHIFT 5 -#define GISB_ARBITER_BP_READ_7_bsp_DISABLE 0 -#define GISB_ARBITER_BP_READ_7_bsp_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_7 :: aes [04:04] */ -#define GISB_ARBITER_BP_READ_7_aes_MASK 0x00000010 -#define GISB_ARBITER_BP_READ_7_aes_ALIGN 0 -#define GISB_ARBITER_BP_READ_7_aes_BITS 1 -#define GISB_ARBITER_BP_READ_7_aes_SHIFT 4 -#define GISB_ARBITER_BP_READ_7_aes_DISABLE 0 -#define GISB_ARBITER_BP_READ_7_aes_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_7 :: fve [03:03] */ -#define GISB_ARBITER_BP_READ_7_fve_MASK 0x00000008 -#define GISB_ARBITER_BP_READ_7_fve_ALIGN 0 -#define GISB_ARBITER_BP_READ_7_fve_BITS 1 -#define GISB_ARBITER_BP_READ_7_fve_SHIFT 3 -#define GISB_ARBITER_BP_READ_7_fve_DISABLE 0 -#define GISB_ARBITER_BP_READ_7_fve_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_7 :: tgt [02:02] */ -#define GISB_ARBITER_BP_READ_7_tgt_MASK 0x00000004 -#define GISB_ARBITER_BP_READ_7_tgt_ALIGN 0 -#define GISB_ARBITER_BP_READ_7_tgt_BITS 1 -#define GISB_ARBITER_BP_READ_7_tgt_SHIFT 2 -#define GISB_ARBITER_BP_READ_7_tgt_DISABLE 0 -#define GISB_ARBITER_BP_READ_7_tgt_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_7 :: dbu [01:01] */ -#define GISB_ARBITER_BP_READ_7_dbu_MASK 0x00000002 -#define GISB_ARBITER_BP_READ_7_dbu_ALIGN 0 -#define GISB_ARBITER_BP_READ_7_dbu_BITS 1 -#define GISB_ARBITER_BP_READ_7_dbu_SHIFT 1 -#define GISB_ARBITER_BP_READ_7_dbu_DISABLE 0 -#define GISB_ARBITER_BP_READ_7_dbu_ENABLE 1 - -/* GISB_ARBITER :: BP_READ_7 :: cce [00:00] */ -#define GISB_ARBITER_BP_READ_7_cce_MASK 0x00000001 -#define GISB_ARBITER_BP_READ_7_cce_ALIGN 0 -#define GISB_ARBITER_BP_READ_7_cce_BITS 1 -#define GISB_ARBITER_BP_READ_7_cce_SHIFT 0 -#define GISB_ARBITER_BP_READ_7_cce_DISABLE 0 -#define GISB_ARBITER_BP_READ_7_cce_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_WRITE_7 - ***************************************************************************/ -/* GISB_ARBITER :: BP_WRITE_7 :: reserved0 [31:06] */ -#define GISB_ARBITER_BP_WRITE_7_reserved0_MASK 0xffffffc0 -#define GISB_ARBITER_BP_WRITE_7_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_7_reserved0_BITS 26 -#define GISB_ARBITER_BP_WRITE_7_reserved0_SHIFT 6 - -/* GISB_ARBITER :: BP_WRITE_7 :: bsp [05:05] */ -#define GISB_ARBITER_BP_WRITE_7_bsp_MASK 0x00000020 -#define GISB_ARBITER_BP_WRITE_7_bsp_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_7_bsp_BITS 1 -#define GISB_ARBITER_BP_WRITE_7_bsp_SHIFT 5 -#define GISB_ARBITER_BP_WRITE_7_bsp_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_7_bsp_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_7 :: aes [04:04] */ -#define GISB_ARBITER_BP_WRITE_7_aes_MASK 0x00000010 -#define GISB_ARBITER_BP_WRITE_7_aes_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_7_aes_BITS 1 -#define GISB_ARBITER_BP_WRITE_7_aes_SHIFT 4 -#define GISB_ARBITER_BP_WRITE_7_aes_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_7_aes_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_7 :: fve [03:03] */ -#define GISB_ARBITER_BP_WRITE_7_fve_MASK 0x00000008 -#define GISB_ARBITER_BP_WRITE_7_fve_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_7_fve_BITS 1 -#define GISB_ARBITER_BP_WRITE_7_fve_SHIFT 3 -#define GISB_ARBITER_BP_WRITE_7_fve_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_7_fve_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_7 :: tgt [02:02] */ -#define GISB_ARBITER_BP_WRITE_7_tgt_MASK 0x00000004 -#define GISB_ARBITER_BP_WRITE_7_tgt_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_7_tgt_BITS 1 -#define GISB_ARBITER_BP_WRITE_7_tgt_SHIFT 2 -#define GISB_ARBITER_BP_WRITE_7_tgt_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_7_tgt_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_7 :: dbu [01:01] */ -#define GISB_ARBITER_BP_WRITE_7_dbu_MASK 0x00000002 -#define GISB_ARBITER_BP_WRITE_7_dbu_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_7_dbu_BITS 1 -#define GISB_ARBITER_BP_WRITE_7_dbu_SHIFT 1 -#define GISB_ARBITER_BP_WRITE_7_dbu_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_7_dbu_ENABLE 1 - -/* GISB_ARBITER :: BP_WRITE_7 :: cce [00:00] */ -#define GISB_ARBITER_BP_WRITE_7_cce_MASK 0x00000001 -#define GISB_ARBITER_BP_WRITE_7_cce_ALIGN 0 -#define GISB_ARBITER_BP_WRITE_7_cce_BITS 1 -#define GISB_ARBITER_BP_WRITE_7_cce_SHIFT 0 -#define GISB_ARBITER_BP_WRITE_7_cce_DISABLE 0 -#define GISB_ARBITER_BP_WRITE_7_cce_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_ENABLE_7 - ***************************************************************************/ -/* GISB_ARBITER :: BP_ENABLE_7 :: reserved0 [31:03] */ -#define GISB_ARBITER_BP_ENABLE_7_reserved0_MASK 0xfffffff8 -#define GISB_ARBITER_BP_ENABLE_7_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_7_reserved0_BITS 29 -#define GISB_ARBITER_BP_ENABLE_7_reserved0_SHIFT 3 - -/* GISB_ARBITER :: BP_ENABLE_7 :: block [02:02] */ -#define GISB_ARBITER_BP_ENABLE_7_block_MASK 0x00000004 -#define GISB_ARBITER_BP_ENABLE_7_block_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_7_block_BITS 1 -#define GISB_ARBITER_BP_ENABLE_7_block_SHIFT 2 -#define GISB_ARBITER_BP_ENABLE_7_block_DISABLE 0 -#define GISB_ARBITER_BP_ENABLE_7_block_ENABLE 1 - -/* GISB_ARBITER :: BP_ENABLE_7 :: address [01:01] */ -#define GISB_ARBITER_BP_ENABLE_7_address_MASK 0x00000002 -#define GISB_ARBITER_BP_ENABLE_7_address_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_7_address_BITS 1 -#define GISB_ARBITER_BP_ENABLE_7_address_SHIFT 1 -#define GISB_ARBITER_BP_ENABLE_7_address_DISABLE 0 -#define GISB_ARBITER_BP_ENABLE_7_address_ENABLE 1 - -/* GISB_ARBITER :: BP_ENABLE_7 :: access [00:00] */ -#define GISB_ARBITER_BP_ENABLE_7_access_MASK 0x00000001 -#define GISB_ARBITER_BP_ENABLE_7_access_ALIGN 0 -#define GISB_ARBITER_BP_ENABLE_7_access_BITS 1 -#define GISB_ARBITER_BP_ENABLE_7_access_SHIFT 0 -#define GISB_ARBITER_BP_ENABLE_7_access_DISABLE 0 -#define GISB_ARBITER_BP_ENABLE_7_access_ENABLE 1 - - -/**************************************************************************** - * GISB_ARBITER :: BP_CAP_ADDR - ***************************************************************************/ -/* GISB_ARBITER :: BP_CAP_ADDR :: address [31:00] */ -#define GISB_ARBITER_BP_CAP_ADDR_address_MASK 0xffffffff -#define GISB_ARBITER_BP_CAP_ADDR_address_ALIGN 0 -#define GISB_ARBITER_BP_CAP_ADDR_address_BITS 32 -#define GISB_ARBITER_BP_CAP_ADDR_address_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: BP_CAP_DATA - ***************************************************************************/ -/* GISB_ARBITER :: BP_CAP_DATA :: data [31:00] */ -#define GISB_ARBITER_BP_CAP_DATA_data_MASK 0xffffffff -#define GISB_ARBITER_BP_CAP_DATA_data_ALIGN 0 -#define GISB_ARBITER_BP_CAP_DATA_data_BITS 32 -#define GISB_ARBITER_BP_CAP_DATA_data_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: BP_CAP_STATUS - ***************************************************************************/ -/* GISB_ARBITER :: BP_CAP_STATUS :: reserved0 [31:06] */ -#define GISB_ARBITER_BP_CAP_STATUS_reserved0_MASK 0xffffffc0 -#define GISB_ARBITER_BP_CAP_STATUS_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_CAP_STATUS_reserved0_BITS 26 -#define GISB_ARBITER_BP_CAP_STATUS_reserved0_SHIFT 6 - -/* GISB_ARBITER :: BP_CAP_STATUS :: bs_b [05:02] */ -#define GISB_ARBITER_BP_CAP_STATUS_bs_b_MASK 0x0000003c -#define GISB_ARBITER_BP_CAP_STATUS_bs_b_ALIGN 0 -#define GISB_ARBITER_BP_CAP_STATUS_bs_b_BITS 4 -#define GISB_ARBITER_BP_CAP_STATUS_bs_b_SHIFT 2 - -/* GISB_ARBITER :: BP_CAP_STATUS :: write [01:01] */ -#define GISB_ARBITER_BP_CAP_STATUS_write_MASK 0x00000002 -#define GISB_ARBITER_BP_CAP_STATUS_write_ALIGN 0 -#define GISB_ARBITER_BP_CAP_STATUS_write_BITS 1 -#define GISB_ARBITER_BP_CAP_STATUS_write_SHIFT 1 - -/* GISB_ARBITER :: BP_CAP_STATUS :: valid [00:00] */ -#define GISB_ARBITER_BP_CAP_STATUS_valid_MASK 0x00000001 -#define GISB_ARBITER_BP_CAP_STATUS_valid_ALIGN 0 -#define GISB_ARBITER_BP_CAP_STATUS_valid_BITS 1 -#define GISB_ARBITER_BP_CAP_STATUS_valid_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: BP_CAP_MASTER - ***************************************************************************/ -/* GISB_ARBITER :: BP_CAP_MASTER :: reserved0 [31:06] */ -#define GISB_ARBITER_BP_CAP_MASTER_reserved0_MASK 0xffffffc0 -#define GISB_ARBITER_BP_CAP_MASTER_reserved0_ALIGN 0 -#define GISB_ARBITER_BP_CAP_MASTER_reserved0_BITS 26 -#define GISB_ARBITER_BP_CAP_MASTER_reserved0_SHIFT 6 - -/* GISB_ARBITER :: BP_CAP_MASTER :: bsp [05:05] */ -#define GISB_ARBITER_BP_CAP_MASTER_bsp_MASK 0x00000020 -#define GISB_ARBITER_BP_CAP_MASTER_bsp_ALIGN 0 -#define GISB_ARBITER_BP_CAP_MASTER_bsp_BITS 1 -#define GISB_ARBITER_BP_CAP_MASTER_bsp_SHIFT 5 - -/* GISB_ARBITER :: BP_CAP_MASTER :: aes [04:04] */ -#define GISB_ARBITER_BP_CAP_MASTER_aes_MASK 0x00000010 -#define GISB_ARBITER_BP_CAP_MASTER_aes_ALIGN 0 -#define GISB_ARBITER_BP_CAP_MASTER_aes_BITS 1 -#define GISB_ARBITER_BP_CAP_MASTER_aes_SHIFT 4 - -/* GISB_ARBITER :: BP_CAP_MASTER :: fve [03:03] */ -#define GISB_ARBITER_BP_CAP_MASTER_fve_MASK 0x00000008 -#define GISB_ARBITER_BP_CAP_MASTER_fve_ALIGN 0 -#define GISB_ARBITER_BP_CAP_MASTER_fve_BITS 1 -#define GISB_ARBITER_BP_CAP_MASTER_fve_SHIFT 3 - -/* GISB_ARBITER :: BP_CAP_MASTER :: tgt [02:02] */ -#define GISB_ARBITER_BP_CAP_MASTER_tgt_MASK 0x00000004 -#define GISB_ARBITER_BP_CAP_MASTER_tgt_ALIGN 0 -#define GISB_ARBITER_BP_CAP_MASTER_tgt_BITS 1 -#define GISB_ARBITER_BP_CAP_MASTER_tgt_SHIFT 2 - -/* GISB_ARBITER :: BP_CAP_MASTER :: dbu [01:01] */ -#define GISB_ARBITER_BP_CAP_MASTER_dbu_MASK 0x00000002 -#define GISB_ARBITER_BP_CAP_MASTER_dbu_ALIGN 0 -#define GISB_ARBITER_BP_CAP_MASTER_dbu_BITS 1 -#define GISB_ARBITER_BP_CAP_MASTER_dbu_SHIFT 1 - -/* GISB_ARBITER :: BP_CAP_MASTER :: cce [00:00] */ -#define GISB_ARBITER_BP_CAP_MASTER_cce_MASK 0x00000001 -#define GISB_ARBITER_BP_CAP_MASTER_cce_ALIGN 0 -#define GISB_ARBITER_BP_CAP_MASTER_cce_BITS 1 -#define GISB_ARBITER_BP_CAP_MASTER_cce_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: ERR_CAP_CLR - ***************************************************************************/ -/* GISB_ARBITER :: ERR_CAP_CLR :: reserved0 [31:01] */ -#define GISB_ARBITER_ERR_CAP_CLR_reserved0_MASK 0xfffffffe -#define GISB_ARBITER_ERR_CAP_CLR_reserved0_ALIGN 0 -#define GISB_ARBITER_ERR_CAP_CLR_reserved0_BITS 31 -#define GISB_ARBITER_ERR_CAP_CLR_reserved0_SHIFT 1 - -/* GISB_ARBITER :: ERR_CAP_CLR :: clear [00:00] */ -#define GISB_ARBITER_ERR_CAP_CLR_clear_MASK 0x00000001 -#define GISB_ARBITER_ERR_CAP_CLR_clear_ALIGN 0 -#define GISB_ARBITER_ERR_CAP_CLR_clear_BITS 1 -#define GISB_ARBITER_ERR_CAP_CLR_clear_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: ERR_CAP_ADDR - ***************************************************************************/ -/* GISB_ARBITER :: ERR_CAP_ADDR :: address [31:00] */ -#define GISB_ARBITER_ERR_CAP_ADDR_address_MASK 0xffffffff -#define GISB_ARBITER_ERR_CAP_ADDR_address_ALIGN 0 -#define GISB_ARBITER_ERR_CAP_ADDR_address_BITS 32 -#define GISB_ARBITER_ERR_CAP_ADDR_address_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: ERR_CAP_DATA - ***************************************************************************/ -/* GISB_ARBITER :: ERR_CAP_DATA :: data [31:00] */ -#define GISB_ARBITER_ERR_CAP_DATA_data_MASK 0xffffffff -#define GISB_ARBITER_ERR_CAP_DATA_data_ALIGN 0 -#define GISB_ARBITER_ERR_CAP_DATA_data_BITS 32 -#define GISB_ARBITER_ERR_CAP_DATA_data_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: ERR_CAP_STATUS - ***************************************************************************/ -/* GISB_ARBITER :: ERR_CAP_STATUS :: reserved0 [31:13] */ -#define GISB_ARBITER_ERR_CAP_STATUS_reserved0_MASK 0xffffe000 -#define GISB_ARBITER_ERR_CAP_STATUS_reserved0_ALIGN 0 -#define GISB_ARBITER_ERR_CAP_STATUS_reserved0_BITS 19 -#define GISB_ARBITER_ERR_CAP_STATUS_reserved0_SHIFT 13 - -/* GISB_ARBITER :: ERR_CAP_STATUS :: timeout [12:12] */ -#define GISB_ARBITER_ERR_CAP_STATUS_timeout_MASK 0x00001000 -#define GISB_ARBITER_ERR_CAP_STATUS_timeout_ALIGN 0 -#define GISB_ARBITER_ERR_CAP_STATUS_timeout_BITS 1 -#define GISB_ARBITER_ERR_CAP_STATUS_timeout_SHIFT 12 - -/* GISB_ARBITER :: ERR_CAP_STATUS :: tea [11:11] */ -#define GISB_ARBITER_ERR_CAP_STATUS_tea_MASK 0x00000800 -#define GISB_ARBITER_ERR_CAP_STATUS_tea_ALIGN 0 -#define GISB_ARBITER_ERR_CAP_STATUS_tea_BITS 1 -#define GISB_ARBITER_ERR_CAP_STATUS_tea_SHIFT 11 - -/* GISB_ARBITER :: ERR_CAP_STATUS :: reserved1 [10:06] */ -#define GISB_ARBITER_ERR_CAP_STATUS_reserved1_MASK 0x000007c0 -#define GISB_ARBITER_ERR_CAP_STATUS_reserved1_ALIGN 0 -#define GISB_ARBITER_ERR_CAP_STATUS_reserved1_BITS 5 -#define GISB_ARBITER_ERR_CAP_STATUS_reserved1_SHIFT 6 - -/* GISB_ARBITER :: ERR_CAP_STATUS :: bs_b [05:02] */ -#define GISB_ARBITER_ERR_CAP_STATUS_bs_b_MASK 0x0000003c -#define GISB_ARBITER_ERR_CAP_STATUS_bs_b_ALIGN 0 -#define GISB_ARBITER_ERR_CAP_STATUS_bs_b_BITS 4 -#define GISB_ARBITER_ERR_CAP_STATUS_bs_b_SHIFT 2 - -/* GISB_ARBITER :: ERR_CAP_STATUS :: write [01:01] */ -#define GISB_ARBITER_ERR_CAP_STATUS_write_MASK 0x00000002 -#define GISB_ARBITER_ERR_CAP_STATUS_write_ALIGN 0 -#define GISB_ARBITER_ERR_CAP_STATUS_write_BITS 1 -#define GISB_ARBITER_ERR_CAP_STATUS_write_SHIFT 1 - -/* GISB_ARBITER :: ERR_CAP_STATUS :: valid [00:00] */ -#define GISB_ARBITER_ERR_CAP_STATUS_valid_MASK 0x00000001 -#define GISB_ARBITER_ERR_CAP_STATUS_valid_ALIGN 0 -#define GISB_ARBITER_ERR_CAP_STATUS_valid_BITS 1 -#define GISB_ARBITER_ERR_CAP_STATUS_valid_SHIFT 0 - - -/**************************************************************************** - * GISB_ARBITER :: ERR_CAP_MASTER - ***************************************************************************/ -/* GISB_ARBITER :: ERR_CAP_MASTER :: reserved0 [31:06] */ -#define GISB_ARBITER_ERR_CAP_MASTER_reserved0_MASK 0xffffffc0 -#define GISB_ARBITER_ERR_CAP_MASTER_reserved0_ALIGN 0 -#define GISB_ARBITER_ERR_CAP_MASTER_reserved0_BITS 26 -#define GISB_ARBITER_ERR_CAP_MASTER_reserved0_SHIFT 6 - -/* GISB_ARBITER :: ERR_CAP_MASTER :: bsp [05:05] */ -#define GISB_ARBITER_ERR_CAP_MASTER_bsp_MASK 0x00000020 -#define GISB_ARBITER_ERR_CAP_MASTER_bsp_ALIGN 0 -#define GISB_ARBITER_ERR_CAP_MASTER_bsp_BITS 1 -#define GISB_ARBITER_ERR_CAP_MASTER_bsp_SHIFT 5 - -/* GISB_ARBITER :: ERR_CAP_MASTER :: aes [04:04] */ -#define GISB_ARBITER_ERR_CAP_MASTER_aes_MASK 0x00000010 -#define GISB_ARBITER_ERR_CAP_MASTER_aes_ALIGN 0 -#define GISB_ARBITER_ERR_CAP_MASTER_aes_BITS 1 -#define GISB_ARBITER_ERR_CAP_MASTER_aes_SHIFT 4 - -/* GISB_ARBITER :: ERR_CAP_MASTER :: fve [03:03] */ -#define GISB_ARBITER_ERR_CAP_MASTER_fve_MASK 0x00000008 -#define GISB_ARBITER_ERR_CAP_MASTER_fve_ALIGN 0 -#define GISB_ARBITER_ERR_CAP_MASTER_fve_BITS 1 -#define GISB_ARBITER_ERR_CAP_MASTER_fve_SHIFT 3 - -/* GISB_ARBITER :: ERR_CAP_MASTER :: tgt [02:02] */ -#define GISB_ARBITER_ERR_CAP_MASTER_tgt_MASK 0x00000004 -#define GISB_ARBITER_ERR_CAP_MASTER_tgt_ALIGN 0 -#define GISB_ARBITER_ERR_CAP_MASTER_tgt_BITS 1 -#define GISB_ARBITER_ERR_CAP_MASTER_tgt_SHIFT 2 - -/* GISB_ARBITER :: ERR_CAP_MASTER :: dbu [01:01] */ -#define GISB_ARBITER_ERR_CAP_MASTER_dbu_MASK 0x00000002 -#define GISB_ARBITER_ERR_CAP_MASTER_dbu_ALIGN 0 -#define GISB_ARBITER_ERR_CAP_MASTER_dbu_BITS 1 -#define GISB_ARBITER_ERR_CAP_MASTER_dbu_SHIFT 1 - -/* GISB_ARBITER :: ERR_CAP_MASTER :: cce [00:00] */ -#define GISB_ARBITER_ERR_CAP_MASTER_cce_MASK 0x00000001 -#define GISB_ARBITER_ERR_CAP_MASTER_cce_ALIGN 0 -#define GISB_ARBITER_ERR_CAP_MASTER_cce_BITS 1 -#define GISB_ARBITER_ERR_CAP_MASTER_cce_SHIFT 0 - - -/**************************************************************************** - * BCM70012_MISC_TOP_MISC_GR_BRIDGE - ***************************************************************************/ -/**************************************************************************** - * MISC_GR_BRIDGE :: REVISION - ***************************************************************************/ -/* MISC_GR_BRIDGE :: REVISION :: reserved0 [31:16] */ -#define MISC_GR_BRIDGE_REVISION_reserved0_MASK 0xffff0000 -#define MISC_GR_BRIDGE_REVISION_reserved0_ALIGN 0 -#define MISC_GR_BRIDGE_REVISION_reserved0_BITS 16 -#define MISC_GR_BRIDGE_REVISION_reserved0_SHIFT 16 - -/* MISC_GR_BRIDGE :: REVISION :: MAJOR [15:08] */ -#define MISC_GR_BRIDGE_REVISION_MAJOR_MASK 0x0000ff00 -#define MISC_GR_BRIDGE_REVISION_MAJOR_ALIGN 0 -#define MISC_GR_BRIDGE_REVISION_MAJOR_BITS 8 -#define MISC_GR_BRIDGE_REVISION_MAJOR_SHIFT 8 - -/* MISC_GR_BRIDGE :: REVISION :: MINOR [07:00] */ -#define MISC_GR_BRIDGE_REVISION_MINOR_MASK 0x000000ff -#define MISC_GR_BRIDGE_REVISION_MINOR_ALIGN 0 -#define MISC_GR_BRIDGE_REVISION_MINOR_BITS 8 -#define MISC_GR_BRIDGE_REVISION_MINOR_SHIFT 0 - - -/**************************************************************************** - * MISC_GR_BRIDGE :: CTRL - ***************************************************************************/ -/* MISC_GR_BRIDGE :: CTRL :: reserved0 [31:01] */ -#define MISC_GR_BRIDGE_CTRL_reserved0_MASK 0xfffffffe -#define MISC_GR_BRIDGE_CTRL_reserved0_ALIGN 0 -#define MISC_GR_BRIDGE_CTRL_reserved0_BITS 31 -#define MISC_GR_BRIDGE_CTRL_reserved0_SHIFT 1 - -/* MISC_GR_BRIDGE :: CTRL :: gisb_error_intr [00:00] */ -#define MISC_GR_BRIDGE_CTRL_gisb_error_intr_MASK 0x00000001 -#define MISC_GR_BRIDGE_CTRL_gisb_error_intr_ALIGN 0 -#define MISC_GR_BRIDGE_CTRL_gisb_error_intr_BITS 1 -#define MISC_GR_BRIDGE_CTRL_gisb_error_intr_SHIFT 0 -#define MISC_GR_BRIDGE_CTRL_gisb_error_intr_INTR_DISABLE 0 -#define MISC_GR_BRIDGE_CTRL_gisb_error_intr_INTR_ENABLE 1 - - -/**************************************************************************** - * MISC_GR_BRIDGE :: SPARE_SW_RESET_0 - ***************************************************************************/ -/* MISC_GR_BRIDGE :: SPARE_SW_RESET_0 :: reserved0 [31:01] */ -#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_MASK 0xfffffffe -#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_ALIGN 0 -#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_BITS 31 -#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_SHIFT 1 - -/* MISC_GR_BRIDGE :: SPARE_SW_RESET_0 :: SPARE_SW_RESET [00:00] */ -#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_MASK 0x00000001 -#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ALIGN 0 -#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_BITS 1 -#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_SHIFT 0 -#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_DEASSERT 0 -#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ASSERT 1 - - -/**************************************************************************** - * MISC_GR_BRIDGE :: SPARE_SW_RESET_1 - ***************************************************************************/ -/* MISC_GR_BRIDGE :: SPARE_SW_RESET_1 :: reserved0 [31:01] */ -#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_MASK 0xfffffffe -#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_ALIGN 0 -#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_BITS 31 -#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_SHIFT 1 - -/* MISC_GR_BRIDGE :: SPARE_SW_RESET_1 :: SPARE_SW_RESET [00:00] */ -#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_MASK 0x00000001 -#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ALIGN 0 -#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_BITS 1 -#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_SHIFT 0 -#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_DEASSERT 0 -#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ASSERT 1 - - -/**************************************************************************** - * BCM70012_DBU_TOP_DBU - ***************************************************************************/ -/**************************************************************************** - * DBU :: DBU_CMD - ***************************************************************************/ -/* DBU :: DBU_CMD :: reserved0 [31:03] */ -#define DBU_DBU_CMD_reserved0_MASK 0xfffffff8 -#define DBU_DBU_CMD_reserved0_ALIGN 0 -#define DBU_DBU_CMD_reserved0_BITS 29 -#define DBU_DBU_CMD_reserved0_SHIFT 3 - -/* DBU :: DBU_CMD :: RX_OVERFLOW [02:02] */ -#define DBU_DBU_CMD_RX_OVERFLOW_MASK 0x00000004 -#define DBU_DBU_CMD_RX_OVERFLOW_ALIGN 0 -#define DBU_DBU_CMD_RX_OVERFLOW_BITS 1 -#define DBU_DBU_CMD_RX_OVERFLOW_SHIFT 2 - -/* DBU :: DBU_CMD :: RX_ERROR [01:01] */ -#define DBU_DBU_CMD_RX_ERROR_MASK 0x00000002 -#define DBU_DBU_CMD_RX_ERROR_ALIGN 0 -#define DBU_DBU_CMD_RX_ERROR_BITS 1 -#define DBU_DBU_CMD_RX_ERROR_SHIFT 1 - -/* DBU :: DBU_CMD :: ENABLE [00:00] */ -#define DBU_DBU_CMD_ENABLE_MASK 0x00000001 -#define DBU_DBU_CMD_ENABLE_ALIGN 0 -#define DBU_DBU_CMD_ENABLE_BITS 1 -#define DBU_DBU_CMD_ENABLE_SHIFT 0 - - -/**************************************************************************** - * DBU :: DBU_STATUS - ***************************************************************************/ -/* DBU :: DBU_STATUS :: reserved0 [31:02] */ -#define DBU_DBU_STATUS_reserved0_MASK 0xfffffffc -#define DBU_DBU_STATUS_reserved0_ALIGN 0 -#define DBU_DBU_STATUS_reserved0_BITS 30 -#define DBU_DBU_STATUS_reserved0_SHIFT 2 - -/* DBU :: DBU_STATUS :: TXDATA_OCCUPIED [01:01] */ -#define DBU_DBU_STATUS_TXDATA_OCCUPIED_MASK 0x00000002 -#define DBU_DBU_STATUS_TXDATA_OCCUPIED_ALIGN 0 -#define DBU_DBU_STATUS_TXDATA_OCCUPIED_BITS 1 -#define DBU_DBU_STATUS_TXDATA_OCCUPIED_SHIFT 1 - -/* DBU :: DBU_STATUS :: RXDATA_VALID [00:00] */ -#define DBU_DBU_STATUS_RXDATA_VALID_MASK 0x00000001 -#define DBU_DBU_STATUS_RXDATA_VALID_ALIGN 0 -#define DBU_DBU_STATUS_RXDATA_VALID_BITS 1 -#define DBU_DBU_STATUS_RXDATA_VALID_SHIFT 0 - - -/**************************************************************************** - * DBU :: DBU_CONFIG - ***************************************************************************/ -/* DBU :: DBU_CONFIG :: reserved0 [31:03] */ -#define DBU_DBU_CONFIG_reserved0_MASK 0xfffffff8 -#define DBU_DBU_CONFIG_reserved0_ALIGN 0 -#define DBU_DBU_CONFIG_reserved0_BITS 29 -#define DBU_DBU_CONFIG_reserved0_SHIFT 3 - -/* DBU :: DBU_CONFIG :: CRLF_ENABLE [02:02] */ -#define DBU_DBU_CONFIG_CRLF_ENABLE_MASK 0x00000004 -#define DBU_DBU_CONFIG_CRLF_ENABLE_ALIGN 0 -#define DBU_DBU_CONFIG_CRLF_ENABLE_BITS 1 -#define DBU_DBU_CONFIG_CRLF_ENABLE_SHIFT 2 - -/* DBU :: DBU_CONFIG :: DEBUGSM_ENABLE [01:01] */ -#define DBU_DBU_CONFIG_DEBUGSM_ENABLE_MASK 0x00000002 -#define DBU_DBU_CONFIG_DEBUGSM_ENABLE_ALIGN 0 -#define DBU_DBU_CONFIG_DEBUGSM_ENABLE_BITS 1 -#define DBU_DBU_CONFIG_DEBUGSM_ENABLE_SHIFT 1 - -/* DBU :: DBU_CONFIG :: TIMING_OVERRIDE [00:00] */ -#define DBU_DBU_CONFIG_TIMING_OVERRIDE_MASK 0x00000001 -#define DBU_DBU_CONFIG_TIMING_OVERRIDE_ALIGN 0 -#define DBU_DBU_CONFIG_TIMING_OVERRIDE_BITS 1 -#define DBU_DBU_CONFIG_TIMING_OVERRIDE_SHIFT 0 - - -/**************************************************************************** - * DBU :: DBU_TIMING - ***************************************************************************/ -/* DBU :: DBU_TIMING :: BIT_INTERVAL [31:16] */ -#define DBU_DBU_TIMING_BIT_INTERVAL_MASK 0xffff0000 -#define DBU_DBU_TIMING_BIT_INTERVAL_ALIGN 0 -#define DBU_DBU_TIMING_BIT_INTERVAL_BITS 16 -#define DBU_DBU_TIMING_BIT_INTERVAL_SHIFT 16 - -/* DBU :: DBU_TIMING :: FB_SMPL_OFFSET [15:00] */ -#define DBU_DBU_TIMING_FB_SMPL_OFFSET_MASK 0x0000ffff -#define DBU_DBU_TIMING_FB_SMPL_OFFSET_ALIGN 0 -#define DBU_DBU_TIMING_FB_SMPL_OFFSET_BITS 16 -#define DBU_DBU_TIMING_FB_SMPL_OFFSET_SHIFT 0 - - -/**************************************************************************** - * DBU :: DBU_RXDATA - ***************************************************************************/ -/* DBU :: DBU_RXDATA :: reserved0 [31:09] */ -#define DBU_DBU_RXDATA_reserved0_MASK 0xfffffe00 -#define DBU_DBU_RXDATA_reserved0_ALIGN 0 -#define DBU_DBU_RXDATA_reserved0_BITS 23 -#define DBU_DBU_RXDATA_reserved0_SHIFT 9 - -/* DBU :: DBU_RXDATA :: ERROR [08:08] */ -#define DBU_DBU_RXDATA_ERROR_MASK 0x00000100 -#define DBU_DBU_RXDATA_ERROR_ALIGN 0 -#define DBU_DBU_RXDATA_ERROR_BITS 1 -#define DBU_DBU_RXDATA_ERROR_SHIFT 8 - -/* DBU :: DBU_RXDATA :: VALUE [07:00] */ -#define DBU_DBU_RXDATA_VALUE_MASK 0x000000ff -#define DBU_DBU_RXDATA_VALUE_ALIGN 0 -#define DBU_DBU_RXDATA_VALUE_BITS 8 -#define DBU_DBU_RXDATA_VALUE_SHIFT 0 - - -/**************************************************************************** - * DBU :: DBU_TXDATA - ***************************************************************************/ -/* DBU :: DBU_TXDATA :: reserved0 [31:08] */ -#define DBU_DBU_TXDATA_reserved0_MASK 0xffffff00 -#define DBU_DBU_TXDATA_reserved0_ALIGN 0 -#define DBU_DBU_TXDATA_reserved0_BITS 24 -#define DBU_DBU_TXDATA_reserved0_SHIFT 8 - -/* DBU :: DBU_TXDATA :: VALUE [07:00] */ -#define DBU_DBU_TXDATA_VALUE_MASK 0x000000ff -#define DBU_DBU_TXDATA_VALUE_ALIGN 0 -#define DBU_DBU_TXDATA_VALUE_BITS 8 -#define DBU_DBU_TXDATA_VALUE_SHIFT 0 - - -/**************************************************************************** - * BCM70012_DBU_TOP_DBU_RGR_BRIDGE - ***************************************************************************/ -/**************************************************************************** - * DBU_RGR_BRIDGE :: REVISION - ***************************************************************************/ -/* DBU_RGR_BRIDGE :: REVISION :: reserved0 [31:16] */ -#define DBU_RGR_BRIDGE_REVISION_reserved0_MASK 0xffff0000 -#define DBU_RGR_BRIDGE_REVISION_reserved0_ALIGN 0 -#define DBU_RGR_BRIDGE_REVISION_reserved0_BITS 16 -#define DBU_RGR_BRIDGE_REVISION_reserved0_SHIFT 16 - -/* DBU_RGR_BRIDGE :: REVISION :: MAJOR [15:08] */ -#define DBU_RGR_BRIDGE_REVISION_MAJOR_MASK 0x0000ff00 -#define DBU_RGR_BRIDGE_REVISION_MAJOR_ALIGN 0 -#define DBU_RGR_BRIDGE_REVISION_MAJOR_BITS 8 -#define DBU_RGR_BRIDGE_REVISION_MAJOR_SHIFT 8 - -/* DBU_RGR_BRIDGE :: REVISION :: MINOR [07:00] */ -#define DBU_RGR_BRIDGE_REVISION_MINOR_MASK 0x000000ff -#define DBU_RGR_BRIDGE_REVISION_MINOR_ALIGN 0 -#define DBU_RGR_BRIDGE_REVISION_MINOR_BITS 8 -#define DBU_RGR_BRIDGE_REVISION_MINOR_SHIFT 0 - - -/**************************************************************************** - * DBU_RGR_BRIDGE :: CTRL - ***************************************************************************/ -/* DBU_RGR_BRIDGE :: CTRL :: reserved0 [31:02] */ -#define DBU_RGR_BRIDGE_CTRL_reserved0_MASK 0xfffffffc -#define DBU_RGR_BRIDGE_CTRL_reserved0_ALIGN 0 -#define DBU_RGR_BRIDGE_CTRL_reserved0_BITS 30 -#define DBU_RGR_BRIDGE_CTRL_reserved0_SHIFT 2 - -/* DBU_RGR_BRIDGE :: CTRL :: rbus_error_intr [01:01] */ -#define DBU_RGR_BRIDGE_CTRL_rbus_error_intr_MASK 0x00000002 -#define DBU_RGR_BRIDGE_CTRL_rbus_error_intr_ALIGN 0 -#define DBU_RGR_BRIDGE_CTRL_rbus_error_intr_BITS 1 -#define DBU_RGR_BRIDGE_CTRL_rbus_error_intr_SHIFT 1 -#define DBU_RGR_BRIDGE_CTRL_rbus_error_intr_INTR_DISABLE 0 -#define DBU_RGR_BRIDGE_CTRL_rbus_error_intr_INTR_ENABLE 1 - -/* DBU_RGR_BRIDGE :: CTRL :: gisb_error_intr [00:00] */ -#define DBU_RGR_BRIDGE_CTRL_gisb_error_intr_MASK 0x00000001 -#define DBU_RGR_BRIDGE_CTRL_gisb_error_intr_ALIGN 0 -#define DBU_RGR_BRIDGE_CTRL_gisb_error_intr_BITS 1 -#define DBU_RGR_BRIDGE_CTRL_gisb_error_intr_SHIFT 0 -#define DBU_RGR_BRIDGE_CTRL_gisb_error_intr_INTR_DISABLE 0 -#define DBU_RGR_BRIDGE_CTRL_gisb_error_intr_INTR_ENABLE 1 - - -/**************************************************************************** - * DBU_RGR_BRIDGE :: RBUS_TIMER - ***************************************************************************/ -/* DBU_RGR_BRIDGE :: RBUS_TIMER :: reserved0 [31:16] */ -#define DBU_RGR_BRIDGE_RBUS_TIMER_reserved0_MASK 0xffff0000 -#define DBU_RGR_BRIDGE_RBUS_TIMER_reserved0_ALIGN 0 -#define DBU_RGR_BRIDGE_RBUS_TIMER_reserved0_BITS 16 -#define DBU_RGR_BRIDGE_RBUS_TIMER_reserved0_SHIFT 16 - -/* DBU_RGR_BRIDGE :: RBUS_TIMER :: timer_value [15:00] */ -#define DBU_RGR_BRIDGE_RBUS_TIMER_timer_value_MASK 0x0000ffff -#define DBU_RGR_BRIDGE_RBUS_TIMER_timer_value_ALIGN 0 -#define DBU_RGR_BRIDGE_RBUS_TIMER_timer_value_BITS 16 -#define DBU_RGR_BRIDGE_RBUS_TIMER_timer_value_SHIFT 0 - - -/**************************************************************************** - * DBU_RGR_BRIDGE :: SPARE_SW_RESET_0 - ***************************************************************************/ -/* DBU_RGR_BRIDGE :: SPARE_SW_RESET_0 :: reserved0 [31:01] */ -#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_MASK 0xfffffffe -#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_ALIGN 0 -#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_BITS 31 -#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_SHIFT 1 - -/* DBU_RGR_BRIDGE :: SPARE_SW_RESET_0 :: SPARE_SW_RESET [00:00] */ -#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_MASK 0x00000001 -#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ALIGN 0 -#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_BITS 1 -#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_SHIFT 0 -#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_DEASSERT 0 -#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ASSERT 1 - - -/**************************************************************************** - * DBU_RGR_BRIDGE :: SPARE_SW_RESET_1 - ***************************************************************************/ -/* DBU_RGR_BRIDGE :: SPARE_SW_RESET_1 :: reserved0 [31:01] */ -#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_MASK 0xfffffffe -#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_ALIGN 0 -#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_BITS 31 -#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_SHIFT 1 - -/* DBU_RGR_BRIDGE :: SPARE_SW_RESET_1 :: SPARE_SW_RESET [00:00] */ -#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_MASK 0x00000001 -#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ALIGN 0 -#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_BITS 1 -#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_SHIFT 0 -#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_DEASSERT 0 -#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ASSERT 1 - - -/**************************************************************************** - * BCM70012_OTP_TOP_OTP - ***************************************************************************/ -/**************************************************************************** - * OTP :: CONFIG_INFO - ***************************************************************************/ -/* OTP :: CONFIG_INFO :: reserved0 [31:22] */ -#define OTP_CONFIG_INFO_reserved0_MASK 0xffc00000 -#define OTP_CONFIG_INFO_reserved0_ALIGN 0 -#define OTP_CONFIG_INFO_reserved0_BITS 10 -#define OTP_CONFIG_INFO_reserved0_SHIFT 22 - -/* OTP :: CONFIG_INFO :: SELVL [21:20] */ -#define OTP_CONFIG_INFO_SELVL_MASK 0x00300000 -#define OTP_CONFIG_INFO_SELVL_ALIGN 0 -#define OTP_CONFIG_INFO_SELVL_BITS 2 -#define OTP_CONFIG_INFO_SELVL_SHIFT 20 - -/* OTP :: CONFIG_INFO :: reserved1 [19:17] */ -#define OTP_CONFIG_INFO_reserved1_MASK 0x000e0000 -#define OTP_CONFIG_INFO_reserved1_ALIGN 0 -#define OTP_CONFIG_INFO_reserved1_BITS 3 -#define OTP_CONFIG_INFO_reserved1_SHIFT 17 - -/* OTP :: CONFIG_INFO :: PTEST [16:16] */ -#define OTP_CONFIG_INFO_PTEST_MASK 0x00010000 -#define OTP_CONFIG_INFO_PTEST_ALIGN 0 -#define OTP_CONFIG_INFO_PTEST_BITS 1 -#define OTP_CONFIG_INFO_PTEST_SHIFT 16 - -/* OTP :: CONFIG_INFO :: reserved2 [15:13] */ -#define OTP_CONFIG_INFO_reserved2_MASK 0x0000e000 -#define OTP_CONFIG_INFO_reserved2_ALIGN 0 -#define OTP_CONFIG_INFO_reserved2_BITS 3 -#define OTP_CONFIG_INFO_reserved2_SHIFT 13 - -/* OTP :: CONFIG_INFO :: MAX_REDUNDANT_ROWS [12:08] */ -#define OTP_CONFIG_INFO_MAX_REDUNDANT_ROWS_MASK 0x00001f00 -#define OTP_CONFIG_INFO_MAX_REDUNDANT_ROWS_ALIGN 0 -#define OTP_CONFIG_INFO_MAX_REDUNDANT_ROWS_BITS 5 -#define OTP_CONFIG_INFO_MAX_REDUNDANT_ROWS_SHIFT 8 - -/* OTP :: CONFIG_INFO :: MAX_RETRY [07:04] */ -#define OTP_CONFIG_INFO_MAX_RETRY_MASK 0x000000f0 -#define OTP_CONFIG_INFO_MAX_RETRY_ALIGN 0 -#define OTP_CONFIG_INFO_MAX_RETRY_BITS 4 -#define OTP_CONFIG_INFO_MAX_RETRY_SHIFT 4 - -/* OTP :: CONFIG_INFO :: reserved3 [03:01] */ -#define OTP_CONFIG_INFO_reserved3_MASK 0x0000000e -#define OTP_CONFIG_INFO_reserved3_ALIGN 0 -#define OTP_CONFIG_INFO_reserved3_BITS 3 -#define OTP_CONFIG_INFO_reserved3_SHIFT 1 - -/* OTP :: CONFIG_INFO :: PROG_MODE [00:00] */ -#define OTP_CONFIG_INFO_PROG_MODE_MASK 0x00000001 -#define OTP_CONFIG_INFO_PROG_MODE_ALIGN 0 -#define OTP_CONFIG_INFO_PROG_MODE_BITS 1 -#define OTP_CONFIG_INFO_PROG_MODE_SHIFT 0 - - -/**************************************************************************** - * OTP :: CMD - ***************************************************************************/ -/* OTP :: CMD :: reserved0 [31:02] */ -#define OTP_CMD_reserved0_MASK 0xfffffffc -#define OTP_CMD_reserved0_ALIGN 0 -#define OTP_CMD_reserved0_BITS 30 -#define OTP_CMD_reserved0_SHIFT 2 - -/* OTP :: CMD :: KEYS_AVAIL [01:01] */ -#define OTP_CMD_KEYS_AVAIL_MASK 0x00000002 -#define OTP_CMD_KEYS_AVAIL_ALIGN 0 -#define OTP_CMD_KEYS_AVAIL_BITS 1 -#define OTP_CMD_KEYS_AVAIL_SHIFT 1 - -/* OTP :: CMD :: PROGRAM_OTP [00:00] */ -#define OTP_CMD_PROGRAM_OTP_MASK 0x00000001 -#define OTP_CMD_PROGRAM_OTP_ALIGN 0 -#define OTP_CMD_PROGRAM_OTP_BITS 1 -#define OTP_CMD_PROGRAM_OTP_SHIFT 0 - - -/**************************************************************************** - * OTP :: STATUS - ***************************************************************************/ -/* OTP :: STATUS :: reserved0 [31:30] */ -#define OTP_STATUS_reserved0_MASK 0xc0000000 -#define OTP_STATUS_reserved0_ALIGN 0 -#define OTP_STATUS_reserved0_BITS 2 -#define OTP_STATUS_reserved0_SHIFT 30 - -/* OTP :: STATUS :: TOTAL_RETRIES [29:17] */ -#define OTP_STATUS_TOTAL_RETRIES_MASK 0x3ffe0000 -#define OTP_STATUS_TOTAL_RETRIES_ALIGN 0 -#define OTP_STATUS_TOTAL_RETRIES_BITS 13 -#define OTP_STATUS_TOTAL_RETRIES_SHIFT 17 - -/* OTP :: STATUS :: ROWS_USED [16:12] */ -#define OTP_STATUS_ROWS_USED_MASK 0x0001f000 -#define OTP_STATUS_ROWS_USED_ALIGN 0 -#define OTP_STATUS_ROWS_USED_BITS 5 -#define OTP_STATUS_ROWS_USED_SHIFT 12 - -/* OTP :: STATUS :: MAX_RETRIES [11:08] */ -#define OTP_STATUS_MAX_RETRIES_MASK 0x00000f00 -#define OTP_STATUS_MAX_RETRIES_ALIGN 0 -#define OTP_STATUS_MAX_RETRIES_BITS 4 -#define OTP_STATUS_MAX_RETRIES_SHIFT 8 - -/* OTP :: STATUS :: PROG_STATUS [07:04] */ -#define OTP_STATUS_PROG_STATUS_MASK 0x000000f0 -#define OTP_STATUS_PROG_STATUS_ALIGN 0 -#define OTP_STATUS_PROG_STATUS_BITS 4 -#define OTP_STATUS_PROG_STATUS_SHIFT 4 - -/* OTP :: STATUS :: reserved1 [03:03] */ -#define OTP_STATUS_reserved1_MASK 0x00000008 -#define OTP_STATUS_reserved1_ALIGN 0 -#define OTP_STATUS_reserved1_BITS 1 -#define OTP_STATUS_reserved1_SHIFT 3 - -/* OTP :: STATUS :: CHECKSUM_MISMATCH [02:02] */ -#define OTP_STATUS_CHECKSUM_MISMATCH_MASK 0x00000004 -#define OTP_STATUS_CHECKSUM_MISMATCH_ALIGN 0 -#define OTP_STATUS_CHECKSUM_MISMATCH_BITS 1 -#define OTP_STATUS_CHECKSUM_MISMATCH_SHIFT 2 - -/* OTP :: STATUS :: INSUFFICIENT_ROWS [01:01] */ -#define OTP_STATUS_INSUFFICIENT_ROWS_MASK 0x00000002 -#define OTP_STATUS_INSUFFICIENT_ROWS_ALIGN 0 -#define OTP_STATUS_INSUFFICIENT_ROWS_BITS 1 -#define OTP_STATUS_INSUFFICIENT_ROWS_SHIFT 1 - -/* OTP :: STATUS :: PROGRAMMED [00:00] */ -#define OTP_STATUS_PROGRAMMED_MASK 0x00000001 -#define OTP_STATUS_PROGRAMMED_ALIGN 0 -#define OTP_STATUS_PROGRAMMED_BITS 1 -#define OTP_STATUS_PROGRAMMED_SHIFT 0 - - -/**************************************************************************** - * OTP :: CONTENT_MISC - ***************************************************************************/ -/* OTP :: CONTENT_MISC :: reserved0 [31:06] */ -#define OTP_CONTENT_MISC_reserved0_MASK 0xffffffc0 -#define OTP_CONTENT_MISC_reserved0_ALIGN 0 -#define OTP_CONTENT_MISC_reserved0_BITS 26 -#define OTP_CONTENT_MISC_reserved0_SHIFT 6 - -/* OTP :: CONTENT_MISC :: DCI_SECURITY_ENABLE [05:05] */ -#define OTP_CONTENT_MISC_DCI_SECURITY_ENABLE_MASK 0x00000020 -#define OTP_CONTENT_MISC_DCI_SECURITY_ENABLE_ALIGN 0 -#define OTP_CONTENT_MISC_DCI_SECURITY_ENABLE_BITS 1 -#define OTP_CONTENT_MISC_DCI_SECURITY_ENABLE_SHIFT 5 - -/* OTP :: CONTENT_MISC :: AES_SECURITY_ENABLE [04:04] */ -#define OTP_CONTENT_MISC_AES_SECURITY_ENABLE_MASK 0x00000010 -#define OTP_CONTENT_MISC_AES_SECURITY_ENABLE_ALIGN 0 -#define OTP_CONTENT_MISC_AES_SECURITY_ENABLE_BITS 1 -#define OTP_CONTENT_MISC_AES_SECURITY_ENABLE_SHIFT 4 - -/* OTP :: CONTENT_MISC :: DISABLE_JTAG [03:03] */ -#define OTP_CONTENT_MISC_DISABLE_JTAG_MASK 0x00000008 -#define OTP_CONTENT_MISC_DISABLE_JTAG_ALIGN 0 -#define OTP_CONTENT_MISC_DISABLE_JTAG_BITS 1 -#define OTP_CONTENT_MISC_DISABLE_JTAG_SHIFT 3 - -/* OTP :: CONTENT_MISC :: DISABLE_UART [02:02] */ -#define OTP_CONTENT_MISC_DISABLE_UART_MASK 0x00000004 -#define OTP_CONTENT_MISC_DISABLE_UART_ALIGN 0 -#define OTP_CONTENT_MISC_DISABLE_UART_BITS 1 -#define OTP_CONTENT_MISC_DISABLE_UART_SHIFT 2 - -/* OTP :: CONTENT_MISC :: ENABLE_RANDOMIZATION [01:01] */ -#define OTP_CONTENT_MISC_ENABLE_RANDOMIZATION_MASK 0x00000002 -#define OTP_CONTENT_MISC_ENABLE_RANDOMIZATION_ALIGN 0 -#define OTP_CONTENT_MISC_ENABLE_RANDOMIZATION_BITS 1 -#define OTP_CONTENT_MISC_ENABLE_RANDOMIZATION_SHIFT 1 - -/* OTP :: CONTENT_MISC :: OTP_SECURITY_ENABLE [00:00] */ -#define OTP_CONTENT_MISC_OTP_SECURITY_ENABLE_MASK 0x00000001 -#define OTP_CONTENT_MISC_OTP_SECURITY_ENABLE_ALIGN 0 -#define OTP_CONTENT_MISC_OTP_SECURITY_ENABLE_BITS 1 -#define OTP_CONTENT_MISC_OTP_SECURITY_ENABLE_SHIFT 0 - - -/**************************************************************************** - * OTP :: CONTENT_AES_0 - ***************************************************************************/ -/* OTP :: CONTENT_AES_0 :: AES_KEY_0 [31:00] */ -#define OTP_CONTENT_AES_0_AES_KEY_0_MASK 0xffffffff -#define OTP_CONTENT_AES_0_AES_KEY_0_ALIGN 0 -#define OTP_CONTENT_AES_0_AES_KEY_0_BITS 32 -#define OTP_CONTENT_AES_0_AES_KEY_0_SHIFT 0 - - -/**************************************************************************** - * OTP :: CONTENT_AES_1 - ***************************************************************************/ -/* OTP :: CONTENT_AES_1 :: AES_KEY_1 [31:00] */ -#define OTP_CONTENT_AES_1_AES_KEY_1_MASK 0xffffffff -#define OTP_CONTENT_AES_1_AES_KEY_1_ALIGN 0 -#define OTP_CONTENT_AES_1_AES_KEY_1_BITS 32 -#define OTP_CONTENT_AES_1_AES_KEY_1_SHIFT 0 - - -/**************************************************************************** - * OTP :: CONTENT_AES_2 - ***************************************************************************/ -/* OTP :: CONTENT_AES_2 :: AES_KEY_2 [31:00] */ -#define OTP_CONTENT_AES_2_AES_KEY_2_MASK 0xffffffff -#define OTP_CONTENT_AES_2_AES_KEY_2_ALIGN 0 -#define OTP_CONTENT_AES_2_AES_KEY_2_BITS 32 -#define OTP_CONTENT_AES_2_AES_KEY_2_SHIFT 0 - - -/**************************************************************************** - * OTP :: CONTENT_AES_3 - ***************************************************************************/ -/* OTP :: CONTENT_AES_3 :: AES_KEY_3 [31:00] */ -#define OTP_CONTENT_AES_3_AES_KEY_3_MASK 0xffffffff -#define OTP_CONTENT_AES_3_AES_KEY_3_ALIGN 0 -#define OTP_CONTENT_AES_3_AES_KEY_3_BITS 32 -#define OTP_CONTENT_AES_3_AES_KEY_3_SHIFT 0 - - -/**************************************************************************** - * OTP :: CONTENT_SHA_0 - ***************************************************************************/ -/* OTP :: CONTENT_SHA_0 :: SHA_KEY_0 [31:00] */ -#define OTP_CONTENT_SHA_0_SHA_KEY_0_MASK 0xffffffff -#define OTP_CONTENT_SHA_0_SHA_KEY_0_ALIGN 0 -#define OTP_CONTENT_SHA_0_SHA_KEY_0_BITS 32 -#define OTP_CONTENT_SHA_0_SHA_KEY_0_SHIFT 0 - - -/**************************************************************************** - * OTP :: CONTENT_SHA_1 - ***************************************************************************/ -/* OTP :: CONTENT_SHA_1 :: SHA_KEY_1 [31:00] */ -#define OTP_CONTENT_SHA_1_SHA_KEY_1_MASK 0xffffffff -#define OTP_CONTENT_SHA_1_SHA_KEY_1_ALIGN 0 -#define OTP_CONTENT_SHA_1_SHA_KEY_1_BITS 32 -#define OTP_CONTENT_SHA_1_SHA_KEY_1_SHIFT 0 - - -/**************************************************************************** - * OTP :: CONTENT_SHA_2 - ***************************************************************************/ -/* OTP :: CONTENT_SHA_2 :: SHA_KEY_2 [31:00] */ -#define OTP_CONTENT_SHA_2_SHA_KEY_2_MASK 0xffffffff -#define OTP_CONTENT_SHA_2_SHA_KEY_2_ALIGN 0 -#define OTP_CONTENT_SHA_2_SHA_KEY_2_BITS 32 -#define OTP_CONTENT_SHA_2_SHA_KEY_2_SHIFT 0 - - -/**************************************************************************** - * OTP :: CONTENT_SHA_3 - ***************************************************************************/ -/* OTP :: CONTENT_SHA_3 :: SHA_KEY_3 [31:00] */ -#define OTP_CONTENT_SHA_3_SHA_KEY_3_MASK 0xffffffff -#define OTP_CONTENT_SHA_3_SHA_KEY_3_ALIGN 0 -#define OTP_CONTENT_SHA_3_SHA_KEY_3_BITS 32 -#define OTP_CONTENT_SHA_3_SHA_KEY_3_SHIFT 0 - - -/**************************************************************************** - * OTP :: CONTENT_SHA_4 - ***************************************************************************/ -/* OTP :: CONTENT_SHA_4 :: SHA_KEY_4 [31:00] */ -#define OTP_CONTENT_SHA_4_SHA_KEY_4_MASK 0xffffffff -#define OTP_CONTENT_SHA_4_SHA_KEY_4_ALIGN 0 -#define OTP_CONTENT_SHA_4_SHA_KEY_4_BITS 32 -#define OTP_CONTENT_SHA_4_SHA_KEY_4_SHIFT 0 - - -/**************************************************************************** - * OTP :: CONTENT_SHA_5 - ***************************************************************************/ -/* OTP :: CONTENT_SHA_5 :: SHA_KEY_5 [31:00] */ -#define OTP_CONTENT_SHA_5_SHA_KEY_5_MASK 0xffffffff -#define OTP_CONTENT_SHA_5_SHA_KEY_5_ALIGN 0 -#define OTP_CONTENT_SHA_5_SHA_KEY_5_BITS 32 -#define OTP_CONTENT_SHA_5_SHA_KEY_5_SHIFT 0 - - -/**************************************************************************** - * OTP :: CONTENT_SHA_6 - ***************************************************************************/ -/* OTP :: CONTENT_SHA_6 :: SHA_KEY_6 [31:00] */ -#define OTP_CONTENT_SHA_6_SHA_KEY_6_MASK 0xffffffff -#define OTP_CONTENT_SHA_6_SHA_KEY_6_ALIGN 0 -#define OTP_CONTENT_SHA_6_SHA_KEY_6_BITS 32 -#define OTP_CONTENT_SHA_6_SHA_KEY_6_SHIFT 0 - - -/**************************************************************************** - * OTP :: CONTENT_SHA_7 - ***************************************************************************/ -/* OTP :: CONTENT_SHA_7 :: SHA_KEY_7 [31:00] */ -#define OTP_CONTENT_SHA_7_SHA_KEY_7_MASK 0xffffffff -#define OTP_CONTENT_SHA_7_SHA_KEY_7_ALIGN 0 -#define OTP_CONTENT_SHA_7_SHA_KEY_7_BITS 32 -#define OTP_CONTENT_SHA_7_SHA_KEY_7_SHIFT 0 - - -/**************************************************************************** - * OTP :: CONTENT_CHECKSUM - ***************************************************************************/ -/* OTP :: CONTENT_CHECKSUM :: reserved0 [31:16] */ -#define OTP_CONTENT_CHECKSUM_reserved0_MASK 0xffff0000 -#define OTP_CONTENT_CHECKSUM_reserved0_ALIGN 0 -#define OTP_CONTENT_CHECKSUM_reserved0_BITS 16 -#define OTP_CONTENT_CHECKSUM_reserved0_SHIFT 16 - -/* OTP :: CONTENT_CHECKSUM :: CHECKSUM [15:00] */ -#define OTP_CONTENT_CHECKSUM_CHECKSUM_MASK 0x0000ffff -#define OTP_CONTENT_CHECKSUM_CHECKSUM_ALIGN 0 -#define OTP_CONTENT_CHECKSUM_CHECKSUM_BITS 16 -#define OTP_CONTENT_CHECKSUM_CHECKSUM_SHIFT 0 - - -/**************************************************************************** - * OTP :: PROG_CTRL - ***************************************************************************/ -/* OTP :: PROG_CTRL :: reserved0 [31:02] */ -#define OTP_PROG_CTRL_reserved0_MASK 0xfffffffc -#define OTP_PROG_CTRL_reserved0_ALIGN 0 -#define OTP_PROG_CTRL_reserved0_BITS 30 -#define OTP_PROG_CTRL_reserved0_SHIFT 2 - -/* OTP :: PROG_CTRL :: ENABLE [01:01] */ -#define OTP_PROG_CTRL_ENABLE_MASK 0x00000002 -#define OTP_PROG_CTRL_ENABLE_ALIGN 0 -#define OTP_PROG_CTRL_ENABLE_BITS 1 -#define OTP_PROG_CTRL_ENABLE_SHIFT 1 - -/* OTP :: PROG_CTRL :: RST [00:00] */ -#define OTP_PROG_CTRL_RST_MASK 0x00000001 -#define OTP_PROG_CTRL_RST_ALIGN 0 -#define OTP_PROG_CTRL_RST_BITS 1 -#define OTP_PROG_CTRL_RST_SHIFT 0 - - -/**************************************************************************** - * OTP :: PROG_STATUS - ***************************************************************************/ -/* OTP :: PROG_STATUS :: reserved0 [31:02] */ -#define OTP_PROG_STATUS_reserved0_MASK 0xfffffffc -#define OTP_PROG_STATUS_reserved0_ALIGN 0 -#define OTP_PROG_STATUS_reserved0_BITS 30 -#define OTP_PROG_STATUS_reserved0_SHIFT 2 - -/* OTP :: PROG_STATUS :: ORDY [01:01] */ -#define OTP_PROG_STATUS_ORDY_MASK 0x00000002 -#define OTP_PROG_STATUS_ORDY_ALIGN 0 -#define OTP_PROG_STATUS_ORDY_BITS 1 -#define OTP_PROG_STATUS_ORDY_SHIFT 1 - -/* OTP :: PROG_STATUS :: IRDY [00:00] */ -#define OTP_PROG_STATUS_IRDY_MASK 0x00000001 -#define OTP_PROG_STATUS_IRDY_ALIGN 0 -#define OTP_PROG_STATUS_IRDY_BITS 1 -#define OTP_PROG_STATUS_IRDY_SHIFT 0 - - -/**************************************************************************** - * OTP :: PROG_PULSE - ***************************************************************************/ -/* OTP :: PROG_PULSE :: PROG_HI [31:00] */ -#define OTP_PROG_PULSE_PROG_HI_MASK 0xffffffff -#define OTP_PROG_PULSE_PROG_HI_ALIGN 0 -#define OTP_PROG_PULSE_PROG_HI_BITS 32 -#define OTP_PROG_PULSE_PROG_HI_SHIFT 0 - - -/**************************************************************************** - * OTP :: VERIFY_PULSE - ***************************************************************************/ -/* OTP :: VERIFY_PULSE :: PROG_LOW [31:16] */ -#define OTP_VERIFY_PULSE_PROG_LOW_MASK 0xffff0000 -#define OTP_VERIFY_PULSE_PROG_LOW_ALIGN 0 -#define OTP_VERIFY_PULSE_PROG_LOW_BITS 16 -#define OTP_VERIFY_PULSE_PROG_LOW_SHIFT 16 - -/* OTP :: VERIFY_PULSE :: VERIFY [15:00] */ -#define OTP_VERIFY_PULSE_VERIFY_MASK 0x0000ffff -#define OTP_VERIFY_PULSE_VERIFY_ALIGN 0 -#define OTP_VERIFY_PULSE_VERIFY_BITS 16 -#define OTP_VERIFY_PULSE_VERIFY_SHIFT 0 - - -/**************************************************************************** - * OTP :: PROG_MASK - ***************************************************************************/ -/* OTP :: PROG_MASK :: reserved0 [31:17] */ -#define OTP_PROG_MASK_reserved0_MASK 0xfffe0000 -#define OTP_PROG_MASK_reserved0_ALIGN 0 -#define OTP_PROG_MASK_reserved0_BITS 15 -#define OTP_PROG_MASK_reserved0_SHIFT 17 - -/* OTP :: PROG_MASK :: PROG_MASK [16:00] */ -#define OTP_PROG_MASK_PROG_MASK_MASK 0x0001ffff -#define OTP_PROG_MASK_PROG_MASK_ALIGN 0 -#define OTP_PROG_MASK_PROG_MASK_BITS 17 -#define OTP_PROG_MASK_PROG_MASK_SHIFT 0 - - -/**************************************************************************** - * OTP :: DATA_INPUT - ***************************************************************************/ -/* OTP :: DATA_INPUT :: reserved0 [31:31] */ -#define OTP_DATA_INPUT_reserved0_MASK 0x80000000 -#define OTP_DATA_INPUT_reserved0_ALIGN 0 -#define OTP_DATA_INPUT_reserved0_BITS 1 -#define OTP_DATA_INPUT_reserved0_SHIFT 31 - -/* OTP :: DATA_INPUT :: CMD [30:28] */ -#define OTP_DATA_INPUT_CMD_MASK 0x70000000 -#define OTP_DATA_INPUT_CMD_ALIGN 0 -#define OTP_DATA_INPUT_CMD_BITS 3 -#define OTP_DATA_INPUT_CMD_SHIFT 28 - -/* OTP :: DATA_INPUT :: reserved1 [27:26] */ -#define OTP_DATA_INPUT_reserved1_MASK 0x0c000000 -#define OTP_DATA_INPUT_reserved1_ALIGN 0 -#define OTP_DATA_INPUT_reserved1_BITS 2 -#define OTP_DATA_INPUT_reserved1_SHIFT 26 - -/* OTP :: DATA_INPUT :: ADDR [25:20] */ -#define OTP_DATA_INPUT_ADDR_MASK 0x03f00000 -#define OTP_DATA_INPUT_ADDR_ALIGN 0 -#define OTP_DATA_INPUT_ADDR_BITS 6 -#define OTP_DATA_INPUT_ADDR_SHIFT 20 - -/* OTP :: DATA_INPUT :: reserved2 [19:18] */ -#define OTP_DATA_INPUT_reserved2_MASK 0x000c0000 -#define OTP_DATA_INPUT_reserved2_ALIGN 0 -#define OTP_DATA_INPUT_reserved2_BITS 2 -#define OTP_DATA_INPUT_reserved2_SHIFT 18 - -/* OTP :: DATA_INPUT :: WRCOL [17:17] */ -#define OTP_DATA_INPUT_WRCOL_MASK 0x00020000 -#define OTP_DATA_INPUT_WRCOL_ALIGN 0 -#define OTP_DATA_INPUT_WRCOL_BITS 1 -#define OTP_DATA_INPUT_WRCOL_SHIFT 17 - -/* OTP :: DATA_INPUT :: DIN [16:00] */ -#define OTP_DATA_INPUT_DIN_MASK 0x0001ffff -#define OTP_DATA_INPUT_DIN_ALIGN 0 -#define OTP_DATA_INPUT_DIN_BITS 17 -#define OTP_DATA_INPUT_DIN_SHIFT 0 - - -/**************************************************************************** - * OTP :: DATA_OUTPUT - ***************************************************************************/ -/* OTP :: DATA_OUTPUT :: reserved0 [31:17] */ -#define OTP_DATA_OUTPUT_reserved0_MASK 0xfffe0000 -#define OTP_DATA_OUTPUT_reserved0_ALIGN 0 -#define OTP_DATA_OUTPUT_reserved0_BITS 15 -#define OTP_DATA_OUTPUT_reserved0_SHIFT 17 - -/* OTP :: DATA_OUTPUT :: DOUT [16:00] */ -#define OTP_DATA_OUTPUT_DOUT_MASK 0x0001ffff -#define OTP_DATA_OUTPUT_DOUT_ALIGN 0 -#define OTP_DATA_OUTPUT_DOUT_BITS 17 -#define OTP_DATA_OUTPUT_DOUT_SHIFT 0 - - -/**************************************************************************** - * BCM70012_OTP_TOP_OTP_GR_BRIDGE - ***************************************************************************/ -/**************************************************************************** - * OTP_GR_BRIDGE :: REVISION - ***************************************************************************/ -/* OTP_GR_BRIDGE :: REVISION :: reserved0 [31:16] */ -#define OTP_GR_BRIDGE_REVISION_reserved0_MASK 0xffff0000 -#define OTP_GR_BRIDGE_REVISION_reserved0_ALIGN 0 -#define OTP_GR_BRIDGE_REVISION_reserved0_BITS 16 -#define OTP_GR_BRIDGE_REVISION_reserved0_SHIFT 16 - -/* OTP_GR_BRIDGE :: REVISION :: MAJOR [15:08] */ -#define OTP_GR_BRIDGE_REVISION_MAJOR_MASK 0x0000ff00 -#define OTP_GR_BRIDGE_REVISION_MAJOR_ALIGN 0 -#define OTP_GR_BRIDGE_REVISION_MAJOR_BITS 8 -#define OTP_GR_BRIDGE_REVISION_MAJOR_SHIFT 8 - -/* OTP_GR_BRIDGE :: REVISION :: MINOR [07:00] */ -#define OTP_GR_BRIDGE_REVISION_MINOR_MASK 0x000000ff -#define OTP_GR_BRIDGE_REVISION_MINOR_ALIGN 0 -#define OTP_GR_BRIDGE_REVISION_MINOR_BITS 8 -#define OTP_GR_BRIDGE_REVISION_MINOR_SHIFT 0 - - -/**************************************************************************** - * OTP_GR_BRIDGE :: CTRL - ***************************************************************************/ -/* OTP_GR_BRIDGE :: CTRL :: reserved0 [31:01] */ -#define OTP_GR_BRIDGE_CTRL_reserved0_MASK 0xfffffffe -#define OTP_GR_BRIDGE_CTRL_reserved0_ALIGN 0 -#define OTP_GR_BRIDGE_CTRL_reserved0_BITS 31 -#define OTP_GR_BRIDGE_CTRL_reserved0_SHIFT 1 - -/* OTP_GR_BRIDGE :: CTRL :: gisb_error_intr [00:00] */ -#define OTP_GR_BRIDGE_CTRL_gisb_error_intr_MASK 0x00000001 -#define OTP_GR_BRIDGE_CTRL_gisb_error_intr_ALIGN 0 -#define OTP_GR_BRIDGE_CTRL_gisb_error_intr_BITS 1 -#define OTP_GR_BRIDGE_CTRL_gisb_error_intr_SHIFT 0 -#define OTP_GR_BRIDGE_CTRL_gisb_error_intr_INTR_DISABLE 0 -#define OTP_GR_BRIDGE_CTRL_gisb_error_intr_INTR_ENABLE 1 - - -/**************************************************************************** - * OTP_GR_BRIDGE :: SPARE_SW_RESET_0 - ***************************************************************************/ -/* OTP_GR_BRIDGE :: SPARE_SW_RESET_0 :: reserved0 [31:01] */ -#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_MASK 0xfffffffe -#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_ALIGN 0 -#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_BITS 31 -#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_SHIFT 1 - -/* OTP_GR_BRIDGE :: SPARE_SW_RESET_0 :: SPARE_SW_RESET [00:00] */ -#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_MASK 0x00000001 -#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ALIGN 0 -#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_BITS 1 -#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_SHIFT 0 -#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_DEASSERT 0 -#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ASSERT 1 - - -/**************************************************************************** - * OTP_GR_BRIDGE :: SPARE_SW_RESET_1 - ***************************************************************************/ -/* OTP_GR_BRIDGE :: SPARE_SW_RESET_1 :: reserved0 [31:01] */ -#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_MASK 0xfffffffe -#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_ALIGN 0 -#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_BITS 31 -#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_SHIFT 1 - -/* OTP_GR_BRIDGE :: SPARE_SW_RESET_1 :: OTP_00_SW_RESET [00:00] */ -#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_OTP_00_SW_RESET_MASK 0x00000001 -#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_OTP_00_SW_RESET_ALIGN 0 -#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_OTP_00_SW_RESET_BITS 1 -#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_OTP_00_SW_RESET_SHIFT 0 -#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_OTP_00_SW_RESET_DEASSERT 0 -#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_OTP_00_SW_RESET_ASSERT 1 - - -/**************************************************************************** - * BCM70012_AES_TOP_AES - ***************************************************************************/ -/**************************************************************************** - * AES :: CONFIG_INFO - ***************************************************************************/ -/* AES :: CONFIG_INFO :: SWAP [31:31] */ -#define AES_CONFIG_INFO_SWAP_MASK 0x80000000 -#define AES_CONFIG_INFO_SWAP_ALIGN 0 -#define AES_CONFIG_INFO_SWAP_BITS 1 -#define AES_CONFIG_INFO_SWAP_SHIFT 31 - -/* AES :: CONFIG_INFO :: reserved0 [30:19] */ -#define AES_CONFIG_INFO_reserved0_MASK 0x7ff80000 -#define AES_CONFIG_INFO_reserved0_ALIGN 0 -#define AES_CONFIG_INFO_reserved0_BITS 12 -#define AES_CONFIG_INFO_reserved0_SHIFT 19 - -/* AES :: CONFIG_INFO :: OFFSET [18:02] */ -#define AES_CONFIG_INFO_OFFSET_MASK 0x0007fffc -#define AES_CONFIG_INFO_OFFSET_ALIGN 0 -#define AES_CONFIG_INFO_OFFSET_BITS 17 -#define AES_CONFIG_INFO_OFFSET_SHIFT 2 - -/* AES :: CONFIG_INFO :: reserved1 [01:00] */ -#define AES_CONFIG_INFO_reserved1_MASK 0x00000003 -#define AES_CONFIG_INFO_reserved1_ALIGN 0 -#define AES_CONFIG_INFO_reserved1_BITS 2 -#define AES_CONFIG_INFO_reserved1_SHIFT 0 - - -/**************************************************************************** - * AES :: CMD - ***************************************************************************/ -/* AES :: CMD :: reserved0 [31:13] */ -#define AES_CMD_reserved0_MASK 0xffffe000 -#define AES_CMD_reserved0_ALIGN 0 -#define AES_CMD_reserved0_BITS 19 -#define AES_CMD_reserved0_SHIFT 13 - -/* AES :: CMD :: WRITE_EEPROM [12:12] */ -#define AES_CMD_WRITE_EEPROM_MASK 0x00001000 -#define AES_CMD_WRITE_EEPROM_ALIGN 0 -#define AES_CMD_WRITE_EEPROM_BITS 1 -#define AES_CMD_WRITE_EEPROM_SHIFT 12 - -/* AES :: CMD :: reserved1 [11:09] */ -#define AES_CMD_reserved1_MASK 0x00000e00 -#define AES_CMD_reserved1_ALIGN 0 -#define AES_CMD_reserved1_BITS 3 -#define AES_CMD_reserved1_SHIFT 9 - -/* AES :: CMD :: START_EEPROM_COPY [08:08] */ -#define AES_CMD_START_EEPROM_COPY_MASK 0x00000100 -#define AES_CMD_START_EEPROM_COPY_ALIGN 0 -#define AES_CMD_START_EEPROM_COPY_BITS 1 -#define AES_CMD_START_EEPROM_COPY_SHIFT 8 - -/* AES :: CMD :: reserved2 [07:05] */ -#define AES_CMD_reserved2_MASK 0x000000e0 -#define AES_CMD_reserved2_ALIGN 0 -#define AES_CMD_reserved2_BITS 3 -#define AES_CMD_reserved2_SHIFT 5 - -/* AES :: CMD :: PREPARE_ENCRYPTION [04:04] */ -#define AES_CMD_PREPARE_ENCRYPTION_MASK 0x00000010 -#define AES_CMD_PREPARE_ENCRYPTION_ALIGN 0 -#define AES_CMD_PREPARE_ENCRYPTION_BITS 1 -#define AES_CMD_PREPARE_ENCRYPTION_SHIFT 4 - -/* AES :: CMD :: reserved3 [03:01] */ -#define AES_CMD_reserved3_MASK 0x0000000e -#define AES_CMD_reserved3_ALIGN 0 -#define AES_CMD_reserved3_BITS 3 -#define AES_CMD_reserved3_SHIFT 1 - -/* AES :: CMD :: START_KEY_LOAD [00:00] */ -#define AES_CMD_START_KEY_LOAD_MASK 0x00000001 -#define AES_CMD_START_KEY_LOAD_ALIGN 0 -#define AES_CMD_START_KEY_LOAD_BITS 1 -#define AES_CMD_START_KEY_LOAD_SHIFT 0 - - -/**************************************************************************** - * AES :: STATUS - ***************************************************************************/ -/* AES :: STATUS :: reserved0 [31:23] */ -#define AES_STATUS_reserved0_MASK 0xff800000 -#define AES_STATUS_reserved0_ALIGN 0 -#define AES_STATUS_reserved0_BITS 9 -#define AES_STATUS_reserved0_SHIFT 23 - -/* AES :: STATUS :: STUCK_AT_ZERO [22:22] */ -#define AES_STATUS_STUCK_AT_ZERO_MASK 0x00400000 -#define AES_STATUS_STUCK_AT_ZERO_ALIGN 0 -#define AES_STATUS_STUCK_AT_ZERO_BITS 1 -#define AES_STATUS_STUCK_AT_ZERO_SHIFT 22 - -/* AES :: STATUS :: STUCK_AT_ONE [21:21] */ -#define AES_STATUS_STUCK_AT_ONE_MASK 0x00200000 -#define AES_STATUS_STUCK_AT_ONE_ALIGN 0 -#define AES_STATUS_STUCK_AT_ONE_BITS 1 -#define AES_STATUS_STUCK_AT_ONE_SHIFT 21 - -/* AES :: STATUS :: RANDOM_READY [20:20] */ -#define AES_STATUS_RANDOM_READY_MASK 0x00100000 -#define AES_STATUS_RANDOM_READY_ALIGN 0 -#define AES_STATUS_RANDOM_READY_BITS 1 -#define AES_STATUS_RANDOM_READY_SHIFT 20 - -/* AES :: STATUS :: reserved1 [19:16] */ -#define AES_STATUS_reserved1_MASK 0x000f0000 -#define AES_STATUS_reserved1_ALIGN 0 -#define AES_STATUS_reserved1_BITS 4 -#define AES_STATUS_reserved1_SHIFT 16 - -/* AES :: STATUS :: WRITE_EEPROM_TIMEOUT [15:15] */ -#define AES_STATUS_WRITE_EEPROM_TIMEOUT_MASK 0x00008000 -#define AES_STATUS_WRITE_EEPROM_TIMEOUT_ALIGN 0 -#define AES_STATUS_WRITE_EEPROM_TIMEOUT_BITS 1 -#define AES_STATUS_WRITE_EEPROM_TIMEOUT_SHIFT 15 - -/* AES :: STATUS :: WRITE_DATA_MISMATCH [14:14] */ -#define AES_STATUS_WRITE_DATA_MISMATCH_MASK 0x00004000 -#define AES_STATUS_WRITE_DATA_MISMATCH_ALIGN 0 -#define AES_STATUS_WRITE_DATA_MISMATCH_BITS 1 -#define AES_STATUS_WRITE_DATA_MISMATCH_SHIFT 14 - -/* AES :: STATUS :: WRITE_GISB_ERROR [13:13] */ -#define AES_STATUS_WRITE_GISB_ERROR_MASK 0x00002000 -#define AES_STATUS_WRITE_GISB_ERROR_ALIGN 0 -#define AES_STATUS_WRITE_GISB_ERROR_BITS 1 -#define AES_STATUS_WRITE_GISB_ERROR_SHIFT 13 - -/* AES :: STATUS :: WRITE_DONE [12:12] */ -#define AES_STATUS_WRITE_DONE_MASK 0x00001000 -#define AES_STATUS_WRITE_DONE_ALIGN 0 -#define AES_STATUS_WRITE_DONE_BITS 1 -#define AES_STATUS_WRITE_DONE_SHIFT 12 - -/* AES :: STATUS :: reserved2 [11:11] */ -#define AES_STATUS_reserved2_MASK 0x00000800 -#define AES_STATUS_reserved2_ALIGN 0 -#define AES_STATUS_reserved2_BITS 1 -#define AES_STATUS_reserved2_SHIFT 11 - -/* AES :: STATUS :: COPY_EEPROM_ERROR [10:10] */ -#define AES_STATUS_COPY_EEPROM_ERROR_MASK 0x00000400 -#define AES_STATUS_COPY_EEPROM_ERROR_ALIGN 0 -#define AES_STATUS_COPY_EEPROM_ERROR_BITS 1 -#define AES_STATUS_COPY_EEPROM_ERROR_SHIFT 10 - -/* AES :: STATUS :: COPY_GISB_ERROR [09:09] */ -#define AES_STATUS_COPY_GISB_ERROR_MASK 0x00000200 -#define AES_STATUS_COPY_GISB_ERROR_ALIGN 0 -#define AES_STATUS_COPY_GISB_ERROR_BITS 1 -#define AES_STATUS_COPY_GISB_ERROR_SHIFT 9 - -/* AES :: STATUS :: COPY_DONE [08:08] */ -#define AES_STATUS_COPY_DONE_MASK 0x00000100 -#define AES_STATUS_COPY_DONE_ALIGN 0 -#define AES_STATUS_COPY_DONE_BITS 1 -#define AES_STATUS_COPY_DONE_SHIFT 8 - -/* AES :: STATUS :: PREPARE_EEPROM_TIMEOUT [07:07] */ -#define AES_STATUS_PREPARE_EEPROM_TIMEOUT_MASK 0x00000080 -#define AES_STATUS_PREPARE_EEPROM_TIMEOUT_ALIGN 0 -#define AES_STATUS_PREPARE_EEPROM_TIMEOUT_BITS 1 -#define AES_STATUS_PREPARE_EEPROM_TIMEOUT_SHIFT 7 - -/* AES :: STATUS :: PREPARE_DATA_MISMATCH [06:06] */ -#define AES_STATUS_PREPARE_DATA_MISMATCH_MASK 0x00000040 -#define AES_STATUS_PREPARE_DATA_MISMATCH_ALIGN 0 -#define AES_STATUS_PREPARE_DATA_MISMATCH_BITS 1 -#define AES_STATUS_PREPARE_DATA_MISMATCH_SHIFT 6 - -/* AES :: STATUS :: PREPARE_GISB_ERROR [05:05] */ -#define AES_STATUS_PREPARE_GISB_ERROR_MASK 0x00000020 -#define AES_STATUS_PREPARE_GISB_ERROR_ALIGN 0 -#define AES_STATUS_PREPARE_GISB_ERROR_BITS 1 -#define AES_STATUS_PREPARE_GISB_ERROR_SHIFT 5 - -/* AES :: STATUS :: PREPARE_DONE [04:04] */ -#define AES_STATUS_PREPARE_DONE_MASK 0x00000010 -#define AES_STATUS_PREPARE_DONE_ALIGN 0 -#define AES_STATUS_PREPARE_DONE_BITS 1 -#define AES_STATUS_PREPARE_DONE_SHIFT 4 - -/* AES :: STATUS :: reserved3 [03:02] */ -#define AES_STATUS_reserved3_MASK 0x0000000c -#define AES_STATUS_reserved3_ALIGN 0 -#define AES_STATUS_reserved3_BITS 2 -#define AES_STATUS_reserved3_SHIFT 2 - -/* AES :: STATUS :: KEY_LOAD_GISB_ERROR [01:01] */ -#define AES_STATUS_KEY_LOAD_GISB_ERROR_MASK 0x00000002 -#define AES_STATUS_KEY_LOAD_GISB_ERROR_ALIGN 0 -#define AES_STATUS_KEY_LOAD_GISB_ERROR_BITS 1 -#define AES_STATUS_KEY_LOAD_GISB_ERROR_SHIFT 1 - -/* AES :: STATUS :: KEY_LOAD_DONE [00:00] */ -#define AES_STATUS_KEY_LOAD_DONE_MASK 0x00000001 -#define AES_STATUS_KEY_LOAD_DONE_ALIGN 0 -#define AES_STATUS_KEY_LOAD_DONE_BITS 1 -#define AES_STATUS_KEY_LOAD_DONE_SHIFT 0 - - -/**************************************************************************** - * AES :: EEPROM_CONFIG - ***************************************************************************/ -/* AES :: EEPROM_CONFIG :: LENGTH [31:20] */ -#define AES_EEPROM_CONFIG_LENGTH_MASK 0xfff00000 -#define AES_EEPROM_CONFIG_LENGTH_ALIGN 0 -#define AES_EEPROM_CONFIG_LENGTH_BITS 12 -#define AES_EEPROM_CONFIG_LENGTH_SHIFT 20 - -/* AES :: EEPROM_CONFIG :: reserved0 [19:16] */ -#define AES_EEPROM_CONFIG_reserved0_MASK 0x000f0000 -#define AES_EEPROM_CONFIG_reserved0_ALIGN 0 -#define AES_EEPROM_CONFIG_reserved0_BITS 4 -#define AES_EEPROM_CONFIG_reserved0_SHIFT 16 - -/* AES :: EEPROM_CONFIG :: START_ADDR [15:02] */ -#define AES_EEPROM_CONFIG_START_ADDR_MASK 0x0000fffc -#define AES_EEPROM_CONFIG_START_ADDR_ALIGN 0 -#define AES_EEPROM_CONFIG_START_ADDR_BITS 14 -#define AES_EEPROM_CONFIG_START_ADDR_SHIFT 2 - -/* AES :: EEPROM_CONFIG :: reserved1 [01:00] */ -#define AES_EEPROM_CONFIG_reserved1_MASK 0x00000003 -#define AES_EEPROM_CONFIG_reserved1_ALIGN 0 -#define AES_EEPROM_CONFIG_reserved1_BITS 2 -#define AES_EEPROM_CONFIG_reserved1_SHIFT 0 - - -/**************************************************************************** - * AES :: EEPROM_DATA_0 - ***************************************************************************/ -/* AES :: EEPROM_DATA_0 :: DATA [31:00] */ -#define AES_EEPROM_DATA_0_DATA_MASK 0xffffffff -#define AES_EEPROM_DATA_0_DATA_ALIGN 0 -#define AES_EEPROM_DATA_0_DATA_BITS 32 -#define AES_EEPROM_DATA_0_DATA_SHIFT 0 - - -/**************************************************************************** - * AES :: EEPROM_DATA_1 - ***************************************************************************/ -/* AES :: EEPROM_DATA_1 :: DATA [31:00] */ -#define AES_EEPROM_DATA_1_DATA_MASK 0xffffffff -#define AES_EEPROM_DATA_1_DATA_ALIGN 0 -#define AES_EEPROM_DATA_1_DATA_BITS 32 -#define AES_EEPROM_DATA_1_DATA_SHIFT 0 - - -/**************************************************************************** - * AES :: EEPROM_DATA_2 - ***************************************************************************/ -/* AES :: EEPROM_DATA_2 :: DATA [31:00] */ -#define AES_EEPROM_DATA_2_DATA_MASK 0xffffffff -#define AES_EEPROM_DATA_2_DATA_ALIGN 0 -#define AES_EEPROM_DATA_2_DATA_BITS 32 -#define AES_EEPROM_DATA_2_DATA_SHIFT 0 - - -/**************************************************************************** - * AES :: EEPROM_DATA_3 - ***************************************************************************/ -/* AES :: EEPROM_DATA_3 :: DATA [31:00] */ -#define AES_EEPROM_DATA_3_DATA_MASK 0xffffffff -#define AES_EEPROM_DATA_3_DATA_ALIGN 0 -#define AES_EEPROM_DATA_3_DATA_BITS 32 -#define AES_EEPROM_DATA_3_DATA_SHIFT 0 - - -/**************************************************************************** - * BCM70012_AES_TOP_AES_RGR_BRIDGE - ***************************************************************************/ -/**************************************************************************** - * AES_RGR_BRIDGE :: REVISION - ***************************************************************************/ -/* AES_RGR_BRIDGE :: REVISION :: reserved0 [31:16] */ -#define AES_RGR_BRIDGE_REVISION_reserved0_MASK 0xffff0000 -#define AES_RGR_BRIDGE_REVISION_reserved0_ALIGN 0 -#define AES_RGR_BRIDGE_REVISION_reserved0_BITS 16 -#define AES_RGR_BRIDGE_REVISION_reserved0_SHIFT 16 - -/* AES_RGR_BRIDGE :: REVISION :: MAJOR [15:08] */ -#define AES_RGR_BRIDGE_REVISION_MAJOR_MASK 0x0000ff00 -#define AES_RGR_BRIDGE_REVISION_MAJOR_ALIGN 0 -#define AES_RGR_BRIDGE_REVISION_MAJOR_BITS 8 -#define AES_RGR_BRIDGE_REVISION_MAJOR_SHIFT 8 - -/* AES_RGR_BRIDGE :: REVISION :: MINOR [07:00] */ -#define AES_RGR_BRIDGE_REVISION_MINOR_MASK 0x000000ff -#define AES_RGR_BRIDGE_REVISION_MINOR_ALIGN 0 -#define AES_RGR_BRIDGE_REVISION_MINOR_BITS 8 -#define AES_RGR_BRIDGE_REVISION_MINOR_SHIFT 0 - - -/**************************************************************************** - * AES_RGR_BRIDGE :: CTRL - ***************************************************************************/ -/* AES_RGR_BRIDGE :: CTRL :: reserved0 [31:02] */ -#define AES_RGR_BRIDGE_CTRL_reserved0_MASK 0xfffffffc -#define AES_RGR_BRIDGE_CTRL_reserved0_ALIGN 0 -#define AES_RGR_BRIDGE_CTRL_reserved0_BITS 30 -#define AES_RGR_BRIDGE_CTRL_reserved0_SHIFT 2 - -/* AES_RGR_BRIDGE :: CTRL :: rbus_error_intr [01:01] */ -#define AES_RGR_BRIDGE_CTRL_rbus_error_intr_MASK 0x00000002 -#define AES_RGR_BRIDGE_CTRL_rbus_error_intr_ALIGN 0 -#define AES_RGR_BRIDGE_CTRL_rbus_error_intr_BITS 1 -#define AES_RGR_BRIDGE_CTRL_rbus_error_intr_SHIFT 1 -#define AES_RGR_BRIDGE_CTRL_rbus_error_intr_INTR_DISABLE 0 -#define AES_RGR_BRIDGE_CTRL_rbus_error_intr_INTR_ENABLE 1 - -/* AES_RGR_BRIDGE :: CTRL :: gisb_error_intr [00:00] */ -#define AES_RGR_BRIDGE_CTRL_gisb_error_intr_MASK 0x00000001 -#define AES_RGR_BRIDGE_CTRL_gisb_error_intr_ALIGN 0 -#define AES_RGR_BRIDGE_CTRL_gisb_error_intr_BITS 1 -#define AES_RGR_BRIDGE_CTRL_gisb_error_intr_SHIFT 0 -#define AES_RGR_BRIDGE_CTRL_gisb_error_intr_INTR_DISABLE 0 -#define AES_RGR_BRIDGE_CTRL_gisb_error_intr_INTR_ENABLE 1 - - -/**************************************************************************** - * AES_RGR_BRIDGE :: RBUS_TIMER - ***************************************************************************/ -/* AES_RGR_BRIDGE :: RBUS_TIMER :: reserved0 [31:16] */ -#define AES_RGR_BRIDGE_RBUS_TIMER_reserved0_MASK 0xffff0000 -#define AES_RGR_BRIDGE_RBUS_TIMER_reserved0_ALIGN 0 -#define AES_RGR_BRIDGE_RBUS_TIMER_reserved0_BITS 16 -#define AES_RGR_BRIDGE_RBUS_TIMER_reserved0_SHIFT 16 - -/* AES_RGR_BRIDGE :: RBUS_TIMER :: timer_value [15:00] */ -#define AES_RGR_BRIDGE_RBUS_TIMER_timer_value_MASK 0x0000ffff -#define AES_RGR_BRIDGE_RBUS_TIMER_timer_value_ALIGN 0 -#define AES_RGR_BRIDGE_RBUS_TIMER_timer_value_BITS 16 -#define AES_RGR_BRIDGE_RBUS_TIMER_timer_value_SHIFT 0 - - -/**************************************************************************** - * AES_RGR_BRIDGE :: SPARE_SW_RESET_0 - ***************************************************************************/ -/* AES_RGR_BRIDGE :: SPARE_SW_RESET_0 :: reserved0 [31:01] */ -#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_MASK 0xfffffffe -#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_ALIGN 0 -#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_BITS 31 -#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_SHIFT 1 - -/* AES_RGR_BRIDGE :: SPARE_SW_RESET_0 :: SPARE_SW_RESET [00:00] */ -#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_MASK 0x00000001 -#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ALIGN 0 -#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_BITS 1 -#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_SHIFT 0 -#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_DEASSERT 0 -#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ASSERT 1 - - -/**************************************************************************** - * AES_RGR_BRIDGE :: SPARE_SW_RESET_1 - ***************************************************************************/ -/* AES_RGR_BRIDGE :: SPARE_SW_RESET_1 :: reserved0 [31:01] */ -#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_MASK 0xfffffffe -#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_ALIGN 0 -#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_BITS 31 -#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_SHIFT 1 - -/* AES_RGR_BRIDGE :: SPARE_SW_RESET_1 :: SPARE_SW_RESET [00:00] */ -#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_MASK 0x00000001 -#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ALIGN 0 -#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_BITS 1 -#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_SHIFT 0 -#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_DEASSERT 0 -#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ASSERT 1 - - -/**************************************************************************** - * BCM70012_DCI_TOP_DCI - ***************************************************************************/ -/**************************************************************************** - * DCI :: CMD - ***************************************************************************/ -/* DCI :: CMD :: reserved0 [31:09] */ -#define DCI_CMD_reserved0_MASK 0xfffffe00 -#define DCI_CMD_reserved0_ALIGN 0 -#define DCI_CMD_reserved0_BITS 23 -#define DCI_CMD_reserved0_SHIFT 9 - -/* DCI :: CMD :: FORCE_FW_VALIDATED [08:08] */ -#define DCI_CMD_FORCE_FW_VALIDATED_MASK 0x00000100 -#define DCI_CMD_FORCE_FW_VALIDATED_ALIGN 0 -#define DCI_CMD_FORCE_FW_VALIDATED_BITS 1 -#define DCI_CMD_FORCE_FW_VALIDATED_SHIFT 8 - -/* DCI :: CMD :: reserved1 [07:05] */ -#define DCI_CMD_reserved1_MASK 0x000000e0 -#define DCI_CMD_reserved1_ALIGN 0 -#define DCI_CMD_reserved1_BITS 3 -#define DCI_CMD_reserved1_SHIFT 5 - -/* DCI :: CMD :: START_PROCESSOR [04:04] */ -#define DCI_CMD_START_PROCESSOR_MASK 0x00000010 -#define DCI_CMD_START_PROCESSOR_ALIGN 0 -#define DCI_CMD_START_PROCESSOR_BITS 1 -#define DCI_CMD_START_PROCESSOR_SHIFT 4 - -/* DCI :: CMD :: reserved2 [03:02] */ -#define DCI_CMD_reserved2_MASK 0x0000000c -#define DCI_CMD_reserved2_ALIGN 0 -#define DCI_CMD_reserved2_BITS 2 -#define DCI_CMD_reserved2_SHIFT 2 - -/* DCI :: CMD :: DOWNLOAD_COMPLETE [01:01] */ -#define DCI_CMD_DOWNLOAD_COMPLETE_MASK 0x00000002 -#define DCI_CMD_DOWNLOAD_COMPLETE_ALIGN 0 -#define DCI_CMD_DOWNLOAD_COMPLETE_BITS 1 -#define DCI_CMD_DOWNLOAD_COMPLETE_SHIFT 1 - -/* DCI :: CMD :: INITIATE_FW_DOWNLOAD [00:00] */ -#define DCI_CMD_INITIATE_FW_DOWNLOAD_MASK 0x00000001 -#define DCI_CMD_INITIATE_FW_DOWNLOAD_ALIGN 0 -#define DCI_CMD_INITIATE_FW_DOWNLOAD_BITS 1 -#define DCI_CMD_INITIATE_FW_DOWNLOAD_SHIFT 0 - - -/**************************************************************************** - * DCI :: STATUS - ***************************************************************************/ -/* DCI :: STATUS :: reserved0 [31:10] */ -#define DCI_STATUS_reserved0_MASK 0xfffffc00 -#define DCI_STATUS_reserved0_ALIGN 0 -#define DCI_STATUS_reserved0_BITS 22 -#define DCI_STATUS_reserved0_SHIFT 10 - -/* DCI :: STATUS :: SIGNATURE_MATCHED [09:09] */ -#define DCI_STATUS_SIGNATURE_MATCHED_MASK 0x00000200 -#define DCI_STATUS_SIGNATURE_MATCHED_ALIGN 0 -#define DCI_STATUS_SIGNATURE_MATCHED_BITS 1 -#define DCI_STATUS_SIGNATURE_MATCHED_SHIFT 9 - -/* DCI :: STATUS :: SIGNATURE_MISMATCH [08:08] */ -#define DCI_STATUS_SIGNATURE_MISMATCH_MASK 0x00000100 -#define DCI_STATUS_SIGNATURE_MISMATCH_ALIGN 0 -#define DCI_STATUS_SIGNATURE_MISMATCH_BITS 1 -#define DCI_STATUS_SIGNATURE_MISMATCH_SHIFT 8 - -/* DCI :: STATUS :: reserved1 [07:06] */ -#define DCI_STATUS_reserved1_MASK 0x000000c0 -#define DCI_STATUS_reserved1_ALIGN 0 -#define DCI_STATUS_reserved1_BITS 2 -#define DCI_STATUS_reserved1_SHIFT 6 - -/* DCI :: STATUS :: GISB_ERROR [05:05] */ -#define DCI_STATUS_GISB_ERROR_MASK 0x00000020 -#define DCI_STATUS_GISB_ERROR_ALIGN 0 -#define DCI_STATUS_GISB_ERROR_BITS 1 -#define DCI_STATUS_GISB_ERROR_SHIFT 5 - -/* DCI :: STATUS :: DOWNLOAD_READY [04:04] */ -#define DCI_STATUS_DOWNLOAD_READY_MASK 0x00000010 -#define DCI_STATUS_DOWNLOAD_READY_ALIGN 0 -#define DCI_STATUS_DOWNLOAD_READY_BITS 1 -#define DCI_STATUS_DOWNLOAD_READY_SHIFT 4 - -/* DCI :: STATUS :: reserved2 [03:01] */ -#define DCI_STATUS_reserved2_MASK 0x0000000e -#define DCI_STATUS_reserved2_ALIGN 0 -#define DCI_STATUS_reserved2_BITS 3 -#define DCI_STATUS_reserved2_SHIFT 1 - -/* DCI :: STATUS :: FIRMWARE_VALIDATED [00:00] */ -#define DCI_STATUS_FIRMWARE_VALIDATED_MASK 0x00000001 -#define DCI_STATUS_FIRMWARE_VALIDATED_ALIGN 0 -#define DCI_STATUS_FIRMWARE_VALIDATED_BITS 1 -#define DCI_STATUS_FIRMWARE_VALIDATED_SHIFT 0 - - -/**************************************************************************** - * DCI :: DRAM_BASE_ADDR - ***************************************************************************/ -/* DCI :: DRAM_BASE_ADDR :: reserved0 [31:13] */ -#define DCI_DRAM_BASE_ADDR_reserved0_MASK 0xffffe000 -#define DCI_DRAM_BASE_ADDR_reserved0_ALIGN 0 -#define DCI_DRAM_BASE_ADDR_reserved0_BITS 19 -#define DCI_DRAM_BASE_ADDR_reserved0_SHIFT 13 - -/* DCI :: DRAM_BASE_ADDR :: BASE_ADDR [12:00] */ -#define DCI_DRAM_BASE_ADDR_BASE_ADDR_MASK 0x00001fff -#define DCI_DRAM_BASE_ADDR_BASE_ADDR_ALIGN 0 -#define DCI_DRAM_BASE_ADDR_BASE_ADDR_BITS 13 -#define DCI_DRAM_BASE_ADDR_BASE_ADDR_SHIFT 0 - - -/**************************************************************************** - * DCI :: FIRMWARE_ADDR - ***************************************************************************/ -/* DCI :: FIRMWARE_ADDR :: reserved0 [31:19] */ -#define DCI_FIRMWARE_ADDR_reserved0_MASK 0xfff80000 -#define DCI_FIRMWARE_ADDR_reserved0_ALIGN 0 -#define DCI_FIRMWARE_ADDR_reserved0_BITS 13 -#define DCI_FIRMWARE_ADDR_reserved0_SHIFT 19 - -/* DCI :: FIRMWARE_ADDR :: FW_ADDR [18:02] */ -#define DCI_FIRMWARE_ADDR_FW_ADDR_MASK 0x0007fffc -#define DCI_FIRMWARE_ADDR_FW_ADDR_ALIGN 0 -#define DCI_FIRMWARE_ADDR_FW_ADDR_BITS 17 -#define DCI_FIRMWARE_ADDR_FW_ADDR_SHIFT 2 - -/* DCI :: FIRMWARE_ADDR :: reserved1 [01:00] */ -#define DCI_FIRMWARE_ADDR_reserved1_MASK 0x00000003 -#define DCI_FIRMWARE_ADDR_reserved1_ALIGN 0 -#define DCI_FIRMWARE_ADDR_reserved1_BITS 2 -#define DCI_FIRMWARE_ADDR_reserved1_SHIFT 0 - - -/**************************************************************************** - * DCI :: FIRMWARE_DATA - ***************************************************************************/ -/* DCI :: FIRMWARE_DATA :: FW_DATA [31:00] */ -#define DCI_FIRMWARE_DATA_FW_DATA_MASK 0xffffffff -#define DCI_FIRMWARE_DATA_FW_DATA_ALIGN 0 -#define DCI_FIRMWARE_DATA_FW_DATA_BITS 32 -#define DCI_FIRMWARE_DATA_FW_DATA_SHIFT 0 - - -/**************************************************************************** - * DCI :: SIGNATURE_DATA_0 - ***************************************************************************/ -/* DCI :: SIGNATURE_DATA_0 :: SIG_DATA_0 [31:00] */ -#define DCI_SIGNATURE_DATA_0_SIG_DATA_0_MASK 0xffffffff -#define DCI_SIGNATURE_DATA_0_SIG_DATA_0_ALIGN 0 -#define DCI_SIGNATURE_DATA_0_SIG_DATA_0_BITS 32 -#define DCI_SIGNATURE_DATA_0_SIG_DATA_0_SHIFT 0 - - -/**************************************************************************** - * DCI :: SIGNATURE_DATA_1 - ***************************************************************************/ -/* DCI :: SIGNATURE_DATA_1 :: SIG_DATA_1 [31:00] */ -#define DCI_SIGNATURE_DATA_1_SIG_DATA_1_MASK 0xffffffff -#define DCI_SIGNATURE_DATA_1_SIG_DATA_1_ALIGN 0 -#define DCI_SIGNATURE_DATA_1_SIG_DATA_1_BITS 32 -#define DCI_SIGNATURE_DATA_1_SIG_DATA_1_SHIFT 0 - - -/**************************************************************************** - * DCI :: SIGNATURE_DATA_2 - ***************************************************************************/ -/* DCI :: SIGNATURE_DATA_2 :: SIG_DATA_2 [31:00] */ -#define DCI_SIGNATURE_DATA_2_SIG_DATA_2_MASK 0xffffffff -#define DCI_SIGNATURE_DATA_2_SIG_DATA_2_ALIGN 0 -#define DCI_SIGNATURE_DATA_2_SIG_DATA_2_BITS 32 -#define DCI_SIGNATURE_DATA_2_SIG_DATA_2_SHIFT 0 - - -/**************************************************************************** - * DCI :: SIGNATURE_DATA_3 - ***************************************************************************/ -/* DCI :: SIGNATURE_DATA_3 :: SIG_DATA_3 [31:00] */ -#define DCI_SIGNATURE_DATA_3_SIG_DATA_3_MASK 0xffffffff -#define DCI_SIGNATURE_DATA_3_SIG_DATA_3_ALIGN 0 -#define DCI_SIGNATURE_DATA_3_SIG_DATA_3_BITS 32 -#define DCI_SIGNATURE_DATA_3_SIG_DATA_3_SHIFT 0 - - -/**************************************************************************** - * DCI :: SIGNATURE_DATA_4 - ***************************************************************************/ -/* DCI :: SIGNATURE_DATA_4 :: SIG_DATA_4 [31:00] */ -#define DCI_SIGNATURE_DATA_4_SIG_DATA_4_MASK 0xffffffff -#define DCI_SIGNATURE_DATA_4_SIG_DATA_4_ALIGN 0 -#define DCI_SIGNATURE_DATA_4_SIG_DATA_4_BITS 32 -#define DCI_SIGNATURE_DATA_4_SIG_DATA_4_SHIFT 0 - - -/**************************************************************************** - * DCI :: SIGNATURE_DATA_5 - ***************************************************************************/ -/* DCI :: SIGNATURE_DATA_5 :: SIG_DATA_5 [31:00] */ -#define DCI_SIGNATURE_DATA_5_SIG_DATA_5_MASK 0xffffffff -#define DCI_SIGNATURE_DATA_5_SIG_DATA_5_ALIGN 0 -#define DCI_SIGNATURE_DATA_5_SIG_DATA_5_BITS 32 -#define DCI_SIGNATURE_DATA_5_SIG_DATA_5_SHIFT 0 - - -/**************************************************************************** - * DCI :: SIGNATURE_DATA_6 - ***************************************************************************/ -/* DCI :: SIGNATURE_DATA_6 :: SIG_DATA_6 [31:00] */ -#define DCI_SIGNATURE_DATA_6_SIG_DATA_6_MASK 0xffffffff -#define DCI_SIGNATURE_DATA_6_SIG_DATA_6_ALIGN 0 -#define DCI_SIGNATURE_DATA_6_SIG_DATA_6_BITS 32 -#define DCI_SIGNATURE_DATA_6_SIG_DATA_6_SHIFT 0 - - -/**************************************************************************** - * DCI :: SIGNATURE_DATA_7 - ***************************************************************************/ -/* DCI :: SIGNATURE_DATA_7 :: SIG_DATA_7 [31:00] */ -#define DCI_SIGNATURE_DATA_7_SIG_DATA_7_MASK 0xffffffff -#define DCI_SIGNATURE_DATA_7_SIG_DATA_7_ALIGN 0 -#define DCI_SIGNATURE_DATA_7_SIG_DATA_7_BITS 32 -#define DCI_SIGNATURE_DATA_7_SIG_DATA_7_SHIFT 0 - - -/**************************************************************************** - * BCM70012_DCI_TOP_DCI_RGR_BRIDGE - ***************************************************************************/ -/**************************************************************************** - * DCI_RGR_BRIDGE :: REVISION - ***************************************************************************/ -/* DCI_RGR_BRIDGE :: REVISION :: reserved0 [31:16] */ -#define DCI_RGR_BRIDGE_REVISION_reserved0_MASK 0xffff0000 -#define DCI_RGR_BRIDGE_REVISION_reserved0_ALIGN 0 -#define DCI_RGR_BRIDGE_REVISION_reserved0_BITS 16 -#define DCI_RGR_BRIDGE_REVISION_reserved0_SHIFT 16 - -/* DCI_RGR_BRIDGE :: REVISION :: MAJOR [15:08] */ -#define DCI_RGR_BRIDGE_REVISION_MAJOR_MASK 0x0000ff00 -#define DCI_RGR_BRIDGE_REVISION_MAJOR_ALIGN 0 -#define DCI_RGR_BRIDGE_REVISION_MAJOR_BITS 8 -#define DCI_RGR_BRIDGE_REVISION_MAJOR_SHIFT 8 - -/* DCI_RGR_BRIDGE :: REVISION :: MINOR [07:00] */ -#define DCI_RGR_BRIDGE_REVISION_MINOR_MASK 0x000000ff -#define DCI_RGR_BRIDGE_REVISION_MINOR_ALIGN 0 -#define DCI_RGR_BRIDGE_REVISION_MINOR_BITS 8 -#define DCI_RGR_BRIDGE_REVISION_MINOR_SHIFT 0 - - -/**************************************************************************** - * DCI_RGR_BRIDGE :: CTRL - ***************************************************************************/ -/* DCI_RGR_BRIDGE :: CTRL :: reserved0 [31:02] */ -#define DCI_RGR_BRIDGE_CTRL_reserved0_MASK 0xfffffffc -#define DCI_RGR_BRIDGE_CTRL_reserved0_ALIGN 0 -#define DCI_RGR_BRIDGE_CTRL_reserved0_BITS 30 -#define DCI_RGR_BRIDGE_CTRL_reserved0_SHIFT 2 - -/* DCI_RGR_BRIDGE :: CTRL :: rbus_error_intr [01:01] */ -#define DCI_RGR_BRIDGE_CTRL_rbus_error_intr_MASK 0x00000002 -#define DCI_RGR_BRIDGE_CTRL_rbus_error_intr_ALIGN 0 -#define DCI_RGR_BRIDGE_CTRL_rbus_error_intr_BITS 1 -#define DCI_RGR_BRIDGE_CTRL_rbus_error_intr_SHIFT 1 -#define DCI_RGR_BRIDGE_CTRL_rbus_error_intr_INTR_DISABLE 0 -#define DCI_RGR_BRIDGE_CTRL_rbus_error_intr_INTR_ENABLE 1 - -/* DCI_RGR_BRIDGE :: CTRL :: gisb_error_intr [00:00] */ -#define DCI_RGR_BRIDGE_CTRL_gisb_error_intr_MASK 0x00000001 -#define DCI_RGR_BRIDGE_CTRL_gisb_error_intr_ALIGN 0 -#define DCI_RGR_BRIDGE_CTRL_gisb_error_intr_BITS 1 -#define DCI_RGR_BRIDGE_CTRL_gisb_error_intr_SHIFT 0 -#define DCI_RGR_BRIDGE_CTRL_gisb_error_intr_INTR_DISABLE 0 -#define DCI_RGR_BRIDGE_CTRL_gisb_error_intr_INTR_ENABLE 1 - - -/**************************************************************************** - * DCI_RGR_BRIDGE :: RBUS_TIMER - ***************************************************************************/ -/* DCI_RGR_BRIDGE :: RBUS_TIMER :: reserved0 [31:16] */ -#define DCI_RGR_BRIDGE_RBUS_TIMER_reserved0_MASK 0xffff0000 -#define DCI_RGR_BRIDGE_RBUS_TIMER_reserved0_ALIGN 0 -#define DCI_RGR_BRIDGE_RBUS_TIMER_reserved0_BITS 16 -#define DCI_RGR_BRIDGE_RBUS_TIMER_reserved0_SHIFT 16 - -/* DCI_RGR_BRIDGE :: RBUS_TIMER :: timer_value [15:00] */ -#define DCI_RGR_BRIDGE_RBUS_TIMER_timer_value_MASK 0x0000ffff -#define DCI_RGR_BRIDGE_RBUS_TIMER_timer_value_ALIGN 0 -#define DCI_RGR_BRIDGE_RBUS_TIMER_timer_value_BITS 16 -#define DCI_RGR_BRIDGE_RBUS_TIMER_timer_value_SHIFT 0 - - -/**************************************************************************** - * DCI_RGR_BRIDGE :: SPARE_SW_RESET_0 - ***************************************************************************/ -/* DCI_RGR_BRIDGE :: SPARE_SW_RESET_0 :: reserved0 [31:01] */ -#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_MASK 0xfffffffe -#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_ALIGN 0 -#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_BITS 31 -#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_SHIFT 1 - -/* DCI_RGR_BRIDGE :: SPARE_SW_RESET_0 :: SPARE_SW_RESET [00:00] */ -#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_MASK 0x00000001 -#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ALIGN 0 -#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_BITS 1 -#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_SHIFT 0 -#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_DEASSERT 0 -#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ASSERT 1 - - -/**************************************************************************** - * DCI_RGR_BRIDGE :: SPARE_SW_RESET_1 - ***************************************************************************/ -/* DCI_RGR_BRIDGE :: SPARE_SW_RESET_1 :: reserved0 [31:01] */ -#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_MASK 0xfffffffe -#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_ALIGN 0 -#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_BITS 31 -#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_SHIFT 1 - -/* DCI_RGR_BRIDGE :: SPARE_SW_RESET_1 :: SPARE_SW_RESET [00:00] */ -#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_MASK 0x00000001 -#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ALIGN 0 -#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_BITS 1 -#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_SHIFT 0 -#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_DEASSERT 0 -#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ASSERT 1 - - -/**************************************************************************** - * BCM70012_CCE_TOP_CCE_RGR_BRIDGE - ***************************************************************************/ -/**************************************************************************** - * CCE_RGR_BRIDGE :: REVISION - ***************************************************************************/ -/* CCE_RGR_BRIDGE :: REVISION :: reserved0 [31:16] */ -#define CCE_RGR_BRIDGE_REVISION_reserved0_MASK 0xffff0000 -#define CCE_RGR_BRIDGE_REVISION_reserved0_ALIGN 0 -#define CCE_RGR_BRIDGE_REVISION_reserved0_BITS 16 -#define CCE_RGR_BRIDGE_REVISION_reserved0_SHIFT 16 - -/* CCE_RGR_BRIDGE :: REVISION :: MAJOR [15:08] */ -#define CCE_RGR_BRIDGE_REVISION_MAJOR_MASK 0x0000ff00 -#define CCE_RGR_BRIDGE_REVISION_MAJOR_ALIGN 0 -#define CCE_RGR_BRIDGE_REVISION_MAJOR_BITS 8 -#define CCE_RGR_BRIDGE_REVISION_MAJOR_SHIFT 8 - -/* CCE_RGR_BRIDGE :: REVISION :: MINOR [07:00] */ -#define CCE_RGR_BRIDGE_REVISION_MINOR_MASK 0x000000ff -#define CCE_RGR_BRIDGE_REVISION_MINOR_ALIGN 0 -#define CCE_RGR_BRIDGE_REVISION_MINOR_BITS 8 -#define CCE_RGR_BRIDGE_REVISION_MINOR_SHIFT 0 - - -/**************************************************************************** - * CCE_RGR_BRIDGE :: CTRL - ***************************************************************************/ -/* CCE_RGR_BRIDGE :: CTRL :: reserved0 [31:02] */ -#define CCE_RGR_BRIDGE_CTRL_reserved0_MASK 0xfffffffc -#define CCE_RGR_BRIDGE_CTRL_reserved0_ALIGN 0 -#define CCE_RGR_BRIDGE_CTRL_reserved0_BITS 30 -#define CCE_RGR_BRIDGE_CTRL_reserved0_SHIFT 2 - -/* CCE_RGR_BRIDGE :: CTRL :: rbus_error_intr [01:01] */ -#define CCE_RGR_BRIDGE_CTRL_rbus_error_intr_MASK 0x00000002 -#define CCE_RGR_BRIDGE_CTRL_rbus_error_intr_ALIGN 0 -#define CCE_RGR_BRIDGE_CTRL_rbus_error_intr_BITS 1 -#define CCE_RGR_BRIDGE_CTRL_rbus_error_intr_SHIFT 1 -#define CCE_RGR_BRIDGE_CTRL_rbus_error_intr_INTR_DISABLE 0 -#define CCE_RGR_BRIDGE_CTRL_rbus_error_intr_INTR_ENABLE 1 - -/* CCE_RGR_BRIDGE :: CTRL :: gisb_error_intr [00:00] */ -#define CCE_RGR_BRIDGE_CTRL_gisb_error_intr_MASK 0x00000001 -#define CCE_RGR_BRIDGE_CTRL_gisb_error_intr_ALIGN 0 -#define CCE_RGR_BRIDGE_CTRL_gisb_error_intr_BITS 1 -#define CCE_RGR_BRIDGE_CTRL_gisb_error_intr_SHIFT 0 -#define CCE_RGR_BRIDGE_CTRL_gisb_error_intr_INTR_DISABLE 0 -#define CCE_RGR_BRIDGE_CTRL_gisb_error_intr_INTR_ENABLE 1 - - -/**************************************************************************** - * CCE_RGR_BRIDGE :: RBUS_TIMER - ***************************************************************************/ -/* CCE_RGR_BRIDGE :: RBUS_TIMER :: reserved0 [31:16] */ -#define CCE_RGR_BRIDGE_RBUS_TIMER_reserved0_MASK 0xffff0000 -#define CCE_RGR_BRIDGE_RBUS_TIMER_reserved0_ALIGN 0 -#define CCE_RGR_BRIDGE_RBUS_TIMER_reserved0_BITS 16 -#define CCE_RGR_BRIDGE_RBUS_TIMER_reserved0_SHIFT 16 - -/* CCE_RGR_BRIDGE :: RBUS_TIMER :: timer_value [15:00] */ -#define CCE_RGR_BRIDGE_RBUS_TIMER_timer_value_MASK 0x0000ffff -#define CCE_RGR_BRIDGE_RBUS_TIMER_timer_value_ALIGN 0 -#define CCE_RGR_BRIDGE_RBUS_TIMER_timer_value_BITS 16 -#define CCE_RGR_BRIDGE_RBUS_TIMER_timer_value_SHIFT 0 - - -/**************************************************************************** - * CCE_RGR_BRIDGE :: SPARE_SW_RESET_0 - ***************************************************************************/ -/* CCE_RGR_BRIDGE :: SPARE_SW_RESET_0 :: reserved0 [31:01] */ -#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_MASK 0xfffffffe -#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_ALIGN 0 -#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_BITS 31 -#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_SHIFT 1 - -/* CCE_RGR_BRIDGE :: SPARE_SW_RESET_0 :: SPARE_SW_RESET [00:00] */ -#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_MASK 0x00000001 -#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ALIGN 0 -#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_BITS 1 -#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_SHIFT 0 -#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_DEASSERT 0 -#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ASSERT 1 - - -/**************************************************************************** - * CCE_RGR_BRIDGE :: SPARE_SW_RESET_1 - ***************************************************************************/ -/* CCE_RGR_BRIDGE :: SPARE_SW_RESET_1 :: reserved0 [31:01] */ -#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_MASK 0xfffffffe -#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_ALIGN 0 -#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_BITS 31 -#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_SHIFT 1 - -/* CCE_RGR_BRIDGE :: SPARE_SW_RESET_1 :: SPARE_SW_RESET [00:00] */ -#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_MASK 0x00000001 -#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ALIGN 0 -#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_BITS 1 -#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_SHIFT 0 -#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_DEASSERT 0 -#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ASSERT 1 - - /**************************************************************************** * Datatype Definitions. ***************************************************************************/ From d027936949b839a858cd822975491e19ec316621 Mon Sep 17 00:00:00 2001 From: "horms@vergenet.net" Date: Fri, 8 Jan 2010 18:57:49 +1100 Subject: [PATCH 135/367] Staging: otus: dont mix declarations and code $ gcc (Debian 4.4.2-8) 4.4.2 Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ make ... drivers/staging/otus/ioctl.c: In function 'usbdrv_wpa_ioctl': drivers/staging/otus/ioctl.c:2253: warning: ISO C90 forbids mixed declarations and code ... Signed-off-by: Simon Horman Signed-off-by: Greg Kroah-Hartman --- drivers/staging/otus/ioctl.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/staging/otus/ioctl.c b/drivers/staging/otus/ioctl.c index 86d93330acad..ebaedb7b1688 100644 --- a/drivers/staging/otus/ioctl.c +++ b/drivers/staging/otus/ioctl.c @@ -2227,7 +2227,8 @@ int usbdrv_wpa_ioctl(struct net_device *dev, struct athr_wlan_param *zdparm) case ZD_CMD_SCAN_REQ: printk(KERN_ERR "usbdrv_wpa_ioctl: ZD_CMD_SCAN_REQ\n"); break; - case ZD_CMD_SET_GENERIC_ELEMENT: + case ZD_CMD_SET_GENERIC_ELEMENT: { + u8_t len, *wpaie; printk(KERN_ERR "usbdrv_wpa_ioctl:" " ZD_CMD_SET_GENERIC_ELEMENT\n"); @@ -2250,8 +2251,8 @@ int usbdrv_wpa_ioctl(struct net_device *dev, struct athr_wlan_param *zdparm) /* zfiWlanSetWpaIe(dev, zdparm->u.generic_elem.data, * zdparm->u.generic_elem.len); */ - u8_t len = zdparm->u.generic_elem.len; - u8_t *wpaie = (u8_t *)zdparm->u.generic_elem.data; + len = zdparm->u.generic_elem.len; + wpaie = zdparm->u.generic_elem.data; printk(KERN_ERR "wd->ap.wpaLen : % d\n", len); @@ -2273,6 +2274,7 @@ int usbdrv_wpa_ioctl(struct net_device *dev, struct athr_wlan_param *zdparm) * #endif */ break; + } /* #ifdef ZM_HOSTAPD_SUPPORT */ case ZD_CMD_GET_TSC: From d74385fd9c81d2168aa3a556abcc55f5e1558626 Mon Sep 17 00:00:00 2001 From: "horms@vergenet.net" Date: Fri, 8 Jan 2010 18:57:50 +1100 Subject: [PATCH 136/367] Staging: otus: remove unused variables Signed-off-by: Simon Horman Signed-off-by: Greg Kroah-Hartman --- drivers/staging/otus/80211core/cagg.c | 3 +-- drivers/staging/otus/80211core/cfunc.c | 2 -- drivers/staging/otus/80211core/cmm.c | 4 ---- drivers/staging/otus/80211core/cmmsta.c | 5 ----- drivers/staging/otus/80211core/cpsmgr.c | 2 -- drivers/staging/otus/80211core/cscanmgr.c | 2 -- drivers/staging/otus/80211core/ctxrx.c | 5 ----- drivers/staging/otus/80211core/ledmgr.c | 1 - drivers/staging/otus/hal/hpmain.c | 4 ---- drivers/staging/otus/hal/hprw.c | 1 - 10 files changed, 1 insertion(+), 28 deletions(-) diff --git a/drivers/staging/otus/80211core/cagg.c b/drivers/staging/otus/80211core/cagg.c index dbd0a5f0fcdf..d11661c3b884 100644 --- a/drivers/staging/otus/80211core/cagg.c +++ b/drivers/staging/otus/80211core/cagg.c @@ -1832,8 +1832,7 @@ u16_t zfAggRxClear(zdev_t* dev, u32_t time) struct agg_tid_rx* zfAggRxEnabled(zdev_t* dev, zbuf_t* buf) { - u16_t dst0, src[3], ac, aid, fragOff; - u8_t up; + u16_t dst0, src[3], aid; u16_t offset = 0; u16_t seq_no; u16_t frameType; diff --git a/drivers/staging/otus/80211core/cfunc.c b/drivers/staging/otus/80211core/cfunc.c index d7c49d7523df..e0a9f383c755 100644 --- a/drivers/staging/otus/80211core/cfunc.c +++ b/drivers/staging/otus/80211core/cfunc.c @@ -1194,8 +1194,6 @@ u16_t zfFindMinimumUtilizationChannelIndex(zdev_t* dev, u16_t* array, u16_t coun u8_t i; u16_t tempMinIndex, tempMinValue; - zmw_get_wlan_dev(dev); - i = 1; tempMinIndex = 0; tempMinValue = array[tempMinIndex]; diff --git a/drivers/staging/otus/80211core/cmm.c b/drivers/staging/otus/80211core/cmm.c index a6c1b41ba848..484e753df358 100644 --- a/drivers/staging/otus/80211core/cmm.c +++ b/drivers/staging/otus/80211core/cmm.c @@ -346,8 +346,6 @@ u16_t zfFindSuperGElement(zdev_t* dev, zbuf_t* buf, u8_t type) u8_t super_feature; u8_t ouiSuperG[6] = {0x00,0x03,0x7f,0x01, 0x01, 0x00}; - zmw_get_wlan_dev(dev); - /* Get offset of first element */ subType = (zmw_rx_buf_readb(dev, buf, 0) >> 4); if ((offset = zgElementOffsetTable[subType]) == 0xff) @@ -411,8 +409,6 @@ u16_t zfFindXRElement(zdev_t* dev, zbuf_t* buf, u8_t type) u8_t id; u8_t ouixr[6] = {0x00,0x03,0x7f,0x03, 0x01, 0x00}; - zmw_get_wlan_dev(dev); - /* Get offset of first element */ subType = (zmw_rx_buf_readb(dev, buf, 0) >> 4); if ((offset = zgElementOffsetTable[subType]) == 0xff) diff --git a/drivers/staging/otus/80211core/cmmsta.c b/drivers/staging/otus/80211core/cmmsta.c index 5c0dea7a3433..c3fd47529c14 100644 --- a/drivers/staging/otus/80211core/cmmsta.c +++ b/drivers/staging/otus/80211core/cmmsta.c @@ -4848,8 +4848,6 @@ u16_t zfStaAddIePowerCap(zdev_t* dev, zbuf_t* buf, u16_t offset) u8_t MaxTxPower; u8_t MinTxPower; - zmw_get_wlan_dev(dev); - /* Element ID */ zmw_tx_buf_writeb(dev, buf, offset++, ZM_WLAN_EID_POWER_CAPABILITY); @@ -5276,7 +5274,6 @@ u16_t zfStaRxValidateFrame(zdev_t* dev, zbuf_t* buf) u8_t da0; //u16_t sa[3]; u16_t ret; - u16_t i; //u8_t sa0; zmw_get_wlan_dev(dev); @@ -5738,8 +5735,6 @@ u16_t zfComputeBssInfoWeightValue(zdev_t *dev, u8_t isBMode, u8_t isHT, u8_t isH u8_t weightOfN40BelowThr = 16; u8_t weightOfN40UpThr = 32; - zmw_get_wlan_dev(dev); - if( isBMode == 0 ) return (signalStrength + weightOfB); // pure b mode , do not add the weight value for this AP ! else diff --git a/drivers/staging/otus/80211core/cpsmgr.c b/drivers/staging/otus/80211core/cpsmgr.c index cf73caca8e52..98e1f0cc0727 100644 --- a/drivers/staging/otus/80211core/cpsmgr.c +++ b/drivers/staging/otus/80211core/cpsmgr.c @@ -381,8 +381,6 @@ static void zfPowerSavingMgrSleepIfIdle(zdev_t *dev) static void zfPowerSavingMgrDisconnectMain(zdev_t* dev) { - zmw_get_wlan_dev(dev); - #ifdef ZM_ENABLE_DISCONNECT_PS switch(wd->sta.psMgr.state) { diff --git a/drivers/staging/otus/80211core/cscanmgr.c b/drivers/staging/otus/80211core/cscanmgr.c index b32835c87590..be7d8ebe82ba 100644 --- a/drivers/staging/otus/80211core/cscanmgr.c +++ b/drivers/staging/otus/80211core/cscanmgr.c @@ -289,8 +289,6 @@ static void zfScanMgrEventSetFreqCompleteCb(zdev_t* dev) static void zfScanMgrEventScanCompleteCb(zdev_t* dev) { - zmw_get_wlan_dev(dev); - if ((zfStaIsConnected(dev)) && (!zfPowerSavingMgrIsSleeping(dev))) { zfSendNullData(dev, 0); diff --git a/drivers/staging/otus/80211core/ctxrx.c b/drivers/staging/otus/80211core/ctxrx.c index 7fa4f48fc8ca..4e7f4bd86f47 100644 --- a/drivers/staging/otus/80211core/ctxrx.c +++ b/drivers/staging/otus/80211core/ctxrx.c @@ -882,7 +882,6 @@ zlError: /************************************************************************/ u16_t zfTxSendEth(zdev_t* dev, zbuf_t* buf, u16_t port, u16_t bufType, u16_t flag) { - u16_t err; //u16_t addrTblSize; //struct zsAddrTbl addrTbl; u16_t removeLen; @@ -904,7 +903,6 @@ u16_t zfTxSendEth(zdev_t* dev, zbuf_t* buf, u16_t port, u16_t bufType, u16_t fla u8_t qosType, keyIdx = 0; u16_t fragOff; u16_t newFlag; - struct zsMicVar* pMicKey; u8_t tkipFrameOffset = 0; zmw_get_wlan_dev(dev); @@ -1692,8 +1690,6 @@ void zfShowTxEAPOL(zdev_t* dev, zbuf_t* buf, u16_t offset) u16_t packetLen, keyInfo, keyLen, keyDataLen, length, Op_Code; u32_t replayCounterH, replayCounterL, vendorId, VendorType; - zmw_get_wlan_dev(dev); - zm_debug_msg1("EAPOL Packet size = ", zfwBufGetSize(dev, buf)); /* EAPOL packet type */ @@ -2436,7 +2432,6 @@ void zfiRecv80211(zdev_t* dev, zbuf_t* buf, struct zsAdditionInfo* addInfo) u16_t IvOffset; u8_t keyLen = 5; u8_t iv[3]; - u8_t *wepKey; u8_t keyIdx; IvOffset = offset + ZM_SIZE_OF_WLAN_DATA_HEADER; diff --git a/drivers/staging/otus/80211core/ledmgr.c b/drivers/staging/otus/80211core/ledmgr.c index 1e104a928ca4..eafce0b1204f 100644 --- a/drivers/staging/otus/80211core/ledmgr.c +++ b/drivers/staging/otus/80211core/ledmgr.c @@ -187,7 +187,6 @@ void zfLedCtrlType2_scan(zdev_t* dev); void zfLedCtrlType2(zdev_t* dev) { - u32_t ton, toff, tmp, period; u16_t OperateLED; zmw_get_wlan_dev(dev); diff --git a/drivers/staging/otus/hal/hpmain.c b/drivers/staging/otus/hal/hpmain.c index 94f9cbbbdefc..8dff5b97dfe3 100644 --- a/drivers/staging/otus/hal/hpmain.c +++ b/drivers/staging/otus/hal/hpmain.c @@ -1316,7 +1316,6 @@ void zfHpSetFrequencyEx(zdev_t* dev, u32_t frequency, u8_t bw40, u8_t extOffset, u8_t initRF) { u32_t cmd[9]; - u32_t cmdB[3]; u16_t ret; u8_t old_band; u8_t new_band; @@ -3434,7 +3433,6 @@ void zfSetPowerCalTable(zdev_t* dev, u32_t frequency, u8_t bw40, u8_t extOffset) /* Write PHY regs 672-703 */ for (i=0; i<128; i+=4) { - u32_t regAddr = 0x9800 + (672 * 4); u32_t val; val = ((u32_t)vpd_chain1[i+3]<<24) | @@ -3485,7 +3483,6 @@ void zfSetPowerCalTable(zdev_t* dev, u32_t frequency, u8_t bw40, u8_t extOffset) /* Write PHY regs 672-703 + 0x1000 */ for (i=0; i<128; i+=4) { - u32_t regAddr = 0x9800 + (672 * 4) + 0x1000; u32_t val; val = ((u32_t)vpd_chain3[i+3]<<24) | @@ -4584,7 +4581,6 @@ void zfHpSetRollCallTable(zdev_t* dev) void zfHpSetTTSIFSTime(zdev_t* dev, u8_t sifs_time) { u32_t reg_value = 0; - zmw_get_wlan_dev(dev); sifs_time &= 0x3f; reg_value = 0x14400b | (((u32_t)sifs_time)<<24); diff --git a/drivers/staging/otus/hal/hprw.c b/drivers/staging/otus/hal/hprw.c index d9fad47d5d59..4dbd5fb44b0a 100644 --- a/drivers/staging/otus/hal/hprw.c +++ b/drivers/staging/otus/hal/hprw.c @@ -282,7 +282,6 @@ void zfIdlRsp(zdev_t* dev, u32_t* rsp, u16_t rspLen) else if (src == ZM_OID_FLASH_READ) { u32_t datalen; - u16_t i; datalen = (rsp[0] & 255); From 3db96cd871e7cfea6e671b262a8ef661b27dadf1 Mon Sep 17 00:00:00 2001 From: "horms@vergenet.net" Date: Fri, 8 Jan 2010 18:57:51 +1100 Subject: [PATCH 137/367] Staging: otus: remove unused constants Signed-off-by: Simon Horman Signed-off-by: Greg Kroah-Hartman --- drivers/staging/otus/hal/hpreg.c | 133 ------------------------------- 1 file changed, 133 deletions(-) diff --git a/drivers/staging/otus/hal/hpreg.c b/drivers/staging/otus/hal/hpreg.c index d9894fe5f4ec..178777c09dbd 100644 --- a/drivers/staging/otus/hal/hpreg.c +++ b/drivers/staging/otus/hal/hpreg.c @@ -786,45 +786,6 @@ enum { WT1_5760_5800, }; -static REG_DMN_FREQ_BAND regDmn5GhzTurboFreq[] = { - { 5130, 5210, 5, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_5130_5210 */ - { 5250, 5330, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN, 0, 0}, /* T1_5250_5330 */ - { 5370, 5490, 5, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_5370_5490 */ - { 5530, 5650, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN, 0, 0}, /* T1_5530_5650 */ - - { 5150, 5190, 5, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_5150_5190 */ - { 5230, 5310, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN, 0, 0}, /* T1_5230_5310 */ - { 5350, 5470, 5, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_5350_5470 */ - { 5510, 5670, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN, 0, 0}, /* T1_5510_5670 */ - - { 5200, 5240, 17, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_5200_5240 */ - { 5200, 5240, 23, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T2_5200_5240 */ - { 5210, 5210, 17, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_5210_5210 */ - { 5210, 5210, 23, 0, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T2_5210_5210 */ - - { 5280, 5280, 23, 6, 40, 40, DFS_FCC3, PSCAN_FCC_T, 0, 0}, /* T1_5280_5280 */ - { 5280, 5280, 20, 6, 40, 40, DFS_FCC3, PSCAN_FCC_T, 0, 0}, /* T2_5280_5280 */ - { 5250, 5250, 17, 0, 40, 40, DFS_FCC3, PSCAN_FCC_T, 0, 0}, /* T1_5250_5250 */ - { 5290, 5290, 20, 0, 40, 40, DFS_FCC3, PSCAN_FCC_T, 0, 0}, /* T1_5290_5290 */ - { 5250, 5290, 20, 0, 40, 40, DFS_FCC3, PSCAN_FCC_T, 0, 0}, /* T1_5250_5290 */ - { 5250, 5290, 23, 6, 40, 40, DFS_FCC3, PSCAN_FCC_T, 0, 0}, /* T2_5250_5290 */ - - { 5540, 5660, 20, 6, 40, 40, DFS_FCC3, PSCAN_FCC_T, 0, 0}, /* T1_5540_5660 */ - { 5760, 5800, 20, 0, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_5760_5800 */ - { 5760, 5800, 30, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T2_5760_5800 */ - - { 5765, 5805, 30, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_5765_5805 */ - - /* - * Below are the WWR frequencies - */ - - { 5210, 5250, 15, 0, 40, 40, DFS_FCC3 | DFS_ETSI, PSCAN_WWR, 0, 0}, /* WT1_5210_5250 */ - { 5290, 5290, 18, 0, 40, 40, DFS_FCC3 | DFS_ETSI, PSCAN_WWR, 0, 0}, /* WT1_5290_5290 */ - { 5540, 5660, 20, 0, 40, 40, DFS_FCC3 | DFS_ETSI, PSCAN_WWR, 0, 0}, /* WT1_5540_5660 */ - { 5760, 5800, 20, 0, 40, 40, NO_DFS, PSCAN_WWR, 0, 0}, /* WT1_5760_5800 */ -}; - /* * 2GHz 11b channel tags */ @@ -864,45 +825,6 @@ enum { W2_2484_2484, }; -static REG_DMN_FREQ_BAND regDmn2GhzFreq[] = { - { 2312, 2372, 5, 6, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* F1_2312_2372 */ - { 2312, 2372, 20, 0, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* F2_2312_2372 */ - - { 2412, 2472, 5, 6, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* F1_2412_2472 */ - { 2412, 2472, 20, 0, 20, 5, NO_DFS, PSCAN_MKKA, 0, 0}, /* F2_2412_2472 */ - { 2412, 2472, 30, 0, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* F3_2412_2472 */ - - { 2412, 2462, 27, 6, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* F1_2412_2462 */ - { 2412, 2462, 20, 0, 20, 5, NO_DFS, PSCAN_MKKA, 0, 0}, /* F2_2412_2462 */ - { 2432, 2442, 20, 0, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* F1_2432_2442 */ - - { 2457, 2472, 20, 0, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* F1_2457_2472 */ - - { 2467, 2472, 20, 0, 20, 5, NO_DFS, PSCAN_MKKA2 | PSCAN_MKKA, 0, 0}, /* F1_2467_2472 */ - - { 2484, 2484, 5, 6, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* F1_2484_2484 */ - { 2484, 2484, 20, 0, 20, 5, NO_DFS, PSCAN_MKKA | PSCAN_MKKA1 | PSCAN_MKKA2, 0, 0}, /* F2_2484_2484 */ - - { 2512, 2732, 5, 6, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* F1_2512_2732 */ - - /* - * WWR have powers opened up to 20dBm. Limits should often come from CTL/Max powers - */ - - { 2312, 2372, 20, 0, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* W1_2312_2372 */ - { 2412, 2412, 20, 0, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* W1_2412_2412 */ - { 2417, 2432, 20, 0, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* W1_2417_2432 */ - { 2437, 2442, 20, 0, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* W1_2437_2442 */ - { 2447, 2457, 20, 0, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* W1_2447_2457 */ - { 2462, 2462, 20, 0, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* W1_2462_2462 */ - { 2467, 2467, 20, 0, 20, 5, NO_DFS, PSCAN_WWR | IS_ECM_CHAN, 0, 0}, /* W1_2467_2467 */ - { 2467, 2467, 20, 0, 20, 5, NO_DFS, NO_PSCAN | IS_ECM_CHAN, 0, 0}, /* W2_2467_2467 */ - { 2472, 2472, 20, 0, 20, 5, NO_DFS, PSCAN_WWR | IS_ECM_CHAN, 0, 0}, /* W1_2472_2472 */ - { 2472, 2472, 20, 0, 20, 5, NO_DFS, NO_PSCAN | IS_ECM_CHAN, 0, 0}, /* W2_2472_2472 */ - { 2484, 2484, 20, 0, 20, 5, NO_DFS, PSCAN_WWR | IS_ECM_CHAN, 0, 0}, /* W1_2484_2484 */ - { 2484, 2484, 20, 0, 20, 5, NO_DFS, NO_PSCAN | IS_ECM_CHAN, 0, 0}, /* W2_2484_2484 */ -}; - /* * 2GHz 11g channel tags @@ -984,16 +906,6 @@ enum { T1_2512_2732 }; -static REG_DMN_FREQ_BAND regDmn2Ghz11gTurboFreq[] = { - { 2312, 2372, 5, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_2312_2372 */ - { 2437, 2437, 5, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_2437_2437 */ - { 2437, 2437, 20, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T2_2437_2437 */ - { 2437, 2437, 18, 6, 40, 40, NO_DFS, PSCAN_WWR, 0, 0}, /* T3_2437_2437 */ - { 2512, 2732, 5, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_2512_2732 */ -}; - - - /* * 2GHz 11n frequency tags */ @@ -1005,15 +917,6 @@ enum { NG_DEMO_ALL_CHANNELS, }; -static REG_DMN_FREQ_BAND regDmn2Ghz11ngFreq[] = { - { 2422, 2452, 20, 0, 40, 5, NO_DFS, NO_PSCAN, 0, 0}, /* NG1_2422_2452 */ - { 2422, 2452, 27, 0, 40, 5, NO_DFS, NO_PSCAN, 0, 0}, /* NG2_2422_2452 */ - { 2422, 2452, 30, 0, 40, 5, NO_DFS, NO_PSCAN, 0, 0}, /* NG3_2422_2452 */ - - { 2312, 2732, 27, 6, 20, 5, NO_DFS, NO_PSCAN, 0, 0}, /* NG_DEMO_ALL_CHANNELS */ -}; - - /* * 5GHz 11n frequency tags */ @@ -1050,42 +953,6 @@ enum { NA_DEMO_ALL_CHANNELS, }; -static REG_DMN_FREQ_BAND regDmn5Ghz11naFreq[] = { - /* - * ToDo: This table needs to be completely populated with 5GHz 11n properties - */ - { 5190, 5230, 15, 0, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* NA1_5190_5230 */ - { 5190, 5230, 17, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* NA2_5190_5230 */ - { 5190, 5230, 18, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* NA3_5190_5230 */ - { 5190, 5230, 20, 0, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* NA4_5190_5230 */ - { 5190, 5230, 23, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* NA5_5190_5230 */ - - { 5270, 5270, 23, 6, 40, 40, DFS_FCC3|DFS_ETSI, NO_PSCAN, 0, 1}, /* NA1_5270_5270 */ - - { 5270, 5310, 18, 6, 40, 40, DFS_FCC3|DFS_ETSI, NO_PSCAN, 0, 1}, /* NA1_5270_5310 */ - { 5270, 5310, 20, 0, 40, 40, DFS_FCC3|DFS_ETSI|DFS_MKK4, NO_PSCAN, 0, 1}, /* NA2_5270_5310 */ - { 5270, 5310, 23, 6, 40, 40, DFS_FCC3|DFS_ETSI, NO_PSCAN, 0, 1}, /* NA3_5270_5310 */ - { 5270, 5310, 30, 6, 40, 40, DFS_FCC3|DFS_ETSI, NO_PSCAN, 0, 1}, /* NA4_5270_5310 */ - - { 5310, 5310, 17, 6, 40, 40, DFS_FCC3|DFS_ETSI, NO_PSCAN, 0, 1}, /* NA1_5310_5310 */ - - { 5510, 5630, 30, 6, 40, 40, DFS_FCC3|DFS_ETSI, NO_PSCAN, 0, 1}, /* NA1_5510_5630 */ - - { 5510, 5670, 20, 6, 40, 40, DFS_FCC3|DFS_ETSI|DFS_MKK4, NO_PSCAN, 0, 1}, /* NA1_5510_5670 */ - { 5510, 5670, 27, 0, 40, 40, DFS_FCC3|DFS_ETSI, NO_PSCAN, 0, 1}, /* NA2_5510_5670 */ - { 5510, 5670, 30, 6, 40, 40, DFS_FCC3, NO_PSCAN, 0, 1}, /* NA3_5510_5670 */ - - { 5755, 5795, 17, 0, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* NA1_5755_5795 */ - { 5755, 5795, 20, 6, 40, 40, DFS_ETSI, NO_PSCAN, 0, 0}, /* NA2_5755_5795 */ - { 5755, 5795, 23, 0, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* NA3_5755_5795 */ - { 5755, 5795, 30, 0, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* NA4_5755_5795 */ - { 5755, 5795, 30, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* NA5_5755_5795 */ - - { 5795, 5795, 30, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* NA1_5795_5795 */ - - { 4920, 6100, 30, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* NA_DEMO_ALL_CHANNELS */ -}; - typedef struct regDomain { u16_t regDmnEnum; /* value from EnumRd table */ u8_t conformanceTestLimit; From e36e8c0add960eb523a8a1bc93c7efa744339415 Mon Sep 17 00:00:00 2001 From: "horms@vergenet.net" Date: Fri, 8 Jan 2010 18:57:52 +1100 Subject: [PATCH 138/367] Staging: otus: Fix ZM_SEQ_DEBUG macro for no-debug case tcp_seq is only initialised in case where ZM_ENABLE_PERFORMANCE_EVALUATION is defined. So move the call to ZM_SEQ_DEBUG() and the decleration of tcp_seq in there too. This allows ZM_SEQ_DEBUG() to be removed from the non-ZM_ENABLE_PERFORMANCE_EVALUATION case in the header file. This resolves several compile warnings for the non-ZM_ENABLE_PERFORMANCE_EVALUATION case. However, the ZM_ENABLE_PERFORMANCE_EVALUATION case seems to be completely broken. $ gcc (Debian 4.4.2-8) 4.4.2 Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ make ... drivers/staging/otus/80211core/cagg.c: In function 'zfAggRxEnabled': drivers/staging/otus/80211core/cagg.c:1872: warning: left-hand operand of comma expression has no effect drivers/staging/otus/80211core/cagg.c:1872: warning: left-hand operand of comma expression has no effect drivers/staging/otus/80211core/cagg.c:1872: warning: statement with no effect ... Signed-off-by: Simon Horman Signed-off-by: Greg Kroah-Hartman --- drivers/staging/otus/80211core/cagg.c | 15 +++++++++------ drivers/staging/otus/80211core/pub_zfi.h | 1 - 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/staging/otus/80211core/cagg.c b/drivers/staging/otus/80211core/cagg.c index d11661c3b884..f9514c06c14c 100644 --- a/drivers/staging/otus/80211core/cagg.c +++ b/drivers/staging/otus/80211core/cagg.c @@ -1838,7 +1838,6 @@ struct agg_tid_rx* zfAggRxEnabled(zdev_t* dev, zbuf_t* buf) u16_t frameType; u16_t frameCtrl; u16_t frameSubtype; - u32_t tcp_seq; //struct aggSta *agg_sta; #if ZM_AGG_FPGA_REORDERING struct agg_tid_rx *tid_rx; @@ -1863,13 +1862,17 @@ struct agg_tid_rx* zfAggRxEnabled(zdev_t* dev, zbuf_t* buf) return NULL; } #ifdef ZM_ENABLE_PERFORMANCE_EVALUATION - tcp_seq = zmw_rx_buf_readb(dev, buf, 22+36) << 24; - tcp_seq += zmw_rx_buf_readb(dev, buf, 22+37) << 16; - tcp_seq += zmw_rx_buf_readb(dev, buf, 22+38) << 8; - tcp_seq += zmw_rx_buf_readb(dev, buf, 22+39); + { + u32_t tcp_seq; + + tcp_seq = zmw_rx_buf_readb(dev, buf, 22+36) << 24; + tcp_seq += zmw_rx_buf_readb(dev, buf, 22+37) << 16; + tcp_seq += zmw_rx_buf_readb(dev, buf, 22+38) << 8; + tcp_seq += zmw_rx_buf_readb(dev, buf, 22+39); + ZM_SEQ_DEBUG("In %5d, %12u\n", seq_no, tcp_seq); + } #endif - ZM_SEQ_DEBUG("In %5d, %12u\n", seq_no, tcp_seq); dst0 = zmw_rx_buf_readh(dev, buf, offset+4); src[0] = zmw_rx_buf_readh(dev, buf, offset+10); diff --git a/drivers/staging/otus/80211core/pub_zfi.h b/drivers/staging/otus/80211core/pub_zfi.h index b7b7f455f357..5202e5a645d5 100644 --- a/drivers/staging/otus/80211core/pub_zfi.h +++ b/drivers/staging/otus/80211core/pub_zfi.h @@ -814,7 +814,6 @@ extern void zfiRxPerformanceReg(zdev_t* dev, u32_t reg, u32_t rsp); #define ZM_PERFORMANCE_RX_AMSDU(dev, buf, len) #define ZM_PERFORMANCE_RX_FLUSH(dev) #define ZM_PERFORMANCE_RX_CLEAR(dev) -#define ZM_SEQ_DEBUG #define ZM_PERFORMANCE_RX_REORDER(dev) #endif /***** End of section 3 *****/ From 0daa04a586f03de8f9022e29fb41c9dc0de28c4a Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Tue, 12 Jan 2010 11:50:09 +1100 Subject: [PATCH 139/367] Staging: otus: zfTkipInit(): increment another pointer Increment the pointer rather than its value. These appear to be logic errors. Thanks to Dan Carpenter for the first hunk of this change. Cc: Dan Carpenter Signed-off-by: Simon Horman Signed-off-by: Greg Kroah-Hartman --- drivers/staging/otus/80211core/ctkip.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/otus/80211core/ctkip.c b/drivers/staging/otus/80211core/ctkip.c index be42f7aaa37d..ca0740227be4 100644 --- a/drivers/staging/otus/80211core/ctkip.c +++ b/drivers/staging/otus/80211core/ctkip.c @@ -255,7 +255,8 @@ void zfTkipInit(u8_t* key, u8_t* ta, struct zsTkipSeed* pSeed, u8_t* initIv) zfMemoryCopy(pSeed->ta, ta, 6); zfMemoryCopy(pSeed->tk, key, 16); - iv16 = *initIv++; + iv16 = *initIv; + initIv++; iv16 += *initIv<<8; initIv++; @@ -264,7 +265,7 @@ void zfTkipInit(u8_t* key, u8_t* ta, struct zsTkipSeed* pSeed, u8_t* initIv) for(i=0; i<4; i++) // initiv is little endian { iv32 += *initIv<<(i*8); - *initIv++; + initIv++; } pSeed->iv32 = iv32+1; // Force Recalculating on Tkip Phase1 From 75c8075394906b4bda4b056328bd9b401277d9b8 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Sat, 9 Jan 2010 16:57:34 +0000 Subject: [PATCH 140/367] staging: iio: Ensure mutex is correctly unlocked in __iio_push_event This error was picked up by running the smatch static checker over all the IIO subsytem. Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/industrialio-core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c index 768f44894d08..87799b2a9262 100644 --- a/drivers/staging/iio/industrialio-core.c +++ b/drivers/staging/iio/industrialio-core.c @@ -79,11 +79,14 @@ EXPORT_SYMBOL(__iio_change_event); /* Does anyone care? */ mutex_lock(&ev_int->event_list_lock); if (test_bit(IIO_BUSY_BIT_POS, &ev_int->handler.flags)) { - if (ev_int->current_events == ev_int->max_events) + if (ev_int->current_events == ev_int->max_events) { + mutex_unlock(&ev_int->event_list_lock); return 0; + } ev = kmalloc(sizeof(*ev), GFP_KERNEL); if (ev == NULL) { ret = -ENOMEM; + mutex_unlock(&ev_int->event_list_lock); goto error_ret; } ev->ev.id = ev_code; From 75b16013e29f6058e5bd648e6f4a9c03d262cf4f Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Sat, 9 Jan 2010 17:01:33 +0000 Subject: [PATCH 141/367] staging: iio: Fix incorrect existence check for a shared event pointer. A second smatch detected error. First part fixes in a typo in the comment directly above that I noticed whilst trying to remember what this code actually does. Second part is the actual fix. I'm fairly amazed this one never caused trouble in testing as it is in one of the most common paths. Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/industrialio-core.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c index 87799b2a9262..4ff683a3df31 100644 --- a/drivers/staging/iio/industrialio-core.c +++ b/drivers/staging/iio/industrialio-core.c @@ -292,16 +292,16 @@ ssize_t iio_event_chrdev_read(struct file *filep, mutex_unlock(&ev_int->event_list_lock); /* * Possible concurency issue if an update of this event is on its way - * through. May lead to new even being removed whilst the reported event - * was the unescalated event. In typical use case this is not a problem - * as userspace will say read half the buffer due to a 50% full event - * which would make the correct 100% full incorrect anyway. + * through. May lead to new event being removed whilst the reported + * event was the unescalated event. In typical use case this is not a + * problem as userspace will say read half the buffer due to a 50% + * full event which would make the correct 100% full incorrect anyway. */ - spin_lock(&el->shared_pointer->lock); - if (el->shared_pointer) + if (el->shared_pointer) { + spin_lock(&el->shared_pointer->lock); (el->shared_pointer->ev_p) = NULL; - spin_unlock(&el->shared_pointer->lock); - + spin_unlock(&el->shared_pointer->lock); + } kfree(el); return len; From 13ac58dac0c6b1edeb060102049b07ebceea9a40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9meth=20M=C3=A1rton?= Date: Sun, 10 Jan 2010 00:18:26 +0100 Subject: [PATCH 142/367] staging: make PCI device id constant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The id_table field of the struct pci_driver is constant in so it is worth to make the initialization data also constant. The semantic match that finds this kind of pattern is as follows: (http://coccinelle.lip6.fr/) // @r@ disable decl_init,const_decl_init; identifier I1, I2, x; @@ struct I1 { ... const struct I2 *x; ... }; @s@ identifier r.I1, y; identifier r.x, E; @@ struct I1 y = { .x = E, }; @c@ identifier r.I2; identifier s.E; @@ const struct I2 E[] = ... ; @depends on !c@ identifier r.I2; identifier s.E; @@ + const struct I2 E[] = ...; // Signed-off-by: Németh Márton Cc: Julia Lawall Cc: cocci@diku.dk Signed-off-by: Greg Kroah-Hartman --- drivers/staging/phison/phison.c | 2 +- drivers/staging/rar/rar_driver.c | 2 +- drivers/staging/sep/sep_driver.c | 2 +- drivers/staging/sm7xx/smtcfb.c | 2 +- drivers/staging/vme/bridges/vme_ca91cx42.c | 2 +- drivers/staging/vme/bridges/vme_tsi148.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/phison/phison.c b/drivers/staging/phison/phison.c index 3817d7497049..ff30cb0321b9 100644 --- a/drivers/staging/phison/phison.c +++ b/drivers/staging/phison/phison.c @@ -69,7 +69,7 @@ static int phison_init_one(struct pci_dev *pdev, const struct pci_device_id *id) return ret; } -static struct pci_device_id phison_pci_tbl[] = { +static const struct pci_device_id phison_pci_tbl[] = { { PCI_VENDOR_ID_PHISON, PCI_DEVICE_ID_PS5000, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xffff00, 0 }, { 0, }, diff --git a/drivers/staging/rar/rar_driver.c b/drivers/staging/rar/rar_driver.c index b91a90f4ce9e..a85a7da6df40 100644 --- a/drivers/staging/rar/rar_driver.c +++ b/drivers/staging/rar/rar_driver.c @@ -71,7 +71,7 @@ static void __exit rar_exit_handler(void); static int __devinit rar_probe(struct pci_dev *pdev, const struct pci_device_id *ent); -static struct pci_device_id rar_pci_id_tbl[] = { +static const struct pci_device_id rar_pci_id_tbl[] = { { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4110) }, { 0 } }; diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c index 92fa18655f87..09346c92e94d 100644 --- a/drivers/staging/sep/sep_driver.c +++ b/drivers/staging/sep/sep_driver.c @@ -2587,7 +2587,7 @@ end_function: return error; } -static struct pci_device_id sep_pci_id_tbl[] = { +static const struct pci_device_id sep_pci_id_tbl[] = { {PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x080c)}, {0} }; diff --git a/drivers/staging/sm7xx/smtcfb.c b/drivers/staging/sm7xx/smtcfb.c index 161dbc9c1397..080b51a6e553 100644 --- a/drivers/staging/sm7xx/smtcfb.c +++ b/drivers/staging/sm7xx/smtcfb.c @@ -1103,7 +1103,7 @@ static int __init smtcfb_pci_probe(struct pci_dev *pdev, /* Jason (08/11/2009) PCI_DRV wrapper essential structs */ -static struct pci_device_id smtcfb_pci_table[] = { +static const struct pci_device_id smtcfb_pci_table[] = { {0x126f, 0x710, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {0x126f, 0x712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {0x126f, 0x720, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c index 470479856054..807278485bbf 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.c +++ b/drivers/staging/vme/bridges/vme_ca91cx42.c @@ -61,7 +61,7 @@ static struct mutex vme_int; /* static char driver_name[] = "vme_ca91cx42"; -static struct pci_device_id ca91cx42_ids[] = { +static const struct pci_device_id ca91cx42_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_TUNDRA, PCI_DEVICE_ID_TUNDRA_CA91C142) }, { }, }; diff --git a/drivers/staging/vme/bridges/vme_tsi148.c b/drivers/staging/vme/bridges/vme_tsi148.c index 4d19a914ec52..ed8297daf9ee 100644 --- a/drivers/staging/vme/bridges/vme_tsi148.c +++ b/drivers/staging/vme/bridges/vme_tsi148.c @@ -81,7 +81,7 @@ static struct mutex vme_int; /* static char driver_name[] = "vme_tsi148"; -static struct pci_device_id tsi148_ids[] = { +static const struct pci_device_id tsi148_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_TUNDRA, PCI_DEVICE_ID_TUNDRA_TSI148) }, { }, }; From a457732b836b970c82c7ba35b4cfc938c9c543f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9meth=20M=C3=A1rton?= Date: Sun, 10 Jan 2010 00:18:34 +0100 Subject: [PATCH 143/367] staging: make USB device id constant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The id_table field of the struct usb_device_id is constant in so it is worth to make the initialization data also constant. The semantic match that finds this kind of pattern is as follows: (http://coccinelle.lip6.fr/) // @r@ disable decl_init,const_decl_init; identifier I1, I2, x; @@ struct I1 { ... const struct I2 *x; ... }; @s@ identifier r.I1, y; identifier r.x, E; @@ struct I1 y = { .x = E, }; @c@ identifier r.I2; identifier s.E; @@ const struct I2 E[] = ... ; @depends on !c@ identifier r.I2; identifier s.E; @@ + const struct I2 E[] = ...; // Signed-off-by: Németh Márton Cc: Julia Lawall Cc: cocci@diku.dk Signed-off-by: Greg Kroah-Hartman --- drivers/staging/asus_oled/asus_oled.c | 2 +- drivers/staging/comedi/drivers/dt9812.c | 2 +- drivers/staging/comedi/drivers/usbdux.c | 2 +- drivers/staging/comedi/drivers/usbduxfast.c | 2 +- drivers/staging/comedi/drivers/vmk80xx.c | 2 +- drivers/staging/frontier/alphatrack.c | 2 +- drivers/staging/frontier/tranzport.c | 2 +- drivers/staging/go7007/go7007-usb.c | 2 +- drivers/staging/go7007/s2250-loader.c | 2 +- drivers/staging/line6/driver.c | 2 +- drivers/staging/otus/zdusb.c | 2 +- drivers/staging/quatech_usb2/quatech_usb2.c | 2 +- drivers/staging/rtl8192su/r8192U_core.c | 2 +- drivers/staging/rtl8192u/r8192U_core.c | 2 +- drivers/staging/serqt_usb2/serqt_usb2.c | 2 +- drivers/staging/winbond/wbusb.c | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/staging/asus_oled/asus_oled.c b/drivers/staging/asus_oled/asus_oled.c index c597fb27bd53..cadb6f7321ad 100644 --- a/drivers/staging/asus_oled/asus_oled.c +++ b/drivers/staging/asus_oled/asus_oled.c @@ -87,7 +87,7 @@ struct oled_dev_desc_str { }; /* table of devices that work with this driver */ -static struct usb_device_id id_table[] = { +static const struct usb_device_id id_table[] = { /* Asus G1/G2 (and variants)*/ { USB_DEVICE(USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_LCM) }, /* Asus G50V (and possibly others - G70? G71?)*/ diff --git a/drivers/staging/comedi/drivers/dt9812.c b/drivers/staging/comedi/drivers/dt9812.c index 312f4f282bd7..96caae36279c 100644 --- a/drivers/staging/comedi/drivers/dt9812.c +++ b/drivers/staging/comedi/drivers/dt9812.c @@ -264,7 +264,7 @@ struct dt9812_usb_cmd { static DECLARE_MUTEX(dt9812_mutex); -static struct usb_device_id dt9812_table[] = { +static const struct usb_device_id dt9812_table[] = { {USB_DEVICE(0x0867, 0x9812)}, {} /* Terminating entry */ }; diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/comedi/drivers/usbdux.c index 9a1b559c4b0d..0c854a6f1ca6 100644 --- a/drivers/staging/comedi/drivers/usbdux.c +++ b/drivers/staging/comedi/drivers/usbdux.c @@ -2833,7 +2833,7 @@ static struct comedi_driver driver_usbdux = { }; /* Table with the USB-devices: just now only testing IDs */ -static struct usb_device_id usbduxsub_table[] = { +static const struct usb_device_id usbduxsub_table[] = { {USB_DEVICE(0x13d8, 0x0001)}, {USB_DEVICE(0x13d8, 0x0002)}, {} /* Terminating entry */ diff --git a/drivers/staging/comedi/drivers/usbduxfast.c b/drivers/staging/comedi/drivers/usbduxfast.c index 2e675cce7dbf..4ff48860fc57 100644 --- a/drivers/staging/comedi/drivers/usbduxfast.c +++ b/drivers/staging/comedi/drivers/usbduxfast.c @@ -1769,7 +1769,7 @@ static struct comedi_driver driver_usbduxfast = { /* * Table with the USB-devices: just now only testing IDs */ -static struct usb_device_id usbduxfastsub_table[] = { +static const struct usb_device_id usbduxfastsub_table[] = { /* { USB_DEVICE(0x4b4, 0x8613) }, testing */ {USB_DEVICE(0x13d8, 0x0010)}, /* real ID */ {USB_DEVICE(0x13d8, 0x0011)}, /* real ID */ diff --git a/drivers/staging/comedi/drivers/vmk80xx.c b/drivers/staging/comedi/drivers/vmk80xx.c index c34a0b9141e2..6479c38d0278 100644 --- a/drivers/staging/comedi/drivers/vmk80xx.c +++ b/drivers/staging/comedi/drivers/vmk80xx.c @@ -75,7 +75,7 @@ enum { DEVICE_VMK8061 }; -static struct usb_device_id vmk80xx_id_table[] = { +static const struct usb_device_id vmk80xx_id_table[] = { {USB_DEVICE(0x10cf, 0x5500), .driver_info = DEVICE_VMK8055}, {USB_DEVICE(0x10cf, 0x5501), .driver_info = DEVICE_VMK8055}, {USB_DEVICE(0x10cf, 0x5502), .driver_info = DEVICE_VMK8055}, diff --git a/drivers/staging/frontier/alphatrack.c b/drivers/staging/frontier/alphatrack.c index 15aed87fe1bb..a50a21518a8e 100644 --- a/drivers/staging/frontier/alphatrack.c +++ b/drivers/staging/frontier/alphatrack.c @@ -58,7 +58,7 @@ #endif /* table of devices that work with this driver */ -static struct usb_device_id usb_alphatrack_table[] = { +static const struct usb_device_id usb_alphatrack_table[] = { {USB_DEVICE(VENDOR_ID, PRODUCT_ID)}, {} /* Terminating entry */ }; diff --git a/drivers/staging/frontier/tranzport.c b/drivers/staging/frontier/tranzport.c index ef8fcc8c67bd..2f03f43f3a2e 100644 --- a/drivers/staging/frontier/tranzport.c +++ b/drivers/staging/frontier/tranzport.c @@ -55,7 +55,7 @@ #endif /* table of devices that work with this driver */ -static struct usb_device_id usb_tranzport_table[] = { +static const struct usb_device_id usb_tranzport_table[] = { {USB_DEVICE(VENDOR_ID, PRODUCT_ID)}, {} /* Terminating entry */ }; diff --git a/drivers/staging/go7007/go7007-usb.c b/drivers/staging/go7007/go7007-usb.c index 1e89dc04ec23..baace8367cb0 100644 --- a/drivers/staging/go7007/go7007-usb.c +++ b/drivers/staging/go7007/go7007-usb.c @@ -444,7 +444,7 @@ static struct go7007_usb_board board_sensoray_2250 = { }, }; -static struct usb_device_id go7007_usb_id_table[] = { +static const struct usb_device_id go7007_usb_id_table[] = { { .match_flags = USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION | USB_DEVICE_ID_MATCH_INT_INFO, diff --git a/drivers/staging/go7007/s2250-loader.c b/drivers/staging/go7007/s2250-loader.c index c152ab9be2fb..ef833e0d63ae 100644 --- a/drivers/staging/go7007/s2250-loader.c +++ b/drivers/staging/go7007/s2250-loader.c @@ -148,7 +148,7 @@ static void s2250loader_disconnect(struct usb_interface *interface) unlock_kernel(); } -static struct usb_device_id s2250loader_ids[] = { +static const struct usb_device_id s2250loader_ids[] = { {USB_DEVICE(0x1943, 0xa250)}, {} /* Terminating entry */ }; diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c index e4078a92d399..0392a4bc8cc8 100644 --- a/drivers/staging/line6/driver.c +++ b/drivers/staging/line6/driver.c @@ -33,7 +33,7 @@ /* table of devices that work with this driver */ -static struct usb_device_id line6_id_table[] = { +static const struct usb_device_id line6_id_table[] = { { USB_DEVICE(LINE6_VENDOR_ID, LINE6_DEVID_BASSPODXT) }, { USB_DEVICE(LINE6_VENDOR_ID, LINE6_DEVID_BASSPODXTLIVE) }, { USB_DEVICE(LINE6_VENDOR_ID, LINE6_DEVID_BASSPODXTPRO) }, diff --git a/drivers/staging/otus/zdusb.c b/drivers/staging/otus/zdusb.c index 2a6d937ba5e8..4cd9b7f5a887 100644 --- a/drivers/staging/otus/zdusb.c +++ b/drivers/staging/otus/zdusb.c @@ -45,7 +45,7 @@ MODULE_LICENSE("Dual BSD/GPL"); static const char driver_name[] = "Otus"; /* table of devices that work with this driver */ -static struct usb_device_id zd1221_ids [] = { +static const struct usb_device_id zd1221_ids[] = { { USB_DEVICE(VENDOR_ATHR, PRODUCT_AR9170) }, { USB_DEVICE(VENDOR_DLINK, PRODUCT_DWA160A) }, { USB_DEVICE(VENDOR_NETGEAR, PRODUCT_WNDA3100) }, diff --git a/drivers/staging/quatech_usb2/quatech_usb2.c b/drivers/staging/quatech_usb2/quatech_usb2.c index f7726f1d3641..1561f74a413b 100644 --- a/drivers/staging/quatech_usb2/quatech_usb2.c +++ b/drivers/staging/quatech_usb2/quatech_usb2.c @@ -116,7 +116,7 @@ static int debug; #define FOURTHCHAR ((unsigned char *)(urb->transfer_buffer))[i + 3] #define FIFTHCHAR ((unsigned char *)(urb->transfer_buffer))[i + 4] -static struct usb_device_id quausb2_id_table[] = { +static const struct usb_device_id quausb2_id_table[] = { {USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_SSU2_100)}, {USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_DSU2_100)}, {USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_DSU2_400)}, diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c index f15be1eca324..23d1d35be7ed 100644 --- a/drivers/staging/rtl8192su/r8192U_core.c +++ b/drivers/staging/rtl8192su/r8192U_core.c @@ -110,7 +110,7 @@ u32 rt_global_debug_component = \ #define TOTAL_CAM_ENTRY 32 #define CAM_CONTENT_COUNT 8 -static struct usb_device_id rtl8192_usb_id_tbl[] = { +static const struct usb_device_id rtl8192_usb_id_tbl[] = { /* Realtek */ {USB_DEVICE(0x0bda, 0x8192)}, {USB_DEVICE(0x0bda, 0x8709)}, diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 7cf7ea703bba..f1e085ba1cf1 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -104,7 +104,7 @@ u32 rt_global_debug_component = \ #define TOTAL_CAM_ENTRY 32 #define CAM_CONTENT_COUNT 8 -static struct usb_device_id rtl8192_usb_id_tbl[] = { +static const struct usb_device_id rtl8192_usb_id_tbl[] = { /* Realtek */ {USB_DEVICE(0x0bda, 0x8192)}, {USB_DEVICE(0x0bda, 0x8709)}, diff --git a/drivers/staging/serqt_usb2/serqt_usb2.c b/drivers/staging/serqt_usb2/serqt_usb2.c index 060e9de3b065..375a50580a28 100644 --- a/drivers/staging/serqt_usb2/serqt_usb2.c +++ b/drivers/staging/serqt_usb2/serqt_usb2.c @@ -126,7 +126,7 @@ static int debug; #define MODEM_CTRL 0x40 #define RS232_MODE 0x00 -static struct usb_device_id serqt_id_table[] = { +static const struct usb_device_id serqt_id_table[] = { {USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_SSU100)}, {USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_SSU200)}, {USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_DSU100)}, diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c index 1c5876359491..ecf418dcefd9 100644 --- a/drivers/staging/winbond/wbusb.c +++ b/drivers/staging/winbond/wbusb.c @@ -23,7 +23,7 @@ MODULE_DESCRIPTION("IS89C35 802.11bg WLAN USB Driver"); MODULE_LICENSE("GPL"); MODULE_VERSION("0.1"); -static struct usb_device_id wb35_table[] __devinitdata = { +static const struct usb_device_id wb35_table[] __devinitconst = { { USB_DEVICE(0x0416, 0x0035) }, { USB_DEVICE(0x18E8, 0x6201) }, { USB_DEVICE(0x18E8, 0x6206) }, From b76a32638d9d7d6b421fccce02e667007509bd7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9meth=20M=C3=A1rton?= Date: Sun, 10 Jan 2010 00:18:41 +0100 Subject: [PATCH 144/367] staging: make i2c device id constant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The id_table field of the struct i2c_driver is constant in so it is worth to make the initialization data also constant. The semantic match that finds this kind of pattern is as follows: (http://coccinelle.lip6.fr/) // @r@ disable decl_init,const_decl_init; identifier I1, I2, x; @@ struct I1 { ... const struct I2 *x; ... }; @s@ identifier r.I1, y; identifier r.x, E; @@ struct I1 y = { .x = E, }; @c@ identifier r.I2; identifier s.E; @@ const struct I2 E[] = ... ; @depends on !c@ identifier r.I2; identifier s.E; @@ + const struct I2 E[] = ...; // Signed-off-by: Németh Márton Cc: Julia Lawall Cc: cocci@diku.dk Signed-off-by: Greg Kroah-Hartman --- drivers/staging/go7007/s2250-board.c | 2 +- drivers/staging/go7007/wis-ov7640.c | 2 +- drivers/staging/go7007/wis-saa7113.c | 2 +- drivers/staging/go7007/wis-saa7115.c | 2 +- drivers/staging/go7007/wis-sony-tuner.c | 2 +- drivers/staging/go7007/wis-tw2804.c | 2 +- drivers/staging/go7007/wis-tw9903.c | 2 +- drivers/staging/go7007/wis-uda1342.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/go7007/s2250-board.c b/drivers/staging/go7007/s2250-board.c index 8cf7f2750b3f..977df137a0cc 100644 --- a/drivers/staging/go7007/s2250-board.c +++ b/drivers/staging/go7007/s2250-board.c @@ -667,7 +667,7 @@ static int s2250_remove(struct i2c_client *client) return 0; } -static struct i2c_device_id s2250_id[] = { +static const struct i2c_device_id s2250_id[] = { { "s2250", 0 }, { } }; diff --git a/drivers/staging/go7007/wis-ov7640.c b/drivers/staging/go7007/wis-ov7640.c index 04d6d3a498a3..4f0cbdde2765 100644 --- a/drivers/staging/go7007/wis-ov7640.c +++ b/drivers/staging/go7007/wis-ov7640.c @@ -77,7 +77,7 @@ static int wis_ov7640_remove(struct i2c_client *client) return 0; } -static struct i2c_device_id wis_ov7640_id[] = { +static const struct i2c_device_id wis_ov7640_id[] = { { "wis_ov7640", 0 }, { } }; diff --git a/drivers/staging/go7007/wis-saa7113.c b/drivers/staging/go7007/wis-saa7113.c index 9ab893bd204e..d196e16fe72b 100644 --- a/drivers/staging/go7007/wis-saa7113.c +++ b/drivers/staging/go7007/wis-saa7113.c @@ -304,7 +304,7 @@ static int wis_saa7113_remove(struct i2c_client *client) return 0; } -static struct i2c_device_id wis_saa7113_id[] = { +static const struct i2c_device_id wis_saa7113_id[] = { { "wis_saa7113", 0 }, { } }; diff --git a/drivers/staging/go7007/wis-saa7115.c b/drivers/staging/go7007/wis-saa7115.c index 8687ad2de761..0f2b4a0ceccf 100644 --- a/drivers/staging/go7007/wis-saa7115.c +++ b/drivers/staging/go7007/wis-saa7115.c @@ -437,7 +437,7 @@ static int wis_saa7115_remove(struct i2c_client *client) return 0; } -static struct i2c_device_id wis_saa7115_id[] = { +static const struct i2c_device_id wis_saa7115_id[] = { { "wis_saa7115", 0 }, { } }; diff --git a/drivers/staging/go7007/wis-sony-tuner.c b/drivers/staging/go7007/wis-sony-tuner.c index 086896cec49b..c723e4aa7147 100644 --- a/drivers/staging/go7007/wis-sony-tuner.c +++ b/drivers/staging/go7007/wis-sony-tuner.c @@ -688,7 +688,7 @@ static int wis_sony_tuner_remove(struct i2c_client *client) return 0; } -static struct i2c_device_id wis_sony_tuner_id[] = { +static const struct i2c_device_id wis_sony_tuner_id[] = { { "wis_sony_tuner", 0 }, { } }; diff --git a/drivers/staging/go7007/wis-tw2804.c b/drivers/staging/go7007/wis-tw2804.c index e15794a2a0ae..1983839f554d 100644 --- a/drivers/staging/go7007/wis-tw2804.c +++ b/drivers/staging/go7007/wis-tw2804.c @@ -327,7 +327,7 @@ static int wis_tw2804_remove(struct i2c_client *client) return 0; } -static struct i2c_device_id wis_tw2804_id[] = { +static const struct i2c_device_id wis_tw2804_id[] = { { "wis_tw2804", 0 }, { } }; diff --git a/drivers/staging/go7007/wis-tw9903.c b/drivers/staging/go7007/wis-tw9903.c index 506dca6e942e..f97e2be3c0b5 100644 --- a/drivers/staging/go7007/wis-tw9903.c +++ b/drivers/staging/go7007/wis-tw9903.c @@ -309,7 +309,7 @@ static int wis_tw9903_remove(struct i2c_client *client) return 0; } -static struct i2c_device_id wis_tw9903_id[] = { +static const struct i2c_device_id wis_tw9903_id[] = { { "wis_tw9903", 0 }, { } }; diff --git a/drivers/staging/go7007/wis-uda1342.c b/drivers/staging/go7007/wis-uda1342.c index 739c7ae8913f..5c4eb49d7357 100644 --- a/drivers/staging/go7007/wis-uda1342.c +++ b/drivers/staging/go7007/wis-uda1342.c @@ -82,7 +82,7 @@ static int wis_uda1342_remove(struct i2c_client *client) return 0; } -static struct i2c_device_id wis_uda1342_id[] = { +static const struct i2c_device_id wis_uda1342_id[] = { { "wis_uda1342", 0 }, { } }; From 3bf040c75294ad9470b11902477e2c07af2031bd Mon Sep 17 00:00:00 2001 From: Minchan Kim Date: Mon, 11 Jan 2010 16:15:53 +0900 Subject: [PATCH 145/367] Staging: ramzswap: Free memory when create_device is failed If create_device is failed, it can't free gendisk and request_queue of preceding devices. It cause memory leak. This patch fixes it. Signed-off-by: Minchan Kim Acked-by: Nitin Gupta Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ramzswap/ramzswap_drv.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/staging/ramzswap/ramzswap_drv.c b/drivers/staging/ramzswap/ramzswap_drv.c index 7a7ead4e6c87..baf757259d0b 100644 --- a/drivers/staging/ramzswap/ramzswap_drv.c +++ b/drivers/staging/ramzswap/ramzswap_drv.c @@ -1292,7 +1292,7 @@ static struct block_device_operations ramzswap_devops = { .owner = THIS_MODULE, }; -static void create_device(struct ramzswap *rzs, int device_id) +static int create_device(struct ramzswap *rzs, int device_id) { mutex_init(&rzs->lock); INIT_LIST_HEAD(&rzs->backing_swap_extent_list); @@ -1301,7 +1301,7 @@ static void create_device(struct ramzswap *rzs, int device_id) if (!rzs->queue) { pr_err("Error allocating disk queue for device %d\n", device_id); - return; + return 0; } blk_queue_make_request(rzs->queue, ramzswap_make_request); @@ -1313,7 +1313,7 @@ static void create_device(struct ramzswap *rzs, int device_id) blk_cleanup_queue(rzs->queue); pr_warning("Error allocating disk structure for device %d\n", device_id); - return; + return 0; } rzs->disk->major = ramzswap_major; @@ -1331,6 +1331,7 @@ static void create_device(struct ramzswap *rzs, int device_id) add_disk(rzs->disk); rzs->init_done = 0; + return 1; } static void destroy_device(struct ramzswap *rzs) @@ -1368,16 +1369,20 @@ static int __init ramzswap_init(void) /* Allocate the device array and initialize each one */ pr_info("Creating %u devices ...\n", num_devices); devices = kzalloc(num_devices * sizeof(struct ramzswap), GFP_KERNEL); - if (!devices) { - ret = -ENOMEM; + if (!devices) goto out; - } for (i = 0; i < num_devices; i++) - create_device(&devices[i], i); - + if (!create_device(&devices[i], i)) { + ret = i; + goto free_devices; + } return 0; +free_devices: + for (i = 0; i < ret; i++) + destroy_device(&devices[i]); out: + ret = -ENOMEM; unregister_blkdev(ramzswap_major, "ramzswap"); return ret; } From 53cf8743d227283e78c27ada407b506014c9223d Mon Sep 17 00:00:00 2001 From: Jeff Mahoney Date: Mon, 11 Jan 2010 10:54:25 -0500 Subject: [PATCH 146/367] Staging: rt2860: Use skb_tail_pointer rt2860 uses skb->tail directly. This patch uses the tail pointer macros instead. Signed-off-by: Jeff Mahoney Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rt2860/rt_linux.c | 10 +++++----- drivers/staging/rt2860/rt_linux.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rt2860/rt_linux.c b/drivers/staging/rt2860/rt_linux.c index 9357fb26cc2a..9d763b4f2261 100644 --- a/drivers/staging/rt2860/rt_linux.c +++ b/drivers/staging/rt2860/rt_linux.c @@ -462,9 +462,9 @@ void *duplicate_pkt(struct rt_rtmp_adapter *pAd, if ((skb = __dev_alloc_skb(HdrLen + DataSize + 2, MEM_ALLOC_FLAG)) != NULL) { skb_reserve(skb, 2); - NdisMoveMemory(skb->tail, pHeader802_3, HdrLen); + NdisMoveMemory(skb_tail_pointer(skb), pHeader802_3, HdrLen); skb_put(skb, HdrLen); - NdisMoveMemory(skb->tail, pData, DataSize); + NdisMoveMemory(skb_tail_pointer(skb), pData, DataSize); skb_put(skb, DataSize); skb->dev = get_netdev_from_bssid(pAd, FromWhichBSSID); pPacket = OSPKT_TO_RTPKT(skb); @@ -515,7 +515,7 @@ void *ClonePacket(struct rt_rtmp_adapter *pAd, pClonedPkt->dev = pRxPkt->dev; pClonedPkt->data = pData; pClonedPkt->len = DataSize; - pClonedPkt->tail = pClonedPkt->data + pClonedPkt->len; + skb_set_tail_pointer(pClonedPkt, DataSize) ASSERT(DataSize < 1530); } return pClonedPkt; @@ -535,7 +535,7 @@ void update_os_packet_info(struct rt_rtmp_adapter *pAd, pOSPkt->dev = get_netdev_from_bssid(pAd, FromWhichBSSID); pOSPkt->data = pRxBlk->pData; pOSPkt->len = pRxBlk->DataSize; - pOSPkt->tail = pOSPkt->data + pOSPkt->len; + skb_set_tail_pointer(pOSPkt, pOSPkt->len); } void wlan_802_11_to_802_3_packet(struct rt_rtmp_adapter *pAd, @@ -553,7 +553,7 @@ void wlan_802_11_to_802_3_packet(struct rt_rtmp_adapter *pAd, pOSPkt->dev = get_netdev_from_bssid(pAd, FromWhichBSSID); pOSPkt->data = pRxBlk->pData; pOSPkt->len = pRxBlk->DataSize; - pOSPkt->tail = pOSPkt->data + pOSPkt->len; + skb_set_tail_pointer(pOSPkt, pOSPkt->len); /* */ /* copy 802.3 header */ diff --git a/drivers/staging/rt2860/rt_linux.h b/drivers/staging/rt2860/rt_linux.h index f85508d9d5a9..a7c540f8e3e3 100644 --- a/drivers/staging/rt2860/rt_linux.h +++ b/drivers/staging/rt2860/rt_linux.h @@ -658,9 +658,9 @@ void linux_pci_unmap_single(void *handle, dma_addr_t dma_addr, size_t size, (RTPKT_TO_OSPKT(_pkt)->len) = (_len) #define GET_OS_PKT_DATATAIL(_pkt) \ - (RTPKT_TO_OSPKT(_pkt)->tail) + (skb_tail_pointer(RTPKT_TO_OSPKT(_pkt)) #define SET_OS_PKT_DATATAIL(_pkt, _start, _len) \ - ((RTPKT_TO_OSPKT(_pkt))->tail) = (u8 *)((_start) + (_len)) + (skb_set_tail_pointer(RTPKT_TO_OSPKT(_pkt), _len)) #define GET_OS_PKT_HEAD(_pkt) \ (RTPKT_TO_OSPKT(_pkt)->head) From 1c7ec2e8e0fb6e8acda4f6b9a682cf7f8e650e2f Mon Sep 17 00:00:00 2001 From: Jeff Mahoney Date: Mon, 11 Jan 2010 10:54:27 -0500 Subject: [PATCH 147/367] Staging: rtl8192e: Use skb_tail_pointer rtl8192e uses skb->tail directly. This patch uses the tail pointer macros instead. Signed-off-by: Jeff Mahoney Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192e/r8192E_core.c | 5 ++--- drivers/staging/rtl8192e/r819xE_cmdpkt.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c index 50c760284df4..886105db8b7c 100644 --- a/drivers/staging/rtl8192e/r8192E_core.c +++ b/drivers/staging/rtl8192e/r8192E_core.c @@ -1807,7 +1807,7 @@ static short rtl8192_alloc_rx_desc_ring(struct net_device *dev) return 0; priv->rx_buf[i] = skb; mapping = (dma_addr_t *)skb->cb; - *mapping = pci_map_single(priv->pdev, skb->tail,//skb_tail_pointer(skb), + *mapping = pci_map_single(priv->pdev, skb_tail_pointer(skb), priv->rxbuffersize, PCI_DMA_FROMDEVICE); entry->BufferAddress = cpu_to_le32(*mapping); @@ -6287,8 +6287,7 @@ static void rtl8192_rx(struct net_device *dev) skb = new_skb; priv->rx_buf[priv->rx_idx] = skb; - *((dma_addr_t *) skb->cb) = pci_map_single(priv->pdev, skb->tail, priv->rxbuffersize, PCI_DMA_FROMDEVICE); -// *((dma_addr_t *) skb->cb) = pci_map_single(priv->pdev, skb_tail_pointer(skb), priv->rxbuffersize, PCI_DMA_FROMDEVICE); + *((dma_addr_t *) skb->cb) = pci_map_single(priv->pdev, skb_tail_pointer(skb), priv->rxbuffersize, PCI_DMA_FROMDEVICE); } } diff --git a/drivers/staging/rtl8192e/r819xE_cmdpkt.c b/drivers/staging/rtl8192e/r819xE_cmdpkt.c index 2aaa4e1bb375..87c334fb7333 100644 --- a/drivers/staging/rtl8192e/r819xE_cmdpkt.c +++ b/drivers/staging/rtl8192e/r819xE_cmdpkt.c @@ -135,7 +135,7 @@ RT_STATUS cmpk_message_handle_tx( * Transform from little endian to big endian * and pending zero */ - seg_ptr = skb->tail; + seg_ptr = skb_tail_pointer(skb); for(i=0 ; i < frag_length; i+=4) { *seg_ptr++ = ((i+0) Date: Mon, 11 Jan 2010 10:54:29 -0500 Subject: [PATCH 148/367] Staging: rtl8192u: dont use -mhard-float rtl8192u uses -mhard-float, which doesn't exist on ia64. Since in-kernel floating-point isn't allowed, this is implied anyway. Signed-off-by: Jeff Mahoney Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192u/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192u/Makefile b/drivers/staging/rtl8192u/Makefile index 2d59c4ef6c5b..738f4a80ec67 100644 --- a/drivers/staging/rtl8192u/Makefile +++ b/drivers/staging/rtl8192u/Makefile @@ -3,7 +3,7 @@ NIC_SELECT = RTL8192U EXTRA_CFLAGS += -std=gnu89 EXTRA_CFLAGS += -O2 -EXTRA_CFLAGS += -mhard-float -DCONFIG_FORCE_HARD_FLOAT=y +EXTRA_CFLAGS += -DCONFIG_FORCE_HARD_FLOAT=y EXTRA_CFLAGS += -DJACKSON_NEW_8187 -DJACKSON_NEW_RX EXTRA_CFLAGS += -DTHOMAS_BEACON -DTHOMAS_TASKLET -DTHOMAS_SKB -DTHOMAS_TURBO #EXTRA_CFLAGS += -DUSB_TX_DRIVER_AGGREGATION_ENABLE From 23639126523b274e094515b609c987e927284920 Mon Sep 17 00:00:00 2001 From: Jeff Mahoney Date: Mon, 11 Jan 2010 10:54:30 -0500 Subject: [PATCH 149/367] Staging: otus: fix assignment makes integer from pointer without a cast warnings This patch fixes some %x pointer printing to %p. It also uses the skb_tail_pointer and skb_mac_header macros for accessing thos members. Signed-off-by: Jeff Mahoney Signed-off-by: Greg Kroah-Hartman --- drivers/staging/otus/usbdrv.c | 4 ++-- drivers/staging/otus/wrap_pkt.c | 10 ++-------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/staging/otus/usbdrv.c b/drivers/staging/otus/usbdrv.c index b0adbc8b2dc2..5e6a12037b12 100644 --- a/drivers/staging/otus/usbdrv.c +++ b/drivers/staging/otus/usbdrv.c @@ -829,7 +829,7 @@ int zfLnxRegisterVapDev(struct net_device* parentDev, u16_t vapId) { /* Allocate net device structure */ vap[vapId].dev = alloc_etherdev(0); - printk("Register vap dev=%x\n", (u32_t)vap[vapId].dev); + printk("Register vap dev=%p\n", vap[vapId].dev); if(vap[vapId].dev == NULL) { printk("alloc_etherdev fail\n"); @@ -883,7 +883,7 @@ int zfLnxUnregisterVapDev(struct net_device* parentDev, u16_t vapId) printk("Unregister VAP dev : %s\n", vap[vapId].dev->name); if(vap[vapId].dev != NULL) { - printk("Unregister vap dev=%x\n", (u32_t)vap[vapId].dev); + printk("Unregister vap dev=%p\n", vap[vapId].dev); // //unregister_netdevice(wds[wdsId].dev); unregister_netdev(vap[vapId].dev); diff --git a/drivers/staging/otus/wrap_pkt.c b/drivers/staging/otus/wrap_pkt.c index 75bb952fd0a5..a2f5cb1f5298 100644 --- a/drivers/staging/otus/wrap_pkt.c +++ b/drivers/staging/otus/wrap_pkt.c @@ -58,7 +58,7 @@ void zfLnxRecv80211(zdev_t *dev, zbuf_t *buf, struct zsAdditionInfo *addInfo) skb1 = skb_copy(buf, GFP_ATOMIC); if (skb1 != NULL) { skb1->dev = dev; - skb1->mac_header = skb1->data; + skb_reset_mac_header(skb1); skb1->ip_summed = CHECKSUM_NONE; skb1->pkt_type = PACKET_OTHERHOST; /* ETH_P_80211_RAW */ @@ -85,13 +85,7 @@ void zfLnxRecvEth(zdev_t *dev, zbuf_t *buf, u16_t port) /* new_buf = dev_alloc_skb(2048); */ new_buf = dev_alloc_skb(buf->len); -#ifdef NET_SKBUFF_DATA_USES_OFFSET - new_buf->tail = 0; - new_buf->len = 0; -#else - new_buf->tail = new_buf->data; - new_buf->len = 0; -#endif + skb_reset_tail_pointer(new_buf); skb_put(new_buf, buf->len); memcpy(new_buf->data, buf->data, buf->len); From 362f46e3ab6ee4fc771da55067921c39dd13877d Mon Sep 17 00:00:00 2001 From: Jeff Mahoney Date: Mon, 11 Jan 2010 10:54:31 -0500 Subject: [PATCH 150/367] Staging: vme/tsi148: Depend on VIRT_TO_BUS This driver depends on virt_to_bus working correctly, but it doesn't exist on ppc64 (and probably other arches). Signed-off-by: Jeff Mahoney Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vme/bridges/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/vme/bridges/Kconfig b/drivers/staging/vme/bridges/Kconfig index 023cceba0c59..66c49f5d8db8 100644 --- a/drivers/staging/vme/bridges/Kconfig +++ b/drivers/staging/vme/bridges/Kconfig @@ -8,6 +8,7 @@ config VME_CA91CX42 config VME_TSI148 tristate "Tempe" + depends on VIRT_TO_BUS help If you say Y here you get support for the Tundra TSI148 VME bridge chip. From 32dbb67138fdb8cefa348d29850eb9a9ce964e09 Mon Sep 17 00:00:00 2001 From: Pavel Vasilyev Date: Mon, 11 Jan 2010 21:08:02 +0300 Subject: [PATCH 151/367] Staging: dream: HTC Dream camera, not need sizeof http://bugzilla.kernel.org/show_bug.cgi?id=14825 sizeof(extlen), always will be sizeof( unit32_t) or 4 It seems that something is wrong?!?! Signed-off-by: Pavel Vasilyev Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dream/camera/msm_vfe7x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/dream/camera/msm_vfe7x.c b/drivers/staging/dream/camera/msm_vfe7x.c index 33ab3ac6ac57..62fd24d632d5 100644 --- a/drivers/staging/dream/camera/msm_vfe7x.c +++ b/drivers/staging/dream/camera/msm_vfe7x.c @@ -255,8 +255,7 @@ static int vfe_7x_init(struct msm_vfe_callback *presp, extlen = sizeof(struct vfe_frame_extra); - extdata = - kmalloc(sizeof(extlen), GFP_ATOMIC); + extdata = kmalloc(extlen, GFP_ATOMIC); if (!extdata) { rc = -ENOMEM; goto init_fail; From 5d929a71908968905331cda0d52c44570d402110 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 13 Jan 2010 23:36:09 +0000 Subject: [PATCH 152/367] staging: declare MODULE_FIRMWARE in various drivers Signed-off-by: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/jr3_pci.c | 2 ++ drivers/staging/go7007/go7007-driver.c | 2 ++ drivers/staging/go7007/go7007-usb.c | 2 ++ drivers/staging/go7007/saa7134-go7007.c | 1 + drivers/staging/rtl8192e/r819xE_firmware.c | 4 ++++ drivers/staging/rtl8192su/r8192S_firmware.c | 1 + drivers/staging/slicoss/slicoss.c | 6 ++++++ drivers/staging/wlan-ng/prism2fw.c | 1 + 8 files changed, 19 insertions(+) diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c index bd397840dcba..fe5b4953f7ec 100644 --- a/drivers/staging/comedi/drivers/jr3_pci.c +++ b/drivers/staging/comedi/drivers/jr3_pci.c @@ -954,6 +954,8 @@ out: return result; } +MODULE_FIRMWARE("comedi/jr3pci.idm"); + static int jr3_pci_detach(struct comedi_device *dev) { int i; diff --git a/drivers/staging/go7007/go7007-driver.c b/drivers/staging/go7007/go7007-driver.c index fb1345ffb858..d42ba1696999 100644 --- a/drivers/staging/go7007/go7007-driver.c +++ b/drivers/staging/go7007/go7007-driver.c @@ -128,6 +128,8 @@ static int go7007_load_encoder(struct go7007 *go) return rv; } +MODULE_FIRMWARE("go7007fw.bin"); + /* * Boot the encoder and register the I2C adapter if requested. Do the * minimum initialization necessary, since the board-specific code may diff --git a/drivers/staging/go7007/go7007-usb.c b/drivers/staging/go7007/go7007-usb.c index baace8367cb0..ee278f64a16b 100644 --- a/drivers/staging/go7007/go7007-usb.c +++ b/drivers/staging/go7007/go7007-usb.c @@ -444,6 +444,8 @@ static struct go7007_usb_board board_sensoray_2250 = { }, }; +MODULE_FIRMWARE("go7007tv.bin"); + static const struct usb_device_id go7007_usb_id_table[] = { { .match_flags = USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION | diff --git a/drivers/staging/go7007/saa7134-go7007.c b/drivers/staging/go7007/saa7134-go7007.c index 665bbf59d026..b25d7d2090e1 100644 --- a/drivers/staging/go7007/saa7134-go7007.c +++ b/drivers/staging/go7007/saa7134-go7007.c @@ -84,6 +84,7 @@ static struct go7007_board_info board_voyager = { }, }, }; +MODULE_FIRMWARE("go7007tv.bin"); /********************* Driver for GPIO HPI interface *********************/ diff --git a/drivers/staging/rtl8192e/r819xE_firmware.c b/drivers/staging/rtl8192e/r819xE_firmware.c index e05ba1748d30..793a17545554 100644 --- a/drivers/staging/rtl8192e/r819xE_firmware.c +++ b/drivers/staging/rtl8192e/r819xE_firmware.c @@ -365,3 +365,7 @@ download_firmware_fail: rt_status = false; return rt_status; } + +MODULE_FIRMWARE("RTL8192E/boot.img"); +MODULE_FIRMWARE("RTL8192E/main.img"); +MODULE_FIRMWARE("RTL8192E/data.img"); diff --git a/drivers/staging/rtl8192su/r8192S_firmware.c b/drivers/staging/rtl8192su/r8192S_firmware.c index 3561adf0468a..ff65bd125afc 100644 --- a/drivers/staging/rtl8192su/r8192S_firmware.c +++ b/drivers/staging/rtl8192su/r8192S_firmware.c @@ -538,3 +538,4 @@ bool FirmwareDownload92S(struct net_device *dev) return rtStatus; } +MODULE_FIRMWARE("RTL8192SU/rtl8192sfw.bin"); diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index 09a9d759c612..87d98e38d3b5 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -1866,6 +1866,9 @@ static int slic_card_download_gbrcv(struct adapter *adapter) return 0; } +MODULE_FIRMWARE("slicoss/oasisrcvucode.sys"); +MODULE_FIRMWARE("slicoss/gbrcvucode.sys"); + static int slic_card_download(struct adapter *adapter) { const struct firmware *fw; @@ -1977,6 +1980,9 @@ static int slic_card_download(struct adapter *adapter) return STATUS_SUCCESS; } +MODULE_FIRMWARE("slicoss/oasisdownload.sys"); +MODULE_FIRMWARE("slicoss/gbdownload.sys"); + static void slic_adapter_set_hwaddr(struct adapter *adapter) { struct sliccard *card = adapter->card; diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c index aaa70ed57710..5e95c482fb7b 100644 --- a/drivers/staging/wlan-ng/prism2fw.c +++ b/drivers/staging/wlan-ng/prism2fw.c @@ -53,6 +53,7 @@ /* Local Constants */ #define PRISM2_USB_FWFILE "prism2_ru.fw" +MODULE_FIRMWARE(PRISM2_USB_FWFILE); #define S3DATA_MAX 5000 #define S3PLUG_MAX 200 From 4401e8243d2e02a991a475eea11885a56f854f69 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 13 Jan 2010 23:36:27 +0000 Subject: [PATCH 153/367] Staging: sep: include driver name in firmware filenames The current names "cache.image.bin" and "resident.image.bin" are far too generic. Signed-off-by: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- drivers/staging/sep/sep_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c index 09346c92e94d..96453cb4f16a 100644 --- a/drivers/staging/sep/sep_driver.c +++ b/drivers/staging/sep/sep_driver.c @@ -183,8 +183,8 @@ static DECLARE_WAIT_QUEUE_HEAD(sep_event); static int sep_load_firmware(struct sep_device *sep) { const struct firmware *fw; - char *cache_name = "cache.image.bin"; - char *res_name = "resident.image.bin"; + char *cache_name = "sep/cache.image.bin"; + char *res_name = "sep/resident.image.bin"; int error; edbg("SEP Driver:rar_virtual is %p\n", sep->rar_addr); From e4c3a24dc5c318e57e5295a54f03eb8ae54d9ffa Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 13 Jan 2010 23:36:46 +0000 Subject: [PATCH 154/367] Staging: sep: declare MODULE_FIRMWARE Signed-off-by: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- drivers/staging/sep/sep_driver.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c index 96453cb4f16a..8ab3be684098 100644 --- a/drivers/staging/sep/sep_driver.c +++ b/drivers/staging/sep/sep_driver.c @@ -223,6 +223,9 @@ static int sep_load_firmware(struct sep_device *sep) return 0; } +MODULE_FIRMWARE("sep/cache.image.bin"); +MODULE_FIRMWARE("sep/resident.image.bin"); + /** * sep_map_and_alloc_shared_area - allocate shared block * @sep: security processor From 9f64859208f3a56f33f2e893e11df585768f1705 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Thu, 14 Jan 2010 15:07:23 +0200 Subject: [PATCH 155/367] staging: wlags49: don't use custom implementation of atoi() Kernel has its own method called simple_strtoul() to do such things. Here we are using simple_strtoul(value, NULL, 0) because in original function the recognized base is 10 or 16 and input data is assumed to be unsigned. Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlags49_h2/wl_main.c | 2 +- drivers/staging/wlags49_h2/wl_profile.c | 76 ++++++++++++------------- drivers/staging/wlags49_h2/wl_util.c | 49 ---------------- drivers/staging/wlags49_h2/wl_util.h | 2 - 4 files changed, 39 insertions(+), 90 deletions(-) diff --git a/drivers/staging/wlags49_h2/wl_main.c b/drivers/staging/wlags49_h2/wl_main.c index 16764a000942..cf0c38468b20 100644 --- a/drivers/staging/wlags49_h2/wl_main.c +++ b/drivers/staging/wlags49_h2/wl_main.c @@ -3792,7 +3792,7 @@ static int write_int(struct file *file, const char *buffer, unsigned long count, } if (count > 0 ) { proc_number[count] = 0; - nr = wl_atoi( proc_number ); + nr = simple_strtoul(proc_number , NULL, 0); *(unsigned int *)data = nr; if ( nr & 0x8000 ) { //;?kludgy but it is unclear to me were else to place this #if DBG diff --git a/drivers/staging/wlags49_h2/wl_profile.c b/drivers/staging/wlags49_h2/wl_profile.c index 715f027a923f..1e0c75f28557 100644 --- a/drivers/staging/wlags49_h2/wl_profile.c +++ b/drivers/staging/wlags49_h2/wl_profile.c @@ -383,15 +383,15 @@ void translate_option( char *buffer, struct wl_private *lp ) DbgInfo->DebugFlag |= DBG_DEFAULTS; } } else { - DbgInfo->DebugFlag = wl_atoi( value ); //;?DebugFlag; + DbgInfo->DebugFlag = simple_strtoul(value, NULL, 0); //;?DebugFlag; } - DbgInfo->DebugFlag = wl_atoi( value ); //;?Delete ASAP + DbgInfo->DebugFlag = simple_strtoul(value, NULL, 0); //;?Delete ASAP } #endif /* DBG */ if ( strcmp( key, PARM_NAME_AUTH_KEY_MGMT_SUITE ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_AUTH_KEY_MGMT_SUITE, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_AUTH_KEY_MGMT_SUITE ) || ( value_convert <= PARM_MAX_AUTH_KEY_MGMT_SUITE )) { lp->AuthKeyMgmtSuite = value_convert; } else { @@ -401,7 +401,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_BRSC_2GHZ ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_BRSC_2GHZ, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_BRSC ) || ( value_convert <= PARM_MAX_BRSC )) { lp->brsc[0] = value_convert; } else { @@ -411,7 +411,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_BRSC_5GHZ ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_BRSC_5GHZ, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_BRSC ) || ( value_convert <= PARM_MAX_BRSC )) { lp->brsc[1] = value_convert; } else { @@ -448,7 +448,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_ENABLE_ENCRYPTION ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_ENABLE_ENCRYPTION, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_ENABLE_ENCRYPTION ) && ( value_convert <= PARM_MAX_ENABLE_ENCRYPTION )) { lp->EnableEncryption = value_convert; } else { @@ -529,7 +529,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_MULTICAST_RATE ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_MULTICAST_RATE, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_MULTICAST_RATE ) && ( value_convert <= PARM_MAX_MULTICAST_RATE )) { lp->MulticastRate[0] = value_convert; @@ -540,7 +540,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_OWN_CHANNEL ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_OWN_CHANNEL, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if ( wl_is_a_valid_chan( value_convert )) { if ( value_convert > 14 ) { value_convert = value_convert | 0x100; @@ -567,7 +567,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_RTS_THRESHOLD ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_RTS_THRESHOLD, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_RTS_THRESHOLD ) && ( value_convert <= PARM_MAX_RTS_THRESHOLD )) { lp->RTSThreshold = value_convert; } else { @@ -577,7 +577,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_SRSC_2GHZ ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_SRSC_2GHZ, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_SRSC ) || ( value_convert <= PARM_MAX_SRSC )) { lp->srsc[0] = value_convert; } else { @@ -587,7 +587,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_SRSC_5GHZ ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_SRSC_5GHZ, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_SRSC ) || ( value_convert <= PARM_MAX_SRSC )) { lp->srsc[1] = value_convert; } else { @@ -597,7 +597,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_SYSTEM_SCALE ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_SYSTEM_SCALE, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_SYSTEM_SCALE ) && ( value_convert <= PARM_MAX_SYSTEM_SCALE )) { lp->DistanceBetweenAPs = value_convert; } else { @@ -607,9 +607,9 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_TX_KEY ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_TX_KEY, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_TX_KEY ) && ( value_convert <= PARM_MAX_TX_KEY )) { - lp->TransmitKeyID = wl_atoi( value ); + lp->TransmitKeyID = simple_strtoul(value, NULL, 0); } else { DBG_WARNING( DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_TX_KEY ); } @@ -617,7 +617,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_TX_RATE ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_TX_RATE, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_TX_RATE ) && ( value_convert <= PARM_MAX_TX_RATE )) { lp->TxRateControl[0] = value_convert; } else { @@ -627,7 +627,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_TX_POW_LEVEL ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_TX_POW_LEVEL, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_TX_POW_LEVEL ) || ( value_convert <= PARM_MAX_TX_POW_LEVEL )) { lp->txPowLevel = value_convert; } else { @@ -645,7 +645,7 @@ void translate_option( char *buffer, struct wl_private *lp ) if ( strcmp( key, PARM_NAME_PORT_TYPE ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_PORT_TYPE, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert == PARM_MIN_PORT_TYPE ) || ( value_convert == PARM_MAX_PORT_TYPE )) { lp->PortType = value_convert; } else { @@ -654,7 +654,7 @@ void translate_option( char *buffer, struct wl_private *lp ) } else if ( strcmp( key, PARM_NAME_PM_ENABLED ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_PM_ENABLED, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); /* ;? how about wl_main.c containing * VALID_PARAM( PARM_PM_ENABLED <= WVLAN_PM_STATE_STANDARD || * ( PARM_PM_ENABLED & 0x7FFF ) <= WVLAN_PM_STATE_STANDARD ); @@ -677,7 +677,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_MAX_SLEEP ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_MAX_SLEEP, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= 0 ) && ( value_convert <= 65535 )) { lp->MaxSleepDuration = value_convert; } else { @@ -696,7 +696,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_AUTHENTICATION ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_AUTHENTICATION, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_AUTHENTICATION ) && ( value_convert <= PARM_MAX_AUTHENTICATION )) { lp->authentication = value_convert; } else { @@ -706,7 +706,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_OWN_ATIM_WINDOW ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_OWN_ATIM_WINDOW, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_OWN_ATIM_WINDOW ) && ( value_convert <= PARM_MAX_OWN_ATIM_WINDOW )) { lp->atimWindow = value_convert; } else { @@ -716,7 +716,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_PM_HOLDOVER_DURATION ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_PM_HOLDOVER_DURATION, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_PM_HOLDOVER_DURATION ) && ( value_convert <= PARM_MAX_PM_HOLDOVER_DURATION )) { lp->holdoverDuration = value_convert; } else { @@ -730,7 +730,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_CONNECTION_CONTROL ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_CONNECTION_CONTROL, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_CONNECTION_CONTROL ) && ( value_convert <= PARM_MAX_CONNECTION_CONTROL )) { lp->connectionControl = value_convert; } else { @@ -749,7 +749,7 @@ void translate_option( char *buffer, struct wl_private *lp ) if ( strcmp( key, PARM_NAME_OWN_DTIM_PERIOD ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_OWN_DTIM_PERIOD, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if ( value_convert >= PARM_MIN_OWN_DTIM_PERIOD ) { lp->DTIMPeriod = value_convert; } else { @@ -775,7 +775,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_OWN_BEACON_INTERVAL ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_OWN_BEACON_INTERVAL, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if ( value_convert >= PARM_MIN_OWN_BEACON_INTERVAL ) { lp->ownBeaconInterval = value_convert; } else { @@ -785,7 +785,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_COEXISTENCE ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_COEXISTENCE, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if ( value_convert >= PARM_MIN_COEXISTENCE ) { lp->coexistence = value_convert; } else { @@ -797,7 +797,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_RTS_THRESHOLD1 ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_RTS_THRESHOLD1, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_RTS_THRESHOLD ) && ( value_convert <= PARM_MAX_RTS_THRESHOLD )) { lp->wds_port[0].rtsThreshold = value_convert; } else { @@ -807,7 +807,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_RTS_THRESHOLD2 ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_RTS_THRESHOLD2, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_RTS_THRESHOLD ) && ( value_convert <= PARM_MAX_RTS_THRESHOLD )) { lp->wds_port[1].rtsThreshold = value_convert; } else { @@ -817,7 +817,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_RTS_THRESHOLD3 ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_RTS_THRESHOLD3, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_RTS_THRESHOLD ) && ( value_convert <= PARM_MAX_RTS_THRESHOLD )) { lp->wds_port[2].rtsThreshold = value_convert; } else { @@ -827,7 +827,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_RTS_THRESHOLD4 ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_RTS_THRESHOLD4, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_RTS_THRESHOLD ) && ( value_convert <= PARM_MAX_RTS_THRESHOLD )) { lp->wds_port[3].rtsThreshold = value_convert; } else { @@ -837,7 +837,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_RTS_THRESHOLD5 ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_RTS_THRESHOLD5, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_RTS_THRESHOLD ) && ( value_convert <= PARM_MAX_RTS_THRESHOLD )) { lp->wds_port[4].rtsThreshold = value_convert; } else { @@ -847,7 +847,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_RTS_THRESHOLD6 ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_RTS_THRESHOLD6, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_RTS_THRESHOLD ) && ( value_convert <= PARM_MAX_RTS_THRESHOLD )) { lp->wds_port[5].rtsThreshold = value_convert; } else { @@ -857,7 +857,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_TX_RATE1 ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_TX_RATE1, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_TX_RATE ) && ( value_convert <= PARM_MAX_TX_RATE )) { lp->wds_port[0].txRateCntl = value_convert; } else { @@ -867,7 +867,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_TX_RATE2 ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_TX_RATE2, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_TX_RATE ) && ( value_convert <= PARM_MAX_TX_RATE )) { lp->wds_port[1].txRateCntl = value_convert; } else { @@ -877,7 +877,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_TX_RATE3 ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_TX_RATE3, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_TX_RATE ) && ( value_convert <= PARM_MAX_TX_RATE )) { lp->wds_port[2].txRateCntl = value_convert; } else { @@ -887,7 +887,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_TX_RATE4 ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_TX_RATE4, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_TX_RATE ) && ( value_convert <= PARM_MAX_TX_RATE )) { lp->wds_port[3].txRateCntl = value_convert; } else { @@ -897,7 +897,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_TX_RATE5 ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_TX_RATE5, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_TX_RATE ) && ( value_convert <= PARM_MAX_TX_RATE )) { lp->wds_port[4].txRateCntl = value_convert; } else { @@ -907,7 +907,7 @@ void translate_option( char *buffer, struct wl_private *lp ) else if ( strcmp( key, PARM_NAME_TX_RATE6 ) == 0 ) { DBG_TRACE( DbgInfo, "%s, value: %s\n", PARM_NAME_TX_RATE6, value ); - value_convert = wl_atoi( value ); + value_convert = simple_strtoul(value, NULL, 0); if (( value_convert >= PARM_MIN_TX_RATE ) && ( value_convert <= PARM_MAX_TX_RATE )) { lp->wds_port[5].txRateCntl = value_convert; } else { diff --git a/drivers/staging/wlags49_h2/wl_util.c b/drivers/staging/wlags49_h2/wl_util.c index ac1e7f38f982..bbdb9973d1e5 100644 --- a/drivers/staging/wlags49_h2/wl_util.c +++ b/drivers/staging/wlags49_h2/wl_util.c @@ -1536,52 +1536,3 @@ int wl_get_tallies(struct wl_private *lp, return ret; } -/******************************************************************************* - * wl_atoi() - ******************************************************************************* - * - * DESCRIPTION: - * - * Believe it or not, we need our own implementation of atoi in the kernel. - * - * PARAMETERS: - * - * string - the ASCII string to convert to an integer - * - * RETURNS: - * - * unsigned integer - * - ******************************************************************************/ -unsigned int wl_atoi( char *string ) -{ -unsigned int base = 10; //default to decimal -unsigned int value = 0; -unsigned int c; -int i = strlen( string ); - - if ( i > 2 && string[0] == '0' && ( string[1] | ('X'^'x') ) == 'x' ) { - base = 16; - string +=2; - } - while ( ( c = *string++ ) != '\0' ) { - if ( value > UINT_MAX / base ) { //test for overrun - DBG_FUNC( "wl_atoi" ); //don't overload the log file with good messages - DBG_ENTER( DbgInfo ); - DBG_ERROR( DbgInfo, "string \"%s\", lenght exceeds expectations\n", string ); - printk( "<1>string \"%s\", lenght exceeds expectations\n", string ); - DBG_LEAVE( DbgInfo ); - break; - } - c -= '0'; - if ( 0 <= c && c <= 9 ) value = base * value + c; - else if ( base == 16 ) { - c += '0'; - c |= 'A'^'a'; - c = c - 'a'+ 10; - if ( 10 <= c && c <= 15 ) value = base * value + c; - } - } - return value; -} // wl_atoi - diff --git a/drivers/staging/wlags49_h2/wl_util.h b/drivers/staging/wlags49_h2/wl_util.h index 16cd6c578adb..561e85b5c9b2 100644 --- a/drivers/staging/wlags49_h2/wl_util.h +++ b/drivers/staging/wlags49_h2/wl_util.h @@ -100,6 +100,4 @@ void wl_process_updated_record( struct wl_private *lp ); void wl_process_assoc_status( struct wl_private *lp ); void wl_process_security_status( struct wl_private *lp ); -unsigned int wl_atoi( char *string ); - #endif // __WL_UTIL_H__ From 1832664ae124df0c58dc26985e4963b2c39b6b05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Tue, 12 Jan 2010 15:57:56 +0100 Subject: [PATCH 156/367] staging: fix typos "enalbe" -> "enable" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch was generated by git grep -E -l 'enalbe' drivers/staging | xargs -r perl -p -i -e 's/enalbe/enable/g' Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman --- drivers/staging/otus/80211core/ccmd.c | 2 +- drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c | 2 +- drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c | 2 +- drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/otus/80211core/ccmd.c b/drivers/staging/otus/80211core/ccmd.c index 8da28eee7fb0..3e3d9b500f65 100644 --- a/drivers/staging/otus/80211core/ccmd.c +++ b/drivers/staging/otus/80211core/ccmd.c @@ -1659,7 +1659,7 @@ void zfiWlanSetPacketTypePromiscuous(zdev_t *dev, u32_t setValue) if (setValue) { /* write register for sniffer mode */ zfHpSetSnifferMode(dev, 1); - zm_msg0_mm(ZM_LV_1, "enalbe sniffer mode"); + zm_msg0_mm(ZM_LV_1, "enable sniffer mode"); } else { zfHpSetSnifferMode(dev, 0); zm_msg0_mm(ZM_LV_0, "disalbe sniffer mode"); diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c index acd1077e6396..bd5e77bf7162 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c @@ -694,7 +694,7 @@ int ieee80211_wx_set_auth(struct ieee80211_device *ieee, #if 1 case IW_AUTH_WPA_ENABLED: ieee->wpa_enabled = (data->value)?1:0; - //printk("enalbe wpa:%d\n", ieee->wpa_enabled); + //printk("enable wpa:%d\n", ieee->wpa_enabled); break; #endif diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c index efd61bbf06f9..a3302d5e01ab 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c @@ -933,7 +933,7 @@ int ieee80211_wx_set_auth(struct ieee80211_device *ieee, #if 1 case IW_AUTH_WPA_ENABLED: ieee->wpa_enabled = (data->value)?1:0; - //printk("enalbe wpa:%d\n", ieee->wpa_enabled); + //printk("enable wpa:%d\n", ieee->wpa_enabled); break; #endif diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c index 0f21ccbdeddd..122f8004904b 100644 --- a/drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c +++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c @@ -731,7 +731,7 @@ int ieee80211_wx_set_auth(struct ieee80211_device *ieee, #if 1 case IW_AUTH_WPA_ENABLED: ieee->wpa_enabled = (data->value)?1:0; - //printk("enalbe wpa:%d\n", ieee->wpa_enabled); + //printk("enable wpa:%d\n", ieee->wpa_enabled); break; #endif From a82fd70197e1e59d2127e5536d6a1d502699528d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Tue, 12 Jan 2010 15:57:57 +0100 Subject: [PATCH 157/367] staging: fix typos "selct" -> "select" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch was generated by git grep -E -i -l 's(le|el)ct' drivers/staging | xargs -r perl -p -i -e 's/([Ss])(le|el)ct/$1elect/' Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c index eec71c3efe5e..3692326d474a 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c @@ -1206,7 +1206,7 @@ int i_APCI3XXX_InsnWriteTTLIO(struct comedi_device *dev, if (b_Channel < 8) { /*****************************************************************************/ - /* Read port 0 (first digital output port) and set/reset the selcted channel */ + /* Read port 0 (first digital output port) and set/reset the selected channel */ /*****************************************************************************/ dw_Status = inl(devpriv->iobase + 80); @@ -1228,7 +1228,7 @@ int i_APCI3XXX_InsnWriteTTLIO(struct comedi_device *dev, if ((devpriv->ul_TTLPortConfiguration[0] & 0xFF) == 0xFF) { /*****************************************************************************/ - /* Read port 2 (first digital output port) and set/reset the selcted channel */ + /* Read port 2 (first digital output port) and set/reset the selected channel */ /*****************************************************************************/ dw_Status = inl(devpriv->iobase + 112); From 9d220c6b54f3d0b141846321814ec1c4e4fbdc67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Tue, 12 Jan 2010 15:57:58 +0100 Subject: [PATCH 158/367] staging: fix typos "aquire" -> "acquire" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch was generated by git grep -E -i -l '[Aa]quire' drivers/staging | xargs -r perl -p -i -e 's/([Aa])quire/$1cquire/' Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/mpc624.c | 2 +- drivers/staging/comedi/drivers/ni_labpc.c | 2 +- drivers/staging/comedi/drivers/s626.c | 2 +- drivers/staging/comedi/drivers/usbdux.c | 2 +- drivers/staging/comedi/drivers/usbduxfast.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/mpc624.c b/drivers/staging/comedi/drivers/mpc624.c index cb4da2ae8429..12e72c828157 100644 --- a/drivers/staging/comedi/drivers/mpc624.c +++ b/drivers/staging/comedi/drivers/mpc624.c @@ -284,7 +284,7 @@ static int mpc624_ai_rinsn(struct comedi_device *dev, outb(insn->chanspec, dev->iobase + MPC624_GNMUXCH); /* printk("Channel %d: \n", insn->chanspec); */ if (!insn->n) { - printk("MPC624: Warning, no data to aquire\n"); + printk("MPC624: Warning, no data to acquire\n"); return 0; } diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index dc3f398cb3ed..647c9b72b551 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -1503,7 +1503,7 @@ static void handle_isa_dma(struct comedi_device *dev) devpriv->write_byte(0x1, dev->iobase + DMATC_CLEAR_REG); } -/* makes sure all data aquired by board is transfered to comedi (used +/* makes sure all data acquired by board is transfered to comedi (used * when aquisition is terminated by stop_src == TRIG_EXT). */ static void labpc_drain_dregs(struct comedi_device *dev) { diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c index fdd7ab954d8c..a3cc93362ec2 100644 --- a/drivers/staging/comedi/drivers/s626.c +++ b/drivers/staging/comedi/drivers/s626.c @@ -140,7 +140,7 @@ struct s626_private { short allocatedBuf; uint8_t ai_cmd_running; /* ai_cmd is running */ uint8_t ai_continous; /* continous aquisition */ - int ai_sample_count; /* number of samples to aquire */ + int ai_sample_count; /* number of samples to acquire */ unsigned int ai_sample_timer; /* time between samples in units of the timer */ int ai_convert_count; /* conversion counter */ diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/comedi/drivers/usbdux.c index 0c854a6f1ca6..bcf46dab2052 100644 --- a/drivers/staging/comedi/drivers/usbdux.c +++ b/drivers/staging/comedi/drivers/usbdux.c @@ -289,7 +289,7 @@ struct usbduxsub { /* continous aquisition */ short int ai_continous; short int ao_continous; - /* number of samples to aquire */ + /* number of samples to acquire */ int ai_sample_count; int ao_sample_count; /* time between samples in units of the timer */ diff --git a/drivers/staging/comedi/drivers/usbduxfast.c b/drivers/staging/comedi/drivers/usbduxfast.c index 4ff48860fc57..b96cf3b96fd3 100644 --- a/drivers/staging/comedi/drivers/usbduxfast.c +++ b/drivers/staging/comedi/drivers/usbduxfast.c @@ -182,7 +182,7 @@ struct usbduxfastsub_s { context */ short int ai_cmd_running; /* asynchronous command is running */ short int ai_continous; /* continous aquisition */ - long int ai_sample_count; /* number of samples to aquire */ + long int ai_sample_count; /* number of samples to acquire */ uint8_t *dux_commands; /* commands */ int ignore; /* counter which ignores the first buffers */ From d5a2ffd8e8d602293339f69180aff8914c454d83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Tue, 12 Jan 2010 15:57:59 +0100 Subject: [PATCH 159/367] staging: fix typos "couter" -> "counter" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch was generated by git grep -l 'couter' drivers/staging | xargs -r perl -p -i -e 's/couter/counter/' Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9118.c | 6 +++--- drivers/staging/comedi/drivers/adv_pci1710.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b/drivers/staging/comedi/drivers/adl_pci9118.c index 791ea8334e1e..9934a3cf2548 100644 --- a/drivers/staging/comedi/drivers/adl_pci9118.c +++ b/drivers/staging/comedi/drivers/adl_pci9118.c @@ -88,9 +88,9 @@ Configuration options: #define IORANGE_9118 64 /* I hope */ #define PCI9118_CHANLEN 255 /* len of chanlist, some source say 256, but reality looks like 255 :-( */ -#define PCI9118_CNT0 0x00 /* R/W: 8254 couter 0 */ -#define PCI9118_CNT1 0x04 /* R/W: 8254 couter 0 */ -#define PCI9118_CNT2 0x08 /* R/W: 8254 couter 0 */ +#define PCI9118_CNT0 0x00 /* R/W: 8254 counter 0 */ +#define PCI9118_CNT1 0x04 /* R/W: 8254 counter 0 */ +#define PCI9118_CNT2 0x08 /* R/W: 8254 counter 0 */ #define PCI9118_CNTCTRL 0x0c /* W: 8254 counter control */ #define PCI9118_AD_DATA 0x10 /* R: A/D data */ #define PCI9118_DA1 0x10 /* W: D/A registers */ diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c b/drivers/staging/comedi/drivers/adv_pci1710.c index 951e57949f7f..03c73a889048 100644 --- a/drivers/staging/comedi/drivers/adv_pci1710.c +++ b/drivers/staging/comedi/drivers/adv_pci1710.c @@ -84,9 +84,9 @@ Configuration options: #define PCI171x_DAREF 14 /* W: D/A reference control */ #define PCI171x_DI 16 /* R: digi inputs */ #define PCI171x_DO 16 /* R: digi inputs */ -#define PCI171x_CNT0 24 /* R/W: 8254 couter 0 */ -#define PCI171x_CNT1 26 /* R/W: 8254 couter 1 */ -#define PCI171x_CNT2 28 /* R/W: 8254 couter 2 */ +#define PCI171x_CNT0 24 /* R/W: 8254 counter 0 */ +#define PCI171x_CNT1 26 /* R/W: 8254 counter 1 */ +#define PCI171x_CNT2 28 /* R/W: 8254 counter 2 */ #define PCI171x_CNTCTRL 30 /* W: 8254 counter control */ /* upper bits from status register (PCI171x_STATUS) (lower is same woth control reg) */ From 3af805735a2538c38ec16014f19d19030544aaef Mon Sep 17 00:00:00 2001 From: Wu Zhangjin Date: Wed, 6 Jan 2010 16:33:10 +0800 Subject: [PATCH 160/367] staging: sm7xx: remove the buggy 2D acceleration support When scrolling the screen on the console with the 2D acceleration support, the whole system may hang. for example, when copying some files from another machine to YeeLoong netbook with the sm7xx video driver via scp and when the screen output is enabled, the system may hang. Before the bug is fixed, remove the 2D acceleration! Signed-off-by: Wu Zhangjin Cc: Teddy Wang Signed-off-by: Greg Kroah-Hartman --- drivers/staging/sm7xx/Kconfig | 7 - drivers/staging/sm7xx/TODO | 1 + drivers/staging/sm7xx/smtc2d.c | 979 --------------------------------- drivers/staging/sm7xx/smtc2d.h | 530 ------------------ drivers/staging/sm7xx/smtcfb.c | 129 +---- 5 files changed, 11 insertions(+), 1635 deletions(-) delete mode 100644 drivers/staging/sm7xx/smtc2d.c delete mode 100644 drivers/staging/sm7xx/smtc2d.h diff --git a/drivers/staging/sm7xx/Kconfig b/drivers/staging/sm7xx/Kconfig index 204dbfc3c38b..315102c7fed1 100644 --- a/drivers/staging/sm7xx/Kconfig +++ b/drivers/staging/sm7xx/Kconfig @@ -6,10 +6,3 @@ config FB_SM7XX select FB_CFB_IMAGEBLIT help Frame Buffer driver for the Silicon Motion SM7XX serial graphic card. - -config FB_SM7XX_ACCEL - bool "Siliconmotion Acceleration functions (EXPERIMENTAL)" - depends on FB_SM7XX && EXPERIMENTAL - help - This will compile the Trident frame buffer device with - acceleration functions. diff --git a/drivers/staging/sm7xx/TODO b/drivers/staging/sm7xx/TODO index 1f61f5e11cf5..a66d9e406497 100644 --- a/drivers/staging/sm7xx/TODO +++ b/drivers/staging/sm7xx/TODO @@ -1,5 +1,6 @@ TODO: - Dual head support +- 2D acceleration support - use kernel coding style - checkpatch.pl clean - refine the code and remove unused code diff --git a/drivers/staging/sm7xx/smtc2d.c b/drivers/staging/sm7xx/smtc2d.c deleted file mode 100644 index 133b86c6a678..000000000000 --- a/drivers/staging/sm7xx/smtc2d.c +++ /dev/null @@ -1,979 +0,0 @@ -/* - * Silicon Motion SM7XX 2D drawing engine functions. - * - * Copyright (C) 2006 Silicon Motion Technology Corp. - * Author: Boyod boyod.yang@siliconmotion.com.cn - * - * Copyright (C) 2009 Lemote, Inc. - * Author: Wu Zhangjin, wuzj@lemote.com - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file COPYING in the main directory of this archive for - * more details. - * - * Version 0.10.26192.21.01 - * - Add PowerPC support - * - Add 2D support for Lynx - - * Verified on 2.6.19.2 - * Boyod.yang - */ - -unsigned char smtc_de_busy; - -void SMTC_write2Dreg(unsigned long nOffset, unsigned long nData) -{ - writel(nData, smtc_2DBaseAddress + nOffset); -} - -unsigned long SMTC_read2Dreg(unsigned long nOffset) -{ - return readl(smtc_2DBaseAddress + nOffset); -} - -void SMTC_write2Ddataport(unsigned long nOffset, unsigned long nData) -{ - writel(nData, smtc_2Ddataport + nOffset); -} - -/********************************************************************** - * - * deInit - * - * Purpose - * Drawing engine initialization. - * - **********************************************************************/ - -void deInit(unsigned int nModeWidth, unsigned int nModeHeight, - unsigned int bpp) -{ - /* Get current power configuration. */ - unsigned char clock; - clock = smtc_seqr(0x21); - - /* initialize global 'mutex lock' variable */ - smtc_de_busy = 0; - - /* Enable 2D Drawing Engine */ - smtc_seqw(0x21, clock & 0xF8); - - SMTC_write2Dreg(DE_CLIP_TL, - FIELD_VALUE(0, DE_CLIP_TL, TOP, 0) | - FIELD_SET(0, DE_CLIP_TL, STATUS, DISABLE) | - FIELD_SET(0, DE_CLIP_TL, INHIBIT, OUTSIDE) | - FIELD_VALUE(0, DE_CLIP_TL, LEFT, 0)); - - if (bpp >= 24) { - SMTC_write2Dreg(DE_PITCH, - FIELD_VALUE(0, DE_PITCH, DESTINATION, - nModeWidth * 3) | FIELD_VALUE(0, - DE_PITCH, - SOURCE, - nModeWidth - * 3)); - } else { - SMTC_write2Dreg(DE_PITCH, - FIELD_VALUE(0, DE_PITCH, DESTINATION, - nModeWidth) | FIELD_VALUE(0, - DE_PITCH, - SOURCE, - nModeWidth)); - } - - SMTC_write2Dreg(DE_WINDOW_WIDTH, - FIELD_VALUE(0, DE_WINDOW_WIDTH, DESTINATION, - nModeWidth) | FIELD_VALUE(0, - DE_WINDOW_WIDTH, - SOURCE, - nModeWidth)); - - switch (bpp) { - case 8: - SMTC_write2Dreg(DE_STRETCH_FORMAT, - FIELD_SET(0, DE_STRETCH_FORMAT, PATTERN_XY, - NORMAL) | FIELD_VALUE(0, - DE_STRETCH_FORMAT, - PATTERN_Y, - 0) | - FIELD_VALUE(0, DE_STRETCH_FORMAT, PATTERN_X, - 0) | FIELD_SET(0, DE_STRETCH_FORMAT, - PIXEL_FORMAT, - 8) | FIELD_SET(0, - DE_STRETCH_FORMAT, - ADDRESSING, - XY) | - FIELD_VALUE(0, DE_STRETCH_FORMAT, - SOURCE_HEIGHT, 3)); - break; - case 24: - SMTC_write2Dreg(DE_STRETCH_FORMAT, - FIELD_SET(0, DE_STRETCH_FORMAT, PATTERN_XY, - NORMAL) | FIELD_VALUE(0, - DE_STRETCH_FORMAT, - PATTERN_Y, - 0) | - FIELD_VALUE(0, DE_STRETCH_FORMAT, PATTERN_X, - 0) | FIELD_SET(0, DE_STRETCH_FORMAT, - PIXEL_FORMAT, - 24) | FIELD_SET(0, - DE_STRETCH_FORMAT, - ADDRESSING, - XY) | - FIELD_VALUE(0, DE_STRETCH_FORMAT, - SOURCE_HEIGHT, 3)); - break; - case 16: - default: - SMTC_write2Dreg(DE_STRETCH_FORMAT, - FIELD_SET(0, DE_STRETCH_FORMAT, PATTERN_XY, - NORMAL) | FIELD_VALUE(0, - DE_STRETCH_FORMAT, - PATTERN_Y, - 0) | - FIELD_VALUE(0, DE_STRETCH_FORMAT, PATTERN_X, - 0) | FIELD_SET(0, DE_STRETCH_FORMAT, - PIXEL_FORMAT, - 16) | FIELD_SET(0, - DE_STRETCH_FORMAT, - ADDRESSING, - XY) | - FIELD_VALUE(0, DE_STRETCH_FORMAT, - SOURCE_HEIGHT, 3)); - break; - } - - SMTC_write2Dreg(DE_MASKS, - FIELD_VALUE(0, DE_MASKS, BYTE_MASK, 0xFFFF) | - FIELD_VALUE(0, DE_MASKS, BIT_MASK, 0xFFFF)); - SMTC_write2Dreg(DE_COLOR_COMPARE_MASK, - FIELD_VALUE(0, DE_COLOR_COMPARE_MASK, MASKS, \ - 0xFFFFFF)); - SMTC_write2Dreg(DE_COLOR_COMPARE, - FIELD_VALUE(0, DE_COLOR_COMPARE, COLOR, 0xFFFFFF)); -} - -void deVerticalLine(unsigned long dst_base, - unsigned long dst_pitch, - unsigned long nX, - unsigned long nY, - unsigned long dst_height, unsigned long nColor) -{ - deWaitForNotBusy(); - - SMTC_write2Dreg(DE_WINDOW_DESTINATION_BASE, - FIELD_VALUE(0, DE_WINDOW_DESTINATION_BASE, ADDRESS, - dst_base)); - - SMTC_write2Dreg(DE_PITCH, - FIELD_VALUE(0, DE_PITCH, DESTINATION, dst_pitch) | - FIELD_VALUE(0, DE_PITCH, SOURCE, dst_pitch)); - - SMTC_write2Dreg(DE_WINDOW_WIDTH, - FIELD_VALUE(0, DE_WINDOW_WIDTH, DESTINATION, - dst_pitch) | FIELD_VALUE(0, DE_WINDOW_WIDTH, - SOURCE, - dst_pitch)); - - SMTC_write2Dreg(DE_FOREGROUND, - FIELD_VALUE(0, DE_FOREGROUND, COLOR, nColor)); - - SMTC_write2Dreg(DE_DESTINATION, - FIELD_SET(0, DE_DESTINATION, WRAP, DISABLE) | - FIELD_VALUE(0, DE_DESTINATION, X, nX) | - FIELD_VALUE(0, DE_DESTINATION, Y, nY)); - - SMTC_write2Dreg(DE_DIMENSION, - FIELD_VALUE(0, DE_DIMENSION, X, 1) | - FIELD_VALUE(0, DE_DIMENSION, Y_ET, dst_height)); - - SMTC_write2Dreg(DE_CONTROL, - FIELD_SET(0, DE_CONTROL, STATUS, START) | - FIELD_SET(0, DE_CONTROL, DIRECTION, LEFT_TO_RIGHT) | - FIELD_SET(0, DE_CONTROL, MAJOR, Y) | - FIELD_SET(0, DE_CONTROL, STEP_X, NEGATIVE) | - FIELD_SET(0, DE_CONTROL, STEP_Y, POSITIVE) | - FIELD_SET(0, DE_CONTROL, LAST_PIXEL, OFF) | - FIELD_SET(0, DE_CONTROL, COMMAND, SHORT_STROKE) | - FIELD_SET(0, DE_CONTROL, ROP_SELECT, ROP2) | - FIELD_VALUE(0, DE_CONTROL, ROP, 0x0C)); - - smtc_de_busy = 1; -} - -void deHorizontalLine(unsigned long dst_base, - unsigned long dst_pitch, - unsigned long nX, - unsigned long nY, - unsigned long dst_width, unsigned long nColor) -{ - deWaitForNotBusy(); - - SMTC_write2Dreg(DE_WINDOW_DESTINATION_BASE, - FIELD_VALUE(0, DE_WINDOW_DESTINATION_BASE, ADDRESS, - dst_base)); - - SMTC_write2Dreg(DE_PITCH, - FIELD_VALUE(0, DE_PITCH, DESTINATION, dst_pitch) | - FIELD_VALUE(0, DE_PITCH, SOURCE, dst_pitch)); - - SMTC_write2Dreg(DE_WINDOW_WIDTH, - FIELD_VALUE(0, DE_WINDOW_WIDTH, DESTINATION, - dst_pitch) | FIELD_VALUE(0, DE_WINDOW_WIDTH, - SOURCE, - dst_pitch)); - SMTC_write2Dreg(DE_FOREGROUND, - FIELD_VALUE(0, DE_FOREGROUND, COLOR, nColor)); - SMTC_write2Dreg(DE_DESTINATION, - FIELD_SET(0, DE_DESTINATION, WRAP, - DISABLE) | FIELD_VALUE(0, DE_DESTINATION, X, - nX) | FIELD_VALUE(0, - DE_DESTINATION, - Y, - nY)); - SMTC_write2Dreg(DE_DIMENSION, - FIELD_VALUE(0, DE_DIMENSION, X, - dst_width) | FIELD_VALUE(0, DE_DIMENSION, - Y_ET, 1)); - SMTC_write2Dreg(DE_CONTROL, - FIELD_SET(0, DE_CONTROL, STATUS, START) | FIELD_SET(0, - DE_CONTROL, - DIRECTION, - RIGHT_TO_LEFT) - | FIELD_SET(0, DE_CONTROL, MAJOR, X) | FIELD_SET(0, - DE_CONTROL, - STEP_X, - POSITIVE) - | FIELD_SET(0, DE_CONTROL, STEP_Y, - NEGATIVE) | FIELD_SET(0, DE_CONTROL, - LAST_PIXEL, - OFF) | FIELD_SET(0, - DE_CONTROL, - COMMAND, - SHORT_STROKE) - | FIELD_SET(0, DE_CONTROL, ROP_SELECT, - ROP2) | FIELD_VALUE(0, DE_CONTROL, ROP, - 0x0C)); - - smtc_de_busy = 1; -} - -void deLine(unsigned long dst_base, - unsigned long dst_pitch, - unsigned long nX1, - unsigned long nY1, - unsigned long nX2, unsigned long nY2, unsigned long nColor) -{ - unsigned long nCommand = - FIELD_SET(0, DE_CONTROL, STATUS, START) | - FIELD_SET(0, DE_CONTROL, DIRECTION, LEFT_TO_RIGHT) | - FIELD_SET(0, DE_CONTROL, MAJOR, X) | - FIELD_SET(0, DE_CONTROL, STEP_X, POSITIVE) | - FIELD_SET(0, DE_CONTROL, STEP_Y, POSITIVE) | - FIELD_SET(0, DE_CONTROL, LAST_PIXEL, OFF) | - FIELD_SET(0, DE_CONTROL, ROP_SELECT, ROP2) | - FIELD_VALUE(0, DE_CONTROL, ROP, 0x0C); - unsigned long DeltaX; - unsigned long DeltaY; - - /* Calculate delta X */ - if (nX1 <= nX2) - DeltaX = nX2 - nX1; - else { - DeltaX = nX1 - nX2; - nCommand = FIELD_SET(nCommand, DE_CONTROL, STEP_X, NEGATIVE); - } - - /* Calculate delta Y */ - if (nY1 <= nY2) - DeltaY = nY2 - nY1; - else { - DeltaY = nY1 - nY2; - nCommand = FIELD_SET(nCommand, DE_CONTROL, STEP_Y, NEGATIVE); - } - - /* Determine the major axis */ - if (DeltaX < DeltaY) - nCommand = FIELD_SET(nCommand, DE_CONTROL, MAJOR, Y); - - /* Vertical line? */ - if (nX1 == nX2) - deVerticalLine(dst_base, dst_pitch, nX1, nY1, DeltaY, nColor); - - /* Horizontal line? */ - else if (nY1 == nY2) - deHorizontalLine(dst_base, dst_pitch, nX1, nY1, \ - DeltaX, nColor); - - /* Diagonal line? */ - else if (DeltaX == DeltaY) { - deWaitForNotBusy(); - - SMTC_write2Dreg(DE_WINDOW_DESTINATION_BASE, - FIELD_VALUE(0, DE_WINDOW_DESTINATION_BASE, - ADDRESS, dst_base)); - - SMTC_write2Dreg(DE_PITCH, - FIELD_VALUE(0, DE_PITCH, DESTINATION, - dst_pitch) | FIELD_VALUE(0, - DE_PITCH, - SOURCE, - dst_pitch)); - - SMTC_write2Dreg(DE_WINDOW_WIDTH, - FIELD_VALUE(0, DE_WINDOW_WIDTH, DESTINATION, - dst_pitch) | FIELD_VALUE(0, - DE_WINDOW_WIDTH, - SOURCE, - dst_pitch)); - - SMTC_write2Dreg(DE_FOREGROUND, - FIELD_VALUE(0, DE_FOREGROUND, COLOR, nColor)); - - SMTC_write2Dreg(DE_DESTINATION, - FIELD_SET(0, DE_DESTINATION, WRAP, DISABLE) | - FIELD_VALUE(0, DE_DESTINATION, X, 1) | - FIELD_VALUE(0, DE_DESTINATION, Y, nY1)); - - SMTC_write2Dreg(DE_DIMENSION, - FIELD_VALUE(0, DE_DIMENSION, X, 1) | - FIELD_VALUE(0, DE_DIMENSION, Y_ET, DeltaX)); - - SMTC_write2Dreg(DE_CONTROL, - FIELD_SET(nCommand, DE_CONTROL, COMMAND, - SHORT_STROKE)); - } - - /* Generic line */ - else { - unsigned int k1, k2, et, w; - if (DeltaX < DeltaY) { - k1 = 2 * DeltaX; - et = k1 - DeltaY; - k2 = et - DeltaY; - w = DeltaY + 1; - } else { - k1 = 2 * DeltaY; - et = k1 - DeltaX; - k2 = et - DeltaX; - w = DeltaX + 1; - } - - deWaitForNotBusy(); - - SMTC_write2Dreg(DE_WINDOW_DESTINATION_BASE, - FIELD_VALUE(0, DE_WINDOW_DESTINATION_BASE, - ADDRESS, dst_base)); - - SMTC_write2Dreg(DE_PITCH, - FIELD_VALUE(0, DE_PITCH, DESTINATION, - dst_pitch) | FIELD_VALUE(0, - DE_PITCH, - SOURCE, - dst_pitch)); - - SMTC_write2Dreg(DE_WINDOW_WIDTH, - FIELD_VALUE(0, DE_WINDOW_WIDTH, DESTINATION, - dst_pitch) | FIELD_VALUE(0, - DE_WINDOW_WIDTH, - SOURCE, - dst_pitch)); - - SMTC_write2Dreg(DE_FOREGROUND, - FIELD_VALUE(0, DE_FOREGROUND, COLOR, nColor)); - - SMTC_write2Dreg(DE_SOURCE, - FIELD_SET(0, DE_SOURCE, WRAP, DISABLE) | - FIELD_VALUE(0, DE_SOURCE, X_K1, k1) | - FIELD_VALUE(0, DE_SOURCE, Y_K2, k2)); - - SMTC_write2Dreg(DE_DESTINATION, - FIELD_SET(0, DE_DESTINATION, WRAP, DISABLE) | - FIELD_VALUE(0, DE_DESTINATION, X, nX1) | - FIELD_VALUE(0, DE_DESTINATION, Y, nY1)); - - SMTC_write2Dreg(DE_DIMENSION, - FIELD_VALUE(0, DE_DIMENSION, X, w) | - FIELD_VALUE(0, DE_DIMENSION, Y_ET, et)); - - SMTC_write2Dreg(DE_CONTROL, - FIELD_SET(nCommand, DE_CONTROL, COMMAND, - LINE_DRAW)); - } - - smtc_de_busy = 1; -} - -void deFillRect(unsigned long dst_base, - unsigned long dst_pitch, - unsigned long dst_X, - unsigned long dst_Y, - unsigned long dst_width, - unsigned long dst_height, unsigned long nColor) -{ - deWaitForNotBusy(); - - SMTC_write2Dreg(DE_WINDOW_DESTINATION_BASE, - FIELD_VALUE(0, DE_WINDOW_DESTINATION_BASE, ADDRESS, - dst_base)); - - if (dst_pitch) { - SMTC_write2Dreg(DE_PITCH, - FIELD_VALUE(0, DE_PITCH, DESTINATION, - dst_pitch) | FIELD_VALUE(0, - DE_PITCH, - SOURCE, - dst_pitch)); - - SMTC_write2Dreg(DE_WINDOW_WIDTH, - FIELD_VALUE(0, DE_WINDOW_WIDTH, DESTINATION, - dst_pitch) | FIELD_VALUE(0, - DE_WINDOW_WIDTH, - SOURCE, - dst_pitch)); - } - - SMTC_write2Dreg(DE_FOREGROUND, - FIELD_VALUE(0, DE_FOREGROUND, COLOR, nColor)); - - SMTC_write2Dreg(DE_DESTINATION, - FIELD_SET(0, DE_DESTINATION, WRAP, DISABLE) | - FIELD_VALUE(0, DE_DESTINATION, X, dst_X) | - FIELD_VALUE(0, DE_DESTINATION, Y, dst_Y)); - - SMTC_write2Dreg(DE_DIMENSION, - FIELD_VALUE(0, DE_DIMENSION, X, dst_width) | - FIELD_VALUE(0, DE_DIMENSION, Y_ET, dst_height)); - - SMTC_write2Dreg(DE_CONTROL, - FIELD_SET(0, DE_CONTROL, STATUS, START) | - FIELD_SET(0, DE_CONTROL, DIRECTION, LEFT_TO_RIGHT) | - FIELD_SET(0, DE_CONTROL, LAST_PIXEL, OFF) | - FIELD_SET(0, DE_CONTROL, COMMAND, RECTANGLE_FILL) | - FIELD_SET(0, DE_CONTROL, ROP_SELECT, ROP2) | - FIELD_VALUE(0, DE_CONTROL, ROP, 0x0C)); - - smtc_de_busy = 1; -} - -/********************************************************************** - * - * deRotatePattern - * - * Purpose - * Rotate the given pattern if necessary - * - * Parameters - * [in] - * pPattern - Pointer to DE_SURFACE structure containing - * pattern attributes - * patternX - X position (0-7) of pattern origin - * patternY - Y position (0-7) of pattern origin - * - * [out] - * pattern_dstaddr - Pointer to pre-allocated buffer containing - * rotated pattern - * - **********************************************************************/ -void deRotatePattern(unsigned char *pattern_dstaddr, - unsigned long pattern_src_addr, - unsigned long pattern_BPP, - unsigned long pattern_stride, int patternX, int patternY) -{ - unsigned int i; - unsigned long pattern[PATTERN_WIDTH * PATTERN_HEIGHT]; - unsigned int x, y; - unsigned char *pjPatByte; - - if (pattern_dstaddr != NULL) { - deWaitForNotBusy(); - - if (patternX || patternY) { - /* Rotate pattern */ - pjPatByte = (unsigned char *)pattern; - - switch (pattern_BPP) { - case 8: - { - for (y = 0; y < 8; y++) { - unsigned char *pjBuffer = - pattern_dstaddr + - ((patternY + y) & 7) * 8; - for (x = 0; x < 8; x++) { - pjBuffer[(patternX + - x) & 7] = - pjPatByte[x]; - } - pjPatByte += pattern_stride; - } - break; - } - - case 16: - { - for (y = 0; y < 8; y++) { - unsigned short *pjBuffer = - (unsigned short *) - pattern_dstaddr + - ((patternY + y) & 7) * 8; - for (x = 0; x < 8; x++) { - pjBuffer[(patternX + - x) & 7] = - ((unsigned short *) - pjPatByte)[x]; - } - pjPatByte += pattern_stride; - } - break; - } - - case 32: - { - for (y = 0; y < 8; y++) { - unsigned long *pjBuffer = - (unsigned long *) - pattern_dstaddr + - ((patternY + y) & 7) * 8; - for (x = 0; x < 8; x++) { - pjBuffer[(patternX + - x) & 7] = - ((unsigned long *) - pjPatByte)[x]; - } - pjPatByte += pattern_stride; - } - break; - } - } - } else { - /*Don't rotate,just copy pattern into pattern_dstaddr*/ - for (i = 0; i < (pattern_BPP * 2); i++) { - ((unsigned long *)pattern_dstaddr)[i] = - pattern[i]; - } - } - - } -} - -/********************************************************************** - * - * deCopy - * - * Purpose - * Copy a rectangular area of the source surface to a destination surface - * - * Remarks - * Source bitmap must have the same color depth (BPP) as the destination - * bitmap. - * -**********************************************************************/ -void deCopy(unsigned long dst_base, - unsigned long dst_pitch, - unsigned long dst_BPP, - unsigned long dst_X, - unsigned long dst_Y, - unsigned long dst_width, - unsigned long dst_height, - unsigned long src_base, - unsigned long src_pitch, - unsigned long src_X, - unsigned long src_Y, pTransparent pTransp, unsigned char nROP2) -{ - unsigned long nDirection = 0; - unsigned long nTransparent = 0; - /* Direction of ROP2 operation: - * 1 = Left to Right, - * (-1) = Right to Left - */ - unsigned long opSign = 1; - /* xWidth is in pixels */ - unsigned long xWidth = 192 / (dst_BPP / 8); - unsigned long de_ctrl = 0; - - deWaitForNotBusy(); - - SMTC_write2Dreg(DE_WINDOW_DESTINATION_BASE, - FIELD_VALUE(0, DE_WINDOW_DESTINATION_BASE, ADDRESS, - dst_base)); - - SMTC_write2Dreg(DE_WINDOW_SOURCE_BASE, - FIELD_VALUE(0, DE_WINDOW_SOURCE_BASE, ADDRESS, - src_base)); - - if (dst_pitch && src_pitch) { - SMTC_write2Dreg(DE_PITCH, - FIELD_VALUE(0, DE_PITCH, DESTINATION, - dst_pitch) | FIELD_VALUE(0, - DE_PITCH, - SOURCE, - src_pitch)); - - SMTC_write2Dreg(DE_WINDOW_WIDTH, - FIELD_VALUE(0, DE_WINDOW_WIDTH, DESTINATION, - dst_pitch) | FIELD_VALUE(0, - DE_WINDOW_WIDTH, - SOURCE, - src_pitch)); - } - - /* Set transparent bits if necessary */ - if (pTransp != NULL) { - nTransparent = - pTransp->match | pTransp->select | pTransp->control; - - /* Set color compare register */ - SMTC_write2Dreg(DE_COLOR_COMPARE, - FIELD_VALUE(0, DE_COLOR_COMPARE, COLOR, - pTransp->color)); - } - - /* Determine direction of operation */ - if (src_Y < dst_Y) { - /* +----------+ - |S | - | +----------+ - | | | | - | | | | - +---|------+ | - | D | - +----------+ */ - - nDirection = BOTTOM_TO_TOP; - } else if (src_Y > dst_Y) { - /* +----------+ - |D | - | +----------+ - | | | | - | | | | - +---|------+ | - | S | - +----------+ */ - - nDirection = TOP_TO_BOTTOM; - } else { - /* src_Y == dst_Y */ - - if (src_X <= dst_X) { - /* +------+---+------+ - |S | | D| - | | | | - | | | | - | | | | - +------+---+------+ */ - - nDirection = RIGHT_TO_LEFT; - } else { - /* src_X > dst_X */ - - /* +------+---+------+ - |D | | S| - | | | | - | | | | - | | | | - +------+---+------+ */ - - nDirection = LEFT_TO_RIGHT; - } - } - - if ((nDirection == BOTTOM_TO_TOP) || (nDirection == RIGHT_TO_LEFT)) { - src_X += dst_width - 1; - src_Y += dst_height - 1; - dst_X += dst_width - 1; - dst_Y += dst_height - 1; - opSign = (-1); - } - - if (dst_BPP >= 24) { - src_X *= 3; - src_Y *= 3; - dst_X *= 3; - dst_Y *= 3; - dst_width *= 3; - if ((nDirection == BOTTOM_TO_TOP) - || (nDirection == RIGHT_TO_LEFT)) { - src_X += 2; - dst_X += 2; - } - } - - /* Workaround for 192 byte hw bug */ - if ((nROP2 != 0x0C) && ((dst_width * (dst_BPP / 8)) >= 192)) { - /* - * Perform the ROP2 operation in chunks of (xWidth * - * dst_height) - */ - while (1) { - deWaitForNotBusy(); - - SMTC_write2Dreg(DE_SOURCE, - FIELD_SET(0, DE_SOURCE, WRAP, DISABLE) | - FIELD_VALUE(0, DE_SOURCE, X_K1, src_X) | - FIELD_VALUE(0, DE_SOURCE, Y_K2, src_Y)); - - SMTC_write2Dreg(DE_DESTINATION, - FIELD_SET(0, DE_DESTINATION, WRAP, - DISABLE) | FIELD_VALUE(0, - DE_DESTINATION, - X, - dst_X) - | FIELD_VALUE(0, DE_DESTINATION, Y, - dst_Y)); - - SMTC_write2Dreg(DE_DIMENSION, - FIELD_VALUE(0, DE_DIMENSION, X, - xWidth) | FIELD_VALUE(0, - DE_DIMENSION, - Y_ET, - dst_height)); - - de_ctrl = - FIELD_VALUE(0, DE_CONTROL, ROP, - nROP2) | nTransparent | FIELD_SET(0, - DE_CONTROL, - ROP_SELECT, - ROP2) - | FIELD_SET(0, DE_CONTROL, COMMAND, - BITBLT) | ((nDirection == - 1) ? FIELD_SET(0, - DE_CONTROL, - DIRECTION, - RIGHT_TO_LEFT) - : FIELD_SET(0, DE_CONTROL, - DIRECTION, - LEFT_TO_RIGHT)) | - FIELD_SET(0, DE_CONTROL, STATUS, START); - - SMTC_write2Dreg(DE_CONTROL, de_ctrl); - - src_X += (opSign * xWidth); - dst_X += (opSign * xWidth); - dst_width -= xWidth; - - if (dst_width <= 0) { - /* ROP2 operation is complete */ - break; - } - - if (xWidth > dst_width) - xWidth = dst_width; - } - } else { - deWaitForNotBusy(); - SMTC_write2Dreg(DE_SOURCE, - FIELD_SET(0, DE_SOURCE, WRAP, DISABLE) | - FIELD_VALUE(0, DE_SOURCE, X_K1, src_X) | - FIELD_VALUE(0, DE_SOURCE, Y_K2, src_Y)); - - SMTC_write2Dreg(DE_DESTINATION, - FIELD_SET(0, DE_DESTINATION, WRAP, DISABLE) | - FIELD_VALUE(0, DE_DESTINATION, X, dst_X) | - FIELD_VALUE(0, DE_DESTINATION, Y, dst_Y)); - - SMTC_write2Dreg(DE_DIMENSION, - FIELD_VALUE(0, DE_DIMENSION, X, dst_width) | - FIELD_VALUE(0, DE_DIMENSION, Y_ET, dst_height)); - - de_ctrl = FIELD_VALUE(0, DE_CONTROL, ROP, nROP2) | - nTransparent | - FIELD_SET(0, DE_CONTROL, ROP_SELECT, ROP2) | - FIELD_SET(0, DE_CONTROL, COMMAND, BITBLT) | - ((nDirection == 1) ? FIELD_SET(0, DE_CONTROL, DIRECTION, - RIGHT_TO_LEFT) - : FIELD_SET(0, DE_CONTROL, DIRECTION, - LEFT_TO_RIGHT)) | FIELD_SET(0, DE_CONTROL, - STATUS, START); - SMTC_write2Dreg(DE_CONTROL, de_ctrl); - } - - smtc_de_busy = 1; -} - -/* - * This function sets the pixel format that will apply to the 2D Engine. - */ -void deSetPixelFormat(unsigned long bpp) -{ - unsigned long de_format; - - de_format = SMTC_read2Dreg(DE_STRETCH_FORMAT); - - switch (bpp) { - case 8: - de_format = - FIELD_SET(de_format, DE_STRETCH_FORMAT, PIXEL_FORMAT, 8); - break; - default: - case 16: - de_format = - FIELD_SET(de_format, DE_STRETCH_FORMAT, PIXEL_FORMAT, 16); - break; - case 32: - de_format = - FIELD_SET(de_format, DE_STRETCH_FORMAT, PIXEL_FORMAT, 32); - break; - } - - SMTC_write2Dreg(DE_STRETCH_FORMAT, de_format); -} - -/* - * System memory to Video memory monochrome expansion. - * - * Source is monochrome image in system memory. This function expands the - * monochrome data to color image in video memory. - */ - -long deSystemMem2VideoMemMonoBlt(const char *pSrcbuf, - long srcDelta, - unsigned long startBit, - unsigned long dBase, - unsigned long dPitch, - unsigned long bpp, - unsigned long dx, unsigned long dy, - unsigned long width, unsigned long height, - unsigned long fColor, - unsigned long bColor, - unsigned long rop2) { - unsigned long bytePerPixel; - unsigned long ulBytesPerScan; - unsigned long ul4BytesPerScan; - unsigned long ulBytesRemain; - unsigned long de_ctrl = 0; - unsigned char ajRemain[4]; - long i, j; - - bytePerPixel = bpp / 8; - - /* Just make sure the start bit is within legal range */ - startBit &= 7; - - ulBytesPerScan = (width + startBit + 7) / 8; - ul4BytesPerScan = ulBytesPerScan & ~3; - ulBytesRemain = ulBytesPerScan & 3; - - if (smtc_de_busy) - deWaitForNotBusy(); - - /* - * 2D Source Base. Use 0 for HOST Blt. - */ - - SMTC_write2Dreg(DE_WINDOW_SOURCE_BASE, 0); - - /* - * 2D Destination Base. - * - * It is an address offset (128 bit aligned) from the beginning of - * frame buffer. - */ - - SMTC_write2Dreg(DE_WINDOW_DESTINATION_BASE, dBase); - - if (dPitch) { - - /* - * Program pitch (distance between the 1st points of two - * adjacent lines). - * - * Note that input pitch is BYTE value, but the 2D Pitch - * register uses pixel values. Need Byte to pixel convertion. - */ - - SMTC_write2Dreg(DE_PITCH, - FIELD_VALUE(0, DE_PITCH, DESTINATION, - dPitch / - bytePerPixel) | FIELD_VALUE(0, - DE_PITCH, - SOURCE, - dPitch / - bytePerPixel)); - - /* Screen Window width in Pixels. - * - * 2D engine uses this value to calculate the linear address in - * frame buffer for a given point. - */ - - SMTC_write2Dreg(DE_WINDOW_WIDTH, - FIELD_VALUE(0, DE_WINDOW_WIDTH, DESTINATION, - (dPitch / - bytePerPixel)) | FIELD_VALUE(0, - DE_WINDOW_WIDTH, - SOURCE, - (dPitch - / - bytePerPixel))); - } - /* Note: For 2D Source in Host Write, only X_K1 field is needed, and - * Y_K2 field is not used. For mono bitmap, use startBit for X_K1. - */ - - SMTC_write2Dreg(DE_SOURCE, - FIELD_SET(0, DE_SOURCE, WRAP, DISABLE) | - FIELD_VALUE(0, DE_SOURCE, X_K1, startBit) | - FIELD_VALUE(0, DE_SOURCE, Y_K2, 0)); - - SMTC_write2Dreg(DE_DESTINATION, - FIELD_SET(0, DE_DESTINATION, WRAP, DISABLE) | - FIELD_VALUE(0, DE_DESTINATION, X, dx) | - FIELD_VALUE(0, DE_DESTINATION, Y, dy)); - - SMTC_write2Dreg(DE_DIMENSION, - FIELD_VALUE(0, DE_DIMENSION, X, width) | - FIELD_VALUE(0, DE_DIMENSION, Y_ET, height)); - - SMTC_write2Dreg(DE_FOREGROUND, fColor); - SMTC_write2Dreg(DE_BACKGROUND, bColor); - - if (bpp) - deSetPixelFormat(bpp); - /* Set the pixel format of the destination */ - - de_ctrl = FIELD_VALUE(0, DE_CONTROL, ROP, rop2) | - FIELD_SET(0, DE_CONTROL, ROP_SELECT, ROP2) | - FIELD_SET(0, DE_CONTROL, COMMAND, HOST_WRITE) | - FIELD_SET(0, DE_CONTROL, HOST, MONO) | - FIELD_SET(0, DE_CONTROL, STATUS, START); - - SMTC_write2Dreg(DE_CONTROL, de_ctrl | deGetTransparency()); - - /* Write MONO data (line by line) to 2D Engine data port */ - for (i = 0; i < height; i++) { - /* For each line, send the data in chunks of 4 bytes */ - for (j = 0; j < (ul4BytesPerScan / 4); j++) - SMTC_write2Ddataport(0, - *(unsigned long *)(pSrcbuf + - (j * 4))); - - if (ulBytesRemain) { - memcpy(ajRemain, pSrcbuf + ul4BytesPerScan, - ulBytesRemain); - SMTC_write2Ddataport(0, *(unsigned long *)ajRemain); - } - - pSrcbuf += srcDelta; - } - smtc_de_busy = 1; - - return 0; -} - -/* - * This function gets the transparency status from DE_CONTROL register. - * It returns a double word with the transparent fields properly set, - * while other fields are 0. - */ -unsigned long deGetTransparency(void) -{ - unsigned long de_ctrl; - - de_ctrl = SMTC_read2Dreg(DE_CONTROL); - - de_ctrl &= - FIELD_MASK(DE_CONTROL_TRANSPARENCY_MATCH) | - FIELD_MASK(DE_CONTROL_TRANSPARENCY_SELECT) | - FIELD_MASK(DE_CONTROL_TRANSPARENCY); - - return de_ctrl; -} diff --git a/drivers/staging/sm7xx/smtc2d.h b/drivers/staging/sm7xx/smtc2d.h deleted file mode 100644 index 38d0c335322b..000000000000 --- a/drivers/staging/sm7xx/smtc2d.h +++ /dev/null @@ -1,530 +0,0 @@ -/* - * Silicon Motion SM712 2D drawing engine functions. - * - * Copyright (C) 2006 Silicon Motion Technology Corp. - * Author: Ge Wang, gewang@siliconmotion.com - * - * Copyright (C) 2009 Lemote, Inc. - * Author: Wu Zhangjin, wuzj@lemote.com - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file COPYING in the main directory of this archive for - * more details. - */ - -#ifndef NULL -#define NULL 0 -#endif - -/* Internal macros */ - -#define _F_START(f) (0 ? f) -#define _F_END(f) (1 ? f) -#define _F_SIZE(f) (1 + _F_END(f) - _F_START(f)) -#define _F_MASK(f) (((1ULL << _F_SIZE(f)) - 1) << _F_START(f)) -#define _F_NORMALIZE(v, f) (((v) & _F_MASK(f)) >> _F_START(f)) -#define _F_DENORMALIZE(v, f) (((v) << _F_START(f)) & _F_MASK(f)) - -/* Global macros */ - -#define FIELD_GET(x, reg, field) \ -( \ - _F_NORMALIZE((x), reg ## _ ## field) \ -) - -#define FIELD_SET(x, reg, field, value) \ -( \ - (x & ~_F_MASK(reg ## _ ## field)) \ - | _F_DENORMALIZE(reg ## _ ## field ## _ ## value, reg ## _ ## field) \ -) - -#define FIELD_VALUE(x, reg, field, value) \ -( \ - (x & ~_F_MASK(reg ## _ ## field)) \ - | _F_DENORMALIZE(value, reg ## _ ## field) \ -) - -#define FIELD_CLEAR(reg, field) \ -( \ - ~_F_MASK(reg ## _ ## field) \ -) - -/* Field Macros */ - -#define FIELD_START(field) (0 ? field) -#define FIELD_END(field) (1 ? field) -#define FIELD_SIZE(field) \ - (1 + FIELD_END(field) - FIELD_START(field)) - -#define FIELD_MASK(field) \ - (((1 << (FIELD_SIZE(field)-1)) \ - | ((1 << (FIELD_SIZE(field)-1)) - 1)) \ - << FIELD_START(field)) - -#define FIELD_NORMALIZE(reg, field) \ - (((reg) & FIELD_MASK(field)) >> FIELD_START(field)) - -#define FIELD_DENORMALIZE(field, value) \ - (((value) << FIELD_START(field)) & FIELD_MASK(field)) - -#define FIELD_INIT(reg, field, value) \ - FIELD_DENORMALIZE(reg ## _ ## field, \ - reg ## _ ## field ## _ ## value) - -#define FIELD_INIT_VAL(reg, field, value) \ - (FIELD_DENORMALIZE(reg ## _ ## field, value)) - -#define FIELD_VAL_SET(x, r, f, v) ({ \ - x = (x & ~FIELD_MASK(r ## _ ## f)) \ - | FIELD_DENORMALIZE(r ## _ ## f, r ## _ ## f ## _ ## v) \ -}) - -#define RGB(r, g, b) ((unsigned long)(((r) << 16) | ((g) << 8) | (b))) - -/* Transparent info definition */ -typedef struct { - unsigned long match; /* Matching pixel is OPAQUE/TRANSPARENT */ - unsigned long select; /* Transparency controlled by SRC/DST */ - unsigned long control; /* ENABLE/DISABLE transparency */ - unsigned long color; /* Transparent color */ -} Transparent, *pTransparent; - -#define PIXEL_DEPTH_1_BP 0 /* 1 bit per pixel */ -#define PIXEL_DEPTH_8_BPP 1 /* 8 bits per pixel */ -#define PIXEL_DEPTH_16_BPP 2 /* 16 bits per pixel */ -#define PIXEL_DEPTH_32_BPP 3 /* 32 bits per pixel */ -#define PIXEL_DEPTH_YUV422 8 /* 16 bits per pixel YUV422 */ -#define PIXEL_DEPTH_YUV420 9 /* 16 bits per pixel YUV420 */ - -#define PATTERN_WIDTH 8 -#define PATTERN_HEIGHT 8 - -#define TOP_TO_BOTTOM 0 -#define BOTTOM_TO_TOP 1 -#define RIGHT_TO_LEFT BOTTOM_TO_TOP -#define LEFT_TO_RIGHT TOP_TO_BOTTOM - -/* Constants used in Transparent structure */ -#define MATCH_OPAQUE 0x00000000 -#define MATCH_TRANSPARENT 0x00000400 -#define SOURCE 0x00000000 -#define DESTINATION 0x00000200 - -/* 2D registers. */ - -#define DE_SOURCE 0x000000 -#define DE_SOURCE_WRAP 31 : 31 -#define DE_SOURCE_WRAP_DISABLE 0 -#define DE_SOURCE_WRAP_ENABLE 1 -#define DE_SOURCE_X_K1 29 : 16 -#define DE_SOURCE_Y_K2 15 : 0 - -#define DE_DESTINATION 0x000004 -#define DE_DESTINATION_WRAP 31 : 31 -#define DE_DESTINATION_WRAP_DISABLE 0 -#define DE_DESTINATION_WRAP_ENABLE 1 -#define DE_DESTINATION_X 28 : 16 -#define DE_DESTINATION_Y 15 : 0 - -#define DE_DIMENSION 0x000008 -#define DE_DIMENSION_X 28 : 16 -#define DE_DIMENSION_Y_ET 15 : 0 - -#define DE_CONTROL 0x00000C -#define DE_CONTROL_STATUS 31 : 31 -#define DE_CONTROL_STATUS_STOP 0 -#define DE_CONTROL_STATUS_START 1 -#define DE_CONTROL_PATTERN 30 : 30 -#define DE_CONTROL_PATTERN_MONO 0 -#define DE_CONTROL_PATTERN_COLOR 1 -#define DE_CONTROL_UPDATE_DESTINATION_X 29 : 29 -#define DE_CONTROL_UPDATE_DESTINATION_X_DISABLE 0 -#define DE_CONTROL_UPDATE_DESTINATION_X_ENABLE 1 -#define DE_CONTROL_QUICK_START 28 : 28 -#define DE_CONTROL_QUICK_START_DISABLE 0 -#define DE_CONTROL_QUICK_START_ENABLE 1 -#define DE_CONTROL_DIRECTION 27 : 27 -#define DE_CONTROL_DIRECTION_LEFT_TO_RIGHT 0 -#define DE_CONTROL_DIRECTION_RIGHT_TO_LEFT 1 -#define DE_CONTROL_MAJOR 26 : 26 -#define DE_CONTROL_MAJOR_X 0 -#define DE_CONTROL_MAJOR_Y 1 -#define DE_CONTROL_STEP_X 25 : 25 -#define DE_CONTROL_STEP_X_POSITIVE 1 -#define DE_CONTROL_STEP_X_NEGATIVE 0 -#define DE_CONTROL_STEP_Y 24 : 24 -#define DE_CONTROL_STEP_Y_POSITIVE 1 -#define DE_CONTROL_STEP_Y_NEGATIVE 0 -#define DE_CONTROL_STRETCH 23 : 23 -#define DE_CONTROL_STRETCH_DISABLE 0 -#define DE_CONTROL_STRETCH_ENABLE 1 -#define DE_CONTROL_HOST 22 : 22 -#define DE_CONTROL_HOST_COLOR 0 -#define DE_CONTROL_HOST_MONO 1 -#define DE_CONTROL_LAST_PIXEL 21 : 21 -#define DE_CONTROL_LAST_PIXEL_OFF 0 -#define DE_CONTROL_LAST_PIXEL_ON 1 -#define DE_CONTROL_COMMAND 20 : 16 -#define DE_CONTROL_COMMAND_BITBLT 0 -#define DE_CONTROL_COMMAND_RECTANGLE_FILL 1 -#define DE_CONTROL_COMMAND_DE_TILE 2 -#define DE_CONTROL_COMMAND_TRAPEZOID_FILL 3 -#define DE_CONTROL_COMMAND_ALPHA_BLEND 4 -#define DE_CONTROL_COMMAND_RLE_STRIP 5 -#define DE_CONTROL_COMMAND_SHORT_STROKE 6 -#define DE_CONTROL_COMMAND_LINE_DRAW 7 -#define DE_CONTROL_COMMAND_HOST_WRITE 8 -#define DE_CONTROL_COMMAND_HOST_READ 9 -#define DE_CONTROL_COMMAND_HOST_WRITE_BOTTOM_UP 10 -#define DE_CONTROL_COMMAND_ROTATE 11 -#define DE_CONTROL_COMMAND_FONT 12 -#define DE_CONTROL_COMMAND_TEXTURE_LOAD 15 -#define DE_CONTROL_ROP_SELECT 15 : 15 -#define DE_CONTROL_ROP_SELECT_ROP3 0 -#define DE_CONTROL_ROP_SELECT_ROP2 1 -#define DE_CONTROL_ROP2_SOURCE 14 : 14 -#define DE_CONTROL_ROP2_SOURCE_BITMAP 0 -#define DE_CONTROL_ROP2_SOURCE_PATTERN 1 -#define DE_CONTROL_MONO_DATA 13 : 12 -#define DE_CONTROL_MONO_DATA_NOT_PACKED 0 -#define DE_CONTROL_MONO_DATA_8_PACKED 1 -#define DE_CONTROL_MONO_DATA_16_PACKED 2 -#define DE_CONTROL_MONO_DATA_32_PACKED 3 -#define DE_CONTROL_REPEAT_ROTATE 11 : 11 -#define DE_CONTROL_REPEAT_ROTATE_DISABLE 0 -#define DE_CONTROL_REPEAT_ROTATE_ENABLE 1 -#define DE_CONTROL_TRANSPARENCY_MATCH 10 : 10 -#define DE_CONTROL_TRANSPARENCY_MATCH_OPAQUE 0 -#define DE_CONTROL_TRANSPARENCY_MATCH_TRANSPARENT 1 -#define DE_CONTROL_TRANSPARENCY_SELECT 9 : 9 -#define DE_CONTROL_TRANSPARENCY_SELECT_SOURCE 0 -#define DE_CONTROL_TRANSPARENCY_SELECT_DESTINATION 1 -#define DE_CONTROL_TRANSPARENCY 8 : 8 -#define DE_CONTROL_TRANSPARENCY_DISABLE 0 -#define DE_CONTROL_TRANSPARENCY_ENABLE 1 -#define DE_CONTROL_ROP 7 : 0 - -/* Pseudo fields. */ - -#define DE_CONTROL_SHORT_STROKE_DIR 27 : 24 -#define DE_CONTROL_SHORT_STROKE_DIR_225 0 -#define DE_CONTROL_SHORT_STROKE_DIR_135 1 -#define DE_CONTROL_SHORT_STROKE_DIR_315 2 -#define DE_CONTROL_SHORT_STROKE_DIR_45 3 -#define DE_CONTROL_SHORT_STROKE_DIR_270 4 -#define DE_CONTROL_SHORT_STROKE_DIR_90 5 -#define DE_CONTROL_SHORT_STROKE_DIR_180 8 -#define DE_CONTROL_SHORT_STROKE_DIR_0 10 -#define DE_CONTROL_ROTATION 25 : 24 -#define DE_CONTROL_ROTATION_0 0 -#define DE_CONTROL_ROTATION_270 1 -#define DE_CONTROL_ROTATION_90 2 -#define DE_CONTROL_ROTATION_180 3 - -#define DE_PITCH 0x000010 -#define DE_PITCH_DESTINATION 28 : 16 -#define DE_PITCH_SOURCE 12 : 0 - -#define DE_FOREGROUND 0x000014 -#define DE_FOREGROUND_COLOR 31 : 0 - -#define DE_BACKGROUND 0x000018 -#define DE_BACKGROUND_COLOR 31 : 0 - -#define DE_STRETCH_FORMAT 0x00001C -#define DE_STRETCH_FORMAT_PATTERN_XY 30 : 30 -#define DE_STRETCH_FORMAT_PATTERN_XY_NORMAL 0 -#define DE_STRETCH_FORMAT_PATTERN_XY_OVERWRITE 1 -#define DE_STRETCH_FORMAT_PATTERN_Y 29 : 27 -#define DE_STRETCH_FORMAT_PATTERN_X 25 : 23 -#define DE_STRETCH_FORMAT_PIXEL_FORMAT 21 : 20 -#define DE_STRETCH_FORMAT_PIXEL_FORMAT_8 0 -#define DE_STRETCH_FORMAT_PIXEL_FORMAT_16 1 -#define DE_STRETCH_FORMAT_PIXEL_FORMAT_24 3 -#define DE_STRETCH_FORMAT_PIXEL_FORMAT_32 2 -#define DE_STRETCH_FORMAT_ADDRESSING 19 : 16 -#define DE_STRETCH_FORMAT_ADDRESSING_XY 0 -#define DE_STRETCH_FORMAT_ADDRESSING_LINEAR 15 -#define DE_STRETCH_FORMAT_SOURCE_HEIGHT 11 : 0 - -#define DE_COLOR_COMPARE 0x000020 -#define DE_COLOR_COMPARE_COLOR 23 : 0 - -#define DE_COLOR_COMPARE_MASK 0x000024 -#define DE_COLOR_COMPARE_MASK_MASKS 23 : 0 - -#define DE_MASKS 0x000028 -#define DE_MASKS_BYTE_MASK 31 : 16 -#define DE_MASKS_BIT_MASK 15 : 0 - -#define DE_CLIP_TL 0x00002C -#define DE_CLIP_TL_TOP 31 : 16 -#define DE_CLIP_TL_STATUS 13 : 13 -#define DE_CLIP_TL_STATUS_DISABLE 0 -#define DE_CLIP_TL_STATUS_ENABLE 1 -#define DE_CLIP_TL_INHIBIT 12 : 12 -#define DE_CLIP_TL_INHIBIT_OUTSIDE 0 -#define DE_CLIP_TL_INHIBIT_INSIDE 1 -#define DE_CLIP_TL_LEFT 11 : 0 - -#define DE_CLIP_BR 0x000030 -#define DE_CLIP_BR_BOTTOM 31 : 16 -#define DE_CLIP_BR_RIGHT 12 : 0 - -#define DE_MONO_PATTERN_LOW 0x000034 -#define DE_MONO_PATTERN_LOW_PATTERN 31 : 0 - -#define DE_MONO_PATTERN_HIGH 0x000038 -#define DE_MONO_PATTERN_HIGH_PATTERN 31 : 0 - -#define DE_WINDOW_WIDTH 0x00003C -#define DE_WINDOW_WIDTH_DESTINATION 28 : 16 -#define DE_WINDOW_WIDTH_SOURCE 12 : 0 - -#define DE_WINDOW_SOURCE_BASE 0x000040 -#define DE_WINDOW_SOURCE_BASE_EXT 27 : 27 -#define DE_WINDOW_SOURCE_BASE_EXT_LOCAL 0 -#define DE_WINDOW_SOURCE_BASE_EXT_EXTERNAL 1 -#define DE_WINDOW_SOURCE_BASE_CS 26 : 26 -#define DE_WINDOW_SOURCE_BASE_CS_0 0 -#define DE_WINDOW_SOURCE_BASE_CS_1 1 -#define DE_WINDOW_SOURCE_BASE_ADDRESS 25 : 0 - -#define DE_WINDOW_DESTINATION_BASE 0x000044 -#define DE_WINDOW_DESTINATION_BASE_EXT 27 : 27 -#define DE_WINDOW_DESTINATION_BASE_EXT_LOCAL 0 -#define DE_WINDOW_DESTINATION_BASE_EXT_EXTERNAL 1 -#define DE_WINDOW_DESTINATION_BASE_CS 26 : 26 -#define DE_WINDOW_DESTINATION_BASE_CS_0 0 -#define DE_WINDOW_DESTINATION_BASE_CS_1 1 -#define DE_WINDOW_DESTINATION_BASE_ADDRESS 25 : 0 - -#define DE_ALPHA 0x000048 -#define DE_ALPHA_VALUE 7 : 0 - -#define DE_WRAP 0x00004C -#define DE_WRAP_X 31 : 16 -#define DE_WRAP_Y 15 : 0 - -#define DE_STATUS 0x000050 -#define DE_STATUS_CSC 1 : 1 -#define DE_STATUS_CSC_CLEAR 0 -#define DE_STATUS_CSC_NOT_ACTIVE 0 -#define DE_STATUS_CSC_ACTIVE 1 -#define DE_STATUS_2D 0 : 0 -#define DE_STATUS_2D_CLEAR 0 -#define DE_STATUS_2D_NOT_ACTIVE 0 -#define DE_STATUS_2D_ACTIVE 1 - -/* Color Space Conversion registers. */ - -#define CSC_Y_SOURCE_BASE 0x0000C8 -#define CSC_Y_SOURCE_BASE_EXT 27 : 27 -#define CSC_Y_SOURCE_BASE_EXT_LOCAL 0 -#define CSC_Y_SOURCE_BASE_EXT_EXTERNAL 1 -#define CSC_Y_SOURCE_BASE_CS 26 : 26 -#define CSC_Y_SOURCE_BASE_CS_0 0 -#define CSC_Y_SOURCE_BASE_CS_1 1 -#define CSC_Y_SOURCE_BASE_ADDRESS 25 : 0 - -#define CSC_CONSTANTS 0x0000CC -#define CSC_CONSTANTS_Y 31 : 24 -#define CSC_CONSTANTS_R 23 : 16 -#define CSC_CONSTANTS_G 15 : 8 -#define CSC_CONSTANTS_B 7 : 0 - -#define CSC_Y_SOURCE_X 0x0000D0 -#define CSC_Y_SOURCE_X_INTEGER 26 : 16 -#define CSC_Y_SOURCE_X_FRACTION 15 : 3 - -#define CSC_Y_SOURCE_Y 0x0000D4 -#define CSC_Y_SOURCE_Y_INTEGER 27 : 16 -#define CSC_Y_SOURCE_Y_FRACTION 15 : 3 - -#define CSC_U_SOURCE_BASE 0x0000D8 -#define CSC_U_SOURCE_BASE_EXT 27 : 27 -#define CSC_U_SOURCE_BASE_EXT_LOCAL 0 -#define CSC_U_SOURCE_BASE_EXT_EXTERNAL 1 -#define CSC_U_SOURCE_BASE_CS 26 : 26 -#define CSC_U_SOURCE_BASE_CS_0 0 -#define CSC_U_SOURCE_BASE_CS_1 1 -#define CSC_U_SOURCE_BASE_ADDRESS 25 : 0 - -#define CSC_V_SOURCE_BASE 0x0000DC -#define CSC_V_SOURCE_BASE_EXT 27 : 27 -#define CSC_V_SOURCE_BASE_EXT_LOCAL 0 -#define CSC_V_SOURCE_BASE_EXT_EXTERNAL 1 -#define CSC_V_SOURCE_BASE_CS 26 : 26 -#define CSC_V_SOURCE_BASE_CS_0 0 -#define CSC_V_SOURCE_BASE_CS_1 1 -#define CSC_V_SOURCE_BASE_ADDRESS 25 : 0 - -#define CSC_SOURCE_DIMENSION 0x0000E0 -#define CSC_SOURCE_DIMENSION_X 31 : 16 -#define CSC_SOURCE_DIMENSION_Y 15 : 0 - -#define CSC_SOURCE_PITCH 0x0000E4 -#define CSC_SOURCE_PITCH_Y 31 : 16 -#define CSC_SOURCE_PITCH_UV 15 : 0 - -#define CSC_DESTINATION 0x0000E8 -#define CSC_DESTINATION_WRAP 31 : 31 -#define CSC_DESTINATION_WRAP_DISABLE 0 -#define CSC_DESTINATION_WRAP_ENABLE 1 -#define CSC_DESTINATION_X 27 : 16 -#define CSC_DESTINATION_Y 11 : 0 - -#define CSC_DESTINATION_DIMENSION 0x0000EC -#define CSC_DESTINATION_DIMENSION_X 31 : 16 -#define CSC_DESTINATION_DIMENSION_Y 15 : 0 - -#define CSC_DESTINATION_PITCH 0x0000F0 -#define CSC_DESTINATION_PITCH_X 31 : 16 -#define CSC_DESTINATION_PITCH_Y 15 : 0 - -#define CSC_SCALE_FACTOR 0x0000F4 -#define CSC_SCALE_FACTOR_HORIZONTAL 31 : 16 -#define CSC_SCALE_FACTOR_VERTICAL 15 : 0 - -#define CSC_DESTINATION_BASE 0x0000F8 -#define CSC_DESTINATION_BASE_EXT 27 : 27 -#define CSC_DESTINATION_BASE_EXT_LOCAL 0 -#define CSC_DESTINATION_BASE_EXT_EXTERNAL 1 -#define CSC_DESTINATION_BASE_CS 26 : 26 -#define CSC_DESTINATION_BASE_CS_0 0 -#define CSC_DESTINATION_BASE_CS_1 1 -#define CSC_DESTINATION_BASE_ADDRESS 25 : 0 - -#define CSC_CONTROL 0x0000FC -#define CSC_CONTROL_STATUS 31 : 31 -#define CSC_CONTROL_STATUS_STOP 0 -#define CSC_CONTROL_STATUS_START 1 -#define CSC_CONTROL_SOURCE_FORMAT 30 : 28 -#define CSC_CONTROL_SOURCE_FORMAT_YUV422 0 -#define CSC_CONTROL_SOURCE_FORMAT_YUV420I 1 -#define CSC_CONTROL_SOURCE_FORMAT_YUV420 2 -#define CSC_CONTROL_SOURCE_FORMAT_YVU9 3 -#define CSC_CONTROL_SOURCE_FORMAT_IYU1 4 -#define CSC_CONTROL_SOURCE_FORMAT_IYU2 5 -#define CSC_CONTROL_SOURCE_FORMAT_RGB565 6 -#define CSC_CONTROL_SOURCE_FORMAT_RGB8888 7 -#define CSC_CONTROL_DESTINATION_FORMAT 27 : 26 -#define CSC_CONTROL_DESTINATION_FORMAT_RGB565 0 -#define CSC_CONTROL_DESTINATION_FORMAT_RGB8888 1 -#define CSC_CONTROL_HORIZONTAL_FILTER 25 : 25 -#define CSC_CONTROL_HORIZONTAL_FILTER_DISABLE 0 -#define CSC_CONTROL_HORIZONTAL_FILTER_ENABLE 1 -#define CSC_CONTROL_VERTICAL_FILTER 24 : 24 -#define CSC_CONTROL_VERTICAL_FILTER_DISABLE 0 -#define CSC_CONTROL_VERTICAL_FILTER_ENABLE 1 -#define CSC_CONTROL_BYTE_ORDER 23 : 23 -#define CSC_CONTROL_BYTE_ORDER_YUYV 0 -#define CSC_CONTROL_BYTE_ORDER_UYVY 1 - -#define DE_DATA_PORT_501 0x110000 -#define DE_DATA_PORT_712 0x400000 -#define DE_DATA_PORT_722 0x6000 - -/* point to virtual Memory Map IO starting address */ -extern char *smtc_RegBaseAddress; -/* point to virtual video memory starting address */ -extern char *smtc_VRAMBaseAddress; -extern unsigned char smtc_de_busy; - -extern unsigned long memRead32(unsigned long nOffset); -extern void memWrite32(unsigned long nOffset, unsigned long nData); -extern unsigned long SMTC_read2Dreg(unsigned long nOffset); - -/* 2D functions */ -extern void deInit(unsigned int nModeWidth, unsigned int nModeHeight, - unsigned int bpp); - -extern void deWaitForNotBusy(void); - -extern void deVerticalLine(unsigned long dst_base, - unsigned long dst_pitch, - unsigned long nX, - unsigned long nY, - unsigned long dst_height, - unsigned long nColor); - -extern void deHorizontalLine(unsigned long dst_base, - unsigned long dst_pitch, - unsigned long nX, - unsigned long nY, - unsigned long dst_width, - unsigned long nColor); - -extern void deLine(unsigned long dst_base, - unsigned long dst_pitch, - unsigned long nX1, - unsigned long nY1, - unsigned long nX2, - unsigned long nY2, - unsigned long nColor); - -extern void deFillRect(unsigned long dst_base, - unsigned long dst_pitch, - unsigned long dst_X, - unsigned long dst_Y, - unsigned long dst_width, - unsigned long dst_height, - unsigned long nColor); - -extern void deRotatePattern(unsigned char *pattern_dstaddr, - unsigned long pattern_src_addr, - unsigned long pattern_BPP, - unsigned long pattern_stride, - int patternX, - int patternY); - -extern void deCopy(unsigned long dst_base, - unsigned long dst_pitch, - unsigned long dst_BPP, - unsigned long dst_X, - unsigned long dst_Y, - unsigned long dst_width, - unsigned long dst_height, - unsigned long src_base, - unsigned long src_pitch, - unsigned long src_X, - unsigned long src_Y, - pTransparent pTransp, - unsigned char nROP2); - -/* - * System memory to Video memory monochrome expansion. - * - * Source is monochrome image in system memory. This function expands the - * monochrome data to color image in video memory. - * - * @pSrcbuf: pointer to start of source buffer in system memory - * @srcDelta: Pitch value (in bytes) of the source buffer, +ive means top - * down and -ive mean button up - * @startBit: Mono data can start at any bit in a byte, this value should - * be 0 to 7 - * @dBase: Address of destination : offset in frame buffer - * @dPitch: Pitch value of destination surface in BYTE - * @bpp: Color depth of destination surface - * @dx, dy: Starting coordinate of destination surface - * @width, height: width and height of rectange in pixel value - * @fColor,bColor: Foreground, Background color (corresponding to a 1, 0 in - * the monochrome data) - * @rop2: ROP value - */ - -extern long deSystemMem2VideoMemMonoBlt( - const char *pSrcbuf, - long srcDelta, - unsigned long startBit, - unsigned long dBase, - unsigned long dPitch, - unsigned long bpp, - unsigned long dx, unsigned long dy, - unsigned long width, unsigned long height, - unsigned long fColor, - unsigned long bColor, - unsigned long rop2); - -extern unsigned long deGetTransparency(void); -extern void deSetPixelFormat(unsigned long bpp); diff --git a/drivers/staging/sm7xx/smtcfb.c b/drivers/staging/sm7xx/smtcfb.c index 080b51a6e553..863df038f0d6 100644 --- a/drivers/staging/sm7xx/smtcfb.c +++ b/drivers/staging/sm7xx/smtcfb.c @@ -45,7 +45,6 @@ struct screen_info smtc_screen_info; #include "smtcfb.h" -#include "smtc2d.h" #ifdef DEBUG #define smdbg(format, arg...) printk(KERN_DEBUG format , ## arg) @@ -120,10 +119,6 @@ static struct vesa_mode_table vesa_mode[] = { char __iomem *smtc_RegBaseAddress; /* Memory Map IO starting address */ char __iomem *smtc_VRAMBaseAddress; /* video memory starting address */ -char *smtc_2DBaseAddress; /* 2D engine starting address */ -char *smtc_2Ddataport; /* 2D data port offset */ -short smtc_2Dacceleration; - static u32 colreg[17]; static struct par_info hw; /* hardware information */ @@ -135,16 +130,6 @@ u16 smtc_ChipIDs[] = { #define numSMTCchipIDs (sizeof(smtc_ChipIDs) / sizeof(u16)) -void deWaitForNotBusy(void) -{ - unsigned long i = 0x1000000; - while (i--) { - if ((smtc_seqr(0x16) & 0x18) == 0x10) - break; - } - smtc_de_busy = 0; -} - static void sm712_set_timing(struct smtcfb_info *sfb, struct par_info *ppar_info) { @@ -324,7 +309,7 @@ static inline unsigned int chan_to_field(unsigned int chan, return chan << bf->offset; } -static int smtcfb_blank(int blank_mode, struct fb_info *info) +static int cfb_blank(int blank_mode, struct fb_info *info) { /* clear DPMS setting */ switch (blank_mode) { @@ -622,93 +607,13 @@ smtcfb_write(struct fb_info *info, const char __user *buf, size_t count, } #endif /* ! __BIG_ENDIAN */ -#include "smtc2d.c" - -void smtcfb_copyarea(struct fb_info *info, const struct fb_copyarea *area) -{ - struct par_info *p = (struct par_info *)info->par; - - if (smtc_2Dacceleration) { - if (!area->width || !area->height) - return; - - deCopy(p->BaseAddressInVRAM, 0, info->var.bits_per_pixel, - area->dx, area->dy, area->width, area->height, - p->BaseAddressInVRAM, 0, area->sx, area->sy, 0, 0xC); - - } else - cfb_copyarea(info, area); -} - -void smtcfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) -{ - struct par_info *p = (struct par_info *)info->par; - - if (smtc_2Dacceleration) { - if (!rect->width || !rect->height) - return; - if (info->var.bits_per_pixel >= 24) - deFillRect(p->BaseAddressInVRAM, 0, rect->dx * 3, - rect->dy * 3, rect->width * 3, rect->height, - rect->color); - else - deFillRect(p->BaseAddressInVRAM, 0, rect->dx, rect->dy, - rect->width, rect->height, rect->color); - } else - cfb_fillrect(info, rect); -} - -void smtcfb_imageblit(struct fb_info *info, const struct fb_image *image) -{ - struct par_info *p = (struct par_info *)info->par; - u32 bg_col = 0, fg_col = 0; - - if ((smtc_2Dacceleration) && (image->depth == 1)) { - if (smtc_de_busy) - deWaitForNotBusy(); - - switch (info->var.bits_per_pixel) { - case 8: - bg_col = image->bg_color; - fg_col = image->fg_color; - break; - case 16: - bg_col = - ((u32 *) (info->pseudo_palette))[image->bg_color]; - fg_col = - ((u32 *) (info->pseudo_palette))[image->fg_color]; - break; - case 32: - bg_col = - ((u32 *) (info->pseudo_palette))[image->bg_color]; - fg_col = - ((u32 *) (info->pseudo_palette))[image->fg_color]; - break; - } - - deSystemMem2VideoMemMonoBlt( - image->data, - image->width / 8, - 0, - p->BaseAddressInVRAM, - 0, - 0, - image->dx, image->dy, - image->width, image->height, - fg_col, bg_col, - 0x0C); - - } else - cfb_imageblit(info, image); -} - static struct fb_ops smtcfb_ops = { .owner = THIS_MODULE, .fb_setcolreg = smtc_setcolreg, - .fb_blank = smtcfb_blank, - .fb_fillrect = smtcfb_fillrect, - .fb_imageblit = smtcfb_imageblit, - .fb_copyarea = smtcfb_copyarea, + .fb_blank = cfb_blank, + .fb_fillrect = cfb_fillrect, + .fb_imageblit = cfb_imageblit, + .fb_copyarea = cfb_copyarea, #ifdef __BIG_ENDIAN .fb_read = smtcfb_read, .fb_write = smtcfb_write, @@ -772,12 +677,6 @@ void smtcfb_setmode(struct smtcfb_info *sfb) hw.height = sfb->fb.var.yres; hw.hz = 60; smtc_set_timing(sfb, &hw); - if (smtc_2Dacceleration) { - printk("2D acceleration enabled!\n"); - /* Init smtc drawing engine */ - deInit(sfb->fb.var.xres, sfb->fb.var.yres, - sfb->fb.var.bits_per_pixel); - } } /* @@ -1004,9 +903,7 @@ static int __init smtcfb_pci_probe(struct pci_dev *pdev, #endif hw.m_pMMIO = (smtc_RegBaseAddress = smtc_VRAMBaseAddress + 0x00700000); - smtc_2DBaseAddress = (hw.m_pDPR = - smtc_VRAMBaseAddress + 0x00408000); - smtc_2Ddataport = smtc_VRAMBaseAddress + DE_DATA_PORT_712; + hw.m_pDPR = smtc_VRAMBaseAddress + 0x00408000; hw.m_pVPR = hw.m_pLFB + 0x0040c000; #ifdef __BIG_ENDIAN if (sfb->fb.var.bits_per_pixel == 32) { @@ -1034,28 +931,22 @@ static int __init smtcfb_pci_probe(struct pci_dev *pdev, #ifdef __BIG_ENDIAN if (sfb->fb.var.bits_per_pixel == 32) smtc_seqw(0x17, 0x30); -#endif -#ifdef CONFIG_FB_SM7XX_ACCEL - smtc_2Dacceleration = 1; #endif break; case 0x720: sfb->fb.fix.mmio_start = pFramebufferPhysical; sfb->fb.fix.mmio_len = 0x00200000; smem_size = SM722_VIDEOMEMORYSIZE; - smtc_2DBaseAddress = (hw.m_pDPR = - ioremap(pFramebufferPhysical, 0x00a00000)); + hw.m_pDPR = ioremap(pFramebufferPhysical, 0x00a00000); hw.m_pLFB = (smtc_VRAMBaseAddress = - smtc_2DBaseAddress + 0x00200000); + hw.m_pDPR + 0x00200000); hw.m_pMMIO = (smtc_RegBaseAddress = - smtc_2DBaseAddress + 0x000c0000); - smtc_2Ddataport = smtc_2DBaseAddress + DE_DATA_PORT_722; - hw.m_pVPR = smtc_2DBaseAddress + 0x800; + hw.m_pDPR + 0x000c0000); + hw.m_pVPR = hw.m_pDPR + 0x800; smtc_seqw(0x62, 0xff); smtc_seqw(0x6a, 0x0d); smtc_seqw(0x6b, 0x02); - smtc_2Dacceleration = 0; break; default: printk(KERN_INFO From 0289bb5d18ad57e23a7be681857f070980c66790 Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Thu, 14 Jan 2010 21:25:56 +0100 Subject: [PATCH 161/367] Staging: rtl8192u: ieee80211: CurrentMPDUDensity assigned to itself in HTUseDefaultSetting() CurrentMPDUDensity was designed to itself. Signed-off-by: Roel Kluin Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index 3a5eaa59b21d..50f4f5943e75 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -1342,7 +1342,7 @@ void HTUseDefaultSetting(struct ieee80211_device* ieee) pHTInfo->CurrentAMPDUFactor = pHTInfo->AMPDU_Factor; - pHTInfo->CurrentMPDUDensity = pHTInfo->CurrentMPDUDensity; + pHTInfo->CurrentMPDUDensity = pHTInfo->MPDU_Density; // Set BWOpMode register From d2e01434fd9c01687a7cace957f182594cccc829 Mon Sep 17 00:00:00 2001 From: Benjamin Adolphi Date: Fri, 15 Jan 2010 12:08:01 +0100 Subject: [PATCH 162/367] Staging: comedi: adq12b: Checkpatch cleanups This fixes some checkpatch issues in the adq12b comedi driver. Signed-off-by: Benjamin Adolphi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adq12b.c | 48 ++++++++++++------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/staging/comedi/drivers/adq12b.c b/drivers/staging/comedi/drivers/adq12b.c index c5ed8bb97602..4590cac612d4 100644 --- a/drivers/staging/comedi/drivers/adq12b.c +++ b/drivers/staging/comedi/drivers/adq12b.c @@ -42,23 +42,23 @@ If you do not specify any options, they will default to option 1: I/O base address. The following table is provided as a help of the hardware jumpers. - address jumper JADR - 0x300 1 (factory default) - 0x320 2 - 0x340 3 - 0x360 4 - 0x380 5 - 0x3A0 6 + address jumper JADR + 0x300 1 (factory default) + 0x320 2 + 0x340 3 + 0x360 4 + 0x380 5 + 0x3A0 6 option 2: unipolar/bipolar ADC selection: 0 -> bipolar, 1 -> unipolar - selection comedi_config option JUB - bipolar 0 2-3 (factory default) - unipolar 1 1-2 + selection comedi_config option JUB + bipolar 0 2-3 (factory default) + unipolar 1 1-2 option 3: single-ended/differential AI selection: 0 -> SE, 1 -> differential - selection comedi_config option JCHA JCHB + selection comedi_config option JCHA JCHB single-ended 0 1-2 1-2 (factory default) differential 1 2-3 2-3 @@ -140,7 +140,7 @@ static const struct adq12b_board adq12b_boards[] = { .ai_bits = 12, .di_chans = 8, .do_chans = 5 - }*/ + }*/ }; #define thisboard ((const struct adq12b_board *)dev->board_ptr) @@ -164,14 +164,15 @@ struct adq12b_private { static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it); static int adq12b_detach(struct comedi_device *dev); + static struct comedi_driver driver_adq12b = { -driver_name:"adq12b", -module:THIS_MODULE, -attach:adq12b_attach, -detach:adq12b_detach, -board_name:&adq12b_boards[0].name, -offset:sizeof(struct adq12b_board), -num_names:ARRAY_SIZE(adq12b_boards), + .driver_name = "adq12b", + .module = THIS_MODULE, + .attach = adq12b_attach, + .detach = adq12b_detach, + .board_name = &adq12b_boards[0].name, + .offset = sizeof(struct adq12b_board), + .num_names = ARRAY_SIZE(adq12b_boards), }; static int adq12b_ai_rinsn(struct comedi_device *dev, @@ -259,11 +260,10 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it) s->n_chan = thisboard->ai_se_chans; } - if (unipolar) { + if (unipolar) s->range_table = &range_adq12b_ai_unipolar; - } else { + else s->range_table = &range_adq12b_ai_bipolar; - } s->maxdata = (1 << thisboard->ai_bits) - 1; @@ -344,11 +344,11 @@ static int adq12b_ai_rinsn(struct comedi_device *dev, /* wait for end of convertion */ i = 0; do { -/* udelay(1); */ + /* udelay(1); */ status = inb(dev->iobase + ADQ12B_STINR); status = status & ADQ12B_EOC; } while (status == 0 && ++i < TIMEOUT); -/* } while (++i < 10); */ + /* } while (++i < 10); */ /* read data */ hi = inb(dev->iobase + ADQ12B_ADHIG); From 23d53b1768f9396d0e259a9b4e62bfcc03122bab Mon Sep 17 00:00:00 2001 From: Benjamin Adolphi Date: Fri, 15 Jan 2010 17:37:47 +0100 Subject: [PATCH 163/367] Staging: comedi: c6xdigio: Checkpatch cleanups This fixes some checkpatch issues and some spelling mistakes in the c6xdigio comedi driver. Signed-off-by: Benjamin Adolphi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/c6xdigio.c | 55 +++++++++++------------ 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/drivers/staging/comedi/drivers/c6xdigio.c b/drivers/staging/comedi/drivers/c6xdigio.c index abb0532182ba..fb0d5fa71765 100644 --- a/drivers/staging/comedi/drivers/c6xdigio.c +++ b/drivers/staging/comedi/drivers/c6xdigio.c @@ -45,7 +45,7 @@ http://robot0.ge.uiuc.edu/~spong/mecha/ #include #include #include -#include +#include #include #include "../comedidev.h" @@ -220,11 +220,11 @@ static int C6X_encInput(unsigned long baseAddr, unsigned channel) /* printk("Inside C6X_encInput\n"); */ enc.value = 0; - if (channel == 0) { + if (channel == 0) ppcmd = 0x48; - } else { + else ppcmd = 0x50; - } + WriteByteToHwPort(baseAddr, ppcmd); tmp = ReadByteFromHwPort(baseAddr + 1); while (((tmp & 0x80) == 0) && (timeout < C6XDIGIO_TIME_OUT)) { @@ -391,9 +391,8 @@ static int c6xdigio_ei_insn_read(struct comedi_device *dev, int n; int chan = CR_CHAN(insn->chanspec); - for (n = 0; n < insn->n; n++) { + for (n = 0; n < insn->n; n++) data[n] = (C6X_encInput(dev->iobase, chan) & 0xffffff); - } return n; } @@ -420,9 +419,9 @@ static void board_init(struct comedi_device *dev) static const struct pnp_device_id c6xdigio_pnp_tbl[] = { /* Standard LPT Printer Port */ - {.id = "PNP0400",.driver_data = 0}, + {.id = "PNP0400", .driver_data = 0}, /* ECP Printer Port */ - {.id = "PNP0401",.driver_data = 0}, + {.id = "PNP0401", .driver_data = 0}, {} }; @@ -452,15 +451,14 @@ static int c6xdigio_attach(struct comedi_device *dev, if (result < 0) return result; - /* Make sure that PnP ports gets activated */ + /* Make sure that PnP ports get activated */ pnp_register_driver(&c6xdigio_pnp_driver); irq = it->options[1]; - if (irq > 0) { + if (irq > 0) printk("comedi%d: irq = %u ignored\n", dev->minor, irq); - } else if (irq == 0) { + else if (irq == 0) printk("comedi%d: no irq\n", dev->minor); - } s = dev->subdevices + 0; /* pwm output subdevice */ @@ -483,19 +481,19 @@ static int c6xdigio_attach(struct comedi_device *dev, s->maxdata = 0xffffff; s->range_table = &range_unknown; - /* s = dev->subdevices + 2; */ + /* s = dev->subdevices + 2; */ /* pwm output subdevice */ - /* s->type = COMEDI_SUBD_COUNTER; // Not sure what to put here */ - /* s->subdev_flags = SDF_WRITEABLE; */ - /* s->n_chan = 1; */ - /* s->trig[0] = c6xdigio_ei_init; */ - /* s->insn_read = c6xdigio_ei_init_insn_read; */ - /* s->insn_write = c6xdigio_ei_init_insn_write; */ - /* s->maxdata = 0xFFFF; // Really just a don't care */ - /* s->range_table = &range_unknown; // Not sure what to put here */ + /* s->type = COMEDI_SUBD_COUNTER; // Not sure what to put here */ + /* s->subdev_flags = SDF_WRITEABLE; */ + /* s->n_chan = 1; */ + /* s->trig[0] = c6xdigio_ei_init; */ + /* s->insn_read = c6xdigio_ei_init_insn_read; */ + /* s->insn_write = c6xdigio_ei_init_insn_write; */ + /* s->maxdata = 0xFFFF; // Really just a don't care */ + /* s->range_table = &range_unknown; // Not sure what to put here */ - /* I will call this init anyway but more than likely the DSP board will not be connect */ - /* when device driver is loaded. */ + /* I will call this init anyway but more than likely the DSP board */ + /* will not be connected when device driver is loaded. */ board_init(dev); return 0; @@ -503,16 +501,17 @@ static int c6xdigio_attach(struct comedi_device *dev, static int c6xdigio_detach(struct comedi_device *dev) { -/* board_halt(dev); may not need this */ + /* board_halt(dev); may not need this */ printk("comedi%d: c6xdigio: remove\n", dev->minor); - if (dev->iobase) { + if (dev->iobase) release_region(dev->iobase, C6XDIGIO_SIZE); - } - if (dev->irq) { + + /* Not using IRQ so I am not sure if I need this */ + if (dev->irq) free_irq(dev->irq, dev); - } /* Not using IRQ so I am not sure if I need this */ + pnp_unregister_driver(&c6xdigio_pnp_driver); return 0; From 79a22d5c264f5ddfc8573aa7eb234fe62dd1ee32 Mon Sep 17 00:00:00 2001 From: Benjamin Adolphi Date: Fri, 15 Jan 2010 18:03:35 +0100 Subject: [PATCH 164/367] Staging: comedi: rti800: Checkpatch cleanups This fixes some checkpatch issues in the rti800 comedi driver. Signed-off-by: Benjamin Adolphi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/rti800.c | 41 ++++++++++++------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/drivers/staging/comedi/drivers/rti800.c b/drivers/staging/comedi/drivers/rti800.c index 2c9d05bd288c..f2ee5289dbf1 100644 --- a/drivers/staging/comedi/drivers/rti800.c +++ b/drivers/staging/comedi/drivers/rti800.c @@ -32,22 +32,22 @@ Configuration options: [0] - I/O port base address [1] - IRQ [2] - A/D reference - 0 = differential - 1 = pseudodifferential (common) - 2 = single-ended + 0 = differential + 1 = pseudodifferential (common) + 2 = single-ended [3] - A/D range - 0 = [-10,10] - 1 = [-5,5] - 2 = [0,10] + 0 = [-10,10] + 1 = [-5,5] + 2 = [0,10] [4] - A/D encoding - 0 = two's complement - 1 = straight binary + 0 = two's complement + 1 = straight binary [5] - DAC 0 range - 0 = [-10,10] - 1 = [0,10] + 0 = [-10,10] + 1 = [0,10] [6] - DAC 0 encoding - 0 = two's complement - 1 = straight binary + 0 = two's complement + 1 = straight binary [7] - DAC 1 range (same as DAC 0) [8] - DAC 1 encoding (same as DAC 0) */ @@ -240,9 +240,8 @@ static int rti800_ai_insn_read(struct comedi_device *dev, data[i] = inb(dev->iobase + RTI800_ADCLO); data[i] |= (0xf & inb(dev->iobase + RTI800_ADCHI)) << 8; - if (devpriv->adc_coding == adc_2comp) { + if (devpriv->adc_coding == adc_2comp) data[i] ^= 0x800; - } } return i; @@ -271,9 +270,9 @@ static int rti800_ao_insn_write(struct comedi_device *dev, for (i = 0; i < insn->n; i++) { devpriv->ao_readback[chan] = d = data[i]; - if (devpriv->dac0_coding == dac_2comp) { + if (devpriv->dac0_coding == dac_2comp) d ^= 0x800; - } + outb(d & 0xff, dev->iobase + (chan ? RTI800_DAC1LO : RTI800_DAC0LO)); outb(d >> 8, @@ -315,15 +314,15 @@ static int rti800_do_insn_bits(struct comedi_device *dev, options[0] - I/O port options[1] - irq options[2] - a/d mux - 0=differential, 1=pseudodiff, 2=single + 0=differential, 1=pseudodiff, 2=single options[3] - a/d range - 0=bipolar10, 1=bipolar5, 2=unipolar10 + 0=bipolar10, 1=bipolar5, 2=unipolar10 options[4] - a/d coding - 0=2's comp, 1=straight binary + 0=2's comp, 1=straight binary options[5] - dac0 range - 0=bipolar10, 1=unipolar10 + 0=bipolar10, 1=unipolar10 options[6] - dac0 coding - 0=2's comp, 1=straight binary + 0=2's comp, 1=straight binary options[7] - dac1 range options[8] - dac1 coding */ From f51f90300010937bc9a2455cef88366448a6e718 Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Sat, 16 Jan 2010 16:59:22 +0100 Subject: [PATCH 165/367] Staging: go7007: Eliminate useless code The variable s is initialized twice to the same (side effect-free) expression. Drop one initialization. A simplified version of the semantic match that finds this problem is: (http://coccinelle.lip6.fr/) // @forall@ idexpression *x; identifier f!=ERR_PTR; @@ x = f(...) ... when != x ( x = f(...,<+...x...+>,...) | * x = f(...) ) // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- drivers/staging/go7007/s2250-loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/go7007/s2250-loader.c b/drivers/staging/go7007/s2250-loader.c index ef833e0d63ae..1de2dfb16d3f 100644 --- a/drivers/staging/go7007/s2250-loader.c +++ b/drivers/staging/go7007/s2250-loader.c @@ -139,7 +139,7 @@ failed2: static void s2250loader_disconnect(struct usb_interface *interface) { - pdevice_extension_t s = usb_get_intfdata(interface); + pdevice_extension_t s; printk(KERN_INFO "s2250: disconnect\n"); lock_kernel(); s = usb_get_intfdata(interface); From 266bfbdd3eb7f080612977f22055c82b951b179e Mon Sep 17 00:00:00 2001 From: Benjamin Adolphi Date: Sat, 16 Jan 2010 18:58:58 +0100 Subject: [PATCH 166/367] Staging: comedi: pcl711: Checkpatch cleanups This fixes some checkpatch issues in the pcl711 comedi driver. Signed-off-by: Benjamin Adolphi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl711.c | 29 ++++++++++--------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl711.c b/drivers/staging/comedi/drivers/pcl711.c index 4914784f6995..a499f7070f72 100644 --- a/drivers/staging/comedi/drivers/pcl711.c +++ b/drivers/staging/comedi/drivers/pcl711.c @@ -207,11 +207,10 @@ static irqreturn_t pcl711_interrupt(int irq, void *d) /* FIXME! Nothing else sets ntrig! */ if (!(--devpriv->ntrig)) { - if (this_board->is_8112) { + if (this_board->is_8112) outb(1, dev->iobase + PCL711_MODE); - } else { + else outb(0, dev->iobase + PCL711_MODE); - } s->async->events |= COMEDI_CB_EOA; } @@ -232,15 +231,15 @@ static void pcl711_set_changain(struct comedi_device *dev, int chan) /* * Set the correct channel. The two channel banks are switched * using the mask value. - * NB: To use differential channels, you should use mask = 0x30, - * but I haven't written the support for this yet. /JJ + * NB: To use differential channels, you should use + * mask = 0x30, but I haven't written the support for this + * yet. /JJ */ - if (chan_register >= 8) { + if (chan_register >= 8) chan_register = 0x20 | (chan_register & 0x7); - } else { + else chan_register |= 0x10; - } } else { outb(chan_register, dev->iobase + PCL711_MUX); } @@ -256,15 +255,13 @@ static int pcl711_ai_insn(struct comedi_device *dev, struct comedi_subdevice *s, for (n = 0; n < insn->n; n++) { /* - * Write the correct mode (software polling) and start polling by writing - * to the trigger register + * Write the correct mode (software polling) and start polling + * by writing to the trigger register */ outb(1, dev->iobase + PCL711_MODE); - if (this_board->is_8112) { - } else { + if (!this_board->is_8112) outb(0, dev->iobase + PCL711_SOFTTRIG); - } i = PCL711_TIMEOUT; while (--i) { @@ -462,9 +459,8 @@ static int pcl711_ao_insn_read(struct comedi_device *dev, int n; int chan = CR_CHAN(insn->chanspec); - for (n = 0; n < insn->n; n++) { + for (n = 0; n < insn->n; n++) data[n] = devpriv->ao_readback[chan]; - } return n; @@ -619,9 +615,8 @@ static int pcl711_attach(struct comedi_device *dev, struct comedi_devconfig *it) this is the "base value" for the mode register, which is used for the irq on the PCL711 */ - if (this_board->is_pcl711b) { + if (this_board->is_pcl711b) devpriv->mode = (dev->irq << 4); - } /* clear DAC */ outb(0, dev->iobase + PCL711_DA0_LO); From 186539192c37c0ebe95ddac341cf7e037b096966 Mon Sep 17 00:00:00 2001 From: Benjamin Adolphi Date: Mon, 18 Jan 2010 12:48:16 +0100 Subject: [PATCH 167/367] Staging: comedi: pcl724: Checkpatch cleanups This fixes all checkpatch issues in the pcl724 comedi driver. Signed-off-by: Benjamin Adolphi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl724.c | 26 ++++++++++++------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl724.c b/drivers/staging/comedi/drivers/pcl724.c index df1f4ef14616..0f103c328064 100644 --- a/drivers/staging/comedi/drivers/pcl724.c +++ b/drivers/staging/comedi/drivers/pcl724.c @@ -17,7 +17,7 @@ [0] - IO Base [1] - IRQ (0=disable IRQ) IRQ isn't supported at this time! [2] -number of DIO: - 0, 144: 144 DIO configuration + 0, 144: 144 DIO configuration 1, 96: 96 DIO configuration */ /* @@ -137,8 +137,8 @@ static int pcl724_attach(struct comedi_device *dev, struct comedi_devconfig *it) iorange = this_board->io_range; if ((this_board->can_have96) && ((it->options[1] == 1) || (it->options[1] == 96))) - iorange = PCL722_96_SIZE; /* PCL-724 in 96 DIO configuration */ - printk("comedi%d: pcl724: board=%s, 0x%03lx ", dev->minor, + iorange = PCL722_96_SIZE; /* PCL-724 in 96 DIO configuration */ + printk(KERN_INFO "comedi%d: pcl724: board=%s, 0x%03lx ", dev->minor, this_board->name, iobase); if (!request_region(iobase, iorange, "pcl724")) { printk("I/O port conflict\n"); @@ -155,16 +155,16 @@ static int pcl724_attach(struct comedi_device *dev, struct comedi_devconfig *it) irq = it->options[1]; if (irq) { /* we want to use IRQ */ if (((1 << irq) & this_board->IRQbits) == 0) { - printk - (", IRQ %u is out of allowed range, DISABLING IT", - irq); + printk(KERN_WARNING + ", IRQ %u is out of allowed range, " + "DISABLING IT", irq); irq = 0; /* Bad IRQ */ } else { if (request_irq (irq, interrupt_pcl724, 0, "pcl724", dev)) { - printk - (", unable to allocate IRQ %u, DISABLING IT", - irq); + printk(KERN_WARNING + ", unable to allocate IRQ %u, " + "DISABLING IT", irq); irq = 0; /* Can't use IRQ */ } else { printk(", irq=%u", irq); @@ -207,16 +207,14 @@ static int pcl724_detach(struct comedi_device *dev) { int i; -/* printk("comedi%d: pcl724: remove\n",dev->minor); */ + /* printk("comedi%d: pcl724: remove\n",dev->minor); */ - for (i = 0; i < dev->n_subdevices; i++) { + for (i = 0; i < dev->n_subdevices; i++) subdev_8255_cleanup(dev, dev->subdevices + i); - } #ifdef PCL724_IRQ - if (dev->irq) { + if (dev->irq) free_irq(dev->irq, dev); - } #endif release_region(dev->iobase, this_board->io_range); From acb60e915a68c44757e12c45a8cede11339b6172 Mon Sep 17 00:00:00 2001 From: Benjamin Adolphi Date: Mon, 18 Jan 2010 12:57:42 +0100 Subject: [PATCH 168/367] Staging: comedi: pcl725: Checkpatch cleanups This fixes all checkpatch issues in the pcl725 comedi driver. Signed-off-by: Benjamin Adolphi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl725.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl725.c b/drivers/staging/comedi/drivers/pcl725.c index 1da4941fce49..60261f4ba5b4 100644 --- a/drivers/staging/comedi/drivers/pcl725.c +++ b/drivers/staging/comedi/drivers/pcl725.c @@ -66,7 +66,7 @@ static int pcl725_attach(struct comedi_device *dev, struct comedi_devconfig *it) unsigned long iobase; iobase = it->options[0]; - printk("comedi%d: pcl725: 0x%04lx ", dev->minor, iobase); + printk(KERN_INFO "comedi%d: pcl725: 0x%04lx ", dev->minor, iobase); if (!request_region(iobase, PCL725_SIZE, "pcl725")) { printk("I/O port conflict\n"); return -EIO; @@ -96,14 +96,14 @@ static int pcl725_attach(struct comedi_device *dev, struct comedi_devconfig *it) s->insn_bits = pcl725_di_insn; s->range_table = &range_digital; - printk("\n"); + printk(KERN_INFO "\n"); return 0; } static int pcl725_detach(struct comedi_device *dev) { - printk("comedi%d: pcl725: remove\n", dev->minor); + printk(KERN_INFO "comedi%d: pcl725: remove\n", dev->minor); if (dev->iobase) release_region(dev->iobase, PCL725_SIZE); From 615d5b6c56ff6bfd6ae223e99df26cf28d55f566 Mon Sep 17 00:00:00 2001 From: Benjamin Adolphi Date: Mon, 18 Jan 2010 22:32:07 +0100 Subject: [PATCH 169/367] Staging: comedi: pcl730: Checkpatch cleanups This fixes all checkpatch issues in the pcl730 comedi driver. Signed-off-by: Benjamin Adolphi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl730.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl730.c b/drivers/staging/comedi/drivers/pcl730.c index c9859c90c152..e5e7bed21de0 100644 --- a/drivers/staging/comedi/drivers/pcl730.c +++ b/drivers/staging/comedi/drivers/pcl730.c @@ -99,7 +99,7 @@ static int pcl730_attach(struct comedi_device *dev, struct comedi_devconfig *it) iobase = it->options[0]; iorange = this_board->io_range; - printk("comedi%d: pcl730: board=%s 0x%04lx ", dev->minor, + printk(KERN_INFO "comedi%d: pcl730: board=%s 0x%04lx ", dev->minor, this_board->name, iobase); if (!request_region(iobase, iorange, "pcl730")) { printk("I/O port conflict\n"); @@ -152,14 +152,14 @@ static int pcl730_attach(struct comedi_device *dev, struct comedi_devconfig *it) s->range_table = &range_digital; s->private = (void *)PCL730_DIO_LO; - printk("\n"); + printk(KERN_INFO "\n"); return 0; } static int pcl730_detach(struct comedi_device *dev) { - printk("comedi%d: pcl730: remove\n", dev->minor); + printk(KERN_INFO "comedi%d: pcl730: remove\n", dev->minor); if (dev->iobase) release_region(dev->iobase, this_board->io_range); From 6c381c5775ea5eb799bdc790dd6d6d43fe966134 Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Tue, 19 Jan 2010 21:46:48 +0100 Subject: [PATCH 170/367] Staging: Comedi: G1-3 status registers not read in ni_gpct_to_660x_register() Read from the right status register Signed-off-by: Roel Kluin Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_660x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c index 404d3c516ed1..1e2041447667 100644 --- a/drivers/staging/comedi/drivers/ni_660x.c +++ b/drivers/staging/comedi/drivers/ni_660x.c @@ -691,13 +691,13 @@ static enum NI_660x_Register ni_gpct_to_660x_register(enum ni_gpct_register reg) ni_660x_register = G0StatusRegister; break; case NITIO_G1_Status_Reg: - ni_660x_register = G0StatusRegister; + ni_660x_register = G1StatusRegister; break; case NITIO_G2_Status_Reg: - ni_660x_register = G0StatusRegister; + ni_660x_register = G2StatusRegister; break; case NITIO_G3_Status_Reg: - ni_660x_register = G0StatusRegister; + ni_660x_register = G3StatusRegister; break; case NITIO_G0_Interrupt_Enable_Reg: ni_660x_register = G0InterruptEnable; From 7edfa10689615255e65909bb893fd8f8620cff92 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Wed, 20 Jan 2010 13:04:44 +0000 Subject: [PATCH 171/367] Staging: comedi: pcl812: Correct AI scan counting The AI scan counter should be updated after every completed scan, not after every channel. Keep track of current channel. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl812.c b/drivers/staging/comedi/drivers/pcl812.c index 0a5bc3d6da8c..aa912735ddba 100644 --- a/drivers/staging/comedi/drivers/pcl812.c +++ b/drivers/staging/comedi/drivers/pcl812.c @@ -995,7 +995,9 @@ static irqreturn_t interrupt_pcl812_ai_int(int irq, void *d) outb(0, dev->iobase + PCL812_CLRINT); /* clear INT request */ - if (s->async->cur_chan == 0) { /* one scan done */ + s->async->cur_chan++; + if (s->async->cur_chan >= devpriv->ai_n_chan) { /* one scan done */ + s->async->cur_chan = 0; devpriv->ai_act_scan++; if (!(devpriv->ai_neverending)) if (devpriv->ai_act_scan >= devpriv->ai_scans) { /* all data sampled */ @@ -1021,7 +1023,9 @@ static void transfer_from_dma_buf(struct comedi_device *dev, for (i = len; i; i--) { comedi_buf_put(s->async, ptr[bufptr++]); /* get one sample */ - if (s->async->cur_chan == 0) { + s->async->cur_chan++; + if (s->async->cur_chan >= devpriv->ai_n_chan) { + s->async->cur_chan = 0; devpriv->ai_act_scan++; if (!devpriv->ai_neverending) if (devpriv->ai_act_scan >= devpriv->ai_scans) { /* all data sampled */ From 13de4f000ec491b16a820e4ed59de2c98b7807be Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Wed, 20 Jan 2010 13:04:45 +0000 Subject: [PATCH 172/367] Staging: comedi: pcl816: Correct AI scan counting For AI commands, the scan counter should be updated after every scan. In DMA mode, it was being updated after every repeated segment of the channel list. In non-DMA mode, it was being updated after every sample. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/comedi/drivers/pcl816.c index 852fe2458fdc..5c88ddc1fc05 100644 --- a/drivers/staging/comedi/drivers/pcl816.c +++ b/drivers/staging/comedi/drivers/pcl816.c @@ -202,6 +202,7 @@ struct pcl816_private { unsigned int ai_act_chanlist[16]; /* MUX setting for actual AI operations */ unsigned int ai_act_chanlist_len; /* how long is actual MUX list */ unsigned int ai_act_chanlist_pos; /* actual position in MUX list */ + unsigned int ai_n_chan; /* how many channels per scan */ unsigned int ai_poll_ptr; /* how many sampes transfer poll */ struct comedi_subdevice *sub_ai; /* ptr to AI subdevice */ #ifdef unused @@ -320,7 +321,9 @@ static irqreturn_t interrupt_pcl816_ai_mode13_int(int irq, void *d) if (++devpriv->ai_act_chanlist_pos >= devpriv->ai_act_chanlist_len) devpriv->ai_act_chanlist_pos = 0; - if (s->async->cur_chan == 0) { + s->async->cur_chan++; + if (s->async->cur_chan >= devpriv->ai_n_chan) { + s->async->cur_chan = 0; devpriv->ai_act_scan++; } @@ -353,6 +356,11 @@ static void transfer_from_dma_buf(struct comedi_device *dev, if (++devpriv->ai_act_chanlist_pos >= devpriv->ai_act_chanlist_len) { devpriv->ai_act_chanlist_pos = 0; + } + + s->async->cur_chan++; + if (s->async->cur_chan >= devpriv->ai_n_chan) { + s->async->cur_chan = 0; devpriv->ai_act_scan++; } @@ -647,6 +655,7 @@ static int pcl816_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) return -EINVAL; udelay(1); + devpriv->ai_n_chan = cmd->chanlist_len; devpriv->ai_act_scan = 0; s->async->cur_chan = 0; devpriv->irq_blocked = 1; From b3559cb1aa5f863e1ce9b94b518be7ddf6680e45 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Wed, 20 Jan 2010 13:04:46 +0000 Subject: [PATCH 173/367] Staging: comedi: pcl818: Correct AI scan counting and channel checks For AI commands, the scan counter should be updated after every scan. It was being updated after every sample except for DMA mode where it was being updated after every repeated segment of the channel list. Also AI commands with multiple channels were being terminated with an error prematurely except in DMA mode. This was because the driver was comparing channel numbers received from the hardware (combined with the sample value) with the expected channel numbers to check for a "channel dropout". This test was failing incorrectly because the driver was not keeping the current position within the (repeated segment of the) channel list up to date. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 31 +++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/comedi/drivers/pcl818.c index d0481013a837..40ac293ad89d 100644 --- a/drivers/staging/comedi/drivers/pcl818.c +++ b/drivers/staging/comedi/drivers/pcl818.c @@ -557,8 +557,14 @@ conv_finish: comedi_event(dev, s); return IRQ_HANDLED; } - if (s->async->cur_chan == 0) { + devpriv->act_chanlist_pos++; + if (devpriv->act_chanlist_pos >= devpriv->act_chanlist_len) { + devpriv->act_chanlist_pos = 0; + } + s->async->cur_chan++; + if (s->async->cur_chan >= devpriv->ai_n_chan) { /* printk("E"); */ + s->async->cur_chan = 0; devpriv->ai_act_scan--; } @@ -627,9 +633,13 @@ static irqreturn_t interrupt_pcl818_ai_mode13_dma(int irq, void *d) devpriv->act_chanlist_pos++; if (devpriv->act_chanlist_pos >= devpriv->act_chanlist_len) { - devpriv->ai_act_scan--; devpriv->act_chanlist_pos = 0; } + s->async->cur_chan++; + if (s->async->cur_chan >= devpriv->ai_n_chan) { + s->async->cur_chan = 0; + devpriv->ai_act_scan--; + } if (!devpriv->neverending_ai) if (devpriv->ai_act_scan == 0) { /* all data sampled */ @@ -717,7 +727,14 @@ static irqreturn_t interrupt_pcl818_ai_mode13_dma_rtc(int irq, void *d) comedi_buf_put(s->async, dmabuf[bufptr++] >> 4); /* get one sample */ bufptr &= (devpriv->dmasamplsize - 1); - if (s->async->cur_chan == 0) { + devpriv->act_chanlist_pos++; + if (devpriv->act_chanlist_pos >= + devpriv->act_chanlist_len) { + devpriv->act_chanlist_pos = 0; + } + s->async->cur_chan++; + if (s->async->cur_chan >= devpriv->ai_n_chan) { + s->async->cur_chan = 0; devpriv->ai_act_scan--; } @@ -796,7 +813,13 @@ static irqreturn_t interrupt_pcl818_ai_mode13_fifo(int irq, void *d) comedi_buf_put(s->async, (lo >> 4) | (inb(dev->iobase + PCL818_FI_DATAHI) << 4)); /* get one sample */ - if (s->async->cur_chan == 0) { + devpriv->act_chanlist_pos++; + if (devpriv->act_chanlist_pos >= devpriv->act_chanlist_len) { + devpriv->act_chanlist_pos = 0; + } + s->async->cur_chan++; + if (s->async->cur_chan >= devpriv->ai_n_chan) { + s->async->cur_chan = 0; devpriv->ai_act_scan--; } From 61283d227c6b39e30afc6346db099521b0b64fa1 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Wed, 20 Jan 2010 13:04:47 +0000 Subject: [PATCH 174/367] Staging: comedi: adv_pci1710: Correct AI scan count and channel checks For AI commands, the internal channel list used to check incoming data was only set up partially if the channel list contained repeats. Set it up fully. Also the current scan position was not updated properly when moving a block of data from the FIFO unless a whole number of scans was moved. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci1710.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c b/drivers/staging/comedi/drivers/adv_pci1710.c index 03c73a889048..82433864094f 100644 --- a/drivers/staging/comedi/drivers/adv_pci1710.c +++ b/drivers/staging/comedi/drivers/adv_pci1710.c @@ -724,6 +724,7 @@ static int move_block_from_fifo(struct comedi_device *dev, devpriv->ai_act_scan++; } } + s->async->cur_chan = j; DPRINTK("adv_pci1710 EDBG: END: move_block_from_fifo(...)\n"); return 0; } @@ -1230,6 +1231,12 @@ static void setup_channel_list(struct comedi_device *dev, DPRINTK("GS: %2d. [%4x]=%4x %4x\n", i, chanprog, range, devpriv->act_chanlist[i]); } +#ifdef PCI171x_PARANOIDCHECK + for ( ; i < n_chan; i++) { /* store remainder of channel list */ + devpriv->act_chanlist[i] = + (CR_CHAN(chanlist[i]) << 12) & 0xf000; + } +#endif devpriv->ai_et_MuxVal = CR_CHAN(chanlist[0]) | (CR_CHAN(chanlist[seglen - 1]) << 8); From 8f87b832dea11dd00f6a30aaaf934c5c93556cfe Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Wed, 20 Jan 2010 13:04:48 +0000 Subject: [PATCH 175/367] Staging: comedi: adv_pci1710: Remove unneeded chanlist_len check For AI command testing, the driver does not need to range-check the length of the channel list as the comedi core has already checked it. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci1710.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c b/drivers/staging/comedi/drivers/adv_pci1710.c index 82433864094f..394d2ea19c2e 100644 --- a/drivers/staging/comedi/drivers/adv_pci1710.c +++ b/drivers/staging/comedi/drivers/adv_pci1710.c @@ -1035,14 +1035,6 @@ static int pci171x_ai_cmdtest(struct comedi_device *dev, } } - if (!cmd->chanlist_len) { - cmd->chanlist_len = 1; - err++; - } - if (cmd->chanlist_len > this_board->n_aichan) { - cmd->chanlist_len = this_board->n_aichan; - err++; - } if (cmd->scan_end_arg != cmd->chanlist_len) { cmd->scan_end_arg = cmd->chanlist_len; err++; From c203b521e64e062d94f1ced1510206c0a55d5b55 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Wed, 20 Jan 2010 13:04:49 +0000 Subject: [PATCH 176/367] Staging: comedi: pcl812: Update MUX for multi-channel AI command For multi-channel AI commands, the interrupt handler is missing code to switch to the next channel. Add some (untested) code to handle this. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl812.c b/drivers/staging/comedi/drivers/pcl812.c index aa912735ddba..d4634c4f02dc 100644 --- a/drivers/staging/comedi/drivers/pcl812.c +++ b/drivers/staging/comedi/drivers/pcl812.c @@ -955,6 +955,7 @@ static irqreturn_t interrupt_pcl812_ai_int(int irq, void *d) unsigned int mask, timeout; struct comedi_device *dev = d; struct comedi_subdevice *s = dev->subdevices + 0; + unsigned int next_chan; s->async->events = 0; @@ -993,11 +994,18 @@ static irqreturn_t interrupt_pcl812_ai_int(int irq, void *d) ((inb(dev->iobase + PCL812_AD_HI) << 8) | inb(dev->iobase + PCL812_AD_LO)) & mask); + /* Set up next channel. Added by abbotti 2010-01-20, but untested. */ + next_chan = s->async->cur_chan + 1; + if (next_chan >= devpriv->ai_n_chan) + next_chan = 0; + if (devpriv->ai_chanlist[s->async->cur_chan] != + devpriv->ai_chanlist[next_chan]) + setup_range_channel(dev, s, devpriv->ai_chanlist[next_chan], 0); + outb(0, dev->iobase + PCL812_CLRINT); /* clear INT request */ - s->async->cur_chan++; - if (s->async->cur_chan >= devpriv->ai_n_chan) { /* one scan done */ - s->async->cur_chan = 0; + s->async->cur_chan = next_chan; + if (next_chan == 0) { /* one scan done */ devpriv->ai_act_scan++; if (!(devpriv->ai_neverending)) if (devpriv->ai_act_scan >= devpriv->ai_scans) { /* all data sampled */ From 64a1f7bd56e0f26bd4dd621805facffde9fbb0a3 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Wed, 20 Jan 2010 13:04:50 +0000 Subject: [PATCH 177/367] Staging: comedi: pcl816: Check channel list in AI command test Check the channel list is valid in step 5 of the AI command test. Split function check_and_setup_channel_list() in two. Also, remove unnecessary chanlist_len tests in step 3 of the AI command test as the comedi core has already checked it. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 55 ++++++++++++++++--------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/comedi/drivers/pcl816.c index 5c88ddc1fc05..9820759ec54f 100644 --- a/drivers/staging/comedi/drivers/pcl816.c +++ b/drivers/staging/comedi/drivers/pcl816.c @@ -214,9 +214,12 @@ struct pcl816_private { /* ============================================================================== */ -static int check_and_setup_channel_list(struct comedi_device *dev, - struct comedi_subdevice *s, - unsigned int *chanlist, int chanlen); +static int check_channel_list(struct comedi_device *dev, + struct comedi_subdevice *s, + unsigned int *chanlist, unsigned int chanlen); +static void setup_channel_list(struct comedi_device *dev, + struct comedi_subdevice *s, + unsigned int *chanlist, unsigned int seglen); static int pcl816_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s); static void start_pacer(struct comedi_device *dev, int mode, @@ -566,14 +569,6 @@ static int pcl816_ai_cmdtest(struct comedi_device *dev, } } - if (!cmd->chanlist_len) { - cmd->chanlist_len = 1; - err++; - } - if (cmd->chanlist_len > this_board->n_aichan) { - cmd->chanlist_len = this_board->n_aichan; - err++; - } if (cmd->scan_end_arg != cmd->chanlist_len) { cmd->scan_end_arg = cmd->chanlist_len; err++; @@ -611,6 +606,14 @@ static int pcl816_ai_cmdtest(struct comedi_device *dev, return 4; } + /* step 5: complain about special chanlist considerations */ + + if (cmd->chanlist) { + if (!check_channel_list(dev, s, cmd->chanlist, + cmd->chanlist_len)) + return 5; /* incorrect channels list */ + } + return 0; } @@ -618,6 +621,7 @@ static int pcl816_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) { unsigned int divisor1 = 0, divisor2 = 0, dma_flags, bytes, dmairq; struct comedi_cmd *cmd = &s->async->cmd; + unsigned int seglen; if (cmd->start_src != TRIG_NOW) return -EINVAL; @@ -650,9 +654,10 @@ static int pcl816_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) start_pacer(dev, -1, 0, 0); /* stop pacer */ - if (!check_and_setup_channel_list(dev, s, cmd->chanlist, - cmd->chanlist_len)) + seglen = check_channel_list(dev, s, cmd->chanlist, cmd->chanlist_len); + if (seglen < 1) return -EINVAL; + setup_channel_list(dev, s, cmd->chanlist, seglen); udelay(1); devpriv->ai_n_chan = cmd->chanlist_len; @@ -880,12 +885,12 @@ start_pacer(struct comedi_device *dev, int mode, unsigned int divisor1, /* ============================================================================== Check if channel list from user is builded correctly - If it's ok, then program scan/gain logic + If it's ok, then return non-zero length of repeated segment of channel list */ static int -check_and_setup_channel_list(struct comedi_device *dev, - struct comedi_subdevice *s, unsigned int *chanlist, - int chanlen) +check_channel_list(struct comedi_device *dev, + struct comedi_subdevice *s, unsigned int *chanlist, + unsigned int chanlen) { unsigned int chansegment[16]; unsigned int i, nowmustbechan, seglen, segpos; @@ -939,6 +944,20 @@ check_and_setup_channel_list(struct comedi_device *dev, seglen = 1; } + return seglen; /* we can serve this with MUX logic */ +} + +/* +============================================================================== + Program scan/gain logic with channel list. +*/ +static void +setup_channel_list(struct comedi_device *dev, + struct comedi_subdevice *s, unsigned int *chanlist, + unsigned int seglen) +{ + unsigned int i; + devpriv->ai_act_chanlist_len = seglen; devpriv->ai_act_chanlist_pos = 0; @@ -951,8 +970,6 @@ check_and_setup_channel_list(struct comedi_device *dev, udelay(1); outb(devpriv->ai_act_chanlist[0] | (devpriv->ai_act_chanlist[seglen - 1] << 4), dev->iobase + PCL816_MUX); /* select channel interval to scan */ - - return 1; /* we can serve this with MUX logic */ } #ifdef unused From 57ac827c9b17f2cc2f0f86c4fd43c3597c40253c Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Wed, 20 Jan 2010 13:04:51 +0000 Subject: [PATCH 178/367] Staging: comedi: pcl818: Remove unneeded chanlist_len check For AI command testing, the driver does not need to range-check the length of the channel list as the comedi core has already checked it. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/comedi/drivers/pcl818.c index 40ac293ad89d..c9d75385755d 100644 --- a/drivers/staging/comedi/drivers/pcl818.c +++ b/drivers/staging/comedi/drivers/pcl818.c @@ -1392,14 +1392,6 @@ static int ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s, } } - if (!cmd->chanlist_len) { - cmd->chanlist_len = 1; - err++; - } - if (cmd->chanlist_len > s->n_chan) { - cmd->chanlist_len = s->n_chan; - err++; - } if (cmd->scan_end_arg != cmd->chanlist_len) { cmd->scan_end_arg = cmd->chanlist_len; err++; From a2c3fdb996a926a45622428405a042f011eb03ba Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Sun, 17 Jan 2010 16:44:37 +0100 Subject: [PATCH 179/367] Staging: rt2860/sta_ioctl.c: Two branches the same in rt_ioctl_giwscan() Regardless of the condition, the branches execute the same code Signed-off-by: Roel Kluin Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rt2860/sta_ioctl.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/rt2860/sta_ioctl.c b/drivers/staging/rt2860/sta_ioctl.c index d8fbe6cc6941..de4b6277baee 100644 --- a/drivers/staging/rt2860/sta_ioctl.c +++ b/drivers/staging/rt2860/sta_ioctl.c @@ -975,10 +975,7 @@ int rt_ioctl_giwscan(struct net_device *dev, /*================================ */ memset(&iwe, 0, sizeof(iwe)); iwe.cmd = SIOCGIWFREQ; - if (INFRA_ON(pAdapter) || ADHOC_ON(pAdapter)) - iwe.u.freq.m = pAdapter->ScanTab.BssEntry[i].Channel; - else - iwe.u.freq.m = pAdapter->ScanTab.BssEntry[i].Channel; + iwe.u.freq.m = pAdapter->ScanTab.BssEntry[i].Channel; iwe.u.freq.e = 0; iwe.u.freq.i = 0; From 35f077dca73132dcac2cac1706417229a68f38c3 Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Sun, 17 Jan 2010 16:50:10 +0100 Subject: [PATCH 180/367] Staging: serqt_usb2: Two branches the same in qt_set_termios() Regardless of the condition, the branches executed the same code Signed-off-by: Roel Kluin Signed-off-by: Greg Kroah-Hartman --- drivers/staging/serqt_usb2/serqt_usb2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/serqt_usb2/serqt_usb2.c b/drivers/staging/serqt_usb2/serqt_usb2.c index 375a50580a28..44f2d4eaf84b 100644 --- a/drivers/staging/serqt_usb2/serqt_usb2.c +++ b/drivers/staging/serqt_usb2/serqt_usb2.c @@ -1277,7 +1277,7 @@ static void qt_set_termios(struct tty_struct *tty, if (cflag & CSTOPB) new_LCR |= SERIAL_TWO_STOPB; else - new_LCR |= SERIAL_TWO_STOPB; + new_LCR |= SERIAL_ONE_STOPB; dbg("%s - 4\n", __func__); From 8838d2560a8ccbc5e03688d55bf075793b36a04e Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 18 Jan 2010 02:50:24 +0000 Subject: [PATCH 181/367] Staging: rt2870sta: constify RTUSBMultiWrite(), RTUSBFirmwareWrite() These functions do not modify the data they are passed. Signed-off-by: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rt2860/rtmp.h | 6 +++--- drivers/staging/rt2870/common/rtusb_io.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rt2860/rtmp.h b/drivers/staging/rt2860/rtmp.h index c50abf4b8068..6c6503d2438f 100644 --- a/drivers/staging/rt2860/rtmp.h +++ b/drivers/staging/rt2860/rtmp.h @@ -4043,10 +4043,10 @@ int RTUSBMultiRead(struct rt_rtmp_adapter *pAd, u16 Offset, u8 *pData, u16 length); int RTUSBMultiWrite(struct rt_rtmp_adapter *pAd, - u16 Offset, u8 *pData, u16 length); + u16 Offset, const u8 *pData, u16 length); int RTUSBMultiWrite_OneByte(struct rt_rtmp_adapter *pAd, - u16 Offset, u8 *pData); + u16 Offset, const u8 *pData); int RTUSBReadBBPRegister(struct rt_rtmp_adapter *pAd, u8 Id, u8 *pValue); @@ -4112,7 +4112,7 @@ int RTUSBSingleWrite(struct rt_rtmp_adapter *pAd, u16 Offset, u16 Value); int RTUSBFirmwareWrite(struct rt_rtmp_adapter *pAd, - u8 *pFwImage, unsigned long FwLen); + const u8 *pFwImage, unsigned long FwLen); int RTUSBVenderReset(struct rt_rtmp_adapter *pAd); diff --git a/drivers/staging/rt2870/common/rtusb_io.c b/drivers/staging/rt2870/common/rtusb_io.c index 34443f2243f1..cf0d2f5dbc6c 100644 --- a/drivers/staging/rt2870/common/rtusb_io.c +++ b/drivers/staging/rt2870/common/rtusb_io.c @@ -84,7 +84,7 @@ static int RTUSBFirmwareRun(struct rt_rtmp_adapter *pAd) ======================================================================== */ int RTUSBFirmwareWrite(struct rt_rtmp_adapter *pAd, - u8 *pFwImage, unsigned long FwLen) + const u8 *pFwImage, unsigned long FwLen) { u32 MacReg; int Status; @@ -167,7 +167,7 @@ int RTUSBMultiRead(struct rt_rtmp_adapter *pAd, ======================================================================== */ int RTUSBMultiWrite_OneByte(struct rt_rtmp_adapter *pAd, - u16 Offset, u8 *pData) + u16 Offset, const u8 *pData) { int Status; @@ -175,18 +175,18 @@ int RTUSBMultiWrite_OneByte(struct rt_rtmp_adapter *pAd, Status = RTUSB_VendorRequest(pAd, USBD_TRANSFER_DIRECTION_OUT, DEVICE_VENDOR_REQUEST_OUT, - 0x6, 0, Offset, pData, 1); + 0x6, 0, Offset, (u8 *)pData, 1); return Status; } int RTUSBMultiWrite(struct rt_rtmp_adapter *pAd, - u16 Offset, u8 *pData, u16 length) + u16 Offset, const u8 *pData, u16 length) { int Status; u16 index = 0, Value; - u8 *pSrc = pData; + const u8 *pSrc = pData; u16 resude = 0; resude = length % 2; From c22202faade08b6b45f14fd86bfb57f79d73464c Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 18 Jan 2010 03:25:56 +0000 Subject: [PATCH 182/367] Staging: rt{2860,2870}sta: Use request_firmware() to load firmware When originally introduced into staging, these drivers had custom firmware-loading code which checked a version number and CRC at the end of each blob. This reintroduces those checks, using crc-ccitt instead of custom code. The removed firmware will be added to the linux-firmware.git repository. Based on work by Darren Salt . Signed-off-by: Ben Hutchings Tested-By: Darren Salt Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rt2860/Kconfig | 2 + drivers/staging/rt2860/common/firmware.h | 558 ------------------ drivers/staging/rt2860/common/firmware_3070.h | 517 ---------------- drivers/staging/rt2860/common/rtmp_mcu.c | 165 ++++-- drivers/staging/rt2860/rt_linux.c | 3 + drivers/staging/rt2860/rtmp.h | 1 + drivers/staging/rt2870/Kconfig | 2 + drivers/staging/rt3070/firmware.h | 558 ------------------ drivers/staging/rt3090/firmware.h | 517 ---------------- 9 files changed, 113 insertions(+), 2210 deletions(-) delete mode 100644 drivers/staging/rt2860/common/firmware.h delete mode 100644 drivers/staging/rt2860/common/firmware_3070.h delete mode 100644 drivers/staging/rt3070/firmware.h delete mode 100644 drivers/staging/rt3090/firmware.h diff --git a/drivers/staging/rt2860/Kconfig b/drivers/staging/rt2860/Kconfig index f9962b693128..f3a7e47df5e9 100644 --- a/drivers/staging/rt2860/Kconfig +++ b/drivers/staging/rt2860/Kconfig @@ -3,6 +3,8 @@ config RT2860 depends on PCI && X86 && WLAN select WIRELESS_EXT select WEXT_PRIV + select CRC_CCITT + select FW_LOADER ---help--- This is an experimental driver for the Ralink 2860 and 3090 wireless chips. diff --git a/drivers/staging/rt2860/common/firmware.h b/drivers/staging/rt2860/common/firmware.h deleted file mode 100644 index 2fecd32f7600..000000000000 --- a/drivers/staging/rt2860/common/firmware.h +++ /dev/null @@ -1,558 +0,0 @@ -/* - Copyright (c) 2007, Ralink Technology Corporation - All rights reserved. - - Redistribution. Redistribution and use in binary form, without - modification, are permitted provided that the following conditions are - met: - - * Redistributions must reproduce the above copyright notice and the - following disclaimer in the documentation and/or other materials - provided with the distribution. - * Neither the name of Ralink Technology Corporation nor the names of its - suppliers may be used to endorse or promote products derived from this - software without specific prior written permission. - * No reverse engineering, decompilation, or disassembly of this software - is permitted. - - Limited patent license. Ralink Technology Corporation grants a world-wide, - royalty-free, non-exclusive license under patents it now or hereafter - owns or controls to make, have made, use, import, offer to sell and - sell ("Utilize") this software, but solely to the extent that any - such patent is necessary to Utilize the software alone, or in - combination with an operating system licensed under an approved Open - Source license as listed by the Open Source Initiative at - http://opensource.org/licenses. The patent license shall not apply to - any other combinations which include this software. No hardware per - se is licensed hereunder. - - DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, - BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE - USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - DAMAGE. -*/ -/* AUTO GEN PLEASE DO NOT MODIFY IT */ -/* AUTO GEN PLEASE DO NOT MODIFY IT */ - - -u8 FirmwareImage_2860 [] = { -0x02, 0x03, 0x5e, 0x02, 0x02, 0xb1, 0x22, 0x22, 0xff, 0xff, 0xff, 0x02, 0x01, 0x82, 0xff, 0xff, -0xff, 0xff, 0xff, 0x02, 0x00, 0x1e, 0xff, 0xff, 0xff, 0xff, 0xff, 0x02, 0x01, 0x33, 0xc0, 0xe0, -0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x18, 0xc2, 0xaf, 0x30, 0x45, 0x03, -0x12, 0x10, 0x09, 0x90, 0x04, 0x16, 0xe0, 0x30, 0xe3, 0x03, 0x74, 0x08, 0xf0, 0x90, 0x04, 0x14, -0xe0, 0x20, 0xe7, 0x03, 0x02, 0x00, 0xcb, 0x74, 0x80, 0xf0, 0x90, 0x70, 0x12, 0xe0, 0xf5, 0x2f, -0x90, 0x04, 0x04, 0xe0, 0x24, 0xcf, 0x60, 0x30, 0x14, 0x60, 0x42, 0x24, 0xe2, 0x60, 0x47, 0x14, -0x60, 0x55, 0x24, 0x21, 0x70, 0x60, 0xe5, 0x55, 0x24, 0xfe, 0x60, 0x07, 0x14, 0x60, 0x08, 0x24, -0x02, 0x70, 0x08, 0x7d, 0x01, 0x80, 0x28, 0x7d, 0x02, 0x80, 0x24, 0x90, 0x70, 0x10, 0xe0, 0xf5, -0x50, 0x85, 0x2f, 0x40, 0xd2, 0x01, 0x80, 0x3e, 0xe5, 0x55, 0x64, 0x03, 0x60, 0x04, 0xe5, 0x55, -0x70, 0x04, 0x7d, 0x02, 0x80, 0x09, 0x85, 0x2f, 0x41, 0xd2, 0x02, 0x80, 0x29, 0xad, 0x55, 0xaf, -0x2f, 0x12, 0x02, 0x8d, 0x80, 0x20, 0x90, 0x70, 0x10, 0xe0, 0xf5, 0x47, 0x90, 0x70, 0x11, 0xe0, -0xf5, 0x44, 0x12, 0x10, 0x25, 0x80, 0x06, 0x90, 0x70, 0x10, 0xe0, 0xf5, 0x45, 0xe4, 0xfd, 0xaf, -0x2f, 0x12, 0x02, 0x8d, 0xd2, 0x04, 0x90, 0x70, 0x13, 0xe4, 0xf0, 0xd2, 0xaf, 0xd0, 0xd0, 0xd0, -0x82, 0xd0, 0x83, 0xd0, 0xf0, 0xd0, 0xe0, 0x32, 0x90, 0x70, 0x2a, 0xe0, 0x30, 0xe1, 0x53, 0xc2, -0xaf, 0x90, 0x70, 0x28, 0xe0, 0x90, 0x10, 0x1c, 0xf0, 0x90, 0x70, 0x29, 0xe0, 0x90, 0x10, 0x1d, -0xf0, 0x90, 0x70, 0x2a, 0xe0, 0x90, 0x10, 0x1e, 0xf0, 0x90, 0x10, 0x1c, 0xe0, 0xf5, 0x30, 0x90, -0x10, 0x1e, 0xe0, 0x20, 0xe1, 0xf3, 0x90, 0x10, 0x1c, 0xe0, 0x90, 0x70, 0x28, 0xf0, 0x90, 0x10, -0x1d, 0xe0, 0x90, 0x70, 0x29, 0xf0, 0x90, 0x10, 0x1e, 0xe0, 0x90, 0x70, 0x2a, 0xf0, 0x30, 0x4a, -0x0d, 0x90, 0x70, 0x24, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x02, 0x2c, 0x74, 0xff, 0xf0, 0xc2, 0x05, -0xd2, 0xaf, 0x22, 0xc0, 0xe0, 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0xe8, 0xc0, 0xe0, -0xe9, 0xc0, 0xe0, 0xea, 0xc0, 0xe0, 0xeb, 0xc0, 0xe0, 0xec, 0xc0, 0xe0, 0xed, 0xc0, 0xe0, 0xee, -0xc0, 0xe0, 0xef, 0xc0, 0xe0, 0xc2, 0xaf, 0x30, 0x45, 0x03, 0x12, 0x10, 0x12, 0xd2, 0xaf, 0xd0, -0xe0, 0xff, 0xd0, 0xe0, 0xfe, 0xd0, 0xe0, 0xfd, 0xd0, 0xe0, 0xfc, 0xd0, 0xe0, 0xfb, 0xd0, 0xe0, -0xfa, 0xd0, 0xe0, 0xf9, 0xd0, 0xe0, 0xf8, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xf0, 0xd0, -0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x10, 0xc2, -0xaf, 0x30, 0x45, 0x03, 0x12, 0x10, 0x0c, 0x30, 0x58, 0x0a, 0xe5, 0x54, 0x60, 0x04, 0x15, 0x54, -0x80, 0x02, 0xc2, 0x58, 0x30, 0x59, 0x0a, 0xe5, 0x50, 0x60, 0x04, 0x15, 0x50, 0x80, 0x02, 0xc2, -0x59, 0xd5, 0x53, 0x07, 0x30, 0x60, 0x04, 0x15, 0x46, 0xd2, 0x04, 0x30, 0x45, 0x03, 0x12, 0x10, -0x0f, 0xc2, 0x8d, 0xd2, 0xaf, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xf0, 0xd0, 0xe0, 0x32, -0x12, 0x02, 0xd3, 0x30, 0x45, 0x03, 0x12, 0x10, 0x03, 0x30, 0x01, 0x06, 0x20, 0x09, 0x03, 0x12, -0x10, 0x1c, 0x30, 0x02, 0x06, 0x20, 0x0a, 0x03, 0x12, 0x10, 0x1f, 0x30, 0x03, 0x06, 0x20, 0x0b, -0x03, 0x12, 0x10, 0x1f, 0x30, 0x04, 0x06, 0x20, 0x0c, 0x03, 0x12, 0x10, 0x22, 0x20, 0x13, 0x09, -0x20, 0x11, 0x06, 0xe5, 0x2b, 0x45, 0x2c, 0x60, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, 0xa9, 0x12, -0x02, 0xec, 0x80, 0xbf, 0xc2, 0x43, 0xd2, 0x45, 0xe4, 0xf5, 0x20, 0xf5, 0x21, 0xf5, 0x53, 0xf5, -0x46, 0xf5, 0x2b, 0xf5, 0x2c, 0xc2, 0x42, 0xf5, 0x51, 0xf5, 0x52, 0xf5, 0x55, 0x90, 0x04, 0x18, -0x74, 0x80, 0xf0, 0x90, 0x04, 0x1a, 0x74, 0x08, 0xf0, 0xc2, 0x19, 0xc2, 0x18, 0xc2, 0x1a, 0x22, -0xc8, 0xef, 0xc8, 0xe6, 0xfa, 0x08, 0xe6, 0x4a, 0x60, 0x0c, 0xc8, 0xef, 0xc8, 0x08, 0xe6, 0x16, -0x18, 0x70, 0x01, 0x16, 0xc3, 0x22, 0xed, 0x24, 0xff, 0xfd, 0xec, 0x34, 0xff, 0xc8, 0xef, 0xc8, -0xf6, 0x08, 0xc6, 0xed, 0xc6, 0xd3, 0x22, 0xd0, 0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, -0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, -0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80, 0xdf, 0xef, 0xf4, 0x60, -0x1f, 0xe4, 0xfe, 0x12, 0x03, 0x6a, 0xe0, 0xb4, 0xff, 0x12, 0x12, 0x03, 0x6a, 0xef, 0xf0, 0x74, -0x1c, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xed, 0xf0, 0x22, 0x0e, 0xbe, 0x04, 0xe3, -0x22, 0xc0, 0xe0, 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x08, 0xc2, 0xaf, -0x30, 0x45, 0x03, 0x12, 0x10, 0x06, 0xd2, 0xaf, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xf0, -0xd0, 0xe0, 0x32, 0xc2, 0xaf, 0x12, 0x00, 0x06, 0x12, 0x02, 0x14, 0x12, 0x03, 0x1c, 0xe4, 0xf5, -0x22, 0xf5, 0x47, 0x90, 0x04, 0x00, 0x74, 0x80, 0xf0, 0xd2, 0xaf, 0x22, 0x30, 0x45, 0x03, 0x12, -0x10, 0x15, 0xe5, 0x20, 0x70, 0x03, 0x20, 0x10, 0x03, 0x30, 0x11, 0x03, 0x43, 0x87, 0x01, 0x22, -0xc0, 0x2a, 0x74, 0x03, 0xc0, 0xe0, 0xc0, 0x82, 0xc0, 0x83, 0x75, 0x2a, 0x0a, 0x22, 0xc0, 0x2a, -0x74, 0x03, 0xc0, 0xe0, 0xc0, 0x82, 0xc0, 0x83, 0x75, 0x2a, 0x18, 0x22, 0x75, 0x89, 0x02, 0xe4, -0xf5, 0x8c, 0xf5, 0x8a, 0xf5, 0x88, 0xf5, 0xb8, 0xf5, 0xe8, 0x75, 0x90, 0x18, 0xd2, 0x8c, 0x75, -0xa8, 0x05, 0x22, 0xce, 0xef, 0xce, 0xee, 0x60, 0x08, 0x7f, 0xff, 0x12, 0x03, 0x80, 0x1e, 0x80, -0xf5, 0x22, 0xc8, 0xef, 0xc8, 0xe6, 0x60, 0x03, 0x16, 0xc3, 0x22, 0xed, 0x14, 0xf6, 0xd3, 0x22, -0xc8, 0xef, 0xc8, 0xe6, 0x60, 0x06, 0x16, 0xe6, 0x24, 0xff, 0xb3, 0x22, 0xc3, 0x22, 0x78, 0x7f, -0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x5f, 0x02, 0x01, 0xd0, 0x74, 0x14, 0x2e, 0xf5, 0x82, 0xe4, -0x34, 0x70, 0xf5, 0x83, 0x22, 0xef, 0x90, 0x03, 0x7e, 0x93, 0x90, 0x03, 0x00, 0x73, 0x0a, 0x18, -0xef, 0x60, 0x03, 0x1f, 0x80, 0xfa, 0x22, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0x02, 0x10, 0x28, 0x02, 0x10, 0x3b, 0x02, 0x10, 0x3c, 0x02, 0x12, 0xb8, 0x02, -0x12, 0xb9, 0x02, 0x13, 0x3e, 0x02, 0x13, 0x3f, 0xc3, 0x22, 0xff, 0xff, 0x02, 0x16, 0x56, 0x02, -0x17, 0x6b, 0x02, 0x14, 0x2a, 0x02, 0x13, 0x40, 0x30, 0x05, 0x06, 0x20, 0x0d, 0x03, 0x12, 0x00, -0xd8, 0x30, 0x06, 0x06, 0x20, 0x0e, 0x03, 0x12, 0x18, 0x5e, 0x22, 0x22, 0x90, 0x04, 0x14, 0xe0, -0x20, 0xe7, 0x03, 0x02, 0x12, 0xb7, 0x90, 0x70, 0x12, 0xe0, 0xf5, 0x56, 0x90, 0x04, 0x04, 0xe0, -0x12, 0x02, 0x67, 0x11, 0x4e, 0x30, 0x11, 0x25, 0x31, 0x10, 0x87, 0x33, 0x10, 0xaa, 0x34, 0x10, -0xc3, 0x35, 0x11, 0x57, 0x50, 0x11, 0x7b, 0x51, 0x11, 0x84, 0x52, 0x11, 0x84, 0x53, 0x11, 0x84, -0x54, 0x11, 0xc5, 0x55, 0x11, 0xdc, 0x70, 0x12, 0x07, 0x71, 0x12, 0x34, 0x72, 0x12, 0x5e, 0x80, -0x12, 0x81, 0x83, 0x00, 0x00, 0x12, 0xb7, 0x75, 0x24, 0x05, 0x75, 0x25, 0xdc, 0x90, 0x70, 0x9f, -0x74, 0x12, 0xf0, 0xd2, 0x18, 0xd2, 0x61, 0x75, 0x35, 0x0d, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, -0x56, 0xf4, 0x70, 0x03, 0x02, 0x12, 0xb7, 0x02, 0x12, 0xaa, 0xc2, 0x18, 0x90, 0x01, 0x14, 0xe0, -0x54, 0xfd, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x70, 0x03, 0x02, 0x12, 0xb7, -0x02, 0x12, 0xaa, 0xe5, 0x55, 0x64, 0x02, 0x70, 0x37, 0x90, 0x70, 0x10, 0xe0, 0x60, 0x08, 0x90, -0x01, 0x0d, 0x74, 0x09, 0xf0, 0x80, 0x25, 0xe5, 0x34, 0x14, 0x60, 0x0a, 0x14, 0x60, 0x0f, 0x14, -0x60, 0x14, 0x24, 0x03, 0x70, 0x16, 0x90, 0x01, 0x0d, 0x74, 0x08, 0xf0, 0x80, 0x0e, 0x90, 0x01, -0x0d, 0x74, 0x0b, 0xf0, 0x80, 0x06, 0x90, 0x01, 0x0d, 0x74, 0x1b, 0xf0, 0x7d, 0x01, 0x80, 0x02, -0x7d, 0x02, 0xaf, 0x56, 0x12, 0x02, 0x8d, 0x90, 0x70, 0x11, 0xe0, 0x24, 0xff, 0x92, 0x1b, 0x90, -0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x70, 0x03, 0x02, -0x12, 0xb7, 0x02, 0x12, 0xaa, 0x20, 0x02, 0x03, 0x30, 0x03, 0x1d, 0x7d, 0x02, 0xaf, 0x56, 0x12, -0x02, 0x8d, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, -0x70, 0x03, 0x02, 0x12, 0xb7, 0x02, 0x12, 0xaa, 0x85, 0x56, 0x41, 0xd2, 0x02, 0x22, 0x90, 0x70, -0x11, 0xe0, 0x24, 0xff, 0x92, 0x1b, 0x22, 0x90, 0x70, 0x10, 0xe0, 0x54, 0x7f, 0x64, 0x02, 0x60, -0x03, 0x02, 0x12, 0xb7, 0x90, 0x70, 0x11, 0xe0, 0x64, 0x08, 0x60, 0x08, 0xe0, 0x64, 0x20, 0x60, -0x03, 0x02, 0x12, 0xb7, 0x75, 0x4e, 0x03, 0x75, 0x4f, 0x20, 0x22, 0x90, 0x70, 0x11, 0xe0, 0x24, -0xff, 0x92, 0x47, 0x22, 0x90, 0x04, 0x04, 0xe0, 0x25, 0xe0, 0x24, 0x5d, 0xf5, 0x57, 0x90, 0x70, -0x10, 0xe0, 0xff, 0x74, 0x47, 0x25, 0x57, 0xf8, 0xc6, 0xef, 0xc6, 0x90, 0x70, 0x11, 0xe0, 0xff, -0x74, 0x48, 0x25, 0x57, 0xf8, 0xc6, 0xef, 0xc6, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x02, 0x8d, 0x90, -0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x70, 0x03, 0x02, -0x12, 0xb7, 0x02, 0x12, 0xaa, 0xe5, 0x47, 0xb4, 0x07, 0x08, 0x90, 0x70, 0x11, 0xe0, 0x54, 0x07, -0xf5, 0x26, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x02, 0x8d, 0xd2, 0x04, 0x22, 0x90, 0x70, 0x10, 0xe0, -0xfe, 0x90, 0x70, 0x11, 0xe0, 0xfd, 0xed, 0xf8, 0xe6, 0xf5, 0x57, 0xfd, 0xaf, 0x56, 0x12, 0x02, -0x8d, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x70, -0x03, 0x02, 0x12, 0xb7, 0x02, 0x12, 0xaa, 0x90, 0x70, 0x10, 0xe0, 0xfe, 0x90, 0x70, 0x11, 0xe0, -0xfd, 0xed, 0xf5, 0x82, 0x8e, 0x83, 0xe0, 0xf5, 0x57, 0xfd, 0xaf, 0x56, 0x12, 0x02, 0x8d, 0x90, -0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x70, 0x03, 0x02, -0x12, 0xb7, 0x80, 0x76, 0xe4, 0xf5, 0x4e, 0xf5, 0x4f, 0x75, 0x26, 0xff, 0xc2, 0x19, 0xc2, 0x18, -0xc2, 0x1a, 0x75, 0x34, 0xff, 0xad, 0x57, 0xaf, 0x56, 0x12, 0x02, 0x8d, 0x90, 0x04, 0x14, 0x74, -0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x60, 0x5b, 0x80, 0x4c, 0x90, 0x70, -0x10, 0xe0, 0x24, 0xff, 0x92, 0x4a, 0xd2, 0x05, 0xad, 0x57, 0xaf, 0x56, 0x12, 0x02, 0x8d, 0x90, -0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x60, 0x38, 0x80, -0x29, 0x90, 0x70, 0x10, 0xe0, 0xf5, 0x34, 0xd3, 0x94, 0x00, 0x40, 0x07, 0x90, 0x01, 0x0d, 0xe0, -0x54, 0xfb, 0xf0, 0xad, 0x57, 0xaf, 0x56, 0x12, 0x02, 0x8d, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, -0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x60, 0x0d, 0x90, 0x70, 0x25, 0xe0, 0x44, 0x01, -0xf0, 0x90, 0x02, 0x2c, 0x74, 0xff, 0xf0, 0x22, 0x22, 0xe5, 0x53, 0x60, 0x03, 0x02, 0x13, 0x3d, -0xe5, 0x4f, 0x45, 0x4e, 0x60, 0x08, 0xe5, 0x4f, 0x15, 0x4f, 0x70, 0x02, 0x15, 0x4e, 0xa2, 0x19, -0xe4, 0x33, 0x90, 0x70, 0x90, 0xf0, 0xa2, 0x18, 0xe4, 0x33, 0xa3, 0xf0, 0x30, 0x19, 0x4d, 0x90, -0x70, 0x98, 0x74, 0x23, 0xf0, 0xa3, 0xe5, 0x25, 0xf0, 0xe5, 0x24, 0xa3, 0xf0, 0x7f, 0x35, 0x7d, -0x32, 0x12, 0x03, 0x42, 0x50, 0x09, 0x90, 0x10, 0x04, 0xe0, 0x54, 0xf7, 0xf0, 0xd2, 0x06, 0xe5, -0x35, 0xd3, 0x94, 0x10, 0x40, 0x1e, 0x30, 0x1a, 0x1b, 0xc2, 0x1a, 0xa2, 0x18, 0x92, 0x19, 0x20, -0x19, 0x12, 0x90, 0x04, 0x09, 0xe0, 0x54, 0xdd, 0xf0, 0x90, 0x10, 0x04, 0xe0, 0x44, 0x08, 0xf0, -0xc2, 0x61, 0xd2, 0x03, 0xe5, 0x35, 0xb4, 0x0b, 0x14, 0xd2, 0x03, 0x22, 0xe4, 0xf5, 0x35, 0xa2, -0x18, 0x92, 0x19, 0x30, 0x19, 0x07, 0x90, 0x04, 0x09, 0xe0, 0x44, 0x22, 0xf0, 0x22, 0x22, 0x22, -0xc2, 0x4b, 0xc2, 0x4c, 0xe5, 0x44, 0x12, 0x02, 0x67, 0x13, 0x62, 0x00, 0x13, 0xf5, 0x04, 0x13, -0xf1, 0x08, 0x13, 0xcc, 0x10, 0x13, 0x76, 0x20, 0x13, 0x96, 0x60, 0x13, 0xa7, 0xa0, 0x00, 0x00, -0x13, 0xf7, 0x85, 0x48, 0x43, 0x85, 0x4a, 0x42, 0x85, 0x4c, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x60, -0x03, 0x02, 0x13, 0xf7, 0x80, 0x1b, 0xe5, 0x48, 0xc4, 0x54, 0x0f, 0xf5, 0x43, 0xe5, 0x4a, 0xc4, -0x54, 0x0f, 0xf5, 0x42, 0xe5, 0x4c, 0xc4, 0x54, 0x0f, 0xf5, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x70, -0x66, 0x53, 0x43, 0x0f, 0x80, 0x61, 0x85, 0x49, 0x43, 0x85, 0x4b, 0x42, 0x85, 0x4d, 0x5e, 0xe5, -0x47, 0x64, 0x06, 0x70, 0x52, 0x80, 0x1b, 0xe5, 0x49, 0xc4, 0x54, 0x0f, 0xf5, 0x43, 0xe5, 0x4b, -0xc4, 0x54, 0x0f, 0xf5, 0x42, 0xe5, 0x4d, 0xc4, 0x54, 0x0f, 0xf5, 0x5e, 0xe5, 0x47, 0x64, 0x06, -0x70, 0x35, 0xe5, 0x43, 0x54, 0x0f, 0x44, 0x10, 0xf5, 0x43, 0x80, 0x2b, 0xe5, 0x47, 0xb4, 0x04, -0x06, 0x53, 0x5e, 0xfb, 0x75, 0x42, 0x09, 0xe5, 0x47, 0xb4, 0x05, 0x06, 0x43, 0x5e, 0x04, 0x75, -0x42, 0x09, 0xe5, 0x47, 0xb4, 0x06, 0x10, 0xe5, 0x43, 0x54, 0x0f, 0x44, 0x30, 0xf5, 0x43, 0x80, -0x06, 0xd2, 0x4b, 0x80, 0x02, 0xd2, 0x4c, 0xe4, 0xf5, 0x38, 0xe5, 0x42, 0xc4, 0x54, 0xf0, 0xff, -0xe5, 0x43, 0x54, 0x0f, 0x4f, 0xf5, 0x5f, 0x90, 0x70, 0x44, 0xf0, 0xa3, 0xe5, 0x5e, 0xf0, 0xa3, -0xe5, 0x4a, 0xf0, 0xa3, 0xe5, 0x48, 0xf0, 0xa3, 0xe5, 0x4c, 0xf0, 0xa3, 0xe5, 0x44, 0xf0, 0xa3, -0xe5, 0x42, 0xf0, 0xa3, 0xe5, 0x43, 0xf0, 0xd2, 0x60, 0x22, 0xe5, 0x47, 0x60, 0x10, 0x24, 0xc0, -0x70, 0x03, 0x12, 0x16, 0x36, 0x12, 0x14, 0x3f, 0xc2, 0xaf, 0xc2, 0x04, 0xd2, 0xaf, 0x22, 0xc2, -0xaf, 0x90, 0x04, 0x14, 0xe0, 0x54, 0x0e, 0x60, 0x04, 0xd2, 0x1c, 0x80, 0x08, 0xe5, 0x4e, 0x45, -0x4f, 0x24, 0xff, 0x92, 0x1c, 0xd2, 0xaf, 0x90, 0x04, 0x14, 0xe0, 0xa2, 0xe4, 0x92, 0x1d, 0x74, -0x1e, 0xf0, 0xe5, 0x5f, 0x54, 0x0f, 0xf5, 0x2d, 0xe5, 0x38, 0x70, 0x13, 0x30, 0x1c, 0x05, 0xe5, -0x5f, 0x20, 0xe5, 0x0b, 0x30, 0x1d, 0x19, 0xe5, 0x5f, 0x54, 0x30, 0xff, 0xbf, 0x30, 0x11, 0xe5, -0x38, 0x70, 0x05, 0x75, 0x38, 0x0c, 0x80, 0x02, 0x15, 0x38, 0xd2, 0x6c, 0xd2, 0x6d, 0x80, 0x0f, -0xe5, 0x5f, 0x30, 0xe6, 0x06, 0xc2, 0x6c, 0xd2, 0x6d, 0x80, 0x04, 0xd2, 0x6c, 0xc2, 0x6d, 0xe5, -0x47, 0x64, 0x03, 0x70, 0x21, 0x30, 0x4b, 0x06, 0xc2, 0x6c, 0xd2, 0x6d, 0x80, 0x18, 0xe5, 0x38, -0x70, 0x03, 0x30, 0x4c, 0x11, 0xc2, 0x4c, 0xe5, 0x38, 0x70, 0x05, 0x75, 0x38, 0x07, 0x80, 0x02, -0x15, 0x38, 0xd2, 0x6c, 0xd2, 0x6d, 0x90, 0x70, 0x46, 0xe5, 0x2d, 0xf0, 0x20, 0x69, 0x07, 0xe5, -0x5e, 0x20, 0xe0, 0x02, 0xb2, 0x68, 0x20, 0x6b, 0x07, 0xe5, 0x5e, 0x20, 0xe1, 0x02, 0xb2, 0x6a, -0x20, 0x6d, 0x07, 0xe5, 0x5e, 0x20, 0xe2, 0x02, 0xb2, 0x6c, 0x90, 0x70, 0x47, 0xe5, 0x2d, 0xf0, -0x75, 0x2e, 0x40, 0x20, 0x69, 0x04, 0xa2, 0x68, 0x80, 0x15, 0x30, 0x68, 0x06, 0xe5, 0x46, 0xa2, -0xe3, 0x80, 0x0c, 0xe5, 0x46, 0x54, 0xf0, 0xff, 0xbf, 0xf0, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, -0x73, 0x92, 0x72, 0x20, 0x6b, 0x04, 0xa2, 0x6a, 0x80, 0x15, 0x30, 0x6a, 0x06, 0xe5, 0x46, 0xa2, -0xe3, 0x80, 0x0c, 0xe5, 0x46, 0x54, 0xf0, 0xff, 0xbf, 0xf0, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, -0x75, 0x92, 0x74, 0x20, 0x6d, 0x04, 0xa2, 0x6c, 0x80, 0x15, 0x30, 0x6c, 0x06, 0xe5, 0x46, 0xa2, -0xe3, 0x80, 0x0c, 0xe5, 0x46, 0x54, 0xf0, 0xff, 0xbf, 0xf0, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, -0x71, 0x92, 0x70, 0x90, 0x10, 0x2f, 0xe5, 0x2e, 0xf0, 0xe5, 0x47, 0x64, 0x06, 0x70, 0x46, 0x90, -0x02, 0x29, 0xe0, 0x54, 0xfe, 0xf0, 0xe5, 0x43, 0xc4, 0x54, 0x0f, 0x14, 0x60, 0x14, 0x24, 0xfe, -0x60, 0x1f, 0x24, 0x03, 0x60, 0x03, 0x02, 0x16, 0x35, 0x90, 0x02, 0x28, 0xe0, 0x30, 0x47, 0x0d, -0x80, 0x07, 0x90, 0x02, 0x28, 0xe0, 0x20, 0x47, 0x04, 0x54, 0xfe, 0xf0, 0x22, 0x44, 0x01, 0xf0, -0x22, 0xe5, 0x46, 0x30, 0xe3, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0x90, 0x02, 0x28, 0xe0, -0x54, 0xfe, 0x4f, 0xf0, 0x22, 0xe5, 0x47, 0x64, 0x07, 0x60, 0x03, 0x02, 0x16, 0x35, 0xf5, 0x27, -0x90, 0x02, 0x29, 0xe0, 0x54, 0xfc, 0xf0, 0xe5, 0x26, 0x14, 0x60, 0x26, 0x14, 0x60, 0x2e, 0x14, -0x60, 0x36, 0x24, 0x03, 0x70, 0x5f, 0xe5, 0x46, 0x13, 0x13, 0x13, 0x54, 0x1f, 0x75, 0xf0, 0x03, -0x84, 0xaf, 0xf0, 0x20, 0x47, 0x04, 0x7e, 0x01, 0x80, 0x02, 0x7e, 0x00, 0xef, 0x6e, 0x24, 0xff, -0x80, 0x02, 0xa2, 0x47, 0x92, 0x39, 0xa2, 0x47, 0xb3, 0x92, 0x38, 0x80, 0x3f, 0xe5, 0x46, 0x30, -0xe3, 0x03, 0xd3, 0x80, 0x27, 0xc3, 0x80, 0x24, 0xe5, 0x46, 0x30, 0xe3, 0x0d, 0x54, 0x70, 0xc3, -0x94, 0x60, 0x50, 0x06, 0x7e, 0x00, 0x7f, 0x01, 0x80, 0x04, 0x7e, 0x00, 0x7f, 0x00, 0x20, 0x47, -0x04, 0x7d, 0x01, 0x80, 0x02, 0x7d, 0x00, 0xef, 0x6d, 0x4e, 0x24, 0xff, 0x92, 0x38, 0xa2, 0x47, -0xb3, 0x92, 0x39, 0x80, 0x07, 0xa2, 0x47, 0xb3, 0x92, 0x38, 0x92, 0x39, 0x90, 0x02, 0x28, 0xe0, -0x54, 0xfc, 0x45, 0x27, 0xf0, 0x22, 0xe4, 0x90, 0x02, 0x29, 0xf0, 0x30, 0x47, 0x04, 0xaf, 0x45, -0x80, 0x04, 0xe5, 0x45, 0xf4, 0xff, 0x90, 0x02, 0x28, 0xef, 0xf0, 0x22, 0x8f, 0x50, 0xd2, 0x59, -0x22, 0x8f, 0x54, 0xd2, 0x58, 0x22, 0xe4, 0xf5, 0x30, 0xc2, 0xaf, 0xe5, 0x51, 0x14, 0x60, 0x4a, -0x14, 0x60, 0x6a, 0x24, 0x02, 0x60, 0x03, 0x02, 0x17, 0x4c, 0xd2, 0x59, 0x75, 0x55, 0x01, 0x20, -0x19, 0x1c, 0x90, 0x02, 0x08, 0xe0, 0x54, 0xfe, 0xf0, 0xe0, 0x20, 0xe1, 0x23, 0x90, 0x04, 0x34, -0xe0, 0xb4, 0x02, 0x1c, 0xa3, 0xe0, 0xb4, 0x02, 0x17, 0xa3, 0xe0, 0xb4, 0x02, 0x12, 0x7f, 0x20, -0x12, 0x16, 0x4c, 0x90, 0x10, 0x04, 0xe0, 0x54, 0xf3, 0xf0, 0x75, 0x51, 0x01, 0x02, 0x17, 0x4c, -0xe5, 0x50, 0x70, 0x06, 0x75, 0x30, 0x03, 0x02, 0x17, 0x4c, 0x90, 0x12, 0x00, 0xe0, 0x54, 0x03, -0x70, 0x15, 0x7f, 0x20, 0x12, 0x16, 0x4c, 0x20, 0x19, 0x07, 0x90, 0x02, 0x08, 0xe0, 0x54, 0xfb, -0xf0, 0x75, 0x51, 0x02, 0x02, 0x17, 0x4c, 0xe5, 0x50, 0x70, 0x02, 0x80, 0x7a, 0x20, 0x19, 0x0f, -0x90, 0x02, 0x08, 0xe0, 0x20, 0xe3, 0x6c, 0x90, 0x04, 0x37, 0xe0, 0x64, 0x22, 0x70, 0x64, 0x90, -0x12, 0x04, 0x74, 0x0a, 0xf0, 0x30, 0x1b, 0x11, 0x90, 0x13, 0x28, 0xe0, 0x54, 0xf0, 0xf0, 0xa3, -0xe0, 0x54, 0xf0, 0xf0, 0xa3, 0xe0, 0x54, 0xfa, 0xf0, 0x20, 0x19, 0x07, 0x90, 0x04, 0x01, 0xe0, -0x44, 0x10, 0xf0, 0xe5, 0x34, 0xf4, 0x90, 0x04, 0x01, 0x60, 0x06, 0xe0, 0x54, 0xfb, 0xf0, 0x80, -0x04, 0xe0, 0x54, 0xf9, 0xf0, 0x20, 0x19, 0x07, 0x90, 0x12, 0x04, 0xe0, 0x44, 0x04, 0xf0, 0xe5, -0x34, 0xf4, 0x60, 0x14, 0x90, 0x01, 0x0d, 0xe0, 0xf5, 0x33, 0xe5, 0x34, 0xd3, 0x94, 0x02, 0x40, -0x07, 0x90, 0x12, 0x04, 0xe0, 0x54, 0xfd, 0xf0, 0x75, 0x30, 0x01, 0x75, 0x55, 0x02, 0xe4, 0xf5, -0x51, 0x80, 0x09, 0xe5, 0x50, 0x70, 0x05, 0x75, 0x30, 0x03, 0xf5, 0x51, 0xe5, 0x30, 0x60, 0x18, -0xc2, 0x01, 0xe4, 0xf5, 0x51, 0xc2, 0x59, 0x20, 0x19, 0x0e, 0xad, 0x30, 0xaf, 0x40, 0x12, 0x18, -0x2a, 0xe5, 0x30, 0xb4, 0x03, 0x02, 0xd2, 0x03, 0xd2, 0xaf, 0x22, 0xc2, 0xaf, 0x30, 0x01, 0x0e, -0xe4, 0xf5, 0x51, 0xc2, 0x59, 0xc2, 0x01, 0x7d, 0x02, 0xaf, 0x40, 0x12, 0x18, 0x2a, 0xe5, 0x52, -0x14, 0x60, 0x55, 0x14, 0x60, 0x2f, 0x24, 0x02, 0x60, 0x03, 0x02, 0x18, 0x27, 0xe5, 0x34, 0xf4, -0x60, 0x23, 0xe5, 0x34, 0xd3, 0x94, 0x02, 0x40, 0x16, 0x90, 0x12, 0x04, 0xe0, 0x44, 0x02, 0xf0, -0x90, 0x01, 0x0d, 0xe0, 0x20, 0xe3, 0x03, 0x02, 0x18, 0x27, 0x7f, 0x50, 0x12, 0x16, 0x51, 0x75, -0x52, 0x02, 0x75, 0x55, 0x03, 0xe5, 0x34, 0xf4, 0x60, 0x0a, 0xe5, 0x54, 0x70, 0x69, 0x90, 0x01, -0x0d, 0xe5, 0x33, 0xf0, 0x90, 0x12, 0x04, 0xe0, 0x54, 0xfb, 0xf0, 0x7f, 0x20, 0x12, 0x16, 0x51, -0x75, 0x52, 0x01, 0x75, 0x55, 0x03, 0x80, 0x4f, 0xe5, 0x54, 0x70, 0x4b, 0x90, 0x04, 0x01, 0xe0, -0x44, 0x0e, 0xf0, 0x20, 0x19, 0x04, 0xe0, 0x54, 0xef, 0xf0, 0x90, 0x13, 0x28, 0xe0, 0x44, 0x0f, -0xf0, 0xa3, 0xe0, 0x44, 0x0f, 0xf0, 0xa3, 0xe0, 0x44, 0x05, 0xf0, 0x90, 0x12, 0x04, 0x74, 0x03, -0xf0, 0x20, 0x19, 0x07, 0x90, 0x02, 0x08, 0xe0, 0x44, 0x05, 0xf0, 0x90, 0x10, 0x04, 0xe0, 0x44, -0x0c, 0xf0, 0xe4, 0xf5, 0x52, 0xf5, 0x55, 0x30, 0x02, 0x0b, 0xc2, 0x02, 0x7d, 0x01, 0xaf, 0x41, -0x12, 0x18, 0x2a, 0x80, 0x02, 0xc2, 0x03, 0xd2, 0xaf, 0x22, 0xef, 0xf4, 0x60, 0x2d, 0xe4, 0xfe, -0x74, 0x14, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xe0, 0xb4, 0xff, 0x19, 0x74, 0x14, -0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xef, 0xf0, 0x74, 0x1c, 0x2e, 0xf5, 0x82, 0xe4, -0x34, 0x70, 0xf5, 0x83, 0xed, 0xf0, 0x22, 0x0e, 0xbe, 0x04, 0xd5, 0x22, 0x22, 0x22, 0x20, 0x19, -0x03, 0x02, 0x19, 0x0f, 0x90, 0x70, 0x80, 0xe0, 0x04, 0xf0, 0x90, 0x04, 0x37, 0xe0, 0x30, 0xe5, -0x03, 0x02, 0x19, 0x0b, 0x90, 0x04, 0x28, 0xe0, 0xf5, 0x31, 0xa3, 0xe0, 0xf5, 0x30, 0xf5, 0x32, -0xe4, 0xf5, 0x37, 0x90, 0x70, 0x81, 0xe0, 0x04, 0xf0, 0x90, 0x70, 0x82, 0xe0, 0x04, 0xf0, 0xe5, -0x32, 0x75, 0xf0, 0x80, 0xa4, 0x24, 0x00, 0xff, 0xe5, 0xf0, 0x34, 0x80, 0xfe, 0xe5, 0x30, 0x65, -0x32, 0x70, 0x05, 0xfc, 0x7d, 0x18, 0x80, 0x04, 0x7c, 0x00, 0x7d, 0x00, 0xef, 0x2d, 0xff, 0xee, -0x3c, 0xfe, 0x12, 0x19, 0x10, 0x50, 0x25, 0x90, 0x70, 0x83, 0xe0, 0x04, 0xf0, 0x90, 0x01, 0x14, -0xe0, 0x44, 0x02, 0xf0, 0xe0, 0x30, 0xe1, 0x06, 0x90, 0x70, 0x92, 0x74, 0x45, 0xf0, 0x90, 0x70, -0x93, 0xe0, 0x04, 0xf0, 0x90, 0x04, 0x01, 0xe0, 0x90, 0x70, 0x94, 0xf0, 0xe5, 0x32, 0x65, 0x31, -0x60, 0x10, 0xe4, 0x25, 0x32, 0xff, 0xe4, 0x34, 0x80, 0x8f, 0x82, 0xf5, 0x83, 0xe0, 0xf5, 0x32, -0x80, 0x97, 0x90, 0x04, 0x10, 0x74, 0x01, 0xf0, 0x90, 0x04, 0x28, 0xe5, 0x31, 0xf0, 0xa3, 0xe5, -0x30, 0xf0, 0x90, 0x04, 0x11, 0x74, 0x01, 0xf0, 0x02, 0x18, 0x6a, 0xc2, 0x06, 0xd2, 0x1a, 0x22, -0x90, 0x70, 0x84, 0xe5, 0x37, 0xf0, 0xc3, 0x94, 0x06, 0x50, 0x19, 0x8f, 0x82, 0x8e, 0x83, 0xe0, -0xb4, 0xff, 0x07, 0x05, 0x37, 0xe4, 0xf5, 0x36, 0x80, 0x59, 0xe4, 0xf5, 0x37, 0x8f, 0x82, 0x8e, -0x83, 0xf0, 0x80, 0x4f, 0xe5, 0x36, 0x75, 0xf0, 0x06, 0x84, 0x74, 0x08, 0x25, 0xf0, 0xf5, 0x82, -0xe4, 0x34, 0x10, 0xf5, 0x83, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xfc, 0x6d, 0x70, 0x30, -0x90, 0x70, 0x88, 0xe0, 0x04, 0xf0, 0xa3, 0xe0, 0xfd, 0xd3, 0x95, 0x37, 0x40, 0x02, 0x80, 0x02, -0xad, 0x37, 0x90, 0x70, 0x89, 0xed, 0xf0, 0x05, 0x37, 0x05, 0x36, 0xe5, 0x36, 0x75, 0xf0, 0x06, -0x84, 0x74, 0x8a, 0x25, 0xf0, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xec, 0xf0, 0x80, 0x03, -0xe4, 0xf5, 0x37, 0x0f, 0xbf, 0x00, 0x01, 0x0e, 0xef, 0x54, 0x7f, 0x60, 0x0a, 0xe5, 0x37, 0xc3, -0x94, 0x4e, 0x50, 0x03, 0x02, 0x19, 0x10, 0xe5, 0x37, 0xb4, 0x4e, 0x03, 0xd3, 0x80, 0x01, 0xc3, -0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x94, 0xeb, } ; diff --git a/drivers/staging/rt2860/common/firmware_3070.h b/drivers/staging/rt2860/common/firmware_3070.h deleted file mode 100644 index b710d40bc046..000000000000 --- a/drivers/staging/rt2860/common/firmware_3070.h +++ /dev/null @@ -1,517 +0,0 @@ -/* AUTO GEN PLEASE DO NOT MODIFY IT */ -/* AUTO GEN PLEASE DO NOT MODIFY IT */ - - -u8 FirmwareImage_3070 [] = { -0xff, 0xff, 0xff, 0x02, 0x10, 0x28, 0x02, 0x10, 0x32, 0x02, 0x10, 0x78, 0x02, 0x13, 0x1f, 0x02, -0x13, 0x20, 0x02, 0x13, 0x3f, 0x02, 0x13, 0x44, 0x12, 0x13, 0x40, 0x22, 0x02, 0x17, 0xae, 0x02, -0x18, 0xd2, 0x02, 0x14, 0x3d, 0x02, 0x13, 0x78, 0x30, 0x05, 0x06, 0x20, 0x0d, 0x03, 0x12, 0x19, -0x95, 0x22, 0x90, 0x01, 0x8c, 0xe0, 0x30, 0xe3, 0x1b, 0xe5, 0x4c, 0x30, 0xe0, 0x04, 0x7f, 0x40, -0x80, 0x02, 0x7f, 0x00, 0x90, 0x10, 0x2f, 0xef, 0xf0, 0x90, 0x01, 0x8c, 0x74, 0x08, 0xf0, 0xe4, -0x90, 0x01, 0xa7, 0xf0, 0x90, 0x01, 0x8c, 0xe0, 0x30, 0xe0, 0x1c, 0x90, 0x01, 0x80, 0xe0, 0xb4, -0x02, 0x15, 0xa3, 0xe0, 0xb4, 0x01, 0x10, 0x90, 0x01, 0x84, 0xe0, 0xb4, 0x81, 0x09, 0x90, 0x01, -0x8c, 0x74, 0x01, 0xf0, 0x12, 0x0d, 0xc8, 0x22, 0x90, 0x04, 0x14, 0xe0, 0x20, 0xe7, 0x03, 0x02, -0x13, 0x1e, 0x90, 0x70, 0x12, 0xe0, 0xf5, 0x56, 0x90, 0x04, 0x04, 0xe0, 0x12, 0x0a, 0x9d, 0x10, -0xd9, 0x31, 0x10, 0xbd, 0x36, 0x11, 0x02, 0x50, 0x11, 0x39, 0x51, 0x11, 0x42, 0x52, 0x11, 0x42, -0x53, 0x11, 0x42, 0x54, 0x11, 0x83, 0x55, 0x11, 0xd2, 0x56, 0x12, 0x25, 0x70, 0x12, 0x50, 0x71, -0x12, 0x7e, 0x72, 0x12, 0xd5, 0x73, 0x12, 0xf6, 0x80, 0x00, 0x00, 0x13, 0x1e, 0x90, 0x70, 0x11, -0xe0, 0xf5, 0x3c, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0xe5, 0x56, -0xf4, 0x70, 0x03, 0x02, 0x13, 0x1e, 0x02, 0x13, 0x17, 0x20, 0x02, 0x03, 0x30, 0x03, 0x1d, 0x7d, -0x02, 0xaf, 0x56, 0x12, 0x0b, 0x91, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, -0xf0, 0xe5, 0x56, 0xf4, 0x70, 0x03, 0x02, 0x13, 0x1e, 0x02, 0x13, 0x17, 0x85, 0x56, 0x41, 0xd2, -0x02, 0x22, 0x90, 0x70, 0x10, 0xe0, 0x54, 0x7f, 0xff, 0xbf, 0x0a, 0x0d, 0x90, 0x70, 0x11, 0xe0, -0xb4, 0x08, 0x06, 0x75, 0x4e, 0x01, 0x75, 0x4f, 0x84, 0x90, 0x70, 0x10, 0xe0, 0x54, 0x7f, 0xff, -0xbf, 0x02, 0x12, 0x90, 0x70, 0x11, 0xe0, 0x64, 0x08, 0x60, 0x04, 0xe0, 0xb4, 0x20, 0x06, 0x75, -0x4e, 0x03, 0x75, 0x4f, 0x20, 0xe4, 0xf5, 0x27, 0x22, 0x90, 0x70, 0x11, 0xe0, 0x24, 0xff, 0x92, -0x47, 0x22, 0x90, 0x04, 0x04, 0xe0, 0x25, 0xe0, 0x24, 0x5d, 0xf5, 0x57, 0x90, 0x70, 0x10, 0xe0, -0xff, 0x74, 0x47, 0x25, 0x57, 0xf8, 0xc6, 0xef, 0xc6, 0x90, 0x70, 0x11, 0xe0, 0xff, 0x74, 0x48, -0x25, 0x57, 0xf8, 0xc6, 0xef, 0xc6, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x0b, 0x91, 0x90, 0x04, 0x14, -0x74, 0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x70, 0x03, 0x02, 0x13, 0x1e, -0x02, 0x13, 0x17, 0xe5, 0x47, 0x64, 0x07, 0x60, 0x1d, 0xe5, 0x47, 0x64, 0x08, 0x60, 0x17, 0xe5, -0x47, 0x64, 0x09, 0x60, 0x11, 0xe5, 0x47, 0x64, 0x0a, 0x60, 0x0b, 0xe5, 0x47, 0x64, 0x0b, 0x60, -0x05, 0xe5, 0x47, 0xb4, 0x0c, 0x08, 0x90, 0x70, 0x11, 0xe0, 0x54, 0x0f, 0xf5, 0x3a, 0xe5, 0x47, -0xb4, 0x09, 0x08, 0xe5, 0x3a, 0xb4, 0x03, 0x03, 0xe4, 0xf5, 0x46, 0xe5, 0x47, 0xb4, 0x0a, 0x08, -0xe5, 0x3a, 0xb4, 0x01, 0x03, 0xe4, 0xf5, 0x46, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x0b, 0x91, 0xd2, -0x04, 0x22, 0x90, 0x70, 0x11, 0xe0, 0xf4, 0xff, 0x90, 0x70, 0x10, 0xe0, 0x5f, 0xff, 0x90, 0x70, -0x11, 0xe0, 0x55, 0x27, 0x4f, 0x90, 0x70, 0x18, 0xf0, 0x90, 0x70, 0x11, 0xe0, 0x90, 0x70, 0x19, -0xf0, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x0b, 0x91, 0x30, 0x15, 0x03, 0xd2, 0x14, 0x22, 0x90, 0x70, -0x18, 0xe0, 0xf5, 0x27, 0x90, 0x02, 0x29, 0xe0, 0xff, 0x90, 0x70, 0x19, 0xe0, 0xfe, 0xef, 0x5e, -0x90, 0x02, 0x29, 0xf0, 0x30, 0x47, 0x04, 0xaf, 0x27, 0x80, 0x04, 0xe5, 0x27, 0xf4, 0xff, 0x90, -0x02, 0x28, 0xef, 0xf0, 0x22, 0x90, 0x70, 0x10, 0xe0, 0xfe, 0x90, 0x70, 0x11, 0xe0, 0xfd, 0xed, -0xf8, 0xe6, 0xf5, 0x57, 0xfd, 0xaf, 0x56, 0x12, 0x0b, 0x91, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, -0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x70, 0x03, 0x02, 0x13, 0x1e, 0x02, 0x13, 0x17, -0x90, 0x70, 0x10, 0xe0, 0xfe, 0x90, 0x70, 0x11, 0xe0, 0xfd, 0xed, 0xf5, 0x82, 0x8e, 0x83, 0xe0, -0xf5, 0x57, 0xfd, 0xaf, 0x56, 0x12, 0x0b, 0x91, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, -0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x70, 0x03, 0x02, 0x13, 0x1e, 0x02, 0x13, 0x17, 0x90, 0x10, -0x00, 0xe0, 0xf5, 0x57, 0x90, 0x10, 0x02, 0xe0, 0xf5, 0x58, 0xa3, 0xe0, 0xf5, 0x59, 0xe5, 0x58, -0xb4, 0x70, 0x1e, 0xe5, 0x59, 0xb4, 0x30, 0x19, 0x90, 0x05, 0x08, 0xe0, 0x44, 0x01, 0xf0, 0xfd, -0x90, 0x05, 0x05, 0xe0, 0x54, 0xfb, 0xf0, 0x44, 0x04, 0xf0, 0xed, 0x54, 0xfe, 0x90, 0x05, 0x08, -0xf0, 0xe4, 0xf5, 0x4e, 0xf5, 0x4f, 0x75, 0x3a, 0xff, 0x75, 0x3c, 0xff, 0xad, 0x57, 0xaf, 0x56, -0x12, 0x0b, 0x91, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, -0xf4, 0x60, 0x4b, 0x80, 0x42, 0x90, 0x70, 0x10, 0xe0, 0x24, 0xff, 0x92, 0x93, 0xe4, 0xfd, 0xaf, -0x56, 0x12, 0x0b, 0x91, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, -0x56, 0xf4, 0x60, 0x2a, 0x80, 0x21, 0x90, 0x70, 0x10, 0xe0, 0x24, 0xff, 0x92, 0x4a, 0xd2, 0x05, -0xad, 0x57, 0xaf, 0x56, 0x12, 0x0b, 0x91, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, 0x70, -0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x60, 0x07, 0x90, 0x70, 0x25, 0xe0, 0x44, 0x01, 0xf0, 0x22, 0x22, -0xe5, 0x53, 0x70, 0x1a, 0x30, 0x60, 0x09, 0xb2, 0x4d, 0x30, 0x4d, 0x04, 0x05, 0x46, 0xc2, 0x04, -0xe5, 0x4f, 0x45, 0x4e, 0x60, 0x08, 0xe5, 0x4f, 0x15, 0x4f, 0x70, 0x02, 0x15, 0x4e, 0x22, 0x22, -0xc2, 0x42, 0xd3, 0x22, 0x30, 0x14, 0x30, 0x90, 0x70, 0x19, 0xe0, 0x55, 0x27, 0xff, 0x90, 0x70, -0x18, 0xe0, 0x4f, 0xf5, 0x27, 0x90, 0x02, 0x29, 0xe0, 0xff, 0x90, 0x70, 0x19, 0xe0, 0xfe, 0xef, -0x5e, 0x90, 0x02, 0x29, 0xf0, 0x30, 0x47, 0x04, 0xaf, 0x27, 0x80, 0x04, 0xe5, 0x27, 0xf4, 0xff, -0x90, 0x02, 0x28, 0xef, 0xf0, 0xc2, 0x14, 0x22, 0xc2, 0x4b, 0xc2, 0x4c, 0xe5, 0x44, 0x12, 0x0a, -0x9d, 0x13, 0x9a, 0x00, 0x14, 0x28, 0x04, 0x14, 0x24, 0x08, 0x14, 0x04, 0x10, 0x13, 0xae, 0x20, -0x13, 0xce, 0x60, 0x13, 0xdf, 0xa0, 0x00, 0x00, 0x14, 0x2a, 0x85, 0x48, 0x43, 0x85, 0x4a, 0x42, -0x85, 0x4c, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x60, 0x03, 0x02, 0x14, 0x2a, 0x80, 0x1b, 0xe5, 0x48, -0xc4, 0x54, 0x0f, 0xf5, 0x43, 0xe5, 0x4a, 0xc4, 0x54, 0x0f, 0xf5, 0x42, 0xe5, 0x4c, 0xc4, 0x54, -0x0f, 0xf5, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x70, 0x61, 0x53, 0x43, 0x0f, 0x80, 0x5c, 0x85, 0x49, -0x43, 0x85, 0x4b, 0x42, 0x85, 0x4d, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x70, 0x4d, 0x80, 0x1b, 0xe5, -0x49, 0xc4, 0x54, 0x0f, 0xf5, 0x43, 0xe5, 0x4b, 0xc4, 0x54, 0x0f, 0xf5, 0x42, 0xe5, 0x4d, 0xc4, -0x54, 0x0f, 0xf5, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x70, 0x30, 0xe5, 0x43, 0x54, 0x0f, 0x44, 0x10, -0xf5, 0x43, 0x80, 0x26, 0xe5, 0x47, 0x64, 0x04, 0x60, 0x05, 0xe5, 0x47, 0xb4, 0x05, 0x06, 0x43, -0x5e, 0x04, 0x75, 0x42, 0x09, 0xe5, 0x47, 0xb4, 0x06, 0x10, 0xe5, 0x43, 0x54, 0x0f, 0x44, 0x30, -0xf5, 0x43, 0x80, 0x06, 0xd2, 0x4b, 0x80, 0x02, 0xd2, 0x4c, 0xe4, 0xf5, 0x25, 0xe5, 0x42, 0xc4, -0x54, 0xf0, 0xff, 0xe5, 0x43, 0x54, 0x0f, 0x4f, 0xf5, 0x5f, 0xd2, 0x60, 0x22, 0xd2, 0x15, 0xe5, -0x47, 0x24, 0xf5, 0x60, 0x0b, 0x24, 0xcb, 0x60, 0x07, 0x24, 0x40, 0x70, 0x06, 0xc2, 0x15, 0x22, -0x12, 0x17, 0x79, 0x12, 0x14, 0x5f, 0xc2, 0x15, 0xc2, 0xaf, 0xc2, 0x04, 0xd2, 0xaf, 0x22, 0xc2, -0xaf, 0x90, 0x04, 0x14, 0xe0, 0x54, 0x0e, 0x60, 0x04, 0xd2, 0x18, 0x80, 0x08, 0xe5, 0x4e, 0x45, -0x4f, 0x24, 0xff, 0x92, 0x18, 0xd2, 0xaf, 0x90, 0x04, 0x14, 0xe0, 0xa2, 0xe4, 0x92, 0x19, 0x74, -0x1e, 0xf0, 0xe5, 0x5f, 0x54, 0x0f, 0xf5, 0x2d, 0xe5, 0x25, 0x70, 0x13, 0x30, 0x18, 0x05, 0xe5, -0x5f, 0x20, 0xe5, 0x0b, 0x30, 0x19, 0x19, 0xe5, 0x5f, 0x54, 0x30, 0xff, 0xbf, 0x30, 0x11, 0xe5, -0x25, 0x70, 0x05, 0x75, 0x25, 0x0c, 0x80, 0x02, 0x15, 0x25, 0xd2, 0x6c, 0xd2, 0x6d, 0x80, 0x0f, -0xe5, 0x5f, 0x30, 0xe6, 0x06, 0xc2, 0x6c, 0xd2, 0x6d, 0x80, 0x04, 0xd2, 0x6c, 0xc2, 0x6d, 0xe5, -0x47, 0x64, 0x03, 0x70, 0x21, 0x30, 0x4b, 0x06, 0xc2, 0x6c, 0xd2, 0x6d, 0x80, 0x18, 0xe5, 0x25, -0x70, 0x03, 0x30, 0x4c, 0x11, 0xc2, 0x4c, 0xe5, 0x25, 0x70, 0x05, 0x75, 0x25, 0x07, 0x80, 0x02, -0x15, 0x25, 0xd2, 0x6c, 0xd2, 0x6d, 0xe5, 0x47, 0xb4, 0x09, 0x14, 0xe5, 0x44, 0x20, 0xe3, 0x0b, -0xe5, 0x3a, 0x64, 0x02, 0x60, 0x05, 0xe5, 0x3a, 0xb4, 0x03, 0x04, 0xc2, 0x6c, 0xd2, 0x6d, 0xe5, -0x47, 0xb4, 0x0a, 0x13, 0xe5, 0x3a, 0xb4, 0x01, 0x06, 0xc2, 0x6c, 0xd2, 0x6d, 0x80, 0x08, 0xe5, -0x3a, 0x70, 0x04, 0xd2, 0x6c, 0xc2, 0x6d, 0x20, 0x69, 0x07, 0xe5, 0x5e, 0x20, 0xe0, 0x02, 0xb2, -0x68, 0x20, 0x6b, 0x07, 0xe5, 0x5e, 0x20, 0xe1, 0x02, 0xb2, 0x6a, 0x20, 0x6d, 0x07, 0xe5, 0x5e, -0x20, 0xe2, 0x02, 0xb2, 0x6c, 0x75, 0x2e, 0x40, 0x20, 0x69, 0x04, 0xa2, 0x68, 0x80, 0x26, 0x30, -0x68, 0x06, 0xe5, 0x46, 0xa2, 0xe2, 0x80, 0x1d, 0xe5, 0x5e, 0x20, 0xe2, 0x04, 0x7f, 0x01, 0x80, -0x02, 0x7f, 0x00, 0xe5, 0x46, 0x54, 0xf0, 0xfe, 0xbe, 0xf0, 0x04, 0x7e, 0x01, 0x80, 0x02, 0x7e, -0x00, 0xee, 0x6f, 0x24, 0xff, 0x92, 0x73, 0x92, 0x72, 0x20, 0x6b, 0x04, 0xa2, 0x6a, 0x80, 0x26, -0x30, 0x6a, 0x06, 0xe5, 0x46, 0xa2, 0xe2, 0x80, 0x1d, 0xe5, 0x5e, 0x20, 0xe0, 0x04, 0x7f, 0x01, -0x80, 0x02, 0x7f, 0x00, 0xe5, 0x46, 0x54, 0xf0, 0xfe, 0xbe, 0xf0, 0x04, 0x7e, 0x01, 0x80, 0x02, -0x7e, 0x00, 0xee, 0x6f, 0x24, 0xff, 0x92, 0x75, 0x92, 0x74, 0x20, 0x6d, 0x04, 0xa2, 0x6c, 0x80, -0x26, 0xe5, 0x47, 0x64, 0x0a, 0x70, 0x22, 0x30, 0x6c, 0x06, 0xe5, 0x46, 0xa2, 0xe3, 0x80, 0x17, -0xe5, 0x3a, 0xb4, 0x01, 0x06, 0xe5, 0x46, 0xa2, 0xe3, 0x80, 0x34, 0xe5, 0x46, 0x20, 0xe4, 0x03, -0x30, 0xe5, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x80, 0x26, 0x30, 0x6c, 0x06, 0xe5, 0x46, 0xa2, 0xe2, -0x80, 0x1d, 0xe5, 0x5e, 0x20, 0xe1, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xe5, 0x46, 0x54, -0xf0, 0xfe, 0xbe, 0xf0, 0x04, 0x7e, 0x01, 0x80, 0x02, 0x7e, 0x00, 0xee, 0x6f, 0x24, 0xff, 0x92, -0x71, 0x92, 0x70, 0x90, 0x10, 0x00, 0xe0, 0x90, 0x10, 0x2c, 0xf0, 0x90, 0x10, 0x03, 0xe0, 0xc3, -0x94, 0x30, 0x40, 0x14, 0xa2, 0x71, 0x92, 0x77, 0xa2, 0x70, 0x92, 0x76, 0xe5, 0x2e, 0x13, 0x13, -0x54, 0x3f, 0xf5, 0x2e, 0xc2, 0x77, 0xd2, 0x76, 0x90, 0x10, 0x2f, 0xe5, 0x2e, 0xf0, 0xe5, 0x47, -0x64, 0x06, 0x70, 0x39, 0x90, 0x02, 0x29, 0xe0, 0x54, 0xfe, 0xf0, 0xe5, 0x43, 0xc4, 0x54, 0x0f, -0x14, 0x60, 0x0c, 0x24, 0xfe, 0x60, 0x0c, 0x24, 0x03, 0x70, 0x13, 0xc2, 0x38, 0x80, 0x0f, 0xd2, -0x38, 0x80, 0x0b, 0xe5, 0x46, 0x30, 0xe2, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, 0x38, 0x30, 0x47, -0x05, 0xaf, 0x27, 0x02, 0x17, 0x73, 0xe5, 0x27, 0xf4, 0xff, 0x02, 0x17, 0x73, 0xe5, 0x47, 0x64, -0x07, 0x60, 0x0f, 0xe5, 0x47, 0x64, 0x08, 0x60, 0x09, 0xe5, 0x47, 0x64, 0x09, 0x60, 0x03, 0x02, -0x16, 0xf2, 0x90, 0x02, 0x29, 0xe0, 0x54, 0xfc, 0xf0, 0xe5, 0x3a, 0x14, 0x60, 0x22, 0x14, 0x60, -0x25, 0x14, 0x60, 0x2d, 0x24, 0xfc, 0x60, 0x49, 0x24, 0xf9, 0x60, 0x14, 0x24, 0x0e, 0x70, 0x50, -0xe5, 0x46, 0x13, 0x13, 0x54, 0x3f, 0x75, 0xf0, 0x03, 0x84, 0xe5, 0xf0, 0x24, 0xff, 0x80, 0x3a, -0xd2, 0x39, 0xc2, 0x38, 0x80, 0x3e, 0xe5, 0x46, 0x30, 0xe2, 0x03, 0xd3, 0x80, 0x1d, 0xc3, 0x80, -0x1a, 0xe5, 0x46, 0x30, 0xe2, 0x0d, 0x54, 0x38, 0xc3, 0x94, 0x30, 0x50, 0x06, 0x7e, 0x00, 0x7f, -0x01, 0x80, 0x04, 0x7e, 0x00, 0x7f, 0x00, 0xee, 0x4f, 0x24, 0xff, 0x92, 0x38, 0xc2, 0x39, 0x80, -0x13, 0xe5, 0x46, 0x30, 0xe2, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, 0x39, 0xc2, 0x38, 0x80, 0x04, -0xc2, 0x38, 0xc2, 0x39, 0x30, 0x47, 0x04, 0xaf, 0x27, 0x80, 0x04, 0xe5, 0x27, 0xf4, 0xff, 0x02, -0x17, 0x73, 0xe5, 0x47, 0x64, 0x0c, 0x60, 0x06, 0xe5, 0x47, 0x64, 0x0b, 0x70, 0x7a, 0x90, 0x02, -0x29, 0xe0, 0x54, 0xfd, 0xf0, 0xe5, 0x3a, 0x14, 0x60, 0x20, 0x14, 0x60, 0x21, 0x14, 0x60, 0x2b, -0x24, 0xfc, 0x60, 0x45, 0x24, 0xf9, 0x60, 0x12, 0x24, 0x0e, 0x70, 0x4a, 0xe5, 0x46, 0x13, 0x13, -0x54, 0x3f, 0x75, 0xf0, 0x03, 0x84, 0xe5, 0xf0, 0x80, 0x29, 0xd2, 0x39, 0x80, 0x3a, 0xe5, 0x46, -0x30, 0xe2, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, 0x39, 0x80, 0x2d, 0xe5, 0x46, 0x30, 0xe2, 0x0d, -0x54, 0x38, 0xc3, 0x94, 0x30, 0x50, 0x06, 0x7e, 0x00, 0x7f, 0x01, 0x80, 0x04, 0x7e, 0x00, 0x7f, -0x00, 0xee, 0x4f, 0x24, 0xff, 0x92, 0x39, 0x80, 0x0f, 0xe5, 0x46, 0x30, 0xe2, 0x03, 0xd3, 0x80, -0x01, 0xc3, 0x92, 0x39, 0x80, 0x02, 0xc2, 0x39, 0x30, 0x47, 0x04, 0xaf, 0x27, 0x80, 0x04, 0xe5, -0x27, 0xf4, 0xff, 0x90, 0x02, 0x28, 0xef, 0xf0, 0x22, 0xe5, 0x47, 0xb4, 0x0b, 0x10, 0x90, 0x02, -0x29, 0xe0, 0x54, 0xeb, 0xf0, 0xe5, 0x27, 0x54, 0xeb, 0x45, 0x45, 0xf5, 0x27, 0x22, 0xe4, 0x90, -0x02, 0x29, 0xf0, 0x30, 0x47, 0x04, 0xaf, 0x45, 0x80, 0x04, 0xe5, 0x45, 0xf4, 0xff, 0x90, 0x02, -0x28, 0xef, 0xf0, 0x22, 0x8f, 0x50, 0xd2, 0x59, 0x22, 0x8f, 0x54, 0xd2, 0x58, 0x22, 0xe4, 0xf5, -0x62, 0xc2, 0xaf, 0xe5, 0x51, 0x14, 0x60, 0x48, 0x14, 0x60, 0x66, 0x24, 0x02, 0x60, 0x03, 0x02, -0x18, 0xb6, 0xd2, 0x59, 0x75, 0x55, 0x01, 0x90, 0x02, 0xa2, 0xe0, 0x54, 0x7f, 0xf0, 0xa3, 0xe0, -0x20, 0xe7, 0x23, 0x90, 0x04, 0x34, 0xe0, 0xb4, 0x02, 0x1c, 0xa3, 0xe0, 0xb4, 0x02, 0x17, 0xa3, -0xe0, 0xb4, 0x02, 0x12, 0x7f, 0x20, 0x12, 0x17, 0xa4, 0x90, 0x10, 0x04, 0xe0, 0x54, 0xf3, 0xf0, -0x75, 0x51, 0x01, 0x02, 0x18, 0xb6, 0xe5, 0x50, 0x70, 0x06, 0x75, 0x62, 0x03, 0x02, 0x18, 0xb6, -0x90, 0x12, 0x00, 0xe0, 0x54, 0x03, 0x70, 0x12, 0x7f, 0x20, 0x12, 0x17, 0xa4, 0x90, 0x02, 0xa2, -0xe0, 0x54, 0xbf, 0xf0, 0x75, 0x51, 0x02, 0x02, 0x18, 0xb6, 0xe5, 0x50, 0x70, 0x03, 0x02, 0x18, -0xb1, 0x90, 0x02, 0xa3, 0xe0, 0x30, 0xe6, 0x03, 0x02, 0x18, 0xad, 0x90, 0x04, 0x37, 0xe0, 0x64, -0x22, 0x70, 0x7a, 0x90, 0x01, 0x8a, 0x74, 0x7e, 0xf0, 0x90, 0x01, 0x96, 0xf0, 0x90, 0x12, 0x04, -0x74, 0x0a, 0xf0, 0xe5, 0x58, 0xb4, 0x72, 0x15, 0xe5, 0x59, 0xb4, 0x35, 0x10, 0xe4, 0x90, 0x05, -0x00, 0xf0, 0xa3, 0x74, 0x08, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0x74, 0x03, 0xf0, 0x7f, 0x01, 0x12, -0x0d, 0x2a, 0x90, 0x13, 0x28, 0xe0, 0x54, 0xf0, 0xf0, 0xa3, 0xe0, 0x54, 0xf0, 0xf0, 0xe5, 0x59, -0xb4, 0x35, 0x14, 0xe5, 0x3c, 0xf4, 0x60, 0x06, 0xa3, 0xe0, 0x54, 0xf3, 0x80, 0x14, 0x90, 0x13, -0x2a, 0xe0, 0x54, 0xfb, 0xf0, 0x80, 0x14, 0xe5, 0x3c, 0xf4, 0x90, 0x13, 0x2a, 0x60, 0x08, 0xe0, -0x54, 0xf2, 0x45, 0x3c, 0xf0, 0x80, 0x04, 0xe0, 0x54, 0xfa, 0xf0, 0x90, 0x04, 0x01, 0xe0, 0x54, -0xfd, 0xf0, 0x75, 0x62, 0x01, 0x75, 0x55, 0x02, 0xe4, 0xf5, 0x51, 0x80, 0x09, 0xe5, 0x50, 0x70, -0x05, 0x75, 0x62, 0x03, 0xf5, 0x51, 0xe5, 0x62, 0x60, 0x15, 0xc2, 0x01, 0xe4, 0xf5, 0x51, 0xc2, -0x59, 0xad, 0x62, 0xaf, 0x40, 0x12, 0x19, 0x61, 0xe5, 0x62, 0xb4, 0x03, 0x02, 0xd2, 0x03, 0xd2, -0xaf, 0x22, 0xc2, 0xaf, 0x30, 0x01, 0x12, 0xe4, 0x90, 0x01, 0x96, 0xf0, 0xf5, 0x51, 0xc2, 0x59, -0xc2, 0x01, 0x7d, 0x02, 0xaf, 0x40, 0x12, 0x19, 0x61, 0xe5, 0x52, 0x14, 0x60, 0x09, 0x04, 0x70, -0x6d, 0x75, 0x52, 0x01, 0x75, 0x55, 0x03, 0x90, 0x04, 0x01, 0xe0, 0x44, 0x0e, 0xf0, 0x90, 0x13, -0x28, 0xe0, 0x44, 0x0f, 0xf0, 0xa3, 0xe0, 0x44, 0x0f, 0xf0, 0xa3, 0xe0, 0x44, 0x05, 0xf0, 0x90, -0x12, 0x04, 0x74, 0x03, 0xf0, 0xe5, 0x58, 0xb4, 0x72, 0x16, 0xe5, 0x59, 0xb4, 0x35, 0x11, 0x90, -0x05, 0x00, 0x74, 0xe2, 0xf0, 0xa3, 0x74, 0x08, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0x74, 0x03, 0xf0, -0x7f, 0x01, 0x12, 0x0d, 0x2a, 0x90, 0x02, 0xa2, 0xe0, 0x44, 0xc0, 0xf0, 0x90, 0x10, 0x04, 0xe0, -0x44, 0x0c, 0xf0, 0xe4, 0xf5, 0x52, 0xf5, 0x55, 0x30, 0x02, 0x09, 0xc2, 0x02, 0x7d, 0x01, 0xaf, -0x41, 0x12, 0x19, 0x61, 0x30, 0x03, 0x02, 0xc2, 0x03, 0xe4, 0x90, 0x01, 0x96, 0xf0, 0xd2, 0xaf, -0x22, 0xef, 0xf4, 0x60, 0x2d, 0xe4, 0xfe, 0x74, 0x14, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, -0x83, 0xe0, 0xb4, 0xff, 0x19, 0x74, 0x14, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xef, -0xf0, 0x74, 0x1c, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xed, 0xf0, 0x22, 0x0e, 0xbe, -0x04, 0xd5, 0x22, 0x22, 0x22, 0x90, 0x70, 0x2a, 0xe0, 0x30, 0xe1, 0x4d, 0xc2, 0xaf, 0x90, 0x70, -0x28, 0xe0, 0x90, 0x10, 0x1c, 0xf0, 0x90, 0x70, 0x29, 0xe0, 0x90, 0x10, 0x1d, 0xf0, 0x90, 0x70, -0x2a, 0xe0, 0x90, 0x10, 0x1e, 0xf0, 0x90, 0x10, 0x1c, 0xe0, 0xf5, 0x62, 0x90, 0x10, 0x1e, 0xe0, -0x20, 0xe1, 0xf3, 0x90, 0x10, 0x1c, 0xe0, 0x90, 0x70, 0x28, 0xf0, 0x90, 0x10, 0x1d, 0xe0, 0x90, -0x70, 0x29, 0xf0, 0x90, 0x10, 0x1e, 0xe0, 0x90, 0x70, 0x2a, 0xf0, 0x30, 0x4a, 0x07, 0x90, 0x70, -0x24, 0xe0, 0x44, 0x01, 0xf0, 0xc2, 0x05, 0xd2, 0xaf, 0x22, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x7b, 0xc4, -0xff, 0xff, 0xff, 0x02, 0x10, 0x28, 0x02, 0x10, 0x32, 0x02, 0x10, 0x78, 0x02, 0x13, 0x1f, 0x02, -0x13, 0x20, 0x02, 0x13, 0x3f, 0x02, 0x13, 0x44, 0x12, 0x13, 0x40, 0x22, 0x02, 0x17, 0xae, 0x02, -0x18, 0xd2, 0x02, 0x14, 0x3d, 0x02, 0x13, 0x78, 0x30, 0x05, 0x06, 0x20, 0x0d, 0x03, 0x12, 0x19, -0x95, 0x22, 0x90, 0x01, 0x8c, 0xe0, 0x30, 0xe3, 0x1b, 0xe5, 0x4c, 0x30, 0xe0, 0x04, 0x7f, 0x40, -0x80, 0x02, 0x7f, 0x00, 0x90, 0x10, 0x2f, 0xef, 0xf0, 0x90, 0x01, 0x8c, 0x74, 0x08, 0xf0, 0xe4, -0x90, 0x01, 0xa7, 0xf0, 0x90, 0x01, 0x8c, 0xe0, 0x30, 0xe0, 0x1c, 0x90, 0x01, 0x80, 0xe0, 0xb4, -0x02, 0x15, 0xa3, 0xe0, 0xb4, 0x01, 0x10, 0x90, 0x01, 0x84, 0xe0, 0xb4, 0x81, 0x09, 0x90, 0x01, -0x8c, 0x74, 0x01, 0xf0, 0x12, 0x0d, 0xdd, 0x22, 0x90, 0x04, 0x14, 0xe0, 0x20, 0xe7, 0x03, 0x02, -0x13, 0x1e, 0x90, 0x70, 0x12, 0xe0, 0xf5, 0x56, 0x90, 0x04, 0x04, 0xe0, 0x12, 0x0a, 0xb6, 0x10, -0xd9, 0x31, 0x10, 0xbd, 0x36, 0x11, 0x02, 0x50, 0x11, 0x39, 0x51, 0x11, 0x42, 0x52, 0x11, 0x42, -0x53, 0x11, 0x42, 0x54, 0x11, 0x83, 0x55, 0x11, 0xd2, 0x56, 0x12, 0x25, 0x70, 0x12, 0x50, 0x71, -0x12, 0x7e, 0x72, 0x12, 0xd5, 0x73, 0x12, 0xf6, 0x80, 0x00, 0x00, 0x13, 0x1e, 0x90, 0x70, 0x11, -0xe0, 0xf5, 0x3c, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0xe5, 0x56, -0xf4, 0x70, 0x03, 0x02, 0x13, 0x1e, 0x02, 0x13, 0x17, 0x20, 0x02, 0x03, 0x30, 0x03, 0x1d, 0x7d, -0x02, 0xaf, 0x56, 0x12, 0x0b, 0xaa, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, -0xf0, 0xe5, 0x56, 0xf4, 0x70, 0x03, 0x02, 0x13, 0x1e, 0x02, 0x13, 0x17, 0x85, 0x56, 0x41, 0xd2, -0x02, 0x22, 0x90, 0x70, 0x10, 0xe0, 0x54, 0x7f, 0xff, 0xbf, 0x0a, 0x0d, 0x90, 0x70, 0x11, 0xe0, -0xb4, 0x08, 0x06, 0x75, 0x4e, 0x01, 0x75, 0x4f, 0x84, 0x90, 0x70, 0x10, 0xe0, 0x54, 0x7f, 0xff, -0xbf, 0x02, 0x12, 0x90, 0x70, 0x11, 0xe0, 0x64, 0x08, 0x60, 0x04, 0xe0, 0xb4, 0x20, 0x06, 0x75, -0x4e, 0x03, 0x75, 0x4f, 0x20, 0xe4, 0xf5, 0x27, 0x22, 0x90, 0x70, 0x11, 0xe0, 0x24, 0xff, 0x92, -0x47, 0x22, 0x90, 0x04, 0x04, 0xe0, 0x25, 0xe0, 0x24, 0x5d, 0xf5, 0x57, 0x90, 0x70, 0x10, 0xe0, -0xff, 0x74, 0x47, 0x25, 0x57, 0xf8, 0xc6, 0xef, 0xc6, 0x90, 0x70, 0x11, 0xe0, 0xff, 0x74, 0x48, -0x25, 0x57, 0xf8, 0xc6, 0xef, 0xc6, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x0b, 0xaa, 0x90, 0x04, 0x14, -0x74, 0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x70, 0x03, 0x02, 0x13, 0x1e, -0x02, 0x13, 0x17, 0xe5, 0x47, 0x64, 0x07, 0x60, 0x1d, 0xe5, 0x47, 0x64, 0x08, 0x60, 0x17, 0xe5, -0x47, 0x64, 0x09, 0x60, 0x11, 0xe5, 0x47, 0x64, 0x0a, 0x60, 0x0b, 0xe5, 0x47, 0x64, 0x0b, 0x60, -0x05, 0xe5, 0x47, 0xb4, 0x0c, 0x08, 0x90, 0x70, 0x11, 0xe0, 0x54, 0x0f, 0xf5, 0x3a, 0xe5, 0x47, -0xb4, 0x09, 0x08, 0xe5, 0x3a, 0xb4, 0x03, 0x03, 0xe4, 0xf5, 0x46, 0xe5, 0x47, 0xb4, 0x0a, 0x08, -0xe5, 0x3a, 0xb4, 0x01, 0x03, 0xe4, 0xf5, 0x46, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x0b, 0xaa, 0xd2, -0x04, 0x22, 0x90, 0x70, 0x11, 0xe0, 0xf4, 0xff, 0x90, 0x70, 0x10, 0xe0, 0x5f, 0xff, 0x90, 0x70, -0x11, 0xe0, 0x55, 0x27, 0x4f, 0x90, 0x70, 0x18, 0xf0, 0x90, 0x70, 0x11, 0xe0, 0x90, 0x70, 0x19, -0xf0, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x0b, 0xaa, 0x30, 0x15, 0x03, 0xd2, 0x14, 0x22, 0x90, 0x70, -0x18, 0xe0, 0xf5, 0x27, 0x90, 0x02, 0x29, 0xe0, 0xff, 0x90, 0x70, 0x19, 0xe0, 0xfe, 0xef, 0x5e, -0x90, 0x02, 0x29, 0xf0, 0x30, 0x47, 0x04, 0xaf, 0x27, 0x80, 0x04, 0xe5, 0x27, 0xf4, 0xff, 0x90, -0x02, 0x28, 0xef, 0xf0, 0x22, 0x90, 0x70, 0x10, 0xe0, 0xfe, 0x90, 0x70, 0x11, 0xe0, 0xfd, 0xed, -0xf8, 0xe6, 0xf5, 0x57, 0xfd, 0xaf, 0x56, 0x12, 0x0b, 0xaa, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, -0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x70, 0x03, 0x02, 0x13, 0x1e, 0x02, 0x13, 0x17, -0x90, 0x70, 0x10, 0xe0, 0xfe, 0x90, 0x70, 0x11, 0xe0, 0xfd, 0xed, 0xf5, 0x82, 0x8e, 0x83, 0xe0, -0xf5, 0x57, 0xfd, 0xaf, 0x56, 0x12, 0x0b, 0xaa, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, -0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x70, 0x03, 0x02, 0x13, 0x1e, 0x02, 0x13, 0x17, 0x90, 0x10, -0x00, 0xe0, 0xf5, 0x57, 0x90, 0x10, 0x02, 0xe0, 0xf5, 0x58, 0xa3, 0xe0, 0xf5, 0x59, 0xe5, 0x58, -0xb4, 0x70, 0x1e, 0xe5, 0x59, 0xb4, 0x30, 0x19, 0x90, 0x05, 0x08, 0xe0, 0x44, 0x01, 0xf0, 0xfd, -0x90, 0x05, 0x05, 0xe0, 0x54, 0xfb, 0xf0, 0x44, 0x04, 0xf0, 0xed, 0x54, 0xfe, 0x90, 0x05, 0x08, -0xf0, 0xe4, 0xf5, 0x4e, 0xf5, 0x4f, 0x75, 0x3a, 0xff, 0x75, 0x3c, 0xff, 0xad, 0x57, 0xaf, 0x56, -0x12, 0x0b, 0xaa, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, -0xf4, 0x60, 0x4b, 0x80, 0x42, 0x90, 0x70, 0x10, 0xe0, 0x24, 0xff, 0x92, 0x93, 0xe4, 0xfd, 0xaf, -0x56, 0x12, 0x0b, 0xaa, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, -0x56, 0xf4, 0x60, 0x2a, 0x80, 0x21, 0x90, 0x70, 0x10, 0xe0, 0x24, 0xff, 0x92, 0x4a, 0xd2, 0x05, -0xad, 0x57, 0xaf, 0x56, 0x12, 0x0b, 0xaa, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, 0x70, -0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x60, 0x07, 0x90, 0x70, 0x25, 0xe0, 0x44, 0x01, 0xf0, 0x22, 0x22, -0xe5, 0x53, 0x70, 0x1a, 0x30, 0x60, 0x09, 0xb2, 0x4d, 0x30, 0x4d, 0x04, 0x05, 0x46, 0xc2, 0x04, -0xe5, 0x4f, 0x45, 0x4e, 0x60, 0x08, 0xe5, 0x4f, 0x15, 0x4f, 0x70, 0x02, 0x15, 0x4e, 0x22, 0x22, -0xc2, 0x42, 0xd3, 0x22, 0x30, 0x14, 0x30, 0x90, 0x70, 0x19, 0xe0, 0x55, 0x27, 0xff, 0x90, 0x70, -0x18, 0xe0, 0x4f, 0xf5, 0x27, 0x90, 0x02, 0x29, 0xe0, 0xff, 0x90, 0x70, 0x19, 0xe0, 0xfe, 0xef, -0x5e, 0x90, 0x02, 0x29, 0xf0, 0x30, 0x47, 0x04, 0xaf, 0x27, 0x80, 0x04, 0xe5, 0x27, 0xf4, 0xff, -0x90, 0x02, 0x28, 0xef, 0xf0, 0xc2, 0x14, 0x22, 0xc2, 0x4b, 0xc2, 0x4c, 0xe5, 0x44, 0x12, 0x0a, -0xb6, 0x13, 0x9a, 0x00, 0x14, 0x28, 0x04, 0x14, 0x24, 0x08, 0x14, 0x04, 0x10, 0x13, 0xae, 0x20, -0x13, 0xce, 0x60, 0x13, 0xdf, 0xa0, 0x00, 0x00, 0x14, 0x2a, 0x85, 0x48, 0x43, 0x85, 0x4a, 0x42, -0x85, 0x4c, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x60, 0x03, 0x02, 0x14, 0x2a, 0x80, 0x1b, 0xe5, 0x48, -0xc4, 0x54, 0x0f, 0xf5, 0x43, 0xe5, 0x4a, 0xc4, 0x54, 0x0f, 0xf5, 0x42, 0xe5, 0x4c, 0xc4, 0x54, -0x0f, 0xf5, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x70, 0x61, 0x53, 0x43, 0x0f, 0x80, 0x5c, 0x85, 0x49, -0x43, 0x85, 0x4b, 0x42, 0x85, 0x4d, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x70, 0x4d, 0x80, 0x1b, 0xe5, -0x49, 0xc4, 0x54, 0x0f, 0xf5, 0x43, 0xe5, 0x4b, 0xc4, 0x54, 0x0f, 0xf5, 0x42, 0xe5, 0x4d, 0xc4, -0x54, 0x0f, 0xf5, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x70, 0x30, 0xe5, 0x43, 0x54, 0x0f, 0x44, 0x10, -0xf5, 0x43, 0x80, 0x26, 0xe5, 0x47, 0x64, 0x04, 0x60, 0x05, 0xe5, 0x47, 0xb4, 0x05, 0x06, 0x43, -0x5e, 0x04, 0x75, 0x42, 0x09, 0xe5, 0x47, 0xb4, 0x06, 0x10, 0xe5, 0x43, 0x54, 0x0f, 0x44, 0x30, -0xf5, 0x43, 0x80, 0x06, 0xd2, 0x4b, 0x80, 0x02, 0xd2, 0x4c, 0xe4, 0xf5, 0x25, 0xe5, 0x42, 0xc4, -0x54, 0xf0, 0xff, 0xe5, 0x43, 0x54, 0x0f, 0x4f, 0xf5, 0x5f, 0xd2, 0x60, 0x22, 0xd2, 0x15, 0xe5, -0x47, 0x24, 0xf5, 0x60, 0x0b, 0x24, 0xcb, 0x60, 0x07, 0x24, 0x40, 0x70, 0x06, 0xc2, 0x15, 0x22, -0x12, 0x17, 0x79, 0x12, 0x14, 0x5f, 0xc2, 0x15, 0xc2, 0xaf, 0xc2, 0x04, 0xd2, 0xaf, 0x22, 0xc2, -0xaf, 0x90, 0x04, 0x14, 0xe0, 0x54, 0x0e, 0x60, 0x04, 0xd2, 0x18, 0x80, 0x08, 0xe5, 0x4e, 0x45, -0x4f, 0x24, 0xff, 0x92, 0x18, 0xd2, 0xaf, 0x90, 0x04, 0x14, 0xe0, 0xa2, 0xe4, 0x92, 0x19, 0x74, -0x1e, 0xf0, 0xe5, 0x5f, 0x54, 0x0f, 0xf5, 0x2d, 0xe5, 0x25, 0x70, 0x13, 0x30, 0x18, 0x05, 0xe5, -0x5f, 0x20, 0xe5, 0x0b, 0x30, 0x19, 0x19, 0xe5, 0x5f, 0x54, 0x30, 0xff, 0xbf, 0x30, 0x11, 0xe5, -0x25, 0x70, 0x05, 0x75, 0x25, 0x0c, 0x80, 0x02, 0x15, 0x25, 0xd2, 0x6c, 0xd2, 0x6d, 0x80, 0x0f, -0xe5, 0x5f, 0x30, 0xe6, 0x06, 0xc2, 0x6c, 0xd2, 0x6d, 0x80, 0x04, 0xd2, 0x6c, 0xc2, 0x6d, 0xe5, -0x47, 0x64, 0x03, 0x70, 0x21, 0x30, 0x4b, 0x06, 0xc2, 0x6c, 0xd2, 0x6d, 0x80, 0x18, 0xe5, 0x25, -0x70, 0x03, 0x30, 0x4c, 0x11, 0xc2, 0x4c, 0xe5, 0x25, 0x70, 0x05, 0x75, 0x25, 0x07, 0x80, 0x02, -0x15, 0x25, 0xd2, 0x6c, 0xd2, 0x6d, 0xe5, 0x47, 0xb4, 0x09, 0x14, 0xe5, 0x44, 0x20, 0xe3, 0x0b, -0xe5, 0x3a, 0x64, 0x02, 0x60, 0x05, 0xe5, 0x3a, 0xb4, 0x03, 0x04, 0xc2, 0x6c, 0xd2, 0x6d, 0xe5, -0x47, 0xb4, 0x0a, 0x13, 0xe5, 0x3a, 0xb4, 0x01, 0x06, 0xc2, 0x6c, 0xd2, 0x6d, 0x80, 0x08, 0xe5, -0x3a, 0x70, 0x04, 0xd2, 0x6c, 0xc2, 0x6d, 0x20, 0x69, 0x07, 0xe5, 0x5e, 0x20, 0xe0, 0x02, 0xb2, -0x68, 0x20, 0x6b, 0x07, 0xe5, 0x5e, 0x20, 0xe1, 0x02, 0xb2, 0x6a, 0x20, 0x6d, 0x07, 0xe5, 0x5e, -0x20, 0xe2, 0x02, 0xb2, 0x6c, 0x75, 0x2e, 0x40, 0x20, 0x69, 0x04, 0xa2, 0x68, 0x80, 0x26, 0x30, -0x68, 0x06, 0xe5, 0x46, 0xa2, 0xe2, 0x80, 0x1d, 0xe5, 0x5e, 0x20, 0xe2, 0x04, 0x7f, 0x01, 0x80, -0x02, 0x7f, 0x00, 0xe5, 0x46, 0x54, 0xf0, 0xfe, 0xbe, 0xf0, 0x04, 0x7e, 0x01, 0x80, 0x02, 0x7e, -0x00, 0xee, 0x6f, 0x24, 0xff, 0x92, 0x73, 0x92, 0x72, 0x20, 0x6b, 0x04, 0xa2, 0x6a, 0x80, 0x26, -0x30, 0x6a, 0x06, 0xe5, 0x46, 0xa2, 0xe2, 0x80, 0x1d, 0xe5, 0x5e, 0x20, 0xe0, 0x04, 0x7f, 0x01, -0x80, 0x02, 0x7f, 0x00, 0xe5, 0x46, 0x54, 0xf0, 0xfe, 0xbe, 0xf0, 0x04, 0x7e, 0x01, 0x80, 0x02, -0x7e, 0x00, 0xee, 0x6f, 0x24, 0xff, 0x92, 0x75, 0x92, 0x74, 0x20, 0x6d, 0x04, 0xa2, 0x6c, 0x80, -0x26, 0xe5, 0x47, 0x64, 0x0a, 0x70, 0x22, 0x30, 0x6c, 0x06, 0xe5, 0x46, 0xa2, 0xe3, 0x80, 0x17, -0xe5, 0x3a, 0xb4, 0x01, 0x06, 0xe5, 0x46, 0xa2, 0xe3, 0x80, 0x34, 0xe5, 0x46, 0x20, 0xe4, 0x03, -0x30, 0xe5, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x80, 0x26, 0x30, 0x6c, 0x06, 0xe5, 0x46, 0xa2, 0xe2, -0x80, 0x1d, 0xe5, 0x5e, 0x20, 0xe1, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xe5, 0x46, 0x54, -0xf0, 0xfe, 0xbe, 0xf0, 0x04, 0x7e, 0x01, 0x80, 0x02, 0x7e, 0x00, 0xee, 0x6f, 0x24, 0xff, 0x92, -0x71, 0x92, 0x70, 0x90, 0x10, 0x00, 0xe0, 0x90, 0x10, 0x2c, 0xf0, 0x90, 0x10, 0x03, 0xe0, 0xc3, -0x94, 0x30, 0x40, 0x14, 0xa2, 0x71, 0x92, 0x77, 0xa2, 0x70, 0x92, 0x76, 0xe5, 0x2e, 0x13, 0x13, -0x54, 0x3f, 0xf5, 0x2e, 0xc2, 0x77, 0xd2, 0x76, 0x90, 0x10, 0x2f, 0xe5, 0x2e, 0xf0, 0xe5, 0x47, -0x64, 0x06, 0x70, 0x39, 0x90, 0x02, 0x29, 0xe0, 0x54, 0xfe, 0xf0, 0xe5, 0x43, 0xc4, 0x54, 0x0f, -0x14, 0x60, 0x0c, 0x24, 0xfe, 0x60, 0x0c, 0x24, 0x03, 0x70, 0x13, 0xc2, 0x38, 0x80, 0x0f, 0xd2, -0x38, 0x80, 0x0b, 0xe5, 0x46, 0x30, 0xe2, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, 0x38, 0x30, 0x47, -0x05, 0xaf, 0x27, 0x02, 0x17, 0x73, 0xe5, 0x27, 0xf4, 0xff, 0x02, 0x17, 0x73, 0xe5, 0x47, 0x64, -0x07, 0x60, 0x0f, 0xe5, 0x47, 0x64, 0x08, 0x60, 0x09, 0xe5, 0x47, 0x64, 0x09, 0x60, 0x03, 0x02, -0x16, 0xf2, 0x90, 0x02, 0x29, 0xe0, 0x54, 0xfc, 0xf0, 0xe5, 0x3a, 0x14, 0x60, 0x22, 0x14, 0x60, -0x25, 0x14, 0x60, 0x2d, 0x24, 0xfc, 0x60, 0x49, 0x24, 0xf9, 0x60, 0x14, 0x24, 0x0e, 0x70, 0x50, -0xe5, 0x46, 0x13, 0x13, 0x54, 0x3f, 0x75, 0xf0, 0x03, 0x84, 0xe5, 0xf0, 0x24, 0xff, 0x80, 0x3a, -0xd2, 0x39, 0xc2, 0x38, 0x80, 0x3e, 0xe5, 0x46, 0x30, 0xe2, 0x03, 0xd3, 0x80, 0x1d, 0xc3, 0x80, -0x1a, 0xe5, 0x46, 0x30, 0xe2, 0x0d, 0x54, 0x38, 0xc3, 0x94, 0x30, 0x50, 0x06, 0x7e, 0x00, 0x7f, -0x01, 0x80, 0x04, 0x7e, 0x00, 0x7f, 0x00, 0xee, 0x4f, 0x24, 0xff, 0x92, 0x38, 0xc2, 0x39, 0x80, -0x13, 0xe5, 0x46, 0x30, 0xe2, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, 0x39, 0xc2, 0x38, 0x80, 0x04, -0xc2, 0x38, 0xc2, 0x39, 0x30, 0x47, 0x04, 0xaf, 0x27, 0x80, 0x04, 0xe5, 0x27, 0xf4, 0xff, 0x02, -0x17, 0x73, 0xe5, 0x47, 0x64, 0x0c, 0x60, 0x06, 0xe5, 0x47, 0x64, 0x0b, 0x70, 0x7a, 0x90, 0x02, -0x29, 0xe0, 0x54, 0xfd, 0xf0, 0xe5, 0x3a, 0x14, 0x60, 0x20, 0x14, 0x60, 0x21, 0x14, 0x60, 0x2b, -0x24, 0xfc, 0x60, 0x45, 0x24, 0xf9, 0x60, 0x12, 0x24, 0x0e, 0x70, 0x4a, 0xe5, 0x46, 0x13, 0x13, -0x54, 0x3f, 0x75, 0xf0, 0x03, 0x84, 0xe5, 0xf0, 0x80, 0x29, 0xd2, 0x39, 0x80, 0x3a, 0xe5, 0x46, -0x30, 0xe2, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, 0x39, 0x80, 0x2d, 0xe5, 0x46, 0x30, 0xe2, 0x0d, -0x54, 0x38, 0xc3, 0x94, 0x30, 0x50, 0x06, 0x7e, 0x00, 0x7f, 0x01, 0x80, 0x04, 0x7e, 0x00, 0x7f, -0x00, 0xee, 0x4f, 0x24, 0xff, 0x92, 0x39, 0x80, 0x0f, 0xe5, 0x46, 0x30, 0xe2, 0x03, 0xd3, 0x80, -0x01, 0xc3, 0x92, 0x39, 0x80, 0x02, 0xc2, 0x39, 0x30, 0x47, 0x04, 0xaf, 0x27, 0x80, 0x04, 0xe5, -0x27, 0xf4, 0xff, 0x90, 0x02, 0x28, 0xef, 0xf0, 0x22, 0xe5, 0x47, 0xb4, 0x0b, 0x10, 0x90, 0x02, -0x29, 0xe0, 0x54, 0xeb, 0xf0, 0xe5, 0x27, 0x54, 0xeb, 0x45, 0x45, 0xf5, 0x27, 0x22, 0xe4, 0x90, -0x02, 0x29, 0xf0, 0x30, 0x47, 0x04, 0xaf, 0x45, 0x80, 0x04, 0xe5, 0x45, 0xf4, 0xff, 0x90, 0x02, -0x28, 0xef, 0xf0, 0x22, 0x8f, 0x50, 0xd2, 0x59, 0x22, 0x8f, 0x54, 0xd2, 0x58, 0x22, 0xe4, 0xf5, -0x62, 0xc2, 0xaf, 0xe5, 0x51, 0x14, 0x60, 0x48, 0x14, 0x60, 0x66, 0x24, 0x02, 0x60, 0x03, 0x02, -0x18, 0xb6, 0xd2, 0x59, 0x75, 0x55, 0x01, 0x90, 0x02, 0xa2, 0xe0, 0x54, 0x7f, 0xf0, 0xa3, 0xe0, -0x20, 0xe7, 0x23, 0x90, 0x04, 0x34, 0xe0, 0xb4, 0x02, 0x1c, 0xa3, 0xe0, 0xb4, 0x02, 0x17, 0xa3, -0xe0, 0xb4, 0x02, 0x12, 0x7f, 0x20, 0x12, 0x17, 0xa4, 0x90, 0x10, 0x04, 0xe0, 0x54, 0xf3, 0xf0, -0x75, 0x51, 0x01, 0x02, 0x18, 0xb6, 0xe5, 0x50, 0x70, 0x06, 0x75, 0x62, 0x03, 0x02, 0x18, 0xb6, -0x90, 0x12, 0x00, 0xe0, 0x54, 0x03, 0x70, 0x12, 0x7f, 0x20, 0x12, 0x17, 0xa4, 0x90, 0x02, 0xa2, -0xe0, 0x54, 0xbf, 0xf0, 0x75, 0x51, 0x02, 0x02, 0x18, 0xb6, 0xe5, 0x50, 0x70, 0x03, 0x02, 0x18, -0xb1, 0x90, 0x02, 0xa3, 0xe0, 0x30, 0xe6, 0x03, 0x02, 0x18, 0xad, 0x90, 0x04, 0x37, 0xe0, 0x64, -0x22, 0x70, 0x7a, 0x90, 0x01, 0x8a, 0x74, 0x7e, 0xf0, 0x90, 0x01, 0x96, 0xf0, 0x90, 0x12, 0x04, -0x74, 0x0a, 0xf0, 0xe5, 0x58, 0xb4, 0x72, 0x15, 0xe5, 0x59, 0xb4, 0x35, 0x10, 0xe4, 0x90, 0x05, -0x00, 0xf0, 0xa3, 0x74, 0x08, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0x74, 0x03, 0xf0, 0x7f, 0x01, 0x12, -0x0d, 0x48, 0x90, 0x13, 0x28, 0xe0, 0x54, 0xf0, 0xf0, 0xa3, 0xe0, 0x54, 0xf0, 0xf0, 0xe5, 0x59, -0xb4, 0x35, 0x14, 0xe5, 0x3c, 0xf4, 0x60, 0x06, 0xa3, 0xe0, 0x54, 0xf3, 0x80, 0x14, 0x90, 0x13, -0x2a, 0xe0, 0x54, 0xfb, 0xf0, 0x80, 0x14, 0xe5, 0x3c, 0xf4, 0x90, 0x13, 0x2a, 0x60, 0x08, 0xe0, -0x54, 0xf2, 0x45, 0x3c, 0xf0, 0x80, 0x04, 0xe0, 0x54, 0xfa, 0xf0, 0x90, 0x04, 0x01, 0xe0, 0x54, -0xfd, 0xf0, 0x75, 0x62, 0x01, 0x75, 0x55, 0x02, 0xe4, 0xf5, 0x51, 0x80, 0x09, 0xe5, 0x50, 0x70, -0x05, 0x75, 0x62, 0x03, 0xf5, 0x51, 0xe5, 0x62, 0x60, 0x15, 0xc2, 0x01, 0xe4, 0xf5, 0x51, 0xc2, -0x59, 0xad, 0x62, 0xaf, 0x40, 0x12, 0x19, 0x61, 0xe5, 0x62, 0xb4, 0x03, 0x02, 0xd2, 0x03, 0xd2, -0xaf, 0x22, 0xc2, 0xaf, 0x30, 0x01, 0x12, 0xe4, 0x90, 0x01, 0x96, 0xf0, 0xf5, 0x51, 0xc2, 0x59, -0xc2, 0x01, 0x7d, 0x02, 0xaf, 0x40, 0x12, 0x19, 0x61, 0xe5, 0x52, 0x14, 0x60, 0x09, 0x04, 0x70, -0x6d, 0x75, 0x52, 0x01, 0x75, 0x55, 0x03, 0x90, 0x04, 0x01, 0xe0, 0x44, 0x0e, 0xf0, 0x90, 0x13, -0x28, 0xe0, 0x44, 0x0f, 0xf0, 0xa3, 0xe0, 0x44, 0x0f, 0xf0, 0xa3, 0xe0, 0x44, 0x05, 0xf0, 0x90, -0x12, 0x04, 0x74, 0x03, 0xf0, 0xe5, 0x58, 0xb4, 0x72, 0x16, 0xe5, 0x59, 0xb4, 0x35, 0x11, 0x90, -0x05, 0x00, 0x74, 0xe2, 0xf0, 0xa3, 0x74, 0x08, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0x74, 0x03, 0xf0, -0x7f, 0x01, 0x12, 0x0d, 0x48, 0x90, 0x02, 0xa2, 0xe0, 0x44, 0xc0, 0xf0, 0x90, 0x10, 0x04, 0xe0, -0x44, 0x0c, 0xf0, 0xe4, 0xf5, 0x52, 0xf5, 0x55, 0x30, 0x02, 0x09, 0xc2, 0x02, 0x7d, 0x01, 0xaf, -0x41, 0x12, 0x19, 0x61, 0x30, 0x03, 0x02, 0xc2, 0x03, 0xe4, 0x90, 0x01, 0x96, 0xf0, 0xd2, 0xaf, -0x22, 0xef, 0xf4, 0x60, 0x2d, 0xe4, 0xfe, 0x74, 0x14, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, -0x83, 0xe0, 0xb4, 0xff, 0x19, 0x74, 0x14, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xef, -0xf0, 0x74, 0x1c, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xed, 0xf0, 0x22, 0x0e, 0xbe, -0x04, 0xd5, 0x22, 0x22, 0x22, 0x90, 0x70, 0x2a, 0xe0, 0x30, 0xe1, 0x4d, 0xc2, 0xaf, 0x90, 0x70, -0x28, 0xe0, 0x90, 0x10, 0x1c, 0xf0, 0x90, 0x70, 0x29, 0xe0, 0x90, 0x10, 0x1d, 0xf0, 0x90, 0x70, -0x2a, 0xe0, 0x90, 0x10, 0x1e, 0xf0, 0x90, 0x10, 0x1c, 0xe0, 0xf5, 0x62, 0x90, 0x10, 0x1e, 0xe0, -0x20, 0xe1, 0xf3, 0x90, 0x10, 0x1c, 0xe0, 0x90, 0x70, 0x28, 0xf0, 0x90, 0x10, 0x1d, 0xe0, 0x90, -0x70, 0x29, 0xf0, 0x90, 0x10, 0x1e, 0xe0, 0x90, 0x70, 0x2a, 0xf0, 0x30, 0x4a, 0x07, 0x90, 0x70, -0x24, 0xe0, 0x44, 0x01, 0xf0, 0xc2, 0x05, 0xd2, 0xaf, 0x22, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x65, 0xd3, } ; diff --git a/drivers/staging/rt2860/common/rtmp_mcu.c b/drivers/staging/rt2860/common/rtmp_mcu.c index e80f587cff1a..844d4b987b78 100644 --- a/drivers/staging/rt2860/common/rtmp_mcu.c +++ b/drivers/staging/rt2860/common/rtmp_mcu.c @@ -37,35 +37,38 @@ #include "../rt_config.h" -#if defined(RT2860) || defined(RT3090) -#include "firmware.h" -#include "../../rt3090/firmware.h" -#endif -#ifdef RT2870 -#include "../../rt3070/firmware.h" -#include "firmware_3070.h" -#endif - -#include +#include +#include #ifdef RTMP_MAC_USB -/* */ -/* RT2870 Firmware Spec only used 1 oct for version expression */ -/* */ -#define FIRMWARE_MINOR_VERSION 7 -#endif /* RTMP_MAC_USB // */ -/* New 8k byte firmware size for RT3071/RT3072 */ -#define FIRMWAREIMAGE_MAX_LENGTH 0x2000 -#define FIRMWAREIMAGE_LENGTH (sizeof (FirmwareImage) / sizeof(u8)) -#define FIRMWARE_MAJOR_VERSION 0 +#define FIRMWAREIMAGE_LENGTH 0x1000 -#define FIRMWAREIMAGEV1_LENGTH 0x1000 -#define FIRMWAREIMAGEV2_LENGTH 0x1000 +#define FIRMWARE_2870_MIN_VERSION 12 +#define FIRMWARE_2870_FILENAME "rt2870.bin" +MODULE_FIRMWARE(FIRMWARE_2870_FILENAME); -#ifdef RTMP_MAC_PCI -#define FIRMWARE_MINOR_VERSION 2 -#endif /* RTMP_MAC_PCI // */ +#define FIRMWARE_3070_MIN_VERSION 17 +#define FIRMWARE_3070_FILENAME "rt3070.bin" +MODULE_FIRMWARE(FIRMWARE_3070_FILENAME); + +#define FIRMWARE_3071_MIN_VERSION 17 +#define FIRMWARE_3071_FILENAME "rt3071.bin" /* for RT3071/RT3072 */ +MODULE_FIRMWARE(FIRMWARE_3071_FILENAME); + +#else /* RTMP_MAC_PCI */ + +#define FIRMWAREIMAGE_LENGTH 0x2000 + +#define FIRMWARE_2860_MIN_VERSION 11 +#define FIRMWARE_2860_FILENAME "rt2860.bin" +MODULE_FIRMWARE(FIRMWARE_2860_FILENAME); + +#define FIRMWARE_3090_MIN_VERSION 19 +#define FIRMWARE_3090_FILENAME "rt3090.bin" /* for RT3090/RT3390 */ +MODULE_FIRMWARE(FIRMWARE_3090_FILENAME); + +#endif /* ======================================================================== @@ -90,6 +93,78 @@ int RtmpAsicEraseFirmware(struct rt_rtmp_adapter *pAd) return 0; } +static const struct firmware *rtmp_get_firmware(struct rt_rtmp_adapter *adapter) +{ + const char *name; + const struct firmware *fw = NULL; + u8 min_version; + struct device *dev; + int err; + + if (adapter->firmware) + return adapter->firmware; + +#ifdef RTMP_MAC_USB + if (IS_RT3071(adapter)) { + name = FIRMWARE_3071_FILENAME; + min_version = FIRMWARE_3071_MIN_VERSION; + } else if (IS_RT3070(adapter)) { + name = FIRMWARE_3070_FILENAME; + min_version = FIRMWARE_3070_MIN_VERSION; + } else { + name = FIRMWARE_2870_FILENAME; + min_version = FIRMWARE_2870_MIN_VERSION; + } + dev = &((struct os_cookie *)adapter->OS_Cookie)->pUsb_Dev->dev; +#else /* RTMP_MAC_PCI */ + if (IS_RT3090(adapter) || IS_RT3390(adapter)) { + name = FIRMWARE_3090_FILENAME; + min_version = FIRMWARE_3090_MIN_VERSION; + } else { + name = FIRMWARE_2860_FILENAME; + min_version = FIRMWARE_2860_MIN_VERSION; + } + dev = &((struct os_cookie *)adapter->OS_Cookie)->pci_dev->dev; +#endif + + err = request_firmware(&fw, name, dev); + if (err) { + dev_err(dev, "firmware file %s request failed (%d)\n", + name, err); + return NULL; + } + + if (fw->size < FIRMWAREIMAGE_LENGTH) { + dev_err(dev, "firmware file %s size is invalid\n", name); + goto invalid; + } + + /* is it new enough? */ + adapter->FirmwareVersion = fw->data[FIRMWAREIMAGE_LENGTH - 3]; + if (adapter->FirmwareVersion < min_version) { + dev_err(dev, + "firmware file %s is too old;" + " driver requires v%d or later\n", + name, min_version); + goto invalid; + } + + /* is the internal CRC correct? */ + if (crc_ccitt(0xffff, fw->data, FIRMWAREIMAGE_LENGTH - 2) != + (fw->data[FIRMWAREIMAGE_LENGTH - 2] | + (fw->data[FIRMWAREIMAGE_LENGTH - 1] << 8))) { + dev_err(dev, "firmware file %s failed internal CRC\n", name); + goto invalid; + } + + adapter->firmware = fw; + return fw; + +invalid: + release_firmware(fw); + return NULL; +} + /* ======================================================================== @@ -109,46 +184,16 @@ int RtmpAsicEraseFirmware(struct rt_rtmp_adapter *pAd) */ int RtmpAsicLoadFirmware(struct rt_rtmp_adapter *pAd) { - + const struct firmware *fw; int Status = NDIS_STATUS_SUCCESS; - u8 *pFirmwareImage = NULL; - unsigned long FileLength, Index; + unsigned long Index; u32 MacReg = 0; -#ifdef RTMP_MAC_USB - u32 Version = (pAd->MACVersion >> 16); -#endif - /* New 8k byte firmware size for RT3071/RT3072 */ - { -#ifdef RTMP_MAC_PCI - if (IS_RT3090(pAd) || IS_RT3390(pAd)) { - pFirmwareImage = FirmwareImage_3090; - FileLength = FIRMWAREIMAGE_MAX_LENGTH; - } else { - pFirmwareImage = FirmwareImage_2860; - FileLength = FIRMWAREIMAGE_MAX_LENGTH; - } -#endif /* RTMP_MAC_PCI // */ -#ifdef RTMP_MAC_USB - /* the firmware image consists of two parts */ - if ((Version != 0x2860) && (Version != 0x2872) && (Version != 0x3070)) { /* use the second part */ - /*printk("KH:Use New Version,part2\n"); */ - pFirmwareImage = - (u8 *)& - FirmwareImage_3070[FIRMWAREIMAGEV1_LENGTH]; - FileLength = FIRMWAREIMAGEV2_LENGTH; - } else { - /*printk("KH:Use New Version,part1\n"); */ - if (Version == 0x3070) - pFirmwareImage = FirmwareImage_3070; - else - pFirmwareImage = FirmwareImage_2870; - FileLength = FIRMWAREIMAGEV1_LENGTH; - } -#endif /* RTMP_MAC_USB // */ - } + fw = rtmp_get_firmware(pAd); + if (!fw) + return NDIS_STATUS_FAILURE; - RTMP_WRITE_FIRMWARE(pAd, pFirmwareImage, FileLength); + RTMP_WRITE_FIRMWARE(pAd, fw->data, FIRMWAREIMAGE_LENGTH); /* check if MCU is ready */ Index = 0; diff --git a/drivers/staging/rt2860/rt_linux.c b/drivers/staging/rt2860/rt_linux.c index 9d763b4f2261..b5c78aecf5e3 100644 --- a/drivers/staging/rt2860/rt_linux.c +++ b/drivers/staging/rt2860/rt_linux.c @@ -25,6 +25,7 @@ ************************************************************************* */ +#include #include #include "rt_config.h" @@ -260,6 +261,8 @@ void RTMPFreeAdapter(struct rt_rtmp_adapter *pAd) NdisFreeSpinLock(&pAd->irq_lock); + release_firmware(pAd->firmware); + vfree(pAd); /* pci_free_consistent(os_cookie->pci_dev,sizeof(struct rt_rtmp_adapter),pAd,os_cookie->pAd_pa); */ if (os_cookie) kfree(os_cookie); diff --git a/drivers/staging/rt2860/rtmp.h b/drivers/staging/rt2860/rtmp.h index 6c6503d2438f..4401a55bda67 100644 --- a/drivers/staging/rt2860/rtmp.h +++ b/drivers/staging/rt2860/rtmp.h @@ -1719,6 +1719,7 @@ struct rt_rtmp_adapter { void *OS_Cookie; /* save specific structure relative to OS */ struct net_device *net_dev; unsigned long VirtualIfCnt; + const struct firmware *firmware; struct rt_rtmp_chip_op chipOps; u16 ThisTbttNumToNextWakeUp; diff --git a/drivers/staging/rt2870/Kconfig b/drivers/staging/rt2870/Kconfig index fd3ba3a3b127..6ea172b433e9 100644 --- a/drivers/staging/rt2870/Kconfig +++ b/drivers/staging/rt2870/Kconfig @@ -3,5 +3,7 @@ config RT2870 depends on USB && X86 && WLAN select WIRELESS_EXT select WEXT_PRIV + select CRC_CCITT + select FW_LOADER ---help--- This is an experimental driver for the Ralink xx70 wireless chips. diff --git a/drivers/staging/rt3070/firmware.h b/drivers/staging/rt3070/firmware.h deleted file mode 100644 index 5cf9cbcf4ab6..000000000000 --- a/drivers/staging/rt3070/firmware.h +++ /dev/null @@ -1,558 +0,0 @@ -/* - Copyright (c) 2007, Ralink Technology Corporation - All rights reserved. - - Redistribution. Redistribution and use in binary form, without - modification, are permitted provided that the following conditions are - met: - - * Redistributions must reproduce the above copyright notice and the - following disclaimer in the documentation and/or other materials - provided with the distribution. - * Neither the name of Ralink Technology Corporation nor the names of its - suppliers may be used to endorse or promote products derived from this - software without specific prior written permission. - * No reverse engineering, decompilation, or disassembly of this software - is permitted. - - Limited patent license. Ralink Technology Corporation grants a world-wide, - royalty-free, non-exclusive license under patents it now or hereafter - owns or controls to make, have made, use, import, offer to sell and - sell ("Utilize") this software, but solely to the extent that any - such patent is necessary to Utilize the software alone, or in - combination with an operating system licensed under an approved Open - Source license as listed by the Open Source Initiative at - http://opensource.org/licenses. The patent license shall not apply to - any other combinations which include this software. No hardware per - se is licensed hereunder. - - DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, - BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE - USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - DAMAGE. -*/ -/* AUTO GEN PLEASE DO NOT MODIFY IT */ -/* AUTO GEN PLEASE DO NOT MODIFY IT */ - - -u8 FirmwareImage_2870 [] = { -0xff, 0xff, 0xff, 0x02, 0x10, 0x28, 0x02, 0x10, 0x32, 0x02, 0x10, 0x78, 0x02, 0x12, 0x67, 0x02, -0x12, 0x68, 0x02, 0x12, 0x87, 0x02, 0x12, 0x8c, 0x12, 0x12, 0x88, 0x22, 0x02, 0x16, 0x49, 0x02, -0x17, 0x1f, 0x02, 0x13, 0x77, 0x02, 0x12, 0x8d, 0x30, 0x05, 0x06, 0x20, 0x0d, 0x03, 0x12, 0x17, -0xc1, 0x22, 0x90, 0x01, 0x8c, 0xe0, 0x30, 0xe3, 0x1b, 0xe5, 0x4c, 0x30, 0xe0, 0x04, 0x7f, 0x40, -0x80, 0x02, 0x7f, 0x00, 0x90, 0x10, 0x2f, 0xef, 0xf0, 0x90, 0x01, 0x8c, 0x74, 0x08, 0xf0, 0xe4, -0x90, 0x01, 0xa7, 0xf0, 0x90, 0x01, 0x8c, 0xe0, 0x30, 0xe0, 0x1c, 0x90, 0x01, 0x80, 0xe0, 0xb4, -0x02, 0x15, 0xa3, 0xe0, 0xb4, 0x01, 0x10, 0x90, 0x01, 0x84, 0xe0, 0xb4, 0x81, 0x09, 0x90, 0x01, -0x8c, 0x74, 0x01, 0xf0, 0x12, 0x0d, 0xc8, 0x22, 0x90, 0x04, 0x14, 0xe0, 0x20, 0xe7, 0x03, 0x02, -0x12, 0x66, 0x90, 0x70, 0x12, 0xe0, 0xf5, 0x56, 0x90, 0x04, 0x04, 0xe0, 0x12, 0x0a, 0x9d, 0x10, -0xb7, 0x31, 0x10, 0xe0, 0x50, 0x11, 0x04, 0x51, 0x11, 0x0d, 0x52, 0x11, 0x0d, 0x53, 0x11, 0x0d, -0x54, 0x11, 0x4e, 0x55, 0x11, 0x7e, 0x70, 0x11, 0xa9, 0x71, 0x11, 0xd7, 0x72, 0x12, 0x1d, 0x73, -0x12, 0x3e, 0x80, 0x00, 0x00, 0x12, 0x66, 0x20, 0x02, 0x03, 0x30, 0x03, 0x1d, 0x7d, 0x02, 0xaf, -0x56, 0x12, 0x0b, 0x91, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, -0x56, 0xf4, 0x70, 0x03, 0x02, 0x12, 0x66, 0x02, 0x12, 0x5f, 0x85, 0x56, 0x41, 0xd2, 0x02, 0x22, -0x90, 0x70, 0x10, 0xe0, 0x54, 0x7f, 0x64, 0x02, 0x60, 0x03, 0x02, 0x12, 0x66, 0x90, 0x70, 0x11, -0xe0, 0x64, 0x08, 0x60, 0x08, 0xe0, 0x64, 0x20, 0x60, 0x03, 0x02, 0x12, 0x66, 0x75, 0x4e, 0x03, -0x75, 0x4f, 0x20, 0x22, 0x90, 0x70, 0x11, 0xe0, 0x24, 0xff, 0x92, 0x47, 0x22, 0x90, 0x04, 0x04, -0xe0, 0x25, 0xe0, 0x24, 0x5d, 0xf5, 0x57, 0x90, 0x70, 0x10, 0xe0, 0xff, 0x74, 0x47, 0x25, 0x57, -0xf8, 0xc6, 0xef, 0xc6, 0x90, 0x70, 0x11, 0xe0, 0xff, 0x74, 0x48, 0x25, 0x57, 0xf8, 0xc6, 0xef, -0xc6, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x0b, 0x91, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, -0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x70, 0x03, 0x02, 0x12, 0x66, 0x02, 0x12, 0x5f, 0xe5, 0x47, -0x64, 0x07, 0x60, 0x0b, 0xe5, 0x47, 0x64, 0x08, 0x60, 0x05, 0xe5, 0x47, 0xb4, 0x09, 0x08, 0x90, -0x70, 0x11, 0xe0, 0x54, 0x0f, 0xf5, 0x3a, 0xe5, 0x47, 0xb4, 0x09, 0x08, 0xe5, 0x3a, 0xb4, 0x03, -0x03, 0xe4, 0xf5, 0x46, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x0b, 0x91, 0xd2, 0x04, 0x22, 0x90, 0x70, -0x10, 0xe0, 0xfe, 0x90, 0x70, 0x11, 0xe0, 0xfd, 0xed, 0xf8, 0xe6, 0xf5, 0x57, 0xfd, 0xaf, 0x56, -0x12, 0x0b, 0x91, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, -0xf4, 0x70, 0x03, 0x02, 0x12, 0x66, 0x02, 0x12, 0x5f, 0x90, 0x70, 0x10, 0xe0, 0xfe, 0x90, 0x70, -0x11, 0xe0, 0xfd, 0xed, 0xf5, 0x82, 0x8e, 0x83, 0xe0, 0xf5, 0x57, 0xfd, 0xaf, 0x56, 0x12, 0x0b, -0x91, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x70, -0x03, 0x02, 0x12, 0x66, 0x02, 0x12, 0x5f, 0x90, 0x10, 0x02, 0xe0, 0xb4, 0x70, 0x1e, 0xa3, 0xe0, -0xb4, 0x30, 0x19, 0x90, 0x05, 0x08, 0xe0, 0x44, 0x01, 0xf0, 0xfd, 0x90, 0x05, 0x05, 0xe0, 0x54, -0xfb, 0xf0, 0x44, 0x04, 0xf0, 0xed, 0x54, 0xfe, 0x90, 0x05, 0x08, 0xf0, 0xe4, 0xf5, 0x4e, 0xf5, -0x4f, 0x75, 0x3a, 0xff, 0xad, 0x57, 0xaf, 0x56, 0x12, 0x0b, 0x91, 0x90, 0x04, 0x14, 0x74, 0x80, -0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x60, 0x4b, 0x80, 0x42, 0x90, 0x70, 0x10, -0xe0, 0x24, 0xff, 0x92, 0x93, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x0b, 0x91, 0x90, 0x04, 0x14, 0x74, -0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x60, 0x2a, 0x80, 0x21, 0x90, 0x70, -0x10, 0xe0, 0x24, 0xff, 0x92, 0x4a, 0xd2, 0x05, 0xad, 0x57, 0xaf, 0x56, 0x12, 0x0b, 0x91, 0x90, -0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x60, 0x07, 0x90, -0x70, 0x25, 0xe0, 0x44, 0x01, 0xf0, 0x22, 0x22, 0xe5, 0x53, 0x70, 0x1a, 0x30, 0x60, 0x09, 0xb2, -0x4d, 0x30, 0x4d, 0x04, 0x05, 0x46, 0xc2, 0x04, 0xe5, 0x4f, 0x45, 0x4e, 0x60, 0x08, 0xe5, 0x4f, -0x15, 0x4f, 0x70, 0x02, 0x15, 0x4e, 0x22, 0x22, 0xc2, 0x42, 0xd3, 0x22, 0x22, 0xc2, 0x4b, 0xc2, -0x4c, 0xe5, 0x44, 0x12, 0x0a, 0x9d, 0x12, 0xaf, 0x00, 0x13, 0x42, 0x04, 0x13, 0x3e, 0x08, 0x13, -0x19, 0x10, 0x12, 0xc3, 0x20, 0x12, 0xe3, 0x60, 0x12, 0xf4, 0xa0, 0x00, 0x00, 0x13, 0x44, 0x85, -0x48, 0x43, 0x85, 0x4a, 0x42, 0x85, 0x4c, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x60, 0x03, 0x02, 0x13, -0x44, 0x80, 0x1b, 0xe5, 0x48, 0xc4, 0x54, 0x0f, 0xf5, 0x43, 0xe5, 0x4a, 0xc4, 0x54, 0x0f, 0xf5, -0x42, 0xe5, 0x4c, 0xc4, 0x54, 0x0f, 0xf5, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x70, 0x66, 0x53, 0x43, -0x0f, 0x80, 0x61, 0x85, 0x49, 0x43, 0x85, 0x4b, 0x42, 0x85, 0x4d, 0x5e, 0xe5, 0x47, 0x64, 0x06, -0x70, 0x52, 0x80, 0x1b, 0xe5, 0x49, 0xc4, 0x54, 0x0f, 0xf5, 0x43, 0xe5, 0x4b, 0xc4, 0x54, 0x0f, -0xf5, 0x42, 0xe5, 0x4d, 0xc4, 0x54, 0x0f, 0xf5, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x70, 0x35, 0xe5, -0x43, 0x54, 0x0f, 0x44, 0x10, 0xf5, 0x43, 0x80, 0x2b, 0xe5, 0x47, 0xb4, 0x04, 0x06, 0x53, 0x5e, -0xfb, 0x75, 0x42, 0x09, 0xe5, 0x47, 0xb4, 0x05, 0x06, 0x43, 0x5e, 0x04, 0x75, 0x42, 0x09, 0xe5, -0x47, 0xb4, 0x06, 0x10, 0xe5, 0x43, 0x54, 0x0f, 0x44, 0x30, 0xf5, 0x43, 0x80, 0x06, 0xd2, 0x4b, -0x80, 0x02, 0xd2, 0x4c, 0xe4, 0xf5, 0x25, 0xe5, 0x42, 0xc4, 0x54, 0xf0, 0xff, 0xe5, 0x43, 0x54, -0x0f, 0x4f, 0xf5, 0x5f, 0x90, 0x70, 0x44, 0xf0, 0xa3, 0xe5, 0x5e, 0xf0, 0xa3, 0xe5, 0x4a, 0xf0, -0xa3, 0xe5, 0x48, 0xf0, 0xa3, 0xe5, 0x4c, 0xf0, 0xa3, 0xe5, 0x44, 0xf0, 0xa3, 0xe5, 0x42, 0xf0, -0xa3, 0xe5, 0x43, 0xf0, 0xd2, 0x60, 0x22, 0xe5, 0x47, 0x60, 0x10, 0x24, 0xc0, 0x70, 0x03, 0x12, -0x16, 0x29, 0x12, 0x13, 0x8c, 0xc2, 0xaf, 0xc2, 0x04, 0xd2, 0xaf, 0x22, 0xc2, 0xaf, 0x90, 0x04, -0x14, 0xe0, 0x54, 0x0e, 0x60, 0x04, 0xd2, 0x18, 0x80, 0x08, 0xe5, 0x4e, 0x45, 0x4f, 0x24, 0xff, -0x92, 0x18, 0xd2, 0xaf, 0x90, 0x04, 0x14, 0xe0, 0xa2, 0xe4, 0x92, 0x19, 0x74, 0x1e, 0xf0, 0xe5, -0x5f, 0x54, 0x0f, 0xf5, 0x2d, 0xe5, 0x25, 0x70, 0x13, 0x30, 0x18, 0x05, 0xe5, 0x5f, 0x20, 0xe5, -0x0b, 0x30, 0x19, 0x19, 0xe5, 0x5f, 0x54, 0x30, 0xff, 0xbf, 0x30, 0x11, 0xe5, 0x25, 0x70, 0x05, -0x75, 0x25, 0x0c, 0x80, 0x02, 0x15, 0x25, 0xd2, 0x6c, 0xd2, 0x6d, 0x80, 0x0f, 0xe5, 0x5f, 0x30, -0xe6, 0x06, 0xc2, 0x6c, 0xd2, 0x6d, 0x80, 0x04, 0xd2, 0x6c, 0xc2, 0x6d, 0xe5, 0x47, 0x64, 0x03, -0x70, 0x21, 0x30, 0x4b, 0x06, 0xc2, 0x6c, 0xd2, 0x6d, 0x80, 0x18, 0xe5, 0x25, 0x70, 0x03, 0x30, -0x4c, 0x11, 0xc2, 0x4c, 0xe5, 0x25, 0x70, 0x05, 0x75, 0x25, 0x07, 0x80, 0x02, 0x15, 0x25, 0xd2, -0x6c, 0xd2, 0x6d, 0xe5, 0x47, 0xb4, 0x09, 0x14, 0xe5, 0x44, 0x20, 0xe3, 0x0b, 0xe5, 0x3a, 0x64, -0x02, 0x60, 0x05, 0xe5, 0x3a, 0xb4, 0x03, 0x04, 0xc2, 0x6c, 0xd2, 0x6d, 0x90, 0x70, 0x46, 0xe5, -0x2d, 0xf0, 0x20, 0x69, 0x07, 0xe5, 0x5e, 0x20, 0xe0, 0x02, 0xb2, 0x68, 0x20, 0x6b, 0x07, 0xe5, -0x5e, 0x20, 0xe1, 0x02, 0xb2, 0x6a, 0x20, 0x6d, 0x07, 0xe5, 0x5e, 0x20, 0xe2, 0x02, 0xb2, 0x6c, -0x90, 0x70, 0x47, 0xe5, 0x2d, 0xf0, 0x75, 0x2e, 0x40, 0x20, 0x69, 0x04, 0xa2, 0x68, 0x80, 0x26, -0x30, 0x68, 0x06, 0xe5, 0x46, 0xa2, 0xe2, 0x80, 0x1d, 0xe5, 0x5e, 0x20, 0xe2, 0x04, 0x7f, 0x01, -0x80, 0x02, 0x7f, 0x00, 0xe5, 0x46, 0x54, 0xf0, 0xfe, 0xbe, 0xf0, 0x04, 0x7e, 0x01, 0x80, 0x02, -0x7e, 0x00, 0xee, 0x6f, 0x24, 0xff, 0x92, 0x73, 0x92, 0x72, 0x20, 0x6b, 0x04, 0xa2, 0x6a, 0x80, -0x26, 0x30, 0x6a, 0x06, 0xe5, 0x46, 0xa2, 0xe2, 0x80, 0x1d, 0xe5, 0x5e, 0x20, 0xe0, 0x04, 0x7f, -0x01, 0x80, 0x02, 0x7f, 0x00, 0xe5, 0x46, 0x54, 0xf0, 0xfe, 0xbe, 0xf0, 0x04, 0x7e, 0x01, 0x80, -0x02, 0x7e, 0x00, 0xee, 0x6f, 0x24, 0xff, 0x92, 0x75, 0x92, 0x74, 0x20, 0x6d, 0x04, 0xa2, 0x6c, -0x80, 0x26, 0x30, 0x6c, 0x06, 0xe5, 0x46, 0xa2, 0xe2, 0x80, 0x1d, 0xe5, 0x5e, 0x20, 0xe1, 0x04, -0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xe5, 0x46, 0x54, 0xf0, 0xfe, 0xbe, 0xf0, 0x04, 0x7e, 0x01, -0x80, 0x02, 0x7e, 0x00, 0xee, 0x6f, 0x24, 0xff, 0x92, 0x71, 0x92, 0x70, 0x90, 0x10, 0x00, 0xe0, -0x90, 0x10, 0x2f, 0xf0, 0x90, 0x10, 0x03, 0xe0, 0xc3, 0x94, 0x30, 0x40, 0x14, 0xa2, 0x71, 0x92, -0x77, 0xa2, 0x70, 0x92, 0x76, 0xe5, 0x2e, 0x13, 0x13, 0x54, 0x3f, 0xf5, 0x2e, 0xc2, 0x77, 0xd2, -0x76, 0x90, 0x10, 0x2f, 0xe5, 0x2e, 0xf0, 0xe5, 0x47, 0x64, 0x06, 0x70, 0x4c, 0x90, 0x02, 0x29, -0xe0, 0x54, 0xfe, 0xf0, 0xe5, 0x43, 0xc4, 0x54, 0x0f, 0x14, 0x60, 0x14, 0x24, 0xfe, 0x60, 0x23, -0x24, 0x03, 0x60, 0x03, 0x02, 0x16, 0x18, 0x90, 0x02, 0x28, 0xe0, 0x30, 0x47, 0x0f, 0x80, 0x07, -0x90, 0x02, 0x28, 0xe0, 0x20, 0x47, 0x06, 0x54, 0xfe, 0xf0, 0x02, 0x16, 0x18, 0x44, 0x01, 0xf0, -0x02, 0x16, 0x18, 0xe5, 0x46, 0x30, 0xe2, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0x90, 0x02, -0x28, 0xe0, 0x54, 0xfe, 0x4f, 0xf0, 0x02, 0x16, 0x18, 0xe5, 0x47, 0x64, 0x07, 0x60, 0x0f, 0xe5, -0x47, 0x64, 0x08, 0x60, 0x09, 0xe5, 0x47, 0x64, 0x09, 0x60, 0x03, 0x02, 0x16, 0x18, 0xe4, 0xf5, -0x27, 0x90, 0x02, 0x29, 0xe0, 0x54, 0xfc, 0xf0, 0xe5, 0x3a, 0x14, 0x60, 0x2d, 0x14, 0x60, 0x2e, -0x14, 0x60, 0x36, 0x24, 0xfc, 0x60, 0x5f, 0x24, 0xf9, 0x60, 0x1f, 0x24, 0x0e, 0x70, 0x69, 0xe5, -0x46, 0x13, 0x13, 0x54, 0x3f, 0x75, 0xf0, 0x03, 0x84, 0xaf, 0xf0, 0x20, 0x47, 0x04, 0x7e, 0x01, -0x80, 0x02, 0x7e, 0x00, 0xef, 0x6e, 0x24, 0xff, 0x80, 0x45, 0xa2, 0x47, 0x80, 0x41, 0xe5, 0x46, -0x30, 0xe2, 0x03, 0xd3, 0x80, 0x27, 0xc3, 0x80, 0x24, 0xe5, 0x46, 0x30, 0xe2, 0x0d, 0x54, 0x38, -0xc3, 0x94, 0x30, 0x50, 0x06, 0x7e, 0x00, 0x7f, 0x01, 0x80, 0x04, 0x7e, 0x00, 0x7f, 0x00, 0x20, -0x47, 0x04, 0x7d, 0x01, 0x80, 0x02, 0x7d, 0x00, 0xef, 0x6d, 0x4e, 0x24, 0xff, 0x92, 0x38, 0xa2, -0x47, 0xb3, 0x92, 0x39, 0x80, 0x19, 0xe5, 0x46, 0x30, 0xe2, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, -0x39, 0xa2, 0x47, 0xb3, 0x92, 0x38, 0x80, 0x07, 0xa2, 0x47, 0xb3, 0x92, 0x38, 0x92, 0x39, 0x90, -0x02, 0x28, 0xe0, 0x54, 0xfc, 0x45, 0x27, 0xf0, 0x90, 0x70, 0x9c, 0xe5, 0x3a, 0xf0, 0xa3, 0xe5, -0x47, 0xf0, 0x90, 0x70, 0x41, 0xe5, 0x3a, 0xf0, 0x22, 0xe4, 0x90, 0x02, 0x29, 0xf0, 0x30, 0x47, -0x04, 0xaf, 0x45, 0x80, 0x04, 0xe5, 0x45, 0xf4, 0xff, 0x90, 0x02, 0x28, 0xef, 0xf0, 0x22, 0x8f, -0x50, 0xd2, 0x59, 0x22, 0x8f, 0x54, 0xd2, 0x58, 0x22, 0xe4, 0xf5, 0x62, 0xc2, 0xaf, 0xe5, 0x51, -0x14, 0x60, 0x46, 0x14, 0x60, 0x62, 0x24, 0x02, 0x60, 0x03, 0x02, 0x17, 0x03, 0xd2, 0x59, 0x75, -0x55, 0x01, 0x90, 0x02, 0xa2, 0xe0, 0x54, 0x7f, 0xf0, 0xa3, 0xe0, 0x20, 0xe7, 0x22, 0x90, 0x04, -0x34, 0xe0, 0xb4, 0x02, 0x1b, 0xa3, 0xe0, 0xb4, 0x02, 0x16, 0xa3, 0xe0, 0xb4, 0x02, 0x11, 0x7f, -0x20, 0x12, 0x16, 0x3f, 0x90, 0x10, 0x04, 0xe0, 0x54, 0xf3, 0xf0, 0x75, 0x51, 0x01, 0x80, 0x73, -0xe5, 0x50, 0x70, 0x05, 0x75, 0x62, 0x03, 0x80, 0x6a, 0x90, 0x12, 0x00, 0xe0, 0x54, 0x03, 0x70, -0x11, 0x7f, 0x20, 0x12, 0x16, 0x3f, 0x90, 0x02, 0xa2, 0xe0, 0x54, 0xbf, 0xf0, 0x75, 0x51, 0x02, -0x80, 0x51, 0xe5, 0x50, 0x70, 0x02, 0x80, 0x46, 0x90, 0x02, 0xa3, 0xe0, 0x20, 0xe6, 0x3b, 0x90, -0x04, 0x37, 0xe0, 0x64, 0x22, 0x70, 0x33, 0x90, 0x01, 0x8a, 0x74, 0x7e, 0xf0, 0x90, 0x01, 0x96, -0xf0, 0x90, 0x12, 0x04, 0x74, 0x0a, 0xf0, 0x90, 0x13, 0x28, 0xe0, 0x54, 0xf0, 0xf0, 0xa3, 0xe0, -0x54, 0xf0, 0xf0, 0xa3, 0xe0, 0x54, 0xfa, 0xf0, 0x90, 0x04, 0x01, 0xe0, 0x54, 0xf9, 0xf0, 0x75, -0x62, 0x01, 0x75, 0x55, 0x02, 0xe4, 0xf5, 0x51, 0x80, 0x09, 0xe5, 0x50, 0x70, 0x05, 0x75, 0x62, -0x03, 0xf5, 0x51, 0xe5, 0x62, 0x60, 0x15, 0xc2, 0x01, 0xe4, 0xf5, 0x51, 0xc2, 0x59, 0xad, 0x62, -0xaf, 0x40, 0x12, 0x17, 0x8d, 0xe5, 0x62, 0xb4, 0x03, 0x02, 0xd2, 0x03, 0xd2, 0xaf, 0x22, 0xc2, -0xaf, 0x30, 0x01, 0x12, 0xe4, 0x90, 0x01, 0x96, 0xf0, 0xf5, 0x51, 0xc2, 0x59, 0xc2, 0x01, 0x7d, -0x02, 0xaf, 0x40, 0x12, 0x17, 0x8d, 0xe5, 0x52, 0x14, 0x60, 0x09, 0x04, 0x70, 0x4c, 0x75, 0x52, -0x01, 0x75, 0x55, 0x03, 0x90, 0x04, 0x01, 0xe0, 0x44, 0x0e, 0xf0, 0x90, 0x13, 0x28, 0xe0, 0x44, -0x0f, 0xf0, 0xa3, 0xe0, 0x44, 0x0f, 0xf0, 0xa3, 0xe0, 0x44, 0x05, 0xf0, 0x90, 0x12, 0x04, 0x74, -0x03, 0xf0, 0x90, 0x02, 0xa2, 0xe0, 0x44, 0xc0, 0xf0, 0x90, 0x10, 0x04, 0xe0, 0x44, 0x0c, 0xf0, -0xe4, 0xf5, 0x52, 0xf5, 0x55, 0x30, 0x02, 0x0b, 0xc2, 0x02, 0x7d, 0x01, 0xaf, 0x41, 0x12, 0x17, -0x8d, 0x80, 0x02, 0xc2, 0x03, 0xe4, 0x90, 0x01, 0x96, 0xf0, 0xd2, 0xaf, 0x22, 0xef, 0xf4, 0x60, -0x2d, 0xe4, 0xfe, 0x74, 0x14, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xe0, 0xb4, 0xff, -0x19, 0x74, 0x14, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xef, 0xf0, 0x74, 0x1c, 0x2e, -0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xed, 0xf0, 0x22, 0x0e, 0xbe, 0x04, 0xd5, 0x22, 0x22, -0x22, 0x90, 0x70, 0x2a, 0xe0, 0x30, 0xe1, 0x4d, 0xc2, 0xaf, 0x90, 0x70, 0x28, 0xe0, 0x90, 0x10, -0x1c, 0xf0, 0x90, 0x70, 0x29, 0xe0, 0x90, 0x10, 0x1d, 0xf0, 0x90, 0x70, 0x2a, 0xe0, 0x90, 0x10, -0x1e, 0xf0, 0x90, 0x10, 0x1c, 0xe0, 0xf5, 0x62, 0x90, 0x10, 0x1e, 0xe0, 0x20, 0xe1, 0xf3, 0x90, -0x10, 0x1c, 0xe0, 0x90, 0x70, 0x28, 0xf0, 0x90, 0x10, 0x1d, 0xe0, 0x90, 0x70, 0x29, 0xf0, 0x90, -0x10, 0x1e, 0xe0, 0x90, 0x70, 0x2a, 0xf0, 0x30, 0x4a, 0x07, 0x90, 0x70, 0x24, 0xe0, 0x44, 0x01, -0xf0, 0xc2, 0x05, 0xd2, 0xaf, 0x22, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x94, 0x3f, -0xff, 0xff, 0xff, 0x02, 0x10, 0x28, 0x02, 0x10, 0x32, 0x02, 0x10, 0x78, 0x02, 0x12, 0x67, 0x02, -0x12, 0x68, 0x02, 0x12, 0x87, 0x02, 0x12, 0x8c, 0x12, 0x12, 0x88, 0x22, 0x02, 0x16, 0x49, 0x02, -0x17, 0x1f, 0x02, 0x13, 0x77, 0x02, 0x12, 0x8d, 0x30, 0x05, 0x06, 0x20, 0x0d, 0x03, 0x12, 0x17, -0xc1, 0x22, 0x90, 0x01, 0x8c, 0xe0, 0x30, 0xe3, 0x1b, 0xe5, 0x4c, 0x30, 0xe0, 0x04, 0x7f, 0x40, -0x80, 0x02, 0x7f, 0x00, 0x90, 0x10, 0x2f, 0xef, 0xf0, 0x90, 0x01, 0x8c, 0x74, 0x08, 0xf0, 0xe4, -0x90, 0x01, 0xa7, 0xf0, 0x90, 0x01, 0x8c, 0xe0, 0x30, 0xe0, 0x1c, 0x90, 0x01, 0x80, 0xe0, 0xb4, -0x02, 0x15, 0xa3, 0xe0, 0xb4, 0x01, 0x10, 0x90, 0x01, 0x84, 0xe0, 0xb4, 0x81, 0x09, 0x90, 0x01, -0x8c, 0x74, 0x01, 0xf0, 0x12, 0x0d, 0xdd, 0x22, 0x90, 0x04, 0x14, 0xe0, 0x20, 0xe7, 0x03, 0x02, -0x12, 0x66, 0x90, 0x70, 0x12, 0xe0, 0xf5, 0x56, 0x90, 0x04, 0x04, 0xe0, 0x12, 0x0a, 0xb6, 0x10, -0xb7, 0x31, 0x10, 0xe0, 0x50, 0x11, 0x04, 0x51, 0x11, 0x0d, 0x52, 0x11, 0x0d, 0x53, 0x11, 0x0d, -0x54, 0x11, 0x4e, 0x55, 0x11, 0x7e, 0x70, 0x11, 0xa9, 0x71, 0x11, 0xd7, 0x72, 0x12, 0x1d, 0x73, -0x12, 0x3e, 0x80, 0x00, 0x00, 0x12, 0x66, 0x20, 0x02, 0x03, 0x30, 0x03, 0x1d, 0x7d, 0x02, 0xaf, -0x56, 0x12, 0x0b, 0xaa, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, -0x56, 0xf4, 0x70, 0x03, 0x02, 0x12, 0x66, 0x02, 0x12, 0x5f, 0x85, 0x56, 0x41, 0xd2, 0x02, 0x22, -0x90, 0x70, 0x10, 0xe0, 0x54, 0x7f, 0x64, 0x02, 0x60, 0x03, 0x02, 0x12, 0x66, 0x90, 0x70, 0x11, -0xe0, 0x64, 0x08, 0x60, 0x08, 0xe0, 0x64, 0x20, 0x60, 0x03, 0x02, 0x12, 0x66, 0x75, 0x4e, 0x03, -0x75, 0x4f, 0x20, 0x22, 0x90, 0x70, 0x11, 0xe0, 0x24, 0xff, 0x92, 0x47, 0x22, 0x90, 0x04, 0x04, -0xe0, 0x25, 0xe0, 0x24, 0x5d, 0xf5, 0x57, 0x90, 0x70, 0x10, 0xe0, 0xff, 0x74, 0x47, 0x25, 0x57, -0xf8, 0xc6, 0xef, 0xc6, 0x90, 0x70, 0x11, 0xe0, 0xff, 0x74, 0x48, 0x25, 0x57, 0xf8, 0xc6, 0xef, -0xc6, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x0b, 0xaa, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, -0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x70, 0x03, 0x02, 0x12, 0x66, 0x02, 0x12, 0x5f, 0xe5, 0x47, -0x64, 0x07, 0x60, 0x0b, 0xe5, 0x47, 0x64, 0x08, 0x60, 0x05, 0xe5, 0x47, 0xb4, 0x09, 0x08, 0x90, -0x70, 0x11, 0xe0, 0x54, 0x0f, 0xf5, 0x3a, 0xe5, 0x47, 0xb4, 0x09, 0x08, 0xe5, 0x3a, 0xb4, 0x03, -0x03, 0xe4, 0xf5, 0x46, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x0b, 0xaa, 0xd2, 0x04, 0x22, 0x90, 0x70, -0x10, 0xe0, 0xfe, 0x90, 0x70, 0x11, 0xe0, 0xfd, 0xed, 0xf8, 0xe6, 0xf5, 0x57, 0xfd, 0xaf, 0x56, -0x12, 0x0b, 0xaa, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, -0xf4, 0x70, 0x03, 0x02, 0x12, 0x66, 0x02, 0x12, 0x5f, 0x90, 0x70, 0x10, 0xe0, 0xfe, 0x90, 0x70, -0x11, 0xe0, 0xfd, 0xed, 0xf5, 0x82, 0x8e, 0x83, 0xe0, 0xf5, 0x57, 0xfd, 0xaf, 0x56, 0x12, 0x0b, -0xaa, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x70, -0x03, 0x02, 0x12, 0x66, 0x02, 0x12, 0x5f, 0x90, 0x10, 0x02, 0xe0, 0xb4, 0x70, 0x1e, 0xa3, 0xe0, -0xb4, 0x30, 0x19, 0x90, 0x05, 0x08, 0xe0, 0x44, 0x01, 0xf0, 0xfd, 0x90, 0x05, 0x05, 0xe0, 0x54, -0xfb, 0xf0, 0x44, 0x04, 0xf0, 0xed, 0x54, 0xfe, 0x90, 0x05, 0x08, 0xf0, 0xe4, 0xf5, 0x4e, 0xf5, -0x4f, 0x75, 0x3a, 0xff, 0xad, 0x57, 0xaf, 0x56, 0x12, 0x0b, 0xaa, 0x90, 0x04, 0x14, 0x74, 0x80, -0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x60, 0x4b, 0x80, 0x42, 0x90, 0x70, 0x10, -0xe0, 0x24, 0xff, 0x92, 0x93, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x0b, 0xaa, 0x90, 0x04, 0x14, 0x74, -0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x60, 0x2a, 0x80, 0x21, 0x90, 0x70, -0x10, 0xe0, 0x24, 0xff, 0x92, 0x4a, 0xd2, 0x05, 0xad, 0x57, 0xaf, 0x56, 0x12, 0x0b, 0xaa, 0x90, -0x04, 0x14, 0x74, 0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0xe5, 0x56, 0xf4, 0x60, 0x07, 0x90, -0x70, 0x25, 0xe0, 0x44, 0x01, 0xf0, 0x22, 0x22, 0xe5, 0x53, 0x70, 0x1a, 0x30, 0x60, 0x09, 0xb2, -0x4d, 0x30, 0x4d, 0x04, 0x05, 0x46, 0xc2, 0x04, 0xe5, 0x4f, 0x45, 0x4e, 0x60, 0x08, 0xe5, 0x4f, -0x15, 0x4f, 0x70, 0x02, 0x15, 0x4e, 0x22, 0x22, 0xc2, 0x42, 0xd3, 0x22, 0x22, 0xc2, 0x4b, 0xc2, -0x4c, 0xe5, 0x44, 0x12, 0x0a, 0xb6, 0x12, 0xaf, 0x00, 0x13, 0x42, 0x04, 0x13, 0x3e, 0x08, 0x13, -0x19, 0x10, 0x12, 0xc3, 0x20, 0x12, 0xe3, 0x60, 0x12, 0xf4, 0xa0, 0x00, 0x00, 0x13, 0x44, 0x85, -0x48, 0x43, 0x85, 0x4a, 0x42, 0x85, 0x4c, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x60, 0x03, 0x02, 0x13, -0x44, 0x80, 0x1b, 0xe5, 0x48, 0xc4, 0x54, 0x0f, 0xf5, 0x43, 0xe5, 0x4a, 0xc4, 0x54, 0x0f, 0xf5, -0x42, 0xe5, 0x4c, 0xc4, 0x54, 0x0f, 0xf5, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x70, 0x66, 0x53, 0x43, -0x0f, 0x80, 0x61, 0x85, 0x49, 0x43, 0x85, 0x4b, 0x42, 0x85, 0x4d, 0x5e, 0xe5, 0x47, 0x64, 0x06, -0x70, 0x52, 0x80, 0x1b, 0xe5, 0x49, 0xc4, 0x54, 0x0f, 0xf5, 0x43, 0xe5, 0x4b, 0xc4, 0x54, 0x0f, -0xf5, 0x42, 0xe5, 0x4d, 0xc4, 0x54, 0x0f, 0xf5, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x70, 0x35, 0xe5, -0x43, 0x54, 0x0f, 0x44, 0x10, 0xf5, 0x43, 0x80, 0x2b, 0xe5, 0x47, 0xb4, 0x04, 0x06, 0x53, 0x5e, -0xfb, 0x75, 0x42, 0x09, 0xe5, 0x47, 0xb4, 0x05, 0x06, 0x43, 0x5e, 0x04, 0x75, 0x42, 0x09, 0xe5, -0x47, 0xb4, 0x06, 0x10, 0xe5, 0x43, 0x54, 0x0f, 0x44, 0x30, 0xf5, 0x43, 0x80, 0x06, 0xd2, 0x4b, -0x80, 0x02, 0xd2, 0x4c, 0xe4, 0xf5, 0x25, 0xe5, 0x42, 0xc4, 0x54, 0xf0, 0xff, 0xe5, 0x43, 0x54, -0x0f, 0x4f, 0xf5, 0x5f, 0x90, 0x70, 0x44, 0xf0, 0xa3, 0xe5, 0x5e, 0xf0, 0xa3, 0xe5, 0x4a, 0xf0, -0xa3, 0xe5, 0x48, 0xf0, 0xa3, 0xe5, 0x4c, 0xf0, 0xa3, 0xe5, 0x44, 0xf0, 0xa3, 0xe5, 0x42, 0xf0, -0xa3, 0xe5, 0x43, 0xf0, 0xd2, 0x60, 0x22, 0xe5, 0x47, 0x60, 0x10, 0x24, 0xc0, 0x70, 0x03, 0x12, -0x16, 0x29, 0x12, 0x13, 0x8c, 0xc2, 0xaf, 0xc2, 0x04, 0xd2, 0xaf, 0x22, 0xc2, 0xaf, 0x90, 0x04, -0x14, 0xe0, 0x54, 0x0e, 0x60, 0x04, 0xd2, 0x18, 0x80, 0x08, 0xe5, 0x4e, 0x45, 0x4f, 0x24, 0xff, -0x92, 0x18, 0xd2, 0xaf, 0x90, 0x04, 0x14, 0xe0, 0xa2, 0xe4, 0x92, 0x19, 0x74, 0x1e, 0xf0, 0xe5, -0x5f, 0x54, 0x0f, 0xf5, 0x2d, 0xe5, 0x25, 0x70, 0x13, 0x30, 0x18, 0x05, 0xe5, 0x5f, 0x20, 0xe5, -0x0b, 0x30, 0x19, 0x19, 0xe5, 0x5f, 0x54, 0x30, 0xff, 0xbf, 0x30, 0x11, 0xe5, 0x25, 0x70, 0x05, -0x75, 0x25, 0x0c, 0x80, 0x02, 0x15, 0x25, 0xd2, 0x6c, 0xd2, 0x6d, 0x80, 0x0f, 0xe5, 0x5f, 0x30, -0xe6, 0x06, 0xc2, 0x6c, 0xd2, 0x6d, 0x80, 0x04, 0xd2, 0x6c, 0xc2, 0x6d, 0xe5, 0x47, 0x64, 0x03, -0x70, 0x21, 0x30, 0x4b, 0x06, 0xc2, 0x6c, 0xd2, 0x6d, 0x80, 0x18, 0xe5, 0x25, 0x70, 0x03, 0x30, -0x4c, 0x11, 0xc2, 0x4c, 0xe5, 0x25, 0x70, 0x05, 0x75, 0x25, 0x07, 0x80, 0x02, 0x15, 0x25, 0xd2, -0x6c, 0xd2, 0x6d, 0xe5, 0x47, 0xb4, 0x09, 0x14, 0xe5, 0x44, 0x20, 0xe3, 0x0b, 0xe5, 0x3a, 0x64, -0x02, 0x60, 0x05, 0xe5, 0x3a, 0xb4, 0x03, 0x04, 0xc2, 0x6c, 0xd2, 0x6d, 0x90, 0x70, 0x46, 0xe5, -0x2d, 0xf0, 0x20, 0x69, 0x07, 0xe5, 0x5e, 0x20, 0xe0, 0x02, 0xb2, 0x68, 0x20, 0x6b, 0x07, 0xe5, -0x5e, 0x20, 0xe1, 0x02, 0xb2, 0x6a, 0x20, 0x6d, 0x07, 0xe5, 0x5e, 0x20, 0xe2, 0x02, 0xb2, 0x6c, -0x90, 0x70, 0x47, 0xe5, 0x2d, 0xf0, 0x75, 0x2e, 0x40, 0x20, 0x69, 0x04, 0xa2, 0x68, 0x80, 0x26, -0x30, 0x68, 0x06, 0xe5, 0x46, 0xa2, 0xe2, 0x80, 0x1d, 0xe5, 0x5e, 0x20, 0xe2, 0x04, 0x7f, 0x01, -0x80, 0x02, 0x7f, 0x00, 0xe5, 0x46, 0x54, 0xf0, 0xfe, 0xbe, 0xf0, 0x04, 0x7e, 0x01, 0x80, 0x02, -0x7e, 0x00, 0xee, 0x6f, 0x24, 0xff, 0x92, 0x73, 0x92, 0x72, 0x20, 0x6b, 0x04, 0xa2, 0x6a, 0x80, -0x26, 0x30, 0x6a, 0x06, 0xe5, 0x46, 0xa2, 0xe2, 0x80, 0x1d, 0xe5, 0x5e, 0x20, 0xe0, 0x04, 0x7f, -0x01, 0x80, 0x02, 0x7f, 0x00, 0xe5, 0x46, 0x54, 0xf0, 0xfe, 0xbe, 0xf0, 0x04, 0x7e, 0x01, 0x80, -0x02, 0x7e, 0x00, 0xee, 0x6f, 0x24, 0xff, 0x92, 0x75, 0x92, 0x74, 0x20, 0x6d, 0x04, 0xa2, 0x6c, -0x80, 0x26, 0x30, 0x6c, 0x06, 0xe5, 0x46, 0xa2, 0xe2, 0x80, 0x1d, 0xe5, 0x5e, 0x20, 0xe1, 0x04, -0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xe5, 0x46, 0x54, 0xf0, 0xfe, 0xbe, 0xf0, 0x04, 0x7e, 0x01, -0x80, 0x02, 0x7e, 0x00, 0xee, 0x6f, 0x24, 0xff, 0x92, 0x71, 0x92, 0x70, 0x90, 0x10, 0x00, 0xe0, -0x90, 0x10, 0x2f, 0xf0, 0x90, 0x10, 0x03, 0xe0, 0xc3, 0x94, 0x30, 0x40, 0x14, 0xa2, 0x71, 0x92, -0x77, 0xa2, 0x70, 0x92, 0x76, 0xe5, 0x2e, 0x13, 0x13, 0x54, 0x3f, 0xf5, 0x2e, 0xc2, 0x77, 0xd2, -0x76, 0x90, 0x10, 0x2f, 0xe5, 0x2e, 0xf0, 0xe5, 0x47, 0x64, 0x06, 0x70, 0x4c, 0x90, 0x02, 0x29, -0xe0, 0x54, 0xfe, 0xf0, 0xe5, 0x43, 0xc4, 0x54, 0x0f, 0x14, 0x60, 0x14, 0x24, 0xfe, 0x60, 0x23, -0x24, 0x03, 0x60, 0x03, 0x02, 0x16, 0x18, 0x90, 0x02, 0x28, 0xe0, 0x30, 0x47, 0x0f, 0x80, 0x07, -0x90, 0x02, 0x28, 0xe0, 0x20, 0x47, 0x06, 0x54, 0xfe, 0xf0, 0x02, 0x16, 0x18, 0x44, 0x01, 0xf0, -0x02, 0x16, 0x18, 0xe5, 0x46, 0x30, 0xe2, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0x90, 0x02, -0x28, 0xe0, 0x54, 0xfe, 0x4f, 0xf0, 0x02, 0x16, 0x18, 0xe5, 0x47, 0x64, 0x07, 0x60, 0x0f, 0xe5, -0x47, 0x64, 0x08, 0x60, 0x09, 0xe5, 0x47, 0x64, 0x09, 0x60, 0x03, 0x02, 0x16, 0x18, 0xe4, 0xf5, -0x27, 0x90, 0x02, 0x29, 0xe0, 0x54, 0xfc, 0xf0, 0xe5, 0x3a, 0x14, 0x60, 0x2d, 0x14, 0x60, 0x2e, -0x14, 0x60, 0x36, 0x24, 0xfc, 0x60, 0x5f, 0x24, 0xf9, 0x60, 0x1f, 0x24, 0x0e, 0x70, 0x69, 0xe5, -0x46, 0x13, 0x13, 0x54, 0x3f, 0x75, 0xf0, 0x03, 0x84, 0xaf, 0xf0, 0x20, 0x47, 0x04, 0x7e, 0x01, -0x80, 0x02, 0x7e, 0x00, 0xef, 0x6e, 0x24, 0xff, 0x80, 0x45, 0xa2, 0x47, 0x80, 0x41, 0xe5, 0x46, -0x30, 0xe2, 0x03, 0xd3, 0x80, 0x27, 0xc3, 0x80, 0x24, 0xe5, 0x46, 0x30, 0xe2, 0x0d, 0x54, 0x38, -0xc3, 0x94, 0x30, 0x50, 0x06, 0x7e, 0x00, 0x7f, 0x01, 0x80, 0x04, 0x7e, 0x00, 0x7f, 0x00, 0x20, -0x47, 0x04, 0x7d, 0x01, 0x80, 0x02, 0x7d, 0x00, 0xef, 0x6d, 0x4e, 0x24, 0xff, 0x92, 0x38, 0xa2, -0x47, 0xb3, 0x92, 0x39, 0x80, 0x19, 0xe5, 0x46, 0x30, 0xe2, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, -0x39, 0xa2, 0x47, 0xb3, 0x92, 0x38, 0x80, 0x07, 0xa2, 0x47, 0xb3, 0x92, 0x38, 0x92, 0x39, 0x90, -0x02, 0x28, 0xe0, 0x54, 0xfc, 0x45, 0x27, 0xf0, 0x90, 0x70, 0x9c, 0xe5, 0x3a, 0xf0, 0xa3, 0xe5, -0x47, 0xf0, 0x90, 0x70, 0x41, 0xe5, 0x3a, 0xf0, 0x22, 0xe4, 0x90, 0x02, 0x29, 0xf0, 0x30, 0x47, -0x04, 0xaf, 0x45, 0x80, 0x04, 0xe5, 0x45, 0xf4, 0xff, 0x90, 0x02, 0x28, 0xef, 0xf0, 0x22, 0x8f, -0x50, 0xd2, 0x59, 0x22, 0x8f, 0x54, 0xd2, 0x58, 0x22, 0xe4, 0xf5, 0x62, 0xc2, 0xaf, 0xe5, 0x51, -0x14, 0x60, 0x46, 0x14, 0x60, 0x62, 0x24, 0x02, 0x60, 0x03, 0x02, 0x17, 0x03, 0xd2, 0x59, 0x75, -0x55, 0x01, 0x90, 0x02, 0xa2, 0xe0, 0x54, 0x7f, 0xf0, 0xa3, 0xe0, 0x20, 0xe7, 0x22, 0x90, 0x04, -0x34, 0xe0, 0xb4, 0x02, 0x1b, 0xa3, 0xe0, 0xb4, 0x02, 0x16, 0xa3, 0xe0, 0xb4, 0x02, 0x11, 0x7f, -0x20, 0x12, 0x16, 0x3f, 0x90, 0x10, 0x04, 0xe0, 0x54, 0xf3, 0xf0, 0x75, 0x51, 0x01, 0x80, 0x73, -0xe5, 0x50, 0x70, 0x05, 0x75, 0x62, 0x03, 0x80, 0x6a, 0x90, 0x12, 0x00, 0xe0, 0x54, 0x03, 0x70, -0x11, 0x7f, 0x20, 0x12, 0x16, 0x3f, 0x90, 0x02, 0xa2, 0xe0, 0x54, 0xbf, 0xf0, 0x75, 0x51, 0x02, -0x80, 0x51, 0xe5, 0x50, 0x70, 0x02, 0x80, 0x46, 0x90, 0x02, 0xa3, 0xe0, 0x20, 0xe6, 0x3b, 0x90, -0x04, 0x37, 0xe0, 0x64, 0x22, 0x70, 0x33, 0x90, 0x01, 0x8a, 0x74, 0x7e, 0xf0, 0x90, 0x01, 0x96, -0xf0, 0x90, 0x12, 0x04, 0x74, 0x0a, 0xf0, 0x90, 0x13, 0x28, 0xe0, 0x54, 0xf0, 0xf0, 0xa3, 0xe0, -0x54, 0xf0, 0xf0, 0xa3, 0xe0, 0x54, 0xfa, 0xf0, 0x90, 0x04, 0x01, 0xe0, 0x54, 0xf9, 0xf0, 0x75, -0x62, 0x01, 0x75, 0x55, 0x02, 0xe4, 0xf5, 0x51, 0x80, 0x09, 0xe5, 0x50, 0x70, 0x05, 0x75, 0x62, -0x03, 0xf5, 0x51, 0xe5, 0x62, 0x60, 0x15, 0xc2, 0x01, 0xe4, 0xf5, 0x51, 0xc2, 0x59, 0xad, 0x62, -0xaf, 0x40, 0x12, 0x17, 0x8d, 0xe5, 0x62, 0xb4, 0x03, 0x02, 0xd2, 0x03, 0xd2, 0xaf, 0x22, 0xc2, -0xaf, 0x30, 0x01, 0x12, 0xe4, 0x90, 0x01, 0x96, 0xf0, 0xf5, 0x51, 0xc2, 0x59, 0xc2, 0x01, 0x7d, -0x02, 0xaf, 0x40, 0x12, 0x17, 0x8d, 0xe5, 0x52, 0x14, 0x60, 0x09, 0x04, 0x70, 0x4c, 0x75, 0x52, -0x01, 0x75, 0x55, 0x03, 0x90, 0x04, 0x01, 0xe0, 0x44, 0x0e, 0xf0, 0x90, 0x13, 0x28, 0xe0, 0x44, -0x0f, 0xf0, 0xa3, 0xe0, 0x44, 0x0f, 0xf0, 0xa3, 0xe0, 0x44, 0x05, 0xf0, 0x90, 0x12, 0x04, 0x74, -0x03, 0xf0, 0x90, 0x02, 0xa2, 0xe0, 0x44, 0xc0, 0xf0, 0x90, 0x10, 0x04, 0xe0, 0x44, 0x0c, 0xf0, -0xe4, 0xf5, 0x52, 0xf5, 0x55, 0x30, 0x02, 0x0b, 0xc2, 0x02, 0x7d, 0x01, 0xaf, 0x41, 0x12, 0x17, -0x8d, 0x80, 0x02, 0xc2, 0x03, 0xe4, 0x90, 0x01, 0x96, 0xf0, 0xd2, 0xaf, 0x22, 0xef, 0xf4, 0x60, -0x2d, 0xe4, 0xfe, 0x74, 0x14, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xe0, 0xb4, 0xff, -0x19, 0x74, 0x14, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xef, 0xf0, 0x74, 0x1c, 0x2e, -0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xed, 0xf0, 0x22, 0x0e, 0xbe, 0x04, 0xd5, 0x22, 0x22, -0x22, 0x90, 0x70, 0x2a, 0xe0, 0x30, 0xe1, 0x4d, 0xc2, 0xaf, 0x90, 0x70, 0x28, 0xe0, 0x90, 0x10, -0x1c, 0xf0, 0x90, 0x70, 0x29, 0xe0, 0x90, 0x10, 0x1d, 0xf0, 0x90, 0x70, 0x2a, 0xe0, 0x90, 0x10, -0x1e, 0xf0, 0x90, 0x10, 0x1c, 0xe0, 0xf5, 0x62, 0x90, 0x10, 0x1e, 0xe0, 0x20, 0xe1, 0xf3, 0x90, -0x10, 0x1c, 0xe0, 0x90, 0x70, 0x28, 0xf0, 0x90, 0x10, 0x1d, 0xe0, 0x90, 0x70, 0x29, 0xf0, 0x90, -0x10, 0x1e, 0xe0, 0x90, 0x70, 0x2a, 0xf0, 0x30, 0x4a, 0x07, 0x90, 0x70, 0x24, 0xe0, 0x44, 0x01, -0xf0, 0xc2, 0x05, 0xd2, 0xaf, 0x22, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x9b, 0xc0, } ; diff --git a/drivers/staging/rt3090/firmware.h b/drivers/staging/rt3090/firmware.h deleted file mode 100644 index 17056e26795b..000000000000 --- a/drivers/staging/rt3090/firmware.h +++ /dev/null @@ -1,517 +0,0 @@ -/* AUTO GEN PLEASE DO NOT MODIFY IT */ -/* AUTO GEN PLEASE DO NOT MODIFY IT */ - - -u8 FirmwareImage_3090 [] = { -0x02, 0x02, 0xf3, 0x02, 0x02, 0xa1, 0x22, 0x22, 0xff, 0xff, 0xff, 0x02, 0x01, 0x27, 0xff, 0xff, -0xff, 0xff, 0xff, 0x02, 0x00, 0x1e, 0xff, 0xff, 0xff, 0xff, 0xff, 0x02, 0x00, 0xd8, 0xc0, 0xe0, -0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x18, 0xc2, 0xaf, 0x30, 0x45, 0x03, -0x12, 0x10, 0x09, 0x90, 0x04, 0x16, 0xe0, 0x30, 0xe3, 0x03, 0x74, 0x08, 0xf0, 0x90, 0x04, 0x14, -0xe0, 0x20, 0xe7, 0x03, 0x02, 0x00, 0xcb, 0x74, 0x80, 0xf0, 0x90, 0x70, 0x12, 0xe0, 0xf5, 0x36, -0x90, 0x04, 0x04, 0xe0, 0x24, 0xcf, 0x60, 0x30, 0x14, 0x60, 0x42, 0x24, 0xe2, 0x60, 0x47, 0x14, -0x60, 0x55, 0x24, 0x21, 0x70, 0x60, 0xe5, 0x55, 0x24, 0xfe, 0x60, 0x07, 0x14, 0x60, 0x08, 0x24, -0x02, 0x70, 0x08, 0x7d, 0x01, 0x80, 0x28, 0x7d, 0x02, 0x80, 0x24, 0x90, 0x70, 0x10, 0xe0, 0xf5, -0x50, 0x85, 0x36, 0x40, 0xd2, 0x01, 0x80, 0x3e, 0xe5, 0x55, 0x64, 0x03, 0x60, 0x04, 0xe5, 0x55, -0x70, 0x04, 0x7d, 0x02, 0x80, 0x09, 0x85, 0x36, 0x41, 0xd2, 0x02, 0x80, 0x29, 0xad, 0x55, 0xaf, -0x36, 0x12, 0x02, 0x7d, 0x80, 0x20, 0x90, 0x70, 0x10, 0xe0, 0xf5, 0x47, 0x90, 0x70, 0x11, 0xe0, -0xf5, 0x44, 0x12, 0x10, 0x25, 0x80, 0x06, 0x90, 0x70, 0x10, 0xe0, 0xf5, 0x45, 0xe4, 0xfd, 0xaf, -0x36, 0x12, 0x02, 0x7d, 0xd2, 0x04, 0x90, 0x70, 0x13, 0xe4, 0xf0, 0xd2, 0xaf, 0xd0, 0xd0, 0xd0, -0x82, 0xd0, 0x83, 0xd0, 0xf0, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, -0xc0, 0xd0, 0xe8, 0xc0, 0xe0, 0xe9, 0xc0, 0xe0, 0xea, 0xc0, 0xe0, 0xeb, 0xc0, 0xe0, 0xec, 0xc0, -0xe0, 0xed, 0xc0, 0xe0, 0xee, 0xc0, 0xe0, 0xef, 0xc0, 0xe0, 0xc2, 0xaf, 0x30, 0x45, 0x03, 0x12, -0x10, 0x12, 0xd2, 0xaf, 0xd0, 0xe0, 0xff, 0xd0, 0xe0, 0xfe, 0xd0, 0xe0, 0xfd, 0xd0, 0xe0, 0xfc, -0xd0, 0xe0, 0xfb, 0xd0, 0xe0, 0xfa, 0xd0, 0xe0, 0xf9, 0xd0, 0xe0, 0xf8, 0xd0, 0xd0, 0xd0, 0x82, -0xd0, 0x83, 0xd0, 0xf0, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, -0xd0, 0x75, 0xd0, 0x10, 0xc2, 0xaf, 0x30, 0x45, 0x03, 0x12, 0x10, 0x0c, 0x30, 0x58, 0x0a, 0xe5, -0x54, 0x60, 0x04, 0x15, 0x54, 0x80, 0x02, 0xc2, 0x58, 0x30, 0x59, 0x0a, 0xe5, 0x50, 0x60, 0x04, -0x15, 0x50, 0x80, 0x02, 0xc2, 0x59, 0xd5, 0x53, 0x07, 0x30, 0x60, 0x04, 0x15, 0x46, 0xd2, 0x04, -0x30, 0x45, 0x03, 0x12, 0x10, 0x0f, 0xc2, 0x8d, 0xd2, 0xaf, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, -0xd0, 0xf0, 0xd0, 0xe0, 0x32, 0x90, 0x70, 0x2a, 0xe0, 0x30, 0xe1, 0x43, 0xc2, 0xaf, 0x90, 0x70, -0x28, 0xe0, 0x90, 0x10, 0x1c, 0xf0, 0x90, 0x70, 0x29, 0xe0, 0x90, 0x10, 0x1d, 0xf0, 0x90, 0x70, -0x2a, 0xe0, 0x90, 0x10, 0x1e, 0xf0, 0x90, 0x10, 0x1c, 0xe0, 0xf5, 0x37, 0x90, 0x10, 0x1e, 0xe0, -0x20, 0xe1, 0xf3, 0x90, 0x10, 0x1c, 0xe0, 0x90, 0x70, 0x28, 0xf0, 0x90, 0x10, 0x1d, 0xe0, 0x90, -0x70, 0x29, 0xf0, 0x90, 0x10, 0x1e, 0xe0, 0x90, 0x70, 0x2a, 0xf0, 0xc2, 0x05, 0xd2, 0xaf, 0x22, -0x12, 0x02, 0xc3, 0x30, 0x45, 0x03, 0x12, 0x10, 0x03, 0x30, 0x01, 0x06, 0x20, 0x09, 0x03, 0x12, -0x10, 0x1c, 0x30, 0x02, 0x06, 0x20, 0x0a, 0x03, 0x12, 0x10, 0x1f, 0x30, 0x03, 0x06, 0x20, 0x0b, -0x03, 0x12, 0x10, 0x1f, 0x30, 0x04, 0x06, 0x20, 0x0c, 0x03, 0x12, 0x10, 0x22, 0x20, 0x13, 0x09, -0x20, 0x11, 0x06, 0xe5, 0x2b, 0x45, 0x2c, 0x60, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, 0xa9, 0x12, -0x03, 0x1c, 0x80, 0xbf, 0xc2, 0x43, 0xd2, 0x45, 0xe4, 0xf5, 0x20, 0xf5, 0x21, 0xf5, 0x53, 0xf5, -0x46, 0xf5, 0x2b, 0xf5, 0x2c, 0xc2, 0x42, 0xf5, 0x51, 0xf5, 0x52, 0xf5, 0x55, 0x90, 0x04, 0x18, -0x74, 0x80, 0xf0, 0x90, 0x04, 0x1a, 0x74, 0x08, 0xf0, 0xc2, 0x1a, 0xc2, 0x18, 0xc2, 0x1b, 0x22, -0xc8, 0xef, 0xc8, 0xe6, 0xfa, 0x08, 0xe6, 0x4a, 0x60, 0x0c, 0xc8, 0xef, 0xc8, 0x08, 0xe6, 0x16, -0x18, 0x70, 0x01, 0x16, 0xc3, 0x22, 0xed, 0x24, 0xff, 0xfd, 0xec, 0x34, 0xff, 0xc8, 0xef, 0xc8, -0xf6, 0x08, 0xc6, 0xed, 0xc6, 0xd3, 0x22, 0xd0, 0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, -0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, -0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80, 0xdf, 0xef, 0xf4, 0x60, -0x1f, 0xe4, 0xfe, 0x12, 0x03, 0x5b, 0xe0, 0xb4, 0xff, 0x12, 0x12, 0x03, 0x5b, 0xef, 0xf0, 0x74, -0x1c, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xed, 0xf0, 0x22, 0x0e, 0xbe, 0x04, 0xe3, -0x22, 0xc0, 0xe0, 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x08, 0xc2, 0xaf, -0x30, 0x45, 0x03, 0x12, 0x10, 0x06, 0xd2, 0xaf, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xf0, -0xd0, 0xe0, 0x32, 0xc2, 0xaf, 0x12, 0x00, 0x06, 0x12, 0x02, 0x04, 0x12, 0x02, 0xdc, 0xe4, 0xf5, -0x22, 0xf5, 0x47, 0x90, 0x04, 0x00, 0x74, 0x80, 0xf0, 0xd2, 0xaf, 0x22, 0x75, 0x89, 0x02, 0xe4, -0xf5, 0x8c, 0xf5, 0x8a, 0xf5, 0x88, 0xf5, 0xb8, 0xf5, 0xe8, 0x75, 0x90, 0x18, 0xd2, 0x8c, 0x75, -0xa8, 0x05, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x5f, 0x02, 0x01, 0xc0, 0xff, -0xc0, 0x26, 0x74, 0x03, 0xc0, 0xe0, 0xc0, 0x82, 0xc0, 0x83, 0x75, 0x26, 0x0a, 0x22, 0xc0, 0x26, -0x74, 0x03, 0xc0, 0xe0, 0xc0, 0x82, 0xc0, 0x83, 0x75, 0x26, 0x18, 0x22, 0x30, 0x45, 0x03, 0x12, -0x10, 0x15, 0xe5, 0x20, 0x70, 0x03, 0x20, 0x10, 0x03, 0x30, 0x11, 0x03, 0x43, 0x87, 0x01, 0x22, -0xce, 0xef, 0xce, 0xee, 0x60, 0x08, 0x7f, 0xff, 0x12, 0x03, 0x71, 0x1e, 0x80, 0xf5, 0x22, 0xc8, -0xef, 0xc8, 0xe6, 0x60, 0x03, 0x16, 0xc3, 0x22, 0xed, 0x14, 0xf6, 0xd3, 0x22, 0xc8, 0xef, 0xc8, -0xe6, 0x60, 0x06, 0x16, 0xe6, 0x24, 0xff, 0xb3, 0x22, 0xc3, 0x22, 0x74, 0x14, 0x2e, 0xf5, 0x82, -0xe4, 0x34, 0x70, 0xf5, 0x83, 0x22, 0xef, 0x90, 0x03, 0x6f, 0x93, 0x90, 0x03, 0x00, 0x73, 0x0a, -0x18, 0xef, 0x60, 0x03, 0x1f, 0x80, 0xfa, 0x22, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0x02, 0x10, 0x28, 0x02, 0x10, 0x3b, 0x02, 0x10, 0x3c, 0x02, 0x13, 0x68, 0x02, -0x13, 0x69, 0x02, 0x14, 0x1e, 0x02, 0x14, 0x1f, 0xc3, 0x22, 0xff, 0xff, 0x02, 0x19, 0xa1, 0x02, -0x1b, 0x31, 0x02, 0x14, 0xea, 0x02, 0x14, 0x20, 0x30, 0x05, 0x06, 0x20, 0x0d, 0x03, 0x12, 0x01, -0x75, 0x30, 0x06, 0x06, 0x20, 0x0e, 0x03, 0x12, 0x1c, 0x4f, 0x22, 0x22, 0x90, 0x04, 0x14, 0xe0, -0x20, 0xe7, 0x03, 0x02, 0x13, 0x67, 0x90, 0x70, 0x12, 0xe0, 0xf5, 0x56, 0x90, 0x04, 0x04, 0xe0, -0x12, 0x02, 0x57, 0x11, 0x11, 0x30, 0x10, 0xe2, 0x31, 0x10, 0x90, 0x33, 0x10, 0xa0, 0x34, 0x10, -0xbe, 0x35, 0x10, 0xac, 0x36, 0x11, 0x1f, 0x50, 0x11, 0x68, 0x51, 0x11, 0x71, 0x52, 0x11, 0x71, -0x53, 0x11, 0x71, 0x54, 0x11, 0xb3, 0x55, 0x12, 0x16, 0x70, 0x12, 0x42, 0x71, 0x12, 0x71, 0x72, -0x12, 0xda, 0x73, 0x12, 0xfe, 0x80, 0x13, 0x29, 0x83, 0x13, 0x47, 0x84, 0x00, 0x00, 0x13, 0x67, -0xd2, 0x18, 0xd2, 0x61, 0x75, 0x35, 0x2a, 0x75, 0x32, 0x0b, 0x75, 0x33, 0xb8, 0x02, 0x13, 0x62, -0xc2, 0x18, 0x90, 0x01, 0x14, 0xe0, 0x54, 0xfd, 0xf0, 0x02, 0x13, 0x62, 0x90, 0x70, 0x11, 0xe0, -0xf5, 0x3c, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0x22, 0xe5, 0x55, -0xb4, 0x02, 0x0f, 0xe5, 0x59, 0xb4, 0x28, 0x06, 0x90, 0x01, 0x0d, 0x74, 0x08, 0xf0, 0x7d, 0x01, -0x80, 0x02, 0x7d, 0x02, 0xaf, 0x56, 0x12, 0x02, 0x7d, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0x02, -0x13, 0x62, 0x20, 0x02, 0x03, 0x30, 0x03, 0x10, 0x7d, 0x02, 0xaf, 0x56, 0x12, 0x02, 0x7d, 0x90, -0x04, 0x14, 0x74, 0x80, 0xf0, 0x02, 0x13, 0x62, 0xe5, 0x34, 0xc3, 0x94, 0x03, 0x40, 0x0c, 0x90, -0x01, 0x0c, 0xe0, 0x44, 0x02, 0xf0, 0xa3, 0xe0, 0x44, 0x04, 0xf0, 0x85, 0x56, 0x41, 0xd2, 0x02, -0x22, 0x90, 0x70, 0x11, 0xe0, 0xf4, 0x70, 0x03, 0x02, 0x13, 0x67, 0xe0, 0xf5, 0x30, 0x22, 0xe5, -0x34, 0xc3, 0x94, 0x03, 0x40, 0x07, 0xe5, 0x55, 0x60, 0x03, 0x02, 0x13, 0x67, 0x90, 0x70, 0x10, -0xe0, 0x54, 0x7f, 0xff, 0xbf, 0x0a, 0x0d, 0x90, 0x70, 0x11, 0xe0, 0xb4, 0x08, 0x06, 0x75, 0x4e, -0x01, 0x75, 0x4f, 0x84, 0x90, 0x70, 0x10, 0xe0, 0x54, 0x7f, 0x64, 0x02, 0x60, 0x03, 0x02, 0x13, -0x67, 0x90, 0x70, 0x11, 0xe0, 0x64, 0x08, 0x60, 0x08, 0xe0, 0x64, 0x20, 0x60, 0x03, 0x02, 0x13, -0x67, 0x75, 0x4e, 0x03, 0x75, 0x4f, 0x20, 0x22, 0x90, 0x70, 0x11, 0xe0, 0x24, 0xff, 0x92, 0x47, -0x22, 0xe5, 0x34, 0xc3, 0x94, 0x03, 0x40, 0x07, 0xe5, 0x55, 0x60, 0x03, 0x02, 0x13, 0x09, 0x90, -0x04, 0x04, 0xe0, 0x25, 0xe0, 0x24, 0x5d, 0xf5, 0x57, 0x90, 0x70, 0x10, 0xe0, 0xff, 0x74, 0x47, -0x25, 0x57, 0xf8, 0xc6, 0xef, 0xc6, 0x90, 0x70, 0x11, 0xe0, 0xff, 0x74, 0x48, 0x25, 0x57, 0xf8, -0xc6, 0xef, 0xc6, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x02, 0x7d, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, -0x02, 0x13, 0x62, 0xe5, 0x34, 0xc3, 0x94, 0x03, 0x40, 0x07, 0xe5, 0x55, 0x60, 0x03, 0x02, 0x13, -0x09, 0xe5, 0x47, 0x64, 0x07, 0x60, 0x23, 0xe5, 0x47, 0x64, 0x08, 0x60, 0x1d, 0xe5, 0x47, 0x64, -0x09, 0x60, 0x17, 0xe5, 0x47, 0x64, 0x0a, 0x60, 0x11, 0xe5, 0x47, 0x64, 0x0b, 0x60, 0x0b, 0xe5, -0x47, 0x64, 0x0d, 0x60, 0x05, 0xe5, 0x47, 0xb4, 0x0d, 0x08, 0x90, 0x70, 0x11, 0xe0, 0x54, 0x0f, -0xf5, 0x3a, 0xe5, 0x47, 0xb4, 0x09, 0x08, 0xe5, 0x3a, 0xb4, 0x03, 0x03, 0xe4, 0xf5, 0x46, 0xe5, -0x47, 0xb4, 0x0a, 0x08, 0xe5, 0x3a, 0xb4, 0x01, 0x03, 0xe4, 0xf5, 0x46, 0xe4, 0xfd, 0xaf, 0x56, -0x12, 0x02, 0x7d, 0xd2, 0x04, 0x22, 0xe5, 0x34, 0xc3, 0x94, 0x03, 0x40, 0x07, 0xe5, 0x55, 0x60, -0x03, 0x02, 0x13, 0x09, 0x90, 0x70, 0x10, 0xe0, 0xfe, 0x90, 0x70, 0x11, 0xe0, 0xfd, 0xed, 0xf8, -0xe6, 0xf5, 0x57, 0xfd, 0xaf, 0x56, 0x12, 0x02, 0x7d, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0x02, -0x13, 0x62, 0xe5, 0x34, 0xc3, 0x94, 0x03, 0x40, 0x07, 0xe5, 0x55, 0x60, 0x03, 0x02, 0x13, 0x09, -0x90, 0x70, 0x10, 0xe0, 0xfe, 0x90, 0x70, 0x11, 0xe0, 0xfd, 0xed, 0xf5, 0x82, 0x8e, 0x83, 0xe0, -0xf5, 0x57, 0xfd, 0xaf, 0x56, 0x12, 0x02, 0x7d, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0x02, 0x13, -0x62, 0x90, 0x10, 0x00, 0xe0, 0xf5, 0x57, 0x90, 0x10, 0x02, 0xe0, 0xf5, 0x58, 0xa3, 0xe0, 0xf5, -0x59, 0xe5, 0x58, 0xb4, 0x70, 0x1e, 0xe5, 0x59, 0xb4, 0x30, 0x19, 0x90, 0x05, 0x08, 0xe0, 0x44, -0x01, 0xf0, 0xfd, 0x90, 0x05, 0x05, 0xe0, 0x54, 0xfb, 0xf0, 0x44, 0x04, 0xf0, 0xed, 0x54, 0xfe, -0x90, 0x05, 0x08, 0xf0, 0xe4, 0xf5, 0x4e, 0xf5, 0x4f, 0x75, 0x3a, 0xff, 0xc2, 0x1a, 0xc2, 0x18, -0xc2, 0x1b, 0xf5, 0x34, 0x90, 0x05, 0xa4, 0x74, 0x11, 0xf0, 0xa3, 0x74, 0xff, 0xf0, 0xa3, 0x74, -0x03, 0xf0, 0xe4, 0xf5, 0x30, 0xc2, 0x19, 0x75, 0x3c, 0xff, 0xad, 0x57, 0xaf, 0x56, 0x12, 0x02, -0x7d, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0x02, 0x13, 0x62, 0xe5, 0x34, 0xc3, 0x94, 0x03, 0x40, -0x06, 0xe5, 0x55, 0x60, 0x02, 0x80, 0x22, 0x90, 0x70, 0x10, 0xe0, 0x24, 0xff, 0x92, 0x93, 0xe4, -0xfd, 0xaf, 0x56, 0x12, 0x02, 0x7d, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0x80, 0x64, 0xe5, 0x34, -0xc3, 0x94, 0x03, 0x40, 0x0b, 0xe5, 0x55, 0x60, 0x07, 0x7d, 0x03, 0xaf, 0x56, 0x02, 0x02, 0x7d, -0x90, 0x70, 0x10, 0xe0, 0x24, 0xff, 0x92, 0x4a, 0xd2, 0x05, 0xad, 0x57, 0xaf, 0x56, 0x12, 0x02, -0x7d, 0x90, 0x04, 0x14, 0x74, 0x80, 0xf0, 0x80, 0x39, 0xe4, 0xf5, 0x34, 0xf5, 0x30, 0x90, 0x70, -0x10, 0xe0, 0xf4, 0x60, 0x03, 0xe0, 0xf5, 0x34, 0xad, 0x57, 0xaf, 0x56, 0x12, 0x02, 0x7d, 0x90, -0x04, 0x14, 0x74, 0x80, 0xf0, 0x80, 0x1b, 0xd2, 0x19, 0x05, 0x2f, 0xe5, 0x2f, 0xb4, 0x1a, 0x03, -0xe4, 0xf5, 0x2f, 0xd2, 0x04, 0xad, 0x57, 0xaf, 0x56, 0x12, 0x02, 0x7d, 0x90, 0x04, 0x14, 0x74, -0x80, 0xf0, 0xe4, 0x90, 0x70, 0x13, 0xf0, 0x22, 0x22, 0xe5, 0x34, 0xc3, 0x94, 0x03, 0x40, 0x17, -0xe5, 0x55, 0xb4, 0x02, 0x12, 0xe5, 0x30, 0x60, 0x0e, 0x30, 0x60, 0x0b, 0x74, 0xfd, 0x25, 0x46, -0xf5, 0x46, 0xd2, 0x04, 0xe4, 0xf5, 0x53, 0xe5, 0x53, 0x60, 0x03, 0x02, 0x14, 0x1d, 0x30, 0x60, -0x21, 0xb2, 0x4d, 0x30, 0x4d, 0x1c, 0xe5, 0x34, 0xc3, 0x94, 0x03, 0x40, 0x11, 0xe5, 0x55, 0xb4, -0x02, 0x0c, 0xe5, 0x30, 0x60, 0x08, 0x74, 0x03, 0x25, 0x46, 0xf5, 0x46, 0x80, 0x02, 0x05, 0x46, -0xc2, 0x04, 0xe5, 0x4f, 0x45, 0x4e, 0x60, 0x08, 0xe5, 0x4f, 0x15, 0x4f, 0x70, 0x02, 0x15, 0x4e, -0x30, 0x1a, 0x49, 0x7f, 0x32, 0x7d, 0xb8, 0x7c, 0x0b, 0x12, 0x02, 0x30, 0x50, 0x06, 0x90, 0x04, -0x10, 0x74, 0x40, 0xf0, 0x7f, 0x35, 0x7d, 0x32, 0x12, 0x03, 0x3f, 0x50, 0x09, 0x90, 0x10, 0x04, -0xe0, 0x54, 0xf7, 0xf0, 0xd2, 0x06, 0xe5, 0x35, 0xd3, 0x94, 0x2d, 0x40, 0x30, 0x30, 0x1b, 0x2d, -0xc2, 0x1b, 0xa2, 0x18, 0x92, 0x1a, 0x20, 0x1a, 0x24, 0x90, 0x04, 0x09, 0xe0, 0x54, 0xdd, 0xf0, -0x90, 0x10, 0x04, 0xe0, 0x44, 0x08, 0xf0, 0xc2, 0x61, 0xd2, 0x03, 0x22, 0xe4, 0xf5, 0x35, 0xa2, -0x18, 0x92, 0x1a, 0x30, 0x1a, 0x07, 0x90, 0x04, 0x09, 0xe0, 0x44, 0x22, 0xf0, 0x22, 0x22, 0x22, -0xc2, 0x4b, 0xc2, 0x4c, 0xe5, 0x44, 0x12, 0x02, 0x57, 0x14, 0x42, 0x00, 0x14, 0xd5, 0x04, 0x14, -0xd1, 0x08, 0x14, 0xac, 0x10, 0x14, 0x56, 0x20, 0x14, 0x76, 0x60, 0x14, 0x87, 0xa0, 0x00, 0x00, -0x14, 0xd7, 0x85, 0x48, 0x43, 0x85, 0x4a, 0x42, 0x85, 0x4c, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x60, -0x03, 0x02, 0x14, 0xd7, 0x80, 0x1b, 0xe5, 0x48, 0xc4, 0x54, 0x0f, 0xf5, 0x43, 0xe5, 0x4a, 0xc4, -0x54, 0x0f, 0xf5, 0x42, 0xe5, 0x4c, 0xc4, 0x54, 0x0f, 0xf5, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x70, -0x66, 0x53, 0x43, 0x0f, 0x80, 0x61, 0x85, 0x49, 0x43, 0x85, 0x4b, 0x42, 0x85, 0x4d, 0x5e, 0xe5, -0x47, 0x64, 0x06, 0x70, 0x52, 0x80, 0x1b, 0xe5, 0x49, 0xc4, 0x54, 0x0f, 0xf5, 0x43, 0xe5, 0x4b, -0xc4, 0x54, 0x0f, 0xf5, 0x42, 0xe5, 0x4d, 0xc4, 0x54, 0x0f, 0xf5, 0x5e, 0xe5, 0x47, 0x64, 0x06, -0x70, 0x35, 0xe5, 0x43, 0x54, 0x0f, 0x44, 0x10, 0xf5, 0x43, 0x80, 0x2b, 0xe5, 0x47, 0xb4, 0x04, -0x06, 0x53, 0x5e, 0xfb, 0x75, 0x42, 0x09, 0xe5, 0x47, 0xb4, 0x05, 0x06, 0x43, 0x5e, 0x04, 0x75, -0x42, 0x09, 0xe5, 0x47, 0xb4, 0x06, 0x10, 0xe5, 0x43, 0x54, 0x0f, 0x44, 0x30, 0xf5, 0x43, 0x80, -0x06, 0xd2, 0x4b, 0x80, 0x02, 0xd2, 0x4c, 0xe4, 0xf5, 0x2a, 0xe5, 0x42, 0xc4, 0x54, 0xf0, 0xff, -0xe5, 0x43, 0x54, 0x0f, 0x4f, 0xf5, 0x5f, 0xd2, 0x60, 0x22, 0xe5, 0x47, 0x60, 0x1a, 0x24, 0xc0, -0x60, 0x0a, 0x24, 0x35, 0x70, 0x09, 0x12, 0x19, 0x5f, 0x12, 0x15, 0x09, 0x12, 0x19, 0x5f, 0x12, -0x15, 0x09, 0xc2, 0xaf, 0xc2, 0x04, 0xd2, 0xaf, 0x22, 0xc2, 0xaf, 0x90, 0x04, 0x14, 0xe0, 0x54, -0x0e, 0x60, 0x04, 0xd2, 0x1c, 0x80, 0x08, 0xe5, 0x4e, 0x45, 0x4f, 0x24, 0xff, 0x92, 0x1c, 0xd2, -0xaf, 0x90, 0x04, 0x14, 0xe0, 0xa2, 0xe4, 0x92, 0x1d, 0x74, 0x1e, 0xf0, 0xe5, 0x5f, 0x54, 0x0f, -0xf5, 0x2d, 0xe5, 0x2a, 0x70, 0x13, 0x30, 0x1c, 0x05, 0xe5, 0x5f, 0x20, 0xe5, 0x0b, 0x30, 0x1d, -0x29, 0xe5, 0x5f, 0x54, 0x30, 0x64, 0x30, 0x70, 0x21, 0xe5, 0x2a, 0x70, 0x15, 0xe5, 0x34, 0xc3, -0x94, 0x03, 0x40, 0x09, 0xe5, 0x30, 0x60, 0x05, 0x75, 0x2a, 0x05, 0x80, 0x07, 0x75, 0x2a, 0x0c, -0x80, 0x02, 0x15, 0x2a, 0xd2, 0x6c, 0xd2, 0x6d, 0x80, 0x0f, 0xe5, 0x5f, 0x30, 0xe6, 0x06, 0xc2, -0x6c, 0xd2, 0x6d, 0x80, 0x04, 0xd2, 0x6c, 0xc2, 0x6d, 0xe5, 0x47, 0x64, 0x03, 0x70, 0x21, 0x30, -0x4b, 0x06, 0xc2, 0x6c, 0xd2, 0x6d, 0x80, 0x18, 0xe5, 0x2a, 0x70, 0x03, 0x30, 0x4c, 0x11, 0xc2, -0x4c, 0xe5, 0x2a, 0x70, 0x05, 0x75, 0x2a, 0x07, 0x80, 0x02, 0x15, 0x2a, 0xd2, 0x6c, 0xd2, 0x6d, -0xe5, 0x47, 0xb4, 0x09, 0x14, 0xe5, 0x44, 0x20, 0xe3, 0x0b, 0xe5, 0x3a, 0x64, 0x02, 0x60, 0x05, -0xe5, 0x3a, 0xb4, 0x03, 0x04, 0xc2, 0x6c, 0xd2, 0x6d, 0xe5, 0x47, 0xb4, 0x0a, 0x13, 0xe5, 0x3a, -0xb4, 0x01, 0x06, 0xc2, 0x6c, 0xd2, 0x6d, 0x80, 0x08, 0xe5, 0x3a, 0x70, 0x04, 0xd2, 0x6c, 0xc2, -0x6d, 0x20, 0x69, 0x07, 0xe5, 0x5e, 0x20, 0xe0, 0x02, 0xb2, 0x68, 0x20, 0x6b, 0x07, 0xe5, 0x5e, -0x20, 0xe1, 0x02, 0xb2, 0x6a, 0x20, 0x6d, 0x07, 0xe5, 0x5e, 0x20, 0xe2, 0x02, 0xb2, 0x6c, 0x75, -0x2e, 0x40, 0x20, 0x69, 0x04, 0xa2, 0x68, 0x80, 0x45, 0x30, 0x68, 0x06, 0xe5, 0x46, 0xa2, 0xe2, -0x80, 0x3c, 0x30, 0x19, 0x1c, 0xe5, 0x5e, 0x20, 0xe2, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, -0xe5, 0x2f, 0xb4, 0x19, 0x04, 0x7e, 0x01, 0x80, 0x02, 0x7e, 0x00, 0xee, 0x6f, 0x24, 0xff, 0x80, -0x1d, 0xe5, 0x5e, 0x20, 0xe2, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xe5, 0x46, 0x54, 0xf0, -0xfe, 0xbe, 0xf0, 0x04, 0x7e, 0x01, 0x80, 0x02, 0x7e, 0x00, 0xee, 0x6f, 0x24, 0xff, 0x92, 0x73, -0x92, 0x72, 0x20, 0x6b, 0x04, 0xa2, 0x6a, 0x80, 0x45, 0x30, 0x6a, 0x06, 0xe5, 0x46, 0xa2, 0xe2, -0x80, 0x3c, 0x30, 0x19, 0x1c, 0xe5, 0x5e, 0x20, 0xe0, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, -0xe5, 0x2f, 0xb4, 0x19, 0x04, 0x7e, 0x01, 0x80, 0x02, 0x7e, 0x00, 0xee, 0x6f, 0x24, 0xff, 0x80, -0x1d, 0xe5, 0x5e, 0x20, 0xe0, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xe5, 0x46, 0x54, 0xf0, -0xfe, 0xbe, 0xf0, 0x04, 0x7e, 0x01, 0x80, 0x02, 0x7e, 0x00, 0xee, 0x6f, 0x24, 0xff, 0x92, 0x75, -0x92, 0x74, 0x20, 0x6d, 0x04, 0xa2, 0x6c, 0x80, 0x64, 0xe5, 0x47, 0x64, 0x0a, 0x70, 0x19, 0xe5, -0x3a, 0xb4, 0x01, 0x06, 0xe5, 0x46, 0xa2, 0xe3, 0x80, 0x53, 0xe5, 0x46, 0x20, 0xe4, 0x03, 0x30, -0xe5, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x80, 0x45, 0x30, 0x6c, 0x06, 0xe5, 0x46, 0xa2, 0xe2, 0x80, -0x3c, 0x30, 0x19, 0x1c, 0xe5, 0x5e, 0x20, 0xe1, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xe5, -0x2f, 0xb4, 0x19, 0x04, 0x7e, 0x01, 0x80, 0x02, 0x7e, 0x00, 0xee, 0x6f, 0x24, 0xff, 0x80, 0x1d, -0xe5, 0x5e, 0x20, 0xe1, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xe5, 0x46, 0x54, 0xf0, 0xfe, -0xbe, 0xf0, 0x04, 0x7e, 0x01, 0x80, 0x02, 0x7e, 0x00, 0xee, 0x6f, 0x24, 0xff, 0x92, 0x71, 0x92, -0x70, 0x90, 0x10, 0x00, 0xe0, 0x90, 0x10, 0x2c, 0xf0, 0x90, 0x10, 0x03, 0xe0, 0xc3, 0x94, 0x30, -0x40, 0x14, 0xa2, 0x71, 0x92, 0x77, 0xa2, 0x70, 0x92, 0x76, 0xe5, 0x2e, 0x13, 0x13, 0x54, 0x3f, -0xf5, 0x2e, 0xc2, 0x77, 0xd2, 0x76, 0x90, 0x10, 0x2f, 0xe5, 0x2e, 0xf0, 0xe5, 0x47, 0x64, 0x06, -0x70, 0x46, 0x90, 0x02, 0x29, 0xe0, 0x54, 0xfe, 0xf0, 0xe5, 0x43, 0xc4, 0x54, 0x0f, 0x14, 0x60, -0x14, 0x24, 0xfe, 0x60, 0x1f, 0x24, 0x03, 0x60, 0x03, 0x02, 0x19, 0x5e, 0x90, 0x02, 0x28, 0xe0, -0x30, 0x47, 0x0d, 0x80, 0x07, 0x90, 0x02, 0x28, 0xe0, 0x20, 0x47, 0x04, 0x54, 0xfe, 0xf0, 0x22, -0x44, 0x01, 0xf0, 0x22, 0xe5, 0x46, 0x30, 0xe2, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0x90, -0x02, 0x28, 0xe0, 0x54, 0xfe, 0x4f, 0xf0, 0x22, 0xe5, 0x47, 0x64, 0x07, 0x60, 0x0f, 0xe5, 0x47, -0x64, 0x08, 0x60, 0x09, 0xe5, 0x47, 0x64, 0x09, 0x60, 0x03, 0x02, 0x18, 0x27, 0xe4, 0xf5, 0x27, -0x90, 0x02, 0x29, 0xe0, 0x54, 0xfc, 0xf0, 0xe5, 0x3a, 0x14, 0x60, 0x2d, 0x14, 0x60, 0x2e, 0x14, -0x60, 0x36, 0x24, 0xfc, 0x60, 0x5f, 0x24, 0xf9, 0x60, 0x1f, 0x24, 0x0e, 0x70, 0x69, 0xe5, 0x46, -0x13, 0x13, 0x54, 0x3f, 0x75, 0xf0, 0x03, 0x84, 0xaf, 0xf0, 0x20, 0x47, 0x04, 0x7e, 0x01, 0x80, -0x02, 0x7e, 0x00, 0xef, 0x6e, 0x24, 0xff, 0x80, 0x45, 0xa2, 0x47, 0x80, 0x41, 0xe5, 0x46, 0x30, -0xe2, 0x03, 0xd3, 0x80, 0x27, 0xc3, 0x80, 0x24, 0xe5, 0x46, 0x30, 0xe2, 0x0d, 0x54, 0x38, 0xc3, -0x94, 0x30, 0x50, 0x06, 0x7e, 0x00, 0x7f, 0x01, 0x80, 0x04, 0x7e, 0x00, 0x7f, 0x00, 0x20, 0x47, -0x04, 0x7d, 0x01, 0x80, 0x02, 0x7d, 0x00, 0xef, 0x6d, 0x4e, 0x24, 0xff, 0x92, 0x38, 0xa2, 0x47, -0xb3, 0x92, 0x39, 0x80, 0x19, 0xe5, 0x46, 0x30, 0xe2, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, 0x39, -0xa2, 0x47, 0xb3, 0x92, 0x38, 0x80, 0x07, 0xa2, 0x47, 0xb3, 0x92, 0x38, 0x92, 0x39, 0x90, 0x02, -0x28, 0xe0, 0x54, 0xfc, 0x02, 0x19, 0x5b, 0xe5, 0x47, 0x64, 0x0c, 0x60, 0x09, 0xe5, 0x47, 0x64, -0x0b, 0x60, 0x03, 0x02, 0x18, 0xc6, 0xe4, 0xf5, 0x27, 0x90, 0x02, 0x29, 0xe0, 0x54, 0xfd, 0xf0, -0xe5, 0x3a, 0x14, 0x60, 0x2b, 0x14, 0x60, 0x2e, 0x14, 0x60, 0x38, 0x24, 0xfc, 0x60, 0x5c, 0x24, -0xf9, 0x60, 0x1d, 0x24, 0x0e, 0x70, 0x61, 0xe5, 0x46, 0x13, 0x13, 0x54, 0x3f, 0x75, 0xf0, 0x03, -0x84, 0xaf, 0xf0, 0x20, 0x47, 0x04, 0x7e, 0x01, 0x80, 0x02, 0x7e, 0x00, 0xef, 0x6e, 0x80, 0x35, -0xa2, 0x47, 0x92, 0x39, 0x80, 0x47, 0xe5, 0x46, 0x30, 0xe2, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, -0x39, 0x80, 0x3a, 0xe5, 0x46, 0x30, 0xe2, 0x0d, 0x54, 0x38, 0xc3, 0x94, 0x30, 0x50, 0x06, 0x7e, -0x00, 0x7f, 0x01, 0x80, 0x04, 0x7e, 0x00, 0x7f, 0x00, 0x20, 0x47, 0x04, 0x7d, 0x01, 0x80, 0x02, -0x7d, 0x00, 0xef, 0x6d, 0x4e, 0x24, 0xff, 0x92, 0x39, 0x80, 0x12, 0xe5, 0x46, 0x30, 0xe2, 0x03, -0xd3, 0x80, 0x01, 0xc3, 0x92, 0x39, 0x80, 0x05, 0xa2, 0x47, 0xb3, 0x92, 0x39, 0x90, 0x02, 0x28, -0xe0, 0x54, 0xfd, 0x02, 0x19, 0x5b, 0xe5, 0x47, 0x64, 0x0d, 0x60, 0x03, 0x02, 0x19, 0x5e, 0xf5, -0x27, 0x90, 0x02, 0x29, 0xe0, 0x54, 0xef, 0xf0, 0xe5, 0x3a, 0x14, 0x60, 0x2b, 0x14, 0x60, 0x2e, -0x14, 0x60, 0x38, 0x24, 0xfc, 0x60, 0x5c, 0x24, 0xf9, 0x60, 0x1d, 0x24, 0x0e, 0x70, 0x61, 0xe5, -0x46, 0x13, 0x13, 0x54, 0x3f, 0x75, 0xf0, 0x03, 0x84, 0xaf, 0xf0, 0x20, 0x47, 0x04, 0x7e, 0x01, -0x80, 0x02, 0x7e, 0x00, 0xef, 0x6e, 0x80, 0x35, 0xa2, 0x47, 0x92, 0x3c, 0x80, 0x47, 0xe5, 0x46, -0x30, 0xe2, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, 0x3c, 0x80, 0x3a, 0xe5, 0x46, 0x30, 0xe2, 0x0d, -0x54, 0x38, 0xc3, 0x94, 0x30, 0x50, 0x06, 0x7e, 0x00, 0x7f, 0x01, 0x80, 0x04, 0x7e, 0x00, 0x7f, -0x00, 0x20, 0x47, 0x04, 0x7d, 0x01, 0x80, 0x02, 0x7d, 0x00, 0xef, 0x6d, 0x4e, 0x24, 0xff, 0x92, -0x3c, 0x80, 0x12, 0xe5, 0x46, 0x30, 0xe2, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, 0x3c, 0x80, 0x05, -0xa2, 0x47, 0xb3, 0x92, 0x3c, 0x90, 0x02, 0x28, 0xe0, 0x54, 0xef, 0x45, 0x27, 0xf0, 0x22, 0xe5, -0x47, 0x64, 0x0b, 0x70, 0x1c, 0x90, 0x02, 0x29, 0xe0, 0x54, 0xeb, 0xf0, 0x30, 0x47, 0x04, 0xaf, -0x45, 0x80, 0x05, 0xe5, 0x45, 0x64, 0x14, 0xff, 0x90, 0x02, 0x28, 0xe0, 0x54, 0xeb, 0x4f, 0xf0, -0x22, 0xe4, 0x90, 0x02, 0x29, 0xf0, 0x30, 0x47, 0x04, 0xaf, 0x45, 0x80, 0x04, 0xe5, 0x45, 0xf4, -0xff, 0x90, 0x02, 0x28, 0xef, 0xf0, 0x22, 0x8f, 0x50, 0xd2, 0x59, 0x22, 0x8f, 0x54, 0xd2, 0x58, -0x22, 0xe4, 0xf5, 0x37, 0xc2, 0xaf, 0xe5, 0x51, 0x14, 0x60, 0x4a, 0x14, 0x60, 0x6b, 0x24, 0x02, -0x60, 0x03, 0x02, 0x1b, 0x12, 0xd2, 0x59, 0x75, 0x55, 0x01, 0x20, 0x1a, 0x1c, 0x90, 0x02, 0x08, -0xe0, 0x54, 0xfe, 0xf0, 0xe0, 0x20, 0xe1, 0x23, 0x90, 0x04, 0x34, 0xe0, 0xb4, 0x02, 0x1c, 0xa3, -0xe0, 0xb4, 0x02, 0x17, 0xa3, 0xe0, 0xb4, 0x02, 0x12, 0x7f, 0x20, 0x12, 0x19, 0x97, 0x90, 0x10, -0x04, 0xe0, 0x54, 0xf3, 0xf0, 0x75, 0x51, 0x01, 0x02, 0x1b, 0x12, 0xe5, 0x50, 0x70, 0x06, 0x75, -0x37, 0x03, 0x02, 0x1b, 0x12, 0x90, 0x12, 0x00, 0xe0, 0x54, 0x03, 0x70, 0x15, 0x7f, 0x20, 0x12, -0x19, 0x97, 0x20, 0x1a, 0x07, 0x90, 0x02, 0x08, 0xe0, 0x54, 0xfb, 0xf0, 0x75, 0x51, 0x02, 0x02, -0x1b, 0x12, 0xe5, 0x50, 0x70, 0x03, 0x02, 0x1b, 0x0d, 0x20, 0x1a, 0x15, 0x90, 0x02, 0x08, 0xe0, -0x30, 0xe3, 0x03, 0x02, 0x1b, 0x09, 0x90, 0x04, 0x37, 0xe0, 0x64, 0x22, 0x60, 0x03, 0x02, 0x1b, -0x09, 0x90, 0x12, 0x04, 0x74, 0x0a, 0xf0, 0xe5, 0x58, 0xb4, 0x72, 0x15, 0xe5, 0x59, 0xb4, 0x35, -0x10, 0xe4, 0x90, 0x05, 0x00, 0xf0, 0xa3, 0x74, 0x08, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0x74, 0x03, -0xf0, 0x7f, 0x01, 0x12, 0x03, 0x30, 0x90, 0x13, 0x28, 0xe0, 0x54, 0xf0, 0xf0, 0xa3, 0xe0, 0x54, -0xf0, 0xf0, 0xe5, 0x59, 0xb4, 0x35, 0x14, 0xe5, 0x3c, 0xf4, 0x60, 0x06, 0xa3, 0xe0, 0x54, 0xf3, -0x80, 0x14, 0x90, 0x13, 0x2a, 0xe0, 0x54, 0xfb, 0xf0, 0x80, 0x14, 0xe5, 0x3c, 0xf4, 0x90, 0x13, -0x2a, 0x60, 0x08, 0xe0, 0x54, 0xf2, 0x45, 0x3c, 0xf0, 0x80, 0x04, 0xe0, 0x54, 0xfa, 0xf0, 0x20, -0x1a, 0x07, 0x90, 0x04, 0x01, 0xe0, 0x44, 0x10, 0xf0, 0xe5, 0x34, 0xc3, 0x94, 0x03, 0x40, 0x09, -0xe5, 0x30, 0x70, 0x05, 0x75, 0x8c, 0x40, 0x80, 0x03, 0x75, 0x8c, 0x80, 0x90, 0x04, 0x01, 0xe0, -0x54, 0xfd, 0xf0, 0x20, 0x1a, 0x07, 0x90, 0x12, 0x04, 0xe0, 0x44, 0x04, 0xf0, 0xe5, 0x59, 0xb4, -0x28, 0x06, 0x90, 0x01, 0x0d, 0xe0, 0xf5, 0x31, 0xe5, 0x34, 0xc3, 0x94, 0x02, 0x40, 0x14, 0x90, -0x01, 0x0d, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x59, 0x64, 0x35, 0x60, 0x07, 0x90, 0x12, 0x04, 0xe0, -0x54, 0xfd, 0xf0, 0xe5, 0x34, 0xc3, 0x94, 0x03, 0x40, 0x14, 0x20, 0x02, 0x11, 0x20, 0x03, 0x0e, -0x90, 0x01, 0x0d, 0xe0, 0x54, 0xfb, 0xf0, 0x90, 0x01, 0x0c, 0xe0, 0x54, 0xfd, 0xf0, 0x75, 0x37, -0x01, 0x75, 0x55, 0x02, 0xe4, 0xf5, 0x51, 0x80, 0x09, 0xe5, 0x50, 0x70, 0x05, 0x75, 0x37, 0x03, -0xf5, 0x51, 0xe5, 0x37, 0x60, 0x18, 0xc2, 0x01, 0xe4, 0xf5, 0x51, 0xc2, 0x59, 0x20, 0x1a, 0x0e, -0xad, 0x37, 0xaf, 0x40, 0x12, 0x1c, 0x1b, 0xe5, 0x37, 0xb4, 0x03, 0x02, 0xd2, 0x03, 0xd2, 0xaf, -0x22, 0xc2, 0xaf, 0x30, 0x01, 0x0e, 0xe4, 0xf5, 0x51, 0xc2, 0x59, 0xc2, 0x01, 0x7d, 0x02, 0xaf, -0x40, 0x12, 0x1c, 0x1b, 0xe5, 0x52, 0x14, 0x60, 0x5c, 0x14, 0x60, 0x3a, 0x24, 0x02, 0x60, 0x03, -0x02, 0x1c, 0x18, 0xe5, 0x34, 0xc3, 0x94, 0x03, 0x40, 0x0c, 0x90, 0x01, 0x0c, 0xe0, 0x44, 0x02, -0xf0, 0xa3, 0xe0, 0x44, 0x04, 0xf0, 0xe5, 0x34, 0xc3, 0x94, 0x02, 0x40, 0x13, 0x90, 0x12, 0x04, -0xe0, 0x44, 0x02, 0xf0, 0x7f, 0x32, 0x12, 0x03, 0x30, 0x90, 0x01, 0x0d, 0xe0, 0x54, 0xfe, 0xf0, -0x75, 0x52, 0x02, 0x75, 0x55, 0x03, 0xe5, 0x59, 0xb4, 0x28, 0x06, 0x90, 0x01, 0x0d, 0xe5, 0x31, -0xf0, 0x90, 0x12, 0x04, 0xe0, 0x54, 0xfb, 0xf0, 0x7f, 0x20, 0x12, 0x19, 0x9c, 0x75, 0x52, 0x01, -0x75, 0x55, 0x03, 0x80, 0x73, 0xe5, 0x54, 0x70, 0x6f, 0x90, 0x04, 0x01, 0xe0, 0x44, 0x0e, 0xf0, -0x20, 0x1a, 0x04, 0xe0, 0x54, 0xef, 0xf0, 0xe4, 0xf5, 0x8c, 0x90, 0x13, 0x28, 0xe0, 0x44, 0x0f, -0xf0, 0xa3, 0xe0, 0x44, 0x0f, 0xf0, 0xa3, 0xe0, 0x44, 0x05, 0xf0, 0x90, 0x12, 0x04, 0x74, 0x03, -0xf0, 0xe5, 0x58, 0xb4, 0x72, 0x16, 0xe5, 0x59, 0xb4, 0x35, 0x11, 0x90, 0x05, 0x00, 0x74, 0xe2, -0xf0, 0xa3, 0x74, 0x08, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0x74, 0x03, 0xf0, 0x7f, 0x01, 0x12, 0x03, -0x30, 0x20, 0x1a, 0x07, 0x90, 0x02, 0x08, 0xe0, 0x44, 0x05, 0xf0, 0x90, 0x10, 0x04, 0xe0, 0x44, -0x0c, 0xf0, 0xe4, 0xf5, 0x52, 0xf5, 0x55, 0x30, 0x02, 0x09, 0xc2, 0x02, 0x7d, 0x01, 0xaf, 0x41, -0x12, 0x1c, 0x1b, 0x30, 0x03, 0x02, 0xc2, 0x03, 0xd2, 0xaf, 0x22, 0xef, 0xf4, 0x60, 0x2d, 0xe4, -0xfe, 0x74, 0x14, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xe0, 0xb4, 0xff, 0x19, 0x74, -0x14, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xef, 0xf0, 0x74, 0x1c, 0x2e, 0xf5, 0x82, -0xe4, 0x34, 0x70, 0xf5, 0x83, 0xed, 0xf0, 0x22, 0x0e, 0xbe, 0x04, 0xd5, 0x22, 0x22, 0x22, 0x30, -0x1a, 0x77, 0x90, 0x04, 0x37, 0xe0, 0x20, 0xe5, 0x6c, 0x90, 0x04, 0x28, 0xe0, 0xf5, 0x38, 0xa3, -0xe0, 0xf5, 0x37, 0xf5, 0x39, 0xe4, 0xf5, 0x25, 0xe5, 0x39, 0x75, 0xf0, 0x80, 0xa4, 0x24, 0x00, -0xff, 0xe5, 0xf0, 0x34, 0x80, 0xfe, 0xe5, 0x37, 0x65, 0x39, 0x70, 0x05, 0xfc, 0x7d, 0x28, 0x80, -0x04, 0x7c, 0x00, 0x7d, 0x00, 0xef, 0x2d, 0xff, 0xee, 0x3c, 0xfe, 0x12, 0x1c, 0xca, 0x50, 0x07, -0x90, 0x01, 0x14, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x39, 0x65, 0x38, 0x60, 0x10, 0xe4, 0x25, 0x39, -0xff, 0xe4, 0x34, 0x80, 0x8f, 0x82, 0xf5, 0x83, 0xe0, 0xf5, 0x39, 0x80, 0xbb, 0x90, 0x04, 0x10, -0x74, 0x01, 0xf0, 0x90, 0x04, 0x28, 0xe5, 0x38, 0xf0, 0xa3, 0xe5, 0x37, 0xf0, 0x90, 0x04, 0x11, -0x74, 0x01, 0xf0, 0x80, 0x8d, 0xc2, 0x06, 0xd2, 0x1b, 0x22, 0xe5, 0x25, 0xc3, 0x94, 0x06, 0x50, -0x19, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xb4, 0xff, 0x07, 0x05, 0x25, 0xe4, 0xf5, 0x24, 0x80, 0x2e, -0xe4, 0xf5, 0x25, 0x8f, 0x82, 0x8e, 0x83, 0xf0, 0x80, 0x24, 0xe5, 0x24, 0x75, 0xf0, 0x06, 0x84, -0x74, 0x08, 0x25, 0xf0, 0xf5, 0x82, 0xe4, 0x34, 0x10, 0xf5, 0x83, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, -0x83, 0xe0, 0x6d, 0x70, 0x06, 0x05, 0x25, 0x05, 0x24, 0x80, 0x03, 0xe4, 0xf5, 0x25, 0x0f, 0xbf, -0x00, 0x01, 0x0e, 0xef, 0x54, 0x7f, 0x60, 0x07, 0xe5, 0x25, 0xc3, 0x94, 0x2a, 0x40, 0xab, 0xe5, -0x25, 0xb4, 0x2a, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0xe3, 0x34, } ; From cffd4e16cd6e5893148c31f86d1b48db10b64baa Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Mon, 18 Jan 2010 14:23:20 +0300 Subject: [PATCH 183/367] Staging: rtl8187se: fix if statement I removed a misplace semicolon. It is clear from the indentation that TxPwrTracking87SE() was only supposed to be called if CheckTxPwrTracking() returned true. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8187se/r8180_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index e0f13efdb15a..1fb9e1141df8 100644 --- a/drivers/staging/rtl8187se/r8180_core.c +++ b/drivers/staging/rtl8187se/r8180_core.c @@ -2566,7 +2566,7 @@ void watch_dog_adaptive(unsigned long data) // Tx Power Tracking on 87SE. #ifdef TX_TRACK //if( priv->bTxPowerTrack ) //lzm mod 080826 - if( CheckTxPwrTracking((struct net_device *)data)); + if (CheckTxPwrTracking((struct net_device *)data)) TxPwrTracking87SE((struct net_device *)data); #endif From 5fe68019c600ac0b92475654cbee66208dddb800 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 20 Jan 2010 17:29:10 -0500 Subject: [PATCH 184/367] Staging: crystalhd: fix build on powerpc Add necessary include to fix build on PowerPC Signed-off-by: Dave Airlie Signed-off-by: Jarod Wilson Signed-off-by: Greg Kroah-Hartman --- drivers/staging/crystalhd/crystalhd_lnx.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/crystalhd/crystalhd_lnx.h b/drivers/staging/crystalhd/crystalhd_lnx.h index d3f9fc43d2d4..d338ae97a4cf 100644 --- a/drivers/staging/crystalhd/crystalhd_lnx.h +++ b/drivers/staging/crystalhd/crystalhd_lnx.h @@ -40,6 +40,7 @@ #include #include #include +#include #include #include From 09b25c6fa36ea3c961e75cede0f86f1fed5c33b5 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:32:39 +0000 Subject: [PATCH 185/367] Staging: et131x: kill off the FBR_NUM_DES type This is another 10 bit value with the high bits clear, and where the type doesn't get used anywhere properly anyway Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_address_map.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index e715e4dcb523..fcd968132263 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h @@ -451,18 +451,6 @@ typedef union _RXDMA_CSR_t { * 31-10: unused * 9-0: fbr ndesc */ -typedef union _RXDMA_FBR_NUM_DES_t { - u32 value; - struct { -#ifdef _BIT_FIELDS_HTOL - u32 unused:22; /* bits 10-31 */ - u32 fbr_ndesc:10; /* bits 0-9 */ -#else - u32 fbr_ndesc:10; /* bits 0-9 */ - u32 unused:22; /* bits 10-31 */ -#endif - } bits; -} RXDMA_FBR_NUM_DES_t, *PRXDMA_FBR_NUM_DES_t; /* * structure for free buffer ring 0 available offset reg in rxdma address map From 7d9e15eb31debad09ef055290d04e162998b766f Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:32:44 +0000 Subject: [PATCH 186/367] Staging: et131x: kill of FBR_WORD2 This is only used meaningfully as a definition, we never mask and fetch the bits apart Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_rx.c | 8 ++++---- drivers/staging/et131x/et1310_rx.h | 15 +-------------- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c index 81c1a7478ad6..2600b2f7a623 100644 --- a/drivers/staging/et131x/et1310_rx.c +++ b/drivers/staging/et131x/et1310_rx.c @@ -640,7 +640,7 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev) for (entry = 0; entry < rx_local->Fbr1NumEntries; entry++) { fbr_entry->addr_hi = rx_local->Fbr[1]->PAHigh[entry]; fbr_entry->addr_lo = rx_local->Fbr[1]->PALow[entry]; - fbr_entry->word2.bits.bi = entry; + fbr_entry->word2 = entry; fbr_entry++; } @@ -665,7 +665,7 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev) for (entry = 0; entry < rx_local->Fbr0NumEntries; entry++) { fbr_entry->addr_hi = rx_local->Fbr[0]->PAHigh[entry]; fbr_entry->addr_lo = rx_local->Fbr[0]->PALow[entry]; - fbr_entry->word2.bits.bi = entry; + fbr_entry->word2 = entry; fbr_entry++; } @@ -1126,7 +1126,7 @@ void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD rfd) */ next->addr_hi = rx_local->Fbr[1]->PAHigh[bi]; next->addr_lo = rx_local->Fbr[1]->PALow[bi]; - next->word2.value = bi; + next->word2 = bi; writel(bump_fbr(&rx_local->local_Fbr1_full, rx_local->Fbr1NumEntries - 1), @@ -1144,7 +1144,7 @@ void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD rfd) */ next->addr_hi = rx_local->Fbr[0]->PAHigh[bi]; next->addr_lo = rx_local->Fbr[0]->PALow[bi]; - next->word2.value = bi; + next->word2 = bi; writel(bump_fbr(&rx_local->local_Fbr0_full, rx_local->Fbr0NumEntries - 1), diff --git a/drivers/staging/et131x/et1310_rx.h b/drivers/staging/et131x/et1310_rx.h index 69514593612c..db252cafa94a 100644 --- a/drivers/staging/et131x/et1310_rx.h +++ b/drivers/staging/et131x/et1310_rx.h @@ -91,23 +91,10 @@ #define ALCATEL_BROADCAST_PKT 0x02000000 /* typedefs for Free Buffer Descriptors */ -typedef union _FBR_WORD2_t { - u32 value; - struct { -#ifdef _BIT_FIELDS_HTOL - u32 reserved:22; /* bits 10-31 */ - u32 bi:10; /* bits 0-9(Buffer Index) */ -#else - u32 bi:10; /* bits 0-9(Buffer Index) */ - u32 reserved:22; /* bit 10-31 */ -#endif - } bits; -} FBR_WORD2_t, *PFBR_WORD2_t; - typedef struct _FBR_DESC_t { u32 addr_lo; u32 addr_hi; - FBR_WORD2_t word2; + u32 word2; /* Bits 10-31 reserved, 0-9 descriptor */ } FBR_DESC_t, *PFBR_DESC_t; /* Typedefs for Packet Status Ring Descriptors */ From 13a79c697f737c19b5dd2f642374d9f289f9b830 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:32:50 +0000 Subject: [PATCH 187/367] Staging: et131x: fbr_desc is now only sane types Clean up the typdef for fbr_desc itself so we know it is done Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_rx.c | 35 +++++++++++++++--------------- drivers/staging/et131x/et1310_rx.h | 5 +++-- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c index 2600b2f7a623..6ae8f119d78e 100644 --- a/drivers/staging/et131x/et1310_rx.c +++ b/drivers/staging/et131x/et1310_rx.c @@ -170,7 +170,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) #endif /* Allocate an area of memory for Free Buffer Ring 1 */ - bufsize = (sizeof(FBR_DESC_t) * rx_ring->Fbr1NumEntries) + 0xfff; + bufsize = (sizeof(struct fbr_desc) * rx_ring->Fbr1NumEntries) + 0xfff; rx_ring->pFbr1RingVa = pci_alloc_consistent(adapter->pdev, bufsize, &rx_ring->pFbr1RingPa); @@ -199,7 +199,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) #ifdef USE_FBR0 /* Allocate an area of memory for Free Buffer Ring 0 */ - bufsize = (sizeof(FBR_DESC_t) * rx_ring->Fbr0NumEntries) + 0xfff; + bufsize = (sizeof(struct fbr_desc) * rx_ring->Fbr0NumEntries) + 0xfff; rx_ring->pFbr0RingVa = pci_alloc_consistent(adapter->pdev, bufsize, &rx_ring->pFbr0RingPa); @@ -450,12 +450,11 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter) rx_ring->pFbr1RingVa = (void *)((uint8_t *) rx_ring->pFbr1RingVa - rx_ring->Fbr1offset); - bufsize = - (sizeof(FBR_DESC_t) * rx_ring->Fbr1NumEntries) + 0xfff; + bufsize = (sizeof(struct fbr_desc) * rx_ring->Fbr1NumEntries) + + 0xfff; - pci_free_consistent(adapter->pdev, - bufsize, - rx_ring->pFbr1RingVa, rx_ring->pFbr1RingPa); + pci_free_consistent(adapter->pdev, bufsize, + rx_ring->pFbr1RingVa, rx_ring->pFbr1RingPa); rx_ring->pFbr1RingVa = NULL; } @@ -484,8 +483,8 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter) rx_ring->pFbr0RingVa = (void *)((uint8_t *) rx_ring->pFbr0RingVa - rx_ring->Fbr0offset); - bufsize = - (sizeof(FBR_DESC_t) * rx_ring->Fbr0NumEntries) + 0xfff; + bufsize = (sizeof(struct fbr_desc) * rx_ring->Fbr0NumEntries) + + 0xfff; pci_free_consistent(adapter->pdev, bufsize, @@ -596,7 +595,7 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev) { struct _RXDMA_t __iomem *rx_dma = &etdev->regs->rxdma; struct _rx_ring_t *rx_local = &etdev->RxRing; - PFBR_DESC_t fbr_entry; + struct fbr_desc *fbr_entry; u32 entry; u32 psr_num_des; unsigned long flags; @@ -636,7 +635,7 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev) rx_local->local_psr_full = 0; /* Now's the best time to initialize FBR1 contents */ - fbr_entry = (PFBR_DESC_t) rx_local->pFbr1RingVa; + fbr_entry = (struct fbr_desc *) rx_local->pFbr1RingVa; for (entry = 0; entry < rx_local->Fbr1NumEntries; entry++) { fbr_entry->addr_hi = rx_local->Fbr[1]->PAHigh[entry]; fbr_entry->addr_lo = rx_local->Fbr[1]->PALow[entry]; @@ -661,7 +660,7 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev) #ifdef USE_FBR0 /* Now's the best time to initialize FBR0 contents */ - fbr_entry = (PFBR_DESC_t) rx_local->pFbr0RingVa; + fbr_entry = (struct fbr_desc *) rx_local->pFbr0RingVa; for (entry = 0; entry < rx_local->Fbr0NumEntries; entry++) { fbr_entry->addr_hi = rx_local->Fbr[0]->PAHigh[entry]; fbr_entry->addr_lo = rx_local->Fbr[0]->PALow[entry]; @@ -1116,9 +1115,9 @@ void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD rfd) spin_lock_irqsave(&etdev->FbrLock, flags); if (ri == 1) { - PFBR_DESC_t next = - (PFBR_DESC_t) (rx_local->pFbr1RingVa) + - INDEX10(rx_local->local_Fbr1_full); + struct fbr_desc *next = + (struct fbr_desc *) (rx_local->pFbr1RingVa) + + INDEX10(rx_local->local_Fbr1_full); /* Handle the Free Buffer Ring advancement here. Write * the PA / Buffer Index for the returned buffer into @@ -1134,9 +1133,9 @@ void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD rfd) } #ifdef USE_FBR0 else { - PFBR_DESC_t next = - (PFBR_DESC_t) rx_local->pFbr0RingVa + - INDEX10(rx_local->local_Fbr0_full); + struct fbr_desc *next = (struct fbr_desc *) + rx_local->pFbr0RingVa + + INDEX10(rx_local->local_Fbr0_full); /* Handle the Free Buffer Ring advancement here. Write * the PA / Buffer Index for the returned buffer into diff --git a/drivers/staging/et131x/et1310_rx.h b/drivers/staging/et131x/et1310_rx.h index db252cafa94a..afa670e57179 100644 --- a/drivers/staging/et131x/et1310_rx.h +++ b/drivers/staging/et131x/et1310_rx.h @@ -91,11 +91,12 @@ #define ALCATEL_BROADCAST_PKT 0x02000000 /* typedefs for Free Buffer Descriptors */ -typedef struct _FBR_DESC_t { +struct fbr_desc +{ u32 addr_lo; u32 addr_hi; u32 word2; /* Bits 10-31 reserved, 0-9 descriptor */ -} FBR_DESC_t, *PFBR_DESC_t; +}; /* Typedefs for Packet Status Ring Descriptors */ typedef union _PKT_STAT_DESC_WORD0_t { From 1bd751c1abc1029e8a0ae63ef4f19357c735a2a3 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:32:55 +0000 Subject: [PATCH 188/367] Staging: et131x: Clean up rxdma_csr This is another set of flags as typedef that can be cleaned up. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_address_map.h | 58 +++++++-------------- drivers/staging/et131x/et1310_rx.c | 46 ++++++++-------- 2 files changed, 41 insertions(+), 63 deletions(-) diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index fcd968132263..e39fd5608c98 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h @@ -292,45 +292,25 @@ typedef struct _TXDMA_t { /* Location: */ /* * structure for control status reg in rxdma address map * Located at address 0x2000 + * + * CSR + * 0: halt + * 1-3: tc + * 4: fbr_big_endian + * 5: psr_big_endian + * 6: pkt_big_endian + * 7: dma_big_endian + * 8-9: fbr0_size + * 10: fbr0_enable + * 11-12: fbr1_size + * 13: fbr1_enable + * 14: unused + * 15: pkt_drop_disable + * 16: pkt_done_flush + * 17: halt_status + * 18-31: unused */ -typedef union _RXDMA_CSR_t { - u32 value; - struct { -#ifdef _BIT_FIELDS_HTOL - u32 unused2:14; /* bits 18-31 */ - u32 halt_status:1; /* bit 17 */ - u32 pkt_done_flush:1; /* bit 16 */ - u32 pkt_drop_disable:1; /* bit 15 */ - u32 unused1:1; /* bit 14 */ - u32 fbr1_enable:1; /* bit 13 */ - u32 fbr1_size:2; /* bits 11-12 */ - u32 fbr0_enable:1; /* bit 10 */ - u32 fbr0_size:2; /* bits 8-9 */ - u32 dma_big_endian:1; /* bit 7 */ - u32 pkt_big_endian:1; /* bit 6 */ - u32 psr_big_endian:1; /* bit 5 */ - u32 fbr_big_endian:1; /* bit 4 */ - u32 tc:3; /* bits 1-3 */ - u32 halt:1; /* bit 0 */ -#else - u32 halt:1; /* bit 0 */ - u32 tc:3; /* bits 1-3 */ - u32 fbr_big_endian:1; /* bit 4 */ - u32 psr_big_endian:1; /* bit 5 */ - u32 pkt_big_endian:1; /* bit 6 */ - u32 dma_big_endian:1; /* bit 7 */ - u32 fbr0_size:2; /* bits 8-9 */ - u32 fbr0_enable:1; /* bit 10 */ - u32 fbr1_size:2; /* bits 11-12 */ - u32 fbr1_enable:1; /* bit 13 */ - u32 unused1:1; /* bit 14 */ - u32 pkt_drop_disable:1; /* bit 15 */ - u32 pkt_done_flush:1; /* bit 16 */ - u32 halt_status:1; /* bit 17 */ - u32 unused2:14; /* bits 18-31 */ -#endif - } bits; -} RXDMA_CSR_t, *PRXDMA_CSR_t; + /* * structure for dma writeback lo reg in rxdma address map @@ -521,7 +501,7 @@ typedef union _RXDMA_CSR_t { * Located at address 0x2000 */ typedef struct _RXDMA_t { /* Location: */ - RXDMA_CSR_t csr; /* 0x2000 */ + u32 csr; /* 0x2000 */ u32 dma_wb_base_lo; /* 0x2004 */ u32 dma_wb_base_hi; /* 0x2008 */ u32 num_pkt_done; /* 0x200C */ diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c index 6ae8f119d78e..e593ad654449 100644 --- a/drivers/staging/et131x/et1310_rx.c +++ b/drivers/staging/et131x/et1310_rx.c @@ -720,18 +720,17 @@ void SetRxDmaTimer(struct et131x_adapter *etdev) */ void et131x_rx_dma_disable(struct et131x_adapter *etdev) { - RXDMA_CSR_t csr; - + u32 csr; /* Setup the receive dma configuration register */ - writel(0x00002001, &etdev->regs->rxdma.csr.value); - csr.value = readl(&etdev->regs->rxdma.csr.value); - if (csr.bits.halt_status != 1) { + writel(0x00002001, &etdev->regs->rxdma.csr); + csr = readl(&etdev->regs->rxdma.csr); + if ((csr & 0x00020000) != 1) { /* Check halt status (bit 17) */ udelay(5); - csr.value = readl(&etdev->regs->rxdma.csr.value); - if (csr.bits.halt_status != 1) + csr = readl(&etdev->regs->rxdma.csr); + if ((csr & 0x00020000) != 1) dev_err(&etdev->pdev->dev, - "RX Dma failed to enter halt state. CSR 0x%08x\n", - csr.value); + "RX Dma failed to enter halt state. CSR 0x%08x\n", + csr); } } @@ -742,34 +741,33 @@ void et131x_rx_dma_disable(struct et131x_adapter *etdev) void et131x_rx_dma_enable(struct et131x_adapter *etdev) { /* Setup the receive dma configuration register for normal operation */ - RXDMA_CSR_t csr = { 0 }; + u32 csr = 0x2000; /* FBR1 enable */ - csr.bits.fbr1_enable = 1; if (etdev->RxRing.Fbr1BufferSize == 4096) - csr.bits.fbr1_size = 1; + csr |= 0x0800; else if (etdev->RxRing.Fbr1BufferSize == 8192) - csr.bits.fbr1_size = 2; + csr |= 0x1000; else if (etdev->RxRing.Fbr1BufferSize == 16384) - csr.bits.fbr1_size = 3; + csr |= 0x1800; #ifdef USE_FBR0 - csr.bits.fbr0_enable = 1; + csr |= 0x0400; /* FBR0 enable */ if (etdev->RxRing.Fbr0BufferSize == 256) - csr.bits.fbr0_size = 1; + csr |= 0x0100; else if (etdev->RxRing.Fbr0BufferSize == 512) - csr.bits.fbr0_size = 2; + csr |= 0x0200; else if (etdev->RxRing.Fbr0BufferSize == 1024) - csr.bits.fbr0_size = 3; + csr |= 0x0300; #endif - writel(csr.value, &etdev->regs->rxdma.csr.value); + writel(csr, &etdev->regs->rxdma.csr); - csr.value = readl(&etdev->regs->rxdma.csr.value); - if (csr.bits.halt_status != 0) { + csr = readl(&etdev->regs->rxdma.csr); + if ((csr & 0x00020000) != 0) { udelay(5); - csr.value = readl(&etdev->regs->rxdma.csr.value); - if (csr.bits.halt_status != 0) { + csr = readl(&etdev->regs->rxdma.csr); + if ((csr & 0x00020000) != 0) { dev_err(&etdev->pdev->dev, "RX Dma failed to exit halt state. CSR 0x%08x\n", - csr.value); + csr); } } } From 61d5ed8c62fcceba08812f176de233ea7c78f5da Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:33:01 +0000 Subject: [PATCH 189/367] Staging: et131x: Kill off the rxdma type We have a clean struct of this now so turn the top level typedefs into a struct Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_address_map.h | 8 ++++---- drivers/staging/et131x/et1310_rx.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index e39fd5608c98..9a7a4d256b46 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h @@ -500,7 +500,7 @@ typedef struct _TXDMA_t { /* Location: */ * Rx DMA Module of JAGCore Address Mapping * Located at address 0x2000 */ -typedef struct _RXDMA_t { /* Location: */ +struct rxdma_regs { /* Location: */ u32 csr; /* 0x2000 */ u32 dma_wb_base_lo; /* 0x2004 */ u32 dma_wb_base_hi; /* 0x2008 */ @@ -530,7 +530,7 @@ typedef struct _RXDMA_t { /* Location: */ u32 fbr1_full_offset; /* 0x2068 */ u32 fbr1_rd_index; /* 0x206C */ u32 fbr1_min_des; /* 0x2070 */ -} RXDMA_t, *PRXDMA_t; +}; /* END OF RXDMA REGISTER ADDRESS MAP */ @@ -1688,9 +1688,9 @@ typedef struct _ADDRESS_MAP_t { TXDMA_t txdma; /* unused section of txdma address map */ u8 unused_txdma[4096 - sizeof(TXDMA_t)]; - RXDMA_t rxdma; + struct rxdma_regs rxdma; /* unused section of rxdma address map */ - u8 unused_rxdma[4096 - sizeof(RXDMA_t)]; + u8 unused_rxdma[4096 - sizeof(struct rxdma_regs)]; TXMAC_t txmac; /* unused section of txmac address map */ u8 unused_txmac[4096 - sizeof(TXMAC_t)]; diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c index e593ad654449..ee6436a3475b 100644 --- a/drivers/staging/et131x/et1310_rx.c +++ b/drivers/staging/et131x/et1310_rx.c @@ -593,7 +593,7 @@ int et131x_init_recv(struct et131x_adapter *adapter) */ void ConfigRxDmaRegs(struct et131x_adapter *etdev) { - struct _RXDMA_t __iomem *rx_dma = &etdev->regs->rxdma; + struct rxdma_regs __iomem *rx_dma = &etdev->regs->rxdma; struct _rx_ring_t *rx_local = &etdev->RxRing; struct fbr_desc *fbr_entry; u32 entry; @@ -1097,7 +1097,7 @@ static inline u32 bump_fbr(u32 *fbr, u32 limit) void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD rfd) { struct _rx_ring_t *rx_local = &etdev->RxRing; - struct _RXDMA_t __iomem *rx_dma = &etdev->regs->rxdma; + struct rxdma_regs __iomem *rx_dma = &etdev->regs->rxdma; uint16_t bi = rfd->bufferindex; uint8_t ri = rfd->ringindex; unsigned long flags; From 254472ac59e2298fe3af9edafe291439e7756645 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:33:07 +0000 Subject: [PATCH 190/367] Staging: et131x: kill EXP_ROM This is another unused type for the bin Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_address_map.h | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index 9a7a4d256b46..f121961339c1 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h @@ -1662,22 +1662,6 @@ typedef struct _MMC_t { /* Location: */ /* END OF MMC REGISTER ADDRESS MAP */ -/* START OF EXP ROM REGISTER ADDRESS MAP */ - -/* - * Expansion ROM Module of JAGCore Address Mapping - */ - -/* Take this out until it is not empty */ -#if 0 -typedef struct _EXP_ROM_t { - -} EXP_ROM_t, *PEXP_ROM_t; -#endif - -/* END OF EXP ROM REGISTER ADDRESS MAP */ - - /* * JAGCore Address Mapping */ @@ -1709,11 +1693,6 @@ typedef struct _ADDRESS_MAP_t { /* unused section of address map */ u8 unused_[1015808]; -/* Take this out until it is not empty */ -#if 0 - EXP_ROM_t exp_rom; -#endif - u8 unused_exp_rom[4096]; /* MGS-size TBD */ u8 unused__[524288]; /* unused section of address map */ } ADDRESS_MAP_t, *PADDRESS_MAP_t; From 2b903327d34a48250da3f559a8906f3a55db9901 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:33:12 +0000 Subject: [PATCH 191/367] Staging: et131x: GLOBAL_t is now sane so kill the GLOBAL_t itself Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_address_map.h | 10 ++++------ drivers/staging/et131x/et131x_initpci.c | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index f121961339c1..16254b7603a1 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h @@ -149,7 +149,7 @@ * GLOBAL Module of JAGCore Address Mapping * Located at address 0x0000 */ -typedef struct _GLOBAL_t { /* Location: */ +struct global_regs { /* Location: */ u32 txq_start_addr; /* 0x0000 */ u32 txq_end_addr; /* 0x0004 */ u32 rxq_start_addr; /* 0x0008 */ @@ -165,9 +165,7 @@ typedef struct _GLOBAL_t { /* Location: */ u32 msi_config; /* 0x0030 */ u32 loopback; /* 0x0034 */ u32 watchdog_timer; /* 0x0038 */ -} GLOBAL_t, *PGLOBAL_t; - -/* END OF GLOBAL REGISTER ADDRESS MAP */ +}; /* START OF TXDMA REGISTER ADDRESS MAP */ @@ -1666,9 +1664,9 @@ typedef struct _MMC_t { /* Location: */ * JAGCore Address Mapping */ typedef struct _ADDRESS_MAP_t { - GLOBAL_t global; + struct global_regs global; /* unused section of global address map */ - u8 unused_global[4096 - sizeof(GLOBAL_t)]; + u8 unused_global[4096 - sizeof(struct global_regs)]; TXDMA_t txdma; /* unused section of txdma address map */ u8 unused_txdma[4096 - sizeof(TXDMA_t)]; diff --git a/drivers/staging/et131x/et131x_initpci.c b/drivers/staging/et131x/et131x_initpci.c index 0892b6a538db..e02b1cd98f55 100644 --- a/drivers/staging/et131x/et131x_initpci.c +++ b/drivers/staging/et131x/et131x_initpci.c @@ -327,7 +327,7 @@ void et131x_link_detection_handler(unsigned long data) */ void ConfigGlobalRegs(struct et131x_adapter *etdev) { - struct _GLOBAL_t __iomem *regs = &etdev->regs->global; + struct global_regs __iomem *regs = &etdev->regs->global; writel(0, ®s->rxq_start_addr); writel(INTERNAL_MEM_SIZE - 1, ®s->txq_end_addr); From 060a78a07a06d78e64a00a25f4a4a7d5fe7402d1 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:33:18 +0000 Subject: [PATCH 192/367] Staging: et131x: Kill off TXDMA_t All the contents are clean so kill off the top level typedefs Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_address_map.h | 8 ++++---- drivers/staging/et131x/et1310_tx.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index 16254b7603a1..43bd3034d495 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h @@ -253,7 +253,7 @@ extern inline void add_12bit(u32 *v, int n) * Tx DMA Module of JAGCore Address Mapping * Located at address 0x1000 */ -typedef struct _TXDMA_t { /* Location: */ +struct txdma_regs { /* Location: */ u32 csr; /* 0x1000 */ u32 pr_base_hi; /* 0x1004 */ u32 pr_base_lo; /* 0x1008 */ @@ -280,7 +280,7 @@ typedef struct _TXDMA_t { /* Location: */ u32 DroppedTLPCount; /* 0x105c */ u32 NewServiceComplete; /* 0x1060 */ u32 EthernetPacketCount; /* 0x1064 */ -} TXDMA_t, *PTXDMA_t; +}; /* END OF TXDMA REGISTER ADDRESS MAP */ @@ -1667,9 +1667,9 @@ typedef struct _ADDRESS_MAP_t { struct global_regs global; /* unused section of global address map */ u8 unused_global[4096 - sizeof(struct global_regs)]; - TXDMA_t txdma; + struct txdma_regs txdma; /* unused section of txdma address map */ - u8 unused_txdma[4096 - sizeof(TXDMA_t)]; + u8 unused_txdma[4096 - sizeof(struct txdma_regs)]; struct rxdma_regs rxdma; /* unused section of rxdma address map */ u8 unused_rxdma[4096 - sizeof(struct rxdma_regs)]; diff --git a/drivers/staging/et131x/et1310_tx.c b/drivers/staging/et131x/et1310_tx.c index 977e8b34e7a6..b0cb0579026e 100644 --- a/drivers/staging/et131x/et1310_tx.c +++ b/drivers/staging/et131x/et1310_tx.c @@ -200,7 +200,7 @@ void et131x_tx_dma_memory_free(struct et131x_adapter *adapter) */ void ConfigTxDmaRegs(struct et131x_adapter *etdev) { - struct _TXDMA_t __iomem *txdma = &etdev->regs->txdma; + struct txdma_regs __iomem *txdma = &etdev->regs->txdma; /* Load the hardware with the start of the transmit descriptor ring. */ writel((u32) ((u64)etdev->tx_ring.tx_desc_ring_pa >> 32), From 461e0e8b15864b2f8d7b13a5bf86acf40d7a6fd6 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:33:23 +0000 Subject: [PATCH 193/367] Staging: et131x: Kill off MMC_t The contents of MMC_t are clean so kill off the MMC_t typedef Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_address_map.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index 43bd3034d495..446b2acf2d98 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h @@ -1648,14 +1648,14 @@ typedef struct _MAC_STAT_t { /* Location: */ /* * Memory Control Module of JAGCore Address Mapping */ -typedef struct _MMC_t { /* Location: */ +struct mmc_regs { /* Location: */ u32 mmc_ctrl; /* 0x7000 */ u32 sram_access; /* 0x7004 */ u32 sram_word1; /* 0x7008 */ u32 sram_word2; /* 0x700C */ u32 sram_word3; /* 0x7010 */ u32 sram_word4; /* 0x7014 */ -} MMC_t, *PMMC_t; +}; /* END OF MMC REGISTER ADDRESS MAP */ @@ -1685,9 +1685,9 @@ typedef struct _ADDRESS_MAP_t { MAC_STAT_t macStat; /* unused section of mac stat address map */ u8 unused_mac_stat[4096 - sizeof(MAC_STAT_t)]; - MMC_t mmc; + struct mmc_regs mmc; /* unused section of mmc address map */ - u8 unused_mmc[4096 - sizeof(MMC_t)]; + u8 unused_mmc[4096 - sizeof(struct mmc_regs)]; /* unused section of address map */ u8 unused_[1015808]; From dc26ffc7729e5a35c7019a6fb7d306005fdae518 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:33:29 +0000 Subject: [PATCH 194/367] Staging: et131x: Kill MAC_STAT_t All the contents of this type are now clean, so kill the top level type as well Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_address_map.h | 11 ++++++----- drivers/staging/et131x/et1310_mac.c | 16 ++++++++-------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index 446b2acf2d98..11e7b656d45c 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h @@ -1464,8 +1464,9 @@ typedef struct _MAC_t { /* Location: */ /* * MAC STATS Module of JAGCore Address Mapping */ -typedef struct _MAC_STAT_t { /* Location: */ - u32 pad[32]; /* 0x6000 - 607C */ +struct macstat_regs +{ /* Location: */ + u32 pad[32]; /* 0x6000 - 607C */ /* Tx/Rx 0-64 Byte Frame Counter */ u32 TR64; /* 0x6080 */ @@ -1610,7 +1611,7 @@ typedef struct _MAC_STAT_t { /* Location: */ /* Carry Register Two Mask Register */ u32 Carry2M; /* 0x613C */ -} MAC_STAT_t, *PMAC_STAT_t; +}; /* END OF MAC STAT REGISTER ADDRESS MAP */ @@ -1682,9 +1683,9 @@ typedef struct _ADDRESS_MAP_t { MAC_t mac; /* unused section of mac address map */ u8 unused_mac[4096 - sizeof(MAC_t)]; - MAC_STAT_t macStat; + struct macstat_regs macstat; /* unused section of mac stat address map */ - u8 unused_mac_stat[4096 - sizeof(MAC_STAT_t)]; + u8 unused_mac_stat[4096 - sizeof(struct macstat_regs)]; struct mmc_regs mmc; /* unused section of mmc address map */ u8 unused_mmc[4096 - sizeof(struct mmc_regs)]; diff --git a/drivers/staging/et131x/et1310_mac.c b/drivers/staging/et131x/et1310_mac.c index b8a1f2037314..a02bce0c2807 100644 --- a/drivers/staging/et131x/et1310_mac.c +++ b/drivers/staging/et131x/et1310_mac.c @@ -384,8 +384,8 @@ void ConfigTxMacRegs(struct et131x_adapter *etdev) void ConfigMacStatRegs(struct et131x_adapter *etdev) { - struct _MAC_STAT_t __iomem *macstat = - &etdev->regs->macStat; + struct macstat_regs __iomem *macstat = + &etdev->regs->macstat; /* Next we need to initialize all the MAC_STAT registers to zero on * the device. @@ -456,8 +456,8 @@ void ConfigFlowControl(struct et131x_adapter *etdev) void UpdateMacStatHostCounters(struct et131x_adapter *etdev) { struct _ce_stats_t *stats = &etdev->Stats; - struct _MAC_STAT_t __iomem *macstat = - &etdev->regs->macStat; + struct macstat_regs __iomem *macstat = + &etdev->regs->macstat; stats->collisions += readl(&macstat->TNcl); stats->first_collision += readl(&macstat->TScl); @@ -493,11 +493,11 @@ void HandleMacStatInterrupt(struct et131x_adapter *etdev) /* Read the interrupt bits from the register(s). These are Clear On * Write. */ - Carry1 = readl(&etdev->regs->macStat.Carry1); - Carry2 = readl(&etdev->regs->macStat.Carry2); + Carry1 = readl(&etdev->regs->macstat.Carry1); + Carry2 = readl(&etdev->regs->macstat.Carry2); - writel(Carry1, &etdev->regs->macStat.Carry1); - writel(Carry2, &etdev->regs->macStat.Carry2); + writel(Carry1, &etdev->regs->macstat.Carry1); + writel(Carry2, &etdev->regs->macstat.Carry2); /* We need to do update the host copy of all the MAC_STAT counters. * For each counter, check it's overflow bit. If the overflow bit is From 61aa21f208314496c4fa6c28c4a96c610831ed5e Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:33:34 +0000 Subject: [PATCH 195/367] Staging: et131x: Clean up the rx status word types Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_rx.c | 10 ++++------ drivers/staging/et131x/et1310_rx.h | 28 ++++++---------------------- 2 files changed, 10 insertions(+), 28 deletions(-) diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c index ee6436a3475b..0e12709ad762 100644 --- a/drivers/staging/et131x/et1310_rx.c +++ b/drivers/staging/et131x/et1310_rx.c @@ -797,21 +797,19 @@ PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev) uint16_t bindex; u32 len; PKT_STAT_DESC_WORD0_t Word0; + u32 word1; /* RX Status block is written by the DMA engine prior to every * interrupt. It contains the next to be used entry in the Packet * Status Ring, and also the two Free Buffer rings. */ status = (PRX_STATUS_BLOCK_t) rx_local->pRxStatusVa; + word1 = status->Word1 >> 16; /* Get the useful bits */ - /* FIXME: tidy later when conversions complete */ - if (status->Word1.bits.PSRoffset == - (rx_local->local_psr_full & 0xFFF) && - status->Word1.bits.PSRwrap == - ((rx_local->local_psr_full >> 12) & 1)) { + /* Check the PSR and wrap bits do not match */ + if ((word1 & 0x1FFF) == (rx_local->local_psr_full & 0x1FFF)) /* Looks like this ring is not updated yet */ return NULL; - } /* The packet status ring indicates that data is available. */ psr = (PPKT_STAT_DESC_t) (rx_local->pPSRingVa) + diff --git a/drivers/staging/et131x/et1310_rx.h b/drivers/staging/et131x/et1310_rx.h index afa670e57179..a46788d564ec 100644 --- a/drivers/staging/et131x/et1310_rx.h +++ b/drivers/staging/et131x/et1310_rx.h @@ -211,36 +211,20 @@ typedef struct _PKT_STAT_DESC_t { * RXSTAT_WORD1_t structure holds part of the status bits of the Rx DMA engine * that get copied out to memory by the ET-1310. Word 3 is a 32 bit word * which contains the Packet Status Ring available offset. + * + * bit 0-15 reserved + * bit 16-27 PSRoffset + * bit 28 PSRwrap + * bit 29-31 unused */ -#define RXSTAT1_OFFSET 16 -#define RXSTAT1_MASK 0xFFF -#define RXSTAT1_WRAP 0x10000000 - -typedef union _rxstat_word1_t { - u32 value; - struct { -#ifdef _BIT_FIELDS_HTOL - u32 PSRunused:3; /* bits 29-31 */ - u32 PSRwrap:1; /* bit 28 */ - u32 PSRoffset:12; /* bits 16-27 */ - u32 reserved:16; /* bits 0-15 */ -#else - u32 reserved:16; /* bits 0-15 */ - u32 PSRoffset:12; /* bits 16-27 */ - u32 PSRwrap:1; /* bit 28 */ - u32 PSRunused:3; /* bits 29-31 */ -#endif - } bits; -} RXSTAT_WORD1_t, *PRXSTAT_WORD1_t; - /* * RX_STATUS_BLOCK_t is sructure representing the status of the Rx DMA engine * it sits in free memory, and is pointed to by 0x101c / 0x1020 */ typedef struct _rx_status_block_t { u32 Word0; - RXSTAT_WORD1_t Word1; + u32 Word1; } RX_STATUS_BLOCK_t, *PRX_STATUS_BLOCK_t; /* From c9a8ad187a67da5892ff1155960cd14912c49efb Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:33:40 +0000 Subject: [PATCH 196/367] Staging: et131x: kill off the rx interrupt state enum Another verbose enum we don't need Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_rx.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/staging/et131x/et1310_rx.h b/drivers/staging/et131x/et1310_rx.h index a46788d564ec..2ba74b5c664b 100644 --- a/drivers/staging/et131x/et1310_rx.h +++ b/drivers/staging/et131x/et1310_rx.h @@ -238,11 +238,6 @@ typedef struct _FbrLookupTable { u32 PALow[MAX_DESC_PER_RING_RX]; } FBRLOOKUPTABLE, *PFBRLOOKUPTABLE; -typedef enum { - ONE_PACKET_INTERRUPT, - FOUR_PACKET_INTERRUPT -} eRX_INTERRUPT_STATE_t, *PeRX_INTERRUPT_STATE_t; - /* * RX_RING_t is sructure representing the adaptor's local reference(s) to the * rings From f926d216502c55e3d1089e5845045d0c16004428 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:33:45 +0000 Subject: [PATCH 197/367] Staging: et131x: rx_status_block_t is now clean So kill off the top level type and turn it into a struct Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_rx.c | 12 ++++++------ drivers/staging/et131x/et1310_rx.h | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c index 0e12709ad762..7a4134687100 100644 --- a/drivers/staging/et131x/et1310_rx.c +++ b/drivers/staging/et131x/et1310_rx.c @@ -361,8 +361,8 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) /* Allocate an area of memory for writeback of status information */ rx_ring->pRxStatusVa = pci_alloc_consistent(adapter->pdev, - sizeof(RX_STATUS_BLOCK_t), - &rx_ring->pRxStatusPa); + sizeof(struct rx_status_block), + &rx_ring->pRxStatusPa); if (!rx_ring->pRxStatusVa) { dev_err(&adapter->pdev->dev, "Cannot alloc memory for Status Block\n"); @@ -508,7 +508,7 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter) /* Free area of memory for the writeback of status information */ if (rx_ring->pRxStatusVa) { pci_free_consistent(adapter->pdev, - sizeof(RX_STATUS_BLOCK_t), + sizeof(struct rx_status_block), rx_ring->pRxStatusVa, rx_ring->pRxStatusPa); rx_ring->pRxStatusVa = NULL; @@ -614,7 +614,7 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev) &rx_dma->dma_wb_base_hi); writel((u32) rx_local->pRxStatusPa, &rx_dma->dma_wb_base_lo); - memset(rx_local->pRxStatusVa, 0, sizeof(RX_STATUS_BLOCK_t)); + memset(rx_local->pRxStatusVa, 0, sizeof(struct rx_status_block)); /* Set the address and parameters of the packet status ring into the * 1310's registers @@ -786,7 +786,7 @@ void et131x_rx_dma_enable(struct et131x_adapter *etdev) PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev) { struct _rx_ring_t *rx_local = &etdev->RxRing; - PRX_STATUS_BLOCK_t status; + struct rx_status_block *status; PPKT_STAT_DESC_t psr; PMP_RFD rfd; u32 i; @@ -803,7 +803,7 @@ PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev) * interrupt. It contains the next to be used entry in the Packet * Status Ring, and also the two Free Buffer rings. */ - status = (PRX_STATUS_BLOCK_t) rx_local->pRxStatusVa; + status = (struct rx_status_block *)rx_local->pRxStatusVa; word1 = status->Word1 >> 16; /* Get the useful bits */ /* Check the PSR and wrap bits do not match */ diff --git a/drivers/staging/et131x/et1310_rx.h b/drivers/staging/et131x/et1310_rx.h index 2ba74b5c664b..53ecddb36e84 100644 --- a/drivers/staging/et131x/et1310_rx.h +++ b/drivers/staging/et131x/et1310_rx.h @@ -219,13 +219,13 @@ typedef struct _PKT_STAT_DESC_t { */ /* - * RX_STATUS_BLOCK_t is sructure representing the status of the Rx DMA engine - * it sits in free memory, and is pointed to by 0x101c / 0x1020 + * struct rx_status_block is a structure representing the status of the Rx + * DMA engine it sits in free memory, and is pointed to by 0x101c / 0x1020 */ -typedef struct _rx_status_block_t { +struct rx_status_block { u32 Word0; u32 Word1; -} RX_STATUS_BLOCK_t, *PRX_STATUS_BLOCK_t; +}; /* * Structure for look-up table holding free buffer ring pointers From 07563ac691c284a5b9402556a270b8cc14164ff8 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:33:51 +0000 Subject: [PATCH 198/367] Staging: et131x: Fix rx_status typing Use the proper pointer types for the higher level pointers to the rx_status object and kill casts Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_rx.c | 21 ++++++++++----------- drivers/staging/et131x/et1310_rx.h | 4 ++-- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c index 7a4134687100..6719c4ee6a72 100644 --- a/drivers/staging/et131x/et1310_rx.c +++ b/drivers/staging/et131x/et1310_rx.c @@ -360,16 +360,16 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) */ /* Allocate an area of memory for writeback of status information */ - rx_ring->pRxStatusVa = pci_alloc_consistent(adapter->pdev, + rx_ring->rx_status_block = pci_alloc_consistent(adapter->pdev, sizeof(struct rx_status_block), - &rx_ring->pRxStatusPa); - if (!rx_ring->pRxStatusVa) { + &rx_ring->rx_status_bus); + if (!rx_ring->rx_status_block) { dev_err(&adapter->pdev->dev, "Cannot alloc memory for Status Block\n"); return -ENOMEM; } rx_ring->NumRfd = NIC_DEFAULT_NUM_RFD; - printk("PRS %lx\n", (unsigned long)rx_ring->pRxStatusPa); + printk("PRS %lx\n", (unsigned long)rx_ring->rx_status_bus); /* Recv * pci_pool_create initializes a lookaside list. After successful @@ -506,12 +506,11 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter) } /* Free area of memory for the writeback of status information */ - if (rx_ring->pRxStatusVa) { + if (rx_ring->rx_status_block) { pci_free_consistent(adapter->pdev, - sizeof(struct rx_status_block), - rx_ring->pRxStatusVa, rx_ring->pRxStatusPa); - - rx_ring->pRxStatusVa = NULL; + sizeof(struct rx_status_block), + rx_ring->rx_status_block, rx_ring->rx_status_bus); + rx_ring->rx_status_block = NULL; } /* Free receive buffer pool */ @@ -614,7 +613,7 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev) &rx_dma->dma_wb_base_hi); writel((u32) rx_local->pRxStatusPa, &rx_dma->dma_wb_base_lo); - memset(rx_local->pRxStatusVa, 0, sizeof(struct rx_status_block)); + memset(rx_local->rx_status_block, 0, sizeof(struct rx_status_block)); /* Set the address and parameters of the packet status ring into the * 1310's registers @@ -803,7 +802,7 @@ PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev) * interrupt. It contains the next to be used entry in the Packet * Status Ring, and also the two Free Buffer rings. */ - status = (struct rx_status_block *)rx_local->pRxStatusVa; + status = rx_local->rx_status_block; word1 = status->Word1 >> 16; /* Get the useful bits */ /* Check the PSR and wrap bits do not match */ diff --git a/drivers/staging/et131x/et1310_rx.h b/drivers/staging/et131x/et1310_rx.h index 53ecddb36e84..b84d811e2912 100644 --- a/drivers/staging/et131x/et1310_rx.h +++ b/drivers/staging/et131x/et1310_rx.h @@ -270,8 +270,8 @@ typedef struct _rx_ring_t { u32 local_psr_full; u32 PsrNumEntries; - void *pRxStatusVa; - dma_addr_t pRxStatusPa; + struct rx_status_block *rx_status_block; + dma_addr_t rx_status_bus; struct list_head RecvBufferPool; From 8a66278cf91c9b0bfedd70865954d5fccba02237 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:33:56 +0000 Subject: [PATCH 199/367] Staging: et131x: Clean up the fbr lookup table All the subtypes are sane so just turn it into something struct and linux like Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_rx.c | 65 +++++++++++++++--------------- drivers/staging/et131x/et1310_rx.h | 16 ++++---- 2 files changed, 40 insertions(+), 41 deletions(-) diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c index 6719c4ee6a72..cdc9105d553f 100644 --- a/drivers/staging/et131x/et1310_rx.c +++ b/drivers/staging/et131x/et1310_rx.c @@ -116,10 +116,9 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) /* Alloc memory for the lookup table */ #ifdef USE_FBR0 - rx_ring->Fbr[0] = kmalloc(sizeof(FBRLOOKUPTABLE), GFP_KERNEL); + rx_ring->fbr[0] = kmalloc(sizeof(struct fbr_lookup), GFP_KERNEL); #endif - - rx_ring->Fbr[1] = kmalloc(sizeof(FBRLOOKUPTABLE), GFP_KERNEL); + rx_ring->fbr[1] = kmalloc(sizeof(struct fbr_lookup), GFP_KERNEL); /* The first thing we will do is configure the sizes of the buffer * rings. These will change based on jumbo packet support. Larger @@ -270,23 +269,23 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) /* Save the Virtual address of this index for quick * access later */ - rx_ring->Fbr[1]->Va[index] = + rx_ring->fbr[1]->virt[index] = (uint8_t *) rx_ring->Fbr1MemVa[i] + (j * rx_ring->Fbr1BufferSize) + Fbr1Offset; /* now store the physical address in the descriptor * so the device can access it */ - rx_ring->Fbr[1]->PAHigh[index] = + rx_ring->fbr[1]->bus_high[index] = (u32) (Fbr1TempPa >> 32); - rx_ring->Fbr[1]->PALow[index] = (u32) Fbr1TempPa; + rx_ring->fbr[1]->bus_low[index] = (u32) Fbr1TempPa; Fbr1TempPa += rx_ring->Fbr1BufferSize; - rx_ring->Fbr[1]->Buffer1[index] = - rx_ring->Fbr[1]->Va[index]; - rx_ring->Fbr[1]->Buffer2[index] = - rx_ring->Fbr[1]->Va[index] - 4; + rx_ring->fbr[1]->buffer1[index] = + rx_ring->fbr[1]->virt[index]; + rx_ring->fbr[1]->buffer2[index] = + rx_ring->fbr[1]->virt[index] - 4; } } @@ -319,20 +318,20 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) for (j = 0; j < FBR_CHUNKS; j++) { u32 index = (i * FBR_CHUNKS) + j; - rx_ring->Fbr[0]->Va[index] = + rx_ring->fbr[0]->virt[index] = (uint8_t *) rx_ring->Fbr0MemVa[i] + (j * rx_ring->Fbr0BufferSize) + Fbr0Offset; - rx_ring->Fbr[0]->PAHigh[index] = + rx_ring->fbr[0]->bus_high[index] = (u32) (Fbr0TempPa >> 32); - rx_ring->Fbr[0]->PALow[index] = (u32) Fbr0TempPa; + rx_ring->fbr[0]->bus_low[index] = (u32) Fbr0TempPa; Fbr0TempPa += rx_ring->Fbr0BufferSize; - rx_ring->Fbr[0]->Buffer1[index] = - rx_ring->Fbr[0]->Va[index]; - rx_ring->Fbr[0]->Buffer2[index] = - rx_ring->Fbr[0]->Va[index] - 4; + rx_ring->fbr[0]->buffer1[index] = + rx_ring->fbr[0]->virt[index]; + rx_ring->fbr[0]->buffer2[index] = + rx_ring->fbr[0]->virt[index] - 4; } } #endif @@ -525,10 +524,10 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter) /* Free the FBR Lookup Table */ #ifdef USE_FBR0 - kfree(rx_ring->Fbr[0]); + kfree(rx_ring->fbr[0]); #endif - kfree(rx_ring->Fbr[1]); + kfree(rx_ring->fbr[1]); /* Reset Counters */ rx_ring->nReadyRecv = 0; @@ -609,9 +608,9 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev) * are ever returned, make sure the high part is retrieved here * before storing the adjusted address. */ - writel((u32) ((u64)rx_local->pRxStatusPa >> 32), + writel((u32) ((u64)rx_local->rx_status_bus >> 32), &rx_dma->dma_wb_base_hi); - writel((u32) rx_local->pRxStatusPa, &rx_dma->dma_wb_base_lo); + writel((u32) rx_local->rx_status_bus, &rx_dma->dma_wb_base_lo); memset(rx_local->rx_status_block, 0, sizeof(struct rx_status_block)); @@ -636,8 +635,8 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev) /* Now's the best time to initialize FBR1 contents */ fbr_entry = (struct fbr_desc *) rx_local->pFbr1RingVa; for (entry = 0; entry < rx_local->Fbr1NumEntries; entry++) { - fbr_entry->addr_hi = rx_local->Fbr[1]->PAHigh[entry]; - fbr_entry->addr_lo = rx_local->Fbr[1]->PALow[entry]; + fbr_entry->addr_hi = rx_local->fbr[1]->bus_high[entry]; + fbr_entry->addr_lo = rx_local->fbr[1]->bus_low[entry]; fbr_entry->word2 = entry; fbr_entry++; } @@ -661,8 +660,8 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev) /* Now's the best time to initialize FBR0 contents */ fbr_entry = (struct fbr_desc *) rx_local->pFbr0RingVa; for (entry = 0; entry < rx_local->Fbr0NumEntries; entry++) { - fbr_entry->addr_hi = rx_local->Fbr[0]->PAHigh[entry]; - fbr_entry->addr_lo = rx_local->Fbr[0]->PALow[entry]; + fbr_entry->addr_hi = rx_local->fbr[0]->bus_high[entry]; + fbr_entry->addr_lo = rx_local->fbr[0]->bus_low[entry]; fbr_entry->word2 = entry; fbr_entry++; } @@ -893,7 +892,7 @@ PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev) if (len) { if (etdev->ReplicaPhyLoopbk == 1) { - buf = rx_local->Fbr[rindex]->Va[bindex]; + buf = rx_local->fbr[rindex]->virt[bindex]; if (memcmp(&buf[6], &etdev->CurrentAddress[0], ETH_ALEN) == 0) { @@ -917,8 +916,8 @@ PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev) if ((etdev->PacketFilter & ET131X_PACKET_TYPE_MULTICAST) && !(etdev->PacketFilter & ET131X_PACKET_TYPE_PROMISCUOUS) && !(etdev->PacketFilter & ET131X_PACKET_TYPE_ALL_MULTICAST)) { - buf = rx_local->Fbr[rindex]-> - Va[bindex]; + buf = rx_local->fbr[rindex]-> + virt[bindex]; /* Loop through our list to see if the * destination address of this packet @@ -984,7 +983,7 @@ PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev) etdev->net_stats.rx_bytes += rfd->PacketSize; memcpy(skb_put(skb, rfd->PacketSize), - rx_local->Fbr[rindex]->Va[bindex], + rx_local->fbr[rindex]->virt[bindex], rfd->PacketSize); skb->dev = etdev->netdev; @@ -1118,8 +1117,8 @@ void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD rfd) * the PA / Buffer Index for the returned buffer into * the oldest (next to be freed)FBR entry */ - next->addr_hi = rx_local->Fbr[1]->PAHigh[bi]; - next->addr_lo = rx_local->Fbr[1]->PALow[bi]; + next->addr_hi = rx_local->fbr[1]->bus_high[bi]; + next->addr_lo = rx_local->fbr[1]->bus_low[bi]; next->word2 = bi; writel(bump_fbr(&rx_local->local_Fbr1_full, @@ -1136,8 +1135,8 @@ void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD rfd) * the PA / Buffer Index for the returned buffer into * the oldest (next to be freed) FBR entry */ - next->addr_hi = rx_local->Fbr[0]->PAHigh[bi]; - next->addr_lo = rx_local->Fbr[0]->PALow[bi]; + next->addr_hi = rx_local->fbr[0]->bus_high[bi]; + next->addr_lo = rx_local->fbr[0]->bus_low[bi]; next->word2 = bi; writel(bump_fbr(&rx_local->local_Fbr0_full, diff --git a/drivers/staging/et131x/et1310_rx.h b/drivers/staging/et131x/et1310_rx.h index b84d811e2912..a8915e6e59f0 100644 --- a/drivers/staging/et131x/et1310_rx.h +++ b/drivers/staging/et131x/et1310_rx.h @@ -230,13 +230,13 @@ struct rx_status_block { /* * Structure for look-up table holding free buffer ring pointers */ -typedef struct _FbrLookupTable { - void *Va[MAX_DESC_PER_RING_RX]; - void *Buffer1[MAX_DESC_PER_RING_RX]; - void *Buffer2[MAX_DESC_PER_RING_RX]; - u32 PAHigh[MAX_DESC_PER_RING_RX]; - u32 PALow[MAX_DESC_PER_RING_RX]; -} FBRLOOKUPTABLE, *PFBRLOOKUPTABLE; +struct fbr_lookup { + void *virt[MAX_DESC_PER_RING_RX]; + void *buffer1[MAX_DESC_PER_RING_RX]; + void *buffer2[MAX_DESC_PER_RING_RX]; + u32 bus_high[MAX_DESC_PER_RING_RX]; + u32 bus_low[MAX_DESC_PER_RING_RX]; +}; /* * RX_RING_t is sructure representing the adaptor's local reference(s) to the @@ -260,7 +260,7 @@ typedef struct _rx_ring_t { dma_addr_t Fbr1MemPa[MAX_DESC_PER_RING_RX / FBR_CHUNKS]; uint64_t Fbr1Realpa; uint64_t Fbr1offset; - FBRLOOKUPTABLE *Fbr[2]; + struct fbr_lookup *fbr[2]; /* One per ring */ u32 local_Fbr1_full; u32 Fbr1NumEntries; u32 Fbr1BufferSize; From 4ba64c1ba5f26a445255dd7684c175e298d84d07 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:34:02 +0000 Subject: [PATCH 200/367] Staging: et131x: clean up the pkt_desc_stat_t types Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_rx.c | 49 +++++----- drivers/staging/et131x/et1310_rx.h | 140 ++++++++++------------------- 2 files changed, 70 insertions(+), 119 deletions(-) diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c index cdc9105d553f..a95e6c6705da 100644 --- a/drivers/staging/et131x/et1310_rx.c +++ b/drivers/staging/et131x/et1310_rx.c @@ -193,7 +193,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) &rx_ring->Fbr1Realpa, &rx_ring->Fbr1offset, 0x0FFF); - rx_ring->pFbr1RingVa = (void *)((uint8_t *) rx_ring->pFbr1RingVa + + rx_ring->pFbr1RingVa = (void *)((u8 *) rx_ring->pFbr1RingVa + rx_ring->Fbr1offset); #ifdef USE_FBR0 @@ -222,7 +222,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) &rx_ring->Fbr0Realpa, &rx_ring->Fbr0offset, 0x0FFF); - rx_ring->pFbr0RingVa = (void *)((uint8_t *) rx_ring->pFbr0RingVa + + rx_ring->pFbr0RingVa = (void *)((u8 *) rx_ring->pFbr0RingVa + rx_ring->Fbr0offset); #endif @@ -270,7 +270,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) * access later */ rx_ring->fbr[1]->virt[index] = - (uint8_t *) rx_ring->Fbr1MemVa[i] + + (u8 *) rx_ring->Fbr1MemVa[i] + (j * rx_ring->Fbr1BufferSize) + Fbr1Offset; /* now store the physical address in the descriptor @@ -319,7 +319,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) u32 index = (i * FBR_CHUNKS) + j; rx_ring->fbr[0]->virt[index] = - (uint8_t *) rx_ring->Fbr0MemVa[i] + + (u8 *) rx_ring->Fbr0MemVa[i] + (j * rx_ring->Fbr0BufferSize) + Fbr0Offset; rx_ring->fbr[0]->bus_high[index] = @@ -338,7 +338,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) /* Allocate an area of memory for FIFO of Packet Status ring entries */ pktStatRingSize = - sizeof(PKT_STAT_DESC_t) * adapter->RxRing.PsrNumEntries; + sizeof(struct pkt_stat_desc) * adapter->RxRing.PsrNumEntries; rx_ring->pPSRingVa = pci_alloc_consistent(adapter->pdev, pktStatRingSize, @@ -446,7 +446,7 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter) } /* Now the FIFO itself */ - rx_ring->pFbr1RingVa = (void *)((uint8_t *) + rx_ring->pFbr1RingVa = (void *)((u8 *) rx_ring->pFbr1RingVa - rx_ring->Fbr1offset); bufsize = (sizeof(struct fbr_desc) * rx_ring->Fbr1NumEntries) @@ -479,7 +479,7 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter) } /* Now the FIFO itself */ - rx_ring->pFbr0RingVa = (void *)((uint8_t *) + rx_ring->pFbr0RingVa = (void *)((u8 *) rx_ring->pFbr0RingVa - rx_ring->Fbr0offset); bufsize = (sizeof(struct fbr_desc) * rx_ring->Fbr0NumEntries) @@ -496,7 +496,7 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter) /* Free Packet Status Ring */ if (rx_ring->pPSRingVa) { pktStatRingSize = - sizeof(PKT_STAT_DESC_t) * adapter->RxRing.PsrNumEntries; + sizeof(struct pkt_stat_desc) * adapter->RxRing.PsrNumEntries; pci_free_consistent(adapter->pdev, pktStatRingSize, rx_ring->pPSRingVa, rx_ring->pPSRingPa); @@ -785,16 +785,16 @@ PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev) { struct _rx_ring_t *rx_local = &etdev->RxRing; struct rx_status_block *status; - PPKT_STAT_DESC_t psr; + struct pkt_stat_desc *psr; PMP_RFD rfd; u32 i; - uint8_t *buf; + u8 *buf; unsigned long flags; struct list_head *element; - uint8_t rindex; - uint16_t bindex; + u8 rindex; + u16 bindex; u32 len; - PKT_STAT_DESC_WORD0_t Word0; + u32 word0; u32 word1; /* RX Status block is written by the DMA engine prior to every @@ -810,17 +810,17 @@ PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev) return NULL; /* The packet status ring indicates that data is available. */ - psr = (PPKT_STAT_DESC_t) (rx_local->pPSRingVa) + + psr = (struct pkt_stat_desc *) (rx_local->pPSRingVa) + (rx_local->local_psr_full & 0xFFF); /* Grab any information that is required once the PSR is * advanced, since we can no longer rely on the memory being * accurate */ - len = psr->word1.bits.length; - rindex = (uint8_t) psr->word1.bits.ri; - bindex = (uint16_t) psr->word1.bits.bi; - Word0 = psr->word0; + len = psr->word1 & 0xFFFF; + rindex = (psr->word1 >> 26) & 0x03; + bindex = (psr->word1 >> 16) & 0x3FF; + word0 = psr->word0; /* Indicate that we have used this PSR entry. */ /* FIXME wrap 12 */ @@ -835,9 +835,8 @@ PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev) &etdev->regs->rxdma.psr_full_offset); #ifndef USE_FBR0 - if (rindex != 1) { + if (rindex != 1) return NULL; - } #endif #ifdef USE_FBR0 @@ -904,8 +903,8 @@ PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev) } /* Determine if this is a multicast packet coming in */ - if ((Word0.value & ALCATEL_MULTICAST_PKT) && - !(Word0.value & ALCATEL_BROADCAST_PKT)) { + if ((word0 & ALCATEL_MULTICAST_PKT) && + !(word0 & ALCATEL_BROADCAST_PKT)) { /* Promiscuous mode and Multicast mode are * not mutually exclusive as was first * thought. I guess Promiscuous is just @@ -956,7 +955,7 @@ PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev) if (len > 0) etdev->Stats.multircv++; - } else if (Word0.value & ALCATEL_BROADCAST_PKT) + } else if (word0 & ALCATEL_BROADCAST_PKT) etdev->Stats.brdcstrcv++; else /* Not sure what this counter measures in @@ -1094,8 +1093,8 @@ void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD rfd) { struct _rx_ring_t *rx_local = &etdev->RxRing; struct rxdma_regs __iomem *rx_dma = &etdev->regs->rxdma; - uint16_t bi = rfd->bufferindex; - uint8_t ri = rfd->ringindex; + u16 bi = rfd->bufferindex; + u8 ri = rfd->ringindex; unsigned long flags; /* We don't use any of the OOB data besides status. Otherwise, we diff --git a/drivers/staging/et131x/et1310_rx.h b/drivers/staging/et131x/et1310_rx.h index a8915e6e59f0..28e7665f46d4 100644 --- a/drivers/staging/et131x/et1310_rx.h +++ b/drivers/staging/et131x/et1310_rx.h @@ -98,101 +98,53 @@ struct fbr_desc u32 word2; /* Bits 10-31 reserved, 0-9 descriptor */ }; -/* Typedefs for Packet Status Ring Descriptors */ -typedef union _PKT_STAT_DESC_WORD0_t { - u32 value; - struct { -#ifdef _BIT_FIELDS_HTOL - /* top 16 bits are from the Alcatel Status Word as enumerated in */ - /* PE-MCXMAC Data Sheet IPD DS54 0210-1 (also IPD-DS80 0205-2) */ -#if 0 - u32 asw_trunc:1; /* bit 31(Rx frame truncated) */ -#endif - u32 asw_long_evt:1; /* bit 31(Rx long event) */ - u32 asw_VLAN_tag:1; /* bit 30(VLAN tag detected) */ - u32 asw_unsupported_op:1; /* bit 29(unsupported OP code) */ - u32 asw_pause_frame:1; /* bit 28(is a pause frame) */ - u32 asw_control_frame:1; /* bit 27(is a control frame) */ - u32 asw_dribble_nibble:1; /* bit 26(spurious bits after EOP) */ - u32 asw_broadcast:1; /* bit 25(has a broadcast address) */ - u32 asw_multicast:1; /* bit 24(has a multicast address) */ - u32 asw_OK:1; /* bit 23(valid CRC + no code error) */ - u32 asw_too_long:1; /* bit 22(frame length > 1518 bytes) */ - u32 asw_len_chk_err:1; /* bit 21(frame length field incorrect) */ - u32 asw_CRC_err:1; /* bit 20(CRC error) */ - u32 asw_code_err:1; /* bit 19(one or more nibbles signalled as errors) */ - u32 asw_false_carrier_event:1; /* bit 18(bad carrier since last good packet) */ - u32 asw_RX_DV_event:1; /* bit 17(short receive event detected) */ - u32 asw_prev_pkt_dropped:1;/* bit 16(e.g. IFG too small on previous) */ - u32 unused:5; /* bits 11-15 */ - u32 vp:1; /* bit 10(VLAN Packet) */ - u32 jp:1; /* bit 9(Jumbo Packet) */ - u32 ft:1; /* bit 8(Frame Truncated) */ - u32 drop:1; /* bit 7(Drop packet) */ - u32 rxmac_error:1; /* bit 6(RXMAC Error Indicator) */ - u32 wol:1; /* bit 5(WOL Event) */ - u32 tcpp:1; /* bit 4(TCP checksum pass) */ - u32 tcpa:1; /* bit 3(TCP checksum assist) */ - u32 ipp:1; /* bit 2(IP checksum pass) */ - u32 ipa:1; /* bit 1(IP checksum assist) */ - u32 hp:1; /* bit 0(hash pass) */ -#else - u32 hp:1; /* bit 0(hash pass) */ - u32 ipa:1; /* bit 1(IP checksum assist) */ - u32 ipp:1; /* bit 2(IP checksum pass) */ - u32 tcpa:1; /* bit 3(TCP checksum assist) */ - u32 tcpp:1; /* bit 4(TCP checksum pass) */ - u32 wol:1; /* bit 5(WOL Event) */ - u32 rxmac_error:1; /* bit 6(RXMAC Error Indicator) */ - u32 drop:1; /* bit 7(Drop packet) */ - u32 ft:1; /* bit 8(Frame Truncated) */ - u32 jp:1; /* bit 9(Jumbo Packet) */ - u32 vp:1; /* bit 10(VLAN Packet) */ - u32 unused:5; /* bits 11-15 */ - u32 asw_prev_pkt_dropped:1;/* bit 16(e.g. IFG too small on previous) */ - u32 asw_RX_DV_event:1; /* bit 17(short receive event detected) */ - u32 asw_false_carrier_event:1; /* bit 18(bad carrier since last good packet) */ - u32 asw_code_err:1; /* bit 19(one or more nibbles signalled as errors) */ - u32 asw_CRC_err:1; /* bit 20(CRC error) */ - u32 asw_len_chk_err:1; /* bit 21(frame length field incorrect) */ - u32 asw_too_long:1; /* bit 22(frame length > 1518 bytes) */ - u32 asw_OK:1; /* bit 23(valid CRC + no code error) */ - u32 asw_multicast:1; /* bit 24(has a multicast address) */ - u32 asw_broadcast:1; /* bit 25(has a broadcast address) */ - u32 asw_dribble_nibble:1; /* bit 26(spurious bits after EOP) */ - u32 asw_control_frame:1; /* bit 27(is a control frame) */ - u32 asw_pause_frame:1; /* bit 28(is a pause frame) */ - u32 asw_unsupported_op:1; /* bit 29(unsupported OP code) */ - u32 asw_VLAN_tag:1; /* bit 30(VLAN tag detected) */ - u32 asw_long_evt:1; /* bit 31(Rx long event) */ -#if 0 - u32 asw_trunc:1; /* bit 31(Rx frame truncated) */ -#endif -#endif - } bits; -} PKT_STAT_DESC_WORD0_t, *PPKT_STAT_WORD0_t; +/* Packet Status Ring Descriptors + * + * Word 0: + * + * top 16 bits are from the Alcatel Status Word as enumerated in + * PE-MCXMAC Data Sheet IPD DS54 0210-1 (also IPD-DS80 0205-2) + * + * 0: hp hash pass + * 1: ipa IP checksum assist + * 2: ipp IP checksum pass + * 3: tcpa TCP checksum assist + * 4: tcpp TCP checksum pass + * 5: wol WOL Event + * 6: rxmac_error RXMAC Error Indicator + * 7: drop Drop packet + * 8: ft Frame Truncated + * 9: jp Jumbo Packet + * 10: vp VLAN Packet + * 11-15: unused + * 16: asw_prev_pkt_dropped e.g. IFG too small on previous + * 17: asw_RX_DV_event short receive event detected + * 18: asw_false_carrier_event bad carrier since last good packet + * 19: asw_code_err one or more nibbles signalled as errors + * 20: asw_CRC_err CRC error + * 21: asw_len_chk_err frame length field incorrect + * 22: asw_too_long frame length > 1518 bytes + * 23: asw_OK valid CRC + no code error + * 24: asw_multicast has a multicast address + * 25: asw_broadcast has a broadcast address + * 26: asw_dribble_nibble spurious bits after EOP + * 27: asw_control_frame is a control frame + * 28: asw_pause_frame is a pause frame + * 29: asw_unsupported_op unsupported OP code + * 30: asw_VLAN_tag VLAN tag detected + * 31: asw_long_evt Rx long event + * + * Word 1: + * 0-15: length length in bytes + * 16-25: bi Buffer Index + * 26-27: ri Ring Index + * 28-31: reserved + */ -typedef union _PKT_STAT_DESC_WORD1_t { - u32 value; - struct { -#ifdef _BIT_FIELDS_HTOL - u32 unused:4; /* bits 28-31 */ - u32 ri:2; /* bits 26-27(Ring Index) */ - u32 bi:10; /* bits 16-25(Buffer Index) */ - u32 length:16; /* bit 0-15(length in bytes) */ -#else - u32 length:16; /* bit 0-15(length in bytes) */ - u32 bi:10; /* bits 16-25(Buffer Index) */ - u32 ri:2; /* bits 26-27(Ring Index) */ - u32 unused:4; /* bits 28-31 */ -#endif - } bits; -} PKT_STAT_DESC_WORD1_t, *PPKT_STAT_WORD1_t; - -typedef struct _PKT_STAT_DESC_t { - PKT_STAT_DESC_WORD0_t word0; - PKT_STAT_DESC_WORD1_t word1; -} PKT_STAT_DESC_t, *PPKT_STAT_DESC_t; +struct pkt_stat_desc { + u32 word0; + u32 word1; +}; /* Typedefs for the RX DMA status word */ From 8f12785dd008f4ad94e3c9aad00517e082563935 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:34:07 +0000 Subject: [PATCH 201/367] Staging: et131x: Kill off RX_RING_t This completes the typedef clean up of the rx specific structures, although there is plenty do on field names and the like Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_rx.c | 54 ++++++++++++------------- drivers/staging/et131x/et1310_rx.h | 8 ++-- drivers/staging/et131x/et131x_adapter.h | 2 +- drivers/staging/et131x/et131x_isr.c | 2 +- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c index a95e6c6705da..232ceb603391 100644 --- a/drivers/staging/et131x/et1310_rx.c +++ b/drivers/staging/et131x/et1310_rx.c @@ -109,10 +109,10 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) u32 i, j; u32 bufsize; u32 pktStatRingSize, FBRChunkSize; - RX_RING_t *rx_ring; + struct rx_ring *rx_ring; /* Setup some convenience pointers */ - rx_ring = (RX_RING_t *) &adapter->RxRing; + rx_ring = &adapter->rx_ring; /* Alloc memory for the lookup table */ #ifdef USE_FBR0 @@ -162,10 +162,10 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) } #ifdef USE_FBR0 - adapter->RxRing.PsrNumEntries = adapter->RxRing.Fbr0NumEntries + - adapter->RxRing.Fbr1NumEntries; + adapter->rx_ring.PsrNumEntries = adapter->rx_ring.Fbr0NumEntries + + adapter->rx_ring.Fbr1NumEntries; #else - adapter->RxRing.PsrNumEntries = adapter->RxRing.Fbr1NumEntries; + adapter->rx_ring.PsrNumEntries = adapter->rx_ring.Fbr1NumEntries; #endif /* Allocate an area of memory for Free Buffer Ring 1 */ @@ -338,7 +338,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) /* Allocate an area of memory for FIFO of Packet Status ring entries */ pktStatRingSize = - sizeof(struct pkt_stat_desc) * adapter->RxRing.PsrNumEntries; + sizeof(struct pkt_stat_desc) * adapter->rx_ring.PsrNumEntries; rx_ring->pPSRingVa = pci_alloc_consistent(adapter->pdev, pktStatRingSize, @@ -402,10 +402,10 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter) u32 bufsize; u32 pktStatRingSize; PMP_RFD rfd; - RX_RING_t *rx_ring; + struct rx_ring *rx_ring; /* Setup some convenience pointers */ - rx_ring = (RX_RING_t *) &adapter->RxRing; + rx_ring = &adapter->rx_ring; /* Free RFDs and associated packet descriptors */ WARN_ON(rx_ring->nReadyRecv != rx_ring->NumRfd); @@ -416,7 +416,7 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter) list_del(&rfd->list_node); rfd->Packet = NULL; - kmem_cache_free(adapter->RxRing.RecvLookaside, rfd); + kmem_cache_free(adapter->rx_ring.RecvLookaside, rfd); } /* Free Free Buffer Ring 1 */ @@ -496,7 +496,7 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter) /* Free Packet Status Ring */ if (rx_ring->pPSRingVa) { pktStatRingSize = - sizeof(struct pkt_stat_desc) * adapter->RxRing.PsrNumEntries; + sizeof(struct pkt_stat_desc) * adapter->rx_ring.PsrNumEntries; pci_free_consistent(adapter->pdev, pktStatRingSize, rx_ring->pPSRingVa, rx_ring->pPSRingPa); @@ -545,10 +545,10 @@ int et131x_init_recv(struct et131x_adapter *adapter) PMP_RFD rfd = NULL; u32 rfdct; u32 numrfd = 0; - RX_RING_t *rx_ring = NULL; + struct rx_ring *rx_ring; /* Setup some convenience pointers */ - rx_ring = (RX_RING_t *) &adapter->RxRing; + rx_ring = &adapter->rx_ring; /* Setup each RFD */ for (rfdct = 0; rfdct < rx_ring->NumRfd; rfdct++) { @@ -592,7 +592,7 @@ int et131x_init_recv(struct et131x_adapter *adapter) void ConfigRxDmaRegs(struct et131x_adapter *etdev) { struct rxdma_regs __iomem *rx_dma = &etdev->regs->rxdma; - struct _rx_ring_t *rx_local = &etdev->RxRing; + struct rx_ring *rx_local = &etdev->rx_ring; struct fbr_desc *fbr_entry; u32 entry; u32 psr_num_des; @@ -741,19 +741,19 @@ void et131x_rx_dma_enable(struct et131x_adapter *etdev) /* Setup the receive dma configuration register for normal operation */ u32 csr = 0x2000; /* FBR1 enable */ - if (etdev->RxRing.Fbr1BufferSize == 4096) + if (etdev->rx_ring.Fbr1BufferSize == 4096) csr |= 0x0800; - else if (etdev->RxRing.Fbr1BufferSize == 8192) + else if (etdev->rx_ring.Fbr1BufferSize == 8192) csr |= 0x1000; - else if (etdev->RxRing.Fbr1BufferSize == 16384) + else if (etdev->rx_ring.Fbr1BufferSize == 16384) csr |= 0x1800; #ifdef USE_FBR0 csr |= 0x0400; /* FBR0 enable */ - if (etdev->RxRing.Fbr0BufferSize == 256) + if (etdev->rx_ring.Fbr0BufferSize == 256) csr |= 0x0100; - else if (etdev->RxRing.Fbr0BufferSize == 512) + else if (etdev->rx_ring.Fbr0BufferSize == 512) csr |= 0x0200; - else if (etdev->RxRing.Fbr0BufferSize == 1024) + else if (etdev->rx_ring.Fbr0BufferSize == 1024) csr |= 0x0300; #endif writel(csr, &etdev->regs->rxdma.csr); @@ -783,7 +783,7 @@ void et131x_rx_dma_enable(struct et131x_adapter *etdev) */ PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev) { - struct _rx_ring_t *rx_local = &etdev->RxRing; + struct rx_ring *rx_local = &etdev->rx_ring; struct rx_status_block *status; struct pkt_stat_desc *psr; PMP_RFD rfd; @@ -1006,7 +1006,7 @@ PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev) */ void et131x_reset_recv(struct et131x_adapter *etdev) { - WARN_ON(list_empty(&etdev->RxRing.RecvList)); + WARN_ON(list_empty(&etdev->rx_ring.RecvList)); } @@ -1024,8 +1024,8 @@ void et131x_handle_recv_interrupt(struct et131x_adapter *etdev) /* Process up to available RFD's */ while (count < NUM_PACKETS_HANDLED) { - if (list_empty(&etdev->RxRing.RecvList)) { - WARN_ON(etdev->RxRing.nReadyRecv != 0); + if (list_empty(&etdev->rx_ring.RecvList)) { + WARN_ON(etdev->rx_ring.nReadyRecv != 0); done = false; break; } @@ -1050,7 +1050,7 @@ void et131x_handle_recv_interrupt(struct et131x_adapter *etdev) etdev->Stats.ipackets++; /* Set the status on the packet, either resources or success */ - if (etdev->RxRing.nReadyRecv < RFD_LOW_WATER_MARK) { + if (etdev->rx_ring.nReadyRecv < RFD_LOW_WATER_MARK) { dev_warn(&etdev->pdev->dev, "RFD's are running out\n"); } @@ -1058,12 +1058,12 @@ void et131x_handle_recv_interrupt(struct et131x_adapter *etdev) } if (count == NUM_PACKETS_HANDLED || !done) { - etdev->RxRing.UnfinishedReceives = true; + etdev->rx_ring.UnfinishedReceives = true; writel(PARM_TX_TIME_INT_DEF * NANO_IN_A_MICRO, &etdev->regs->global.watchdog_timer); } else /* Watchdog timer will disable itself if appropriate. */ - etdev->RxRing.UnfinishedReceives = false; + etdev->rx_ring.UnfinishedReceives = false; } static inline u32 bump_fbr(u32 *fbr, u32 limit) @@ -1091,7 +1091,7 @@ static inline u32 bump_fbr(u32 *fbr, u32 limit) */ void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD rfd) { - struct _rx_ring_t *rx_local = &etdev->RxRing; + struct rx_ring *rx_local = &etdev->rx_ring; struct rxdma_regs __iomem *rx_dma = &etdev->regs->rxdma; u16 bi = rfd->bufferindex; u8 ri = rfd->ringindex; diff --git a/drivers/staging/et131x/et1310_rx.h b/drivers/staging/et131x/et1310_rx.h index 28e7665f46d4..de5487ecedd3 100644 --- a/drivers/staging/et131x/et1310_rx.h +++ b/drivers/staging/et131x/et1310_rx.h @@ -191,10 +191,10 @@ struct fbr_lookup { }; /* - * RX_RING_t is sructure representing the adaptor's local reference(s) to the - * rings + * struct rx_ring is the ssructure representing the adaptor's local + * reference(s) to the rings */ -typedef struct _rx_ring_t { +struct rx_ring { #ifdef USE_FBR0 void *pFbr0RingVa; dma_addr_t pFbr0RingPa; @@ -239,7 +239,7 @@ typedef struct _rx_ring_t { /* lookaside lists */ struct kmem_cache *RecvLookaside; -} RX_RING_t, *PRX_RING_t; +}; /* Forward reference of RFD */ struct _MP_RFD; diff --git a/drivers/staging/et131x/et131x_adapter.h b/drivers/staging/et131x/et131x_adapter.h index 3f7f37a56b6c..e4e3185932eb 100644 --- a/drivers/staging/et131x/et131x_adapter.h +++ b/drivers/staging/et131x/et131x_adapter.h @@ -248,7 +248,7 @@ struct et131x_adapter { struct tx_ring tx_ring; /* Rx Memory Variables */ - RX_RING_t RxRing; + struct rx_ring rx_ring; /* Loopback specifics */ u8 ReplicaPhyLoopbk; /* Replica Enable */ diff --git a/drivers/staging/et131x/et131x_isr.c b/drivers/staging/et131x/et131x_isr.c index f6d452dd14e2..e297739fb868 100644 --- a/drivers/staging/et131x/et131x_isr.c +++ b/drivers/staging/et131x/et131x_isr.c @@ -185,7 +185,7 @@ irqreturn_t et131x_isr(int irq, void *dev_id) if (++tcb->stale > 1) status |= ET_INTR_TXDMA_ISR; - if (adapter->RxRing.UnfinishedReceives) + if (adapter->rx_ring.UnfinishedReceives) status |= ET_INTR_RXDMA_XFR_DONE; else if (tcb == NULL) writel(0, &adapter->regs->global.watchdog_timer); From f1471660df8e88fa7840459e3ea28ac1f3187296 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:34:13 +0000 Subject: [PATCH 202/367] Staging: et131x: kill MP_ERR_COUNTERS which is unused Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et131x_adapter.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/staging/et131x/et131x_adapter.h b/drivers/staging/et131x/et131x_adapter.h index e4e3185932eb..8b525b040cab 100644 --- a/drivers/staging/et131x/et131x_adapter.h +++ b/drivers/staging/et131x/et131x_adapter.h @@ -100,15 +100,6 @@ #define LO_MARK_PERCENT_FOR_PSR 15 #define LO_MARK_PERCENT_FOR_RX 15 -/* Counters for error rate monitoring */ -typedef struct _MP_ERR_COUNTERS { - u32 PktCountTxPackets; - u32 PktCountTxErrors; - u32 TimerBasedTxErrors; - u32 PktCountLastError; - u32 ErredConsecPackets; -} MP_ERR_COUNTERS, *PMP_ERR_COUNTERS; - /* RFD (Receive Frame Descriptor) */ typedef struct _MP_RFD { struct list_head list_node; From ec7d9f61012b9ab902810d63c4b5a7c796e4ceed Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:34:18 +0000 Subject: [PATCH 203/367] Staging: et131x: Kill unused error defines Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et131x_adapter.h | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/drivers/staging/et131x/et131x_adapter.h b/drivers/staging/et131x/et131x_adapter.h index 8b525b040cab..6f7bb2dff5a0 100644 --- a/drivers/staging/et131x/et131x_adapter.h +++ b/drivers/staging/et131x/et131x_adapter.h @@ -77,25 +77,7 @@ */ #define NUM_TRAFFIC_CLASSES 1 -/* - * There are three ways of counting errors - if there are more than X errors - * in Y packets (represented by the "SAMPLE" macros), if there are more than - * N errors in a S mSec time period (the "PERIOD" macros), or if there are - * consecutive packets with errors (CONSEC_ERRORED_THRESH). This last covers - * for "Bursty" errors, and the errored packets may well not be contiguous, - * but several errors where the packet counter has changed by less than a - * small amount will cause this count to increment. - */ -#define TX_PACKETS_IN_SAMPLE 10000 -#define TX_MAX_ERRORS_IN_SAMPLE 50 - #define TX_ERROR_PERIOD 1000 -#define TX_MAX_ERRORS_IN_PERIOD 10 - -#define LINK_DETECTION_TIMER 5000 - -#define TX_CONSEC_RANGE 5 -#define TX_CONSEC_ERRORED_THRESH 10 #define LO_MARK_PERCENT_FOR_PSR 15 #define LO_MARK_PERCENT_FOR_RX 15 From 69ea5fcb5e33b785f3f554db0ab0c2694da3f22f Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:34:24 +0000 Subject: [PATCH 204/367] Staging: et131x: Collapse all the function definitions into one place We have lots of tiny files right now that could be one Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_eeprom.c | 39 ++++-- drivers/staging/et131x/et1310_eeprom.h | 103 ---------------- drivers/staging/et131x/et1310_jagcore.h | 94 --------------- drivers/staging/et131x/et1310_mac.c | 17 ++- drivers/staging/et131x/et1310_mac.h | 93 -------------- drivers/staging/et131x/et1310_phy.c | 7 +- drivers/staging/et131x/et1310_phy.h | 34 ------ drivers/staging/et131x/et1310_pm.c | 6 +- drivers/staging/et131x/et1310_pm.h | 85 ------------- drivers/staging/et131x/et1310_rx.c | 7 +- drivers/staging/et131x/et1310_rx.h | 24 ---- drivers/staging/et131x/et1310_tx.c | 8 +- drivers/staging/et131x/et1310_tx.h | 14 --- drivers/staging/et131x/et131x.h | 153 ++++++++++++++++++++++++ drivers/staging/et131x/et131x_adapter.h | 14 +++ drivers/staging/et131x/et131x_config.h | 67 ----------- drivers/staging/et131x/et131x_initpci.c | 10 +- drivers/staging/et131x/et131x_initpci.h | 73 ----------- drivers/staging/et131x/et131x_isr.c | 24 +++- drivers/staging/et131x/et131x_isr.h | 65 ---------- drivers/staging/et131x/et131x_netdev.c | 7 +- drivers/staging/et131x/et131x_netdev.h | 64 ---------- drivers/staging/et131x/et131x_version.h | 9 +- 23 files changed, 241 insertions(+), 776 deletions(-) delete mode 100644 drivers/staging/et131x/et1310_eeprom.h delete mode 100644 drivers/staging/et131x/et1310_jagcore.h delete mode 100644 drivers/staging/et131x/et1310_mac.h delete mode 100644 drivers/staging/et131x/et1310_pm.h create mode 100644 drivers/staging/et131x/et131x.h delete mode 100644 drivers/staging/et131x/et131x_config.h delete mode 100644 drivers/staging/et131x/et131x_initpci.h delete mode 100644 drivers/staging/et131x/et131x_isr.h delete mode 100644 drivers/staging/et131x/et131x_netdev.h diff --git a/drivers/staging/et131x/et1310_eeprom.c b/drivers/staging/et131x/et1310_eeprom.c index bcca1f86f516..3ca253672ba1 100644 --- a/drivers/staging/et131x/et1310_eeprom.c +++ b/drivers/staging/et131x/et1310_eeprom.c @@ -84,17 +84,42 @@ #include #include "et1310_phy.h" -#include "et1310_pm.h" -#include "et1310_jagcore.h" -#include "et1310_eeprom.h" - #include "et131x_adapter.h" -#include "et131x_initpci.h" -#include "et131x_isr.h" +#include "et131x.h" -#include "et1310_tx.h" +/* + * EEPROM Defines + */ +/* LBCIF Register Groups (addressed via 32-bit offsets) */ +#define LBCIF_DWORD0_GROUP 0xAC +#define LBCIF_DWORD1_GROUP 0xB0 +/* LBCIF Registers (addressed via 8-bit offsets) */ +#define LBCIF_ADDRESS_REGISTER 0xAC +#define LBCIF_DATA_REGISTER 0xB0 +#define LBCIF_CONTROL_REGISTER 0xB1 +#define LBCIF_STATUS_REGISTER 0xB2 + +/* LBCIF Control Register Bits */ +#define LBCIF_CONTROL_SEQUENTIAL_READ 0x01 +#define LBCIF_CONTROL_PAGE_WRITE 0x02 +#define LBCIF_CONTROL_EEPROM_RELOAD 0x08 +#define LBCIF_CONTROL_TWO_BYTE_ADDR 0x20 +#define LBCIF_CONTROL_I2C_WRITE 0x40 +#define LBCIF_CONTROL_LBCIF_ENABLE 0x80 + +/* LBCIF Status Register Bits */ +#define LBCIF_STATUS_PHY_QUEUE_AVAIL 0x01 +#define LBCIF_STATUS_I2C_IDLE 0x02 +#define LBCIF_STATUS_ACK_ERROR 0x04 +#define LBCIF_STATUS_GENERAL_ERROR 0x08 +#define LBCIF_STATUS_CHECKSUM_ERROR 0x40 +#define LBCIF_STATUS_EEPROM_PRESENT 0x80 + +/* Miscellaneous Constraints */ +#define MAX_NUM_REGISTER_POLLS 1000 +#define MAX_NUM_WRITE_RETRIES 2 static int eeprom_wait_ready(struct pci_dev *pdev, u32 *status) { diff --git a/drivers/staging/et131x/et1310_eeprom.h b/drivers/staging/et131x/et1310_eeprom.h deleted file mode 100644 index 6a6c6a632a8f..000000000000 --- a/drivers/staging/et131x/et1310_eeprom.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Agere Systems Inc. - * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs - * - * Copyright © 2005 Agere Systems Inc. - * All rights reserved. - * http://www.agere.com - * - *------------------------------------------------------------------------------ - * - * et1310_eeprom.h - Defines, structs, enums, prototypes, etc. used for EEPROM - * access routines - * - *------------------------------------------------------------------------------ - * - * SOFTWARE LICENSE - * - * This software is provided subject to the following terms and conditions, - * which you should read carefully before using the software. Using this - * software indicates your acceptance of these terms and conditions. If you do - * not agree with these terms and conditions, do not use the software. - * - * Copyright © 2005 Agere Systems Inc. - * All rights reserved. - * - * Redistribution and use in source or binary forms, with or without - * modifications, are permitted provided that the following conditions are met: - * - * . Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following Disclaimer as comments in the code as - * well as in the documentation and/or other materials provided with the - * distribution. - * - * . Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following Disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * . Neither the name of Agere Systems Inc. nor the names of the contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * Disclaimer - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY - * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN - * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - */ - -#ifndef __ET1310_EEPROM_H__ -#define __ET1310_EEPROM_H__ - -#include "et1310_address_map.h" - -/* - * EEPROM Defines - */ - -/* LBCIF Register Groups (addressed via 32-bit offsets) */ -#define LBCIF_DWORD0_GROUP 0xAC -#define LBCIF_DWORD1_GROUP 0xB0 - -/* LBCIF Registers (addressed via 8-bit offsets) */ -#define LBCIF_ADDRESS_REGISTER 0xAC -#define LBCIF_DATA_REGISTER 0xB0 -#define LBCIF_CONTROL_REGISTER 0xB1 -#define LBCIF_STATUS_REGISTER 0xB2 - -/* LBCIF Control Register Bits */ -#define LBCIF_CONTROL_SEQUENTIAL_READ 0x01 -#define LBCIF_CONTROL_PAGE_WRITE 0x02 -#define LBCIF_CONTROL_EEPROM_RELOAD 0x08 -#define LBCIF_CONTROL_TWO_BYTE_ADDR 0x20 -#define LBCIF_CONTROL_I2C_WRITE 0x40 -#define LBCIF_CONTROL_LBCIF_ENABLE 0x80 - -/* LBCIF Status Register Bits */ -#define LBCIF_STATUS_PHY_QUEUE_AVAIL 0x01 -#define LBCIF_STATUS_I2C_IDLE 0x02 -#define LBCIF_STATUS_ACK_ERROR 0x04 -#define LBCIF_STATUS_GENERAL_ERROR 0x08 -#define LBCIF_STATUS_CHECKSUM_ERROR 0x40 -#define LBCIF_STATUS_EEPROM_PRESENT 0x80 - -/* Miscellaneous Constraints */ -#define MAX_NUM_REGISTER_POLLS 1000 -#define MAX_NUM_WRITE_RETRIES 2 - -/* Forward declaration of the private adapter structure */ -struct et131x_adapter; - -int et131x_init_eeprom(struct et131x_adapter *etdev); - -#endif /* _ET1310_EEPROM_H_ */ diff --git a/drivers/staging/et131x/et1310_jagcore.h b/drivers/staging/et131x/et1310_jagcore.h deleted file mode 100644 index 0807a01d88ae..000000000000 --- a/drivers/staging/et131x/et1310_jagcore.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Agere Systems Inc. - * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs - * - * Copyright © 2005 Agere Systems Inc. - * All rights reserved. - * http://www.agere.com - * - *------------------------------------------------------------------------------ - * - * et1310_jagcore.h - Defines, structs, enums, prototypes, etc. pertaining to - * the JAGCore - * - *------------------------------------------------------------------------------ - * - * SOFTWARE LICENSE - * - * This software is provided subject to the following terms and conditions, - * which you should read carefully before using the software. Using this - * software indicates your acceptance of these terms and conditions. If you do - * not agree with these terms and conditions, do not use the software. - * - * Copyright © 2005 Agere Systems Inc. - * All rights reserved. - * - * Redistribution and use in source or binary forms, with or without - * modifications, are permitted provided that the following conditions are met: - * - * . Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following Disclaimer as comments in the code as - * well as in the documentation and/or other materials provided with the - * distribution. - * - * . Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following Disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * . Neither the name of Agere Systems Inc. nor the names of the contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * Disclaimer - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY - * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN - * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - */ - -#ifndef __ET1310_JAGCORE_H__ -#define __ET1310_JAGCORE_H__ - -#include "et1310_address_map.h" - - -#define INTERNAL_MEM_SIZE 0x400 /* 1024 of internal memory */ -#define INTERNAL_MEM_RX_OFFSET 0x1FF /* 50% Tx, 50% Rx */ - -/* - * For interrupts, normal running is: - * rxdma_xfr_done, phy_interrupt, mac_stat_interrupt, - * watchdog_interrupt & txdma_xfer_done - * - * In both cases, when flow control is enabled for either Tx or bi-direction, - * we additional enable rx_fbr0_low and rx_fbr1_low, so we know when the - * buffer rings are running low. - */ -#define INT_MASK_DISABLE 0xffffffff - -/* NOTE: Masking out MAC_STAT Interrupt for now... - * #define INT_MASK_ENABLE 0xfff6bf17 - * #define INT_MASK_ENABLE_NO_FLOW 0xfff6bfd7 - */ -#define INT_MASK_ENABLE 0xfffebf17 -#define INT_MASK_ENABLE_NO_FLOW 0xfffebfd7 - -/* Forward declaration of the private adapter structure */ -struct et131x_adapter; - -void ConfigGlobalRegs(struct et131x_adapter *pAdapter); -void ConfigMMCRegs(struct et131x_adapter *pAdapter); -void et131x_enable_interrupts(struct et131x_adapter *adapter); -void et131x_disable_interrupts(struct et131x_adapter *adapter); - -#endif /* __ET1310_JAGCORE_H__ */ diff --git a/drivers/staging/et131x/et1310_mac.c b/drivers/staging/et131x/et1310_mac.c index a02bce0c2807..6515f50a95d8 100644 --- a/drivers/staging/et131x/et1310_mac.c +++ b/drivers/staging/et131x/et1310_mac.c @@ -85,12 +85,19 @@ #include #include "et1310_phy.h" -#include "et1310_pm.h" -#include "et1310_jagcore.h" -#include "et1310_mac.h" - #include "et131x_adapter.h" -#include "et131x_initpci.h" +#include "et131x.h" + + +#define COUNTER_WRAP_28_BIT 0x10000000 +#define COUNTER_WRAP_22_BIT 0x400000 +#define COUNTER_WRAP_16_BIT 0x10000 +#define COUNTER_WRAP_12_BIT 0x1000 + +#define COUNTER_MASK_28_BIT (COUNTER_WRAP_28_BIT - 1) +#define COUNTER_MASK_22_BIT (COUNTER_WRAP_22_BIT - 1) +#define COUNTER_MASK_16_BIT (COUNTER_WRAP_16_BIT - 1) +#define COUNTER_MASK_12_BIT (COUNTER_WRAP_12_BIT - 1) /** * ConfigMacRegs1 - Initialize the first part of MAC regs diff --git a/drivers/staging/et131x/et1310_mac.h b/drivers/staging/et131x/et1310_mac.h deleted file mode 100644 index 2c3859594538..000000000000 --- a/drivers/staging/et131x/et1310_mac.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Agere Systems Inc. - * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs - * - * Copyright © 2005 Agere Systems Inc. - * All rights reserved. - * http://www.agere.com - * - *------------------------------------------------------------------------------ - * - * et1310_mac.h - Defines, structs, enums, prototypes, etc. pertaining to the - * MAC. - * - *------------------------------------------------------------------------------ - * - * SOFTWARE LICENSE - * - * This software is provided subject to the following terms and conditions, - * which you should read carefully before using the software. Using this - * software indicates your acceptance of these terms and conditions. If you do - * not agree with these terms and conditions, do not use the software. - * - * Copyright © 2005 Agere Systems Inc. - * All rights reserved. - * - * Redistribution and use in source or binary forms, with or without - * modifications, are permitted provided that the following conditions are met: - * - * . Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following Disclaimer as comments in the code as - * well as in the documentation and/or other materials provided with the - * distribution. - * - * . Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following Disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * . Neither the name of Agere Systems Inc. nor the names of the contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * Disclaimer - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY - * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN - * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - */ - -#ifndef _ET1310_MAC_H_ -#define _ET1310_MAC_H_ - - -#include "et1310_address_map.h" - - -#define COUNTER_WRAP_28_BIT 0x10000000 -#define COUNTER_WRAP_22_BIT 0x400000 -#define COUNTER_WRAP_16_BIT 0x10000 -#define COUNTER_WRAP_12_BIT 0x1000 - -#define COUNTER_MASK_28_BIT (COUNTER_WRAP_28_BIT - 1) -#define COUNTER_MASK_22_BIT (COUNTER_WRAP_22_BIT - 1) -#define COUNTER_MASK_16_BIT (COUNTER_WRAP_16_BIT - 1) -#define COUNTER_MASK_12_BIT (COUNTER_WRAP_12_BIT - 1) - -#define UPDATE_COUNTER(HostCnt, DevCnt) \ - HostCnt = HostCnt + DevCnt; - -/* Forward declaration of the private adapter structure */ -struct et131x_adapter; - -void ConfigMACRegs1(struct et131x_adapter *adapter); -void ConfigMACRegs2(struct et131x_adapter *adapter); -void ConfigRxMacRegs(struct et131x_adapter *adapter); -void ConfigTxMacRegs(struct et131x_adapter *adapter); -void ConfigMacStatRegs(struct et131x_adapter *adapter); -void ConfigFlowControl(struct et131x_adapter *adapter); -void UpdateMacStatHostCounters(struct et131x_adapter *adapter); -void HandleMacStatInterrupt(struct et131x_adapter *adapter); -void SetupDeviceForMulticast(struct et131x_adapter *adapter); -void SetupDeviceForUnicast(struct et131x_adapter *adapter); - -#endif /* _ET1310_MAC_H_ */ diff --git a/drivers/staging/et131x/et1310_phy.c b/drivers/staging/et131x/et1310_phy.c index 6ecad619f779..4a55fbfbd59d 100644 --- a/drivers/staging/et131x/et1310_phy.c +++ b/drivers/staging/et131x/et1310_phy.c @@ -85,17 +85,14 @@ #include #include "et1310_phy.h" -#include "et1310_pm.h" -#include "et1310_jagcore.h" #include "et131x_adapter.h" -#include "et131x_netdev.h" -#include "et131x_initpci.h" #include "et1310_address_map.h" #include "et1310_tx.h" #include "et1310_rx.h" -#include "et1310_mac.h" + +#include "et131x.h" /* Prototypes for functions with local scope */ static void et131x_xcvr_init(struct et131x_adapter *etdev); diff --git a/drivers/staging/et131x/et1310_phy.h b/drivers/staging/et131x/et1310_phy.h index 758b9b251715..47907ba76012 100644 --- a/drivers/staging/et131x/et1310_phy.h +++ b/drivers/staging/et131x/et1310_phy.h @@ -736,32 +736,8 @@ typedef union _MI_LCR2_t { /* MI Register 29 - 31: Reserved Reg(0x1D - 0x1E) */ -/* Forward declaration of the private adapter structure */ -struct et131x_adapter; /* Prototypes for ET1310_phy.c */ -int et131x_xcvr_find(struct et131x_adapter *adapter); -void et131x_setphy_normal(struct et131x_adapter *adapter); - -/* static inline function does not work because et131x_adapter is not always - * defined - */ -int PhyMiRead(struct et131x_adapter *adapter, u8 xcvrAddr, - u8 xcvrReg, u16 *value); -#define MiRead(adapter, xcvrReg, value) \ - PhyMiRead((adapter), (adapter)->Stats.xcvr_addr, (xcvrReg), (value)) - -int32_t MiWrite(struct et131x_adapter *adapter, - u8 xcvReg, u16 value); -void et131x_Mii_check(struct et131x_adapter *pAdapter, - MI_BMSR_t bmsr, MI_BMSR_t bmsr_ints); - -/* This last is not strictly required (the driver could call the TPAL - * version instead), but this sets the adapter up correctly, and calls the - * access routine indirectly. This protects the driver from changes in TPAL. - */ -void SetPhy_10BaseTHalfDuplex(struct et131x_adapter *adapter); - /* Defines for PHY access routines */ /* Define bit operation flags */ @@ -843,14 +819,4 @@ void SetPhy_10BaseTHalfDuplex(struct et131x_adapter *adapter); /* #define TRU_VMI_LINK_CONTROL_REGISTER 29 */ /* #define TRU_VMI_TIMING_CONTROL_REGISTER */ -/* Prototypes for PHY access routines */ -void ET1310_PhyInit(struct et131x_adapter *adapter); -void ET1310_PhyReset(struct et131x_adapter *adapter); -void ET1310_PhyPowerDown(struct et131x_adapter *adapter, bool down); -void ET1310_PhyAdvertise1000BaseT(struct et131x_adapter *adapter, - u16 duplex); -void ET1310_PhyAccessMiBit(struct et131x_adapter *adapter, - u16 action, - u16 regnum, u16 bitnum, u8 *value); - #endif /* _ET1310_PHY_H_ */ diff --git a/drivers/staging/et131x/et1310_pm.c b/drivers/staging/et131x/et1310_pm.c index 7d0772359291..41019e390af5 100644 --- a/drivers/staging/et131x/et1310_pm.c +++ b/drivers/staging/et131x/et1310_pm.c @@ -83,13 +83,9 @@ #include #include "et1310_phy.h" -#include "et1310_pm.h" -#include "et1310_jagcore.h" -#include "et1310_mac.h" #include "et1310_rx.h" - #include "et131x_adapter.h" -#include "et131x_initpci.h" +#include "et131x.h" /** * EnablePhyComa - called when network cable is unplugged diff --git a/drivers/staging/et131x/et1310_pm.h b/drivers/staging/et131x/et1310_pm.h deleted file mode 100644 index 295f3ab132fb..000000000000 --- a/drivers/staging/et131x/et1310_pm.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Agere Systems Inc. - * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs - * - * Copyright © 2005 Agere Systems Inc. - * All rights reserved. - * http://www.agere.com - * - *------------------------------------------------------------------------------ - * - * et1310_pm.h - Defines, structs, enums, prototypes, etc. pertaining to power - * management. - * - *------------------------------------------------------------------------------ - * - * SOFTWARE LICENSE - * - * This software is provided subject to the following terms and conditions, - * which you should read carefully before using the software. Using this - * software indicates your acceptance of these terms and conditions. If you do - * not agree with these terms and conditions, do not use the software. - * - * Copyright © 2005 Agere Systems Inc. - * All rights reserved. - * - * Redistribution and use in source or binary forms, with or without - * modifications, are permitted provided that the following conditions are met: - * - * . Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following Disclaimer as comments in the code as - * well as in the documentation and/or other materials provided with the - * distribution. - * - * . Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following Disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * . Neither the name of Agere Systems Inc. nor the names of the contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * Disclaimer - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY - * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN - * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - */ - -#ifndef _ET1310_PM_H_ -#define _ET1310_PM_H_ - -#include "et1310_address_map.h" - -typedef struct _MP_POWER_MGMT { - /* variable putting the phy into coma mode when boot up with no cable - * plugged in after 5 seconds - */ - u8 TransPhyComaModeOnBoot; - - /* Next two used to save power information at power down. This - * information will be used during power up to set up parts of Power - * Management in JAGCore - */ - u16 PowerDownSpeed; - u8 PowerDownDuplex; -} MP_POWER_MGMT, *PMP_POWER_MGMT; - -/* Forward declaration of the private adapter structure - */ -struct et131x_adapter; - -void EnablePhyComa(struct et131x_adapter *adapter); -void DisablePhyComa(struct et131x_adapter *adapter); - -#endif /* _ET1310_PM_H_ */ diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c index 232ceb603391..54686e2ace69 100644 --- a/drivers/staging/et131x/et1310_rx.c +++ b/drivers/staging/et131x/et1310_rx.c @@ -84,14 +84,9 @@ #include #include "et1310_phy.h" -#include "et1310_pm.h" -#include "et1310_jagcore.h" - #include "et131x_adapter.h" -#include "et131x_initpci.h" - #include "et1310_rx.h" - +#include "et131x.h" void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD pMpRfd); diff --git a/drivers/staging/et131x/et1310_rx.h b/drivers/staging/et131x/et1310_rx.h index de5487ecedd3..ca84a9146d69 100644 --- a/drivers/staging/et131x/et1310_rx.h +++ b/drivers/staging/et131x/et1310_rx.h @@ -241,28 +241,4 @@ struct rx_ring { struct kmem_cache *RecvLookaside; }; -/* Forward reference of RFD */ -struct _MP_RFD; - -/* Forward declaration of the private adapter structure */ -struct et131x_adapter; - -/* PROTOTYPES for Initialization */ -int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter); -void et131x_rx_dma_memory_free(struct et131x_adapter *adapter); -int et131x_rfd_resources_alloc(struct et131x_adapter *adapter, - struct _MP_RFD *pMpRfd); -void et131x_rfd_resources_free(struct et131x_adapter *adapter, - struct _MP_RFD *pMpRfd); -int et131x_init_recv(struct et131x_adapter *adapter); - -void ConfigRxDmaRegs(struct et131x_adapter *adapter); -void SetRxDmaTimer(struct et131x_adapter *adapter); -void et131x_rx_dma_disable(struct et131x_adapter *adapter); -void et131x_rx_dma_enable(struct et131x_adapter *adapter); - -void et131x_reset_recv(struct et131x_adapter *adapter); - -void et131x_handle_recv_interrupt(struct et131x_adapter *adapter); - #endif /* __ET1310_RX_H__ */ diff --git a/drivers/staging/et131x/et1310_tx.c b/drivers/staging/et131x/et1310_tx.c index b0cb0579026e..b6ff20f47de4 100644 --- a/drivers/staging/et131x/et1310_tx.c +++ b/drivers/staging/et131x/et1310_tx.c @@ -84,15 +84,9 @@ #include #include "et1310_phy.h" -#include "et1310_pm.h" -#include "et1310_jagcore.h" - #include "et131x_adapter.h" -#include "et131x_initpci.h" -#include "et131x_isr.h" - #include "et1310_tx.h" - +#include "et131x.h" static inline void et131x_free_send_packet(struct et131x_adapter *etdev, struct tcb *tcb); diff --git a/drivers/staging/et131x/et1310_tx.h b/drivers/staging/et131x/et1310_tx.h index 4f0ea81978f5..82d06e9870de 100644 --- a/drivers/staging/et131x/et1310_tx.h +++ b/drivers/staging/et131x/et1310_tx.h @@ -147,18 +147,4 @@ struct tx_ring { int since_irq; }; -/* Forward declaration of the private adapter structure */ -struct et131x_adapter; - -/* PROTOTYPES for et1310_tx.c */ -int et131x_tx_dma_memory_alloc(struct et131x_adapter *adapter); -void et131x_tx_dma_memory_free(struct et131x_adapter *adapter); -void ConfigTxDmaRegs(struct et131x_adapter *adapter); -void et131x_init_send(struct et131x_adapter *adapter); -void et131x_tx_dma_disable(struct et131x_adapter *adapter); -void et131x_tx_dma_enable(struct et131x_adapter *adapter); -void et131x_handle_send_interrupt(struct et131x_adapter *adapter); -void et131x_free_busy_send_packets(struct et131x_adapter *adapter); -int et131x_send_packets(struct sk_buff *skb, struct net_device *netdev); - #endif /* __ET1310_TX_H__ */ diff --git a/drivers/staging/et131x/et131x.h b/drivers/staging/et131x/et131x.h new file mode 100644 index 000000000000..a8abfe6ca81f --- /dev/null +++ b/drivers/staging/et131x/et131x.h @@ -0,0 +1,153 @@ +/* + * Merged from files + * + * Copyright © 2005 Agere Systems Inc. + * All rights reserved. + * http://www.agere.com + * + * SOFTWARE LICENSE + * + * This software is provided subject to the following terms and conditions, + * which you should read carefully before using the software. Using this + * software indicates your acceptance of these terms and conditions. If you do + * not agree with these terms and conditions, do not use the software. + * + * Copyright © 2005 Agere Systems Inc. + * All rights reserved. + * + * Redistribution and use in source or binary forms, with or without + * modifications, are permitted provided that the following conditions are met: + * + * . Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following Disclaimer as comments in the code as + * well as in the documentation and/or other materials provided with the + * distribution. + * + * . Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following Disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * . Neither the name of Agere Systems Inc. nor the names of the contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * Disclaimer + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY + * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN + * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + */ + +/* et131x_eeprom.c */ +int et131x_init_eeprom(struct et131x_adapter *etdev); + +/* et131x_initpci.c */ +void ConfigGlobalRegs(struct et131x_adapter *pAdapter); +void ConfigMMCRegs(struct et131x_adapter *pAdapter); +void et131x_enable_interrupts(struct et131x_adapter *adapter); +void et131x_disable_interrupts(struct et131x_adapter *adapter); +void et131x_align_allocated_memory(struct et131x_adapter *adapter, + u64 *phys_addr, + u64 *offset, u64 mask); + +int et131x_adapter_setup(struct et131x_adapter *adapter); +int et131x_adapter_memory_alloc(struct et131x_adapter *adapter); +void et131x_adapter_memory_free(struct et131x_adapter *adapter); +void et131x_hwaddr_init(struct et131x_adapter *adapter); +void et131x_soft_reset(struct et131x_adapter *adapter); + +/* et131x_isr.c */ +irqreturn_t et131x_isr(int irq, void *dev_id); +void et131x_isr_handler(struct work_struct *work); + +/* et1310_mac.c */ +void ConfigMACRegs1(struct et131x_adapter *adapter); +void ConfigMACRegs2(struct et131x_adapter *adapter); +void ConfigRxMacRegs(struct et131x_adapter *adapter); +void ConfigTxMacRegs(struct et131x_adapter *adapter); +void ConfigMacStatRegs(struct et131x_adapter *adapter); +void ConfigFlowControl(struct et131x_adapter *adapter); +void UpdateMacStatHostCounters(struct et131x_adapter *adapter); +void HandleMacStatInterrupt(struct et131x_adapter *adapter); +void SetupDeviceForMulticast(struct et131x_adapter *adapter); +void SetupDeviceForUnicast(struct et131x_adapter *adapter); + +/* et131x_netdev.c */ +struct net_device *et131x_device_alloc(void); + +/* et131x_pm.c */ +void EnablePhyComa(struct et131x_adapter *adapter); +void DisablePhyComa(struct et131x_adapter *adapter); + +/* et131x_phy.c */ +void ET1310_PhyInit(struct et131x_adapter *adapter); +void ET1310_PhyReset(struct et131x_adapter *adapter); +void ET1310_PhyPowerDown(struct et131x_adapter *adapter, bool down); +void ET1310_PhyAdvertise1000BaseT(struct et131x_adapter *adapter, + u16 duplex); +void ET1310_PhyAccessMiBit(struct et131x_adapter *adapter, + u16 action, + u16 regnum, u16 bitnum, u8 *value); + +int et131x_xcvr_find(struct et131x_adapter *adapter); +void et131x_setphy_normal(struct et131x_adapter *adapter); + +/* static inline function does not work because et131x_adapter is not always + * defined + */ +int PhyMiRead(struct et131x_adapter *adapter, u8 xcvrAddr, + u8 xcvrReg, u16 *value); +#define MiRead(adapter, xcvrReg, value) \ + PhyMiRead((adapter), (adapter)->Stats.xcvr_addr, (xcvrReg), (value)) + +int32_t MiWrite(struct et131x_adapter *adapter, + u8 xcvReg, u16 value); +void et131x_Mii_check(struct et131x_adapter *pAdapter, + MI_BMSR_t bmsr, MI_BMSR_t bmsr_ints); + +/* This last is not strictly required (the driver could call the TPAL + * version instead), but this sets the adapter up correctly, and calls the + * access routine indirectly. This protects the driver from changes in TPAL. + */ +void SetPhy_10BaseTHalfDuplex(struct et131x_adapter *adapter); + + +/* et1310_rx.c */ +int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter); +void et131x_rx_dma_memory_free(struct et131x_adapter *adapter); +int et131x_rfd_resources_alloc(struct et131x_adapter *adapter, + struct _MP_RFD *pMpRfd); +void et131x_rfd_resources_free(struct et131x_adapter *adapter, + struct _MP_RFD *pMpRfd); +int et131x_init_recv(struct et131x_adapter *adapter); + +void ConfigRxDmaRegs(struct et131x_adapter *adapter); +void SetRxDmaTimer(struct et131x_adapter *adapter); +void et131x_rx_dma_disable(struct et131x_adapter *adapter); +void et131x_rx_dma_enable(struct et131x_adapter *adapter); + +void et131x_reset_recv(struct et131x_adapter *adapter); + +void et131x_handle_recv_interrupt(struct et131x_adapter *adapter); + +/* et131x_tx.c */ +int et131x_tx_dma_memory_alloc(struct et131x_adapter *adapter); +void et131x_tx_dma_memory_free(struct et131x_adapter *adapter); +void ConfigTxDmaRegs(struct et131x_adapter *adapter); +void et131x_init_send(struct et131x_adapter *adapter); +void et131x_tx_dma_disable(struct et131x_adapter *adapter); +void et131x_tx_dma_enable(struct et131x_adapter *adapter); +void et131x_handle_send_interrupt(struct et131x_adapter *adapter); +void et131x_free_busy_send_packets(struct et131x_adapter *adapter); +int et131x_send_packets(struct sk_buff *skb, struct net_device *netdev); + diff --git a/drivers/staging/et131x/et131x_adapter.h b/drivers/staging/et131x/et131x_adapter.h index 6f7bb2dff5a0..64a678fcb60a 100644 --- a/drivers/staging/et131x/et131x_adapter.h +++ b/drivers/staging/et131x/et131x_adapter.h @@ -147,6 +147,20 @@ typedef struct _ce_stats_t { u32 InterruptStatus; } CE_STATS_t, *PCE_STATS_t; +typedef struct _MP_POWER_MGMT { + /* variable putting the phy into coma mode when boot up with no cable + * plugged in after 5 seconds + */ + u8 TransPhyComaModeOnBoot; + + /* Next two used to save power information at power down. This + * information will be used during power up to set up parts of Power + * Management in JAGCore + */ + u16 PowerDownSpeed; + u8 PowerDownDuplex; +} MP_POWER_MGMT, *PMP_POWER_MGMT; + /* The private adapter structure */ struct et131x_adapter { struct net_device *netdev; diff --git a/drivers/staging/et131x/et131x_config.h b/drivers/staging/et131x/et131x_config.h deleted file mode 100644 index 642c0f6dd6f3..000000000000 --- a/drivers/staging/et131x/et131x_config.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Agere Systems Inc. - * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs - * - * Copyright © 2005 Agere Systems Inc. - * All rights reserved. - * http://www.agere.com - * - *------------------------------------------------------------------------------ - * - * et131x_config.h - Defines, structs, enums, prototypes, etc. to support - * et131x_config.c - * - *------------------------------------------------------------------------------ - * - * SOFTWARE LICENSE - * - * This software is provided subject to the following terms and conditions, - * which you should read carefully before using the software. Using this - * software indicates your acceptance of these terms and conditions. If you do - * not agree with these terms and conditions, do not use the software. - * - * Copyright © 2005 Agere Systems Inc. - * All rights reserved. - * - * Redistribution and use in source or binary forms, with or without - * modifications, are permitted provided that the following conditions are met: - * - * . Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following Disclaimer as comments in the code as - * well as in the documentation and/or other materials provided with the - * distribution. - * - * . Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following Disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * . Neither the name of Agere Systems Inc. nor the names of the contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * Disclaimer - * - * THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY - * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN - * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - */ - -#ifndef __ET131X_CONFIG_H__ -#define __ET131X_CONFIG_H__ - -/* Forward declaration of the private adapter structure */ -struct et131x_adapter; - -void et131x_config_parse(struct et131x_adapter *adapter); - -#endif /* __ET131X_CONFIG_H__ */ diff --git a/drivers/staging/et131x/et131x_initpci.c b/drivers/staging/et131x/et131x_initpci.c index e02b1cd98f55..5ad7e5a6f631 100644 --- a/drivers/staging/et131x/et131x_initpci.c +++ b/drivers/staging/et131x/et131x_initpci.c @@ -87,20 +87,16 @@ #include #include "et1310_phy.h" -#include "et1310_pm.h" -#include "et1310_jagcore.h" #include "et131x_adapter.h" -#include "et131x_netdev.h" -#include "et131x_config.h" -#include "et131x_isr.h" #include "et1310_address_map.h" #include "et1310_tx.h" #include "et1310_rx.h" -#include "et1310_mac.h" -#include "et1310_eeprom.h" +#include "et131x.h" +#define INTERNAL_MEM_SIZE 0x400 /* 1024 of internal memory */ +#define INTERNAL_MEM_RX_OFFSET 0x1FF /* 50% Tx, 50% Rx */ /* Defines for Parameter Default/Min/Max vaules */ #define PARM_SPEED_DUPLEX_MIN 0 diff --git a/drivers/staging/et131x/et131x_initpci.h b/drivers/staging/et131x/et131x_initpci.h deleted file mode 100644 index 7269569a874b..000000000000 --- a/drivers/staging/et131x/et131x_initpci.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Agere Systems Inc. - * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs - * - * Copyright © 2005 Agere Systems Inc. - * All rights reserved. - * http://www.agere.com - * - *------------------------------------------------------------------------------ - * - * et131x_initpci.h - Header which includes common data and function prototypes - * related to the driver's PCI (and PCI Express) information. - * - *------------------------------------------------------------------------------ - * - * SOFTWARE LICENSE - * - * This software is provided subject to the following terms and conditions, - * which you should read carefully before using the software. Using this - * software indicates your acceptance of these terms and conditions. If you do - * not agree with these terms and conditions, do not use the software. - * - * Copyright © 2005 Agere Systems Inc. - * All rights reserved. - * - * Redistribution and use in source or binary forms, with or without - * modifications, are permitted provided that the following conditions are met: - * - * . Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following Disclaimer as comments in the code as - * well as in the documentation and/or other materials provided with the - * distribution. - * - * . Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following Disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * . Neither the name of Agere Systems Inc. nor the names of the contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * Disclaimer - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY - * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN - * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - */ - -#ifndef __ET131X_INITPCI_H__ -#define __ET131X_INITPCI_H__ - -/* Function Prototypes */ -void et131x_align_allocated_memory(struct et131x_adapter *adapter, - u64 *phys_addr, - u64 *offset, u64 mask); - -int et131x_adapter_setup(struct et131x_adapter *adapter); -int et131x_adapter_memory_alloc(struct et131x_adapter *adapter); -void et131x_adapter_memory_free(struct et131x_adapter *adapter); -void et131x_hwaddr_init(struct et131x_adapter *adapter); -void et131x_soft_reset(struct et131x_adapter *adapter); - -#endif /* __ET131X_INITPCI_H__ */ diff --git a/drivers/staging/et131x/et131x_isr.c b/drivers/staging/et131x/et131x_isr.c index e297739fb868..c35a564de3c8 100644 --- a/drivers/staging/et131x/et131x_isr.c +++ b/drivers/staging/et131x/et131x_isr.c @@ -85,11 +85,27 @@ #include #include "et1310_phy.h" -#include "et1310_pm.h" -#include "et1310_jagcore.h" -#include "et1310_mac.h" - #include "et131x_adapter.h" +#include "et131x.h" + +/* + * For interrupts, normal running is: + * rxdma_xfr_done, phy_interrupt, mac_stat_interrupt, + * watchdog_interrupt & txdma_xfer_done + * + * In both cases, when flow control is enabled for either Tx or bi-direction, + * we additional enable rx_fbr0_low and rx_fbr1_low, so we know when the + * buffer rings are running low. + */ +#define INT_MASK_DISABLE 0xffffffff + +/* NOTE: Masking out MAC_STAT Interrupt for now... + * #define INT_MASK_ENABLE 0xfff6bf17 + * #define INT_MASK_ENABLE_NO_FLOW 0xfff6bfd7 + */ +#define INT_MASK_ENABLE 0xfffebf17 +#define INT_MASK_ENABLE_NO_FLOW 0xfffebfd7 + /** * et131x_enable_interrupts - enable interrupt diff --git a/drivers/staging/et131x/et131x_isr.h b/drivers/staging/et131x/et131x_isr.h deleted file mode 100644 index 906d57727e20..000000000000 --- a/drivers/staging/et131x/et131x_isr.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Agere Systems Inc. - * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs - * - * Copyright © 2005 Agere Systems Inc. - * All rights reserved. - * http://www.agere.com - * - *------------------------------------------------------------------------------ - * - * et131x_isr.h - Defines, structs, enums, prototypes, etc. pertaining to the - * ISR processing code. - * - *------------------------------------------------------------------------------ - * - * SOFTWARE LICENSE - * - * This software is provided subject to the following terms and conditions, - * which you should read carefully before using the software. Using this - * software indicates your acceptance of these terms and conditions. If you do - * not agree with these terms and conditions, do not use the software. - * - * Copyright © 2005 Agere Systems Inc. - * All rights reserved. - * - * Redistribution and use in source or binary forms, with or without - * modifications, are permitted provided that the following conditions are met: - * - * . Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following Disclaimer as comments in the code as - * well as in the documentation and/or other materials provided with the - * distribution. - * - * . Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following Disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * . Neither the name of Agere Systems Inc. nor the names of the contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * Disclaimer - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY - * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN - * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - */ - -#ifndef __ET131X_ISR_H__ -#define __ET131X_ISR_H__ - -irqreturn_t et131x_isr(int irq, void *dev_id); -void et131x_isr_handler(struct work_struct *work); - -#endif /* __ET131X_ISR_H__ */ diff --git a/drivers/staging/et131x/et131x_netdev.c b/drivers/staging/et131x/et131x_netdev.c index c63032fa88c5..6d9f9be7a844 100644 --- a/drivers/staging/et131x/et131x_netdev.c +++ b/drivers/staging/et131x/et131x_netdev.c @@ -85,14 +85,9 @@ #include #include "et1310_phy.h" -#include "et1310_pm.h" -#include "et1310_jagcore.h" -#include "et1310_mac.h" #include "et1310_tx.h" - #include "et131x_adapter.h" -#include "et131x_isr.h" -#include "et131x_initpci.h" +#include "et131x.h" struct net_device_stats *et131x_stats(struct net_device *netdev); int et131x_open(struct net_device *netdev); diff --git a/drivers/staging/et131x/et131x_netdev.h b/drivers/staging/et131x/et131x_netdev.h deleted file mode 100644 index 1eb4a922c01d..000000000000 --- a/drivers/staging/et131x/et131x_netdev.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Agere Systems Inc. - * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs - * - * Copyright © 2005 Agere Systems Inc. - * All rights reserved. - * http://www.agere.com - * - *------------------------------------------------------------------------------ - * - * et131x_netdev.h - Defines, structs, enums, prototypes, etc. related to the - * driver's net_device support. - * - *------------------------------------------------------------------------------ - * - * SOFTWARE LICENSE - * - * This software is provided subject to the following terms and conditions, - * which you should read carefully before using the software. Using this - * software indicates your acceptance of these terms and conditions. If you do - * not agree with these terms and conditions, do not use the software. - * - * Copyright © 2005 Agere Systems Inc. - * All rights reserved. - * - * Redistribution and use in source or binary forms, with or without - * modifications, are permitted provided that the following conditions are met: - * - * . Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following Disclaimer as comments in the code as - * well as in the documentation and/or other materials provided with the - * distribution. - * - * . Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following Disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * . Neither the name of Agere Systems Inc. nor the names of the contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * Disclaimer - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY - * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN - * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - */ - -#ifndef __ET131X_NETDEV_H__ -#define __ET131X_NETDEV_H__ - -struct net_device *et131x_device_alloc(void); - -#endif /* __ET131X_NETDEV_H__ */ diff --git a/drivers/staging/et131x/et131x_version.h b/drivers/staging/et131x/et131x_version.h index 568f6c8c34f5..2aa9bda44ac0 100644 --- a/drivers/staging/et131x/et131x_version.h +++ b/drivers/staging/et131x/et131x_version.h @@ -62,20 +62,13 @@ #define DRIVER_LICENSE "Dual BSD/GPL" #define DRIVER_DEVICE_STRING "ET1310" #define DRIVER_NAME "et131x" -#define DRIVER_MAJOR_VERSION 1 -#define DRIVER_MINOR_VERSION 2 -#define DRIVER_PATCH_VERSION 3 -#define DRIVER_VERSION_STRING "1.2.3" +#define DRIVER_VERSION_STRING "1.2.3-lk" #define DRIVER_VENDOR "Agere Systems, http://www.agere.com" #define DRIVER_DESC "10/100/1000 Base-T Ethernet Driver" -#define STRUCT_MODULE "net" /* blux: missed by the kernel */ - #define DRIVER_INFO DRIVER_DESC " for the "\ DRIVER_DEVICE_STRING ", v" \ DRIVER_VERSION_STRING " by " \ DRIVER_VENDOR -#define DRIVER_NAME_EXT "et131x.ko" - #endif /* __ET131X_VERSION_H__ */ From 6720949d55623cb8c4cb6b06f218d8be68780a6f Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:34:29 +0000 Subject: [PATCH 205/367] Staging: et131x: Kil the txmac type Only used for one trivial thing so turn that into something trivial instead Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_address_map.h | 39 +++++++-------------- drivers/staging/et131x/et1310_mac.c | 9 +++-- 2 files changed, 16 insertions(+), 32 deletions(-) diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index 11e7b656d45c..5fcb48334590 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h @@ -538,33 +538,18 @@ struct rxdma_regs { /* Location: */ /* * structure for control reg in txmac address map * located at address 0x3000 + * + * bits + * 31-8: unused + * 7: cklseg_disable + * 6: ckbcnt_disable + * 5: cksegnum + * 4: async_disable + * 3: fc_disable + * 2: mcif_disable + * 1: mif_disable + * 0: txmac_en */ -typedef union _TXMAC_CTL_t { - u32 value; - struct { -#ifdef _BIT_FIELDS_HTOL - u32 unused:24; /* bits 8-31 */ - u32 cklseg_diable:1; /* bit 7 */ - u32 ckbcnt_disable:1; /* bit 6 */ - u32 cksegnum:1; /* bit 5 */ - u32 async_disable:1; /* bit 4 */ - u32 fc_disable:1; /* bit 3 */ - u32 mcif_disable:1; /* bit 2 */ - u32 mif_disable:1; /* bit 1 */ - u32 txmac_en:1; /* bit 0 */ -#else - u32 txmac_en:1; /* bit 0 */ - u32 mif_disable:1; /* bit 1 mac interface */ - u32 mcif_disable:1; /* bit 2 mem. contr. interface */ - u32 fc_disable:1; /* bit 3 */ - u32 async_disable:1; /* bit 4 */ - u32 cksegnum:1; /* bit 5 */ - u32 ckbcnt_disable:1; /* bit 6 */ - u32 cklseg_diable:1; /* bit 7 */ - u32 unused:24; /* bits 8-31 */ -#endif - } bits; -} TXMAC_CTL_t, *PTXMAC_CTL_t; /* * structure for shadow pointer reg in txmac address map @@ -695,7 +680,7 @@ typedef union _TXMAC_ERR_INT_t { * Tx MAC Module of JAGCore Address Mapping */ typedef struct _TXMAC_t { /* Location: */ - TXMAC_CTL_t ctl; /* 0x3000 */ + u32 ctl; /* 0x3000 */ u32 shadow_ptr; /* 0x3004 */ TXMAC_ERR_CNT_t err_cnt; /* 0x3008 */ u32 max_fill; /* 0x300C */ diff --git a/drivers/staging/et131x/et1310_mac.c b/drivers/staging/et131x/et1310_mac.c index 6515f50a95d8..dc9cb297a848 100644 --- a/drivers/staging/et131x/et1310_mac.c +++ b/drivers/staging/et131x/et1310_mac.c @@ -170,9 +170,9 @@ void ConfigMACRegs2(struct et131x_adapter *etdev) u32 cfg1; u32 cfg2; u32 ifctrl; - TXMAC_CTL_t ctl; + u32 ctl; - ctl.value = readl(&etdev->regs->txmac.ctl.value); + ctl = readl(&etdev->regs->txmac.ctl); cfg1 = readl(&pMac->cfg1); cfg2 = readl(&pMac->cfg2); ifctrl = readl(&pMac->if_ctrl); @@ -226,9 +226,8 @@ void ConfigMACRegs2(struct et131x_adapter *etdev) } /* Enable TXMAC */ - ctl.bits.txmac_en = 0x1; - ctl.bits.fc_disable = 0x1; - writel(ctl.value, &etdev->regs->txmac.ctl.value); + ctl |= 0x05; /* TX mac enable, FC disable */ + writel(ctl, &etdev->regs->txmac.ctl); /* Ready to start the RXDMA/TXDMA engine */ if (etdev->Flags & fMP_ADAPTER_LOWER_POWER) { From 1cb180dc9dadf7739fe5bf9a8f159097abb67590 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:34:35 +0000 Subject: [PATCH 206/367] Staging: et131x: kill txmac err count typedef Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_address_map.h | 23 ++++++--------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index 5fcb48334590..c8b22ba120fc 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h @@ -563,23 +563,12 @@ struct rxdma_regs { /* Location: */ /* * structure for error count reg in txmac address map * located at address 0x3008 + * + * 31-12: unused + * 11-8: reserved + * 7-4: txq_underrun + * 3-0: fifo_underrun */ -typedef union _TXMAC_ERR_CNT_t { - u32 value; - struct { -#ifdef _BIT_FIELDS_HTOL - u32 unused:20; /* bits 12-31 */ - u32 reserved:4; /* bits 8-11 */ - u32 txq_underrun:4; /* bits 4-7 */ - u32 fifo_underrun:4; /* bits 0-3 */ -#else - u32 fifo_underrun:4; /* bits 0-3 */ - u32 txq_underrun:4; /* bits 4-7 */ - u32 reserved:4; /* bits 8-11 */ - u32 unused:20; /* bits 12-31 */ -#endif - } bits; -} TXMAC_ERR_CNT_t, *PTXMAC_ERR_CNT_t; /* * structure for max fill reg in txmac address map @@ -682,7 +671,7 @@ typedef union _TXMAC_ERR_INT_t { typedef struct _TXMAC_t { /* Location: */ u32 ctl; /* 0x3000 */ u32 shadow_ptr; /* 0x3004 */ - TXMAC_ERR_CNT_t err_cnt; /* 0x3008 */ + u32 err_cnt; /* 0x3008 */ u32 max_fill; /* 0x300C */ u32 cf_param; /* 0x3010 */ u32 tx_test; /* 0x3014 */ From 003e52e85b1cf04c0bccc70c124d67aea3036fda Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:34:40 +0000 Subject: [PATCH 207/367] Staging: et131x: Kill off the TXMAC_ERR_t type This is another one we don't really need to do much to get rid of Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_address_map.h | 38 ++++++--------------- drivers/staging/et131x/et131x_isr.c | 2 +- 2 files changed, 12 insertions(+), 28 deletions(-) diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index c8b22ba120fc..4c1e73574ecd 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h @@ -597,33 +597,17 @@ struct rxdma_regs { /* Location: */ /* * structure for error reg in txmac address map * located at address 0x3018 + * + * 31-9: unused + * 8: fifo_underrun + * 7-6: unused + * 5: ctrl2_err + * 4: txq_underrun + * 3: bcnt_err + * 2: lseg_err + * 1: segnum_err + * 0: seg0_err */ -typedef union _TXMAC_ERR_t { - u32 value; - struct { -#ifdef _BIT_FIELDS_HTOL - u32 unused2:23; /* bits 9-31 */ - u32 fifo_underrun:1; /* bit 8 */ - u32 unused1:2; /* bits 6-7 */ - u32 ctrl2_err:1; /* bit 5 */ - u32 txq_underrun:1; /* bit 4 */ - u32 bcnt_err:1; /* bit 3 */ - u32 lseg_err:1; /* bit 2 */ - u32 segnum_err:1; /* bit 1 */ - u32 seg0_err:1; /* bit 0 */ -#else - u32 seg0_err:1; /* bit 0 */ - u32 segnum_err:1; /* bit 1 */ - u32 lseg_err:1; /* bit 2 */ - u32 bcnt_err:1; /* bit 3 */ - u32 txq_underrun:1; /* bit 4 */ - u32 ctrl2_err:1; /* bit 5 */ - u32 unused1:2; /* bits 6-7 */ - u32 fifo_underrun:1; /* bit 8 */ - u32 unused2:23; /* bits 9-31 */ -#endif - } bits; -} TXMAC_ERR_t, *PTXMAC_ERR_t; /* * structure for error interrupt reg in txmac address map @@ -675,7 +659,7 @@ typedef struct _TXMAC_t { /* Location: */ u32 max_fill; /* 0x300C */ u32 cf_param; /* 0x3010 */ u32 tx_test; /* 0x3014 */ - TXMAC_ERR_t err; /* 0x3018 */ + u32 err; /* 0x3018 */ TXMAC_ERR_INT_t err_int; /* 0x301C */ u32 bp_ctrl; /* 0x3020 */ } TXMAC_t, *PTXMAC_t; diff --git a/drivers/staging/et131x/et131x_isr.c b/drivers/staging/et131x/et131x_isr.c index c35a564de3c8..aa36e40ec248 100644 --- a/drivers/staging/et131x/et131x_isr.c +++ b/drivers/staging/et131x/et131x_isr.c @@ -406,7 +406,7 @@ void et131x_isr_handler(struct work_struct *work) /* Let's move on to the TxMac */ if (status & ET_INTR_TXMAC) { - u32 err = readl(&iomem->txmac.err.value); + u32 err = readl(&iomem->txmac.err); /* * When any of the errors occur and TXMAC generates From afa7e5ec93b4e9e991fd3feb0bda2589f785e357 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:34:46 +0000 Subject: [PATCH 208/367] Staging: et13x: kill off TXMAC_ERR_INT_t This completes the structures within the txmac block so we can now propogate a name change and type removal up a layer and clean up TXMAC as well Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_address_map.h | 48 +++++++-------------- drivers/staging/et131x/et1310_mac.c | 6 +-- 2 files changed, 19 insertions(+), 35 deletions(-) diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index 4c1e73574ecd..d599f312963e 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h @@ -612,33 +612,17 @@ struct rxdma_regs { /* Location: */ /* * structure for error interrupt reg in txmac address map * located at address 0x301C + * + * 31-9: unused + * 8: fifo_underrun + * 7-6: unused + * 5: ctrl2_err + * 4: txq_underrun + * 3: bcnt_err + * 2: lseg_err + * 1: segnum_err + * 0: seg0_err */ -typedef union _TXMAC_ERR_INT_t { - u32 value; - struct { -#ifdef _BIT_FIELDS_HTOL - u32 unused2:23; /* bits 9-31 */ - u32 fifo_underrun:1; /* bit 8 */ - u32 unused1:2; /* bits 6-7 */ - u32 ctrl2_err:1; /* bit 5 */ - u32 txq_underrun:1; /* bit 4 */ - u32 bcnt_err:1; /* bit 3 */ - u32 lseg_err:1; /* bit 2 */ - u32 segnum_err:1; /* bit 1 */ - u32 seg0_err:1; /* bit 0 */ -#else - u32 seg0_err:1; /* bit 0 */ - u32 segnum_err:1; /* bit 1 */ - u32 lseg_err:1; /* bit 2 */ - u32 bcnt_err:1; /* bit 3 */ - u32 txq_underrun:1; /* bit 4 */ - u32 ctrl2_err:1; /* bit 5 */ - u32 unused1:2; /* bits 6-7 */ - u32 fifo_underrun:1; /* bit 8 */ - u32 unused2:23; /* bits 9-31 */ -#endif - } bits; -} TXMAC_ERR_INT_t, *PTXMAC_ERR_INT_t; /* * structure for error interrupt reg in txmac address map @@ -652,7 +636,7 @@ typedef union _TXMAC_ERR_INT_t { /* * Tx MAC Module of JAGCore Address Mapping */ -typedef struct _TXMAC_t { /* Location: */ +struct txmac_regs { /* Location: */ u32 ctl; /* 0x3000 */ u32 shadow_ptr; /* 0x3004 */ u32 err_cnt; /* 0x3008 */ @@ -660,9 +644,9 @@ typedef struct _TXMAC_t { /* Location: */ u32 cf_param; /* 0x3010 */ u32 tx_test; /* 0x3014 */ u32 err; /* 0x3018 */ - TXMAC_ERR_INT_t err_int; /* 0x301C */ + u32 err_int; /* 0x301C */ u32 bp_ctrl; /* 0x3020 */ -} TXMAC_t, *PTXMAC_t; +}; /* END OF TXMAC REGISTER ADDRESS MAP */ @@ -1087,7 +1071,7 @@ typedef struct _RXMAC_t { /* Location: */ RXMAC_ERROR_REG_t err_reg; /* 0x409C */ } RXMAC_t, *PRXMAC_t; -/* END OF TXMAC REGISTER ADDRESS MAP */ +/* END OF RXMAC REGISTER ADDRESS MAP */ /* START OF MAC REGISTER ADDRESS MAP */ @@ -1632,9 +1616,9 @@ typedef struct _ADDRESS_MAP_t { struct rxdma_regs rxdma; /* unused section of rxdma address map */ u8 unused_rxdma[4096 - sizeof(struct rxdma_regs)]; - TXMAC_t txmac; + struct txmac_regs txmac; /* unused section of txmac address map */ - u8 unused_txmac[4096 - sizeof(TXMAC_t)]; + u8 unused_txmac[4096 - sizeof(struct txmac_regs)]; RXMAC_t rxmac; /* unused section of rxmac address map */ u8 unused_rxmac[4096 - sizeof(RXMAC_t)]; diff --git a/drivers/staging/et131x/et1310_mac.c b/drivers/staging/et131x/et1310_mac.c index dc9cb297a848..99aeb331c0e4 100644 --- a/drivers/staging/et131x/et1310_mac.c +++ b/drivers/staging/et131x/et1310_mac.c @@ -376,16 +376,16 @@ void ConfigRxMacRegs(struct et131x_adapter *etdev) void ConfigTxMacRegs(struct et131x_adapter *etdev) { - struct _TXMAC_t __iomem *pTxMac = &etdev->regs->txmac; + struct txmac_regs *txmac = &etdev->regs->txmac; /* We need to update the Control Frame Parameters * cfpt - control frame pause timer set to 64 (0x40) * cfep - control frame extended pause timer set to 0x0 */ if (etdev->FlowControl == None) - writel(0, &pTxMac->cf_param); + writel(0, &txmac->cf_param); else - writel(0x40, &pTxMac->cf_param); + writel(0x40, &txmac->cf_param); } void ConfigMacStatRegs(struct et131x_adapter *etdev) From 70a29a24088211369169b6285f33795be4d3a616 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:34:51 +0000 Subject: [PATCH 209/367] Staging: et131x: Kill rxmac crc fields More we don't need Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_address_map.h | 82 +++++---------------- drivers/staging/et131x/et1310_mac.c | 6 +- 2 files changed, 22 insertions(+), 66 deletions(-) diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index d599f312963e..67aef73b3ce0 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h @@ -684,77 +684,33 @@ typedef union _RXMAC_CTRL_t { /* * structure for Wake On Lan Control and CRC 0 reg in rxmac address map * located at address 0x4004 + * 31-16: crc + * 15-12: reserved + * 11: ignore_pp + * 10: ignore_mp + * 9: clr_intr + * 8: ignore_link_chg + * 7: ignore_uni + * 6: ignore_multi + * 5: ignore_broad + * 4-0: valid_crc 4-0 */ -typedef union _RXMAC_WOL_CTL_CRC0_t { - u32 value; - struct { -#ifdef _BIT_FIELDS_HTOL - u32 crc0:16; /* bits 16-31 */ - u32 reserve:4; /* bits 12-15 */ - u32 ignore_pp:1; /* bit 11 */ - u32 ignore_mp:1; /* bit 10 */ - u32 clr_intr:1; /* bit 9 */ - u32 ignore_link_chg:1; /* bit 8 */ - u32 ignore_uni:1; /* bit 7 */ - u32 ignore_multi:1; /* bit 6 */ - u32 ignore_broad:1; /* bit 5 */ - u32 valid_crc4:1; /* bit 4 */ - u32 valid_crc3:1; /* bit 3 */ - u32 valid_crc2:1; /* bit 2 */ - u32 valid_crc1:1; /* bit 1 */ - u32 valid_crc0:1; /* bit 0 */ -#else - u32 valid_crc0:1; /* bit 0 */ - u32 valid_crc1:1; /* bit 1 */ - u32 valid_crc2:1; /* bit 2 */ - u32 valid_crc3:1; /* bit 3 */ - u32 valid_crc4:1; /* bit 4 */ - u32 ignore_broad:1; /* bit 5 */ - u32 ignore_multi:1; /* bit 6 */ - u32 ignore_uni:1; /* bit 7 */ - u32 ignore_link_chg:1; /* bit 8 */ - u32 clr_intr:1; /* bit 9 */ - u32 ignore_mp:1; /* bit 10 */ - u32 ignore_pp:1; /* bit 11 */ - u32 reserve:4; /* bits 12-15 */ - u32 crc0:16; /* bits 16-31 */ -#endif - } bits; -} RXMAC_WOL_CTL_CRC0_t, *PRXMAC_WOL_CTL_CRC0_t; /* * structure for CRC 1 and CRC 2 reg in rxmac address map * located at address 0x4008 + * + * 31-16: crc2 + * 15-0: crc1 */ -typedef union _RXMAC_WOL_CRC12_t { - u32 value; - struct { -#ifdef _BIT_FIELDS_HTOL - u32 crc2:16; /* bits 16-31 */ - u32 crc1:16; /* bits 0-15 */ -#else - u32 crc1:16; /* bits 0-15 */ - u32 crc2:16; /* bits 16-31 */ -#endif - } bits; -} RXMAC_WOL_CRC12_t, *PRXMAC_WOL_CRC12_t; /* * structure for CRC 3 and CRC 4 reg in rxmac address map * located at address 0x400C + * + * 31-16: crc4 + * 15-0: crc3 */ -typedef union _RXMAC_WOL_CRC34_t { - u32 value; - struct { -#ifdef _BIT_FIELDS_HTOL - u32 crc4:16; /* bits 16-31 */ - u32 crc3:16; /* bits 0-15 */ -#else - u32 crc3:16; /* bits 0-15 */ - u32 crc4:16; /* bits 16-31 */ -#endif - } bits; -} RXMAC_WOL_CRC34_t, *PRXMAC_WOL_CRC34_t; /* * structure for Wake On Lan Source Address Lo reg in rxmac address map @@ -1029,9 +985,9 @@ typedef union _RXMAC_ERROR_REG_t { */ typedef struct _RXMAC_t { /* Location: */ RXMAC_CTRL_t ctrl; /* 0x4000 */ - RXMAC_WOL_CTL_CRC0_t crc0; /* 0x4004 */ - RXMAC_WOL_CRC12_t crc12; /* 0x4008 */ - RXMAC_WOL_CRC34_t crc34; /* 0x400C */ + u32 crc0; /* 0x4004 */ + u32 crc12; /* 0x4008 */ + u32 crc34; /* 0x400C */ RXMAC_WOL_SA_LO_t sa_lo; /* 0x4010 */ RXMAC_WOL_SA_HI_t sa_hi; /* 0x4014 */ u32 mask0_word0; /* 0x4018 */ diff --git a/drivers/staging/et131x/et1310_mac.c b/drivers/staging/et131x/et1310_mac.c index 99aeb331c0e4..d42407c05457 100644 --- a/drivers/staging/et131x/et1310_mac.c +++ b/drivers/staging/et131x/et1310_mac.c @@ -247,9 +247,9 @@ void ConfigRxMacRegs(struct et131x_adapter *etdev) writel(0x8, &pRxMac->ctrl.value); /* Initialize WOL to disabled. */ - writel(0, &pRxMac->crc0.value); - writel(0, &pRxMac->crc12.value); - writel(0, &pRxMac->crc34.value); + writel(0, &pRxMac->crc0); + writel(0, &pRxMac->crc12); + writel(0, &pRxMac->crc34); /* We need to set the WOL mask0 - mask4 next. We initialize it to * its default Values of 0x00000000 because there are not WOL masks From b186f33137a124b3d10bcd7b9b35d76247b82014 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:34:57 +0000 Subject: [PATCH 210/367] Staging: et131x: kill off RXMAC_PF_CTRL_t Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_address_map.h | 32 ++++++------------- drivers/staging/et131x/et1310_mac.c | 18 +++++------ drivers/staging/et131x/et131x_netdev.c | 34 ++++++++++----------- 3 files changed, 33 insertions(+), 51 deletions(-) diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index 67aef73b3ce0..ebbbc1a7bccc 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h @@ -830,29 +830,15 @@ typedef union _RXMAC_UNI_PF_ADDR3_t { /* * structure for Packet Filter Control reg in rxmac address map * located at address 0x4084 + * + * 31-23: unused + * 22-16: min_pkt_size + * 15-4: unused + * 3: filter_frag_en + * 2: filter_uni_en + * 1: filter_multi_en + * 0: filter_broad_en */ -typedef union _RXMAC_PF_CTRL_t { - u32 value; - struct { -#ifdef _BIT_FIELDS_HTOL - u32 unused2:9; /* bits 23-31 */ - u32 min_pkt_size:7; /* bits 16-22 */ - u32 unused1:12; /* bits 4-15 */ - u32 filter_frag_en:1; /* bit 3 */ - u32 filter_uni_en:1; /* bit 2 */ - u32 filter_multi_en:1; /* bit 1 */ - u32 filter_broad_en:1; /* bit 0 */ -#else - u32 filter_broad_en:1; /* bit 0 */ - u32 filter_multi_en:1; /* bit 1 */ - u32 filter_uni_en:1; /* bit 2 */ - u32 filter_frag_en:1; /* bit 3 */ - u32 unused1:12; /* bits 4-15 */ - u32 min_pkt_size:7; /* bits 16-22 */ - u32 unused2:9; /* bits 23-31 */ -#endif - } bits; -} RXMAC_PF_CTRL_t, *PRXMAC_PF_CTRL_t; /* * structure for Memory Controller Interface Control Max Segment reg in rxmac @@ -1017,7 +1003,7 @@ typedef struct _RXMAC_t { /* Location: */ u32 multi_hash2; /* 0x4078 */ u32 multi_hash3; /* 0x407C */ u32 multi_hash4; /* 0x4080 */ - RXMAC_PF_CTRL_t pf_ctrl; /* 0x4084 */ + u32 pf_ctrl; /* 0x4084 */ RXMAC_MCIF_CTRL_MAX_SEG_t mcif_ctrl_max_seg; /* 0x4088 */ RXMAC_MCIF_WATER_MARK_t mcif_water_mark; /* 0x408C */ RXMAC_RXQ_DIAG_t rxq_diag; /* 0x4090 */ diff --git a/drivers/staging/et131x/et1310_mac.c b/drivers/staging/et131x/et1310_mac.c index d42407c05457..c1184abec916 100644 --- a/drivers/staging/et131x/et1310_mac.c +++ b/drivers/staging/et131x/et1310_mac.c @@ -241,7 +241,7 @@ void ConfigRxMacRegs(struct et131x_adapter *etdev) struct _RXMAC_t __iomem *pRxMac = &etdev->regs->rxmac; RXMAC_WOL_SA_LO_t sa_lo; RXMAC_WOL_SA_HI_t sa_hi; - RXMAC_PF_CTRL_t pf_ctrl = { 0 }; + u32 pf_ctrl = 0; /* Disable the MAC while it is being configured (also disable WOL) */ writel(0x8, &pRxMac->ctrl.value); @@ -292,12 +292,12 @@ void ConfigRxMacRegs(struct et131x_adapter *etdev) writel(sa_hi.value, &pRxMac->sa_hi.value); /* Disable all Packet Filtering */ - writel(0, &pRxMac->pf_ctrl.value); + writel(0, &pRxMac->pf_ctrl); /* Let's initialize the Unicast Packet filtering address */ if (etdev->PacketFilter & ET131X_PACKET_TYPE_DIRECTED) { SetupDeviceForUnicast(etdev); - pf_ctrl.bits.filter_uni_en = 1; + pf_ctrl |= 4; /* Unicast filter */ } else { writel(0, &pRxMac->uni_pf_addr1.value); writel(0, &pRxMac->uni_pf_addr2.value); @@ -305,16 +305,14 @@ void ConfigRxMacRegs(struct et131x_adapter *etdev) } /* Let's initialize the Multicast hash */ - if (etdev->PacketFilter & ET131X_PACKET_TYPE_ALL_MULTICAST) { - pf_ctrl.bits.filter_multi_en = 0; - } else { - pf_ctrl.bits.filter_multi_en = 1; + if (!(etdev->PacketFilter & ET131X_PACKET_TYPE_ALL_MULTICAST)) { + pf_ctrl |= 2; /* Multicast filter */ SetupDeviceForMulticast(etdev); } /* Runt packet filtering. Didn't work in version A silicon. */ - pf_ctrl.bits.min_pkt_size = NIC_MIN_PACKET_SIZE + 4; - pf_ctrl.bits.filter_frag_en = 1; + pf_ctrl |= (NIC_MIN_PACKET_SIZE + 4) << 16; + pf_ctrl |= 8; /* Fragment filter */ if (etdev->RegistryJumboPacket > 8192) { RXMAC_MCIF_CTRL_MAX_SEG_t mcif_ctrl_max_seg; @@ -370,7 +368,7 @@ void ConfigRxMacRegs(struct et131x_adapter *etdev) * dropping doesn't work, so it is disabled in the pf_ctrl register, * but we still leave the packet filter on. */ - writel(pf_ctrl.value, &pRxMac->pf_ctrl.value); + writel(pf_ctrl, &pRxMac->pf_ctrl); writel(0x9, &pRxMac->ctrl.value); } diff --git a/drivers/staging/et131x/et131x_netdev.c b/drivers/staging/et131x/et131x_netdev.c index 6d9f9be7a844..5cfebf0a2181 100644 --- a/drivers/staging/et131x/et131x_netdev.c +++ b/drivers/staging/et131x/et131x_netdev.c @@ -334,6 +334,8 @@ int et131x_ioctl(struct net_device *netdev, struct ifreq *reqbuf, int cmd) * et131x_set_packet_filter - Configures the Rx Packet filtering on the device * @adapter: pointer to our private adapter structure * + * FIXME: lot of dups with MAC code + * * Returns 0 on success, errno on failure */ int et131x_set_packet_filter(struct et131x_adapter *adapter) @@ -341,10 +343,10 @@ int et131x_set_packet_filter(struct et131x_adapter *adapter) int status = 0; uint32_t filter = adapter->PacketFilter; RXMAC_CTRL_t ctrl; - RXMAC_PF_CTRL_t pf_ctrl; + u32 pf_ctrl; ctrl.value = readl(&adapter->regs->rxmac.ctrl.value); - pf_ctrl.value = readl(&adapter->regs->rxmac.pf_ctrl.value); + pf_ctrl = readl(&adapter->regs->rxmac.pf_ctrl); /* Default to disabled packet filtering. Enable it in the individual * case statements that require the device to filter something @@ -354,45 +356,41 @@ int et131x_set_packet_filter(struct et131x_adapter *adapter) /* Set us to be in promiscuous mode so we receive everything, this * is also true when we get a packet filter of 0 */ - if ((filter & ET131X_PACKET_TYPE_PROMISCUOUS) || filter == 0) { - pf_ctrl.bits.filter_broad_en = 0; - pf_ctrl.bits.filter_multi_en = 0; - pf_ctrl.bits.filter_uni_en = 0; - } else { + if ((filter & ET131X_PACKET_TYPE_PROMISCUOUS) || filter == 0) + pf_ctrl &= ~7; /* Clear filter bits */ + else { /* * Set us up with Multicast packet filtering. Three cases are * possible - (1) we have a multi-cast list, (2) we receive ALL * multicast entries or (3) we receive none. */ - if (filter & ET131X_PACKET_TYPE_ALL_MULTICAST) { - pf_ctrl.bits.filter_multi_en = 0; - } else { + if (filter & ET131X_PACKET_TYPE_ALL_MULTICAST) + pf_ctrl &= ~2; /* Multicast filter bit */ + else { SetupDeviceForMulticast(adapter); - pf_ctrl.bits.filter_multi_en = 1; + pf_ctrl |= 2; ctrl.bits.pkt_filter_disable = 0; } /* Set us up with Unicast packet filtering */ if (filter & ET131X_PACKET_TYPE_DIRECTED) { SetupDeviceForUnicast(adapter); - pf_ctrl.bits.filter_uni_en = 1; + pf_ctrl |= 4; ctrl.bits.pkt_filter_disable = 0; } /* Set us up with Broadcast packet filtering */ if (filter & ET131X_PACKET_TYPE_BROADCAST) { - pf_ctrl.bits.filter_broad_en = 1; + pf_ctrl |= 1; /* Broadcast filter bit */ ctrl.bits.pkt_filter_disable = 0; - } else { - pf_ctrl.bits.filter_broad_en = 0; - } + } else + pf_ctrl &= ~1; /* Setup the receive mac configuration registers - Packet * Filter control + the enable / disable for packet filter * in the control reg. */ - writel(pf_ctrl.value, - &adapter->regs->rxmac.pf_ctrl.value); + writel(pf_ctrl, &adapter->regs->rxmac.pf_ctrl); writel(ctrl.value, &adapter->regs->rxmac.ctrl.value); } return status; From 287acb63a593c9872005824d6866937617624668 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:35:02 +0000 Subject: [PATCH 211/367] Staging: et131x: Kill of the MCIF types Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_address_map.h | 46 ++++++--------------- drivers/staging/et131x/et1310_mac.c | 20 ++++----- 2 files changed, 19 insertions(+), 47 deletions(-) diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index ebbbc1a7bccc..9441fe664d51 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h @@ -843,44 +843,22 @@ typedef union _RXMAC_UNI_PF_ADDR3_t { /* * structure for Memory Controller Interface Control Max Segment reg in rxmac * address map. Located at address 0x4088 + * + * 31-10: reserved + * 9-2: max_size + * 1: fc_en + * 0: seg_en */ -typedef union _RXMAC_MCIF_CTRL_MAX_SEG_t { - u32 value; - struct { -#ifdef _BIT_FIELDS_HTOL - u32 reserved:22; /* bits 10-31 */ - u32 max_size:8; /* bits 2-9 */ - u32 fc_en:1; /* bit 1 */ - u32 seg_en:1; /* bit 0 */ -#else - u32 seg_en:1; /* bit 0 */ - u32 fc_en:1; /* bit 1 */ - u32 max_size:8; /* bits 2-9 */ - u32 reserved:22; /* bits 10-31 */ -#endif - } bits; -} RXMAC_MCIF_CTRL_MAX_SEG_t, *PRXMAC_MCIF_CTRL_MAX_SEG_t; /* * structure for Memory Controller Interface Water Mark reg in rxmac address * map. Located at address 0x408C + * + * 31-26: unused + * 25-16: mark_hi + * 15-10: unused + * 9-0: mark_lo */ -typedef union _RXMAC_MCIF_WATER_MARK_t { - u32 value; - struct { -#ifdef _BIT_FIELDS_HTOL - u32 reserved2:6; /* bits 26-31 */ - u32 mark_hi:10; /* bits 16-25 */ - u32 reserved1:6; /* bits 10-15 */ - u32 mark_lo:10; /* bits 0-9 */ -#else - u32 mark_lo:10; /* bits 0-9 */ - u32 reserved1:6; /* bits 10-15 */ - u32 mark_hi:10; /* bits 16-25 */ - u32 reserved2:6; /* bits 26-31 */ -#endif - } bits; -} RXMAC_MCIF_WATER_MARK_t, *PRXMAC_MCIF_WATER_MARK_t; /* * structure for Rx Queue Dialog reg in rxmac address map. @@ -1004,8 +982,8 @@ typedef struct _RXMAC_t { /* Location: */ u32 multi_hash3; /* 0x407C */ u32 multi_hash4; /* 0x4080 */ u32 pf_ctrl; /* 0x4084 */ - RXMAC_MCIF_CTRL_MAX_SEG_t mcif_ctrl_max_seg; /* 0x4088 */ - RXMAC_MCIF_WATER_MARK_t mcif_water_mark; /* 0x408C */ + u32 mcif_ctrl_max_seg; /* 0x4088 */ + u32 mcif_water_mark; /* 0x408C */ RXMAC_RXQ_DIAG_t rxq_diag; /* 0x4090 */ RXMAC_SPACE_AVAIL_t space_avail; /* 0x4094 */ diff --git a/drivers/staging/et131x/et1310_mac.c b/drivers/staging/et131x/et1310_mac.c index c1184abec916..8302098976ef 100644 --- a/drivers/staging/et131x/et1310_mac.c +++ b/drivers/staging/et131x/et1310_mac.c @@ -314,9 +314,7 @@ void ConfigRxMacRegs(struct et131x_adapter *etdev) pf_ctrl |= (NIC_MIN_PACKET_SIZE + 4) << 16; pf_ctrl |= 8; /* Fragment filter */ - if (etdev->RegistryJumboPacket > 8192) { - RXMAC_MCIF_CTRL_MAX_SEG_t mcif_ctrl_max_seg; - + if (etdev->RegistryJumboPacket > 8192) /* In order to transmit jumbo packets greater than 8k, the * FIFO between RxMAC and RxDMA needs to be reduced in size * to (16k - Jumbo packet size). In order to implement this, @@ -324,19 +322,15 @@ void ConfigRxMacRegs(struct et131x_adapter *etdev) * packets down into segments which are (max_size * 16). In * this case we selected 256 bytes, since this is the size of * the PCI-Express TLP's that the 1310 uses. + * + * seg_en on, fc_en off, size 0x10 */ - mcif_ctrl_max_seg.bits.seg_en = 0x1; - mcif_ctrl_max_seg.bits.fc_en = 0x0; - mcif_ctrl_max_seg.bits.max_size = 0x10; - - writel(mcif_ctrl_max_seg.value, - &pRxMac->mcif_ctrl_max_seg.value); - } else { - writel(0, &pRxMac->mcif_ctrl_max_seg.value); - } + writel(0x41, &pRxMac->mcif_ctrl_max_seg); + else + writel(0, &pRxMac->mcif_ctrl_max_seg); /* Initialize the MCIF water marks */ - writel(0, &pRxMac->mcif_water_mark.value); + writel(0, &pRxMac->mcif_water_mark); /* Initialize the MIF control */ writel(0, &pRxMac->mif_ctrl.value); From f7ae1957cac1388e7bbe070b13a5f5f5a98107d2 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:35:08 +0000 Subject: [PATCH 212/367] Staging: et131x: Kill off the rxq_diag types Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_address_map.h | 23 ++++++--------------- drivers/staging/et131x/et131x_isr.c | 2 +- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index 9441fe664d51..f8a918928183 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h @@ -863,23 +863,12 @@ typedef union _RXMAC_UNI_PF_ADDR3_t { /* * structure for Rx Queue Dialog reg in rxmac address map. * located at address 0x4090 + * + * 31-26: reserved + * 25-16: rd_ptr + * 15-10: reserved + * 9-0: wr_ptr */ -typedef union _RXMAC_RXQ_DIAG_t { - u32 value; - struct { -#ifdef _BIT_FIELDS_HTOL - u32 reserved2:6; /* bits 26-31 */ - u32 rd_ptr:10; /* bits 16-25 */ - u32 reserved1:6; /* bits 10-15 */ - u32 wr_ptr:10; /* bits 0-9 */ -#else - u32 wr_ptr:10; /* bits 0-9 */ - u32 reserved1:6; /* bits 10-15 */ - u32 rd_ptr:10; /* bits 16-25 */ - u32 reserved2:6; /* bits 26-31 */ -#endif - } bits; -} RXMAC_RXQ_DIAG_t, *PRXMAC_RXQ_DIAG_t; /* * structure for space availiable reg in rxmac address map. @@ -984,7 +973,7 @@ typedef struct _RXMAC_t { /* Location: */ u32 pf_ctrl; /* 0x4084 */ u32 mcif_ctrl_max_seg; /* 0x4088 */ u32 mcif_water_mark; /* 0x408C */ - RXMAC_RXQ_DIAG_t rxq_diag; /* 0x4090 */ + u32 rxq_diag; /* 0x4090 */ RXMAC_SPACE_AVAIL_t space_avail; /* 0x4094 */ RXMAC_MIF_CTL_t mif_ctrl; /* 0x4098 */ diff --git a/drivers/staging/et131x/et131x_isr.c b/drivers/staging/et131x/et131x_isr.c index aa36e40ec248..5ff8665e687b 100644 --- a/drivers/staging/et131x/et131x_isr.c +++ b/drivers/staging/et131x/et131x_isr.c @@ -446,7 +446,7 @@ void et131x_isr_handler(struct work_struct *work) dev_warn(&etdev->pdev->dev, "Enable 0x%08x, Diag 0x%08x\n", readl(&iomem->rxmac.ctrl.value), - readl(&iomem->rxmac.rxq_diag.value)); + readl(&iomem->rxmac.rxq_diag)); /* * If we are debugging, we want to see this error, From 370d52acf7f2a8f4fccbf9fa49defd6e364ae1f3 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:35:13 +0000 Subject: [PATCH 213/367] Staging: et131x: Kill the SPACE_AVAIL type Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_address_map.h | 23 ++++++--------------- drivers/staging/et131x/et1310_mac.c | 2 +- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index f8a918928183..f434b8660356 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h @@ -873,23 +873,12 @@ typedef union _RXMAC_UNI_PF_ADDR3_t { /* * structure for space availiable reg in rxmac address map. * located at address 0x4094 + * + * 31-17: reserved + * 16: space_avail_en + * 15-10: reserved + * 9-0: space_avail */ -typedef union _RXMAC_SPACE_AVAIL_t { - u32 value; - struct { -#ifdef _BIT_FIELDS_HTOL - u32 reserved2:15; /* bits 17-31 */ - u32 space_avail_en:1; /* bit 16 */ - u32 reserved1:6; /* bits 10-15 */ - u32 space_avail:10; /* bits 0-9 */ -#else - u32 space_avail:10; /* bits 0-9 */ - u32 reserved1:6; /* bits 10-15 */ - u32 space_avail_en:1; /* bit 16 */ - u32 reserved2:15; /* bits 17-31 */ -#endif - } bits; -} RXMAC_SPACE_AVAIL_t, *PRXMAC_SPACE_AVAIL_t; /* * structure for management interface reg in rxmac address map. @@ -974,7 +963,7 @@ typedef struct _RXMAC_t { /* Location: */ u32 mcif_ctrl_max_seg; /* 0x4088 */ u32 mcif_water_mark; /* 0x408C */ u32 rxq_diag; /* 0x4090 */ - RXMAC_SPACE_AVAIL_t space_avail; /* 0x4094 */ + u32 space_avail; /* 0x4094 */ RXMAC_MIF_CTL_t mif_ctrl; /* 0x4098 */ RXMAC_ERROR_REG_t err_reg; /* 0x409C */ diff --git a/drivers/staging/et131x/et1310_mac.c b/drivers/staging/et131x/et1310_mac.c index 8302098976ef..1b4c0e6d6765 100644 --- a/drivers/staging/et131x/et1310_mac.c +++ b/drivers/staging/et131x/et1310_mac.c @@ -336,7 +336,7 @@ void ConfigRxMacRegs(struct et131x_adapter *etdev) writel(0, &pRxMac->mif_ctrl.value); /* Initialize the Space Available Register */ - writel(0, &pRxMac->space_avail.value); + writel(0, &pRxMac->space_avail); /* Initialize the the mif_ctrl register * bit 3: Receive code error. One or more nibbles were signaled as From dcb0789bb344b76fdeb32876f1e498a5cd19ecc1 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:35:19 +0000 Subject: [PATCH 214/367] Staging: et131x: Kill MIF_CTL_t Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_address_map.h | 20 +++++--------------- drivers/staging/et131x/et1310_mac.c | 6 +++--- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index f434b8660356..e57109345d16 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h @@ -883,21 +883,11 @@ typedef union _RXMAC_UNI_PF_ADDR3_t { /* * structure for management interface reg in rxmac address map. * located at address 0x4098 + * + * 31-18: reserved + * 17: drop_pkt_en + * 16-0: drop_pkt_mask */ -typedef union _RXMAC_MIF_CTL_t { - u32 value; - struct { -#ifdef _BIT_FIELDS_HTOL - u32 reserve:14; /* bits 18-31 */ - u32 drop_pkt_en:1; /* bit 17 */ - u32 drop_pkt_mask:17; /* bits 0-16 */ -#else - u32 drop_pkt_mask:17; /* bits 0-16 */ - u32 drop_pkt_en:1; /* bit 17 */ - u32 reserve:14; /* bits 18-31 */ -#endif - } bits; -} RXMAC_MIF_CTL_t, *PRXMAC_MIF_CTL_t; /* * structure for Error reg in rxmac address map. @@ -965,7 +955,7 @@ typedef struct _RXMAC_t { /* Location: */ u32 rxq_diag; /* 0x4090 */ u32 space_avail; /* 0x4094 */ - RXMAC_MIF_CTL_t mif_ctrl; /* 0x4098 */ + u32 mif_ctrl; /* 0x4098 */ RXMAC_ERROR_REG_t err_reg; /* 0x409C */ } RXMAC_t, *PRXMAC_t; diff --git a/drivers/staging/et131x/et1310_mac.c b/drivers/staging/et131x/et1310_mac.c index 1b4c0e6d6765..a9f924dd6b0e 100644 --- a/drivers/staging/et131x/et1310_mac.c +++ b/drivers/staging/et131x/et1310_mac.c @@ -333,7 +333,7 @@ void ConfigRxMacRegs(struct et131x_adapter *etdev) writel(0, &pRxMac->mcif_water_mark); /* Initialize the MIF control */ - writel(0, &pRxMac->mif_ctrl.value); + writel(0, &pRxMac->mif_ctrl); /* Initialize the Space Available Register */ writel(0, &pRxMac->space_avail); @@ -352,9 +352,9 @@ void ConfigRxMacRegs(struct et131x_adapter *etdev) * bit 17: Drop packet enable */ if (etdev->linkspeed == TRUEPHY_SPEED_100MBPS) - writel(0x30038, &pRxMac->mif_ctrl.value); + writel(0x30038, &pRxMac->mif_ctrl); else - writel(0x30030, &pRxMac->mif_ctrl.value); + writel(0x30030, &pRxMac->mif_ctrl); /* Finally we initialize RxMac to be enabled & WOL disabled. Packet * filter is always enabled since it is where the runt packets are From fef5ba3ae9760fdc2688b7160fa056e7ef2700bb Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:35:24 +0000 Subject: [PATCH 215/367] Staging: et131x: kill the rxmac ERROR_REG_t Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_address_map.h | 26 ++++++--------------- drivers/staging/et131x/et131x_isr.c | 2 +- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index e57109345d16..5f6a7b549677 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h @@ -892,25 +892,13 @@ typedef union _RXMAC_UNI_PF_ADDR3_t { /* * structure for Error reg in rxmac address map. * located at address 0x409C + * + * 31-4: unused + * 3: mif + * 2: async + * 1: pkt_filter + * 0: mcif */ -typedef union _RXMAC_ERROR_REG_t { - u32 value; - struct { -#ifdef _BIT_FIELDS_HTOL - u32 reserve:28; /* bits 4-31 */ - u32 mif:1; /* bit 3 */ - u32 async:1; /* bit 2 */ - u32 pkt_filter:1; /* bit 1 */ - u32 mcif:1; /* bit 0 */ -#else - u32 mcif:1; /* bit 0 */ - u32 pkt_filter:1; /* bit 1 */ - u32 async:1; /* bit 2 */ - u32 mif:1; /* bit 3 */ - u32 reserve:28; /* bits 4-31 */ -#endif - } bits; -} RXMAC_ERROR_REG_t, *PRXMAC_ERROR_REG_t; /* * Rx MAC Module of JAGCore Address Mapping @@ -956,7 +944,7 @@ typedef struct _RXMAC_t { /* Location: */ u32 space_avail; /* 0x4094 */ u32 mif_ctrl; /* 0x4098 */ - RXMAC_ERROR_REG_t err_reg; /* 0x409C */ + u32 err_reg; /* 0x409C */ } RXMAC_t, *PRXMAC_t; /* END OF RXMAC REGISTER ADDRESS MAP */ diff --git a/drivers/staging/et131x/et131x_isr.c b/drivers/staging/et131x/et131x_isr.c index 5ff8665e687b..87c8de636711 100644 --- a/drivers/staging/et131x/et131x_isr.c +++ b/drivers/staging/et131x/et131x_isr.c @@ -441,7 +441,7 @@ void et131x_isr_handler(struct work_struct *work) dev_warn(&etdev->pdev->dev, "RXMAC interrupt, error 0x%08x. Requesting reset\n", - readl(&iomem->rxmac.err_reg.value)); + readl(&iomem->rxmac.err_reg)); dev_warn(&etdev->pdev->dev, "Enable 0x%08x, Diag 0x%08x\n", From bd03d0d5bc253533a6d169a82f56626d552d9471 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:35:30 +0000 Subject: [PATCH 216/367] Staging: et131x: kill off the rxmac ctrl type Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_address_map.h | 35 ++++++--------------- drivers/staging/et131x/et1310_mac.c | 4 +-- drivers/staging/et131x/et131x_isr.c | 2 +- drivers/staging/et131x/et131x_netdev.c | 14 ++++----- 4 files changed, 20 insertions(+), 35 deletions(-) diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index 5f6a7b549677..1e0ffcd17886 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h @@ -655,31 +655,16 @@ struct txmac_regs { /* Location: */ /* * structure for rxmac control reg in rxmac address map * located at address 0x4000 + * + * 31-7: reserved + * 6: rxmac_int_disable + * 5: async_disable + * 4: mif_disable + * 3: wol_disable + * 2: pkt_filter_disable + * 1: mcif_disable + * 0: rxmac_en */ -typedef union _RXMAC_CTRL_t { - u32 value; - struct { -#ifdef _BIT_FIELDS_HTOL - u32 reserved:25; /* bits 7-31 */ - u32 rxmac_int_disable:1; /* bit 6 */ - u32 async_disable:1; /* bit 5 */ - u32 mif_disable:1; /* bit 4 */ - u32 wol_disable:1; /* bit 3 */ - u32 pkt_filter_disable:1; /* bit 2 */ - u32 mcif_disable:1; /* bit 1 */ - u32 rxmac_en:1; /* bit 0 */ -#else - u32 rxmac_en:1; /* bit 0 */ - u32 mcif_disable:1; /* bit 1 */ - u32 pkt_filter_disable:1; /* bit 2 */ - u32 wol_disable:1; /* bit 3 */ - u32 mif_disable:1; /* bit 4 */ - u32 async_disable:1; /* bit 5 */ - u32 rxmac_int_disable:1; /* bit 6 */ - u32 reserved:25; /* bits 7-31 */ -#endif - } bits; -} RXMAC_CTRL_t, *PRXMAC_CTRL_t; /* * structure for Wake On Lan Control and CRC 0 reg in rxmac address map @@ -904,7 +889,7 @@ typedef union _RXMAC_UNI_PF_ADDR3_t { * Rx MAC Module of JAGCore Address Mapping */ typedef struct _RXMAC_t { /* Location: */ - RXMAC_CTRL_t ctrl; /* 0x4000 */ + u32 ctrl; /* 0x4000 */ u32 crc0; /* 0x4004 */ u32 crc12; /* 0x4008 */ u32 crc34; /* 0x400C */ diff --git a/drivers/staging/et131x/et1310_mac.c b/drivers/staging/et131x/et1310_mac.c index a9f924dd6b0e..a292b1edc414 100644 --- a/drivers/staging/et131x/et1310_mac.c +++ b/drivers/staging/et131x/et1310_mac.c @@ -244,7 +244,7 @@ void ConfigRxMacRegs(struct et131x_adapter *etdev) u32 pf_ctrl = 0; /* Disable the MAC while it is being configured (also disable WOL) */ - writel(0x8, &pRxMac->ctrl.value); + writel(0x8, &pRxMac->ctrl); /* Initialize WOL to disabled. */ writel(0, &pRxMac->crc0); @@ -363,7 +363,7 @@ void ConfigRxMacRegs(struct et131x_adapter *etdev) * but we still leave the packet filter on. */ writel(pf_ctrl, &pRxMac->pf_ctrl); - writel(0x9, &pRxMac->ctrl.value); + writel(0x9, &pRxMac->ctrl); } void ConfigTxMacRegs(struct et131x_adapter *etdev) diff --git a/drivers/staging/et131x/et131x_isr.c b/drivers/staging/et131x/et131x_isr.c index 87c8de636711..8b6e0b7ec568 100644 --- a/drivers/staging/et131x/et131x_isr.c +++ b/drivers/staging/et131x/et131x_isr.c @@ -445,7 +445,7 @@ void et131x_isr_handler(struct work_struct *work) dev_warn(&etdev->pdev->dev, "Enable 0x%08x, Diag 0x%08x\n", - readl(&iomem->rxmac.ctrl.value), + readl(&iomem->rxmac.ctrl), readl(&iomem->rxmac.rxq_diag)); /* diff --git a/drivers/staging/et131x/et131x_netdev.c b/drivers/staging/et131x/et131x_netdev.c index 5cfebf0a2181..226641acd954 100644 --- a/drivers/staging/et131x/et131x_netdev.c +++ b/drivers/staging/et131x/et131x_netdev.c @@ -342,16 +342,16 @@ int et131x_set_packet_filter(struct et131x_adapter *adapter) { int status = 0; uint32_t filter = adapter->PacketFilter; - RXMAC_CTRL_t ctrl; + u32 ctrl; u32 pf_ctrl; - ctrl.value = readl(&adapter->regs->rxmac.ctrl.value); + ctrl = readl(&adapter->regs->rxmac.ctrl); pf_ctrl = readl(&adapter->regs->rxmac.pf_ctrl); /* Default to disabled packet filtering. Enable it in the individual * case statements that require the device to filter something */ - ctrl.bits.pkt_filter_disable = 1; + ctrl |= 0x04; /* Set us to be in promiscuous mode so we receive everything, this * is also true when we get a packet filter of 0 @@ -369,20 +369,20 @@ int et131x_set_packet_filter(struct et131x_adapter *adapter) else { SetupDeviceForMulticast(adapter); pf_ctrl |= 2; - ctrl.bits.pkt_filter_disable = 0; + ctrl &= ~0x04; } /* Set us up with Unicast packet filtering */ if (filter & ET131X_PACKET_TYPE_DIRECTED) { SetupDeviceForUnicast(adapter); pf_ctrl |= 4; - ctrl.bits.pkt_filter_disable = 0; + ctrl &= ~0x04; } /* Set us up with Broadcast packet filtering */ if (filter & ET131X_PACKET_TYPE_BROADCAST) { pf_ctrl |= 1; /* Broadcast filter bit */ - ctrl.bits.pkt_filter_disable = 0; + ctrl &= ~0x04; } else pf_ctrl &= ~1; @@ -391,7 +391,7 @@ int et131x_set_packet_filter(struct et131x_adapter *adapter) * in the control reg. */ writel(pf_ctrl, &adapter->regs->rxmac.pf_ctrl); - writel(ctrl.value, &adapter->regs->rxmac.ctrl.value); + writel(ctrl, &adapter->regs->rxmac.ctrl); } return status; } From 22e0967f72494564e416b157568ed5876666ad26 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 18 Jan 2010 15:35:35 +0000 Subject: [PATCH 217/367] Staging: et131x_kill MAC_STAT_t Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_address_map.h | 44 ++++++--------------- 1 file changed, 13 insertions(+), 31 deletions(-) diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index 1e0ffcd17886..ea746ba41faf 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h @@ -1106,37 +1106,19 @@ typedef struct _RXMAC_t { /* Location: */ /* * structure for Interface Status reg in mac address map. * located at address 0x503C + * + * 31-10: reserved + * 9: excess_defer + * 8: clash + * 7: phy_jabber + * 6: phy_link_ok + * 5: phy_full_duplex + * 4: phy_speed + * 3: pe100x_link_fail + * 2: pe10t_loss_carrier + * 1: pe10t_sqe_error + * 0: pe10t_jabber */ -typedef union _MAC_IF_STAT_t { - u32 value; - struct { -#ifdef _BIT_FIELDS_HTOL - u32 reserved:22; /* bits 10-31 */ - u32 excess_defer:1; /* bit 9 */ - u32 clash:1; /* bit 8 */ - u32 phy_jabber:1; /* bit 7 */ - u32 phy_link_ok:1; /* bit 6 */ - u32 phy_full_duplex:1; /* bit 5 */ - u32 phy_speed:1; /* bit 4 */ - u32 pe100x_link_fail:1; /* bit 3 */ - u32 pe10t_loss_carrie:1; /* bit 2 */ - u32 pe10t_sqe_error:1; /* bit 1 */ - u32 pe10t_jabber:1; /* bit 0 */ -#else - u32 pe10t_jabber:1; /* bit 0 */ - u32 pe10t_sqe_error:1; /* bit 1 */ - u32 pe10t_loss_carrie:1; /* bit 2 */ - u32 pe100x_link_fail:1; /* bit 3 */ - u32 phy_speed:1; /* bit 4 */ - u32 phy_full_duplex:1; /* bit 5 */ - u32 phy_link_ok:1; /* bit 6 */ - u32 phy_jabber:1; /* bit 7 */ - u32 clash:1; /* bit 8 */ - u32 excess_defer:1; /* bit 9 */ - u32 reserved:22; /* bits 10-31 */ -#endif - } bits; -} MAC_IF_STAT_t, *PMAC_IF_STAT_t; /* * structure for Mac Station Address, Part 1 reg in mac address map. @@ -1197,7 +1179,7 @@ typedef struct _MAC_t { /* Location: */ u32 mii_mgmt_stat; /* 0x5030 */ u32 mii_mgmt_indicator; /* 0x5034 */ u32 if_ctrl; /* 0x5038 */ - MAC_IF_STAT_t if_stat; /* 0x503C */ + u32 if_stat; /* 0x503C */ MAC_STATION_ADDR1_t station_addr_1; /* 0x5040 */ MAC_STATION_ADDR2_t station_addr_2; /* 0x5044 */ } MAC_t, *PMAC_t; From 1e5065dbd6fe53b46d8281db7b4286751dcf607a Mon Sep 17 00:00:00 2001 From: Himanshu Chauhan Date: Sat, 23 Jan 2010 01:51:57 +0530 Subject: [PATCH 218/367] Staging: usbip: minor code cleanup Signed-off-by: Himanshu Chauhan Signed-off-by: Greg Kroah-Hartman --- drivers/staging/usbip/usbip_common.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/usbip/usbip_common.c b/drivers/staging/usbip/usbip_common.c index ddb6f5fd04d5..57c0ff5ab9a5 100644 --- a/drivers/staging/usbip/usbip_common.c +++ b/drivers/staging/usbip/usbip_common.c @@ -55,10 +55,7 @@ static ssize_t show_flag(struct device *dev, struct device_attribute *attr, static ssize_t store_flag(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { - unsigned long flag; - - sscanf(buf, "%lx", &flag); - usbip_debug_flag = flag; + sscanf(buf, "%lx", &usbip_debug_flag); return count; } From aad86577b829be29048e0a692e1c28c3ffeda6ca Mon Sep 17 00:00:00 2001 From: Himanshu Chauhan Date: Sat, 23 Jan 2010 02:52:41 +0530 Subject: [PATCH 219/367] Staging: usbip: use print_hex_dump() instead of open coding it. Signed-off-by: Himanshu Chauhan Signed-off-by: Greg Kroah-Hartman --- drivers/staging/usbip/usbip_common.c | 29 ++-------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/drivers/staging/usbip/usbip_common.c b/drivers/staging/usbip/usbip_common.c index 57c0ff5ab9a5..3367a5217694 100644 --- a/drivers/staging/usbip/usbip_common.c +++ b/drivers/staging/usbip/usbip_common.c @@ -63,33 +63,8 @@ DEVICE_ATTR(usbip_debug, (S_IRUGO | S_IWUSR), show_flag, store_flag); static void usbip_dump_buffer(char *buff, int bufflen) { - int i; - - if (bufflen > 128) { - for (i = 0; i < 128; i++) { - if (i%24 == 0) - printk(KERN_DEBUG " "); - printk(KERN_DEBUG "%02x ", (unsigned char) buff[i]); - if (i%4 == 3) - printk(KERN_DEBUG "| "); - if (i%24 == 23) - printk(KERN_DEBUG "\n"); - } - printk(KERN_DEBUG "... (%d byte)\n", bufflen); - return; - } - - for (i = 0; i < bufflen; i++) { - if (i%24 == 0) - printk(KERN_DEBUG " "); - printk(KERN_DEBUG "%02x ", (unsigned char) buff[i]); - if (i%4 == 3) - printk(KERN_DEBUG "| "); - if (i%24 == 23) - printk(KERN_DEBUG "\n"); - } - printk(KERN_DEBUG "\n"); - + print_hex_dump(KERN_DEBUG, "usb-ip", DUMP_PREFIX_OFFSET, 16, 4, + buff, bufflen, false); } static void usbip_dump_pipe(unsigned int p) From a439f5bff51d3e0c93d61ee6886b9dbf29a03da9 Mon Sep 17 00:00:00 2001 From: Himanshu Chauhan Date: Sat, 23 Jan 2010 10:36:56 +0530 Subject: [PATCH 220/367] Staging: usbip: Remove dead code This patch removes the dead uncompiled code in usbip_common.c Signed-off-by: Himanshu Chauhan Signed-off-by: Greg Kroah-Hartman --- drivers/staging/usbip/usbip_common.c | 54 ---------------------------- 1 file changed, 54 deletions(-) diff --git a/drivers/staging/usbip/usbip_common.c b/drivers/staging/usbip/usbip_common.c index 3367a5217694..d8197028f20a 100644 --- a/drivers/staging/usbip/usbip_common.c +++ b/drivers/staging/usbip/usbip_common.c @@ -530,60 +530,6 @@ err: } EXPORT_SYMBOL_GPL(usbip_xmit); - -/* now a usrland utility should set options. */ -#if 0 -int setquickack(struct socket *socket) -{ - mm_segment_t oldfs; - int val = 1; - int ret; - - oldfs = get_fs(); - set_fs(get_ds()); - ret = socket->ops->setsockopt(socket, SOL_TCP, TCP_QUICKACK, - (char __user *) &val, sizeof(ret)); - set_fs(oldfs); - - return ret; -} - -int setnodelay(struct socket *socket) -{ - mm_segment_t oldfs; - int val = 1; - int ret; - - oldfs = get_fs(); - set_fs(get_ds()); - ret = socket->ops->setsockopt(socket, SOL_TCP, TCP_NODELAY, - (char __user *) &val, sizeof(ret)); - set_fs(oldfs); - - return ret; -} - -int setkeepalive(struct socket *socket) -{ - mm_segment_t oldfs; - int val = 1; - int ret; - - oldfs = get_fs(); - set_fs(get_ds()); - ret = socket->ops->setsockopt(socket, SOL_SOCKET, SO_KEEPALIVE, - (char __user *) &val, sizeof(ret)); - set_fs(oldfs); - - return ret; -} - -void setreuse(struct socket *socket) -{ - socket->sk->sk_reuse = 1; -} -#endif - struct socket *sockfd_to_socket(unsigned int sockfd) { struct socket *socket; From 411a861fc4f92cf0f5039928b448dcc7ca31d423 Mon Sep 17 00:00:00 2001 From: Himanshu Date: Sat, 23 Jan 2010 17:52:02 +0530 Subject: [PATCH 221/367] Staging: usbip: Seperate usbip config debug from CONFIG_USB_DEBUG Signed-off-by: Himanshu Signed-off-by: Greg Kroah-Hartman --- drivers/staging/usbip/Kconfig | 7 +++++++ drivers/staging/usbip/Makefile | 2 +- drivers/staging/usbip/usbip_common.c | 2 +- drivers/staging/usbip/usbip_common.h | 8 ++++---- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/staging/usbip/Kconfig b/drivers/staging/usbip/Kconfig index 350d5d65ccf3..2c1d10acb8b5 100644 --- a/drivers/staging/usbip/Kconfig +++ b/drivers/staging/usbip/Kconfig @@ -34,3 +34,10 @@ config USB_IP_HOST To compile this driver as a module, choose M here: the module will be called usbip. + +config USB_IP_DEBUG_ENABLE + bool "USB-IP Debug Enable" + depends on USB_IP_COMMON + default N + ---help--- + This enables the debug messages from the USB-IP drivers. diff --git a/drivers/staging/usbip/Makefile b/drivers/staging/usbip/Makefile index 179f4211f96b..6f2916b1807a 100644 --- a/drivers/staging/usbip/Makefile +++ b/drivers/staging/usbip/Makefile @@ -7,6 +7,6 @@ vhci-hcd-objs := vhci_sysfs.o vhci_tx.o vhci_rx.o vhci_hcd.o obj-$(CONFIG_USB_IP_HOST) += usbip.o usbip-objs := stub_dev.o stub_main.o stub_rx.o stub_tx.o -ifeq ($(CONFIG_USB_DEBUG),y) +ifeq ($(CONFIG_USB_IP_DEBUG_ENABLE),y) EXTRA_CFLAGS += -DDEBUG endif diff --git a/drivers/staging/usbip/usbip_common.c b/drivers/staging/usbip/usbip_common.c index d8197028f20a..7a45da8f9565 100644 --- a/drivers/staging/usbip/usbip_common.c +++ b/drivers/staging/usbip/usbip_common.c @@ -33,7 +33,7 @@ /*-------------------------------------------------------------------------*/ /* debug routines */ -#ifdef CONFIG_USB_DEBUG +#ifdef CONFIG_USB_IP_DEBUG_ENABLE unsigned long usbip_debug_flag = 0xffffffff; #else unsigned long usbip_debug_flag; diff --git a/drivers/staging/usbip/usbip_common.h b/drivers/staging/usbip/usbip_common.h index 1ca3eab8af18..6f1dcb197d13 100644 --- a/drivers/staging/usbip/usbip_common.h +++ b/drivers/staging/usbip/usbip_common.h @@ -33,12 +33,12 @@ */ /** - * usbip_udbg - print debug messages if CONFIG_USB_DEBUG is defined + * usbip_udbg - print debug messages if CONFIG_USB_IP_DEBUG_ENABLE is defined * @fmt: * @args: */ -#ifdef CONFIG_USB_DEBUG +#ifdef CONFIG_USB_IP_DEBUG_ENABLE #define usbip_udbg(fmt, args...) \ do { \ @@ -47,11 +47,11 @@ __FILE__, __LINE__, __func__, ##args); \ } while (0) -#else /* CONFIG_USB_DEBUG */ +#else /* CONFIG_USB_IP_DEBUG_ENABLE */ #define usbip_udbg(fmt, args...) do { } while (0) -#endif /* CONFIG_USB_DEBUG */ +#endif /* CONFIG_USB_IP_DEBUG_ENABLE */ enum { From e501b36bdf85212d537b30babf60dfedf3fdcebd Mon Sep 17 00:00:00 2001 From: d binderman Date: Tue, 26 Jan 2010 10:00:25 +0000 Subject: [PATCH 222/367] Staging: otus: fix memory leak Fix memory leak in drivers/staging/otus Signed-off-by: David Binderman --- drivers/staging/otus/ioctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/otus/ioctl.c b/drivers/staging/otus/ioctl.c index ebaedb7b1688..8c47b1a68627 100644 --- a/drivers/staging/otus/ioctl.c +++ b/drivers/staging/otus/ioctl.c @@ -866,15 +866,15 @@ int usbdrvwext_giwscan(struct net_device *dev, char *current_ev = extra; char *end_buf; int i; - /* struct zsBssList BssList; */ - struct zsBssListV1 *pBssList = kmalloc(sizeof(struct zsBssListV1), - GFP_KERNEL); /* BssList = wd->sta.pBssList; */ /* zmw_get_wlan_dev(dev); */ if (macp->DeviceOpened != 1) return 0; + /* struct zsBssList BssList; */ + struct zsBssListV1 *pBssList = kmalloc(sizeof(struct zsBssListV1), + GFP_KERNEL); if (data->length == 0) end_buf = extra + IW_SCAN_MAX_DATA; else From 1994130e4f881696aad562429fbbafeb73418e5a Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Mon, 25 Jan 2010 13:11:49 -0600 Subject: [PATCH 223/367] Staging: r8187se: Fix a faulty if and do additional cleanups Cleanup the driver and fix a faulty if statement. Signed-off-by: Larry Finger Tested by: Bernhard Schiffner Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8187se/r8180_core.c | 299 ++++++++++--------------- 1 file changed, 119 insertions(+), 180 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index 1fb9e1141df8..9c2f4d3b58c7 100644 --- a/drivers/staging/rtl8187se/r8180_core.c +++ b/drivers/staging/rtl8187se/r8180_core.c @@ -41,13 +41,6 @@ #include "ieee80211/dot11d.h" -#ifndef PCI_VENDOR_ID_BELKIN - #define PCI_VENDOR_ID_BELKIN 0x1799 -#endif -#ifndef PCI_VENDOR_ID_DLINK - #define PCI_VENDOR_ID_DLINK 0x1186 -#endif - static struct pci_device_id rtl8180_pci_id_tbl[] __devinitdata = { { .vendor = PCI_VENDOR_ID_REALTEK, @@ -1421,11 +1414,9 @@ u16 N_DBPSOfRate(u16 DataRate) return N_DBPS; } -//{by amy 080312 // // Description: // For Netgear case, they want good-looking singal strength. -// 2004.12.05, by rcnjko. // long NetgearSignalStrengthTranslate(long LastSS, long CurrSS) { @@ -1481,7 +1472,6 @@ long TranslateToDbm8185(u8 SignalStrengthIndex) // This is different with PerformSignalSmoothing8185 in smoothing fomula. // No dramatic adjustion is apply because dynamic mechanism need some degree // of correctness. Ported from 8187B. -// 2007-02-26, by Bruce. // void PerformUndecoratedSignalSmoothing8185(struct r8180_priv *priv, bool bCckRate) @@ -1502,7 +1492,6 @@ void PerformUndecoratedSignalSmoothing8185(struct r8180_priv *priv, priv->CurCCKRSSI = 0; } -//by amy 080312} /* This is rough RX isr handling routine*/ void rtl8180_rx(struct net_device *dev) @@ -1638,7 +1627,7 @@ void rtl8180_rx(struct net_device *dev) } signal=(unsigned char)(((*(priv->rxringtail+3))& (0x00ff0000))>>16); - signal=(signal&0xfe)>>1; // Modify by hikaru 6.6 + signal = (signal & 0xfe) >> 1; quality=(unsigned char)((*(priv->rxringtail+3)) & (0xff)); @@ -1652,7 +1641,6 @@ void rtl8180_rx(struct net_device *dev) stats.rate = rtl8180_rate2rate(rate); Antenna = (((*(priv->rxringtail +3))& (0x00008000)) == 0 )? 0:1 ; -//by amy for antenna if(!rtl8180_IsWirelessBMode(stats.rate)) { // OFDM rate. @@ -1691,11 +1679,10 @@ void rtl8180_rx(struct net_device *dev) RXAGC=(95-RXAGC)*100/65; } priv->SignalStrength = (u8)RXAGC; - priv->RecvSignalPower = RxAGC_dBm ; // It can use directly by SD3 CMLin + priv->RecvSignalPower = RxAGC_dBm; priv->RxPower = rxpower; priv->RSSI = RSSI; -//{by amy 080312 - // SQ translation formular is provided by SD3 DZ. 2006.06.27, by rcnjko. + /* SQ translation formula is provided by SD3 DZ. 2006.06.27 */ if(quality >= 127) quality = 1;//0; //0 will cause epc to show signal zero , walk aroud now; else if(quality < 27) @@ -1712,7 +1699,6 @@ void rtl8180_rx(struct net_device *dev) // printk("==========================>rx : RXAGC is %d,signalstrength is %d\n",RXAGC,stats.signalstrength); stats.rssi = priv->wstats.qual.qual = priv->SignalQuality; stats.noise = priv->wstats.qual.noise = 100 - priv ->wstats.qual.qual; -//by amy 080312} bHwError = (((*(priv->rxringtail))& (0x00000fff)) == 4080)| (((*(priv->rxringtail))& (0x04000000)) != 0 ) | (((*(priv->rxringtail))& (0x08000000)) != 0 )| (((~(*(priv->rxringtail)))& (0x10000000)) != 0 )| (((~(*(priv->rxringtail)))& (0x20000000)) != 0 ); bCRC = ((*(priv->rxringtail)) & (0x00002000)) >> 13; @@ -1725,11 +1711,12 @@ void rtl8180_rx(struct net_device *dev) (eqMacAddr(priv->ieee80211->current_network.bssid, (fc & IEEE80211_FCTL_TODS)? hdr->addr1 : (fc & IEEE80211_FCTL_FROMDS )? hdr->addr2 : hdr->addr3)) && (!bHwError) && (!bCRC)&& (!bICV)) { -//by amy 080312 - // Perform signal smoothing for dynamic mechanism on demand. - // This is different with PerformSignalSmoothing8185 in smoothing fomula. - // No dramatic adjustion is apply because dynamic mechanism need some degree - // of correctness. 2007.01.23, by shien chang. + /* Perform signal smoothing for dynamic + * mechanism on demand. This is different + * with PerformSignalSmoothing8185 in smoothing + * fomula. No dramatic adjustion is apply + * because dynamic mechanism need some degree + * of correctness. */ PerformUndecoratedSignalSmoothing8185(priv,bCckRate); // // For good-looking singal strength. @@ -1749,12 +1736,9 @@ void rtl8180_rx(struct net_device *dev) // Figure out which antenna that received the lasted packet. priv->LastRxPktAntenna = Antenna ? 1 : 0; // 0: aux, 1: main. -//by amy 080312 SwAntennaDiversityRxOk8185(dev, priv->SignalStrength); } -//by amy for antenna -#ifndef DUMMY_RX if(first){ if(!priv->rx_skb_complete){ /* seems that HW sometimes fails to reiceve and @@ -1810,19 +1794,12 @@ void rtl8180_rx(struct net_device *dev) if(last && !priv->rx_skb_complete){ if(priv->rx_skb->len > 4) skb_trim(priv->rx_skb,priv->rx_skb->len-4); -#ifndef RX_DONT_PASS_UL if(!ieee80211_rtl_rx(priv->ieee80211, - priv->rx_skb, &stats)){ -#endif // RX_DONT_PASS_UL - + priv->rx_skb, &stats)) dev_kfree_skb_any(priv->rx_skb); -#ifndef RX_DONT_PASS_UL - } -#endif priv->rx_skb_complete=1; } -#endif //DUMMY_RX pci_dma_sync_single_for_device(priv->pdev, priv->rxbuffer->dma, priv->rxbuffersize * \ @@ -2056,7 +2033,7 @@ short rtl8180_tx(struct net_device *dev, u8* txbuf, int len, int priority, u16 RtsDur = 0; u16 ThisFrameTime = 0; u16 TxDescDuration = 0; - u8 ownbit_flag = false; //added by david woo for sync Tx, 2007.12.14 + u8 ownbit_flag = false; switch(priority) { case MANAGE_PRIORITY: @@ -2123,7 +2100,8 @@ short rtl8180_tx(struct net_device *dev, u8* txbuf, int len, int priority, //YJ,add,080828,for Keep alive priv->NumTxUnicast++; - // Figure out ACK rate according to BSS basic rate and Tx rate, 2006.03.08 by rcnjko. + /* Figure out ACK rate according to BSS basic rate + * and Tx rate. */ AckTime = ComputeTxTime(14, 10,0, 0); // AckCTSLng = 14 use 1M bps send if ( ((len + sCrcLng) > priv->rts) && priv->rts ) @@ -2206,7 +2184,7 @@ short rtl8180_tx(struct net_device *dev, u8* txbuf, int len, int priority, *tail |= (1<<15); /* no encrypt */ if(remain==len && !descfrag) { - ownbit_flag = false; //added by david woo,2007.12.14 + ownbit_flag = false; *tail = *tail| (1<<29) ; //fist segment of the packet *tail = *tail |(len); } else { @@ -2556,27 +2534,16 @@ void watch_dog_adaptive(unsigned long data) } // Tx High Power Mechanism. -#ifdef HIGH_POWER if(CheckHighPower((struct net_device *)data)) - { queue_work(priv->ieee80211->wq, (void *)&priv->ieee80211->tx_pw_wq); - } -#endif // Tx Power Tracking on 87SE. -#ifdef TX_TRACK - //if( priv->bTxPowerTrack ) //lzm mod 080826 if (CheckTxPwrTracking((struct net_device *)data)) TxPwrTracking87SE((struct net_device *)data); -#endif // Perform DIG immediately. -#ifdef SW_DIG if(CheckDig((struct net_device *)data) == true) - { queue_work(priv->ieee80211->wq, (void *)&priv->ieee80211->hw_dig_wq); - } -#endif rtl8180_watch_dog((struct net_device *)data); queue_work(priv->ieee80211->wq, (void *)&priv->ieee80211->GPIOChangeRFWorkItem); @@ -2747,10 +2714,8 @@ short rtl8180_init(struct net_device *dev) priv->TxPollingTimes = 0;//lzm add 080826 priv->bLeisurePs = true; priv->dot11PowerSaveMode = eActive; -//by amy for antenna priv->AdMinCheckPeriod = 5; priv->AdMaxCheckPeriod = 10; -// Lower signal strength threshold to fit the HW participation in antenna diversity. +by amy 080312 priv->AdMaxRxSsThreshold = 30;//60->30 priv->AdRxSsThreshold = 20;//50->20 priv->AdCheckPeriod = priv->AdMinCheckPeriod; @@ -2765,8 +2730,6 @@ short rtl8180_init(struct net_device *dev) init_timer(&priv->SwAntennaDiversityTimer); priv->SwAntennaDiversityTimer.data = (unsigned long)dev; priv->SwAntennaDiversityTimer.function = (void *)SwAntennaDiversityTimerCallback; -//by amy for antenna -//{by amy 080312 priv->bDigMechanism = 1; priv->InitialGain = 6; priv->bXtalCalibration = false; @@ -2803,58 +2766,63 @@ short rtl8180_init(struct net_device *dev) priv->NumTxUnicast = 0; priv->keepAliveLevel = DEFAULT_KEEP_ALIVE_LEVEL; priv->PowerProfile = POWER_PROFILE_AC; - priv->CurrRetryCnt=0; - priv->LastRetryCnt=0; - priv->LastTxokCnt=0; - priv->LastRxokCnt=0; - priv->LastRetryRate=0; - priv->bTryuping=0; - priv->CurrTxRate=0; - priv->CurrRetryRate=0; - priv->TryupingCount=0; - priv->TryupingCountNoData=0; - priv->TryDownCountLowData=0; - priv->LastTxOKBytes=0; - priv->LastFailTxRate=0; - priv->LastFailTxRateSS=0; - priv->FailTxRateCount=0; - priv->LastTxThroughput=0; - priv->NumTxOkBytesTotal=0; + priv->CurrRetryCnt = 0; + priv->LastRetryCnt = 0; + priv->LastTxokCnt = 0; + priv->LastRxokCnt = 0; + priv->LastRetryRate = 0; + priv->bTryuping = 0; + priv->CurrTxRate = 0; + priv->CurrRetryRate = 0; + priv->TryupingCount = 0; + priv->TryupingCountNoData = 0; + priv->TryDownCountLowData = 0; + priv->LastTxOKBytes = 0; + priv->LastFailTxRate = 0; + priv->LastFailTxRateSS = 0; + priv->FailTxRateCount = 0; + priv->LastTxThroughput = 0; + priv->NumTxOkBytesTotal = 0; priv->ForcedDataRate = 0; priv->RegBModeGainStage = 1; - priv->promisc = (dev->flags & IFF_PROMISC) ? 1:0; + priv->promisc = (dev->flags & IFF_PROMISC) ? 1 : 0; spin_lock_init(&priv->irq_lock); spin_lock_init(&priv->irq_th_lock); spin_lock_init(&priv->tx_lock); spin_lock_init(&priv->ps_lock); spin_lock_init(&priv->rf_ps_lock); - sema_init(&priv->wx_sem,1); - sema_init(&priv->rf_state,1); - INIT_WORK(&priv->reset_wq,(void*) rtl8180_restart_wq); - INIT_WORK(&priv->tx_irq_wq,(void*) rtl8180_tx_irq_wq); - INIT_DELAYED_WORK(&priv->ieee80211->hw_wakeup_wq,(void*) rtl8180_hw_wakeup_wq); - INIT_DELAYED_WORK(&priv->ieee80211->hw_sleep_wq,(void*) rtl8180_hw_sleep_wq); - INIT_WORK(&priv->ieee80211->wmm_param_update_wq,(void*) rtl8180_wmm_param_update); - INIT_DELAYED_WORK(&priv->ieee80211->rate_adapter_wq,(void*)rtl8180_rate_adapter);//+by amy 080312 - INIT_DELAYED_WORK(&priv->ieee80211->hw_dig_wq,(void*)rtl8180_hw_dig_wq);//+by amy 080312 - INIT_DELAYED_WORK(&priv->ieee80211->tx_pw_wq,(void*)rtl8180_tx_pw_wq);//+by amy 080312 - - INIT_DELAYED_WORK(&priv->ieee80211->GPIOChangeRFWorkItem,(void*) GPIOChangeRFWorkItemCallBack); - + sema_init(&priv->wx_sem, 1); + sema_init(&priv->rf_state, 1); + INIT_WORK(&priv->reset_wq, (void *)rtl8180_restart_wq); + INIT_WORK(&priv->tx_irq_wq, (void *)rtl8180_tx_irq_wq); + INIT_DELAYED_WORK(&priv->ieee80211->hw_wakeup_wq, + (void *)rtl8180_hw_wakeup_wq); + INIT_DELAYED_WORK(&priv->ieee80211->hw_sleep_wq, + (void *)rtl8180_hw_sleep_wq); + INIT_WORK(&priv->ieee80211->wmm_param_update_wq, + (void *)rtl8180_wmm_param_update); + INIT_DELAYED_WORK(&priv->ieee80211->rate_adapter_wq, + (void *)rtl8180_rate_adapter); + INIT_DELAYED_WORK(&priv->ieee80211->hw_dig_wq, + (void *)rtl8180_hw_dig_wq); + INIT_DELAYED_WORK(&priv->ieee80211->tx_pw_wq, + (void *)rtl8180_tx_pw_wq); + INIT_DELAYED_WORK(&priv->ieee80211->GPIOChangeRFWorkItem, + (void *) GPIOChangeRFWorkItemCallBack); tasklet_init(&priv->irq_rx_tasklet, (void(*)(unsigned long)) rtl8180_irq_rx_tasklet, (unsigned long)priv); - init_timer(&priv->watch_dog_timer); + init_timer(&priv->watch_dog_timer); priv->watch_dog_timer.data = (unsigned long)dev; priv->watch_dog_timer.function = watch_dog_adaptive; - init_timer(&priv->rateadapter_timer); - priv->rateadapter_timer.data = (unsigned long)dev; - priv->rateadapter_timer.function = timer_rate_adaptive; - priv->RateAdaptivePeriod= RATE_ADAPTIVE_TIMER_PERIOD; - priv->bEnhanceTxPwr=false; + init_timer(&priv->rateadapter_timer); + priv->rateadapter_timer.data = (unsigned long)dev; + priv->rateadapter_timer.function = timer_rate_adaptive; + priv->RateAdaptivePeriod = RATE_ADAPTIVE_TIMER_PERIOD; + priv->bEnhanceTxPwr = false; priv->ieee80211->softmac_hard_start_xmit = rtl8180_hard_start_xmit; priv->ieee80211->set_chan = rtl8180_set_chan; @@ -2877,30 +2845,28 @@ short rtl8180_init(struct net_device *dev) priv->CSMethod = (0x01 << 29); - priv->TransmitConfig = - 1<ShortRetryLimit<LongRetryLimit<TransmitConfig = TCR_DurProcMode_OFFSET | + (7<ShortRetryLimit<LongRetryLimit<ReceiveConfig = - RCR_AMF | RCR_ADF | //accept management/data - RCR_ACF | //accept control frame for SW AP needs PS-poll, 2005.07.07, by rcnjko. - RCR_AB | RCR_AM | RCR_APM | //accept BC/MC/UC - (7<EarlyRxThreshold<EarlyRxThreshold == 7 ? RCR_ONLYERLPKT:0); + priv->ReceiveConfig = RCR_AMF | RCR_ADF | RCR_ACF | + RCR_AB | RCR_AM | RCR_APM | + (7<EarlyRxThreshold<EarlyRxThreshold == 7 ? + RCR_ONLYERLPKT : 0); priv->IntrMask = IMR_TMGDOK | IMR_TBDER | IMR_THPDER | - IMR_THPDER | IMR_THPDOK | - IMR_TVODER | IMR_TVODOK | - IMR_TVIDER | IMR_TVIDOK | - IMR_TBEDER | IMR_TBEDOK | - IMR_TBKDER | IMR_TBKDOK | - IMR_RDU | // To handle the defragmentation not enough Rx descriptors case. Annie, 2006-03-27. - IMR_RER | IMR_ROK | - IMR_RQoSOK; // ROK and RQoSOK are mutually exclusive, so, we must handle RQoSOK interrupt to receive QoS frames, 2005.12.09, by rcnjko. + IMR_THPDER | IMR_THPDOK | + IMR_TVODER | IMR_TVODOK | + IMR_TVIDER | IMR_TVIDOK | + IMR_TBEDER | IMR_TBEDOK | + IMR_TBKDER | IMR_TBKDOK | + IMR_RDU | + IMR_RER | IMR_ROK | + IMR_RQoSOK; priv->InitialGain = 6; @@ -2968,25 +2934,22 @@ short rtl8180_init(struct net_device *dev) for (i = 1, j = 0; i < 14; i += 2, j++) { word = eprom_read(dev, EPROM_TXPW_OFDM_CH1_2 + j); priv->chtxpwr_ofdm[i] = word & 0xff; - priv->chtxpwr_ofdm[i+1] = (word & 0xff00)>>8; + priv->chtxpwr_ofdm[i+1] = (word & 0xff00) >> 8; } - //3Read crystal calibtration and thermal meter indication on 87SE. + /* 3Read crystal calibtration and thermal meter indication on 87SE. */ - // By SD3 SY's request. Added by Roger, 2007.12.11. + tmpu16 = eprom_read(dev, EEPROM_RSV >> 1); + /* Crystal calibration for Xin and Xout resp. */ + priv->XtalCal_Xout = tmpu16 & EEPROM_XTAL_CAL_XOUT_MASK; + priv->XtalCal_Xin = (tmpu16 & EEPROM_XTAL_CAL_XIN_MASK) >> 4; + if ((tmpu16 & EEPROM_XTAL_CAL_ENABLE) >> 12) + priv->bXtalCalibration = true; - tmpu16 = eprom_read(dev, EEPROM_RSV>>1); - - // Crystal calibration for Xin and Xout resp. - priv->XtalCal_Xout = tmpu16 & EEPROM_XTAL_CAL_XOUT_MASK; // 0~7.5pF - priv->XtalCal_Xin = (tmpu16 & EEPROM_XTAL_CAL_XIN_MASK)>>4; // 0~7.5pF - if((tmpu16 & EEPROM_XTAL_CAL_ENABLE)>>12) - priv->bXtalCalibration = true; - - // Thermal meter reference indication. - priv->ThermalMeter = (u8)((tmpu16 & EEPROM_THERMAL_METER_MASK)>>8); - if((tmpu16 & EEPROM_THERMAL_METER_ENABLE)>>13) - priv->bTxPowerTrack = true; + /* Thermal meter reference indication. */ + priv->ThermalMeter = (u8)((tmpu16 & EEPROM_THERMAL_METER_MASK) >> 8); + if ((tmpu16 & EEPROM_THERMAL_METER_ENABLE) >> 13) + priv->bTxPowerTrack = true; word = eprom_read(dev,EPROM_TXPW_BASE); priv->cck_txpwr_base = word & 0xf; @@ -3010,7 +2973,6 @@ short rtl8180_init(struct net_device *dev) priv->rf_set_chan = rtl8225z2_rf_set_chan; priv->rf_set_sens = NULL; - if (0!=alloc_rx_desc_ring(dev, priv->rxbuffersize, priv->rxringcount)) return -ENOMEM; @@ -3042,11 +3004,7 @@ short rtl8180_init(struct net_device *dev) TX_BEACON_RING_ADDR)) return -ENOMEM; -#if !defined(SA_SHIRQ) if(request_irq(dev->irq, (void *)rtl8180_interrupt, IRQF_SHARED, dev->name, dev)){ -#else - if(request_irq(dev->irq, (void *)rtl8180_interrupt, SA_SHIRQ, dev->name, dev)){ -#endif DMESGE("Error allocating IRQ %d",dev->irq); return -1; }else{ @@ -3335,7 +3293,6 @@ static struct net_device_stats *rtl8180_stats(struct net_device *dev) } // // Change current and default preamble mode. -// 2005.01.06, by rcnjko. // bool MgntActSet_802_11_PowerSaveMode( @@ -3454,7 +3411,6 @@ void rtl8180_watch_dog(struct net_device *dev) MgntLinkKeepAlive(priv); //YJ,add,080828,for LPS -#ifdef ENABLE_LPS if (priv->PowerProfile == POWER_PROFILE_BATTERY) priv->bLeisurePs = true; else if (priv->PowerProfile == POWER_PROFILE_AC) { @@ -3464,7 +3420,6 @@ void rtl8180_watch_dog(struct net_device *dev) if(priv->ieee80211->state == IEEE80211_LINKED){ priv->link_detect.NumRxOkInPeriod = priv->ieee80211->NumRxDataInPeriod; - //printk("TxOk=%d RxOk=%d\n", priv->link_detect.NumTxOkInPeriod, priv->link_detect.NumRxOkInPeriod); if( priv->link_detect.NumRxOkInPeriod> 666 || priv->link_detect.NumTxOkInPeriod> 666 ) { bBusyTraffic = true; @@ -3481,7 +3436,6 @@ void rtl8180_watch_dog(struct net_device *dev) LeisurePSLeave(priv); } else LeisurePSLeave(priv); -#endif priv->link_detect.bBusyTraffic = bBusyTraffic; priv->link_detect.NumRxOkInPeriod = 0; priv->link_detect.NumTxOkInPeriod = 0; @@ -3503,16 +3457,11 @@ int _rtl8180_up(struct net_device *dev) if(priv->ieee80211->iw_mode == IW_MODE_ADHOC) IPSLeave(dev); } -#ifdef RATE_ADAPT timer_rate_adaptive((unsigned long)dev); -#endif watch_dog_adaptive((unsigned long)dev); -#ifdef SW_ANTE if(priv->bSwAntennaDiverity) SwAntennaDiversityTimerCallback(dev); -#endif ieee80211_softmac_start_protocol(priv->ieee80211); - return 0; } @@ -3748,7 +3697,7 @@ static int __devinit rtl8180_pci_probe(struct pci_dev *pdev, dev->wireless_handlers = &r8180_wx_handlers_def; dev->type=ARPHRD_ETHER; - dev->watchdog_timeo = HZ*3; //added by david woo, 2007.12.13 + dev->watchdog_timeo = HZ*3; if (dev_alloc_name(dev, ifname) < 0){ DMESG("Oops: devname already taken! Trying wlan%%d...\n"); @@ -4236,60 +4185,50 @@ void GPIOChangeRFWorkItemCallBack(struct work_struct *work) static char *envp[] = {"HOME=/", "TERM=linux", "PATH=/usr/bin:/bin", NULL}; static int readf_count = 0; -#ifdef ENABLE_LPS if(readf_count % 10 == 0) priv->PowerProfile = read_acadapter_file("/proc/acpi/ac_adapter/AC0/state"); readf_count = (readf_count+1)%0xffff; -#endif - { - // We should turn off LED before polling FF51[4]. + /* We should turn off LED before polling FF51[4]. */ - //Turn off LED. - btPSR = read_nic_byte(dev, PSR); - write_nic_byte(dev, PSR, (btPSR & ~BIT3)); + /* Turn off LED. */ + btPSR = read_nic_byte(dev, PSR); + write_nic_byte(dev, PSR, (btPSR & ~BIT3)); - //It need to delay 4us suggested by Jong, 2008-01-16 - udelay(4); + /* It need to delay 4us suggested by Jong, 2008-01-16 */ + udelay(4); - //HW radio On/Off according to the value of FF51[4](config0) - btConfig0 = btPSR = read_nic_byte(dev, CONFIG0); + /* HW radio On/Off according to the value of FF51[4](config0) */ + btConfig0 = btPSR = read_nic_byte(dev, CONFIG0); - //Turn on LED. - write_nic_byte(dev, PSR, btPSR| BIT3); + /* Turn on LED. */ + write_nic_byte(dev, PSR, btPSR | BIT3); - eRfPowerStateToSet = (btConfig0 & BIT4) ? eRfOn : eRfOff; + eRfPowerStateToSet = (btConfig0 & BIT4) ? eRfOn : eRfOff; - if((priv->ieee80211->bHwRadioOff == true) && (eRfPowerStateToSet == eRfOn)) - { - priv->ieee80211->bHwRadioOff = false; - bActuallySet = true; - } - else if((priv->ieee80211->bHwRadioOff == false) && (eRfPowerStateToSet == eRfOff)) - { - priv->ieee80211->bHwRadioOff = true; - bActuallySet = true; - } + if ((priv->ieee80211->bHwRadioOff == true) && + (eRfPowerStateToSet == eRfOn)) { + priv->ieee80211->bHwRadioOff = false; + bActuallySet = true; + } else if ((priv->ieee80211->bHwRadioOff == false) && + (eRfPowerStateToSet == eRfOff)) { + priv->ieee80211->bHwRadioOff = true; + bActuallySet = true; + } - if(bActuallySet) - { - MgntActSet_RF_State(dev, eRfPowerStateToSet, RF_CHANGE_BY_HW); + if (bActuallySet) { + MgntActSet_RF_State(dev, eRfPowerStateToSet, RF_CHANGE_BY_HW); - /* To update the UI status for Power status changed */ - if(priv->ieee80211->bHwRadioOff == true) - argv[1] = "RFOFF"; - else{ - //if(!priv->RfOffReason) - argv[1] = "RFON"; - //else - // argv[1] = "RFOFF"; - } - argv[0] = RadioPowerPath; - argv[2] = NULL; + /* To update the UI status for Power status changed */ + if (priv->ieee80211->bHwRadioOff == true) + argv[1] = "RFOFF"; + else + argv[1] = "RFON"; + argv[0] = RadioPowerPath; + argv[2] = NULL; - call_usermodehelper(RadioPowerPath,argv,envp,1); - } - } + call_usermodehelper(RadioPowerPath, argv, envp, 1); + } } static u8 read_acadapter_file(char *filename) From 6a90772886d5d6812f9b2775d3caa0dc002754e0 Mon Sep 17 00:00:00 2001 From: Nitin Gupta Date: Thu, 28 Jan 2010 21:13:37 +0530 Subject: [PATCH 224/367] Staging: ramzswap: Use lock for 64-bit stats 64-bit stats corruption was observed when ramzswap was used on SMP systems. To prevent this, use separate spinlock to protect these stats. Also, replace stat_*() with rzs_stat*() to avoid possible conflict with core kernel code. Eventually, these will be converted to per-cpu counters if this driver finds use on large scale systems and this locking is found to affect scalability. Signed-off-by: Nitin Gupta Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ramzswap/ramzswap_drv.c | 58 +++++++++++----------- drivers/staging/ramzswap/ramzswap_drv.h | 59 +++++++++++++++++++---- drivers/staging/ramzswap/ramzswap_ioctl.h | 1 + 3 files changed, 80 insertions(+), 38 deletions(-) diff --git a/drivers/staging/ramzswap/ramzswap_drv.c b/drivers/staging/ramzswap/ramzswap_drv.c index baf757259d0b..05273c0588c6 100644 --- a/drivers/staging/ramzswap/ramzswap_drv.c +++ b/drivers/staging/ramzswap/ramzswap_drv.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -239,7 +238,8 @@ void ramzswap_ioctl_get_stats(struct ramzswap *rzs, mem_used = xv_get_total_size_bytes(rzs->mem_pool) + (rs->pages_expand << PAGE_SHIFT); - succ_writes = rs->num_writes - rs->failed_writes; + succ_writes = rzs_stat64_read(rzs, &rs->num_writes) - + rzs_stat64_read(rzs, &rs->failed_writes); if (succ_writes && rs->pages_stored) { good_compress_perc = rs->good_compress * 100 @@ -248,11 +248,12 @@ void ramzswap_ioctl_get_stats(struct ramzswap *rzs, / rs->pages_stored; } - s->num_reads = rs->num_reads; - s->num_writes = rs->num_writes; - s->failed_reads = rs->failed_reads; - s->failed_writes = rs->failed_writes; - s->invalid_io = rs->invalid_io; + s->num_reads = rzs_stat64_read(rzs, &rs->num_reads); + s->num_writes = rzs_stat64_read(rzs, &rs->num_writes); + s->failed_reads = rzs_stat64_read(rzs, &rs->failed_reads); + s->failed_writes = rzs_stat64_read(rzs, &rs->failed_writes); + s->invalid_io = rzs_stat64_read(rzs, &rs->invalid_io); + s->notify_free = rzs_stat64_read(rzs, &rs->notify_free); s->pages_zero = rs->pages_zero; s->good_compress_pct = good_compress_perc; @@ -264,8 +265,8 @@ void ramzswap_ioctl_get_stats(struct ramzswap *rzs, s->compr_data_size = rs->compr_size; s->mem_used_total = mem_used; - s->bdev_num_reads = rs->bdev_num_reads; - s->bdev_num_writes = rs->bdev_num_writes; + s->bdev_num_reads = rzs_stat64_read(rzs, &rs->bdev_num_reads); + s->bdev_num_writes = rzs_stat64_read(rzs, &rs->bdev_num_writes); } #endif /* CONFIG_RAMZSWAP_STATS */ } @@ -594,7 +595,7 @@ static void ramzswap_free_page(struct ramzswap *rzs, size_t index) if (unlikely(!page)) { if (rzs_test_flag(rzs, index, RZS_ZERO)) { rzs_clear_flag(rzs, index, RZS_ZERO); - stat_dec(rzs->stats.pages_zero); + rzs_stat_dec(&rzs->stats.pages_zero); } return; } @@ -603,7 +604,7 @@ static void ramzswap_free_page(struct ramzswap *rzs, size_t index) clen = PAGE_SIZE; __free_page(page); rzs_clear_flag(rzs, index, RZS_UNCOMPRESSED); - stat_dec(rzs->stats.pages_expand); + rzs_stat_dec(&rzs->stats.pages_expand); goto out; } @@ -613,11 +614,11 @@ static void ramzswap_free_page(struct ramzswap *rzs, size_t index) xv_free(rzs->mem_pool, page, offset); if (clen <= PAGE_SIZE / 2) - stat_dec(rzs->stats.good_compress); + rzs_stat_dec(&rzs->stats.good_compress); out: rzs->stats.compr_size -= clen; - stat_dec(rzs->stats.pages_stored); + rzs_stat_dec(&rzs->stats.pages_stored); rzs->table[index].page = NULL; rzs->table[index].offset = 0; @@ -679,8 +680,8 @@ static int handle_ramzswap_fault(struct ramzswap *rzs, struct bio *bio) */ if (rzs->backing_swap) { u32 pagenum; - stat_dec(rzs->stats.num_reads); - stat_inc(rzs->stats.bdev_num_reads); + rzs_stat64_dec(rzs, &rzs->stats.num_reads); + rzs_stat64_inc(rzs, &rzs->stats.bdev_num_reads); bio->bi_bdev = rzs->backing_swap; /* @@ -718,7 +719,7 @@ static int ramzswap_read(struct ramzswap *rzs, struct bio *bio) struct zobj_header *zheader; unsigned char *user_mem, *cmem; - stat_inc(rzs->stats.num_reads); + rzs_stat64_inc(rzs, &rzs->stats.num_reads); page = bio->bi_io_vec[0].bv_page; index = bio->bi_sector >> SECTORS_PER_PAGE_SHIFT; @@ -752,7 +753,7 @@ static int ramzswap_read(struct ramzswap *rzs, struct bio *bio) if (unlikely(ret != LZO_E_OK)) { pr_err("Decompression failed! err=%d, page=%u\n", ret, index); - stat_inc(rzs->stats.failed_reads); + rzs_stat64_inc(rzs, &rzs->stats.failed_reads); goto out; } @@ -776,7 +777,7 @@ static int ramzswap_write(struct ramzswap *rzs, struct bio *bio) struct page *page, *page_store; unsigned char *user_mem, *cmem, *src; - stat_inc(rzs->stats.num_writes); + rzs_stat64_inc(rzs, &rzs->stats.num_writes); page = bio->bi_io_vec[0].bv_page; index = bio->bi_sector >> SECTORS_PER_PAGE_SHIFT; @@ -796,7 +797,7 @@ static int ramzswap_write(struct ramzswap *rzs, struct bio *bio) * Simply clear zero page flag. */ if (rzs_test_flag(rzs, index, RZS_ZERO)) { - stat_dec(rzs->stats.pages_zero); + rzs_stat_dec(&rzs->stats.pages_zero); rzs_clear_flag(rzs, index, RZS_ZERO); } @@ -806,7 +807,7 @@ static int ramzswap_write(struct ramzswap *rzs, struct bio *bio) if (page_zero_filled(user_mem)) { kunmap_atomic(user_mem, KM_USER0); mutex_unlock(&rzs->lock); - stat_inc(rzs->stats.pages_zero); + rzs_stat_inc(&rzs->stats.pages_zero); rzs_set_flag(rzs, index, RZS_ZERO); set_bit(BIO_UPTODATE, &bio->bi_flags); @@ -830,7 +831,7 @@ static int ramzswap_write(struct ramzswap *rzs, struct bio *bio) if (unlikely(ret != LZO_E_OK)) { mutex_unlock(&rzs->lock); pr_err("Compression failed! err=%d\n", ret); - stat_inc(rzs->stats.failed_writes); + rzs_stat64_inc(rzs, &rzs->stats.failed_writes); goto out; } @@ -853,13 +854,13 @@ static int ramzswap_write(struct ramzswap *rzs, struct bio *bio) mutex_unlock(&rzs->lock); pr_info("Error allocating memory for incompressible " "page: %u\n", index); - stat_inc(rzs->stats.failed_writes); + rzs_stat64_inc(rzs, &rzs->stats.failed_writes); goto out; } offset = 0; rzs_set_flag(rzs, index, RZS_UNCOMPRESSED); - stat_inc(rzs->stats.pages_expand); + rzs_stat_inc(&rzs->stats.pages_expand); rzs->table[index].page = page_store; src = kmap_atomic(page, KM_USER0); goto memstore; @@ -871,7 +872,7 @@ static int ramzswap_write(struct ramzswap *rzs, struct bio *bio) mutex_unlock(&rzs->lock); pr_info("Error allocating memory for compressed " "page: %u, size=%zu\n", index, clen); - stat_inc(rzs->stats.failed_writes); + rzs_stat64_inc(rzs, &rzs->stats.failed_writes); if (rzs->backing_swap) fwd_write_request = 1; goto out; @@ -900,9 +901,9 @@ memstore: /* Update stats */ rzs->stats.compr_size += clen; - stat_inc(rzs->stats.pages_stored); + rzs_stat_inc(&rzs->stats.pages_stored); if (clen <= PAGE_SIZE / 2) - stat_inc(rzs->stats.good_compress); + rzs_stat_inc(&rzs->stats.good_compress); mutex_unlock(&rzs->lock); @@ -912,7 +913,7 @@ memstore: out: if (fwd_write_request) { - stat_inc(rzs->stats.bdev_num_writes); + rzs_stat64_inc(rzs, &rzs->stats.bdev_num_writes); bio->bi_bdev = rzs->backing_swap; #if 0 /* @@ -974,7 +975,7 @@ static int ramzswap_make_request(struct request_queue *queue, struct bio *bio) } if (!valid_swap_request(rzs, bio)) { - stat_inc(rzs->stats.invalid_io); + rzs_stat64_inc(rzs, &rzs->stats.invalid_io); bio_io_error(bio); return 0; } @@ -1295,6 +1296,7 @@ static struct block_device_operations ramzswap_devops = { static int create_device(struct ramzswap *rzs, int device_id) { mutex_init(&rzs->lock); + spin_lock_init(&rzs->stat64_lock); INIT_LIST_HEAD(&rzs->backing_swap_extent_list); rzs->queue = blk_alloc_queue(GFP_KERNEL); diff --git a/drivers/staging/ramzswap/ramzswap_drv.h b/drivers/staging/ramzswap/ramzswap_drv.h index 7ba98bfee2d6..5b672225e174 100644 --- a/drivers/staging/ramzswap/ramzswap_drv.h +++ b/drivers/staging/ramzswap/ramzswap_drv.h @@ -15,6 +15,9 @@ #ifndef _RAMZSWAP_DRV_H_ #define _RAMZSWAP_DRV_H_ +#include +#include + #include "ramzswap_ioctl.h" #include "xvmalloc.h" @@ -71,15 +74,6 @@ static const unsigned max_zpage_size_nobdev = PAGE_SIZE / 4 * 3; #define SECTORS_PER_PAGE_SHIFT (PAGE_SHIFT - SECTOR_SHIFT) #define SECTORS_PER_PAGE (1 << SECTORS_PER_PAGE_SHIFT) -/* Debugging and Stats */ -#if defined(CONFIG_RAMZSWAP_STATS) -#define stat_inc(stat) ((stat)++) -#define stat_dec(stat) ((stat)--) -#else -#define stat_inc(x) -#define stat_dec(x) -#endif - /* Flags for ramzswap pages (table[page_no].flags) */ enum rzs_pageflags { /* Page is stored uncompressed */ @@ -124,6 +118,7 @@ struct ramzswap_stats { u64 failed_reads; /* should NEVER! happen */ u64 failed_writes; /* can happen when memory is too low */ u64 invalid_io; /* non-swap I/O requests */ + u64 notify_free; /* no. of swap slot free notifications */ u32 pages_zero; /* no. of zero filled pages */ u32 pages_stored; /* no. of pages currently stored */ u32 good_compress; /* % of pages with compression ratio<=50% */ @@ -138,6 +133,7 @@ struct ramzswap { void *compress_workmem; void *compress_buffer; struct table *table; + spinlock_t stat64_lock; /* protect 64-bit stats */ struct mutex lock; struct request_queue *queue; struct gendisk *disk; @@ -167,5 +163,48 @@ struct ramzswap { /*-- */ -#endif +/* Debugging and Stats */ +#if defined(CONFIG_RAMZSWAP_STATS) +static void rzs_stat_inc(u32 *v) +{ + *v = *v + 1; +} +static void rzs_stat_dec(u32 *v) +{ + *v = *v - 1; +} + +static void rzs_stat64_inc(struct ramzswap *rzs, u64 *v) +{ + spin_lock(&rzs->stat64_lock); + *v = *v + 1; + spin_unlock(&rzs->stat64_lock); +} + +static void rzs_stat64_dec(struct ramzswap *rzs, u64 *v) +{ + spin_lock(&rzs->stat64_lock); + *v = *v - 1; + spin_unlock(&rzs->stat64_lock); +} + +static u64 rzs_stat64_read(struct ramzswap *rzs, u64 *v) +{ + u64 val; + + spin_lock(&rzs->stat64_lock); + val = *v; + spin_unlock(&rzs->stat64_lock); + + return val; +} +#else +#define rzs_stat_inc(v) +#define rzs_stat_dec(v) +#define rzs_stat64_inc(r, v) +#define rzs_stat64_dec(r, v) +#define rzs_stat64_read(r, v) +#endif /* CONFIG_RAMZSWAP_STATS */ + +#endif diff --git a/drivers/staging/ramzswap/ramzswap_ioctl.h b/drivers/staging/ramzswap/ramzswap_ioctl.h index 1bc54e22c915..1edaebaaf81d 100644 --- a/drivers/staging/ramzswap/ramzswap_ioctl.h +++ b/drivers/staging/ramzswap/ramzswap_ioctl.h @@ -27,6 +27,7 @@ struct ramzswap_ioctl_stats { u64 failed_reads; /* should NEVER! happen */ u64 failed_writes; /* can happen when memory is too low */ u64 invalid_io; /* non-swap I/O requests */ + u64 notify_free; /* no. of swap slot free notifications */ u32 pages_zero; /* no. of zero filled pages */ u32 good_compress_pct; /* no. of pages with compression ratio<=50% */ u32 pages_expand_pct; /* no. of incompressible pages */ From 7eef7533909f3ea50e8b375777242f778e8da11e Mon Sep 17 00:00:00 2001 From: Nitin Gupta Date: Thu, 28 Jan 2010 21:13:38 +0530 Subject: [PATCH 225/367] Staging: ramzswap: Flush block device before reset Make sure we flush block device before freeing all metadata during reset ioctl. Signed-off-by: Nitin Gupta Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ramzswap/ramzswap_drv.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ramzswap/ramzswap_drv.c b/drivers/staging/ramzswap/ramzswap_drv.c index 05273c0588c6..3567ee3991bd 100644 --- a/drivers/staging/ramzswap/ramzswap_drv.c +++ b/drivers/staging/ramzswap/ramzswap_drv.c @@ -1000,6 +1000,9 @@ static void reset_device(struct ramzswap *rzs) unsigned entries_per_page; unsigned long num_table_pages, entry = 0; + /* Do not accept any new I/O request */ + rzs->init_done = 0; + if (rzs->backing_swap && !rzs->num_extents) is_backing_blkdev = 1; @@ -1073,9 +1076,6 @@ static void reset_device(struct ramzswap *rzs) rzs->disksize = 0; rzs->memlimit = 0; - - /* Back to uninitialized state */ - rzs->init_done = 0; } static int ramzswap_ioctl_init_device(struct ramzswap *rzs) @@ -1276,6 +1276,11 @@ static int ramzswap_ioctl(struct block_device *bdev, fmode_t mode, ret = -EBUSY; goto out; } + + /* Make sure all pending I/O is finished */ + if (bdev) + fsync_bdev(bdev); + ret = ramzswap_ioctl_reset_device(rzs); break; From 5d83d5a0b5ee332b724978d657c0af17f14e807e Mon Sep 17 00:00:00 2001 From: Nitin Gupta Date: Thu, 28 Jan 2010 21:13:39 +0530 Subject: [PATCH 226/367] Staging: ramzswap: Set block size to PAGE_SIZE ramzswap block size needs to be set equal to PAGE_SIZE to avoid receiving any unaligned block I/O requests (happens due to readahead logic during swapon). These unaligned accesses produce unnecessary I/O errors, scaring users. Signed-off-by: Nitin Gupta Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ramzswap/ramzswap_drv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/staging/ramzswap/ramzswap_drv.c b/drivers/staging/ramzswap/ramzswap_drv.c index 3567ee3991bd..2021ad6fb013 100644 --- a/drivers/staging/ramzswap/ramzswap_drv.c +++ b/drivers/staging/ramzswap/ramzswap_drv.c @@ -1335,6 +1335,10 @@ static int create_device(struct ramzswap *rzs, int device_id) * or set equal to backing swap device (if provided) */ set_capacity(rzs->disk, 0); + + blk_queue_physical_block_size(rzs->disk->queue, PAGE_SIZE); + blk_queue_logical_block_size(rzs->disk->queue, PAGE_SIZE); + add_disk(rzs->disk); rzs->init_done = 0; From de1a21a0f1f614dac0d8cacc13f41e32a15bba98 Mon Sep 17 00:00:00 2001 From: Nitin Gupta Date: Thu, 28 Jan 2010 21:13:40 +0530 Subject: [PATCH 227/367] Staging: ramzswap: Return proper error code on device create failure Currently, we return 0 if create_device() fails and 1 otherwise. Now, proper error code is returned from create_device() and the same is propagated as module error code from ramzswap_init(). Also added some cleanups for ramzswap_init(), improving function structure. Signed-off-by: Nitin Gupta Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ramzswap/ramzswap_drv.c | 44 ++++++++++++++++--------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/drivers/staging/ramzswap/ramzswap_drv.c b/drivers/staging/ramzswap/ramzswap_drv.c index 2021ad6fb013..3035addfaedd 100644 --- a/drivers/staging/ramzswap/ramzswap_drv.c +++ b/drivers/staging/ramzswap/ramzswap_drv.c @@ -1300,6 +1300,8 @@ static struct block_device_operations ramzswap_devops = { static int create_device(struct ramzswap *rzs, int device_id) { + int ret = 0; + mutex_init(&rzs->lock); spin_lock_init(&rzs->stat64_lock); INIT_LIST_HEAD(&rzs->backing_swap_extent_list); @@ -1308,7 +1310,8 @@ static int create_device(struct ramzswap *rzs, int device_id) if (!rzs->queue) { pr_err("Error allocating disk queue for device %d\n", device_id); - return 0; + ret = -ENOMEM; + goto out; } blk_queue_make_request(rzs->queue, ramzswap_make_request); @@ -1320,7 +1323,8 @@ static int create_device(struct ramzswap *rzs, int device_id) blk_cleanup_queue(rzs->queue); pr_warning("Error allocating disk structure for device %d\n", device_id); - return 0; + ret = -ENOMEM; + goto out; } rzs->disk->major = ramzswap_major; @@ -1342,7 +1346,9 @@ static int create_device(struct ramzswap *rzs, int device_id) add_disk(rzs->disk); rzs->init_done = 0; - return 1; + +out: + return ret; } static void destroy_device(struct ramzswap *rzs) @@ -1358,18 +1364,20 @@ static void destroy_device(struct ramzswap *rzs) static int __init ramzswap_init(void) { - int i, ret; + int ret, dev_id; if (num_devices > max_num_devices) { pr_warning("Invalid value for num_devices: %u\n", num_devices); - return -EINVAL; + ret = -EINVAL; + goto out; } ramzswap_major = register_blkdev(0, "ramzswap"); if (ramzswap_major <= 0) { pr_warning("Unable to get major number\n"); - return -EBUSY; + ret = -EBUSY; + goto out; } if (!num_devices) { @@ -1380,21 +1388,25 @@ static int __init ramzswap_init(void) /* Allocate the device array and initialize each one */ pr_info("Creating %u devices ...\n", num_devices); devices = kzalloc(num_devices * sizeof(struct ramzswap), GFP_KERNEL); - if (!devices) - goto out; + if (!devices) { + ret = -ENOMEM; + goto unregister; + } - for (i = 0; i < num_devices; i++) - if (!create_device(&devices[i], i)) { - ret = i; + for (dev_id = 0; dev_id < num_devices; dev_id++) { + ret = create_device(&devices[dev_id], dev_id); + if (ret) goto free_devices; - } + } + return 0; + free_devices: - for (i = 0; i < ret; i++) - destroy_device(&devices[i]); -out: - ret = -ENOMEM; + while (dev_id) + destroy_device(&devices[--dev_id]); +unregister: unregister_blkdev(ramzswap_major, "ramzswap"); +out: return ret; } From 2e882281742f7e483e751bbbaf6c0946b5f8513f Mon Sep 17 00:00:00 2001 From: Nitin Gupta Date: Thu, 28 Jan 2010 21:13:41 +0530 Subject: [PATCH 228/367] Staging: ramzswap: Remove redundant check for zero page ramzswap_free_page() already handles the case for zero filled pages. So, remove redundant logic for the same in ramzswap_write(). Signed-off-by: Nitin Gupta Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ramzswap/ramzswap_drv.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/staging/ramzswap/ramzswap_drv.c b/drivers/staging/ramzswap/ramzswap_drv.c index 3035addfaedd..7e0a3fab9cd4 100644 --- a/drivers/staging/ramzswap/ramzswap_drv.c +++ b/drivers/staging/ramzswap/ramzswap_drv.c @@ -593,6 +593,10 @@ static void ramzswap_free_page(struct ramzswap *rzs, size_t index) u32 offset = rzs->table[index].offset; if (unlikely(!page)) { + /* + * No memory is allocated for zero filled pages. + * Simply clear zero page flag. + */ if (rzs_test_flag(rzs, index, RZS_ZERO)) { rzs_clear_flag(rzs, index, RZS_ZERO); rzs_stat_dec(&rzs->stats.pages_zero); @@ -789,18 +793,9 @@ static int ramzswap_write(struct ramzswap *rzs, struct bio *bio) * is no longer referenced by any process. So, its now safe * to free the memory that was allocated for this page. */ - if (rzs->table[index].page) + if (rzs->table[index].page || rzs_test_flag(rzs, index, RZS_ZERO)) ramzswap_free_page(rzs, index); - /* - * No memory is allocated for zero filled pages. - * Simply clear zero page flag. - */ - if (rzs_test_flag(rzs, index, RZS_ZERO)) { - rzs_stat_dec(&rzs->stats.pages_zero); - rzs_clear_flag(rzs, index, RZS_ZERO); - } - mutex_lock(&rzs->lock); user_mem = kmap_atomic(page, KM_USER0); From c25d75a234df36446dc0d9bb3365ab8b83374d50 Mon Sep 17 00:00:00 2001 From: Nitin Gupta Date: Thu, 28 Jan 2010 21:19:59 +0530 Subject: [PATCH 229/367] Staging: ramzswap: Handle case for invalid backing swap Currently, we crash (issue BUG_ON) if backing swap disk size is zero. This can happen is user specified an extended partition or simply a bad disk as backing swap. A crash is really an unpleasant surprise to user for such trivial problems. Now, we check for this condition and simply fail device initialization if this is the case. Additional cleanups: * use static for all functions * remove extra newline between functions * memset backing_swap_name to NULL on device reset Signed-off-by: Nitin Gupta Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ramzswap/ramzswap_drv.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/staging/ramzswap/ramzswap_drv.c b/drivers/staging/ramzswap/ramzswap_drv.c index 7e0a3fab9cd4..1bca069211a8 100644 --- a/drivers/staging/ramzswap/ramzswap_drv.c +++ b/drivers/staging/ramzswap/ramzswap_drv.c @@ -220,7 +220,7 @@ out: return ret; } -void ramzswap_ioctl_get_stats(struct ramzswap *rzs, +static void ramzswap_ioctl_get_stats(struct ramzswap *rzs, struct ramzswap_ioctl_stats *s) { strncpy(s->backing_swap_name, rzs->backing_swap_name, @@ -502,6 +502,14 @@ static int setup_backing_swap(struct ramzswap *rzs) goto bad_param; } disksize = i_size_read(inode); + /* + * Can happen if user gives an extended partition as + * backing swap or simply a bad disk. + */ + if (!disksize) { + pr_err("Error reading backing swap size.\n"); + goto bad_param; + } } else if (S_ISREG(inode->i_mode)) { bdev = inode->i_sb->s_bdev; if (IS_SWAPFILE(inode)) { @@ -519,7 +527,6 @@ static int setup_backing_swap(struct ramzswap *rzs) rzs->swap_file = swap_file; rzs->backing_swap = bdev; rzs->disksize = disksize; - BUG_ON(!rzs->disksize); return 0; @@ -537,7 +544,7 @@ out: * Map logical page number 'pagenum' to physical page number * on backing swap device. For block device, this is a nop. */ -u32 map_backing_swap_page(struct ramzswap *rzs, u32 pagenum) +static u32 map_backing_swap_page(struct ramzswap *rzs, u32 pagenum) { u32 skip_pages, entries_per_page; size_t delta, se_offset, skipped; @@ -668,7 +675,6 @@ static int handle_uncompressed_page(struct ramzswap *rzs, struct bio *bio) return 0; } - /* * Called when request page is not present in ramzswap. * Its either in backing swap device (if present) or @@ -936,7 +942,6 @@ out: return 0; } - /* * Check if request is within bounds and page aligned. */ @@ -1064,6 +1069,7 @@ static void reset_device(struct ramzswap *rzs) bd_release(rzs->backing_swap); filp_close(rzs->swap_file, NULL); rzs->backing_swap = NULL; + memset(rzs->backing_swap_name, 0, MAX_SWAP_NAME_LEN); } /* Reset stats */ From 1130ebbaae8ed0dcf8be707449601f8d7dbb7538 Mon Sep 17 00:00:00 2001 From: Nitin Gupta Date: Thu, 28 Jan 2010 21:21:35 +0530 Subject: [PATCH 230/367] Staging: ramzswap: Update copyright notice Update copyright notice. Signed-off-by: Nitin Gupta Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ramzswap/ramzswap_drv.c | 2 +- drivers/staging/ramzswap/ramzswap_drv.h | 2 +- drivers/staging/ramzswap/ramzswap_ioctl.h | 2 +- drivers/staging/ramzswap/xvmalloc.c | 2 +- drivers/staging/ramzswap/xvmalloc.h | 2 +- drivers/staging/ramzswap/xvmalloc_int.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/ramzswap/ramzswap_drv.c b/drivers/staging/ramzswap/ramzswap_drv.c index 1bca069211a8..5e422e254ee8 100644 --- a/drivers/staging/ramzswap/ramzswap_drv.c +++ b/drivers/staging/ramzswap/ramzswap_drv.c @@ -1,7 +1,7 @@ /* * Compressed RAM based swap device * - * Copyright (C) 2008, 2009 Nitin Gupta + * Copyright (C) 2008, 2009, 2010 Nitin Gupta * * This code is released using a dual license strategy: BSD/GPL * You can choose the licence that better fits your requirements. diff --git a/drivers/staging/ramzswap/ramzswap_drv.h b/drivers/staging/ramzswap/ramzswap_drv.h index 5b672225e174..c7e0e767c223 100644 --- a/drivers/staging/ramzswap/ramzswap_drv.h +++ b/drivers/staging/ramzswap/ramzswap_drv.h @@ -1,7 +1,7 @@ /* * Compressed RAM based swap device * - * Copyright (C) 2008, 2009 Nitin Gupta + * Copyright (C) 2008, 2009, 2010 Nitin Gupta * * This code is released using a dual license strategy: BSD/GPL * You can choose the licence that better fits your requirements. diff --git a/drivers/staging/ramzswap/ramzswap_ioctl.h b/drivers/staging/ramzswap/ramzswap_ioctl.h index 1edaebaaf81d..d26076d41bde 100644 --- a/drivers/staging/ramzswap/ramzswap_ioctl.h +++ b/drivers/staging/ramzswap/ramzswap_ioctl.h @@ -1,7 +1,7 @@ /* * Compressed RAM based swap device * - * Copyright (C) 2008, 2009 Nitin Gupta + * Copyright (C) 2008, 2009, 2010 Nitin Gupta * * This code is released using a dual license strategy: BSD/GPL * You can choose the licence that better fits your requirements. diff --git a/drivers/staging/ramzswap/xvmalloc.c b/drivers/staging/ramzswap/xvmalloc.c index dabd266a427b..3fdbb8ada827 100644 --- a/drivers/staging/ramzswap/xvmalloc.c +++ b/drivers/staging/ramzswap/xvmalloc.c @@ -1,7 +1,7 @@ /* * xvmalloc memory allocator * - * Copyright (C) 2008, 2009 Nitin Gupta + * Copyright (C) 2008, 2009, 2010 Nitin Gupta * * This code is released using a dual license strategy: BSD/GPL * You can choose the licence that better fits your requirements. diff --git a/drivers/staging/ramzswap/xvmalloc.h b/drivers/staging/ramzswap/xvmalloc.h index 010c6fe5e173..5b1a81aa5faf 100644 --- a/drivers/staging/ramzswap/xvmalloc.h +++ b/drivers/staging/ramzswap/xvmalloc.h @@ -1,7 +1,7 @@ /* * xvmalloc memory allocator * - * Copyright (C) 2008, 2009 Nitin Gupta + * Copyright (C) 2008, 2009, 2010 Nitin Gupta * * This code is released using a dual license strategy: BSD/GPL * You can choose the licence that better fits your requirements. diff --git a/drivers/staging/ramzswap/xvmalloc_int.h b/drivers/staging/ramzswap/xvmalloc_int.h index 263c72d1fb3d..e23ed5c8b8e4 100644 --- a/drivers/staging/ramzswap/xvmalloc_int.h +++ b/drivers/staging/ramzswap/xvmalloc_int.h @@ -1,7 +1,7 @@ /* * xvmalloc memory allocator * - * Copyright (C) 2008, 2009 Nitin Gupta + * Copyright (C) 2008, 2009, 2010 Nitin Gupta * * This code is released using a dual license strategy: BSD/GPL * You can choose the licence that better fits your requirements. From 50ae2a521f60a62dce3fedfc3046064a680a6d5e Mon Sep 17 00:00:00 2001 From: Benjamin Adolphi Date: Fri, 29 Jan 2010 00:16:19 +0100 Subject: [PATCH 231/367] Staging: comedi: pcm3724: Checkpatch cleanups This fixes all checkpatch issues in the pcm3724 comedi driver. Signed-off-by: Benjamin Adolphi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcm3724.c | 85 +++++++++++------------- 1 file changed, 40 insertions(+), 45 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcm3724.c b/drivers/staging/comedi/drivers/pcm3724.c index 52811824b05a..ed6103079232 100644 --- a/drivers/staging/comedi/drivers/pcm3724.c +++ b/drivers/staging/comedi/drivers/pcm3724.c @@ -121,25 +121,22 @@ static int compute_buffer(int config, int devno, struct comedi_subdevice *s) { /* 1 in io_bits indicates output */ if (s->io_bits & 0x0000ff) { - if (devno == 0) { + if (devno == 0) config |= BUF_A0; - } else { + else config |= BUF_A1; - } } if (s->io_bits & 0x00ff00) { - if (devno == 0) { + if (devno == 0) config |= BUF_B0; - } else { + else config |= BUF_B1; - } } if (s->io_bits & 0xff0000) { - if (devno == 0) { + if (devno == 0) config |= BUF_C0; - } else { + else config |= BUF_C1; - } } return config; } @@ -155,26 +152,27 @@ static void do_3724_config(struct comedi_device *dev, buffer_config = 0; /* 1 in io_bits indicates output, 1 in config indicates input */ - if (!(s->io_bits & 0x0000ff)) { + if (!(s->io_bits & 0x0000ff)) config |= CR_A_IO; - } - if (!(s->io_bits & 0x00ff00)) { + + if (!(s->io_bits & 0x00ff00)) config |= CR_B_IO; - } - if (!(s->io_bits & 0xff0000)) { + + if (!(s->io_bits & 0xff0000)) config |= CR_C_IO; - } buffer_config = compute_buffer(0, 0, dev->subdevices); buffer_config = compute_buffer(buffer_config, 1, (dev->subdevices) + 1); - if (s == dev->subdevices) { + if (s == dev->subdevices) port_8255_cfg = dev->iobase + _8255_CR; - } else { + else port_8255_cfg = dev->iobase + SIZE_8255 + _8255_CR; - } + outb(buffer_config, dev->iobase + 8); /* update buffer register */ - /* printk("pcm3724 buffer_config (%lx) %d, %x\n", dev->iobase + _8255_CR, chanspec, buffer_config); */ + /* printk("pcm3724 buffer_config (%lx) %d, %x\n", + dev->iobase + _8255_CR, chanspec, buffer_config); */ + outb(config, port_8255_cfg); } @@ -189,29 +187,29 @@ static void enable_chan(struct comedi_device *dev, struct comedi_subdevice *s, priv = (struct priv_pcm3724 *)(dev->private); mask = 1 << CR_CHAN(chanspec); - if (s == dev->subdevices) { /* subdev 0 */ + if (s == dev->subdevices) /* subdev 0 */ priv->dio_1 |= mask; - } else { /* subdev 1 */ + else /* subdev 1 */ priv->dio_2 |= mask; - } - if (priv->dio_1 & 0xff0000) { + + if (priv->dio_1 & 0xff0000) gatecfg |= GATE_C0; - } - if (priv->dio_1 & 0xff00) { + + if (priv->dio_1 & 0xff00) gatecfg |= GATE_B0; - } - if (priv->dio_1 & 0xff) { + + if (priv->dio_1 & 0xff) gatecfg |= GATE_A0; - } - if (priv->dio_2 & 0xff0000) { + + if (priv->dio_2 & 0xff0000) gatecfg |= GATE_C1; - } - if (priv->dio_2 & 0xff00) { + + if (priv->dio_2 & 0xff00) gatecfg |= GATE_B1; - } - if (priv->dio_2 & 0xff) { + + if (priv->dio_2 & 0xff) gatecfg |= GATE_A1; - } + /* printk("gate control %x\n", gatecfg); */ outb(gatecfg, dev->iobase + 9); } @@ -225,15 +223,14 @@ static int subdev_3724_insn_config(struct comedi_device *dev, unsigned int bits; mask = 1 << CR_CHAN(insn->chanspec); - if (mask & 0x0000ff) { + if (mask & 0x0000ff) bits = 0x0000ff; - } else if (mask & 0x00ff00) { + else if (mask & 0x00ff00) bits = 0x00ff00; - } else if (mask & 0x0f0000) { + else if (mask & 0x0f0000) bits = 0x0f0000; - } else { + else bits = 0xf00000; - } switch (data[0]) { case INSN_CONFIG_DIO_INPUT: @@ -272,7 +269,7 @@ static int pcm3724_attach(struct comedi_device *dev, ((struct priv_pcm3724 *)(dev->private))->dio_1 = 0; ((struct priv_pcm3724 *)(dev->private))->dio_2 = 0; - printk("comedi%d: pcm3724: board=%s, 0x%03lx ", dev->minor, + printk(KERN_INFO "comedi%d: pcm3724: board=%s, 0x%03lx ", dev->minor, this_board->name, iobase); if (!iobase || !request_region(iobase, iorange, "pcm3724")) { printk("I/O port conflict\n"); @@ -281,7 +278,7 @@ static int pcm3724_attach(struct comedi_device *dev, dev->iobase = iobase; dev->board_name = this_board->name; - printk("\n"); + printk(KERN_INFO "\n"); n_subdevices = this_board->numofports; @@ -302,13 +299,11 @@ static int pcm3724_detach(struct comedi_device *dev) int i; if (dev->subdevices) { - for (i = 0; i < dev->n_subdevices; i++) { + for (i = 0; i < dev->n_subdevices; i++) subdev_8255_cleanup(dev, dev->subdevices + i); - } } - if (dev->iobase) { + if (dev->iobase) release_region(dev->iobase, this_board->io_range); - } return 0; } From b1e68ea5e1b0829037a1dc97e8a2ef4bb6e9c91d Mon Sep 17 00:00:00 2001 From: Benjamin Adolphi Date: Fri, 29 Jan 2010 00:17:06 +0100 Subject: [PATCH 232/367] Staging: comedi: pcm3730: Checkpatch cleanups This fixes all checkpatch issues in the pcm3730 comedi driver. Signed-off-by: Benjamin Adolphi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcm3730.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcm3730.c b/drivers/staging/comedi/drivers/pcm3730.c index 9e4adbd89dda..22b7aae63add 100644 --- a/drivers/staging/comedi/drivers/pcm3730.c +++ b/drivers/staging/comedi/drivers/pcm3730.c @@ -73,7 +73,7 @@ static int pcm3730_attach(struct comedi_device *dev, unsigned long iobase; iobase = it->options[0]; - printk("comedi%d: pcm3730: 0x%04lx ", dev->minor, iobase); + printk(KERN_INFO "comedi%d: pcm3730: 0x%04lx ", dev->minor, iobase); if (!request_region(iobase, PCM3730_SIZE, "pcm3730")) { printk("I/O port conflict\n"); return -EIO; @@ -140,14 +140,14 @@ static int pcm3730_attach(struct comedi_device *dev, s->range_table = &range_digital; s->private = (void *)PCM3730_DIC; - printk("\n"); + printk(KERN_INFO "\n"); return 0; } static int pcm3730_detach(struct comedi_device *dev) { - printk("comedi%d: pcm3730: remove\n", dev->minor); + printk(KERN_INFO "comedi%d: pcm3730: remove\n", dev->minor); if (dev->iobase) release_region(dev->iobase, PCM3730_SIZE); From 94941bc805d2b77e6b548b83529b3fa5e98a3636 Mon Sep 17 00:00:00 2001 From: Benjamin Adolphi Date: Fri, 29 Jan 2010 00:28:46 +0100 Subject: [PATCH 233/367] Staging: comedi: poc: Checkpatch cleanups This fixes all checkpatch issues in the poc comedi driver. Signed-off-by: Benjamin Adolphi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/poc.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/staging/comedi/drivers/poc.c b/drivers/staging/comedi/drivers/poc.c index d23e588d0632..8990bf2fc186 100644 --- a/drivers/staging/comedi/drivers/poc.c +++ b/drivers/staging/comedi/drivers/poc.c @@ -122,22 +122,21 @@ static int poc_attach(struct comedi_device *dev, struct comedi_devconfig *it) unsigned int iosize; iobase = it->options[0]; - printk("comedi%d: poc: using %s iobase 0x%lx\n", dev->minor, + printk(KERN_INFO "comedi%d: poc: using %s iobase 0x%lx\n", dev->minor, this_board->name, iobase); dev->board_name = this_board->name; if (iobase == 0) { - printk("io base address required\n"); + printk(KERN_WARNING "io base address required\n"); return -EINVAL; } iosize = this_board->iosize; /* check if io addresses are available */ if (!request_region(iobase, iosize, "dac02")) { - printk - ("I/O port conflict: failed to allocate ports 0x%lx to 0x%lx\n", - iobase, iobase + iosize - 1); + printk(KERN_WARNING "I/O port conflict: failed to allocate " + "ports 0x%lx to 0x%lx\n", iobase, iobase + iosize - 1); return -EIO; } dev->iobase = iobase; @@ -156,9 +155,8 @@ static int poc_attach(struct comedi_device *dev, struct comedi_devconfig *it) s->insn_write = this_board->winsn; s->insn_read = this_board->rinsn; s->insn_bits = this_board->insnbits; - if (s->type == COMEDI_SUBD_AO || s->type == COMEDI_SUBD_DO) { + if (s->type == COMEDI_SUBD_AO || s->type == COMEDI_SUBD_DO) s->subdev_flags = SDF_WRITABLE; - } return 0; } @@ -169,7 +167,7 @@ static int poc_detach(struct comedi_device *dev) if (dev->iobase) release_region(dev->iobase, this_board->iosize); - printk("comedi%d: dac02: remove\n", dev->minor); + printk(KERN_INFO "comedi%d: dac02: remove\n", dev->minor); return 0; } From 900b78088567d2033c58d4e2433c3d2558f56b76 Mon Sep 17 00:00:00 2001 From: Benjamin Adolphi Date: Fri, 29 Jan 2010 00:42:30 +0100 Subject: [PATCH 234/367] Staging: comedi: ni_660x: Checkpatch cleanups This fixes all checkpatch issues in the ni_660x comedi driver. Signed-off-by: Benjamin Adolphi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_660x.c | 71 ++++++++++++------------ 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c index 1e2041447667..f74fc5e6ba20 100644 --- a/drivers/staging/comedi/drivers/ni_660x.c +++ b/drivers/staging/comedi/drivers/ni_660x.c @@ -52,7 +52,9 @@ enum ni_660x_constants { }; #define NUM_PFI_CHANNELS 40 -/* really there are only up to 3 dma channels, but the register layout allows for 4 */ +/* really there are only up to 3 dma channels, but the register layout allows +for 4 */ + #define MAX_DMA_CHANNEL 4 /* See Register-Level Programmer Manual page 3.1 */ @@ -198,7 +200,7 @@ struct NI_660xRegisterData { const char *name; /* Register Name */ int offset; /* Offset from base address from GPCT chip */ enum ni_660x_register_direction direction; - enum ni_660x_register_width size; /* 1 byte, 2 bytes, or 4 bytes */ + enum ni_660x_register_width size; /* 1 byte, 2 bytes, or 4 bytes */ }; static const struct NI_660xRegisterData registerData[NumRegisters] = { @@ -382,8 +384,8 @@ enum global_interrupt_config_register_bits { }; /* Offset of the GPCT chips from the base-adress of the card */ -static const unsigned GPCT_OFFSET[2] = { 0x0, 0x800 }; /* First chip is at base-address + - 0x00, etc. */ +/* First chip is at base-address + 0x00, etc. */ +static const unsigned GPCT_OFFSET[2] = { 0x0, 0x800 }; /* Board description*/ struct ni_660x_board { @@ -712,7 +714,7 @@ static enum NI_660x_Register ni_gpct_to_660x_register(enum ni_gpct_register reg) ni_660x_register = G3InterruptEnable; break; default: - printk("%s: unhandled register 0x%x in switch.\n", + printk(KERN_WARNING "%s: unhandled register 0x%x in switch.\n", __func__, reg); BUG(); return 0; @@ -737,7 +739,7 @@ static inline void ni_660x_write_register(struct comedi_device *dev, writel(bits, write_address); break; default: - printk("%s: %s: bug! unhandled case (reg=0x%x) in switch.\n", + printk(KERN_WARNING "%s: %s: bug! unhandled case (reg=0x%x) in switch.\n", __FILE__, __func__, reg); BUG(); break; @@ -760,7 +762,7 @@ static inline unsigned ni_660x_read_register(struct comedi_device *dev, return readl(read_address); break; default: - printk("%s: %s: bug! unhandled case (reg=0x%x) in switch.\n", + printk(KERN_WARNING "%s: %s: bug! unhandled case (reg=0x%x) in switch.\n", __FILE__, __func__, reg); BUG(); break; @@ -993,9 +995,9 @@ static int ni_660x_allocate_private(struct comedi_device *dev) spin_lock_init(&private(dev)->mite_channel_lock); spin_lock_init(&private(dev)->interrupt_lock); spin_lock_init(&private(dev)->soft_reg_copy_lock); - for (i = 0; i < NUM_PFI_CHANNELS; ++i) { + for (i = 0; i < NUM_PFI_CHANNELS; ++i) private(dev)->pfi_output_selects[i] = pfi_output_select_counter; - } + return 0; } @@ -1008,9 +1010,8 @@ static int ni_660x_alloc_mite_rings(struct comedi_device *dev) for (j = 0; j < counters_per_chip; ++j) { private(dev)->mite_rings[i][j] = mite_alloc_ring(private(dev)->mite); - if (private(dev)->mite_rings[i][j] == NULL) { + if (private(dev)->mite_rings[i][j] == NULL) return -ENOMEM; - } } } return 0; @@ -1022,9 +1023,8 @@ static void ni_660x_free_mite_rings(struct comedi_device *dev) unsigned j; for (i = 0; i < board(dev)->n_chips; ++i) { - for (j = 0; j < counters_per_chip; ++j) { + for (j = 0; j < counters_per_chip; ++j) mite_free_ring(private(dev)->mite_rings[i][j]); - } } } @@ -1036,7 +1036,7 @@ static int ni_660x_attach(struct comedi_device *dev, unsigned i; unsigned global_interrupt_config_bits; - printk("comedi%d: ni_660x: ", dev->minor); + printk(KERN_INFO "comedi%d: ni_660x: ", dev->minor); ret = ni_660x_allocate_private(dev); if (ret < 0) @@ -1049,7 +1049,7 @@ static int ni_660x_attach(struct comedi_device *dev, ret = mite_setup2(private(dev)->mite, 1); if (ret < 0) { - printk("error setting up mite\n"); + printk(KERN_WARNING "error setting up mite\n"); return ret; } comedi_set_hw_dev(dev, &private(dev)->mite->pcidev->dev); @@ -1057,7 +1057,7 @@ static int ni_660x_attach(struct comedi_device *dev, if (ret < 0) return ret; - printk(" %s ", dev->board_name); + printk(KERN_INFO " %s ", dev->board_name); dev->n_subdevices = 2 + NI_660X_MAX_NUM_COUNTERS; @@ -1078,15 +1078,17 @@ static int ni_660x_attach(struct comedi_device *dev, s->insn_bits = ni_660x_dio_insn_bits; s->insn_config = ni_660x_dio_insn_config; s->io_bits = 0; /* all bits default to input */ - /* we use the ioconfig registers to control dio direction, so zero output enables in stc dio control reg */ + /* we use the ioconfig registers to control dio direction, so zero + output enables in stc dio control reg */ ni_660x_write_register(dev, 0, 0, STCDIOControl); - private(dev)->counter_dev = ni_gpct_device_construct(dev, - &ni_gpct_write_register, - &ni_gpct_read_register, - ni_gpct_variant_660x, - ni_660x_num_counters - (dev)); + private(dev)->counter_dev + = ni_gpct_device_construct(dev, + &ni_gpct_write_register, + &ni_gpct_read_register, + ni_gpct_variant_660x, + ni_660x_num_counters + (dev)); if (private(dev)->counter_dev == NULL) return -ENOMEM; for (i = 0; i < NI_660X_MAX_NUM_COUNTERS; ++i) { @@ -1118,12 +1120,12 @@ static int ni_660x_attach(struct comedi_device *dev, s->type = COMEDI_SUBD_UNUSED; } } - for (i = 0; i < board(dev)->n_chips; ++i) { + for (i = 0; i < board(dev)->n_chips; ++i) init_tio_chip(dev, i); - } - for (i = 0; i < ni_660x_num_counters(dev); ++i) { + + for (i = 0; i < ni_660x_num_counters(dev); ++i) ni_tio_init_counter(&private(dev)->counter_dev->counters[i]); - } + for (i = 0; i < NUM_PFI_CHANNELS; ++i) { if (i < min_counter_pfi_chan) ni_660x_set_pfi_routing(dev, i, pfi_output_select_do); @@ -1134,13 +1136,13 @@ static int ni_660x_attach(struct comedi_device *dev, } /* to be safe, set counterswap bits on tio chips after all the counter outputs have been set to high impedance mode */ - for (i = 0; i < board(dev)->n_chips; ++i) { + for (i = 0; i < board(dev)->n_chips; ++i) set_tio_counterswap(dev, i); - } + ret = request_irq(mite_irq(private(dev)->mite), ni_660x_interrupt, IRQF_SHARED, "ni_660x", dev); if (ret < 0) { - printk(" irq not available\n"); + printk(KERN_WARNING " irq not available\n"); return ret; } dev->irq = mite_irq(private(dev)->mite); @@ -1149,13 +1151,13 @@ static int ni_660x_attach(struct comedi_device *dev, global_interrupt_config_bits |= Cascade_Int_Enable_Bit; ni_660x_write_register(dev, 0, global_interrupt_config_bits, GlobalInterruptConfigRegister); - printk("attached\n"); + printk(KERN_INFO "attached\n"); return 0; } static int ni_660x_detach(struct comedi_device *dev) { - printk("comedi%d: ni_660x: remove\n", dev->minor); + printk(KERN_INFO "comedi%d: ni_660x: remove\n", dev->minor); /* Free irq */ if (dev->irq) @@ -1193,9 +1195,8 @@ static void init_tio_chip(struct comedi_device *dev, int chipset) private(dev)-> dma_configuration_soft_copies[chipset], DMAConfigRegister); - for (i = 0; i < NUM_PFI_CHANNELS; ++i) { + for (i = 0; i < NUM_PFI_CHANNELS; ++i) ni_660x_write_register(dev, chipset, 0, IOConfigReg(i)); - } } static int @@ -1234,7 +1235,7 @@ static int ni_660x_find_device(struct comedi_device *dev, int bus, int slot) } } } - printk("no device found\n"); + printk(KERN_WARNING "no device found\n"); mite_list_devices(); return -EIO; } From c733110ae3c49a69907b89f37ff1721a157df0f3 Mon Sep 17 00:00:00 2001 From: Benjamin Adolphi Date: Sat, 30 Jan 2010 12:40:29 +0100 Subject: [PATCH 235/367] Staging: comedi: ni_670x: Checkpatch cleanups This fixes all checkpatch issues in the ni_670x comedi driver. Signed-off-by: Benjamin Adolphi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_670x.c | 32 +++++++++++++----------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_670x.c b/drivers/staging/comedi/drivers/ni_670x.c index 9b43547e80a1..1e792d592f73 100644 --- a/drivers/staging/comedi/drivers/ni_670x.c +++ b/drivers/staging/comedi/drivers/ni_670x.c @@ -93,7 +93,7 @@ static DEFINE_PCI_DEVICE_TABLE(ni_670x_pci_table) = { { PCI_VENDOR_ID_NATINST, 0x2c90, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, { PCI_VENDOR_ID_NATINST, 0x1920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, - /* { PCI_VENDOR_ID_NATINST, 0x0000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, */ + /*{ PCI_VENDOR_ID_NATINST, 0x0000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },*/ { 0} }; @@ -151,7 +151,7 @@ static int ni_670x_attach(struct comedi_device *dev, int ret; int i; - printk("comedi%d: ni_670x: ", dev->minor); + printk(KERN_INFO "comedi%d: ni_670x: ", dev->minor); ret = alloc_private(dev, sizeof(struct ni_670x_private)); if (ret < 0) @@ -163,12 +163,12 @@ static int ni_670x_attach(struct comedi_device *dev, ret = mite_setup(devpriv->mite); if (ret < 0) { - printk("error setting up mite\n"); + printk(KERN_WARNING "error setting up mite\n"); return ret; } dev->board_name = thisboard->name; dev->irq = mite_irq(devpriv->mite); - printk(" %s", dev->board_name); + printk(KERN_INFO " %s", dev->board_name); if (alloc_subdevices(dev, 2) < 0) return -ENOMEM; @@ -207,21 +207,22 @@ static int ni_670x_attach(struct comedi_device *dev, s->insn_bits = ni_670x_dio_insn_bits; s->insn_config = ni_670x_dio_insn_config; - writel(0x10, devpriv->mite->daq_io_addr + MISC_CONTROL_OFFSET); /* Config of misc registers */ - writel(0x00, devpriv->mite->daq_io_addr + AO_CONTROL_OFFSET); /* Config of ao registers */ + /* Config of misc registers */ + writel(0x10, devpriv->mite->daq_io_addr + MISC_CONTROL_OFFSET); + /* Config of ao registers */ + writel(0x00, devpriv->mite->daq_io_addr + AO_CONTROL_OFFSET); - printk("attached\n"); + printk(KERN_INFO "attached\n"); return 1; } static int ni_670x_detach(struct comedi_device *dev) { - printk("comedi%d: ni_670x: remove\n", dev->minor); + printk(KERN_INFO "comedi%d: ni_670x: remove\n", dev->minor); + + kfree(dev->subdevices[0].range_table_list); - if (dev->subdevices[0].range_table_list) { - kfree(dev->subdevices[0].range_table_list); - } if (dev->private && devpriv->mite) mite_unsetup(devpriv->mite); @@ -250,8 +251,11 @@ static int ni_670x_ao_winsn(struct comedi_device *dev, vch(15) : 30 | ich(31) : 31 */ for (i = 0; i < insn->n; i++) { - writel(((chan & 15) << 1) | ((chan & 16) >> 4), devpriv->mite->daq_io_addr + AO_CHAN_OFFSET); /* First write in channel register which channel to use */ - writel(data[i], devpriv->mite->daq_io_addr + AO_VALUE_OFFSET); /* write channel value */ + /* First write in channel register which channel to use */ + writel(((chan & 15) << 1) | ((chan & 16) >> 4), + devpriv->mite->daq_io_addr + AO_CHAN_OFFSET); + /* write channel value */ + writel(data[i], devpriv->mite->daq_io_addr + AO_VALUE_OFFSET); devpriv->ao_readback[chan] = data[i]; } @@ -344,7 +348,7 @@ static int ni_670x_find_device(struct comedi_device *dev, int bus, int slot) } } } - printk("no device found\n"); + printk(KERN_INFO "no device found\n"); mite_list_devices(); return -EIO; } From d8dfb3882e12539f34c6eeb01dee6f425e92e892 Mon Sep 17 00:00:00 2001 From: Benjamin Adolphi Date: Sat, 30 Jan 2010 13:03:20 +0100 Subject: [PATCH 236/367] Staging: comedi: ni_65xx: Checkpatch cleanups This fixes all checkpatch issues in the ni_65xx comedi driver. Signed-off-by: Benjamin Adolphi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_65xx.c | 49 ++++++++++++------------ 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_65xx.c b/drivers/staging/comedi/drivers/ni_65xx.c index bbf75eb6d7f2..c223f76031f6 100644 --- a/drivers/staging/comedi/drivers/ni_65xx.c +++ b/drivers/staging/comedi/drivers/ni_65xx.c @@ -26,12 +26,13 @@ /* Driver: ni_65xx Description: National Instruments 65xx static dio boards -Author: Jon Grierson , Frank Mori Hess +Author: Jon Grierson , + Frank Mori Hess Status: testing -Devices: [National Instruments] PCI-6509 (ni_65xx), PXI-6509, PCI-6510, PCI-6511, - PXI-6511, PCI-6512, PXI-6512, PCI-6513, PXI-6513, PCI-6514, PXI-6514, PCI-6515, - PXI-6515, PCI-6516, PCI-6517, PCI-6518, PCI-6519, PCI-6520, PCI-6521, PXI-6521, - PCI-6528, PXI-6528 +Devices: [National Instruments] PCI-6509 (ni_65xx), PXI-6509, PCI-6510, + PCI-6511, PXI-6511, PCI-6512, PXI-6512, PCI-6513, PXI-6513, PCI-6514, + PXI-6514, PCI-6515, PXI-6515, PCI-6516, PCI-6517, PCI-6518, PCI-6519, + PCI-6520, PCI-6521, PXI-6521, PCI-6528, PXI-6528 Updated: Wed Oct 18 08:59:11 EDT 2006 Based on the PCI-6527 driver by ds. @@ -418,9 +419,10 @@ static int ni_65xx_dio_insn_bits(struct comedi_device *dev, return -EINVAL; base_bitfield_channel = CR_CHAN(insn->chanspec); for (j = 0; j < max_ports_per_bitfield; ++j) { - const unsigned port_offset = ni_65xx_port_by_channel(base_bitfield_channel) + j; + const unsigned port_offset = + ni_65xx_port_by_channel(base_bitfield_channel) + j; const unsigned port = - sprivate(s)->base_port + port_offset; + sprivate(s)->base_port + port_offset; unsigned base_port_channel; unsigned port_mask, port_data, port_read_bits; int bitshift; @@ -463,11 +465,11 @@ static int ni_65xx_dio_insn_bits(struct comedi_device *dev, * subdevice.) */ port_read_bits ^= 0xFF; } - if (bitshift > 0) { + if (bitshift > 0) port_read_bits <<= bitshift; - } else { + else port_read_bits >>= -bitshift; - } + read_bits |= port_read_bits; } data[1] = read_bits; @@ -532,7 +534,8 @@ static int ni_65xx_intr_cmdtest(struct comedi_device *dev, if (err) return 1; - /* step 2: make sure trigger sources are unique and mutually compatible */ + /* step 2: make sure trigger sources are unique and mutually + compatible */ if (err) return 2; @@ -652,7 +655,7 @@ static int ni_65xx_attach(struct comedi_device *dev, unsigned i; int ret; - printk("comedi%d: ni_65xx:", dev->minor); + printk(KERN_INFO "comedi%d: ni_65xx:", dev->minor); ret = alloc_private(dev, sizeof(struct ni_65xx_private)); if (ret < 0) @@ -664,15 +667,15 @@ static int ni_65xx_attach(struct comedi_device *dev, ret = mite_setup(private(dev)->mite); if (ret < 0) { - printk("error setting up mite\n"); + printk(KERN_WARNING "error setting up mite\n"); return ret; } dev->board_name = board(dev)->name; dev->irq = mite_irq(private(dev)->mite); - printk(" %s", dev->board_name); + printk(KERN_INFO " %s", dev->board_name); - printk(" ID=0x%02x", + printk(KERN_INFO " ID=0x%02x", readb(private(dev)->mite->daq_io_addr + ID_Register)); ret = alloc_subdevices(dev, 4); @@ -773,7 +776,7 @@ static int ni_65xx_attach(struct comedi_device *dev, "ni_65xx", dev); if (ret < 0) { dev->irq = 0; - printk(" irq not available"); + printk(KERN_WARNING " irq not available"); } printk("\n"); @@ -790,21 +793,17 @@ static int ni_65xx_detach(struct comedi_device *dev) Master_Interrupt_Control); } - if (dev->irq) { + if (dev->irq) free_irq(dev->irq, dev); - } if (private(dev)) { unsigned i; for (i = 0; i < dev->n_subdevices; ++i) { - if (dev->subdevices[i].private) { - kfree(dev->subdevices[i].private); - dev->subdevices[i].private = NULL; - } + kfree(dev->subdevices[i].private); + dev->subdevices[i].private = NULL; } - if (private(dev)->mite) { + if (private(dev)->mite) mite_unsetup(private(dev)->mite); - } } return 0; } @@ -830,7 +829,7 @@ static int ni_65xx_find_device(struct comedi_device *dev, int bus, int slot) } } } - printk("no device found\n"); + printk(KERN_WARNING "no device found\n"); mite_list_devices(); return -EIO; } From 27aa7320972a130ba3cd2d4004c2568e7c40f01e Mon Sep 17 00:00:00 2001 From: Benjamin Adolphi Date: Sun, 31 Jan 2010 23:29:28 +0100 Subject: [PATCH 237/367] Staging: comedi: fl512: Checkpatch cleanups This fixes all checkpatch issues in the fl512 comedi driver. Signed-off-by: Benjamin Adolphi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/fl512.c | 72 ++++++++++++++++---------- 1 file changed, 44 insertions(+), 28 deletions(-) diff --git a/drivers/staging/comedi/drivers/fl512.c b/drivers/staging/comedi/drivers/fl512.c index 8fca18043357..a10a2b070a24 100644 --- a/drivers/staging/comedi/drivers/fl512.c +++ b/drivers/staging/comedi/drivers/fl512.c @@ -76,14 +76,14 @@ static int fl512_ai_insn(struct comedi_device *dev, unsigned long iobase = dev->iobase; for (n = 0; n < insn->n; n++) { /* sample n times on selected channel */ - /* XXX probably can move next step out of for() loop -- will make - * AI a little bit faster. */ + /* XXX probably can move next step out of for() loop -- will + * make AI a little bit faster. */ outb(chan, iobase + 2); /* select chan */ outb(0, iobase + 3); /* start conversion */ /* XXX should test "done" flag instead of delay */ udelay(30); /* sleep 30 usec */ lo_byte = inb(iobase + 2); /* low 8 byte */ - hi_byte = inb(iobase + 3) & 0xf; /* high 4 bit and mask */ + hi_byte = inb(iobase + 3) & 0xf; /* high 4 bit and mask */ data[n] = lo_byte + (hi_byte << 8); } return n; @@ -101,8 +101,10 @@ static int fl512_ao_insn(struct comedi_device *dev, unsigned long iobase = dev->iobase; /* get base address */ for (n = 0; n < insn->n; n++) { /* write n data set */ - outb(data[n] & 0x0ff, iobase + 4 + 2 * chan); /* write low byte */ - outb((data[n] & 0xf00) >> 8, iobase + 4 + 2 * chan); /* write high byte */ + /* write low byte */ + outb(data[n] & 0x0ff, iobase + 4 + 2 * chan); + /* write high byte */ + outb((data[n] & 0xf00) >> 8, iobase + 4 + 2 * chan); inb(iobase + 4 + 2 * chan); /* trig */ devpriv->ao_readback[chan] = data[n]; @@ -121,9 +123,8 @@ static int fl512_ao_insn_readback(struct comedi_device *dev, int n; int chan = CR_CHAN(insn->chanspec); - for (n = 0; n < insn->n; n++) { + for (n = 0; n < insn->n; n++) data[n] = devpriv->ao_readback[chan]; - } return n; } @@ -134,13 +135,15 @@ static int fl512_ao_insn_readback(struct comedi_device *dev, static int fl512_attach(struct comedi_device *dev, struct comedi_devconfig *it) { unsigned long iobase; - struct comedi_subdevice *s; /* pointer to the subdevice: - Analog in, Analog out, ( not made ->and Digital IO) */ + + /* pointer to the subdevice: Analog in, Analog out, + (not made ->and Digital IO) */ + struct comedi_subdevice *s; iobase = it->options[0]; - printk("comedi:%d fl512: 0x%04lx", dev->minor, iobase); + printk(KERN_INFO "comedi:%d fl512: 0x%04lx", dev->minor, iobase); if (!request_region(iobase, FL512_SIZE, "fl512")) { - printk(" I/O port conflict\n"); + printk(KERN_WARNING " I/O port conflict\n"); return -EIO; } dev->iobase = iobase; @@ -149,7 +152,7 @@ static int fl512_attach(struct comedi_device *dev, struct comedi_devconfig *it) return -ENOMEM; #if DEBUG - printk("malloc ok\n"); + printk(KERN_DEBUG "malloc ok\n"); #endif if (alloc_subdevices(dev, 2) < 0) @@ -160,24 +163,37 @@ static int fl512_attach(struct comedi_device *dev, struct comedi_devconfig *it) */ /* Analog indput */ s = dev->subdevices + 0; - s->type = COMEDI_SUBD_AI; /* define subdevice as Analog In */ - s->subdev_flags = SDF_READABLE | SDF_GROUND; /* you can read it from userspace */ - s->n_chan = 16; /* Number of Analog input channels */ - s->maxdata = 0x0fff; /* accept only 12 bits of data */ - s->range_table = &range_fl512; /* device use one of the ranges */ - s->insn_read = fl512_ai_insn; /* function to call when read AD */ - printk("comedi: fl512: subdevice 0 initialized\n"); + /* define subdevice as Analog In */ + s->type = COMEDI_SUBD_AI; + /* you can read it from userspace */ + s->subdev_flags = SDF_READABLE | SDF_GROUND; + /* Number of Analog input channels */ + s->n_chan = 16; + /* accept only 12 bits of data */ + s->maxdata = 0x0fff; + /* device use one of the ranges */ + s->range_table = &range_fl512; + /* function to call when read AD */ + s->insn_read = fl512_ai_insn; + printk(KERN_INFO "comedi: fl512: subdevice 0 initialized\n"); /* Analog output */ s = dev->subdevices + 1; - s->type = COMEDI_SUBD_AO; /* define subdevice as Analog OUT */ - s->subdev_flags = SDF_WRITABLE; /* you can write it from userspace */ - s->n_chan = 2; /* Number of Analog output channels */ - s->maxdata = 0x0fff; /* accept only 12 bits of data */ - s->range_table = &range_fl512; /* device use one of the ranges */ - s->insn_write = fl512_ao_insn; /* function to call when write DA */ - s->insn_read = fl512_ao_insn_readback; /* function to call when reading DA */ - printk("comedi: fl512: subdevice 1 initialized\n"); + /* define subdevice as Analog OUT */ + s->type = COMEDI_SUBD_AO; + /* you can write it from userspace */ + s->subdev_flags = SDF_WRITABLE; + /* Number of Analog output channels */ + s->n_chan = 2; + /* accept only 12 bits of data */ + s->maxdata = 0x0fff; + /* device use one of the ranges */ + s->range_table = &range_fl512; + /* function to call when write DA */ + s->insn_write = fl512_ao_insn; + /* function to call when reading DA */ + s->insn_read = fl512_ao_insn_readback; + printk(KERN_INFO "comedi: fl512: subdevice 1 initialized\n"); return 1; } @@ -186,6 +202,6 @@ static int fl512_detach(struct comedi_device *dev) { if (dev->iobase) release_region(dev->iobase, FL512_SIZE); - printk("comedi%d: fl512: dummy i detach\n", dev->minor); + printk(KERN_INFO "comedi%d: fl512: dummy i detach\n", dev->minor); return 0; } From 7df1735bebee6d1f3492c79ab110f3a6e67e0244 Mon Sep 17 00:00:00 2001 From: Benjamin Adolphi Date: Mon, 1 Feb 2010 00:04:14 +0100 Subject: [PATCH 238/367] Staging: comedi: adq12b: Checkpatch cleanups 2 This fixes all checkpatch issues in the adq12b comedi driver. Signed-off-by: Benjamin Adolphi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adq12b.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/staging/comedi/drivers/adq12b.c b/drivers/staging/comedi/drivers/adq12b.c index 4590cac612d4..f3ba645bf63b 100644 --- a/drivers/staging/comedi/drivers/adq12b.c +++ b/drivers/staging/comedi/drivers/adq12b.c @@ -201,15 +201,16 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it) unipolar = it->options[1]; differential = it->options[2]; - printk("comedi%d: adq12b called with options base=0x%03lx, %s and %s\n", - dev->minor, iobase, (unipolar == 1) ? "unipolar" : "bipolar", + printk(KERN_INFO "comedi%d: adq12b called with options base=0x%03lx, " + "%s and %s\n", dev->minor, iobase, + (unipolar == 1) ? "unipolar" : "bipolar", (differential == 1) ? "differential" : "single-ended"); /* if no address was specified, try the default 0x300 */ if (iobase == 0) { - printk - ("comedi%d: adq12b warning: I/O base address not specified. Trying the default 0x300.\n", - dev->minor); + printk(KERN_WARNING "comedi%d: adq12b warning: I/O base " + "address not specified. Trying the default 0x300.\n", + dev->minor); iobase = 0x300; } @@ -289,7 +290,7 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it) s->range_table = &range_digital; s->insn_bits = adq12b_do_insn_bits; - printk("attached\n"); + printk(KERN_INFO "attached\n"); return 0; } @@ -309,7 +310,7 @@ static int adq12b_detach(struct comedi_device *dev) kfree(devpriv); - printk("comedi%d: adq12b: removed\n", dev->minor); + printk(KERN_INFO "comedi%d: adq12b: removed\n", dev->minor); return 0; } @@ -354,7 +355,8 @@ static int adq12b_ai_rinsn(struct comedi_device *dev, hi = inb(dev->iobase + ADQ12B_ADHIG); lo = inb(dev->iobase + ADQ12B_ADLOW); - /* printk("debug: chan=%d range=%d status=%d hi=%d lo=%d\n", channel, range, status, hi, lo); */ + /* printk("debug: chan=%d range=%d status=%d hi=%d lo=%d\n", + channel, range, status, hi, lo); */ data[n] = (hi << 8) | lo; } From bc56894234e55ad53419cfda1bbfc401a8be3e46 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Sun, 31 Jan 2010 12:02:08 -0800 Subject: [PATCH 239/367] Staging: Fix continuation line formats String constants that are continued on subsequent lines with \ are not good. Fixed a "is tryied" / tried typo Signed-off-by: Joe Perches Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dream/qdsp5/audio_mp3.c | 3 +-- drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c | 3 +-- drivers/staging/rtl8187se/r8180_core.c | 3 +-- drivers/staging/sep/sep_driver.c | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/staging/dream/qdsp5/audio_mp3.c b/drivers/staging/dream/qdsp5/audio_mp3.c index b95574f699ff..7ed6e261d6c9 100644 --- a/drivers/staging/dream/qdsp5/audio_mp3.c +++ b/drivers/staging/dream/qdsp5/audio_mp3.c @@ -650,8 +650,7 @@ static long audio_ioctl(struct file *file, unsigned int cmd, unsigned long arg) &audio->read_phys, GFP_KERNEL); if (!audio->read_data) { - pr_err("audio_mp3: malloc pcm \ - buf failed\n"); + pr_err("audio_mp3: malloc pcm buf failed\n"); rc = -1; } else { uint8_t index; diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c index f1d6cb452563..ad42bcdc9374 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c @@ -482,8 +482,7 @@ int ieee80211_wx_set_power(struct ieee80211_device *ieee, (!ieee->enter_sleep_state) || (!ieee->ps_is_queue_empty)){ - printk("ERROR. PS mode is tryied to be use but\ -driver missed a callback\n\n"); + printk("ERROR. PS mode tried to be use but driver missed a callback\n\n"); return -1; } diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index 9c2f4d3b58c7..33363c47c265 100644 --- a/drivers/staging/rtl8187se/r8180_core.c +++ b/drivers/staging/rtl8187se/r8180_core.c @@ -3813,8 +3813,7 @@ static int __init rtl8180_pci_module_init(void) return ret; } - printk(KERN_INFO "\nLinux kernel driver for RTL8180 \ -/ RTL8185 based WLAN cards\n"); + printk(KERN_INFO "\nLinux kernel driver for RTL8180 / RTL8185 based WLAN cards\n"); printk(KERN_INFO "Copyright (c) 2004-2005, Andrea Merello\n"); DMESG("Initializing module"); DMESG("Wireless extensions version %d", WIRELESS_EXT); diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c index 8ab3be684098..f9a492a8cef4 100644 --- a/drivers/staging/sep/sep_driver.c +++ b/drivers/staging/sep/sep_driver.c @@ -384,8 +384,7 @@ static int sep_mmap(struct file *filp, struct vm_area_struct *vma) shared area */ if ((vma->vm_end - vma->vm_start) > SEP_DRIVER_MMMAP_AREA_SIZE) { edbg("SEP Driver mmap requested size is more than allowed\n"); - printk(KERN_WARNING "SEP Driver mmap requested size is more \ - than allowed\n"); + printk(KERN_WARNING "SEP Driver mmap requested size is more than allowed\n"); printk(KERN_WARNING "SEP Driver vma->vm_end is %08lx\n", vma->vm_end); printk(KERN_WARNING "SEP Driver vma->vm_end is %08lx\n", vma->vm_start); return -EAGAIN; From 8455cd1bdba3331e07291c455ca70be33ff39860 Mon Sep 17 00:00:00 2001 From: Richard Kennedy Date: Thu, 4 Feb 2010 11:33:49 +0000 Subject: [PATCH 240/367] Staging: wlan-ng: minor cleanups Remove iw_handle_def private initialisations as they are no longer need these. Signed-off-by: Richard Kennedy Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/p80211wext.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c index 63bdaaa7a7aa..cc4b1ca80d6f 100644 --- a/drivers/staging/wlan-ng/p80211wext.c +++ b/drivers/staging/wlan-ng/p80211wext.c @@ -1744,11 +1744,7 @@ static iw_handler p80211wext_handlers[] = { struct iw_handler_def p80211wext_handler_def = { .num_standard = ARRAY_SIZE(p80211wext_handlers), - .num_private = 0, - .num_private_args = 0, .standard = p80211wext_handlers, - .private = NULL, - .private_args = NULL, .get_wireless_stats = p80211wext_get_wireless_stats }; From c7e10c99565d7a4d2f4bcc37e7bccd6c8120a0a3 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Mon, 1 Feb 2010 23:22:14 -0800 Subject: [PATCH 241/367] Staging: Fix continuation line formats String constants that are continued on subsequent lines with \ are not good. Signed-off-by: Joe Perches Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192su/r8192S_phy.c | 16 ++++++++-------- drivers/staging/sep/sep_driver.c | 5 +++-- drivers/staging/slicoss/slicoss.c | 6 ++---- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/drivers/staging/rtl8192su/r8192S_phy.c b/drivers/staging/rtl8192su/r8192S_phy.c index 77ab026288d3..63d4e5fd7b18 100644 --- a/drivers/staging/rtl8192su/r8192S_phy.c +++ b/drivers/staging/rtl8192su/r8192S_phy.c @@ -2407,8 +2407,8 @@ void PHY_SetBWModeCallback8192S(struct net_device *dev) break; default: - RT_TRACE(COMP_DBG, "SetBWModeCallback8190Pci():\ - unknown Bandwidth: %#X\n",priv->CurrentChannelBW); + RT_TRACE(COMP_DBG, "SetBWModeCallback8190Pci(): unknown Bandwidth: %#X\n", + priv->CurrentChannelBW); break; } @@ -3398,8 +3398,8 @@ void SwChnlCallback8192SUsb(struct net_device *dev) u32 delay; // bool ret; - RT_TRACE(COMP_SCAN, "==>SwChnlCallback8190Pci(), switch to channel\ - %d\n", priv->chan); + RT_TRACE(COMP_SCAN, "==>SwChnlCallback8190Pci(), switch to channel %d\n", + priv->chan); if(!priv->up) @@ -3525,8 +3525,8 @@ void SetBWModeCallback8192SUsb(struct net_device *dev) break; default: - RT_TRACE(COMP_DBG, "SetChannelBandwidth8190Pci():\ - unknown Bandwidth: %#X\n",priv->CurrentChannelBW); + RT_TRACE(COMP_DBG, "SetChannelBandwidth8190Pci(): unknown Bandwidth: %#X\n", + priv->CurrentChannelBW); break; } @@ -3660,8 +3660,8 @@ void SetBWModeCallback8192SUsbWorkItem(struct net_device *dev) break; default: - RT_TRACE(COMP_DBG, "SetBWModeCallback8192SUsbWorkItem():\ - unknown Bandwidth: %#X\n",priv->CurrentChannelBW); + RT_TRACE(COMP_DBG, "SetBWModeCallback8192SUsbWorkItem(): unknown Bandwidth: %#X\n", + priv->CurrentChannelBW); break; } diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c index f9a492a8cef4..265de7949a78 100644 --- a/drivers/staging/sep/sep_driver.c +++ b/drivers/staging/sep/sep_driver.c @@ -944,8 +944,9 @@ static int sep_lock_user_pages(struct sep_device *sep, dbg("data_size is %lu\n", data_size); while (1); } - edbg("lli_array[%lu].physical_address is %08lx, \ - lli_array[%lu].block_size is %lu\n", count, lli_array[count].physical_address, count, lli_array[count].block_size); + edbg("lli_array[%lu].physical_address is %08lx, lli_array[%lu].block_size is %lu\n", + count, lli_array[count].physical_address, + count, lli_array[count].block_size); } /* set output params */ diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index 87d98e38d3b5..37e518656afa 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -658,8 +658,7 @@ static int slic_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) if (copy_from_user(data, rq->ifr_data, 28)) { PRINT_ERROR - ("slic: copy_from_user FAILED getting \ - initial simba param\n"); + ("slic: copy_from_user FAILED getting initial simba param\n"); return -EFAULT; } @@ -674,8 +673,7 @@ static int slic_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) (tracemon_request == SLIC_DUMP_IN_PROGRESS)) { PRINT_ERROR - ("ATK Diagnostic Trace Dump Requested but \ - already in progress... ignore\n"); + ("ATK Diagnostic Trace Dump Requested but already in progress... ignore\n"); } else { PRINT_ERROR ("ATK Diagnostic Trace Dump Requested\n"); From 412bd046b0a1726f8b168d5056d21213932f9d84 Mon Sep 17 00:00:00 2001 From: tony burrows Date: Tue, 2 Feb 2010 16:52:49 +0000 Subject: [PATCH 242/367] Staging: comedi: fix brace coding style issues in ni_labpc.c This patch fixes all of the brace style warnings found by the checkpatch.pl tool Signed-off-by: Tony Burrows Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_labpc.c | 36 ++++++++++------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index 647c9b72b551..566b791e00c7 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -483,12 +483,10 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase, printk("comedi%d: ni_labpc: %s, io 0x%lx", dev->minor, thisboard->name, iobase); - if (irq) { + if (irq) printk(", irq %u", irq); - } - if (dma_chan) { + if (dma_chan) printk(", dma %u", dma_chan); - } printk("\n"); if (iobase == 0) { @@ -585,8 +583,9 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase, /* analog output */ s = dev->subdevices + 1; if (thisboard->has_ao) { -/* Could provide command support, except it only has a one sample - * hardware buffer for analog output and no underrun flag. */ + /* Could provide command support, except it only has a + * one sample hardware buffer for analog output and no + * underrun flag. */ s->type = COMEDI_SUBD_AO; s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_GROUND; s->n_chan = NUM_AO_CHAN; @@ -608,7 +607,8 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase, /* 8255 dio */ s = dev->subdevices + 2; - /* if board uses io memory we have to give a custom callback function to the 8255 driver */ + /* if board uses io memory we have to give a custom callback + * function to the 8255 driver */ if (thisboard->memory_mapped_io) subdev_8255_init(dev, s, labpc_dio_mem_callback, (unsigned long)(dev->iobase + DIO_BASE_REG)); @@ -640,14 +640,12 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase, s->insn_read = labpc_eeprom_read_insn; s->insn_write = labpc_eeprom_write_insn; - for (i = 0; i < EEPROM_SIZE; i++) { + for (i = 0; i < EEPROM_SIZE; i++) devpriv->eeprom_data[i] = labpc_eeprom_read(dev, i); - } #ifdef LABPC_DEBUG printk(" eeprom:"); - for (i = 0; i < EEPROM_SIZE; i++) { + for (i = 0; i < EEPROM_SIZE; i++) printk(" %i:0x%x ", i, devpriv->eeprom_data[i]); - } printk("\n"); #endif } else @@ -679,9 +677,8 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it) case pci_bustype: #ifdef CONFIG_COMEDI_PCI retval = labpc_find_device(dev, it->options[0], it->options[1]); - if (retval < 0) { + if (retval < 0) return retval; - } retval = mite_setup(devpriv->mite); if (retval < 0) return retval; @@ -1008,9 +1005,9 @@ static int labpc_ai_cmdtest(struct comedi_device *dev, err++; } - if (!cmd->chanlist_len) { + if (!cmd->chanlist_len) err++; - } + if (cmd->scan_end_arg != cmd->chanlist_len) { cmd->scan_end_arg = cmd->chanlist_len; err++; @@ -1105,9 +1102,8 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) devpriv->write_byte(devpriv->command3_bits, dev->iobase + COMMAND3_REG); /* initialize software conversion count */ - if (cmd->stop_src == TRIG_COUNT) { + if (cmd->stop_src == TRIG_COUNT) devpriv->count = cmd->stop_arg * cmd->chanlist_len; - } /* setup hardware conversion counter */ if (cmd->stop_src == TRIG_EXT) { /* load counter a1 with count of 3 (pc+ manual says this is minimum allowed) using mode 0 */ @@ -1479,9 +1475,8 @@ static void labpc_drain_dma(struct comedi_device *dev) } /* write data to comedi buffer */ - for (i = 0; i < num_points; i++) { + for (i = 0; i < num_points; i++) cfc_write_to_buffer(s, devpriv->dma_buffer[i]); - } if (async->cmd.stop_src == TRIG_COUNT) devpriv->count -= num_points; @@ -1864,9 +1859,8 @@ static unsigned int labpc_serial_in(struct comedi_device *dev) udelay(1); devpriv->status2_bits = devpriv->read_byte(dev->iobase + STATUS2_REG); - if (devpriv->status2_bits & EEPROM_OUT_BIT) { + if (devpriv->status2_bits & EEPROM_OUT_BIT) value |= 1 << (value_width - i); - } } return value; From f4098b4f8ac65e0e44bbe579ac7d32b6e05ffa3b Mon Sep 17 00:00:00 2001 From: Paul Elms Date: Thu, 4 Feb 2010 08:24:28 +0000 Subject: [PATCH 243/367] Staging: comedi: fix brace coding style in comedi_fops.c This patch to the comedi_fops.c file fixes a brace warning found by the checkpatch.pl tool Signed-off-by: Paul Elms Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/comedi_fops.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 8117748ad5a5..79653e868c12 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -2004,12 +2004,10 @@ void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s) if (async->cb_mask & s->async->events) { if (comedi_get_subdevice_runflags(s) & SRF_USER) { wake_up_interruptible(&async->wait_head); - if (s->subdev_flags & SDF_CMD_READ) { + if (s->subdev_flags & SDF_CMD_READ) kill_fasync(&dev->async_queue, SIGIO, POLL_IN); - } - if (s->subdev_flags & SDF_CMD_WRITE) { + if (s->subdev_flags & SDF_CMD_WRITE) kill_fasync(&dev->async_queue, SIGIO, POLL_OUT); - } } else { if (async->cb_func) async->cb_func(s->async->events, async->cb_arg); From 01823a13dca4de28ddb55b63c3334ff928b3abbc Mon Sep 17 00:00:00 2001 From: Tim Schofield Date: Thu, 4 Feb 2010 19:57:09 +0000 Subject: [PATCH 244/367] Staging: rtl8192e: fix spacing style issues in r8180_93cx6.c This is a patch to the r8180_93cx6.c file that fixes up spacing issue warnings found by the checkpatch.pl tool Signed-off-by: Tim Schofield Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192e/r8180_93cx6.c | 63 +++++++++++++------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/drivers/staging/rtl8192e/r8180_93cx6.c b/drivers/staging/rtl8192e/r8180_93cx6.c index 79f7a0f39623..262ed5fd086a 100644 --- a/drivers/staging/rtl8192e/r8180_93cx6.c +++ b/drivers/staging/rtl8192e/r8180_93cx6.c @@ -22,7 +22,7 @@ static void eprom_cs(struct net_device *dev, short bit) { - if(bit) + if (bit) write_nic_byte(dev, EPROM_CMD, (1<epromtype==EPROM_93c56){ - addr_str[7]=addr & 1; - addr_str[6]=addr & (1<<1); - addr_str[5]=addr & (1<<2); - addr_str[4]=addr & (1<<3); - addr_str[3]=addr & (1<<4); - addr_str[2]=addr & (1<<5); - addr_str[1]=addr & (1<<6); - addr_str[0]=addr & (1<<7); - addr_len=8; - }else{ - addr_str[5]=addr & 1; - addr_str[4]=addr & (1<<1); - addr_str[3]=addr & (1<<2); - addr_str[2]=addr & (1<<3); - addr_str[1]=addr & (1<<4); - addr_str[0]=addr & (1<<5); - addr_len=6; + if (priv->epromtype == EPROM_93c56) { + addr_str[7] = addr & 1; + addr_str[6] = addr & (1<<1); + addr_str[5] = addr & (1<<2); + addr_str[4] = addr & (1<<3); + addr_str[3] = addr & (1<<4); + addr_str[2] = addr & (1<<5); + addr_str[1] = addr & (1<<6); + addr_str[0] = addr & (1<<7); + addr_len = 8; + } else { + addr_str[5] = addr & 1; + addr_str[4] = addr & (1<<1); + addr_str[3] = addr & (1<<2); + addr_str[2] = addr & (1<<3); + addr_str[1] = addr & (1<<4); + addr_str[0] = addr & (1<<5); + addr_len = 6; } eprom_cs(dev, 1); eprom_ck_cycle(dev); @@ -129,7 +130,7 @@ u32 eprom_read(struct net_device *dev, u32 addr) //I'm unsure if it is necessary, but anyway shouldn't hurt eprom_w(dev, 0); - for(i=0;i<16;i++){ + for (i = 0; i < 16; i++) { //eeprom needs a clk cycle between writing opcode&adr //and reading data. (eeprom outs a dummy 0) eprom_ck_cycle(dev); From e41e5d601e1c035fde488f9543c978b8ae86e1be Mon Sep 17 00:00:00 2001 From: Yong Zhang Date: Fri, 5 Feb 2010 21:52:40 +0800 Subject: [PATCH 245/367] Staging: rt2860: correct onstack wait_queue_head declaration Use DECLARE_WAIT_QUEUE_HEAD_ONSTACK to make lockdep happy Signed-off-by: Yong Zhang Cc: Greg Kroah-Hartman Cc: Bartlomiej Zolnierkiewicz Cc: Alexander Beregalov Cc: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rt2860/rt_main_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rt2860/rt_main_dev.c b/drivers/staging/rt2860/rt_main_dev.c index c3d92802d0c9..fbddb00cfedd 100644 --- a/drivers/staging/rt2860/rt_main_dev.c +++ b/drivers/staging/rt2860/rt_main_dev.c @@ -216,7 +216,7 @@ int rt28xx_close(struct net_device *dev) u32 i = 0; #ifdef RTMP_MAC_USB - DECLARE_WAIT_QUEUE_HEAD(unlink_wakeup); + DECLARE_WAIT_QUEUE_HEAD_ONSTACK(unlink_wakeup); DECLARE_WAITQUEUE(wait, current); #endif /* RTMP_MAC_USB // */ From d3c796fd57f33a20b2ca968e0e449382397c8dba Mon Sep 17 00:00:00 2001 From: Chihau Chau Date: Fri, 5 Feb 2010 15:23:48 -0300 Subject: [PATCH 246/367] Staging: samsung-laptop: fix coding style issues This fixes some lines over 80 characters coding style issues. Signed-off-by: Chihau Chau Signed-off-by: Greg Kroah-Hartman --- drivers/staging/samsung-laptop/samsung-laptop.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/staging/samsung-laptop/samsung-laptop.c b/drivers/staging/samsung-laptop/samsung-laptop.c index 4877138a9f96..dd7ea4c075db 100644 --- a/drivers/staging/samsung-laptop/samsung-laptop.c +++ b/drivers/staging/samsung-laptop/samsung-laptop.c @@ -99,7 +99,8 @@ static struct rfkill *rfk; static int force; module_param(force, bool, 0); -MODULE_PARM_DESC(force, "Disable the DMI check and forces the driver to be loaded"); +MODULE_PARM_DESC(force, + "Disable the DMI check and forces the driver to be loaded"); static int debug; module_param(debug, bool, S_IRUGO | S_IWUSR); @@ -370,7 +371,8 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = { { .ident = "N128", .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), + DMI_MATCH(DMI_SYS_VENDOR, + "SAMSUNG ELECTRONICS CO., LTD."), DMI_MATCH(DMI_PRODUCT_NAME, "N128"), DMI_MATCH(DMI_BOARD_NAME, "N128"), }, @@ -379,7 +381,8 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = { { .ident = "N130", .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), + DMI_MATCH(DMI_SYS_VENDOR, + "SAMSUNG ELECTRONICS CO., LTD."), DMI_MATCH(DMI_PRODUCT_NAME, "N130"), DMI_MATCH(DMI_BOARD_NAME, "N130"), }, From 0acc516aee7b1527ad125a53deff328ef29be9e6 Mon Sep 17 00:00:00 2001 From: Benjamin Adolphi Date: Sat, 6 Feb 2010 15:02:50 +0100 Subject: [PATCH 247/367] Staging: comedi: dt2815: Checkpatch cleanups This fixes all checkpatch issues in the dt2815 comedi driver. Signed-off-by: Benjamin Adolphi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dt2815.c | 89 +++++++++++-------------- 1 file changed, 39 insertions(+), 50 deletions(-) diff --git a/drivers/staging/comedi/drivers/dt2815.c b/drivers/staging/comedi/drivers/dt2815.c index d1db93c043a8..d1a4f7822433 100644 --- a/drivers/staging/comedi/drivers/dt2815.c +++ b/drivers/staging/comedi/drivers/dt2815.c @@ -34,19 +34,19 @@ Configuration options: [0] - I/O port base base address [1] - IRQ (unused) [2] - Voltage unipolar/bipolar configuration - 0 == unipolar 5V (0V -- +5V) - 1 == bipolar 5V (-5V -- +5V) + 0 == unipolar 5V (0V -- +5V) + 1 == bipolar 5V (-5V -- +5V) [3] - Current offset configuration - 0 == disabled (0mA -- +32mAV) - 1 == enabled (+4mA -- +20mAV) + 0 == disabled (0mA -- +32mAV) + 1 == enabled (+4mA -- +20mAV) [4] - Firmware program configuration - 0 == program 1 (see manual table 5-4) - 1 == program 2 (see manual table 5-4) - 2 == program 3 (see manual table 5-4) - 3 == program 4 (see manual table 5-4) + 0 == program 1 (see manual table 5-4) + 1 == program 2 (see manual table 5-4) + 2 == program 3 (see manual table 5-4) + 3 == program 4 (see manual table 5-4) [5] - Analog output 0 range configuration - 0 == voltage - 1 == current + 0 == voltage + 1 == current [6] - Analog output 1 range configuration (same options) [7] - Analog output 2 range configuration (same options) [8] - Analog output 3 range configuration (same options) @@ -61,17 +61,11 @@ Configuration options: #include #include -static const struct comedi_lrange range_dt2815_ao_32_current = { 1, { - RANGE_mA(0, - 32) - } -}; +static const struct comedi_lrange + range_dt2815_ao_32_current = {1, {RANGE_mA(0, 32)} }; -static const struct comedi_lrange range_dt2815_ao_20_current = { 1, { - RANGE_mA(4, - 20) - } -}; +static const struct comedi_lrange + range_dt2815_ao_20_current = {1, {RANGE_mA(4, 20)} }; #define DT2815_SIZE 2 @@ -118,9 +112,8 @@ static int dt2815_ao_insn_read(struct comedi_device *dev, int i; int chan = CR_CHAN(insn->chanspec); - for (i = 0; i < insn->n; i++) { + for (i = 0; i < insn->n; i++) data[i] = devpriv->ao_readback[chan]; - } return i; } @@ -139,9 +132,8 @@ static int dt2815_ao_insn(struct comedi_device *dev, struct comedi_subdevice *s, status = dt2815_wait_for_status(dev, 0x00); if (status != 0) { - printk - ("dt2815: failed to write low byte on %d reason %x\n", - chan, status); + printk(KERN_WARNING "dt2815: failed to write low byte " + "on %d reason %x\n", chan, status); return -EBUSY; } @@ -149,9 +141,8 @@ static int dt2815_ao_insn(struct comedi_device *dev, struct comedi_subdevice *s, status = dt2815_wait_for_status(dev, 0x10); if (status != 0x10) { - printk - ("dt2815: failed to write high byte on %d reason %x\n", - chan, status); + printk(KERN_WARNING "dt2815: failed to write high byte " + "on %d reason %x\n", chan, status); return -EBUSY; } devpriv->ao_readback[chan] = data[i]; @@ -163,24 +154,24 @@ static int dt2815_ao_insn(struct comedi_device *dev, struct comedi_subdevice *s, options[0] Board base address options[1] IRQ (not applicable) options[2] Voltage unipolar/bipolar configuration - 0 == unipolar 5V (0V -- +5V) - 1 == bipolar 5V (-5V -- +5V) + 0 == unipolar 5V (0V -- +5V) + 1 == bipolar 5V (-5V -- +5V) options[3] Current offset configuration - 0 == disabled (0mA -- +32mAV) - 1 == enabled (+4mA -- +20mAV) + 0 == disabled (0mA -- +32mAV) + 1 == enabled (+4mA -- +20mAV) options[4] Firmware program configuration - 0 == program 1 (see manual table 5-4) - 1 == program 2 (see manual table 5-4) - 2 == program 3 (see manual table 5-4) - 3 == program 4 (see manual table 5-4) + 0 == program 1 (see manual table 5-4) + 1 == program 2 (see manual table 5-4) + 2 == program 3 (see manual table 5-4) + 3 == program 4 (see manual table 5-4) options[5] Analog output 0 range configuration - 0 == voltage - 1 == current + 0 == voltage + 1 == current options[6] Analog output 1 range configuration ... options[12] Analog output 7 range configuration - 0 == voltage - 1 == current + 0 == voltage + 1 == current */ static int dt2815_attach(struct comedi_device *dev, struct comedi_devconfig *it) @@ -191,9 +182,9 @@ static int dt2815_attach(struct comedi_device *dev, struct comedi_devconfig *it) unsigned long iobase; iobase = it->options[0]; - printk("comedi%d: dt2815: 0x%04lx ", dev->minor, iobase); + printk(KERN_INFO "comedi%d: dt2815: 0x%04lx ", dev->minor, iobase); if (!request_region(iobase, DT2815_SIZE, "dt2815")) { - printk("I/O port conflict\n"); + printk(KERN_WARNING "I/O port conflict\n"); return -EIO; } @@ -236,19 +227,17 @@ static int dt2815_attach(struct comedi_device *dev, struct comedi_devconfig *it) unsigned int program; program = (it->options[4] & 0x3) << 3 | 0x7; outb(program, dev->iobase + DT2815_DATA); - printk(", program: 0x%x (@t=%d)\n", program, i); + printk(KERN_INFO ", program: 0x%x (@t=%d)\n", + program, i); break; } else if (status != 0x00) { - printk("dt2815: unexpected status 0x%x (@t=%d)\n", - status, i); - if (status & 0x60) { + printk(KERN_WARNING "dt2815: unexpected status 0x%x " + "(@t=%d)\n", status, i); + if (status & 0x60) outb(0x00, dev->iobase + DT2815_STATUS); - } } } - printk("\n"); - return 0; } @@ -260,7 +249,7 @@ static void dt2815_free_resources(struct comedi_device *dev) static int dt2815_detach(struct comedi_device *dev) { - printk("comedi%d: dt2815: remove\n", dev->minor); + printk(KERN_INFO "comedi%d: dt2815: remove\n", dev->minor); dt2815_free_resources(dev); From 83c41dabcca05eacc5917928a3e6a3bdfefad652 Mon Sep 17 00:00:00 2001 From: Benjamin Adolphi Date: Sat, 6 Feb 2010 15:08:46 +0100 Subject: [PATCH 248/367] Staging: comedi: rti802: Checkpatch cleanups This fixes all checkpatch issues in the rti802 comedi driver. Signed-off-by: Benjamin Adolphi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/rti802.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/rti802.c b/drivers/staging/comedi/drivers/rti802.c index 2f75c737ea15..2157edcf7997 100644 --- a/drivers/staging/comedi/drivers/rti802.c +++ b/drivers/staging/comedi/drivers/rti802.c @@ -106,9 +106,9 @@ static int rti802_attach(struct comedi_device *dev, struct comedi_devconfig *it) unsigned long iobase; iobase = it->options[0]; - printk("comedi%d: rti802: 0x%04lx ", dev->minor, iobase); + printk(KERN_INFO "comedi%d: rti802: 0x%04lx ", dev->minor, iobase); if (!request_region(iobase, RTI802_SIZE, "rti802")) { - printk("I/O port conflict\n"); + printk(KERN_WARNING "I/O port conflict\n"); return -EIO; } dev->iobase = iobase; @@ -138,14 +138,12 @@ static int rti802_attach(struct comedi_device *dev, struct comedi_devconfig *it) ? &range_unipolar10 : &range_bipolar10; } - printk("\n"); - return 0; } static int rti802_detach(struct comedi_device *dev) { - printk("comedi%d: rti802: remove\n", dev->minor); + printk(KERN_INFO "comedi%d: rti802: remove\n", dev->minor); if (dev->iobase) release_region(dev->iobase, RTI802_SIZE); From 2d2facda0b71609be294aa1fd5f56d2cdbcbb794 Mon Sep 17 00:00:00 2001 From: Benjamin Adolphi Date: Sat, 6 Feb 2010 16:17:06 +0100 Subject: [PATCH 249/367] Staging: comedi: ni_pcidio: Checkpatch cleanups This fixes almost all checkpatch issues in the ni_pcidio comedi driver. Signed-off-by: Benjamin Adolphi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_pcidio.c | 83 ++++++++++++---------- 1 file changed, 44 insertions(+), 39 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_pcidio.c b/drivers/staging/comedi/drivers/ni_pcidio.c index 2d88a5be65ff..9d337516409d 100644 --- a/drivers/staging/comedi/drivers/ni_pcidio.c +++ b/drivers/staging/comedi/drivers/ni_pcidio.c @@ -1,8 +1,8 @@ /* comedi/drivers/ni_pcidio.c driver for National Instruments PCI-DIO-96/PCI-6508 - National Instruments PCI-DIO-32HS - National Instruments PCI-6503 + National Instruments PCI-DIO-32HS + National Instruments PCI-6503 COMEDI - Linux Control and Measurement Device Interface Copyright (C) 1999,2002 David A. Schleef @@ -518,7 +518,8 @@ static irqreturn_t nidio_interrupt(int irq, void *d) ni_pcidio_print_status(status); /* printk("buf[0]=%08x\n",*(unsigned int *)async->prealloc_buf); */ - /* printk("buf[4096]=%08x\n",*(unsigned int *)(async->prealloc_buf+4096)); */ + /* printk("buf[4096]=%08x\n", + *(unsigned int *)(async->prealloc_buf+4096)); */ spin_lock_irqsave(&devpriv->mite_channel_lock, irq_flags); if (devpriv->di_mite_chan) @@ -526,7 +527,9 @@ static irqreturn_t nidio_interrupt(int irq, void *d) #ifdef MITE_DEBUG mite_print_chsr(m_status); #endif - /* printk("mite_bytes_transferred: %d\n",mite_bytes_transferred(mite,DI_DMA_CHAN)); */ + /* printk("mite_bytes_transferred: %d\n", + mite_bytes_transferred(mite,DI_DMA_CHAN)); */ + /* mite_dump_regs(mite); */ if (m_status & CHSR_INT) { if (m_status & CHSR_LINKC) { @@ -565,7 +568,8 @@ static irqreturn_t nidio_interrupt(int irq, void *d) DPRINTK("too much work in interrupt\n"); writeb(0x00, devpriv->mite->daq_io_addr + - Master_DMA_And_Interrupt_Control); + Master_DMA_And_Interrupt_Control + ); goto out; } AuxData = @@ -579,8 +583,10 @@ static irqreturn_t nidio_interrupt(int irq, void *d) flags = readb(devpriv->mite->daq_io_addr + Group_1_Flags); } - /* DPRINTK("buf_int_count: %d\n",async->buf_int_count); */ - /* DPRINTK("1) IntEn=%d,flags=%d,status=%d\n",IntEn,flags,status); */ + /* DPRINTK("buf_int_count: %d\n", + async->buf_int_count); */ + /* DPRINTK("1) IntEn=%d,flags=%d,status=%d\n", + IntEn,flags,status); */ /* ni_pcidio_print_flags(flags); */ /* ni_pcidio_print_status(status); */ async->events |= COMEDI_CB_BLOCK; @@ -627,8 +633,8 @@ static irqreturn_t nidio_interrupt(int irq, void *d) flags = readb(devpriv->mite->daq_io_addr + Group_1_Flags); status = readb(devpriv->mite->daq_io_addr + Interrupt_And_Window_Status); - /* DPRINTK("loop end: IntEn=0x%02x,flags=0x%02x,status=0x%02x\n", */ - /* IntEn,flags,status); */ + /* DPRINTK("loop end: IntEn=0x%02x,flags=0x%02x," + "status=0x%02x\n", IntEn, flags, status); */ /* ni_pcidio_print_flags(flags); */ /* ni_pcidio_print_status(status); */ } @@ -655,11 +661,10 @@ static void ni_pcidio_print_flags(unsigned int flags) { int i; - printk("group_1_flags:"); + printk(KERN_INFO "group_1_flags:"); for (i = 7; i >= 0; i--) { - if (flags & (1 << i)) { + if (flags & (1 << i)) printk(" %s", flags_strings[i]); - } } printk("\n"); } @@ -673,11 +678,10 @@ static void ni_pcidio_print_status(unsigned int flags) { int i; - printk("group_status:"); + printk(KERN_INFO "group_status:"); for (i = 7; i >= 0; i--) { - if (flags & (1 << i)) { + if (flags & (1 << i)) printk(" %s", status_strings[i]); - } } printk("\n"); } @@ -793,7 +797,8 @@ static int ni_pcidio_cmdtest(struct comedi_device *dev, if (err) return 1; - /* step 2: make sure trigger sources are unique and mutually compatible */ + /* step 2: make sure trigger sources are unique and mutually + compatible */ /* note that mutual compatibility is not an issue here */ if (cmd->start_src != TRIG_NOW && cmd->start_src != TRIG_INT) @@ -974,7 +979,8 @@ static int ni_pcidio_cmd(struct comedi_device *dev, struct comedi_subdevice *s) /* clear and enable interrupts */ writeb(0xff, devpriv->mite->daq_io_addr + Group_1_First_Clear); - /* writeb(ClearExpired,devpriv->mite->daq_io_addr+Group_1_Second_Clear); */ + /* writeb(ClearExpired, + devpriv->mite->daq_io_addr+Group_1_Second_Clear); */ writeb(IntEn, devpriv->mite->daq_io_addr + Interrupt_Control); writeb(0x03, @@ -1052,7 +1058,7 @@ static int ni_pcidio_change(struct comedi_device *dev, } static int pci_6534_load_fpga(struct comedi_device *dev, int fpga_index, - u8 * data, int data_len) + u8 *data, int data_len) { static const int timeout = 1000; int i, j; @@ -1066,9 +1072,8 @@ static int pci_6534_load_fpga(struct comedi_device *dev, int fpga_index, udelay(1); } if (i == timeout) { - printk - ("ni_pcidio: failed to load fpga %i, waiting for status 0x2\n", - fpga_index); + printk(KERN_WARNING "ni_pcidio: failed to load fpga %i, " + "waiting for status 0x2\n", fpga_index); return -EIO; } writew(0x80 | fpga_index, @@ -1079,9 +1084,8 @@ static int pci_6534_load_fpga(struct comedi_device *dev, int fpga_index, udelay(1); } if (i == timeout) { - printk - ("ni_pcidio: failed to load fpga %i, waiting for status 0x3\n", - fpga_index); + printk(KERN_WARNING "ni_pcidio: failed to load fpga %i, " + "waiting for status 0x3\n", fpga_index); return -EIO; } for (j = 0; j + 1 < data_len;) { @@ -1174,9 +1178,10 @@ static int nidio_attach(struct comedi_device *dev, struct comedi_devconfig *it) int n_subdevices; unsigned int irq; - printk("comedi%d: nidio:", dev->minor); + printk(KERN_INFO "comedi%d: nidio:", dev->minor); - if ((ret = alloc_private(dev, sizeof(struct nidio96_private))) < 0) + ret = alloc_private(dev, sizeof(struct nidio96_private)); + if (ret < 0) return ret; spin_lock_init(&devpriv->mite_channel_lock); @@ -1186,7 +1191,7 @@ static int nidio_attach(struct comedi_device *dev, struct comedi_devconfig *it) ret = mite_setup(devpriv->mite); if (ret < 0) { - printk("error setting up mite\n"); + printk(KERN_WARNING "error setting up mite\n"); return ret; } comedi_set_hw_dev(dev, &devpriv->mite->pcidev->dev); @@ -1196,18 +1201,19 @@ static int nidio_attach(struct comedi_device *dev, struct comedi_devconfig *it) dev->board_name = this_board->name; irq = mite_irq(devpriv->mite); - printk(" %s", dev->board_name); + printk(KERN_INFO " %s", dev->board_name); if (this_board->uses_firmware) { ret = pci_6534_upload_firmware(dev, it->options); if (ret < 0) return ret; } - if (!this_board->is_diodaq) { + if (!this_board->is_diodaq) n_subdevices = this_board->n_8255; - } else { + else n_subdevices = 1; - } - if ((ret = alloc_subdevices(dev, n_subdevices)) < 0) + + ret = alloc_subdevices(dev, n_subdevices); + if (ret < 0) return ret; if (!this_board->is_diodaq) { @@ -1220,7 +1226,7 @@ static int nidio_attach(struct comedi_device *dev, struct comedi_devconfig *it) } } else { - printk(" rev=%d", + printk(KERN_INFO " rev=%d", readb(devpriv->mite->daq_io_addr + Chip_Version)); s = dev->subdevices + 0; @@ -1253,9 +1259,9 @@ static int nidio_attach(struct comedi_device *dev, struct comedi_devconfig *it) ret = request_irq(irq, nidio_interrupt, IRQF_SHARED, "ni_pcidio", dev); - if (ret < 0) { - printk(" irq not available"); - } + if (ret < 0) + printk(KERN_WARNING " irq not available"); + dev->irq = irq; } @@ -1269,9 +1275,8 @@ static int nidio_detach(struct comedi_device *dev) int i; if (this_board && !this_board->is_diodaq) { - for (i = 0; i < this_board->n_8255; i++) { + for (i = 0; i < this_board->n_8255; i++) subdev_8255_cleanup(dev, dev->subdevices + i); - } } if (dev->irq) @@ -1310,7 +1315,7 @@ static int nidio_find_device(struct comedi_device *dev, int bus, int slot) } } } - printk("no device found\n"); + printk(KERN_WARNING "no device found\n"); mite_list_devices(); return -EIO; } From dee86e8c9279110d787da64cbca5d4bda63d93c6 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 7 Feb 2010 08:51:51 -0800 Subject: [PATCH 250/367] Staging: comedi: ssc_dnp: fixed a brace coding style issue Fixed a coding style issue. Created during the keynote presentation at FOSDEM 2010 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ssv_dnp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/ssv_dnp.c b/drivers/staging/comedi/drivers/ssv_dnp.c index 4918fbfab5e8..17c92a57b0dd 100644 --- a/drivers/staging/comedi/drivers/ssv_dnp.c +++ b/drivers/staging/comedi/drivers/ssv_dnp.c @@ -300,11 +300,11 @@ static int dnp_dio_insn_config(struct comedi_device *dev, /* read 'old' direction of the port and set bits (out=1, in=0) */ register_buffer = inb(CSCDR); - if (data[0] == COMEDI_OUTPUT) { + if (data[0] == COMEDI_OUTPUT) register_buffer |= (1 << chan); - } else { + else register_buffer &= ~(1 << chan); - } + outb(register_buffer, CSCDR); return 1; From f721ad7a9c4cec5b151134b2ace164861aca0df9 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 9 Feb 2010 12:37:25 -0800 Subject: [PATCH 251/367] Staging: dt3155: fix build warnings This fixes the build warnings in the dt3155 driver Cc: Scott Smedley Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dt3155/dt3155_drv.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/staging/dt3155/dt3155_drv.c b/drivers/staging/dt3155/dt3155_drv.c index 6b40d422ad0c..716814ed42bb 100644 --- a/drivers/staging/dt3155/dt3155_drv.c +++ b/drivers/staging/dt3155/dt3155_drv.c @@ -538,8 +538,11 @@ static int dt3155_ioctl ( { printk("DT3155: invalid IOCTL(0x%x)\n",cmd); printk("DT3155: Valid commands (0x%x), (0x%x), (0x%x), (0x%x), (0x%x)\n", - DT3155_GET_CONFIG, DT3155_SET_CONFIG, - DT3155_START, DT3155_STOP, DT3155_FLUSH); + (unsigned int)DT3155_GET_CONFIG, + (unsigned int)DT3155_SET_CONFIG, + (unsigned int)DT3155_START, + (unsigned int)DT3155_STOP, + (unsigned int)DT3155_FLUSH); return -EINVAL; } @@ -624,7 +627,8 @@ static int dt3155_ioctl ( { printk("DT3155: invalid IOCTL(0x%x)\n",cmd); printk("DT3155: Valid commands (0x%x), (0x%x), (0x%x), (0x%x), (0x%x)\n", - DT3155_GET_CONFIG, DT3155_SET_CONFIG, + (unsigned int)DT3155_GET_CONFIG, + (unsigned int)DT3155_SET_CONFIG, DT3155_START, DT3155_STOP, DT3155_FLUSH); return -ENOSYS; } @@ -754,11 +758,8 @@ static int dt3155_close( struct inode *inode, struct file *filep) * read() * *****************************************************/ -static int dt3155_read ( - struct file *filep, - char *buf, - size_t count, - loff_t *ppos) +static ssize_t dt3155_read(struct file *filep, char __user *buf, + size_t count, loff_t *ppos) { /* which device are we reading from? */ int minor = MINOR(filep->f_dentry->d_inode->i_rdev); @@ -911,8 +912,8 @@ static int find_PCI (void) * can access it. */ dt3155_lbase[ pci_index - 1 ] = ioremap(base,PCI_PAGE_SIZE); dt3155_status[ pci_index - 1 ].reg_addr = base; - DT_3155_DEBUG_MSG("DT3155: New logical address is x%x \n", - (u_int)dt3155_lbase[pci_index-1]); + DT_3155_DEBUG_MSG("DT3155: New logical address is %p \n", + dt3155_lbase[pci_index-1]); if ( !dt3155_lbase[pci_index-1] ) { printk("DT3155: Unable to remap control registers\n"); @@ -929,10 +930,10 @@ static int find_PCI (void) dt3155_status[ pci_index-1 ].irq = irq; /* Set flag: kth device found! */ dt3155_status[ pci_index-1 ].device_installed = 1; - printk("DT3155: Installing device %d w/irq %d and address 0x%x\n", + printk("DT3155: Installing device %d w/irq %d and address %p\n", pci_index, (u_int)dt3155_status[pci_index-1].irq, - (u_int)dt3155_lbase[pci_index-1]); + dt3155_lbase[pci_index-1]); } ndevices = pci_index; From 062d164719fcbffae6e2fe5e7ba5ab68da12ce33 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 9 Feb 2010 12:38:13 -0800 Subject: [PATCH 252/367] Staging: dt3155: coding cleanups for dt3155_io.h This fixes up some coding style issues in the dt3155_io.h file Cc: Scott Smedley Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dt3155/dt3155_io.h | 457 +++++++++++++---------------- 1 file changed, 209 insertions(+), 248 deletions(-) diff --git a/drivers/staging/dt3155/dt3155_io.h b/drivers/staging/dt3155/dt3155_io.h index 67df27fc6a8a..72d655dae5a2 100644 --- a/drivers/staging/dt3155/dt3155_io.h +++ b/drivers/staging/dt3155/dt3155_io.h @@ -43,258 +43,219 @@ MA 02111-1307 USA /* offsets for 32-bit memory mapped registers */ -#define EVEN_DMA_START 0x000 -#define ODD_DMA_START 0x00C -#define EVEN_DMA_STRIDE 0x018 -#define ODD_DMA_STRIDE 0x024 -#define EVEN_PIXEL_FMT 0x030 -#define ODD_PIXEL_FMT 0x034 -#define FIFO_TRIGGER 0x038 -#define XFER_MODE 0x03C -#define CSR1 0x040 -#define RETRY_WAIT_CNT 0x044 -#define INT_CSR 0x048 -#define EVEN_FLD_MASK 0x04C -#define ODD_FLD_MASK 0x050 -#define MASK_LENGTH 0x054 -#define FIFO_FLAG_CNT 0x058 -#define IIC_CLK_DUR 0x05C -#define IIC_CSR1 0x060 -#define IIC_CSR2 0x064 -#define EVEN_DMA_UPPR_LMT 0x08C -#define ODD_DMA_UPPR_LMT 0x090 +#define EVEN_DMA_START 0x000 +#define ODD_DMA_START 0x00C +#define EVEN_DMA_STRIDE 0x018 +#define ODD_DMA_STRIDE 0x024 +#define EVEN_PIXEL_FMT 0x030 +#define ODD_PIXEL_FMT 0x034 +#define FIFO_TRIGGER 0x038 +#define XFER_MODE 0x03C +#define CSR1 0x040 +#define RETRY_WAIT_CNT 0x044 +#define INT_CSR 0x048 +#define EVEN_FLD_MASK 0x04C +#define ODD_FLD_MASK 0x050 +#define MASK_LENGTH 0x054 +#define FIFO_FLAG_CNT 0x058 +#define IIC_CLK_DUR 0x05C +#define IIC_CSR1 0x060 +#define IIC_CSR2 0x064 +#define EVEN_DMA_UPPR_LMT 0x08C +#define ODD_DMA_UPPR_LMT 0x090 -#define CLK_DUR_VAL 0x01010101 +#define CLK_DUR_VAL 0x01010101 /******** Assignments and Typedefs for 32 bit Memory Mapped Registers ********/ -/********************************** - * fifo_trigger_tag - */ typedef union fifo_trigger_tag { - u_long reg; - struct - { - u_long PACKED : 6; - u_long : 9; - u_long PLANER : 7; - u_long : 9; - } fld; + u_long reg; + struct { + u_long PACKED:6; + u_long :9; + u_long PLANER:7; + u_long :9; + } fld; } FIFO_TRIGGER_R; -/********************************** - * xfer_mode_tag - */ typedef union xfer_mode_tag { - u_long reg; - struct - { - u_long : 2; - u_long FIELD_TOGGLE : 1; - u_long : 5; - u_long : 2; - u_long : 22; - } fld; + u_long reg; + struct { + u_long :2; + u_long FIELD_TOGGLE:1; + u_long :5; + u_long :2; + u_long :22; + } fld; } XFER_MODE_R; -/********************************** - * csr1_tag - */ typedef union csr1_tag { - u_long reg; - struct - { - u_long CAP_CONT_EVE : 1; - u_long CAP_CONT_ODD : 1; - u_long CAP_SNGL_EVE : 1; - u_long CAP_SNGL_ODD : 1; - u_long FLD_DN_EVE : 1; - u_long FLD_DN_ODD : 1; - u_long SRST : 1; - u_long FIFO_EN : 1; - u_long FLD_CRPT_EVE : 1; - u_long FLD_CRPT_ODD : 1; - u_long ADDR_ERR_EVE : 1; - u_long ADDR_ERR_ODD : 1; - u_long CRPT_DIS : 1; - u_long RANGE_EN : 1; - u_long : 16; - } fld; + u_long reg; + struct { + u_long CAP_CONT_EVE:1; + u_long CAP_CONT_ODD:1; + u_long CAP_SNGL_EVE:1; + u_long CAP_SNGL_ODD:1; + u_long FLD_DN_EVE :1; + u_long FLD_DN_ODD :1; + u_long SRST :1; + u_long FIFO_EN :1; + u_long FLD_CRPT_EVE:1; + u_long FLD_CRPT_ODD:1; + u_long ADDR_ERR_EVE:1; + u_long ADDR_ERR_ODD:1; + u_long CRPT_DIS :1; + u_long RANGE_EN :1; + u_long :16; + } fld; } CSR1_R; -/********************************** - * retry_wait_cnt_tag - */ typedef union retry_wait_cnt_tag { - u_long reg; - struct - { - u_long RTRY_WAIT_CNT : 8; - u_long : 24; - } fld; + u_long reg; + struct { + u_long RTRY_WAIT_CNT:8; + u_long :24; + } fld; } RETRY_WAIT_CNT_R; -/********************************** - * int_csr_tag - */ typedef union int_csr_tag { - u_long reg; - struct - { - u_long FLD_END_EVE : 1; - u_long FLD_END_ODD : 1; - u_long FLD_START : 1; - u_long : 5; - u_long FLD_END_EVE_EN : 1; - u_long FLD_END_ODD_EN : 1; - u_long FLD_START_EN : 1; - u_long : 21; - } fld; + u_long reg; + struct { + u_long FLD_END_EVE :1; + u_long FLD_END_ODD :1; + u_long FLD_START :1; + u_long :5; + u_long FLD_END_EVE_EN:1; + u_long FLD_END_ODD_EN:1; + u_long FLD_START_EN :1; + u_long :21; + } fld; } INT_CSR_R; -/********************************** - * mask_length_tag - */ typedef union mask_length_tag { - u_long reg; - struct - { - u_long MASK_LEN_EVE : 5; - u_long : 11; - u_long MASK_LEN_ODD : 5; - u_long : 11; - } fld; + u_long reg; + struct { + u_long MASK_LEN_EVE:5; + u_long :11; + u_long MASK_LEN_ODD:5; + u_long :11; + } fld; } MASK_LENGTH_R; -/********************************** - * fifo_flag_cnt_tag - */ typedef union fifo_flag_cnt_tag { - u_long reg; - struct - { - u_long AF_COUNT : 7; - u_long : 9; - u_long AE_COUNT : 7; - u_long : 9; - } fld; + u_long reg; + struct { + u_long AF_COUNT:7; + u_long :9; + u_long AE_COUNT:7; + u_long :9; + } fld; } FIFO_FLAG_CNT_R; -/********************************** - * iic_clk_dur - */ typedef union iic_clk_dur { - u_long reg; - struct - { - u_long PHASE_1 : 8; - u_long PHASE_2 : 8; - u_long PHASE_3 : 8; - u_long PHASE_4 : 8; - } fld; + u_long reg; + struct { + u_long PHASE_1:8; + u_long PHASE_2:8; + u_long PHASE_3:8; + u_long PHASE_4:8; + } fld; } IIC_CLK_DUR_R; -/********************************** - * iic_csr1_tag - */ typedef union iic_csr1_tag { - u_long reg; - struct - { - u_long AUTO_EN : 1; - u_long BYPASS : 1; - u_long SDA_OUT : 1; - u_long SCL_OUT : 1; - u_long : 4; - u_long AUTO_ABORT : 1; - u_long DIRECT_ABORT : 1; - u_long SDA_IN : 1; - u_long SCL_IN : 1; - u_long : 4; - u_long AUTO_ADDR : 8; - u_long RD_DATA : 8; - } fld; + u_long reg; + struct { + u_long AUTO_EN :1; + u_long BYPASS :1; + u_long SDA_OUT :1; + u_long SCL_OUT :1; + u_long :4; + u_long AUTO_ABORT :1; + u_long DIRECT_ABORT:1; + u_long SDA_IN :1; + u_long SCL_IN :1; + u_long :4; + u_long AUTO_ADDR :8; + u_long RD_DATA :8; + } fld; } IIC_CSR1_R; /********************************** * iic_csr2_tag */ typedef union iic_csr2_tag { - u_long reg; - struct - { - u_long DIR_WR_DATA : 8; - u_long DIR_SUB_ADDR : 8; - u_long DIR_RD : 1; - u_long DIR_ADDR : 7; - u_long NEW_CYCLE : 1; - u_long : 7; - } fld; + u_long reg; + struct { + u_long DIR_WR_DATA :8; + u_long DIR_SUB_ADDR:8; + u_long DIR_RD :1; + u_long DIR_ADDR :7; + u_long NEW_CYCLE :1; + u_long :7; + } fld; } IIC_CSR2_R; -/* use for both EVEN and ODD DMA UPPER LIMITS */ +/* use for both EVEN and ODD DMA UPPER LIMITS */ -/********************************** +/* * dma_upper_lmt_tag */ typedef union dma_upper_lmt_tag { u_long reg; struct { u_long DMA_UPPER_LMT_VAL:24; - u_long :8; + u_long :8; } fld; } DMA_UPPER_LMT_R; -/*************************************** - * Global declarations of local copies - * of boards' 32 bit registers - ***************************************/ -extern u_long even_dma_start_r; /* bit 0 should always be 0 */ -extern u_long odd_dma_start_r; /* .. */ -extern u_long even_dma_stride_r; /* bits 0&1 should always be 0 */ -extern u_long odd_dma_stride_r; /* .. */ +/* + * Global declarations of local copies of boards' 32 bit registers + */ +extern u_long even_dma_start_r; /* bit 0 should always be 0 */ +extern u_long odd_dma_start_r; /* .. */ +extern u_long even_dma_stride_r; /* bits 0&1 should always be 0 */ +extern u_long odd_dma_stride_r; /* .. */ extern u_long even_pixel_fmt_r; extern u_long odd_pixel_fmt_r; -extern FIFO_TRIGGER_R fifo_trigger_r; -extern XFER_MODE_R xfer_mode_r; -extern CSR1_R csr1_r; -extern RETRY_WAIT_CNT_R retry_wait_cnt_r; -extern INT_CSR_R int_csr_r; +extern FIFO_TRIGGER_R fifo_trigger_r; +extern XFER_MODE_R xfer_mode_r; +extern CSR1_R csr1_r; +extern RETRY_WAIT_CNT_R retry_wait_cnt_r; +extern INT_CSR_R int_csr_r; extern u_long even_fld_mask_r; extern u_long odd_fld_mask_r; -extern MASK_LENGTH_R mask_length_r; -extern FIFO_FLAG_CNT_R fifo_flag_cnt_r; -extern IIC_CLK_DUR_R iic_clk_dur_r; -extern IIC_CSR1_R iic_csr1_r; -extern IIC_CSR2_R iic_csr2_r; -extern DMA_UPPER_LMT_R even_dma_upper_lmt_r; -extern DMA_UPPER_LMT_R odd_dma_upper_lmt_r; +extern MASK_LENGTH_R mask_length_r; +extern FIFO_FLAG_CNT_R fifo_flag_cnt_r; +extern IIC_CLK_DUR_R iic_clk_dur_r; +extern IIC_CSR1_R iic_csr1_r; +extern IIC_CSR2_R iic_csr2_r; +extern DMA_UPPER_LMT_R even_dma_upper_lmt_r; +extern DMA_UPPER_LMT_R odd_dma_upper_lmt_r; /***************** 8 bit I2C register globals ***********/ - -#define CSR2 0x010 /* indices of 8-bit I2C mapped reg's*/ -#define EVEN_CSR 0x011 -#define ODD_CSR 0x012 -#define CONFIG 0x013 -#define DT_ID 0x01F -#define X_CLIP_START 0x020 -#define Y_CLIP_START 0x022 -#define X_CLIP_END 0x024 -#define Y_CLIP_END 0x026 -#define AD_ADDR 0x030 -#define AD_LUT 0x031 -#define AD_CMD 0x032 -#define DIG_OUT 0x040 -#define PM_LUT_ADDR 0x050 -#define PM_LUT_DATA 0x051 +#define CSR2 0x010 /* indices of 8-bit I2C mapped reg's*/ +#define EVEN_CSR 0x011 +#define ODD_CSR 0x012 +#define CONFIG 0x013 +#define DT_ID 0x01F +#define X_CLIP_START 0x020 +#define Y_CLIP_START 0x022 +#define X_CLIP_END 0x024 +#define Y_CLIP_END 0x026 +#define AD_ADDR 0x030 +#define AD_LUT 0x031 +#define AD_CMD 0x032 +#define DIG_OUT 0x040 +#define PM_LUT_ADDR 0x050 +#define PM_LUT_DATA 0x051 /******** Assignments and Typedefs for 8 bit I2C Registers********************/ @@ -315,77 +276,77 @@ typedef union i2c_csr2_tag { typedef union i2c_even_csr_tag { u_char reg; struct { - u_char DONE_EVE:1; - u_char SNGL_EVE:1; + u_char DONE_EVE :1; + u_char SNGL_EVE :1; u_char ERROR_EVE:1; - u_char :5; + u_char :5; } fld; } I2C_EVEN_CSR; typedef union i2c_odd_csr_tag { - u_char reg; - struct - { - u_char DONE_ODD : 1; - u_char SNGL_ODD : 1; - u_char ERROR_ODD : 1; - u_char : 5; - } fld; + u_char reg; + struct { + u_char DONE_ODD:1; + u_char SNGL_ODD:1; + u_char ERROR_ODD:1; + u_char :5; + } fld; } I2C_ODD_CSR; typedef union i2c_config_tag { - u_char reg; - struct - { - u_char ACQ_MODE : 2; - u_char EXT_TRIG_EN : 1; - u_char EXT_TRIG_POL : 1; - u_char H_SCALE : 1; - u_char CLIP : 1; - u_char PM_LUT_SEL : 1; - u_char PM_LUT_PGM : 1; - } fld; -} I2C_CONFIG; + u_char reg; + struct { + u_char ACQ_MODE:2; + u_char EXT_TRIG_EN:1; + u_char EXT_TRIG_POL:1; + u_char H_SCALE:1; + u_char CLIP:1; + u_char PM_LUT_SEL:1; + u_char PM_LUT_PGM:1; + } fld; +} I2C_CONFIG; -typedef union i2c_ad_cmd_tag { /* bits can have 3 different meanings - depending on value of AD_ADDR */ - u_char reg; - struct - { - u_char : 2; - u_char SYNC_LVL_SEL : 2; - u_char SYNC_CNL_SEL : 2; - u_char DIGITIZE_CNL_SEL1 : 2; - } bt252_command; /* Bt252 Command Register */ - struct /* if AD_ADDR = 00h */ - { - u_char IOUT_DATA : 8; - } bt252_iout0; /* Bt252 IOUT0 register */ - struct /* if AD_ADDR = 01h */ - { - u_char IOUT_DATA : 8; - } bt252_iout1; /* BT252 IOUT1 register */ -} I2C_AD_CMD; /* if AD_ADDR = 02h */ +typedef union i2c_ad_cmd_tag { + /* bits can have 3 different meanings depending on value of AD_ADDR */ + u_char reg; + /* Bt252 Command Register if AD_ADDR = 00h */ + struct { + u_char :2; + u_char SYNC_LVL_SEL:2; + u_char SYNC_CNL_SEL:2; + u_char DIGITIZE_CNL_SEL1:2; + } bt252_command; + + /* Bt252 IOUT0 register if AD_ADDR = 01h */ + struct { + u_char IOUT_DATA:8; + } bt252_iout0; + + /* BT252 IOUT1 register if AD_ADDR = 02h */ + struct { + u_char IOUT_DATA:8; + } bt252_iout1; +} I2C_AD_CMD; /***** Global declarations of local copies of boards' 8 bit I2C registers ***/ -extern I2C_CSR2 i2c_csr2; -extern I2C_EVEN_CSR i2c_even_csr; -extern I2C_ODD_CSR i2c_odd_csr; -extern I2C_CONFIG i2c_config; -extern u_char i2c_dt_id; -extern u_char i2c_x_clip_start; -extern u_char i2c_y_clip_start; -extern u_char i2c_x_clip_end; -extern u_char i2c_y_clip_end; -extern u_char i2c_ad_addr; -extern u_char i2c_ad_lut; -extern I2C_AD_CMD i2c_ad_cmd; -extern u_char i2c_dig_out; -extern u_char i2c_pm_lut_addr; -extern u_char i2c_pm_lut_data; +extern I2C_CSR2 i2c_csr2; +extern I2C_EVEN_CSR i2c_even_csr; +extern I2C_ODD_CSR i2c_odd_csr; +extern I2C_CONFIG i2c_config; +extern u_char i2c_dt_id; +extern u_char i2c_x_clip_start; +extern u_char i2c_y_clip_start; +extern u_char i2c_x_clip_end; +extern u_char i2c_y_clip_end; +extern u_char i2c_ad_addr; +extern u_char i2c_ad_lut; +extern I2C_AD_CMD i2c_ad_cmd; +extern u_char i2c_dig_out; +extern u_char i2c_pm_lut_addr; +extern u_char i2c_pm_lut_data; /* Functions for Global use */ From 5d3921117d7c3bfec5a5877ba0be0430e2aec491 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 9 Feb 2010 12:41:38 -0800 Subject: [PATCH 253/367] Staging: dt3155: replace u_char usage Use u8 instead, that's the proper thing to do. Cc: Scott Smedley Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dt3155/dt3155_drv.c | 4 +- drivers/staging/dt3155/dt3155_drv.h | 4 +- drivers/staging/dt3155/dt3155_io.c | 30 +++++----- drivers/staging/dt3155/dt3155_io.h | 90 ++++++++++++++--------------- drivers/staging/dt3155/dt3155_isr.c | 2 +- 5 files changed, 65 insertions(+), 65 deletions(-) diff --git a/drivers/staging/dt3155/dt3155_drv.c b/drivers/staging/dt3155/dt3155_drv.c index 716814ed42bb..76f8a78c01e7 100644 --- a/drivers/staging/dt3155/dt3155_drv.c +++ b/drivers/staging/dt3155/dt3155_drv.c @@ -122,13 +122,13 @@ int dt3155_major = 0; struct dt3155_status_s dt3155_status[ MAXBOARDS ]; /* kernel logical address of the board */ -u_char *dt3155_lbase[ MAXBOARDS ] = { NULL +u8 *dt3155_lbase[ MAXBOARDS ] = { NULL #if MAXBOARDS == 2 , NULL #endif }; /* DT3155 registers */ -u_char *dt3155_bbase = NULL; /* kernel logical address of the * +u8 *dt3155_bbase = NULL; /* kernel logical address of the * * buffer region */ u_int dt3155_dev_open[ MAXBOARDS ] = {0 #if MAXBOARDS == 2 diff --git a/drivers/staging/dt3155/dt3155_drv.h b/drivers/staging/dt3155/dt3155_drv.h index 215399a3d26a..1006cf5410da 100644 --- a/drivers/staging/dt3155/dt3155_drv.h +++ b/drivers/staging/dt3155/dt3155_drv.h @@ -25,10 +25,10 @@ MA 02111-1307 USA #define DT3155_DRV_INC /* kernel logical address of the frame grabbers */ -extern u_char *dt3155_lbase[MAXBOARDS]; +extern u8 *dt3155_lbase[MAXBOARDS]; /* kernel logical address of ram buffer */ -extern u_char *dt3155_bbase; +extern u8 *dt3155_bbase; #ifdef __KERNEL__ #include diff --git a/drivers/staging/dt3155/dt3155_io.c b/drivers/staging/dt3155/dt3155_io.c index 6d516863d1ae..b0f1a78074a1 100644 --- a/drivers/staging/dt3155/dt3155_io.c +++ b/drivers/staging/dt3155/dt3155_io.c @@ -86,17 +86,17 @@ I2C_CSR2 i2c_csr2; I2C_EVEN_CSR i2c_even_csr; I2C_ODD_CSR i2c_odd_csr; I2C_CONFIG i2c_config; -u_char i2c_dt_id; -u_char i2c_x_clip_start; -u_char i2c_y_clip_start; -u_char i2c_x_clip_end; -u_char i2c_y_clip_end; -u_char i2c_ad_addr; -u_char i2c_ad_lut; +u8 i2c_dt_id; +u8 i2c_x_clip_start; +u8 i2c_y_clip_start; +u8 i2c_x_clip_end; +u8 i2c_y_clip_end; +u8 i2c_ad_addr; +u8 i2c_ad_lut; I2C_AD_CMD i2c_ad_cmd; -u_char i2c_dig_out; -u_char i2c_pm_lut_addr; -u_char i2c_pm_lut_data; +u8 i2c_dig_out; +u8 i2c_pm_lut_addr; +u8 i2c_pm_lut_data; // return the time difference (in microseconds) b/w & . @@ -117,7 +117,7 @@ long elapsed2 (const struct timeval *pStart, const struct timeval *pEnd) otherwise returns 0 ***********************************************************************/ -int wait_ibsyclr(u_char * lpReg) +int wait_ibsyclr(u8 * lpReg) { /* wait 100 microseconds */ @@ -168,7 +168,7 @@ int wait_ibsyclr(u_char * lpReg) Returns TRUE - Successful completion FALSE - Timeout error - cycle did not complete! ***********************************************************************/ -int WriteI2C (u_char * lpReg, u_short wIregIndex, u_char byVal) +int WriteI2C (u8 * lpReg, u_short wIregIndex, u8 byVal) { int writestat; /* status for return */ @@ -203,7 +203,7 @@ int WriteI2C (u_char * lpReg, u_short wIregIndex, u_char byVal) Returns TRUE - Successful completion FALSE - Timeout error - cycle did not complete! ***********************************************************************/ -int ReadI2C (u_char * lpReg, u_short wIregIndex, u_char * byVal) +int ReadI2C (u8 * lpReg, u_short wIregIndex, u8 * byVal) { int writestat; /* status for return */ @@ -229,8 +229,8 @@ int ReadI2C (u_char * lpReg, u_short wIregIndex, u_char * byVal) /* first read data is in IIC_CSR1 */ ReadMReg((lpReg + IIC_CSR1), iic_csr1_r.reg); - /* now get data u_char out of register */ - *byVal = (u_char) iic_csr1_r.fld.RD_DATA; + /* now get data u8 out of register */ + *byVal = (u8) iic_csr1_r.fld.RD_DATA; return writestat; /* return with status */ } diff --git a/drivers/staging/dt3155/dt3155_io.h b/drivers/staging/dt3155/dt3155_io.h index 72d655dae5a2..dd25a79bdee9 100644 --- a/drivers/staging/dt3155/dt3155_io.h +++ b/drivers/staging/dt3155/dt3155_io.h @@ -261,71 +261,71 @@ extern DMA_UPPER_LMT_R odd_dma_upper_lmt_r; /******** Assignments and Typedefs for 8 bit I2C Registers********************/ typedef union i2c_csr2_tag { - u_char reg; + u8 reg; struct { - u_char CHROM_FIL:1; - u_char SYNC_SNTL:1; - u_char HZ50:1; - u_char SYNC_PRESENT:1; - u_char BUSY_EVE:1; - u_char BUSY_ODD:1; - u_char DISP_PASS:1; + u8 CHROM_FIL:1; + u8 SYNC_SNTL:1; + u8 HZ50:1; + u8 SYNC_PRESENT:1; + u8 BUSY_EVE:1; + u8 BUSY_ODD:1; + u8 DISP_PASS:1; } fld; } I2C_CSR2; typedef union i2c_even_csr_tag { - u_char reg; + u8 reg; struct { - u_char DONE_EVE :1; - u_char SNGL_EVE :1; - u_char ERROR_EVE:1; - u_char :5; + u8 DONE_EVE :1; + u8 SNGL_EVE :1; + u8 ERROR_EVE:1; + u8 :5; } fld; } I2C_EVEN_CSR; typedef union i2c_odd_csr_tag { - u_char reg; + u8 reg; struct { - u_char DONE_ODD:1; - u_char SNGL_ODD:1; - u_char ERROR_ODD:1; - u_char :5; + u8 DONE_ODD:1; + u8 SNGL_ODD:1; + u8 ERROR_ODD:1; + u8 :5; } fld; } I2C_ODD_CSR; typedef union i2c_config_tag { - u_char reg; + u8 reg; struct { - u_char ACQ_MODE:2; - u_char EXT_TRIG_EN:1; - u_char EXT_TRIG_POL:1; - u_char H_SCALE:1; - u_char CLIP:1; - u_char PM_LUT_SEL:1; - u_char PM_LUT_PGM:1; + u8 ACQ_MODE:2; + u8 EXT_TRIG_EN:1; + u8 EXT_TRIG_POL:1; + u8 H_SCALE:1; + u8 CLIP:1; + u8 PM_LUT_SEL:1; + u8 PM_LUT_PGM:1; } fld; } I2C_CONFIG; typedef union i2c_ad_cmd_tag { /* bits can have 3 different meanings depending on value of AD_ADDR */ - u_char reg; + u8 reg; /* Bt252 Command Register if AD_ADDR = 00h */ struct { - u_char :2; - u_char SYNC_LVL_SEL:2; - u_char SYNC_CNL_SEL:2; - u_char DIGITIZE_CNL_SEL1:2; + u8 :2; + u8 SYNC_LVL_SEL:2; + u8 SYNC_CNL_SEL:2; + u8 DIGITIZE_CNL_SEL1:2; } bt252_command; /* Bt252 IOUT0 register if AD_ADDR = 01h */ struct { - u_char IOUT_DATA:8; + u8 IOUT_DATA:8; } bt252_iout0; /* BT252 IOUT1 register if AD_ADDR = 02h */ struct { - u_char IOUT_DATA:8; + u8 IOUT_DATA:8; } bt252_iout1; } I2C_AD_CMD; @@ -336,23 +336,23 @@ extern I2C_CSR2 i2c_csr2; extern I2C_EVEN_CSR i2c_even_csr; extern I2C_ODD_CSR i2c_odd_csr; extern I2C_CONFIG i2c_config; -extern u_char i2c_dt_id; -extern u_char i2c_x_clip_start; -extern u_char i2c_y_clip_start; -extern u_char i2c_x_clip_end; -extern u_char i2c_y_clip_end; -extern u_char i2c_ad_addr; -extern u_char i2c_ad_lut; +extern u8 i2c_dt_id; +extern u8 i2c_x_clip_start; +extern u8 i2c_y_clip_start; +extern u8 i2c_x_clip_end; +extern u8 i2c_y_clip_end; +extern u8 i2c_ad_addr; +extern u8 i2c_ad_lut; extern I2C_AD_CMD i2c_ad_cmd; -extern u_char i2c_dig_out; -extern u_char i2c_pm_lut_addr; -extern u_char i2c_pm_lut_data; +extern u8 i2c_dig_out; +extern u8 i2c_pm_lut_addr; +extern u8 i2c_pm_lut_data; /* Functions for Global use */ /* access 8-bit IIC registers */ -extern int ReadI2C(u_char *lpReg, u_short wIregIndex, u_char *byVal); -extern int WriteI2C(u_char *lpReg, u_short wIregIndex, u_char byVal); +extern int ReadI2C(u8 *lpReg, u_short wIregIndex, u8 *byVal); +extern int WriteI2C(u8 *lpReg, u_short wIregIndex, u8 byVal); #endif diff --git a/drivers/staging/dt3155/dt3155_isr.c b/drivers/staging/dt3155/dt3155_isr.c index 54460dbb867a..faed085d4fc7 100644 --- a/drivers/staging/dt3155/dt3155_isr.c +++ b/drivers/staging/dt3155/dt3155_isr.c @@ -318,7 +318,7 @@ u_long dt3155_setup_buffers(u_long *allocatorAddr) /* Make sure the buffering variables are consistent */ { - u_char *ptr = (u_char *) dt3155_fbuffer[ m ]; + u8 *ptr = (u8 *) dt3155_fbuffer[ m ]; for( index = 0; index < sizeof(struct dt3155_fbuffer_s); index++) *(ptr++)=0; } From dcff74ce8b458792c1628ad9f3803fc648f94e11 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 9 Feb 2010 12:41:38 -0800 Subject: [PATCH 254/367] Staging: dt3155: replace u_int and u_long usage Use u32 and u64 instead, that's the proper thing to do. Cc: Scott Smedley Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dt3155/allocator.c | 4 +- drivers/staging/dt3155/allocator.h | 2 +- drivers/staging/dt3155/dt3155.h | 36 +++--- drivers/staging/dt3155/dt3155_drv.c | 51 ++++---- drivers/staging/dt3155/dt3155_drv.h | 2 +- drivers/staging/dt3155/dt3155_io.c | 16 +-- drivers/staging/dt3155/dt3155_io.h | 174 ++++++++++++++-------------- drivers/staging/dt3155/dt3155_isr.c | 52 ++++----- drivers/staging/dt3155/dt3155_isr.h | 2 +- 9 files changed, 169 insertions(+), 170 deletions(-) diff --git a/drivers/staging/dt3155/allocator.c b/drivers/staging/dt3155/allocator.c index 4983c9379e57..114e2a86fefa 100644 --- a/drivers/staging/dt3155/allocator.c +++ b/drivers/staging/dt3155/allocator.c @@ -27,7 +27,7 @@ ------------------------------------------------------------------- 02-Aug-2002 NJC allocator now steps in 1MB increments, rather than doubling its size each time. - Also, allocator_init(u_int *) now returns + Also, allocator_init(u32 *) now returns (in the first arg) the size of the free space. This is no longer consistent with using the allocator as a module, and some changes @@ -195,7 +195,7 @@ int allocator_free_dma(unsigned long address) * On cleanup everything is released. If the list is not empty, that a * problem of our clients */ -int allocator_init(u_long *allocator_max) +int allocator_init(u64 *allocator_max) { /* check how much free memory is there */ void *remapped; diff --git a/drivers/staging/dt3155/allocator.h b/drivers/staging/dt3155/allocator.h index a2f90ffa3d10..4cd81bdb3faa 100644 --- a/drivers/staging/dt3155/allocator.h +++ b/drivers/staging/dt3155/allocator.h @@ -24,5 +24,5 @@ void allocator_free_dma(unsigned long address); unsigned long allocator_allocate_dma(unsigned long kilobytes, int priority); -int allocator_init(u_long *); +int allocator_init(u64 *); void allocator_cleanup(void); diff --git a/drivers/staging/dt3155/dt3155.h b/drivers/staging/dt3155/dt3155.h index 2a01e017d5fe..22292b102a33 100644 --- a/drivers/staging/dt3155/dt3155.h +++ b/drivers/staging/dt3155/dt3155.h @@ -35,7 +35,7 @@ MA 02111-1307 USA #define _DT3155_INC #ifdef __KERNEL__ -#include /* u_int etc. */ +#include #include /* struct timeval */ #else #include @@ -71,16 +71,16 @@ MA 02111-1307 USA /* Configuration structure */ struct dt3155_config_s { - u_int acq_mode; - u_int cols, rows; - u_int continuous; + u32 acq_mode; + u32 cols, rows; + u32 continuous; }; /* hold data for each frame */ typedef struct { - u_long addr; /* address of the buffer with the frame */ - u_long tag; /* unique number for the frame */ + u64 addr; /* address of the buffer with the frame */ + u64 tag; /* unique number for the frame */ struct timeval time; /* time that capture took place */ } frame_info_t; @@ -101,14 +101,14 @@ struct dt3155_fbuffer_s { int locked_buf; /* Buffers used by user */ int ready_que[BOARD_MAX_BUFFS]; - u_long ready_head; /* The most recent buffer located here */ - u_long ready_len; /* The number of ready buffers */ + u64 ready_head; /* The most recent buffer located here */ + u64 ready_len; /* The number of ready buffers */ int even_happened; int even_stopped; int stop_acquire; /* Flag to stop interrupts */ - u_long frame_count; /* Counter for frames acquired by this card */ + u64 frame_count; /* Counter for frames acquired by this card */ }; @@ -122,14 +122,14 @@ struct dt3155_fbuffer_s { /* There is one status structure for each card. */ typedef struct dt3155_status_s { int fixed_mode; /* if 1, we are in fixed frame mode */ - u_long reg_addr; /* Register address for a single card */ - u_long mem_addr; /* Buffer start addr for this card */ - u_long mem_size; /* This is the amount of mem available */ - u_int irq; /* this card's irq */ + u64 reg_addr; /* Register address for a single card */ + u64 mem_addr; /* Buffer start addr for this card */ + u64 mem_size; /* This is the amount of mem available */ + u32 irq; /* this card's irq */ struct dt3155_config_s config; /* configuration struct */ struct dt3155_fbuffer_s fbuffer; /* frame buffer state struct */ - u_long state; /* this card's state */ - u_int device_installed; /* Flag if installed. 1=installed */ + u64 state; /* this card's state */ + u32 device_installed; /* Flag if installed. 1=installed */ } dt3155_status_t; /* Reference to global status structure */ @@ -161,9 +161,9 @@ extern struct dt3155_status_s dt3155_status[MAXBOARDS]; /* User code will probably want to declare one of these for each card */ typedef struct dt3155_read_s { - u_long offset; - u_long frame_seq; - u_long state; + u64 offset; + u64 frame_seq; + u64 state; frame_info_t frame_info; } dt3155_read_t; diff --git a/drivers/staging/dt3155/dt3155_drv.c b/drivers/staging/dt3155/dt3155_drv.c index 76f8a78c01e7..930a3e666c0a 100644 --- a/drivers/staging/dt3155/dt3155_drv.c +++ b/drivers/staging/dt3155/dt3155_drv.c @@ -130,14 +130,14 @@ u8 *dt3155_lbase[ MAXBOARDS ] = { NULL /* DT3155 registers */ u8 *dt3155_bbase = NULL; /* kernel logical address of the * * buffer region */ -u_int dt3155_dev_open[ MAXBOARDS ] = {0 +u32 dt3155_dev_open[ MAXBOARDS ] = {0 #if MAXBOARDS == 2 , 0 #endif }; -u_int ndevices = 0; -u_long unique_tag = 0;; +u32 ndevices = 0; +u64 unique_tag = 0;; /* @@ -180,7 +180,7 @@ static inline void dt3155_isr( int irq, void *dev_id, struct pt_regs *regs ) int minor = -1; int index; unsigned long flags; - u_long buffer_addr; + u64 buffer_addr; /* find out who issued the interrupt */ for ( index = 0; index < ndevices; index++ ) { @@ -249,7 +249,7 @@ static inline void dt3155_isr( int irq, void *dev_id, struct pt_regs *regs ) { /* GCS (Aug 2, 2002) -- In field mode, dma the odd field into the lower half of the buffer */ - const u_long stride = dt3155_status[ minor ].config.cols; + const u64 stride = dt3155_status[ minor ].config.cols; buffer_addr = dt3155_fbuffer[ minor ]-> frame_info[ dt3155_fbuffer[ minor ]->active_buf ].addr + (DT3155_MAX_ROWS / 2) * stride; @@ -311,8 +311,8 @@ static inline void dt3155_isr( int irq, void *dev_id, struct pt_regs *regs ) dt3155_fbuffer[ minor ]->stop_acquire = 0; dt3155_fbuffer[ minor ]->even_stopped = 0; - printk(KERN_DEBUG "dt3155: state is now %lx\n", - dt3155_status[minor].state); + printk(KERN_DEBUG "dt3155: state is now %x\n", + (u32)dt3155_status[minor].state); } else { @@ -428,7 +428,7 @@ static inline void dt3155_isr( int irq, void *dev_id, struct pt_regs *regs ) *****************************************************/ static void dt3155_init_isr(int minor) { - const u_long stride = dt3155_status[ minor ].config.cols; + const u64 stride = dt3155_status[ minor ].config.cols; switch (dt3155_status[ minor ].state & DT3155_STATE_MODE) { @@ -522,11 +522,10 @@ static void dt3155_init_isr(int minor) * ioctl() * *****************************************************/ -static int dt3155_ioctl ( - struct inode *inode, - struct file *file, - u_int cmd, - u_long arg) +static int dt3155_ioctl(struct inode *inode, + struct file *file, + unsigned int cmd, + unsigned long arg) { int minor = MINOR(inode->i_rdev); /* What device are we ioctl()'ing? */ @@ -706,8 +705,8 @@ static int dt3155_open( struct inode* inode, struct file* filep) } if (dt3155_status[ minor ].state != DT3155_STATE_IDLE) { - printk ("DT3155: Not in idle state (state = %lx)\n", - dt3155_status[ minor ].state); + printk ("DT3155: Not in idle state (state = %x)\n", + (u32)dt3155_status[ minor ].state); return -EBUSY; } @@ -763,7 +762,7 @@ static ssize_t dt3155_read(struct file *filep, char __user *buf, { /* which device are we reading from? */ int minor = MINOR(filep->f_dentry->d_inode->i_rdev); - u_long offset; + u64 offset; int frame_index; frame_info_t *frame_info_p; @@ -821,11 +820,11 @@ static ssize_t dt3155_read(struct file *filep, char __user *buf, offset = frame_info_p->addr - dt3155_status[minor].mem_addr; put_user(offset, (unsigned int *) buf); - buf += sizeof(u_long); + buf += sizeof(u64); put_user( dt3155_status[minor].fbuffer.frame_count, (unsigned int *) buf); - buf += sizeof(u_long); + buf += sizeof(u64); put_user(dt3155_status[minor].state, (unsigned int *) buf); - buf += sizeof(u_long); + buf += sizeof(u64); if (copy_to_user(buf, frame_info_p, sizeof(frame_info_t))) return -EFAULT; @@ -899,7 +898,7 @@ static int find_PCI (void) /* Now, just go out and make sure that this/these device(s) is/are actually mapped into the kernel address space */ if ((error = pci_read_config_dword( pci_dev, PCI_BASE_ADDRESS_0, - (u_int *) &base))) + (u32 *) &base))) { printk("DT3155: Was not able to find device \n"); goto err; @@ -932,7 +931,7 @@ static int find_PCI (void) dt3155_status[ pci_index-1 ].device_installed = 1; printk("DT3155: Installing device %d w/irq %d and address %p\n", pci_index, - (u_int)dt3155_status[pci_index-1].irq, + (u32)dt3155_status[pci_index-1].irq, dt3155_lbase[pci_index-1]); } @@ -945,7 +944,7 @@ err: return DT_3155_FAILURE; } -u_long allocatorAddr = 0; +u64 allocatorAddr = 0; /***************************************************** * init_module() @@ -1024,10 +1023,10 @@ int init_module(void) dt3155_status[ index ].config.cols, dt3155_status[ index ].config.rows); printk("DT3155: m_addr = 0x%x; m_size = %ld; " - "state = %ld; device_installed = %d\n", - (u_int)dt3155_status[ index ].mem_addr, - dt3155_status[ index ].mem_size, - dt3155_status[ index ].state, + "state = %d; device_installed = %d\n", + (u32)dt3155_status[ index ].mem_addr, + (long int)dt3155_status[ index ].mem_size, + (u32)dt3155_status[ index ].state, dt3155_status[ index ].device_installed); } diff --git a/drivers/staging/dt3155/dt3155_drv.h b/drivers/staging/dt3155/dt3155_drv.h index 1006cf5410da..95e68c3388a4 100644 --- a/drivers/staging/dt3155/dt3155_drv.h +++ b/drivers/staging/dt3155/dt3155_drv.h @@ -38,7 +38,7 @@ extern wait_queue_head_t dt3155_read_wait_queue[MAXBOARDS]; #endif /* number of devices */ -extern u_int ndevices; +extern u32 ndevices; extern int dt3155_errno; diff --git a/drivers/staging/dt3155/dt3155_io.c b/drivers/staging/dt3155/dt3155_io.c index b0f1a78074a1..236d3ea0f9fb 100644 --- a/drivers/staging/dt3155/dt3155_io.c +++ b/drivers/staging/dt3155/dt3155_io.c @@ -55,12 +55,12 @@ MA 02111-1307 USA /****** local copies of board's 32 bit registers ******/ -u_long even_dma_start_r; /* bit 0 should always be 0 */ -u_long odd_dma_start_r; /* .. */ -u_long even_dma_stride_r; /* bits 0&1 should always be 0 */ -u_long odd_dma_stride_r; /* .. */ -u_long even_pixel_fmt_r; -u_long odd_pixel_fmt_r; +u64 even_dma_start_r; /* bit 0 should always be 0 */ +u64 odd_dma_start_r; /* .. */ +u64 even_dma_stride_r; /* bits 0&1 should always be 0 */ +u64 odd_dma_stride_r; /* .. */ +u64 even_pixel_fmt_r; +u64 odd_pixel_fmt_r; FIFO_TRIGGER_R fifo_trigger_r; XFER_MODE_R xfer_mode_r; @@ -68,8 +68,8 @@ CSR1_R csr1_r; RETRY_WAIT_CNT_R retry_wait_cnt_r; INT_CSR_R int_csr_r; -u_long even_fld_mask_r; -u_long odd_fld_mask_r; +u64 even_fld_mask_r; +u64 odd_fld_mask_r; MASK_LENGTH_R mask_length_r; FIFO_FLAG_CNT_R fifo_flag_cnt_r; diff --git a/drivers/staging/dt3155/dt3155_io.h b/drivers/staging/dt3155/dt3155_io.h index dd25a79bdee9..a135aada5902 100644 --- a/drivers/staging/dt3155/dt3155_io.h +++ b/drivers/staging/dt3155/dt3155_io.h @@ -36,8 +36,8 @@ MA 02111-1307 USA /* macros to access registers */ -#define WriteMReg(Address, Data) (*((u_long *)(Address)) = Data) -#define ReadMReg(Address, Data) (Data = *((u_long *)(Address))) +#define WriteMReg(Address, Data) (*((u64 *)(Address)) = Data) +#define ReadMReg(Address, Data) (Data = *((u64 *)(Address))) /***************** 32 bit register globals **************/ @@ -71,114 +71,114 @@ MA 02111-1307 USA /******** Assignments and Typedefs for 32 bit Memory Mapped Registers ********/ typedef union fifo_trigger_tag { - u_long reg; + u64 reg; struct { - u_long PACKED:6; - u_long :9; - u_long PLANER:7; - u_long :9; + u64 PACKED:6; + u64 :9; + u64 PLANER:7; + u64 :9; } fld; } FIFO_TRIGGER_R; typedef union xfer_mode_tag { - u_long reg; + u64 reg; struct { - u_long :2; - u_long FIELD_TOGGLE:1; - u_long :5; - u_long :2; - u_long :22; + u64 :2; + u64 FIELD_TOGGLE:1; + u64 :5; + u64 :2; + u64 :22; } fld; } XFER_MODE_R; typedef union csr1_tag { - u_long reg; + u64 reg; struct { - u_long CAP_CONT_EVE:1; - u_long CAP_CONT_ODD:1; - u_long CAP_SNGL_EVE:1; - u_long CAP_SNGL_ODD:1; - u_long FLD_DN_EVE :1; - u_long FLD_DN_ODD :1; - u_long SRST :1; - u_long FIFO_EN :1; - u_long FLD_CRPT_EVE:1; - u_long FLD_CRPT_ODD:1; - u_long ADDR_ERR_EVE:1; - u_long ADDR_ERR_ODD:1; - u_long CRPT_DIS :1; - u_long RANGE_EN :1; - u_long :16; + u64 CAP_CONT_EVE:1; + u64 CAP_CONT_ODD:1; + u64 CAP_SNGL_EVE:1; + u64 CAP_SNGL_ODD:1; + u64 FLD_DN_EVE :1; + u64 FLD_DN_ODD :1; + u64 SRST :1; + u64 FIFO_EN :1; + u64 FLD_CRPT_EVE:1; + u64 FLD_CRPT_ODD:1; + u64 ADDR_ERR_EVE:1; + u64 ADDR_ERR_ODD:1; + u64 CRPT_DIS :1; + u64 RANGE_EN :1; + u64 :16; } fld; } CSR1_R; typedef union retry_wait_cnt_tag { - u_long reg; + u64 reg; struct { - u_long RTRY_WAIT_CNT:8; - u_long :24; + u64 RTRY_WAIT_CNT:8; + u64 :24; } fld; } RETRY_WAIT_CNT_R; typedef union int_csr_tag { - u_long reg; + u64 reg; struct { - u_long FLD_END_EVE :1; - u_long FLD_END_ODD :1; - u_long FLD_START :1; - u_long :5; - u_long FLD_END_EVE_EN:1; - u_long FLD_END_ODD_EN:1; - u_long FLD_START_EN :1; - u_long :21; + u64 FLD_END_EVE :1; + u64 FLD_END_ODD :1; + u64 FLD_START :1; + u64 :5; + u64 FLD_END_EVE_EN:1; + u64 FLD_END_ODD_EN:1; + u64 FLD_START_EN :1; + u64 :21; } fld; } INT_CSR_R; typedef union mask_length_tag { - u_long reg; + u64 reg; struct { - u_long MASK_LEN_EVE:5; - u_long :11; - u_long MASK_LEN_ODD:5; - u_long :11; + u64 MASK_LEN_EVE:5; + u64 :11; + u64 MASK_LEN_ODD:5; + u64 :11; } fld; } MASK_LENGTH_R; typedef union fifo_flag_cnt_tag { - u_long reg; + u64 reg; struct { - u_long AF_COUNT:7; - u_long :9; - u_long AE_COUNT:7; - u_long :9; + u64 AF_COUNT:7; + u64 :9; + u64 AE_COUNT:7; + u64 :9; } fld; } FIFO_FLAG_CNT_R; typedef union iic_clk_dur { - u_long reg; + u64 reg; struct { - u_long PHASE_1:8; - u_long PHASE_2:8; - u_long PHASE_3:8; - u_long PHASE_4:8; + u64 PHASE_1:8; + u64 PHASE_2:8; + u64 PHASE_3:8; + u64 PHASE_4:8; } fld; } IIC_CLK_DUR_R; typedef union iic_csr1_tag { - u_long reg; + u64 reg; struct { - u_long AUTO_EN :1; - u_long BYPASS :1; - u_long SDA_OUT :1; - u_long SCL_OUT :1; - u_long :4; - u_long AUTO_ABORT :1; - u_long DIRECT_ABORT:1; - u_long SDA_IN :1; - u_long SCL_IN :1; - u_long :4; - u_long AUTO_ADDR :8; - u_long RD_DATA :8; + u64 AUTO_EN :1; + u64 BYPASS :1; + u64 SDA_OUT :1; + u64 SCL_OUT :1; + u64 :4; + u64 AUTO_ABORT :1; + u64 DIRECT_ABORT:1; + u64 SDA_IN :1; + u64 SCL_IN :1; + u64 :4; + u64 AUTO_ADDR :8; + u64 RD_DATA :8; } fld; } IIC_CSR1_R; @@ -186,14 +186,14 @@ typedef union iic_csr1_tag { * iic_csr2_tag */ typedef union iic_csr2_tag { - u_long reg; + u64 reg; struct { - u_long DIR_WR_DATA :8; - u_long DIR_SUB_ADDR:8; - u_long DIR_RD :1; - u_long DIR_ADDR :7; - u_long NEW_CYCLE :1; - u_long :7; + u64 DIR_WR_DATA :8; + u64 DIR_SUB_ADDR:8; + u64 DIR_RD :1; + u64 DIR_ADDR :7; + u64 NEW_CYCLE :1; + u64 :7; } fld; } IIC_CSR2_R; @@ -203,10 +203,10 @@ typedef union iic_csr2_tag { * dma_upper_lmt_tag */ typedef union dma_upper_lmt_tag { - u_long reg; + u64 reg; struct { - u_long DMA_UPPER_LMT_VAL:24; - u_long :8; + u64 DMA_UPPER_LMT_VAL:24; + u64 :8; } fld; } DMA_UPPER_LMT_R; @@ -214,12 +214,12 @@ typedef union dma_upper_lmt_tag { /* * Global declarations of local copies of boards' 32 bit registers */ -extern u_long even_dma_start_r; /* bit 0 should always be 0 */ -extern u_long odd_dma_start_r; /* .. */ -extern u_long even_dma_stride_r; /* bits 0&1 should always be 0 */ -extern u_long odd_dma_stride_r; /* .. */ -extern u_long even_pixel_fmt_r; -extern u_long odd_pixel_fmt_r; +extern u64 even_dma_start_r; /* bit 0 should always be 0 */ +extern u64 odd_dma_start_r; /* .. */ +extern u64 even_dma_stride_r; /* bits 0&1 should always be 0 */ +extern u64 odd_dma_stride_r; /* .. */ +extern u64 even_pixel_fmt_r; +extern u64 odd_pixel_fmt_r; extern FIFO_TRIGGER_R fifo_trigger_r; extern XFER_MODE_R xfer_mode_r; @@ -227,8 +227,8 @@ extern CSR1_R csr1_r; extern RETRY_WAIT_CNT_R retry_wait_cnt_r; extern INT_CSR_R int_csr_r; -extern u_long even_fld_mask_r; -extern u_long odd_fld_mask_r; +extern u64 even_fld_mask_r; +extern u64 odd_fld_mask_r; extern MASK_LENGTH_R mask_length_r; extern FIFO_FLAG_CNT_R fifo_flag_cnt_r; diff --git a/drivers/staging/dt3155/dt3155_isr.c b/drivers/staging/dt3155/dt3155_isr.c index faed085d4fc7..5b790867c292 100644 --- a/drivers/staging/dt3155/dt3155_isr.c +++ b/drivers/staging/dt3155/dt3155_isr.c @@ -220,7 +220,7 @@ inline void printques( int m ) * the start address up to the beginning of the * next 4MB chunk (assuming bufsize < 4MB). *****************************************************/ -u_long adjust_4MB (u_long buf_addr, u_long bufsize) { +u64 adjust_4MB (u64 buf_addr, u64 bufsize) { if (((buf_addr+bufsize) & UPPER_10_BITS) != (buf_addr & UPPER_10_BITS)) return (buf_addr+bufsize) & UPPER_10_BITS; else @@ -235,26 +235,26 @@ u_long adjust_4MB (u_long buf_addr, u_long bufsize) { * buffers. If there is not enough free space * try for less memory. *****************************************************/ -void allocate_buffers (u_long *buf_addr, u_long* total_size_kbs, - u_long bufsize) +void allocate_buffers (u64 *buf_addr, u64* total_size_kbs, + u64 bufsize) { /* Compute the minimum amount of memory guaranteed to hold all MAXBUFFERS such that no buffer crosses the 4MB boundary. Store this value in the variable "full_size" */ - u_long allocator_max; - u_long bufs_per_chunk = (FOUR_MB / bufsize); - u_long filled_chunks = (MAXBUFFERS-1) / bufs_per_chunk; - u_long leftover_bufs = MAXBUFFERS - filled_chunks * bufs_per_chunk; + u64 allocator_max; + u64 bufs_per_chunk = (FOUR_MB / bufsize); + u64 filled_chunks = (MAXBUFFERS-1) / bufs_per_chunk; + u64 leftover_bufs = MAXBUFFERS - filled_chunks * bufs_per_chunk; - u_long full_size = bufsize /* possibly unusable part of 1st chunk */ + u64 full_size = bufsize /* possibly unusable part of 1st chunk */ + filled_chunks * FOUR_MB /* max # of completely filled 4mb chunks */ + leftover_bufs * bufsize; /* these buffs will be in a partly filled chunk at beginning or end */ - u_long full_size_kbs = 1 + (full_size-1) / 1024; - u_long min_size_kbs = 2*ndevices*bufsize / 1024; - u_long size_kbs; + u64 full_size_kbs = 1 + (full_size-1) / 1024; + u64 min_size_kbs = 2*ndevices*bufsize / 1024; + u64 size_kbs; /* Now, try to allocate full_size. If this fails, keep trying for less & less memory until it succeeds. */ @@ -264,13 +264,13 @@ void allocate_buffers (u_long *buf_addr, u_long* total_size_kbs, #endif size_kbs = full_size_kbs; *buf_addr = 0; - printk ("DT3155: We would like to get: %d KB\n", (u_int)(full_size_kbs)); - printk ("DT3155: ...but need at least: %d KB\n", (u_int)(min_size_kbs)); - printk ("DT3155: ...the allocator has: %d KB\n", (u_int)(allocator_max)); + printk ("DT3155: We would like to get: %d KB\n", (u32)(full_size_kbs)); + printk ("DT3155: ...but need at least: %d KB\n", (u32)(min_size_kbs)); + printk ("DT3155: ...the allocator has: %d KB\n", (u32)(allocator_max)); size_kbs = (full_size_kbs <= allocator_max ? full_size_kbs : allocator_max); if (size_kbs > min_size_kbs) { if ((*buf_addr = allocator_allocate_dma (size_kbs, GFP_KERNEL)) != 0) { - printk ("DT3155: Managed to allocate: %d KB\n", (u_int)size_kbs); + printk ("DT3155: Managed to allocate: %d KB\n", (u32)size_kbs); *total_size_kbs = size_kbs; return; } @@ -298,17 +298,17 @@ void allocate_buffers (u_long *buf_addr, u_long* total_size_kbs, * 4MB boundary. Also, add error checking. This * function will return -ENOMEM when not enough memory. *****************************************************/ -u_long dt3155_setup_buffers(u_long *allocatorAddr) +u64 dt3155_setup_buffers(u64 *allocatorAddr) { - u_long index; - u_long rambuff_addr; /* start of allocation */ - u_long rambuff_size; /* total size allocated to driver */ - u_long rambuff_acm; /* accumlator, keep track of how much + u64 index; + u64 rambuff_addr; /* start of allocation */ + u64 rambuff_size; /* total size allocated to driver */ + u64 rambuff_acm; /* accumlator, keep track of how much is left after being split up*/ - u_long rambuff_end; /* end of rambuff */ - u_long numbufs; /* number of useful buffers allocated (per device) */ - u_long bufsize = DT3155_MAX_ROWS * DT3155_MAX_COLS; + u64 rambuff_end; /* end of rambuff */ + u64 numbufs; /* number of useful buffers allocated (per device) */ + u64 bufsize = DT3155_MAX_ROWS * DT3155_MAX_COLS; int m; /* minor # of device, looped for all devs */ /* zero the fbuffer status and address structure */ @@ -327,8 +327,8 @@ u_long dt3155_setup_buffers(u_long *allocatorAddr) /* allocate a large contiguous chunk of RAM */ allocate_buffers (&rambuff_addr, &rambuff_size, bufsize); printk( "DT3155: mem info\n" ); - printk( " - rambuf_addr = 0x%x \n", (u_int)rambuff_addr ); - printk( " - length (kb) = %u \n", (u_int)rambuff_size ); + printk( " - rambuf_addr = 0x%x \n", (u32)rambuff_addr ); + printk( " - length (kb) = %u \n", (u32)rambuff_size ); if( rambuff_addr == 0 ) { printk( KERN_INFO @@ -350,7 +350,7 @@ u_long dt3155_setup_buffers(u_long *allocatorAddr) /* Following line is OK, will waste buffers if index * not evenly divisible by ndevices -NJC*/ numbufs = index / ndevices; - printk (" - numbufs = %u\n", (u_int) numbufs); + printk (" - numbufs = %u\n", (u32) numbufs); if (numbufs < 2) { printk( KERN_INFO "DT3155: Error setup_buffers() couldn't allocate 2 bufs/board\n" ); diff --git a/drivers/staging/dt3155/dt3155_isr.h b/drivers/staging/dt3155/dt3155_isr.h index c77a1008c09c..7f27910eb941 100644 --- a/drivers/staging/dt3155/dt3155_isr.h +++ b/drivers/staging/dt3155/dt3155_isr.h @@ -42,7 +42,7 @@ extern struct dt3155_fbuffer_s *dt3155_fbuffer[MAXBOARDS]; /* Initialize the buffering system. This should */ /* be called prior to enabling interrupts */ -u_long dt3155_setup_buffers(u_long *allocatorAddr); +u64 dt3155_setup_buffers(u64 *allocatorAddr); /* Get the next frame of data if it is ready. Returns */ /* zero if no data is ready. If there is data but */ From ef97e4ef156500eb1c26de57354ad685f0b6127b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 9 Feb 2010 12:41:38 -0800 Subject: [PATCH 255/367] Staging: dt3155: fix coding style issues in dt3155_io.c This fixes up the sparse and coding style issues found in the dt3155_io.c file. No code is changed, only formatting and removing unused code. Cc: Scott Smedley Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dt3155/dt3155_io.c | 339 ++++++++++++----------------- 1 file changed, 139 insertions(+), 200 deletions(-) diff --git a/drivers/staging/dt3155/dt3155_io.c b/drivers/staging/dt3155/dt3155_io.c index 236d3ea0f9fb..1c15604f4313 100644 --- a/drivers/staging/dt3155/dt3155_io.c +++ b/drivers/staging/dt3155/dt3155_io.c @@ -1,236 +1,175 @@ /* + * Copyright 1996,2002,2005 Gregory D. Hager, Alfred A. Rizzi, Noah J. Cowan, + * Jason Lapenta, Scott Smedley + * + * This file is part of the DT3155 Device Driver. + * + * The DT3155 Device Driver is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The DT3155 Device Driver is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. + */ -Copyright 1996,2002,2005 Gregory D. Hager, Alfred A. Rizzi, Noah J. Cowan, - Jason Lapenta, Scott Smedley - -This file is part of the DT3155 Device Driver. - -The DT3155 Device Driver is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The DT3155 Device Driver is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty -of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with the DT3155 Device Driver; if not, write to the Free -Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, -MA 02111-1307 USA - - --- Changes -- - - Date Programmer Description of changes made - ------------------------------------------------------------------- - 10-Oct-2001 SS port to 2.4 kernel. - 24-Jul-2002 SS GPL licence. - 26-Jul-2002 SS Bug fix: timing logic was wrong. - 08-Aug-2005 SS port to 2.6 kernel. - -*/ - -/* This file provides some basic register io routines. It is modified - from demo code provided by Data Translations. */ - -#ifdef __KERNEL__ -#include -#endif - -#if 0 -#include -#include -#include -#endif +/* + * This file provides some basic register io routines. It is modified from + * demo code provided by Data Translations. + */ +#include #include "dt3155.h" #include "dt3155_io.h" #include "dt3155_drv.h" -#ifndef __KERNEL__ -#include -#endif - /****** local copies of board's 32 bit registers ******/ -u64 even_dma_start_r; /* bit 0 should always be 0 */ -u64 odd_dma_start_r; /* .. */ -u64 even_dma_stride_r; /* bits 0&1 should always be 0 */ -u64 odd_dma_stride_r; /* .. */ -u64 even_pixel_fmt_r; -u64 odd_pixel_fmt_r; +u64 even_dma_start_r; /* bit 0 should always be 0 */ +u64 odd_dma_start_r; /* .. */ +u64 even_dma_stride_r; /* bits 0&1 should always be 0 */ +u64 odd_dma_stride_r; /* .. */ +u64 even_pixel_fmt_r; +u64 odd_pixel_fmt_r; -FIFO_TRIGGER_R fifo_trigger_r; -XFER_MODE_R xfer_mode_r; -CSR1_R csr1_r; -RETRY_WAIT_CNT_R retry_wait_cnt_r; -INT_CSR_R int_csr_r; +FIFO_TRIGGER_R fifo_trigger_r; +XFER_MODE_R xfer_mode_r; +CSR1_R csr1_r; +RETRY_WAIT_CNT_R retry_wait_cnt_r; +INT_CSR_R int_csr_r; -u64 even_fld_mask_r; -u64 odd_fld_mask_r; +u64 even_fld_mask_r; +u64 odd_fld_mask_r; -MASK_LENGTH_R mask_length_r; -FIFO_FLAG_CNT_R fifo_flag_cnt_r; -IIC_CLK_DUR_R iic_clk_dur_r; -IIC_CSR1_R iic_csr1_r; -IIC_CSR2_R iic_csr2_r; -DMA_UPPER_LMT_R even_dma_upper_lmt_r; -DMA_UPPER_LMT_R odd_dma_upper_lmt_r; +MASK_LENGTH_R mask_length_r; +FIFO_FLAG_CNT_R fifo_flag_cnt_r; +IIC_CLK_DUR_R iic_clk_dur_r; +IIC_CSR1_R iic_csr1_r; +IIC_CSR2_R iic_csr2_r; +DMA_UPPER_LMT_R even_dma_upper_lmt_r; +DMA_UPPER_LMT_R odd_dma_upper_lmt_r; /******** local copies of board's 8 bit I2C registers ******/ -I2C_CSR2 i2c_csr2; -I2C_EVEN_CSR i2c_even_csr; -I2C_ODD_CSR i2c_odd_csr; -I2C_CONFIG i2c_config; -u8 i2c_dt_id; -u8 i2c_x_clip_start; -u8 i2c_y_clip_start; -u8 i2c_x_clip_end; -u8 i2c_y_clip_end; -u8 i2c_ad_addr; -u8 i2c_ad_lut; -I2C_AD_CMD i2c_ad_cmd; -u8 i2c_dig_out; -u8 i2c_pm_lut_addr; -u8 i2c_pm_lut_data; +I2C_CSR2 i2c_csr2; +I2C_EVEN_CSR i2c_even_csr; +I2C_ODD_CSR i2c_odd_csr; +I2C_CONFIG i2c_config; +u8 i2c_dt_id; +u8 i2c_x_clip_start; +u8 i2c_y_clip_start; +u8 i2c_x_clip_end; +u8 i2c_y_clip_end; +u8 i2c_ad_addr; +u8 i2c_ad_lut; +I2C_AD_CMD i2c_ad_cmd; +u8 i2c_dig_out; +u8 i2c_pm_lut_addr; +u8 i2c_pm_lut_data; - -// return the time difference (in microseconds) b/w & . -long elapsed2 (const struct timeval *pStart, const struct timeval *pEnd) +/* + * wait_ibsyclr() + * + * This function handles read/write timing and r/w timeout error + * + * Returns TRUE if NEW_CYCLE clears + * Returns FALSE if NEW_CYCLE doesn't clear in roughly 3 msecs, otherwise + * returns 0 + */ +static int wait_ibsyclr(u8 *lpReg) { - long i = (pEnd->tv_sec - pStart->tv_sec) * 1000000; - i += pEnd->tv_usec - pStart->tv_usec; - return i; + /* wait 100 microseconds */ + udelay(100L); + /* __delay(loops_per_sec/10000); */ + if (iic_csr2_r.fld.NEW_CYCLE) { + /* if NEW_CYCLE didn't clear */ + /* TIMEOUT ERROR */ + dt3155_errno = DT_ERR_I2C_TIMEOUT; + return FALSE; + } else + return TRUE; /* no error */ } -/*********************************************************************** - wait_ibsyclr() - - This function handles read/write timing and r/w timeout error - - Returns TRUE if NEW_CYCLE clears - Returns FALSE if NEW_CYCLE doesn't clear in roughly 3 msecs, - otherwise returns 0 - -***********************************************************************/ -int wait_ibsyclr(u8 * lpReg) +/* + * WriteI2C() + * + * This function handles writing to 8-bit DT3155 registers + * + * 1st parameter is pointer to 32-bit register base address + * 2nd parameter is reg. index; + * 3rd is value to be written + * + * Returns TRUE - Successful completion + * FALSE - Timeout error - cycle did not complete! + */ +int WriteI2C(u8 *lpReg, u_short wIregIndex, u8 byVal) { - /* wait 100 microseconds */ + int writestat; /* status for return */ -#ifdef __KERNEL__ - udelay(100L); - /* __delay(loops_per_sec/10000); */ - if (iic_csr2_r.fld.NEW_CYCLE ) - { /* if NEW_CYCLE didn't clear */ - /* TIMEOUT ERROR */ - dt3155_errno = DT_ERR_I2C_TIMEOUT; - return FALSE; - } - else - return TRUE; /* no error */ -#else - struct timeval StartTime; - struct timeval EndTime; + /* read 32 bit IIC_CSR2 register data into union */ - const int to_3ms = 3000; /* time out of 3ms = 3000us */ + ReadMReg((lpReg + IIC_CSR2), iic_csr2_r.reg); - gettimeofday( &StartTime, NULL ); - do { - /* get new iic_csr2 value: */ - ReadMReg((lpReg + IIC_CSR2), iic_csr2_r.reg); - gettimeofday( &EndTime, NULL ); - } - while ((elapsed2(&StartTime, &EndTime) < to_3ms) && iic_csr2_r.fld.NEW_CYCLE); + /* for write operation */ + iic_csr2_r.fld.DIR_RD = 0; + /* I2C address of I2C register: */ + iic_csr2_r.fld.DIR_ADDR = wIregIndex; + /* 8 bit data to be written to I2C reg */ + iic_csr2_r.fld.DIR_WR_DATA = byVal; + /* will start a direct I2C cycle: */ + iic_csr2_r.fld.NEW_CYCLE = 1; - if (iic_csr2_r.fld.NEW_CYCLE ) - { /* if NEW_CYCLE didn't clear */ - printf("Timed out waiting for NEW_CYCLE to clear!"); - return FALSE; - } - else - return TRUE; /* no error */ -#endif + /* xfer union data into 32 bit IIC_CSR2 register */ + WriteMReg((lpReg + IIC_CSR2), iic_csr2_r.reg); + + /* wait for IIC cycle to finish */ + writestat = wait_ibsyclr(lpReg); + return writestat; } -/*********************************************************************** - WriteI2C() - - This function handles writing to 8-bit DT3155 registers - - 1st parameter is pointer to 32-bit register base address - 2nd parameter is reg. index; - 3rd is value to be written - - Returns TRUE - Successful completion - FALSE - Timeout error - cycle did not complete! -***********************************************************************/ -int WriteI2C (u8 * lpReg, u_short wIregIndex, u8 byVal) +/* + * ReadI2C() + * + * This function handles reading from 8-bit DT3155 registers + * + * 1st parameter is pointer to 32-bit register base address + * 2nd parameter is reg. index; + * 3rd is adrs of value to be read + * + * Returns TRUE - Successful completion + * FALSE - Timeout error - cycle did not complete! + */ +int ReadI2C(u8 *lpReg, u_short wIregIndex, u8 *byVal) { - int writestat; /* status for return */ + int writestat; /* status for return */ - /* read 32 bit IIC_CSR2 register data into union */ + /* read 32 bit IIC_CSR2 register data into union */ + ReadMReg((lpReg + IIC_CSR2), iic_csr2_r.reg); - ReadMReg((lpReg + IIC_CSR2), iic_csr2_r.reg); + /* for read operation */ + iic_csr2_r.fld.DIR_RD = 1; - iic_csr2_r.fld.DIR_RD = 0; /* for write operation */ - iic_csr2_r.fld.DIR_ADDR = wIregIndex; /* I2C address of I2C register: */ - iic_csr2_r.fld.DIR_WR_DATA = byVal; /* 8 bit data to be written to I2C reg */ - iic_csr2_r.fld.NEW_CYCLE = 1; /* will start a direct I2C cycle: */ + /* I2C address of I2C register: */ + iic_csr2_r.fld.DIR_ADDR = wIregIndex; - /* xfer union data into 32 bit IIC_CSR2 register */ + /* will start a direct I2C cycle: */ + iic_csr2_r.fld.NEW_CYCLE = 1; - WriteMReg((lpReg + IIC_CSR2), iic_csr2_r.reg); + /* xfer union's data into 32 bit IIC_CSR2 register */ + WriteMReg((lpReg + IIC_CSR2), iic_csr2_r.reg); - /* wait for IIC cycle to finish */ + /* wait for IIC cycle to finish */ + writestat = wait_ibsyclr(lpReg); - writestat = wait_ibsyclr( lpReg ); - return writestat; /* return with status */ -} - -/*********************************************************************** - ReadI2C() - - This function handles reading from 8-bit DT3155 registers - - 1st parameter is pointer to 32-bit register base address - 2nd parameter is reg. index; - 3rd is adrs of value to be read - - Returns TRUE - Successful completion - FALSE - Timeout error - cycle did not complete! -***********************************************************************/ -int ReadI2C (u8 * lpReg, u_short wIregIndex, u8 * byVal) -{ - int writestat; /* status for return */ - - /* read 32 bit IIC_CSR2 register data into union */ - ReadMReg((lpReg + IIC_CSR2), iic_csr2_r.reg); - - /* for read operation */ - iic_csr2_r.fld.DIR_RD = 1; - - /* I2C address of I2C register: */ - iic_csr2_r.fld.DIR_ADDR = wIregIndex; - - /* will start a direct I2C cycle: */ - iic_csr2_r.fld.NEW_CYCLE = 1; - - /* xfer union's data into 32 bit IIC_CSR2 register */ - WriteMReg((lpReg + IIC_CSR2), iic_csr2_r.reg); - - /* wait for IIC cycle to finish */ - writestat = wait_ibsyclr(lpReg); - - /* Next 2 commands read 32 bit IIC_CSR1 register's data into union */ - /* first read data is in IIC_CSR1 */ - ReadMReg((lpReg + IIC_CSR1), iic_csr1_r.reg); - - /* now get data u8 out of register */ - *byVal = (u8) iic_csr1_r.fld.RD_DATA; - - return writestat; /* return with status */ + /* Next 2 commands read 32 bit IIC_CSR1 register's data into union */ + /* first read data is in IIC_CSR1 */ + ReadMReg((lpReg + IIC_CSR1), iic_csr1_r.reg); + + /* now get data u8 out of register */ + *byVal = (u8) iic_csr1_r.fld.RD_DATA; + + return writestat; } From e37bcc0de040127281de13a84a608570355c20eb Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 11 Feb 2010 17:15:14 -0800 Subject: [PATCH 256/367] Staging: mimio: remove the mimio driver It turns out that Mimio has a userspace solution for this product using libusb, and the in-kernel driver is just getting in the way now and causing problems. So they have asked that the in-kernel driver be removed. As the staging driver wasn't quite working anyway, and Mimio supports their libusb solution for all distros, I am removing the in-kernel driver. The libusb solution can be downloaded from: http://www.mimio.com/downloads/mimio_studio_software/linux.asp Cc: Cc: Phil Hannent Cc: Marc Rousseau Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/staging/Kconfig | 2 - drivers/staging/Makefile | 1 - drivers/staging/mimio/Kconfig | 10 - drivers/staging/mimio/Makefile | 1 - drivers/staging/mimio/mimio.c | 896 --------------------------------- 5 files changed, 910 deletions(-) delete mode 100644 drivers/staging/mimio/Kconfig delete mode 100644 drivers/staging/mimio/Makefile delete mode 100644 drivers/staging/mimio/mimio.c diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig index 4a2afe7d0078..9b396bdbeeb5 100644 --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig @@ -79,8 +79,6 @@ source "drivers/staging/rtl8192u/Kconfig" source "drivers/staging/rtl8192e/Kconfig" -source "drivers/staging/mimio/Kconfig" - source "drivers/staging/frontier/Kconfig" source "drivers/staging/dream/Kconfig" diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile index dc404936a862..95ef22081a4c 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile @@ -22,7 +22,6 @@ obj-$(CONFIG_R8187SE) += rtl8187se/ obj-$(CONFIG_RTL8192SU) += rtl8192su/ obj-$(CONFIG_RTL8192U) += rtl8192u/ obj-$(CONFIG_RTL8192E) += rtl8192e/ -obj-$(CONFIG_INPUT_MIMIO) += mimio/ obj-$(CONFIG_TRANZPORT) += frontier/ obj-$(CONFIG_DREAM) += dream/ obj-$(CONFIG_POHMELFS) += pohmelfs/ diff --git a/drivers/staging/mimio/Kconfig b/drivers/staging/mimio/Kconfig deleted file mode 100644 index 505dcb275796..000000000000 --- a/drivers/staging/mimio/Kconfig +++ /dev/null @@ -1,10 +0,0 @@ -config INPUT_MIMIO - tristate "Mimio Xi interactive whiteboard support" - depends on USB && INPUT - default N - help - Say Y here if you want to use a Mimio Xi interactive - whiteboard device. - - To compile this driver as a module, choose M here: the - module will be called mimio. diff --git a/drivers/staging/mimio/Makefile b/drivers/staging/mimio/Makefile deleted file mode 100644 index 77807ee0450e..000000000000 --- a/drivers/staging/mimio/Makefile +++ /dev/null @@ -1 +0,0 @@ -obj-$(CONFIG_INPUT_MIMIO) += mimio.o diff --git a/drivers/staging/mimio/mimio.c b/drivers/staging/mimio/mimio.c deleted file mode 100644 index 2cfef4a0851f..000000000000 --- a/drivers/staging/mimio/mimio.c +++ /dev/null @@ -1,896 +0,0 @@ -/* - * Hardware event => input event mapping: - * - * BTN_TOOL_PEN 0x140 black - * BTN_TOOL_RUBBER 0x141 blue - * BTN_TOOL_BRUSH 0x142 green - * BTN_TOOL_PENCIL 0x143 red - * BTN_TOOL_AIRBRUSH 0x144 eraser - * BTN_TOOL_FINGER 0x145 small eraser - * BTN_TOOL_MOUSE 0x146 mimio interactive - * BTN_TOOL_LENS 0x147 mimio interactive but1 - * LOCALBTN_TOOL_EXTRA1 0x14a mimio interactive but2 == BTN_TOUCH - * LOCALBTN_TOOL_EXTRA2 0x14b mimio extra pens (orange, brown, yellow, - * purple) == BTN_STYLUS - * LOCALBTN_TOOL_EXTRA3 0x14c unused == BTN_STYLUS2 - * BTN_TOOL_DOUBLETAP 0x14d unused - * BTN_TOOL_TRIPLETAP 0x14e unused - * - * MIMIO_EV_PENDOWN(MIMIO_PEN_K) => EV_KEY BIT(BTN_TOOL_PEN) - * MIMIO_EV_PENDOWN(MIMIO_PEN_B) => EV_KEY BIT(BTN_TOOL_RUBBER) - * MIMIO_EV_PENDOWN(MIMIO_PEN_G) => EV_KEY BIT(BTN_TOOL_BRUSH) - * MIMIO_EV_PENDOWN(MIMIO_PEN_R) => EV_KEY BIT(BTN_TOOL_PENCIL) - * MIMIO_EV_PENDOWN(MIMIO_PEN_E) => EV_KEY BIT(BTN_TOOL_AIRBRUSH) - * MIMIO_EV_PENDOWN(MIMIO_PEN_ES) => EV_KEY BIT(BTN_TOOL_FINGER) - * MIMIO_EV_PENDOWN(MIMIO_PEN_I) => EV_KEY BIT(BTN_TOOL_MOUSE) - * MIMIO_EV_PENDOWN(MIMIO_PEN_IL) => EV_KEY BIT(BTN_TOOL_LENS) - * MIMIO_EV_PENDOWN(MIMIO_PEN_IR) => EV_KEY BIT(BTN_TOOL_DOUBLETAP) - * MIMIO_EV_PENDOWN(MIMIO_PEN_EX) => EV_KEY BIT(BTN_TOOL_TRIPLETAP) - * MIMIO_EV_PENDATA => EV_ABS BIT(ABS_X), BIT(ABS_Y) - * MIMIO_EV_MEMRESET => EV_KEY BIT(BTN_0) - * MIMIO_EV_ACC(ACC_NEWPAGE) => EV_KEY BIT(BTN_1) - * MIMIO_EV_ACC(ACC_TAGPAGE) => EV_KEY BIT(BTN_2) - * MIMIO_EV_ACC(ACC_PRINTPAGE) => EV_KEY BIT(BTN_3) - * MIMIO_EV_ACC(ACC_MAXIMIZE) => EV_KEY BIT(BTN_4) - * MIMIO_EV_ACC(ACC_FINDCTLPNL) => EV_KEY BIT(BTN_5) - * - * open issues: - * - cold-load of data captured when mimio in standalone mode not yet - * supported; need to snoop Win32 box to see datastream for this. - * - mimio mouse not yet supported; need to snoop Win32 box to see the - * datastream for this. - */ - -#include -#include -#include -#include -#include -#include - -#define DRIVER_VERSION "v0.031" -#define DRIVER_AUTHOR "mwilder@cs.nmsu.edu" -#define DRIVER_DESC "USB mimio-xi driver" - -enum {UPVALUE, DOWNVALUE, MOVEVALUE}; - -#define MIMIO_XRANGE_MAX 9600 -#define MIMIO_YRANGE_MAX 4800 - -#define LOCALBTN_TOOL_EXTRA1 BTN_TOUCH -#define LOCALBTN_TOOL_EXTRA2 BTN_STYLUS -#define LOCALBTN_TOOL_EXTRA3 BTN_STYLUS2 - -#define MIMIO_VENDOR_ID 0x08d3 -#define MIMIO_PRODUCT_ID 0x0001 -#define MIMIO_MAXPAYLOAD (8) -#define MIMIO_MAXNAMELEN (64) -#define MIMIO_TXWAIT (1) -#define MIMIO_TXDONE (2) - -#define MIMIO_EV_PENDOWN (0x22) -#define MIMIO_EV_PENDATA (0x24) -#define MIMIO_EV_PENUP (0x51) -#define MIMIO_EV_MEMRESET (0x45) -#define MIMIO_EV_ACC (0xb2) - -#define MIMIO_PEN_K (1) /* black pen */ -#define MIMIO_PEN_B (2) /* blue pen */ -#define MIMIO_PEN_G (3) /* green pen */ -#define MIMIO_PEN_R (4) /* red pen */ -/* 5, 6, 7, 8 are extra pens */ -#define MIMIO_PEN_E (9) /* big eraser */ -#define MIMIO_PEN_ES (10) /* lil eraser */ -#define MIMIO_PENJUMP_START (10) -#define MIMIO_PENJUMP (6) -#define MIMIO_PEN_I (17) /* mimio interactive */ -#define MIMIO_PEN_IL (18) /* mimio interactive button 1 */ -#define MIMIO_PEN_IR (19) /* mimio interactive button 2 */ - -#define MIMIO_PEN_MAX (MIMIO_PEN_IR) - -#define ACC_DONE (0) -#define ACC_NEWPAGE (1) -#define ACC_TAGPAGE (2) -#define ACC_PRINTPAGE (4) -#define ACC_MAXIMIZE (8) -#define ACC_FINDCTLPNL (16) - -#define isvalidtxsize(n) ((n) > 0 && (n) <= MIMIO_MAXPAYLOAD) - - -struct pktbuf { - unsigned char instr; - unsigned char buf[16]; - unsigned char *p; - unsigned char *q; -}; - -struct usbintendpt { - dma_addr_t dma; - struct urb *urb; - unsigned char *buf; - struct usb_endpoint_descriptor *desc; -}; - -struct mimio { - struct input_dev *idev; - struct usb_device *udev; - struct usb_interface *uifc; - int open; - int present; - int greeted; - int txflags; - char phys[MIMIO_MAXNAMELEN]; - struct usbintendpt in; - struct usbintendpt out; - struct pktbuf pktbuf; - unsigned char minor; - wait_queue_head_t waitq; - spinlock_t txlock; - void (*rxhandler)(struct mimio *, unsigned char *, unsigned int); - int last_pen_down; -}; - -static void mimio_close(struct input_dev *); -static void mimio_dealloc(struct mimio *); -static void mimio_disconnect(struct usb_interface *); -static int mimio_greet(struct mimio *); -static void mimio_irq_in(struct urb *); -static void mimio_irq_out(struct urb *); -static int mimio_open(struct input_dev *); -static int mimio_probe(struct usb_interface *, const struct usb_device_id *); -static void mimio_rx_handler(struct mimio *, unsigned char *, unsigned int); -static int mimio_tx(struct mimio *, const char *, int); - -static char mimio_name[] = "VirtualInk mimio-Xi"; -static struct usb_device_id mimio_table[] = { - { USB_DEVICE(MIMIO_VENDOR_ID, MIMIO_PRODUCT_ID) }, - { USB_DEVICE(0x0525, 0xa4a0) }, /* gadget zero firmware */ - { } -}; - -MODULE_DEVICE_TABLE(usb, mimio_table); - -static struct usb_driver mimio_driver = { - .name = "mimio", - .probe = mimio_probe, - .disconnect = mimio_disconnect, - .id_table = mimio_table, -}; - -static DECLARE_MUTEX(disconnect_sem); - -static void mimio_close(struct input_dev *idev) -{ - struct mimio *mimio; - - mimio = input_get_drvdata(idev); - if (!mimio) { - dev_err(&idev->dev, "null mimio attached to input device\n"); - return; - } - - if (mimio->open <= 0) - dev_err(&idev->dev, "mimio not open.\n"); - else - mimio->open--; - - if (mimio->present == 0 && mimio->open == 0) - mimio_dealloc(mimio); -} - -static void mimio_dealloc(struct mimio *mimio) -{ - if (mimio == NULL) - return; - - usb_kill_urb(mimio->in.urb); - - usb_kill_urb(mimio->out.urb); - - if (mimio->idev) { - input_unregister_device(mimio->idev); - if (mimio->idev->grab) - input_close_device(mimio->idev->grab); - else - dev_dbg(&mimio->idev->dev, "mimio->idev->grab == NULL" - " -- didn't call input_close_device\n"); - } - - usb_free_urb(mimio->in.urb); - - usb_free_urb(mimio->out.urb); - - if (mimio->in.buf) { - usb_buffer_free(mimio->udev, MIMIO_MAXPAYLOAD, mimio->in.buf, - mimio->in.dma); - } - - if (mimio->out.buf) - usb_buffer_free(mimio->udev, MIMIO_MAXPAYLOAD, mimio->out.buf, - mimio->out.dma); - - if (mimio->idev) - input_free_device(mimio->idev); - - kfree(mimio); -} - -static void mimio_disconnect(struct usb_interface *ifc) -{ - struct mimio *mimio; - - down(&disconnect_sem); - - mimio = usb_get_intfdata(ifc); - usb_set_intfdata(ifc, NULL); - dev_dbg(&mimio->idev->dev, "disconnect\n"); - - if (mimio) { - mimio->present = 0; - - if (mimio->open <= 0) - mimio_dealloc(mimio); - } - - up(&disconnect_sem); -} - -static int mimio_greet(struct mimio *mimio) -{ - const struct grtpkt { - int nbytes; - unsigned delay; - char data[8]; - } grtpkts[] = { - { 3, 0, { 0x11, 0x55, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00 } }, - { 5, 0, { 0x53, 0x55, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00 } }, - { 5, 0, { 0x43, 0x55, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00 } }, - { 5, 0, { 0x33, 0x55, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00 } }, - { 5, 0, { 0x13, 0x00, 0x5e, 0x02, 0x4f, 0x00, 0x00, 0x00 } }, - { 5, 0, { 0x13, 0x00, 0x04, 0x03, 0x14, 0x00, 0x00, 0x00 } }, - { 5, 2, { 0x13, 0x00, 0x00, 0x04, 0x17, 0x00, 0x00, 0x00 } }, - { 5, 0, { 0x13, 0x00, 0x0d, 0x08, 0x16, 0x00, 0x00, 0x00 } }, - { 5, 0, { 0x13, 0x00, 0x4d, 0x01, 0x5f, 0x00, 0x00, 0x00 } }, - { 3, 0, { 0xf1, 0x55, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00 } }, - { 7, 2, { 0x52, 0x55, 0x00, 0x07, 0x31, 0x55, 0x64, 0x00 } }, - { 0, 0, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, - }; - int rslt; - const struct grtpkt *pkt; - - for (pkt = grtpkts; pkt->nbytes; pkt++) { - rslt = mimio_tx(mimio, pkt->data, pkt->nbytes); - if (rslt) - return rslt; - if (pkt->delay) - msleep(pkt->delay); - } - - return 0; -} - -static void mimio_irq_in(struct urb *urb) -{ - int rslt; - char *data; - const char *reason = "going down"; - struct mimio *mimio; - - mimio = urb->context; - - if (mimio == NULL) - /* paranoia */ - return; - - switch (urb->status) { - case 0: - /* success */ - break; - case -ETIMEDOUT: - reason = "timeout -- unplugged?"; - case -ECONNRESET: - case -ENOENT: - case -ESHUTDOWN: - dev_dbg(&mimio->idev->dev, "%s.\n", reason); - return; - default: - dev_dbg(&mimio->idev->dev, "unknown urb-status: %d.\n", - urb->status); - goto exit; - } - data = mimio->in.buf; - - if (mimio->rxhandler) - mimio->rxhandler(mimio, data, urb->actual_length); -exit: - /* - * Keep listening to device on same urb. - */ - rslt = usb_submit_urb(urb, GFP_ATOMIC); - if (rslt) - dev_err(&mimio->idev->dev, "usb_submit_urb failure: %d.\n", - rslt); -} - -static void mimio_irq_out(struct urb *urb) -{ - unsigned long flags; - struct mimio *mimio; - - mimio = urb->context; - - if (urb->status) - dev_dbg(&mimio->idev->dev, "urb-status: %d.\n", urb->status); - - spin_lock_irqsave(&mimio->txlock, flags); - mimio->txflags |= MIMIO_TXDONE; - spin_unlock_irqrestore(&mimio->txlock, flags); - wmb(); - wake_up(&mimio->waitq); -} - -static int mimio_open(struct input_dev *idev) -{ - int rslt; - struct mimio *mimio; - - rslt = 0; - down(&disconnect_sem); - mimio = input_get_drvdata(idev); - dev_dbg(&idev->dev, "mimio_open\n"); - - if (mimio == NULL) { - dev_err(&idev->dev, "null mimio.\n"); - rslt = -ENODEV; - goto exit; - } - - if (mimio->open++) - goto exit; - - if (mimio->present && !mimio->greeted) { - struct urb *urb = mimio->in.urb; - mimio->in.urb->dev = mimio->udev; - rslt = usb_submit_urb(mimio->in.urb, GFP_KERNEL); - if (rslt) { - dev_err(&idev->dev, "usb_submit_urb failure " - "(res = %d: ", rslt); - if (!urb) - dev_err(&idev->dev, "urb is NULL"); - else if (urb->hcpriv) - dev_err(&idev->dev, "urb->hcpriv is non-NULL"); - else if (!urb->complete) - dev_err(&idev->dev, "urb is not complete"); - else if (urb->number_of_packets <= 0) - dev_err(&idev->dev, "urb has no packets"); - else if (urb->interval <= 0) - dev_err(&idev->dev, "urb interval too small"); - else - dev_err(&idev->dev, "urb interval too large " \ - "or some other error"); - dev_err(&idev->dev, "). Not greeting.\n"); - rslt = -EIO; - goto exit; - } - rslt = mimio_greet(mimio); - if (rslt == 0) { - dev_dbg(&idev->dev, "Mimio greeted OK.\n"); - mimio->greeted = 1; - } else { - dev_dbg(&idev->dev, "Mimio greet Failure (%d)\n", - rslt); - } - } - -exit: - up(&disconnect_sem); - return rslt; -} - -static int mimio_probe(struct usb_interface *ifc, - const struct usb_device_id *id) -{ - char path[64]; - int pipe, maxp; - struct mimio *mimio; - struct usb_device *udev; - struct usb_host_interface *hostifc; - struct input_dev *input_dev; - int res = 0; - int i; - - udev = interface_to_usbdev(ifc); - - mimio = kzalloc(sizeof(struct mimio), GFP_KERNEL); - if (!mimio) - return -ENOMEM; - - input_dev = input_allocate_device(); - if (!input_dev) { - mimio_dealloc(mimio); - return -ENOMEM; - } - - mimio->uifc = ifc; - mimio->udev = udev; - mimio->pktbuf.p = mimio->pktbuf.buf; - mimio->pktbuf.q = mimio->pktbuf.buf; - /* init_input_dev(mimio->idev); */ - mimio->idev = input_dev; - init_waitqueue_head(&mimio->waitq); - spin_lock_init(&mimio->txlock); - hostifc = ifc->cur_altsetting; - - if (hostifc->desc.bNumEndpoints != 2) { - dev_err(&udev->dev, "Unexpected endpoint count: %d.\n", - hostifc->desc.bNumEndpoints); - mimio_dealloc(mimio); - return -ENODEV; - } - - mimio->in.desc = &(hostifc->endpoint[0].desc); - mimio->out.desc = &(hostifc->endpoint[1].desc); - - mimio->in.buf = usb_buffer_alloc(udev, MIMIO_MAXPAYLOAD, GFP_KERNEL, - &mimio->in.dma); - mimio->out.buf = usb_buffer_alloc(udev, MIMIO_MAXPAYLOAD, GFP_KERNEL, - &mimio->out.dma); - - if (mimio->in.buf == NULL || mimio->out.buf == NULL) { - dev_err(&udev->dev, "usb_buffer_alloc failure.\n"); - mimio_dealloc(mimio); - return -ENOMEM; - } - - mimio->in.urb = usb_alloc_urb(0, GFP_KERNEL); - mimio->out.urb = usb_alloc_urb(0, GFP_KERNEL); - - if (mimio->in.urb == NULL || mimio->out.urb == NULL) { - dev_err(&udev->dev, "usb_alloc_urb failure.\n"); - mimio_dealloc(mimio); - return -ENOMEM; - } - - /* - * Build the input urb. - */ - pipe = usb_rcvintpipe(udev, mimio->in.desc->bEndpointAddress); - maxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe)); - if (maxp > MIMIO_MAXPAYLOAD) - maxp = MIMIO_MAXPAYLOAD; - usb_fill_int_urb(mimio->in.urb, udev, pipe, mimio->in.buf, maxp, - mimio_irq_in, mimio, mimio->in.desc->bInterval); - mimio->in.urb->transfer_dma = mimio->in.dma; - mimio->in.urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; - - /* - * Build the output urb. - */ - pipe = usb_sndintpipe(udev, mimio->out.desc->bEndpointAddress); - maxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe)); - if (maxp > MIMIO_MAXPAYLOAD) - maxp = MIMIO_MAXPAYLOAD; - usb_fill_int_urb(mimio->out.urb, udev, pipe, mimio->out.buf, maxp, - mimio_irq_out, mimio, mimio->out.desc->bInterval); - mimio->out.urb->transfer_dma = mimio->out.dma; - mimio->out.urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; - - /* - * Build input device info - */ - usb_make_path(udev, path, 64); - snprintf(mimio->phys, MIMIO_MAXNAMELEN, "%s/input0", path); - input_set_drvdata(input_dev, mimio); - /* input_dev->dev = &ifc->dev; */ - input_dev->open = mimio_open; - input_dev->close = mimio_close; - input_dev->name = mimio_name; - input_dev->phys = mimio->phys; - input_dev->dev.parent = &ifc->dev; - - input_dev->id.bustype = BUS_USB; - input_dev->id.vendor = le16_to_cpu(udev->descriptor.idVendor); - input_dev->id.product = le16_to_cpu(udev->descriptor.idProduct); - input_dev->id.version = le16_to_cpu(udev->descriptor.bcdDevice); - - input_dev->evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS); - for (i = BTN_TOOL_PEN; i <= LOCALBTN_TOOL_EXTRA2; ++i) - set_bit(i, input_dev->keybit); - - input_dev->keybit[BIT_WORD(BTN_MISC)] |= BIT_MASK(BTN_0) | - BIT_MASK(BTN_1) | - BIT_MASK(BTN_2) | - BIT_MASK(BTN_3) | - BIT_MASK(BTN_4) | - BIT_MASK(BTN_5); - /* input_dev->keybit[BTN_MOUSE] |= BIT(BTN_LEFT); */ - input_dev->absbit[0] |= BIT_MASK(ABS_X) | BIT_MASK(ABS_Y); - input_set_abs_params(input_dev, ABS_X, 0, MIMIO_XRANGE_MAX, 0, 0); - input_set_abs_params(input_dev, ABS_Y, 0, MIMIO_YRANGE_MAX, 0, 0); - input_dev->absbit[BIT_WORD(ABS_MISC)] |= BIT_MASK(ABS_MISC); - - /* - * Register the input device. - */ - res = input_register_device(mimio->idev); - if (res) { - dev_err(&udev->dev, "input_register_device failure (%d)\n", - res); - mimio_dealloc(mimio); - return -EIO; - } - dev_dbg(&mimio->idev->dev, "input: %s on %s (res = %d).\n", - input_dev->name, input_dev->phys, res); - - usb_set_intfdata(ifc, mimio); - mimio->present = 1; - - /* - * Submit the input urb to the usb subsystem. - */ - mimio->in.urb->dev = mimio->udev; - res = usb_submit_urb(mimio->in.urb, GFP_KERNEL); - if (res) { - dev_err(&mimio->idev->dev, "usb_submit_urb failure (%d)\n", - res); - mimio_dealloc(mimio); - return -EIO; - } - - /* - * Attempt to greet the mimio after giving - * it some post-init settling time. - * - * note: sometimes this sleep interval isn't - * long enough to permit the device to re-init - * after a hot-swap; maybe need to bump it up. - * - * As it is, this probably breaks module unloading support! - */ - msleep(1024); - - res = mimio_greet(mimio); - if (res == 0) { - dev_dbg(&mimio->idev->dev, "Mimio greeted OK.\n"); - mimio->greeted = 1; - mimio->rxhandler = mimio_rx_handler; - } else { - dev_dbg(&mimio->idev->dev, "Mimio greet Failure (%d)\n", res); - } - - return 0; -} - -static int handle_mimio_rx_penupdown(struct mimio *mimio, - int down, - const char *const instr[], - const int instr_ofst[]) -{ - int penid, x; - if (mimio->pktbuf.q - mimio->pktbuf.p < (down ? 4 : 3)) - return 1; /* partial pkt */ - - if (down) { - x = *mimio->pktbuf.p ^ *(mimio->pktbuf.p + 1) ^ - *(mimio->pktbuf.p + 2); - if (x != *(mimio->pktbuf.p + 3)) { - dev_dbg(&mimio->idev->dev, "EV_PEN%s: bad xsum.\n", - down ? "DOWN" : "UP"); - /* skip this event data */ - mimio->pktbuf.p += 4; - /* decode any remaining events */ - return 0; - } - penid = mimio->pktbuf.instr = *(mimio->pktbuf.p + 2); - if (penid > MIMIO_PEN_MAX) { - dev_dbg(&mimio->idev->dev, - "Unmapped penID (not in [0, %d]): %d\n", - MIMIO_PEN_MAX, (int)mimio->pktbuf.instr); - penid = mimio->pktbuf.instr = 0; - } - mimio->last_pen_down = penid; - } else { - penid = mimio->last_pen_down; - } - dev_dbg(&mimio->idev->dev, "%s (id %d, code %d) %s.\n", instr[penid], - instr_ofst[penid], penid, down ? "down" : "up"); - - if (instr_ofst[penid] >= 0) { - int code = BTN_TOOL_PEN + instr_ofst[penid]; - int value = down ? DOWNVALUE : UPVALUE; - if (code > KEY_MAX) - dev_dbg(&mimio->idev->dev, "input_event will ignore " - "-- code (%d) > KEY_MAX\n", code); - if (!test_bit(code, mimio->idev->keybit)) - dev_dbg(&mimio->idev->dev, "input_event will ignore " - "-- bit for code (%d) not enabled\n", code); - if (!!test_bit(code, mimio->idev->key) == value) - dev_dbg(&mimio->idev->dev, "input_event will ignore " - "-- bit for code (%d) already set to %d\n", - code, value); - if (value != DOWNVALUE) { - /* input_regs(mimio->idev, regs); */ - input_report_key(mimio->idev, code, value); - input_sync(mimio->idev); - } else { - /* wait until we get some coordinates */ - } - } else { - dev_dbg(&mimio->idev->dev, "penID offset[%d] == %d is < 0 " - "- not sending\n", penid, instr_ofst[penid]); - } - mimio->pktbuf.p += down ? 4 : 3; /* 3 for up, 4 for down */ - return 0; -} - -/* - * Stay tuned for partial-packet excitement. - * - * This routine buffers data packets received from the mimio device - * in the mimio's data space. This buffering is necessary because - * the mimio's in endpoint can serve us partial packets of data, and - * we want the driver to support the servicing of multiple mimios. - * Empirical evidence gathered so far suggests that the method of - * buffering packet data in the mimio's data space works. Previous - * versions of this driver did not buffer packet data in each mimio's - * data-space, and were therefore not able to service multiple mimios. - * Note that since the caller of this routine is running in interrupt - * context, care needs to be taken to ensure that this routine does not - * become bloated, and it may be that another spinlock is needed in each - * mimio to guard the buffered packet data properly. - */ -static void mimio_rx_handler(struct mimio *mimio, - unsigned char *data, - unsigned int nbytes) -{ - struct device *dev = &mimio->idev->dev; - unsigned int x; - unsigned int y; - static const char * const instr[] = { - "?0", - "black pen", "blue pen", "green pen", "red pen", - "brown pen", "orange pen", "purple pen", "yellow pen", - "big eraser", "lil eraser", - "?11", "?12", "?13", "?14", "?15", "?16", - "mimio interactive", "interactive button1", - "interactive button2" - }; - - /* Mimio Interactive gives: - * down: [0x22 0x01 0x11 0x32 0x24] - * b1 : [0x22 0x01 0x12 0x31 0x24] - * b2 : [0x22 0x01 0x13 0x30 0x24] - */ - static const int instr_ofst[] = { - -1, - 0, 1, 2, 3, - 9, 9, 9, 9, - 4, 5, - -1, -1, -1, -1, -1, -1, - 6, 7, 8, - }; - - memcpy(mimio->pktbuf.q, data, nbytes); - mimio->pktbuf.q += nbytes; - - while (mimio->pktbuf.p < mimio->pktbuf.q) { - int t = *mimio->pktbuf.p; - switch (t) { - case MIMIO_EV_PENUP: - case MIMIO_EV_PENDOWN: - if (handle_mimio_rx_penupdown(mimio, - t == MIMIO_EV_PENDOWN, - instr, instr_ofst)) - return; /* partial packet */ - break; - - case MIMIO_EV_PENDATA: - if (mimio->pktbuf.q - mimio->pktbuf.p < 6) - /* partial pkt */ - return; - x = *mimio->pktbuf.p ^ *(mimio->pktbuf.p + 1) ^ - *(mimio->pktbuf.p + 2) ^ - *(mimio->pktbuf.p + 3) ^ - *(mimio->pktbuf.p + 4); - if (x != *(mimio->pktbuf.p + 5)) { - dev_dbg(dev, "EV_PENDATA: bad xsum.\n"); - mimio->pktbuf.p += 6; /* skip this event data */ - break; /* decode any remaining events */ - } - x = *(mimio->pktbuf.p + 1); - x <<= 8; - x |= *(mimio->pktbuf.p + 2); - y = *(mimio->pktbuf.p + 3); - y <<= 8; - y |= *(mimio->pktbuf.p + 4); - dev_dbg(dev, "coord: (%d, %d)\n", x, y); - if (instr_ofst[mimio->pktbuf.instr] >= 0) { - int code = BTN_TOOL_PEN + - instr_ofst[mimio->last_pen_down]; - /* input_regs(mimio->idev, regs); */ - input_report_abs(mimio->idev, ABS_X, x); - input_report_abs(mimio->idev, ABS_Y, y); - /* fake a penup */ - change_bit(code, mimio->idev->key); - input_report_key(mimio->idev, - code, - DOWNVALUE); - /* always sync here */ - mimio->idev->sync = 0; - input_sync(mimio->idev); - } - mimio->pktbuf.p += 6; - break; - case MIMIO_EV_MEMRESET: - if (mimio->pktbuf.q - mimio->pktbuf.p < 7) - /* partial pkt */ - return; - dev_dbg(dev, "mem-reset.\n"); - /* input_regs(mimio->idev, regs); */ - input_event(mimio->idev, EV_KEY, BTN_0, 1); - input_event(mimio->idev, EV_KEY, BTN_0, 0); - input_sync(mimio->idev); - mimio->pktbuf.p += 7; - break; - case MIMIO_EV_ACC: - if (mimio->pktbuf.q - mimio->pktbuf.p < 4) - /* partial pkt */ - return; - x = *mimio->pktbuf.p ^ *(mimio->pktbuf.p + 1) ^ - *(mimio->pktbuf.p + 2); - if (x != *(mimio->pktbuf.p + 3)) { - dev_dbg(dev, "EV_ACC: bad xsum.\n"); - mimio->pktbuf.p += 4; /* skip this event data */ - break; /* decode any remaining events */ - } - switch (*(mimio->pktbuf.p + 2)) { - case ACC_NEWPAGE: - dev_dbg(&mimio->idev->dev, "new-page.\n"); - /* input_regs(mimio->idev, regs); */ - input_event(mimio->idev, EV_KEY, BTN_1, 1); - input_event(mimio->idev, EV_KEY, BTN_1, 0); - input_sync(mimio->idev); - break; - case ACC_TAGPAGE: - dev_dbg(&mimio->idev->dev, "tag-page.\n"); - /* input_regs(mimio->idev, regs); */ - input_event(mimio->idev, EV_KEY, BTN_2, 1); - input_event(mimio->idev, EV_KEY, BTN_2, 0); - input_sync(mimio->idev); - break; - case ACC_PRINTPAGE: - dev_dbg(&mimio->idev->dev, "print-page.\n"); - /* input_regs(mimio->idev, regs);*/ - input_event(mimio->idev, EV_KEY, BTN_3, 1); - input_event(mimio->idev, EV_KEY, BTN_3, 0); - input_sync(mimio->idev); - break; - case ACC_MAXIMIZE: - dev_dbg(&mimio->idev->dev, - "maximize-window.\n"); - /* input_regs(mimio->idev, regs); */ - input_event(mimio->idev, EV_KEY, BTN_4, 1); - input_event(mimio->idev, EV_KEY, BTN_4, 0); - input_sync(mimio->idev); - break; - case ACC_FINDCTLPNL: - dev_dbg(&mimio->idev->dev, "find-ctl-panel.\n"); - /* input_regs(mimio->idev, regs); */ - input_event(mimio->idev, EV_KEY, BTN_5, 1); - input_event(mimio->idev, EV_KEY, BTN_5, 0); - input_sync(mimio->idev); - break; - case ACC_DONE: - dev_dbg(&mimio->idev->dev, "acc-done.\n"); - /* no event is dispatched to the input - * subsystem for this device event. - */ - break; - default: - dev_dbg(dev, "unknown acc event.\n"); - break; - } - mimio->pktbuf.p += 4; - break; - default: - mimio->pktbuf.p++; - break; - } - } - - /* - * No partial event was received, so reset mimio's pktbuf ptrs. - */ - mimio->pktbuf.p = mimio->pktbuf.q = mimio->pktbuf.buf; -} - -static int mimio_tx(struct mimio *mimio, const char *buf, int nbytes) -{ - int rslt; - int timeout; - unsigned long flags; - DECLARE_WAITQUEUE(wait, current); - - if (!(isvalidtxsize(nbytes))) { - dev_err(&mimio->idev->dev, "invalid arg: nbytes: %d.\n", - nbytes); - return -EINVAL; - } - - /* - * Init the out urb and copy the data to send. - */ - mimio->out.urb->dev = mimio->udev; - mimio->out.urb->transfer_buffer_length = nbytes; - memcpy(mimio->out.urb->transfer_buffer, buf, nbytes); - - /* - * Send the data. - */ - spin_lock_irqsave(&mimio->txlock, flags); - mimio->txflags = MIMIO_TXWAIT; - rslt = usb_submit_urb(mimio->out.urb, GFP_ATOMIC); - spin_unlock_irqrestore(&mimio->txlock, flags); - dev_dbg(&mimio->idev->dev, "rslt: %d.\n", rslt); - - if (rslt) { - dev_err(&mimio->idev->dev, "usb_submit_urb failure: %d.\n", - rslt); - return rslt; - } - - /* - * Wait for completion to be signalled (the mimio_irq_out - * completion routine will or MIMIO_TXDONE in with txflags). - */ - timeout = HZ; - set_current_state(TASK_INTERRUPTIBLE); - add_wait_queue(&mimio->waitq, &wait); - - while (timeout && ((mimio->txflags & MIMIO_TXDONE) == 0)) { - timeout = schedule_timeout(timeout); - rmb(); - } - - if ((mimio->txflags & MIMIO_TXDONE) == 0) - dev_dbg(&mimio->idev->dev, "tx timed out.\n"); - - /* - * Now that completion has been signalled, - * unlink the urb so that it can be recycled. - */ - set_current_state(TASK_RUNNING); - remove_wait_queue(&mimio->waitq, &wait); - usb_unlink_urb(mimio->out.urb); - - return rslt; -} - -static int __init mimio_init(void) -{ - int rslt; - - rslt = usb_register(&mimio_driver); - if (rslt != 0) { - err("%s: usb_register failure: %d", __func__, rslt); - return rslt; - } - - printk(KERN_INFO KBUILD_MODNAME ":" - DRIVER_DESC " " DRIVER_VERSION "\n"); - return rslt; -} - -static void __exit mimio_exit(void) -{ - usb_deregister(&mimio_driver); -} - -module_init(mimio_init); -module_exit(mimio_exit); - -MODULE_AUTHOR(DRIVER_AUTHOR); -MODULE_DESCRIPTION(DRIVER_DESC); -MODULE_LICENSE("GPL"); From ee7dfb7e245e92c011c335e7bac2474967eda192 Mon Sep 17 00:00:00 2001 From: Mark Allyn Date: Fri, 5 Feb 2010 10:52:09 -0800 Subject: [PATCH 257/367] staging: rar_register: renaming driver to rar_register Patch renames rar_driver to rar_register to clarifiy and differentiate from rar_handler that will be submitted later Signed-off-by: Mark Allyn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rar/Makefile | 2 +- drivers/staging/rar/{rar_driver.c => rar_register.c} | 2 +- drivers/staging/rar/{rar_driver.h => rar_register.h} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename drivers/staging/rar/{rar_driver.c => rar_register.c} (99%) rename drivers/staging/rar/{rar_driver.h => rar_register.h} (100%) diff --git a/drivers/staging/rar/Makefile b/drivers/staging/rar/Makefile index 5422ed04ccf1..d5954ccc16c9 100644 --- a/drivers/staging/rar/Makefile +++ b/drivers/staging/rar/Makefile @@ -1,2 +1,2 @@ EXTRA_CFLAGS += -DLITTLE__ENDIAN -obj-$(CONFIG_RAR_REGISTER) += rar_driver.o +obj-$(CONFIG_RAR_REGISTER) += rar_register.o diff --git a/drivers/staging/rar/rar_driver.c b/drivers/staging/rar/rar_register.c similarity index 99% rename from drivers/staging/rar/rar_driver.c rename to drivers/staging/rar/rar_register.c index a85a7da6df40..51eb5a360f1c 100644 --- a/drivers/staging/rar/rar_driver.c +++ b/drivers/staging/rar/rar_register.c @@ -15,7 +15,7 @@ #include #include #include -#include "rar_driver.h" +#include "rar_register.h" /* The following defines are for the IPC process to retrieve RAR in */ diff --git a/drivers/staging/rar/rar_driver.h b/drivers/staging/rar/rar_register.h similarity index 100% rename from drivers/staging/rar/rar_driver.h rename to drivers/staging/rar/rar_register.h From e33cc5cec039ac6aef68568c06998707bceb0953 Mon Sep 17 00:00:00 2001 From: Mark Allyn Date: Fri, 5 Feb 2010 10:52:26 -0800 Subject: [PATCH 258/367] Staging: rar_register: renaming directory to rar_register Renames the directory in which the driver files are located; again for clarity. Signed-off-by: Mark Allyn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/Kconfig | 2 +- drivers/staging/Makefile | 2 +- drivers/staging/{rar => rar_register}/Kconfig | 0 drivers/staging/{rar => rar_register}/Makefile | 0 drivers/staging/{rar => rar_register}/rar_register.c | 0 drivers/staging/{rar => rar_register}/rar_register.h | 0 6 files changed, 2 insertions(+), 2 deletions(-) rename drivers/staging/{rar => rar_register}/Kconfig (100%) rename drivers/staging/{rar => rar_register}/Makefile (100%) rename drivers/staging/{rar => rar_register}/rar_register.c (100%) rename drivers/staging/{rar => rar_register}/rar_register.h (100%) diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig index 9b396bdbeeb5..7696a664f8a5 100644 --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig @@ -109,7 +109,7 @@ source "drivers/staging/hv/Kconfig" source "drivers/staging/vme/Kconfig" -source "drivers/staging/rar/Kconfig" +source "drivers/staging/rar_register/Kconfig" source "drivers/staging/sep/Kconfig" diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile index 95ef22081a4c..ea2e70e2fed4 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile @@ -35,7 +35,7 @@ obj-$(CONFIG_VT6656) += vt6656/ obj-$(CONFIG_FB_UDL) += udlfb/ obj-$(CONFIG_HYPERV) += hv/ obj-$(CONFIG_VME_BUS) += vme/ -obj-$(CONFIG_RAR_REGISTER) += rar/ +obj-$(CONFIG_RAR_REGISTER) += rar_register/ obj-$(CONFIG_DX_SEP) += sep/ obj-$(CONFIG_IIO) += iio/ obj-$(CONFIG_RAMZSWAP) += ramzswap/ diff --git a/drivers/staging/rar/Kconfig b/drivers/staging/rar_register/Kconfig similarity index 100% rename from drivers/staging/rar/Kconfig rename to drivers/staging/rar_register/Kconfig diff --git a/drivers/staging/rar/Makefile b/drivers/staging/rar_register/Makefile similarity index 100% rename from drivers/staging/rar/Makefile rename to drivers/staging/rar_register/Makefile diff --git a/drivers/staging/rar/rar_register.c b/drivers/staging/rar_register/rar_register.c similarity index 100% rename from drivers/staging/rar/rar_register.c rename to drivers/staging/rar_register/rar_register.c diff --git a/drivers/staging/rar/rar_register.h b/drivers/staging/rar_register/rar_register.h similarity index 100% rename from drivers/staging/rar/rar_register.h rename to drivers/staging/rar_register/rar_register.h From bafb6f63af819269c23871ba9ca8d9eb3f6893cc Mon Sep 17 00:00:00 2001 From: Mark Allyn Date: Fri, 5 Feb 2010 10:52:46 -0800 Subject: [PATCH 259/367] Staging: rar_register: provide better explanation in Kconfig Provides a better explanation of what this driver is for in the Kconfig file Signed-off-by: Mark Allyn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rar_register/Kconfig | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/staging/rar_register/Kconfig b/drivers/staging/rar_register/Kconfig index 17f8bf3bb41a..3f73839643e9 100644 --- a/drivers/staging/rar_register/Kconfig +++ b/drivers/staging/rar_register/Kconfig @@ -14,4 +14,17 @@ config RAR_REGISTER contents of the restricted access region control registers. + The restricted access region control registers + (rar_registers) are used to pass address and + locking information on restricted access regions + to other drivers that use restricted access regions + + The restricted access regions are regions of memory + on the Intel MID Platform that are not accessible to + the x86 processor, but are accessible to dedicated + processors on board peripheral devices. + + The purpose of the restricted access regions is to + protect sensitive data from compromise by unauthorized + programs running on the x86 processor. endmenu From 9cedb3924bfa3f70d0c562c65e26ce824c686fc4 Mon Sep 17 00:00:00 2001 From: Mark Allyn Date: Fri, 5 Feb 2010 10:53:00 -0800 Subject: [PATCH 260/367] Staging: rar_register: fix checkpatch errors and debug header file Signed-off-by: Mark Allyn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rar_register/rar_register.h | 115 ++++++++++---------- 1 file changed, 55 insertions(+), 60 deletions(-) diff --git a/drivers/staging/rar_register/rar_register.h b/drivers/staging/rar_register/rar_register.h index 4172fbf36327..29ade0f361d2 100644 --- a/drivers/staging/rar_register/rar_register.h +++ b/drivers/staging/rar_register/rar_register.h @@ -1,9 +1,53 @@ -/* === RAR Physical Addresses === */ -struct RAR_address_struct { - u32 low; - u32 high; +/* + * Copyright (C) 2010 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General + * Public License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be + * useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the Free + * Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * The full GNU General Public License is included in this + * distribution in the file called COPYING. + */ + + +#ifndef _RAR_REGISTER_H +#define _RAR_REGISTER_H + +# include + +/* following are used both in drivers as well as user space apps */ +enum RAR_type { + RAR_TYPE_VIDEO = 0, + RAR_TYPE_AUDIO, + RAR_TYPE_IMAGE, + RAR_TYPE_DATA }; +#ifdef __KERNEL__ + +/* PCI device id for controller */ +#define PCI_RAR_DEVICE_ID 0x4110 + +/* The register_rar function is to used by other device drivers + * to ensure that this driver is ready. As we cannot be sure of + * the compile/execute order of dirvers in ther kernel, it is + * best to give this driver a callback function to call when + * it is ready to give out addresses. The callback function + * would have those steps that continue the initialization of + * a driver that do require a valid RAR address. One of those + * steps would be to call get_rar_address() + * This function return 0 on success an -1 on failure. + */ +int register_rar(int (*callback)(void *yourparameter), void *yourparameter); + /* The get_rar_address function is used by other device drivers * to obtain RAR address information on a RAR. It takes two * parameter: @@ -19,10 +63,11 @@ struct RAR_address_struct { * The function returns a 0 upon success or a -1 if there is no RAR * facility on this system. */ -int get_rar_address(int rar_index, struct RAR_address_struct *addresses); +int rar_get_address(int rar_index, + dma_addr_t *start_address, + dma_addr_t *end_address); - -/* The lock_rar function is used by other device drivers to lock an RAR. +/* The lock_rar function is ued by other device drivers to lock an RAR. * once an RAR is locked, it stays locked until the next system reboot. * The function takes one parameter: * @@ -33,57 +78,7 @@ int get_rar_address(int rar_index, struct RAR_address_struct *addresses); * The function returns a 0 upon success or a -1 if there is no RAR * facility on this system. */ -int lock_rar(int rar_index); - - -/* DEBUG LEVEL MASKS */ -#define RAR_DEBUG_LEVEL_BASIC 0x1 - -#define RAR_DEBUG_LEVEL_REGISTERS 0x2 - -#define RAR_DEBUG_LEVEL_EXTENDED 0x4 - -#define DEBUG_LEVEL 0x7 - -/* FUNCTIONAL MACROS */ - -/* debug macro without paramaters */ -#define DEBUG_PRINT_0(DEBUG_LEVEL , info) \ -do { \ - if (DEBUG_LEVEL) { \ - printk(KERN_WARNING info); \ - } \ -} while (0) - -/* debug macro with 1 paramater */ -#define DEBUG_PRINT_1(DEBUG_LEVEL , info , param1) \ -do { \ - if (DEBUG_LEVEL) { \ - printk(KERN_WARNING info , param1); \ - } \ -} while (0) - -/* debug macro with 2 paramaters */ -#define DEBUG_PRINT_2(DEBUG_LEVEL , info , param1, param2) \ -do { \ - if (DEBUG_LEVEL) { \ - printk(KERN_WARNING info , param1, param2); \ - } \ -} while (0) - -/* debug macro with 3 paramaters */ -#define DEBUG_PRINT_3(DEBUG_LEVEL , info , param1, param2 , param3) \ -do { \ - if (DEBUG_LEVEL) { \ - printk(KERN_WARNING info , param1, param2 , param3); \ - } \ -} while (0) - -/* debug macro with 4 paramaters */ -#define DEBUG_PRINT_4(DEBUG_LEVEL , info , param1, param2 , param3 , param4) \ -do { \ - if (DEBUG_LEVEL) { \ - printk(KERN_WARNING info , param1, param2 , param3 , param4); \ - } \ -} while (0) +int rar_lock(int rar_index); +#endif /* __KERNEL__ */ +#endif /* _RAR_REGISTER_H */ From 433e63c63eee9fd8ac3735ce5b41797f30d5ce58 Mon Sep 17 00:00:00 2001 From: Mark Allyn Date: Fri, 5 Feb 2010 10:53:18 -0800 Subject: [PATCH 261/367] Staging: rar_register: fix checkpatch errors and debug program file Signed-off-by: Mark Allyn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rar_register/rar_register.c | 874 ++++++++++++-------- 1 file changed, 518 insertions(+), 356 deletions(-) diff --git a/drivers/staging/rar_register/rar_register.c b/drivers/staging/rar_register/rar_register.c index 51eb5a360f1c..c9dcc9916b70 100644 --- a/drivers/staging/rar_register/rar_register.c +++ b/drivers/staging/rar_register/rar_register.c @@ -1,33 +1,67 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +/* + * rar_register.c - An Intel Restricted Access Region register driver + * + * Copyright(c) 2009 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + * + * ------------------------------------------------------------------- + * 20091204 Mark Allyn + * Ossama Othman + * Cleanup per feedback from Alan Cox and Arjan Van De Ven + * + * 20090806 Ossama Othman + * Return zero high address if upper 22 bits is zero. + * Cleaned up checkpatch errors. + * Clarified that driver is dealing with bus addresses. + * + * 20090702 Ossama Othman + * Removed unnecessary include directives + * Cleaned up spinlocks. + * Cleaned up logging. + * Improved invalid parameter checks. + * Fixed and simplified RAR address retrieval and RAR locking + * code. + * + * 20090626 Mark Allyn + * Initial publish + */ + +#define DEBUG 1 + #include "rar_register.h" -/* The following defines are for the IPC process to retrieve RAR in */ +#include +#include +#include +#include +#include /* === Lincroft Message Bus Interface === */ /* Message Control Register */ #define LNC_MCR_OFFSET 0xD0 +/* Maximum number of clients (other drivers using this driver) */ +#define MAX_RAR_CLIENTS 10 + /* Message Data Register */ #define LNC_MDR_OFFSET 0xD4 /* Message Opcodes */ -#define LNC_MESSAGE_READ_OPCODE 0xD0 +#define LNC_MESSAGE_READ_OPCODE 0xD0 #define LNC_MESSAGE_WRITE_OPCODE 0xE0 /* Message Write Byte Enables */ @@ -37,283 +71,281 @@ #define LNC_BUNIT_PORT 0x3 /* === Lincroft B-Unit Registers - Programmed by IA32 firmware === */ -#define LNC_BRAR0L 0x10 -#define LNC_BRAR0H 0x11 -#define LNC_BRAR1L 0x12 -#define LNC_BRAR1H 0x13 +#define LNC_BRAR0L 0x10 +#define LNC_BRAR0H 0x11 +#define LNC_BRAR1L 0x12 +#define LNC_BRAR1H 0x13 /* Reserved for SeP */ -#define LNC_BRAR2L 0x14 -#define LNC_BRAR2H 0x15 - - -/* This structure is only used during module initialization. */ -struct RAR_offsets { - int low; /* Register offset for low RAR physical address. */ - int high; /* Register offset for high RAR physical address. */ -}; - -struct pci_dev *rar_dev; -static uint32_t registered; +#define LNC_BRAR2L 0x14 +#define LNC_BRAR2H 0x15 /* Moorestown supports three restricted access regions. */ #define MRST_NUM_RAR 3 -struct RAR_address_struct rar_addr[MRST_NUM_RAR]; -/* prototype for init */ -static int __init rar_init_handler(void); -static void __exit rar_exit_handler(void); - -/* - function that is activated on the successfull probe of the RAR device -*/ -static int __devinit rar_probe(struct pci_dev *pdev, - const struct pci_device_id *ent); - -static const struct pci_device_id rar_pci_id_tbl[] = { - { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4110) }, - { 0 } +/* RAR Bus Address Range */ +struct RAR_address_range { + dma_addr_t low; + dma_addr_t high; }; -MODULE_DEVICE_TABLE(pci, rar_pci_id_tbl); - -/* field for registering driver to PCI device */ -static struct pci_driver rar_pci_driver = { - .name = "rar_driver", - .id_table = rar_pci_id_tbl, - .probe = rar_probe +/* Structure containing low and high RAR register offsets. */ +struct RAR_offsets { + u32 low; /* Register offset for low RAR bus address. */ + u32 high; /* Register offset for high RAR bus address. */ }; -/* This function is used to retrieved RAR info using the IPC message - bus interface */ -static int memrar_get_rar_addr(struct pci_dev *pdev, - int offset, - u32 *addr) -{ - /* - * ======== The Lincroft Message Bus Interface ======== - * Lincroft registers may be obtained from the PCI - * (the Host Bridge) using the Lincroft Message Bus - * Interface. That message bus interface is generally - * comprised of two registers: a control register (MCR, 0xDO) - * and a data register (MDR, 0xD4). - * - * The MCR (message control register) format is the following: - * 1. [31:24]: Opcode - * 2. [23:16]: Port - * 3. [15:8]: Register Offset - * 4. [7:4]: Byte Enables (use 0xF to set all of these bits - * to 1) - * 5. [3:0]: reserved - * - * Read (0xD0) and write (0xE0) opcodes are written to the - * control register when reading and writing to Lincroft - * registers, respectively. - * - * We're interested in registers found in the Lincroft - * B-unit. The B-unit port is 0x3. - * - * The six B-unit RAR register offsets we use are listed - * earlier in this file. - * - * Lastly writing to the MCR register requires the "Byte - * enables" bits to be set to 1. This may be achieved by - * writing 0xF at bit 4. - * - * The MDR (message data register) format is the following: - * 1. [31:0]: Read/Write Data - * - * Data being read from this register is only available after - * writing the appropriate control message to the MCR - * register. - * - * Data being written to this register must be written before - * writing the appropriate control message to the MCR - * register. - */ - - int result = 0; /* result */ - /* Construct control message */ - u32 const message = - (LNC_MESSAGE_READ_OPCODE << 24) - | (LNC_BUNIT_PORT << 16) - | (offset << 8) - | (LNC_MESSAGE_BYTE_WRITE_ENABLES << 4); - - printk(KERN_WARNING "rar- offset to LNC MSG is %x\n", offset); - - if (addr == 0) - return -EINVAL; - - /* Send the control message */ - result = pci_write_config_dword(pdev, - LNC_MCR_OFFSET, - message); - - printk(KERN_WARNING "rar- result from send ctl register is %x\n", - result); - - if (!result) - result = pci_read_config_dword(pdev, - LNC_MDR_OFFSET, - addr); - - printk(KERN_WARNING "rar- result from read data register is %x\n", - result); - - printk(KERN_WARNING "rar- value read from data register is %x\n", - *addr); - - if (result) - return -1; - else - return 0; -} - -static int memrar_set_rar_addr(struct pci_dev *pdev, - int offset, - u32 addr) -{ - /* - * ======== The Lincroft Message Bus Interface ======== - * Lincroft registers may be obtained from the PCI - * (the Host Bridge) using the Lincroft Message Bus - * Interface. That message bus interface is generally - * comprised of two registers: a control register (MCR, 0xDO) - * and a data register (MDR, 0xD4). - * - * The MCR (message control register) format is the following: - * 1. [31:24]: Opcode - * 2. [23:16]: Port - * 3. [15:8]: Register Offset - * 4. [7:4]: Byte Enables (use 0xF to set all of these bits - * to 1) - * 5. [3:0]: reserved - * - * Read (0xD0) and write (0xE0) opcodes are written to the - * control register when reading and writing to Lincroft - * registers, respectively. - * - * We're interested in registers found in the Lincroft - * B-unit. The B-unit port is 0x3. - * - * The six B-unit RAR register offsets we use are listed - * earlier in this file. - * - * Lastly writing to the MCR register requires the "Byte - * enables" bits to be set to 1. This may be achieved by - * writing 0xF at bit 4. - * - * The MDR (message data register) format is the following: - * 1. [31:0]: Read/Write Data - * - * Data being read from this register is only available after - * writing the appropriate control message to the MCR - * register. - * - * Data being written to this register must be written before - * writing the appropriate control message to the MCR - * register. - */ - - int result = 0; /* result */ - - /* Construct control message */ - u32 const message = - (LNC_MESSAGE_WRITE_OPCODE << 24) - | (LNC_BUNIT_PORT << 16) - | (offset << 8) - | (LNC_MESSAGE_BYTE_WRITE_ENABLES << 4); - - printk(KERN_WARNING "rar- offset to LNC MSG is %x\n", offset); - - if (addr == 0) - return -EINVAL; - - /* Send the control message */ - result = pci_write_config_dword(pdev, - LNC_MDR_OFFSET, - addr); - - printk(KERN_WARNING "rar- result from send ctl register is %x\n", - result); - - if (!result) - result = pci_write_config_dword(pdev, - LNC_MCR_OFFSET, - message); - - printk(KERN_WARNING "rar- result from write data register is %x\n", - result); - - printk(KERN_WARNING "rar- value read to data register is %x\n", - addr); - - if (result) - return -1; - else - return 0; -} - -/* - - * Initialize RAR parameters, such as physical addresses, etc. - - */ -static int memrar_init_rar_params(struct pci_dev *pdev) -{ - struct RAR_offsets const offsets[] = { - { LNC_BRAR0L, LNC_BRAR0H }, - { LNC_BRAR1L, LNC_BRAR1H }, - { LNC_BRAR2L, LNC_BRAR2H } +struct client { + int (*client_callback)(void *client_data); + void *customer_data; + int client_called; }; - size_t const num_offsets = sizeof(offsets) / sizeof(offsets[0]); - struct RAR_offsets const *end = offsets + num_offsets; - struct RAR_offsets const *i; - unsigned int n = 0; - int result = 0; +static DEFINE_MUTEX(rar_mutex); +static DEFINE_MUTEX(lnc_reg_mutex); - /* Retrieve RAR start and end physical addresses. */ +struct RAR_device { + struct RAR_offsets const rar_offsets[MRST_NUM_RAR]; + struct RAR_address_range rar_addr[MRST_NUM_RAR]; + struct pci_dev *rar_dev; + bool registered; + }; +/* this platform has only one rar_device for 3 rar regions */ +static struct RAR_device my_rar_device = { + .rar_offsets = { + [0].low = LNC_BRAR0L, + [0].high = LNC_BRAR0H, + [1].low = LNC_BRAR1L, + [1].high = LNC_BRAR1H, + [2].low = LNC_BRAR2L, + [2].high = LNC_BRAR2H + } +}; + +/* this data is for handling requests from other drivers which arrive + * prior to this driver initializing + */ + +static struct client clients[MAX_RAR_CLIENTS]; +static int num_clients; + +/* + * This function is used to retrieved RAR info using the Lincroft + * message bus interface. + */ +static int retrieve_rar_addr(struct pci_dev *pdev, + int offset, + dma_addr_t *addr) +{ /* - * Access the RAR registers through the Lincroft Message Bus - * Interface on PCI device: 00:00.0 Host bridge. - */ + * ======== The Lincroft Message Bus Interface ======== + * Lincroft registers may be obtained from the PCI + * (the Host Bridge) using the Lincroft Message Bus + * Interface. That message bus interface is generally + * comprised of two registers: a control register (MCR, 0xDO) + * and a data register (MDR, 0xD4). + * + * The MCR (message control register) format is the following: + * 1. [31:24]: Opcode + * 2. [23:16]: Port + * 3. [15:8]: Register Offset + * 4. [7:4]: Byte Enables (use 0xF to set all of these bits + * to 1) + * 5. [3:0]: reserved + * + * Read (0xD0) and write (0xE0) opcodes are written to the + * control register when reading and writing to Lincroft + * registers, respectively. + * + * We're interested in registers found in the Lincroft + * B-unit. The B-unit port is 0x3. + * + * The six B-unit RAR register offsets we use are listed + * earlier in this file. + * + * Lastly writing to the MCR register requires the "Byte + * enables" bits to be set to 1. This may be achieved by + * writing 0xF at bit 4. + * + * The MDR (message data register) format is the following: + * 1. [31:0]: Read/Write Data + * + * Data being read from this register is only available after + * writing the appropriate control message to the MCR + * register. + * + * Data being written to this register must be written before + * writing the appropriate control message to the MCR + * register. + */ - /* struct pci_dev *pdev = pci_get_bus_and_slot(0, PCI_DEVFN(0,0)); */ + int result; - if (pdev == NULL) - return -ENODEV; + /* Construct control message */ + u32 const message = + (LNC_MESSAGE_READ_OPCODE << 24) + | (LNC_BUNIT_PORT << 16) + | (offset << 8) + | (LNC_MESSAGE_BYTE_WRITE_ENABLES << 4); - for (i = offsets; i != end; ++i, ++n) { - if (memrar_get_rar_addr(pdev, - (*i).low, - &(rar_addr[n].low)) != 0 - || memrar_get_rar_addr(pdev, - (*i).high, - &(rar_addr[n].high)) != 0) { - result = -1; - break; - } + dev_dbg(&pdev->dev, "Offset for 'get' LNC MSG is %x\n", offset); + + if (addr == 0) { + WARN_ON(1); + return -EINVAL; } + /* + * We synchronize access to the Lincroft MCR and MDR registers + * until BOTH the command is issued through the MCR register + * and the corresponding data is read from the MDR register. + * Otherwise a race condition would exist between accesses to + * both registers. + */ + + mutex_lock(&lnc_reg_mutex); + + /* Send the control message */ + result = pci_write_config_dword(pdev, LNC_MCR_OFFSET, message); + + dev_dbg(&pdev->dev, "Result from send ctl register is %x\n", result); + + if (!result) { + result = pci_read_config_dword(pdev, LNC_MDR_OFFSET, + (u32 *)addr); + dev_dbg(&pdev->dev, + "Result from read data register is %x\n", result); + + dev_dbg(&pdev->dev, + "Value read from data register is %lx\n", + (unsigned long)*addr); + } + + mutex_unlock(&lnc_reg_mutex); + + return result; +} + +static int set_rar_address(struct pci_dev *pdev, + int offset, + dma_addr_t addr) +{ + /* + * Data being written to this register must be written before + * writing the appropriate control message to the MCR + * register. + * @note See rar_get_address() for a description of the + * message bus interface being used here. + */ + + int result = 0; + + /* Construct control message */ + u32 const message = (LNC_MESSAGE_WRITE_OPCODE << 24) + | (LNC_BUNIT_PORT << 16) + | (offset << 8) + | (LNC_MESSAGE_BYTE_WRITE_ENABLES << 4); + + if (addr == 0) { + WARN_ON(1); + return -EINVAL; + } + + dev_dbg(&pdev->dev, "Offset for 'set' LNC MSG is %x\n", offset); + + /* + * We synchronize access to the Lincroft MCR and MDR registers + * until BOTH the command is issued through the MCR register + * and the corresponding data is read from the MDR register. + * Otherwise a race condition would exist between accesses to + * both registers. + */ + + mutex_lock(&lnc_reg_mutex); + + /* Send the control message */ + result = pci_write_config_dword(pdev, LNC_MDR_OFFSET, addr); + + dev_dbg(&pdev->dev, "Result from write data register is %x\n", result); + + if (!result) { + dev_dbg(&pdev->dev, + "Value written to data register is %lx\n", + (unsigned long)addr); + + result = pci_write_config_dword(pdev, LNC_MCR_OFFSET, message); + + dev_dbg(&pdev->dev, "Result from send ctl register is %x\n", + result); + } + + mutex_unlock(&lnc_reg_mutex); + + return result; +} + +/* +* Initialize RAR parameters, such as bus addresses, etc. +*/ +static int init_rar_params(struct pci_dev *pdev) +{ + unsigned int i; + int result = 0; + + /* Retrieve RAR start and end bus addresses. + * Access the RAR registers through the Lincroft Message Bus + * Interface on PCI device: 00:00.0 Host bridge. + */ + + for (i = 0; i < MRST_NUM_RAR; ++i) { + struct RAR_offsets const *offset = + &my_rar_device.rar_offsets[i]; + struct RAR_address_range *addr = &my_rar_device.rar_addr[i]; + + if ((retrieve_rar_addr(pdev, offset->low, &addr->low) != 0) + || (retrieve_rar_addr(pdev, offset->high, &addr->high) != 0)) { + result = -1; + break; + } + + /* + * Only the upper 22 bits of the RAR addresses are + * stored in their corresponding RAR registers so we + * must set the lower 10 bits accordingly. + + * The low address has its lower 10 bits cleared, and + * the high address has all its lower 10 bits set, + * e.g.: + * low = 0x2ffffc00 + */ + + addr->low &= (dma_addr_t)0xfffffc00u; + + /* + * Set bits 9:0 on uppser address if bits 31:10 are non + * zero; otherwize clear all bits + */ + + if ((addr->high & 0xfffffc00u) == 0) + addr->high = 0; + else + addr->high |= 0x3ffu; + } /* Done accessing the device. */ - /* pci_dev_put(pdev); */ if (result == 0) { - if (1) { - size_t z; - for (z = 0; z != MRST_NUM_RAR; ++z) { - printk(KERN_WARNING - "rar - BRAR[%Zd] physical address low\n" - "\tlow: 0x%08x\n" - "\thigh: 0x%08x\n", - z, - rar_addr[z].low, - rar_addr[z].high); - } + int z; + for (z = 0; z != MRST_NUM_RAR; ++z) { + /* + * "BRAR" refers to the RAR registers in the + * Lincroft B-unit. + */ + dev_info(&pdev->dev, "BRAR[%u] bus address range = " + "[%lx, %lx]\n", z, + (unsigned long)my_rar_device.rar_addr[z].low, + (unsigned long)my_rar_device.rar_addr[z].high); } } @@ -321,53 +353,238 @@ static int memrar_init_rar_params(struct pci_dev *pdev) } /* - function that is activated on the successfull probe of the RAR device -*/ -static int __devinit rar_probe(struct pci_dev *pdev, - const struct pci_device_id *ent) + * The rar_get_address function is used by other device drivers + * to obtain RAR address information on a RAR. It takes three + * parameters: + * + * int rar_index + * The rar_index is an index to the rar for which you wish to retrieve + * the address information. + * Values can be 0,1, or 2. + * + * The function returns a 0 upon success or a -1 if there is no RAR + * facility on this system. + */ +int rar_get_address(int rar_index, + dma_addr_t *start_address, + dma_addr_t *end_address) +{ + int result = -ENODEV; + + if (my_rar_device.registered) { + if (start_address == 0 || end_address == 0 + || rar_index >= MRST_NUM_RAR || rar_index < 0) { + result = -EINVAL; + } else { + *start_address = + my_rar_device.rar_addr[rar_index].low; + *end_address = + my_rar_device.rar_addr[rar_index].high; + + result = 0; + } + } + + return result; +} +EXPORT_SYMBOL(rar_get_address); + +/* + * The rar_lock function is ued by other device drivers to lock an RAR. + * once an RAR is locked, it stays locked until the next system reboot. + * The function takes one parameter: + * + * int rar_index + * The rar_index is an index to the rar that you want to lock. + * Values can be 0,1, or 2. + * + * The function returns a 0 upon success or a -1 if there is no RAR + * facility on this system. + */ +int rar_lock(int rar_index) +{ + int result = -ENODEV; + + if (rar_index >= MRST_NUM_RAR || rar_index < 0) { + result = -EINVAL; + return result; + } + + dev_dbg(&my_rar_device.rar_dev->dev, "rar_lock mutex locking\n"); + mutex_lock(&rar_mutex); + + if (my_rar_device.registered) { + + dma_addr_t low = my_rar_device.rar_addr[rar_index].low & + 0xfffffc00u; + + dma_addr_t high = my_rar_device.rar_addr[rar_index].high & + 0xfffffc00u; + + /* + * Only allow I/O from the graphics and Langwell; + * Not from the x96 processor + */ + if (rar_index == (int)RAR_TYPE_VIDEO) { + low |= 0x00000009; + high |= 0x00000015; + } + + else if (rar_index == (int)RAR_TYPE_AUDIO) { + /* Only allow I/O from Langwell; nothing from x86 */ + low |= 0x00000008; + high |= 0x00000018; + } + + else + /* Read-only from all agents */ + high |= 0x00000018; + + /* + * Now program the register using the Lincroft message + * bus interface. + */ + result = set_rar_address(my_rar_device.rar_dev, + my_rar_device.rar_offsets[rar_index].low, + low); + + if (result == 0) + result = set_rar_address( + my_rar_device.rar_dev, + my_rar_device.rar_offsets[rar_index].high, + high); + } + + dev_dbg(&my_rar_device.rar_dev->dev, "rar_lock mutex unlocking\n"); + mutex_unlock(&rar_mutex); + return result; +} +EXPORT_SYMBOL(rar_lock); + +/* The register_rar function is to used by other device drivers + * to ensure that this driver is ready. As we cannot be sure of + * the compile/execute order of dirvers in ther kernel, it is + * best to give this driver a callback function to call when + * it is ready to give out addresses. The callback function + * would have those steps that continue the initialization of + * a driver that do require a valid RAR address. One of those + * steps would be to call rar_get_address() + * This function return 0 on success an -1 on failure. +*/ +int register_rar(int (*callback)(void *yourparameter), void *yourparameter) +{ + + int result = -ENODEV; + + if (callback == NULL) + return -EINVAL; + + mutex_lock(&rar_mutex); + + if (my_rar_device.registered) { + + mutex_unlock(&rar_mutex); + /* + * if the driver already registered, then we can simply + * call the callback right now + */ + + return (*callback)(yourparameter); + } + + if (num_clients < MRST_NUM_RAR) { + + clients[num_clients].client_callback = callback; + clients[num_clients].customer_data = yourparameter; + num_clients += 1; + result = 0; + } + + mutex_unlock(&rar_mutex); + return result; + +} +EXPORT_SYMBOL(register_rar); + +/* + * This function registers the driver with the device subsystem ( + * either PCI, USB, etc). + * Function that is activaed on the succesful probe of the RAR device + * (Moorestown host controller). + */ +static int rar_probe(struct pci_dev *dev, const struct pci_device_id *id) { - /* error */ int error; + int counter; - /*------------------------ - CODE - ---------------------------*/ - - DEBUG_PRINT_0(RAR_DEBUG_LEVEL_EXTENDED, - "Rar pci probe starting\n"); - error = 0; + dev_dbg(&dev->dev, "PCI probe starting\n"); /* enable the device */ - error = pci_enable_device(pdev); + error = pci_enable_device(dev); if (error) { - DEBUG_PRINT_0(RAR_DEBUG_LEVEL_EXTENDED, - "error enabling pci device\n"); + dev_err(&dev->dev, + "Error enabling RAR register PCI device\n"); goto end_function; } - rar_dev = pdev; - registered = 1; - - /* Initialize the RAR parameters, which have to be retrieved */ - /* via the message bus service */ - error = memrar_init_rar_params(rar_dev); + /* we have only one device; fill in the rar_device structure */ + my_rar_device.rar_dev = dev; + /* + * Initialize the RAR parameters, which have to be retrieved + * via the message bus interface. + */ + error = init_rar_params(dev); if (error) { - DEBUG_PRINT_0(RAR_DEBUG_LEVEL_EXTENDED, - "error getting RAR addresses device\n"); - registered = 0; + pci_disable_device(dev); + + dev_err(&dev->dev, + "Error retrieving RAR addresses\n"); + goto end_function; + } + + dev_dbg(&dev->dev, "PCI probe locking\n"); + mutex_lock(&rar_mutex); + my_rar_device.registered = 1; + + /* now call anyone who has registered (using callbacks) */ + for (counter = 0; counter < num_clients; counter += 1) { + if (clients[counter].client_callback) { + error = (*clients[counter].client_callback)( + clients[counter].customer_data); + /* set callback to NULL to indicate it has been done */ + clients[counter].client_callback = NULL; + dev_dbg(&my_rar_device.rar_dev->dev, + "Callback called for %d\n", + counter); } + } + + dev_dbg(&dev->dev, "PCI probe unlocking\n"); + mutex_unlock(&rar_mutex); end_function: return error; } -/* - this function registers the driver to - the device subsystem (either PCI, USB, etc) -*/ +const struct pci_device_id rar_pci_id_tbl[] = { + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_RAR_DEVICE_ID) }, + { 0 } +}; + +MODULE_DEVICE_TABLE(pci, rar_pci_id_tbl); + +const struct pci_device_id *my_id_table = rar_pci_id_tbl; + +/* field for registering driver to PCI device */ +static struct pci_driver rar_pci_driver = { + .name = "rar_register_driver", + .id_table = rar_pci_id_tbl, + .probe = rar_probe +}; + static int __init rar_init_handler(void) { return pci_register_driver(&rar_pci_driver); @@ -382,59 +599,4 @@ module_init(rar_init_handler); module_exit(rar_exit_handler); MODULE_LICENSE("GPL"); - - -/* The get_rar_address function is used by other device drivers - * to obtain RAR address information on a RAR. It takes two - * parameter: - * - * int rar_index - * The rar_index is an index to the rar for which you wish to retrieve - * the address information. - * Values can be 0,1, or 2. - * - * struct RAR_address_struct is a pointer to a place to which the function - * can return the address structure for the RAR. - * - * The function returns a 0 upon success or a -1 if there is no RAR - * facility on this system. - */ -int get_rar_address(int rar_index, struct RAR_address_struct *addresses) -{ - if (registered && (rar_index < 3) && (rar_index >= 0)) { - *addresses = rar_addr[rar_index]; - /* strip off lock bit information */ - addresses->low = addresses->low & 0xfffffff0; - addresses->high = addresses->high & 0xfffffff0; - return 0; - } else - return -ENODEV; -} -EXPORT_SYMBOL(get_rar_address); - -/* The lock_rar function is used by other device drivers to lock an RAR. - * once an RAR is locked, it stays locked until the next system reboot. - * The function takes one parameter: - * - * int rar_index - * The rar_index is an index to the rar that you want to lock. - * Values can be 0,1, or 2. - * - * The function returns a 0 upon success or a -1 if there is no RAR - * facility on this system. - */ -int lock_rar(int rar_index) -{ - u32 working_addr; - int result; - - if (registered && (rar_index < 3) && (rar_index >= 0)) { - /* first make sure that lock bits are clear (this does lock) */ - working_addr = rar_addr[rar_index].low & 0xfffffff0; - - /* now send that value to the register using the IPC */ - result = memrar_set_rar_addr(rar_dev, rar_index, working_addr); - return result; - } else - return -ENODEV; -} +MODULE_DESCRIPTION("Intel Restricted Access Region Register Driver"); From 3913add413ab95b1e33738b44e9a2118afb11346 Mon Sep 17 00:00:00 2001 From: Mark Allyn Date: Fri, 5 Feb 2010 10:53:34 -0800 Subject: [PATCH 262/367] Staging: rar_register: add suspend and resume functions Add suspend and resume functions (which are currently stubs returning -ENOSYS) Signed-off-by: Mark Allyn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rar_register/rar_register.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rar_register/rar_register.c b/drivers/staging/rar_register/rar_register.c index c9dcc9916b70..bfc0e31f1a6f 100644 --- a/drivers/staging/rar_register/rar_register.c +++ b/drivers/staging/rar_register/rar_register.c @@ -506,6 +506,17 @@ int register_rar(int (*callback)(void *yourparameter), void *yourparameter) } EXPORT_SYMBOL(register_rar); +/* Suspend - returns -ENOSYS */ +static int rar_suspend(struct pci_dev *dev, pm_message_t state) +{ + return -ENOSYS; +} + +static int rar_resume(struct pci_dev *dev) +{ + return -ENOSYS; +} + /* * This function registers the driver with the device subsystem ( * either PCI, USB, etc). @@ -582,7 +593,9 @@ const struct pci_device_id *my_id_table = rar_pci_id_tbl; static struct pci_driver rar_pci_driver = { .name = "rar_register_driver", .id_table = rar_pci_id_tbl, - .probe = rar_probe + .probe = rar_probe, + .suspend = rar_suspend, + .resume = rar_resume }; static int __init rar_init_handler(void) From 326bdc6537d3f18d894745a344c44c9c34777014 Mon Sep 17 00:00:00 2001 From: Benjamin Adolphi Date: Sat, 6 Feb 2010 15:12:32 +0100 Subject: [PATCH 263/367] Staging: comedi: rti800: more Checkpatch cleanups This fixes all checkpatch issues in the rti800 comedi driver. Signed-off-by: Benjamin Adolphi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/rti800.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/staging/comedi/drivers/rti800.c b/drivers/staging/comedi/drivers/rti800.c index f2ee5289dbf1..028ed6f89c4c 100644 --- a/drivers/staging/comedi/drivers/rti800.c +++ b/drivers/staging/comedi/drivers/rti800.c @@ -225,7 +225,7 @@ static int rti800_ai_insn_read(struct comedi_device *dev, for (t = RTI800_TIMEOUT; t; t--) { status = inb(dev->iobase + RTI800_CSR); if (status & RTI800_OVERRUN) { - printk("rti800: a/d overrun\n"); + printk(KERN_WARNING "rti800: a/d overrun\n"); outb(0, dev->iobase + RTI800_CLRFLAGS); return -EIO; } @@ -234,7 +234,7 @@ static int rti800_ai_insn_read(struct comedi_device *dev, udelay(1); } if (t == 0) { - printk("rti800: timeout\n"); + printk(KERN_WARNING "rti800: timeout\n"); return -ETIME; } data[i] = inb(dev->iobase + RTI800_ADCLO); @@ -335,15 +335,15 @@ static int rti800_attach(struct comedi_device *dev, struct comedi_devconfig *it) struct comedi_subdevice *s; iobase = it->options[0]; - printk("comedi%d: rti800: 0x%04lx ", dev->minor, iobase); + printk(KERN_INFO "comedi%d: rti800: 0x%04lx\n", dev->minor, iobase); if (!request_region(iobase, RTI800_SIZE, "rti800")) { - printk("I/O port conflict\n"); + printk(KERN_WARNING "I/O port conflict\n"); return -EIO; } dev->iobase = iobase; #ifdef DEBUG - printk("fingerprint=%x,%x,%x,%x,%x ", + printk(KERN_DEBUG "fingerprint=%x,%x,%x,%x,%x ", inb(dev->iobase + 0), inb(dev->iobase + 1), inb(dev->iobase + 2), @@ -356,15 +356,15 @@ static int rti800_attach(struct comedi_device *dev, struct comedi_devconfig *it) irq = it->options[1]; if (irq) { - printk("( irq = %u )", irq); + printk(KERN_INFO "( irq = %u )\n", irq); ret = request_irq(irq, rti800_interrupt, 0, "rti800", dev); if (ret < 0) { - printk(" Failed to allocate IRQ\n"); + printk(KERN_WARNING " Failed to allocate IRQ\n"); return ret; } dev->irq = irq; } else { - printk("( no irq )"); + printk(KERN_INFO "( no irq )\n"); } dev->board_name = this_board->name; @@ -460,14 +460,12 @@ static int rti800_attach(struct comedi_device *dev, struct comedi_devconfig *it) s->type = COMEDI_SUBD_TIMER; #endif - printk("\n"); - return 0; } static int rti800_detach(struct comedi_device *dev) { - printk("comedi%d: rti800: remove\n", dev->minor); + printk(KERN_INFO "comedi%d: rti800: remove\n", dev->minor); if (dev->iobase) release_region(dev->iobase, RTI800_SIZE); From df16b962f06724f006ff06aa9e69971113e2fa46 Mon Sep 17 00:00:00 2001 From: Jochen Maes Date: Wed, 10 Feb 2010 00:19:46 +0100 Subject: [PATCH 264/367] staging: dream: Codestyle fix Fixed Codestyle issues Signed-off-by: Jochen Maes Cc: Pavel Machek Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dream/pmem.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/drivers/staging/dream/pmem.c b/drivers/staging/dream/pmem.c index def646812348..503ba212dc96 100644 --- a/drivers/staging/dream/pmem.c +++ b/drivers/staging/dream/pmem.c @@ -37,17 +37,17 @@ * the file should not be released until put_pmem_file is called */ #define PMEM_FLAGS_BUSY 0x1 /* indicates that this is a suballocation of a larger master range */ -#define PMEM_FLAGS_CONNECTED 0x1 << 1 +#define PMEM_FLAGS_CONNECTED ( 0x1 << 1 ) /* indicates this is a master and not a sub allocation and that it is mmaped */ -#define PMEM_FLAGS_MASTERMAP 0x1 << 2 +#define PMEM_FLAGS_MASTERMAP ( 0x1 << 2 ) /* submap and unsubmap flags indicate: * 00: subregion has never been mmaped * 10: subregion has been mmaped, reference to the mm was taken * 11: subretion has ben released, refernece to the mm still held * 01: subretion has been released, reference to the mm has been released */ -#define PMEM_FLAGS_SUBMAP 0x1 << 3 -#define PMEM_FLAGS_UNSUBMAP 0x1 << 4 +#define PMEM_FLAGS_SUBMAP ( 0x1 << 3 ) +#define PMEM_FLAGS_UNSUBMAP ( 0x1 << 4 ) struct pmem_data { @@ -91,7 +91,7 @@ struct pmem_region_node { #define PMEM_DEBUG_MSGS 0 #if PMEM_DEBUG_MSGS -#define DLOG(fmt,args...) \ +#define DLOG(fmt, args...) \ do { printk(KERN_INFO "[%s:%s:%d] "fmt, __FILE__, __func__, __LINE__, \ ##args); } \ while (0) @@ -152,7 +152,7 @@ struct pmem_info { static struct pmem_info pmem[PMEM_MAX_DEVICES]; static int id_count; -#define PMEM_IS_FREE(id, index) !(pmem[id].bitmap[index].allocated) +#define PMEM_IS_FREE(id, index) ( !(pmem[id].bitmap[index].allocated) ) #define PMEM_ORDER(id, index) pmem[id].bitmap[index].order #define PMEM_BUDDY_INDEX(id, index) (index ^ (1 << PMEM_ORDER(id, index))) #define PMEM_NEXT_INDEX(id, index) (index + (1 << PMEM_ORDER(id, index))) @@ -708,9 +708,8 @@ int get_pmem_addr(struct file *file, unsigned long *start, struct pmem_data *data; int id; - if (!is_pmem_file(file) || !has_allocation(file)) { + if (!is_pmem_file(file) || !has_allocation(file)) return -1; - } data = (struct pmem_data *)file->private_data; if (data->index == -1) { @@ -789,9 +788,8 @@ void flush_pmem_file(struct file *file, unsigned long offset, unsigned long len) struct list_head *elt; void *flush_start, *flush_end; - if (!is_pmem_file(file) || !has_allocation(file)) { + if (!is_pmem_file(file) || !has_allocation(file)) return; - } id = get_id(file); data = (struct pmem_data *)file->private_data; @@ -833,7 +831,7 @@ static int pmem_connect(unsigned long connect, struct file *file) src_file = fget_light(connect, &put_needed); DLOG("connect %p to %p\n", file, src_file); if (!src_file) { - printk("pmem: src file not found!\n"); + printk(KERN_INFO "pmem: src file not found!\n"); ret = -EINVAL; goto err_no_file; } @@ -846,7 +844,7 @@ static int pmem_connect(unsigned long connect, struct file *file) src_data = (struct pmem_data *)src_file->private_data; if (has_allocation(file) && (data->index != src_data->index)) { - printk("pmem: file is already mapped but doesn't match this" + printk(KERN_INFO "pmem: file is already mapped but doesn't match this" " src_file!\n"); ret = -EINVAL; goto err_bad_file; @@ -885,7 +883,7 @@ lock_mm: mm = get_task_mm(data->task); if (!mm) { #if PMEM_DEBUG - printk("pmem: can't remap task is gone!\n"); + printk(KERN_DEBUG "pmem: can't remap task is gone!\n"); #endif up_read(&data->sem); return -1; @@ -936,7 +934,7 @@ int pmem_remap(struct pmem_region *region, struct file *file, if (unlikely(!PMEM_IS_PAGE_ALIGNED(region->offset) || !PMEM_IS_PAGE_ALIGNED(region->len))) { #if PMEM_DEBUG - printk("pmem: request for unaligned pmem suballocation " + printk(KERN_DEBUG "pmem: request for unaligned pmem suballocation " "%lx %lx\n", region->offset, region->len); #endif return -EINVAL; From 451ff3737d220a17869d7304d5735146f9cc587f Mon Sep 17 00:00:00 2001 From: Jochen Maes Date: Wed, 10 Feb 2010 10:27:14 +0100 Subject: [PATCH 265/367] staging: dream: another Codestyle patch Fixed code style issues. Signed-off-by: Jochen Maes Acked-by: Pavel Machek Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dream/camera/msm_camera.c | 63 +++++++++++------------ 1 file changed, 30 insertions(+), 33 deletions(-) diff --git a/drivers/staging/dream/camera/msm_camera.c b/drivers/staging/dream/camera/msm_camera.c index 87e118d18827..06dba60dda0b 100644 --- a/drivers/staging/dream/camera/msm_camera.c +++ b/drivers/staging/dream/camera/msm_camera.c @@ -2,7 +2,7 @@ * Copyright (C) 2008-2009 QUALCOMM Incorporated. */ -//FIXME: most allocations need not be GFP_ATOMIC +/* FIXME: most allocations need not be GFP_ATOMIC /* FIXME: management of mutexes */ /* FIXME: msm_pmem_region_lookup return values */ /* FIXME: way too many copy to/from user */ @@ -76,14 +76,14 @@ static LIST_HEAD(msm_sensors); list_del_init(&qcmd->list); \ kfree(qcmd); \ }; \ -} while(0) +} while (0) #define MSM_DRAIN_QUEUE(sync, name) do { \ unsigned long flags; \ spin_lock_irqsave(&(sync)->name##_lock, flags); \ MSM_DRAIN_QUEUE_NOSYNC(sync, name); \ spin_unlock_irqrestore(&(sync)->name##_lock, flags); \ -} while(0) +} while (0) static int check_overlap(struct hlist_head *ptype, unsigned long paddr, @@ -361,7 +361,7 @@ static int __msm_get_frame(struct msm_sync *sync, if (!frame->buffer) { pr_err("%s: cannot get frame, invalid lookup address " "y=%x cbcr=%x offset=%d\n", - __FUNCTION__, + __func__, pphy->y_phy, pphy->cbcr_phy, frame->y_off); @@ -455,7 +455,7 @@ static int msm_disable_vfe(struct msm_sync *sync, void __user *arg) return rc; } -static struct msm_queue_cmd* __msm_control(struct msm_sync *sync, +static struct msm_queue_cmd *__msm_control(struct msm_sync *sync, struct msm_control_device_queue *queue, struct msm_queue_cmd *qcmd, int timeout) @@ -592,8 +592,7 @@ end: * a result of a successful completion, we are freeing the qcmd that * we dequeued from queue->ctrl_status_q. */ - if (qcmd) - kfree(qcmd); + kfree(qcmd); CDBG("msm_control: end rc = %d\n", rc); return rc; @@ -670,7 +669,7 @@ static int msm_get_stats(struct msm_sync *sync, void __user *arg) &(stats.fd)); if (!stats.buffer) { pr_err("%s: msm_pmem_stats_ptov_lookup error\n", - __FUNCTION__); + __func__); rc = -EINVAL; goto failure; } @@ -718,8 +717,7 @@ static int msm_get_stats(struct msm_sync *sync, void __user *arg) buf.fmain.buffer = (unsigned long)region.vaddr; buf.fmain.fd = region.fd; - } - else { + } else { pr_err("%s: pmem lookup failed\n", __func__); rc = -EINVAL; @@ -796,8 +794,7 @@ static int msm_get_stats(struct msm_sync *sync, void __user *arg) } failure: - if (qcmd) - kfree(qcmd); + kfree(qcmd); CDBG("msm_get_stats: %d\n", rc); return rc; @@ -838,8 +835,8 @@ static int msm_ctrl_cmd_done(struct msm_control_device *ctrl_pmsm, kfree(qcmd); goto end; } - } - else ctrlcmd->value = NULL; + } else + ctrlcmd->value = NULL; end: CDBG("msm_ctrl_cmd_done: end rc = %d\n", rc); @@ -869,14 +866,14 @@ static int msm_config_vfe(struct msm_sync *sync, void __user *arg) return -EFAULT; } - switch(cfgcmd.cmd_type) { + switch (cfgcmd.cmd_type) { case CMD_STATS_ENABLE: axi_data.bufnum1 = msm_pmem_region_lookup(&sync->stats, MSM_PMEM_AEC_AWB, ®ion[0], NUM_WB_EXP_STAT_OUTPUT_BUFFERS); if (!axi_data.bufnum1) { - pr_err("%s: pmem region lookup error\n", __FUNCTION__); + pr_err("%s: pmem region lookup error\n", __func__); return -EINVAL; } axi_data.region = ®ion[0]; @@ -888,7 +885,7 @@ static int msm_config_vfe(struct msm_sync *sync, void __user *arg) MSM_PMEM_AF, ®ion[0], NUM_AF_STAT_OUTPUT_BUFFERS); if (!axi_data.bufnum1) { - pr_err("%s: pmem region lookup error\n", __FUNCTION__); + pr_err("%s: pmem region lookup error\n", __func__); return -EINVAL; } axi_data.region = ®ion[0]; @@ -899,7 +896,7 @@ static int msm_config_vfe(struct msm_sync *sync, void __user *arg) break; default: pr_err("%s: unknown command type %d\n", - __FUNCTION__, cfgcmd.cmd_type); + __func__, cfgcmd.cmd_type); return -EINVAL; } @@ -928,7 +925,7 @@ static int msm_frame_axi_cfg(struct msm_sync *sync, msm_pmem_region_lookup(&sync->frame, pmem_type, ®ion[0], 8); if (!axi_data.bufnum1) { - pr_err("%s: pmem region lookup error\n", __FUNCTION__); + pr_err("%s: pmem region lookup error\n", __func__); return -EINVAL; } break; @@ -939,7 +936,7 @@ static int msm_frame_axi_cfg(struct msm_sync *sync, msm_pmem_region_lookup(&sync->frame, pmem_type, ®ion[0], 8); if (!axi_data.bufnum2) { - pr_err("%s: pmem region lookup error\n", __FUNCTION__); + pr_err("%s: pmem region lookup error\n", __func__); return -EINVAL; } break; @@ -950,7 +947,7 @@ static int msm_frame_axi_cfg(struct msm_sync *sync, msm_pmem_region_lookup(&sync->frame, pmem_type, ®ion[0], 8); if (!axi_data.bufnum1) { - pr_err("%s: pmem region lookup error\n", __FUNCTION__); + pr_err("%s: pmem region lookup error\n", __func__); return -EINVAL; } @@ -959,7 +956,7 @@ static int msm_frame_axi_cfg(struct msm_sync *sync, msm_pmem_region_lookup(&sync->frame, pmem_type, ®ion[axi_data.bufnum1], 8); if (!axi_data.bufnum2) { - pr_err("%s: pmem region lookup error\n", __FUNCTION__); + pr_err("%s: pmem region lookup error\n", __func__); return -EINVAL; } break; @@ -970,7 +967,7 @@ static int msm_frame_axi_cfg(struct msm_sync *sync, msm_pmem_region_lookup(&sync->frame, pmem_type, ®ion[0], 8); if (!axi_data.bufnum2) { - pr_err("%s: pmem region lookup error\n", __FUNCTION__); + pr_err("%s: pmem region lookup error\n", __func__); return -EINVAL; } break; @@ -981,7 +978,7 @@ static int msm_frame_axi_cfg(struct msm_sync *sync, default: pr_err("%s: unknown command type %d\n", - __FUNCTION__, cfgcmd->cmd_type); + __func__, cfgcmd->cmd_type); return -EINVAL; } @@ -1047,7 +1044,7 @@ static int __msm_put_frame_buf(struct msm_sync *sync, rc = sync->vfefn.vfe_config(&cfgcmd, &pphy); } else { pr_err("%s: msm_pmem_frame_vtop_lookup failed\n", - __FUNCTION__); + __func__); rc = -EINVAL; } @@ -1131,7 +1128,7 @@ static int msm_stats_axi_cfg(struct msm_sync *sync, break; default: pr_err("%s: unknown command type %d\n", - __FUNCTION__, cfgcmd->cmd_type); + __func__, cfgcmd->cmd_type); return -EINVAL; } @@ -1140,7 +1137,7 @@ static int msm_stats_axi_cfg(struct msm_sync *sync, msm_pmem_region_lookup(&sync->stats, pmem_type, ®ion[0], NUM_WB_EXP_STAT_OUTPUT_BUFFERS); if (!axi_data.bufnum1) { - pr_err("%s: pmem region lookup error\n", __FUNCTION__); + pr_err("%s: pmem region lookup error\n", __func__); return -EINVAL; } axi_data.region = ®ion[0]; @@ -1177,7 +1174,7 @@ static int msm_put_stats_buffer(struct msm_sync *sync, void __user *arg) cfgcmd.cmd_type = CMD_STATS_AF_BUF_RELEASE; else { pr_err("%s: invalid buf type %d\n", - __FUNCTION__, + __func__, buf.type); rc = -EINVAL; goto put_done; @@ -1223,7 +1220,7 @@ static int msm_axi_config(struct msm_sync *sync, void __user *arg) default: pr_err("%s: unknown command type %d\n", - __FUNCTION__, + __func__, cfgcmd.cmd_type); return -EINVAL; } @@ -1622,7 +1619,7 @@ static int msm_release_control(struct inode *node, struct file *filep) int rc; struct msm_control_device *ctrl_pmsm = filep->private_data; struct msm_device *pmsm = ctrl_pmsm->pmsm; - printk("msm_camera: RELEASE %s\n", filep->f_path.dentry->d_name.name); + printk(KERN_INFO "msm_camera: RELEASE %s\n", filep->f_path.dentry->d_name.name); rc = __msm_release(pmsm->sync); if (!rc) { MSM_DRAIN_QUEUE(&ctrl_pmsm->ctrl_q, ctrl_status_q); @@ -1636,7 +1633,7 @@ static int msm_release_frame(struct inode *node, struct file *filep) { int rc; struct msm_device *pmsm = filep->private_data; - printk("msm_camera: RELEASE %s\n", filep->f_path.dentry->d_name.name); + printk(KERN_INFO "msm_camera: RELEASE %s\n", filep->f_path.dentry->d_name.name); rc = __msm_release(pmsm->sync); if (!rc) { MSM_DRAIN_QUEUE(pmsm->sync, prev_frame_q); @@ -1720,7 +1717,7 @@ static void msm_vfe_sync(struct msm_vfe_resp *vdata, qcmd->type = qtype; if (qtype == MSM_CAM_Q_VFE_MSG) { - switch(vdata->type) { + switch (vdata->type) { case VFE_MSG_OUTPUT1: case VFE_MSG_OUTPUT2: qcmd_frame = @@ -1931,7 +1928,7 @@ static int __msm_v4l2_control(struct msm_sync *sync, memcpy(out->value, ctrl->value, ctrl->length); end: - if (rcmd) kfree(rcmd); + kfree(rcmd); CDBG("__msm_v4l2_control: end rc = %d\n", rc); return rc; } From 13a21ad18cb43574a1a642baf105afdf2a9260c4 Mon Sep 17 00:00:00 2001 From: Jochen Maes Date: Thu, 11 Feb 2010 17:10:42 +0100 Subject: [PATCH 266/367] staging: dream: more Code style fixes Removed parenthesis from return statements, split up assignment and if condition Signed-off-by: Jochen Maes Cc: Pavel Machek Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dream/camera/s5k3e2fx.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/staging/dream/camera/s5k3e2fx.c b/drivers/staging/dream/camera/s5k3e2fx.c index 66582af5a586..cbd432da88ee 100644 --- a/drivers/staging/dream/camera/s5k3e2fx.c +++ b/drivers/staging/dream/camera/s5k3e2fx.c @@ -743,12 +743,14 @@ static int s5k3e2fx_sensor_open_init(const struct msm_camera_sensor_info *data) } /* initialize AF */ - if ((rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, - 0x3146, 0x3A)) < 0) + rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, + 0x3146, 0x3A) + if (rc < 0) goto init_fail1; - if ((rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, - 0x3130, 0x03)) < 0) + rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, + 0x3130, 0x03) + if (rc < 0) goto init_fail1; goto init_done; @@ -814,20 +816,20 @@ static uint16_t s5k3e2fx_get_prev_lines_pf(void) static uint16_t s5k3e2fx_get_prev_pixels_pl(void) { - return (s5k3e2fx_reg_pat[S_RES_PREVIEW].size_w + - s5k3e2fx_reg_pat[S_RES_PREVIEW].blk_p); + return s5k3e2fx_reg_pat[S_RES_PREVIEW].size_w + + s5k3e2fx_reg_pat[S_RES_PREVIEW].blk_p; } static uint16_t s5k3e2fx_get_pict_lines_pf(void) { - return (s5k3e2fx_reg_pat[S_RES_CAPTURE].size_h + - s5k3e2fx_reg_pat[S_RES_CAPTURE].blk_l); + return s5k3e2fx_reg_pat[S_RES_CAPTURE].size_h + + s5k3e2fx_reg_pat[S_RES_CAPTURE].blk_l; } static uint16_t s5k3e2fx_get_pict_pixels_pl(void) { - return (s5k3e2fx_reg_pat[S_RES_CAPTURE].size_w + - s5k3e2fx_reg_pat[S_RES_CAPTURE].blk_p); + return s5k3e2fx_reg_pat[S_RES_CAPTURE].size_w + + s5k3e2fx_reg_pat[S_RES_CAPTURE].blk_p; } static uint32_t s5k3e2fx_get_pict_max_exp_lc(void) From 742821ce5fdf691826154fe72ba0884f71a40982 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Thu, 11 Feb 2010 12:07:35 -0600 Subject: [PATCH 267/367] staging: r8187se: Change to use common eeprom routines in EEPROM_93CX The TODO list includes switching this driver to use the common EEPROM routines in EEPROM_93CX. Signed-off-by: Larry Finger Tested by: Bernhard Schiffner Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8187se/Kconfig | 1 + drivers/staging/rtl8187se/Makefile | 1 - drivers/staging/rtl8187se/TODO | 1 - drivers/staging/rtl8187se/r8180_93cx6.c | 146 ------------------------ drivers/staging/rtl8187se/r8180_93cx6.h | 15 +-- drivers/staging/rtl8187se/r8180_core.c | 68 ++++++++--- 6 files changed, 60 insertions(+), 172 deletions(-) delete mode 100644 drivers/staging/rtl8187se/r8180_93cx6.c diff --git a/drivers/staging/rtl8187se/Kconfig b/drivers/staging/rtl8187se/Kconfig index e24a6f7a0d85..155a78e07405 100644 --- a/drivers/staging/rtl8187se/Kconfig +++ b/drivers/staging/rtl8187se/Kconfig @@ -3,6 +3,7 @@ config R8187SE depends on PCI && WLAN select WIRELESS_EXT select WEXT_PRIV + select EEPROM_93CX6 default N ---help--- If built as a module, it will be called r8187se.ko. diff --git a/drivers/staging/rtl8187se/Makefile b/drivers/staging/rtl8187se/Makefile index b395acf5a38e..e6adf91cdd2c 100644 --- a/drivers/staging/rtl8187se/Makefile +++ b/drivers/staging/rtl8187se/Makefile @@ -18,7 +18,6 @@ EXTRA_CFLAGS += -DENABLE_LPS r8187se-objs := \ r8180_core.o \ - r8180_93cx6.o \ r8180_wx.o \ r8180_rtl8225z2.o \ r8185b_init.o \ diff --git a/drivers/staging/rtl8187se/TODO b/drivers/staging/rtl8187se/TODO index a762e79873e9..704949a9da0d 100644 --- a/drivers/staging/rtl8187se/TODO +++ b/drivers/staging/rtl8187se/TODO @@ -5,7 +5,6 @@ TODO: - switch to use shared "librtl" instead of private ieee80211 stack - switch to use LIB80211 - switch to use MAC80211 -- switch to use EEPROM_93CX6 - use kernel coding style - checkpatch.pl fixes - sparse fixes diff --git a/drivers/staging/rtl8187se/r8180_93cx6.c b/drivers/staging/rtl8187se/r8180_93cx6.c deleted file mode 100644 index 7e4711fb930c..000000000000 --- a/drivers/staging/rtl8187se/r8180_93cx6.c +++ /dev/null @@ -1,146 +0,0 @@ -/* - This files contains card eeprom (93c46 or 93c56) programming routines, - memory is addressed by 16 bits words. - - This is part of rtl8180 OpenSource driver. - Copyright (C) Andrea Merello 2004 - Released under the terms of GPL (General Public Licence) - - Parts of this driver are based on the GPL part of the - official realtek driver. - - Parts of this driver are based on the rtl8180 driver skeleton - from Patric Schenke & Andres Salomon. - - Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver. - - We want to tanks the Authors of those projects and the Ndiswrapper - project Authors. -*/ - -#include "r8180_93cx6.h" - -void eprom_cs(struct net_device *dev, short bit) -{ - if(bit) - write_nic_byte(dev, EPROM_CMD, - (1<epromtype==EPROM_93c56){ - addr_str[7]=addr & 1; - addr_str[6]=addr & (1<<1); - addr_str[5]=addr & (1<<2); - addr_str[4]=addr & (1<<3); - addr_str[3]=addr & (1<<4); - addr_str[2]=addr & (1<<5); - addr_str[1]=addr & (1<<6); - addr_str[0]=addr & (1<<7); - addr_len=8; - }else{ - addr_str[5]=addr & 1; - addr_str[4]=addr & (1<<1); - addr_str[3]=addr & (1<<2); - addr_str[2]=addr & (1<<3); - addr_str[1]=addr & (1<<4); - addr_str[0]=addr & (1<<5); - addr_len=6; - } - eprom_cs(dev, 1); - eprom_ck_cycle(dev); - eprom_send_bits_string(dev, read_cmd, 3); - eprom_send_bits_string(dev, addr_str, addr_len); - - //keep chip pin D to low state while reading. - //I'm unsure if it is necessary, but anyway shouldn't hurt - eprom_w(dev, 0); - - for(i=0;i<16;i++){ - //eeprom needs a clk cycle between writing opcode&adr - //and reading data. (eeprom outs a dummy 0) - eprom_ck_cycle(dev); - ret |= (eprom_r(dev)<<(15-i)); - } - - eprom_cs(dev, 0); - eprom_ck_cycle(dev); - - //disable EPROM programming - write_nic_byte(dev, EPROM_CMD, - (EPROM_CMD_NORMAL< +#include #include "r8180_hw.h" #include "r8180.h" @@ -2642,6 +2643,36 @@ static void rtl8180_link_detect_init(plink_detect_t plink_detect) } //YJ,add,080828,end +static void rtl8187se_eeprom_register_read(struct eeprom_93cx6 *eeprom) +{ + struct net_device *dev = eeprom->data; + u8 reg = read_nic_byte(dev, EPROM_CMD); + + eeprom->reg_data_in = reg & RTL818X_EEPROM_CMD_WRITE; + eeprom->reg_data_out = reg & RTL818X_EEPROM_CMD_READ; + eeprom->reg_data_clock = reg & RTL818X_EEPROM_CMD_CK; + eeprom->reg_chip_select = reg & RTL818X_EEPROM_CMD_CS; +} + +static void rtl8187se_eeprom_register_write(struct eeprom_93cx6 *eeprom) +{ + struct net_device *dev = eeprom->data; + u8 reg = 2 << 6; + + if (eeprom->reg_data_in) + reg |= RTL818X_EEPROM_CMD_WRITE; + if (eeprom->reg_data_out) + reg |= RTL818X_EEPROM_CMD_READ; + if (eeprom->reg_data_clock) + reg |= RTL818X_EEPROM_CMD_CK; + if (eeprom->reg_chip_select) + reg |= RTL818X_EEPROM_CMD_CS; + + write_nic_byte(dev, EPROM_CMD, reg); + read_nic_byte(dev, EPROM_CMD); + udelay(10); +} + short rtl8180_init(struct net_device *dev) { struct r8180_priv *priv = ieee80211_priv(dev); @@ -2650,8 +2681,16 @@ short rtl8180_init(struct net_device *dev) u32 usValue; u16 tmpu16; int i, j; + struct eeprom_93cx6 eeprom; + u16 eeprom_val; - priv->channel_plan = eprom_read(dev, EEPROM_COUNTRY_CODE>>1) & 0xFF; + eeprom.data = dev; + eeprom.register_read = rtl8187se_eeprom_register_read; + eeprom.register_write = rtl8187se_eeprom_register_write; + eeprom.width = PCI_EEPROM_WIDTH_93C46; + + eeprom_93cx6_read(&eeprom, EEPROM_COUNTRY_CODE>>1, &eeprom_val); + priv->channel_plan = eeprom_val & 0xFF; if(priv->channel_plan > COUNTRY_CODE_GLOBAL_DOMAIN){ printk("rtl8180_init:Error channel plan! Set to default.\n"); priv->channel_plan = 0; @@ -2879,7 +2918,8 @@ short rtl8180_init(struct net_device *dev) // just for sync 85 priv->enable_gpio0 = 0; - usValue = eprom_read(dev, EEPROM_SW_REVD_OFFSET); + eeprom_93cx6_read(&eeprom, EEPROM_SW_REVD_OFFSET, &eeprom_val); + usValue = eeprom_val; DMESG("usValue is 0x%x\n",usValue); //3Read AntennaDiversity @@ -2919,27 +2959,23 @@ short rtl8180_init(struct net_device *dev) else priv->epromtype=EPROM_93c46; - dev->dev_addr[0]=eprom_read(dev,MAC_ADR) & 0xff; - dev->dev_addr[1]=(eprom_read(dev,MAC_ADR) & 0xff00)>>8; - dev->dev_addr[2]=eprom_read(dev,MAC_ADR+1) & 0xff; - dev->dev_addr[3]=(eprom_read(dev,MAC_ADR+1) & 0xff00)>>8; - dev->dev_addr[4]=eprom_read(dev,MAC_ADR+2) & 0xff; - dev->dev_addr[5]=(eprom_read(dev,MAC_ADR+2) & 0xff00)>>8; + eeprom_93cx6_multiread(&eeprom, 0x7, (__le16 *) + dev->dev_addr, 3); for(i=1,j=0; i<14; i+=2,j++){ - word = eprom_read(dev,EPROM_TXPW_CH1_2 + j); + eeprom_93cx6_read(&eeprom, EPROM_TXPW_CH1_2 + j, &word); priv->chtxpwr[i]=word & 0xff; priv->chtxpwr[i+1]=(word & 0xff00)>>8; } for (i = 1, j = 0; i < 14; i += 2, j++) { - word = eprom_read(dev, EPROM_TXPW_OFDM_CH1_2 + j); + eeprom_93cx6_read(&eeprom, EPROM_TXPW_OFDM_CH1_2 + j, &word); priv->chtxpwr_ofdm[i] = word & 0xff; priv->chtxpwr_ofdm[i+1] = (word & 0xff00) >> 8; } /* 3Read crystal calibtration and thermal meter indication on 87SE. */ + eeprom_93cx6_read(&eeprom, EEPROM_RSV>>1, &tmpu16); - tmpu16 = eprom_read(dev, EEPROM_RSV >> 1); /* Crystal calibration for Xin and Xout resp. */ priv->XtalCal_Xout = tmpu16 & EEPROM_XTAL_CAL_XOUT_MASK; priv->XtalCal_Xin = (tmpu16 & EEPROM_XTAL_CAL_XIN_MASK) >> 4; @@ -2951,17 +2987,19 @@ short rtl8180_init(struct net_device *dev) if ((tmpu16 & EEPROM_THERMAL_METER_ENABLE) >> 13) priv->bTxPowerTrack = true; - word = eprom_read(dev,EPROM_TXPW_BASE); + eeprom_93cx6_read(&eeprom, EPROM_TXPW_BASE, &word); priv->cck_txpwr_base = word & 0xf; priv->ofdm_txpwr_base = (word>>4) & 0xf; - version = eprom_read(dev,EPROM_VERSION); + eeprom_93cx6_read(&eeprom, EPROM_VERSION, &version); DMESG("EEPROM version %x",version); priv->rcr_csense = 3; - priv->cs_treshold = (eprom_read(dev, ENERGY_TRESHOLD) & 0xff00) >> 8; + eeprom_93cx6_read(&eeprom, ENERGY_TRESHOLD, &eeprom_val); + priv->cs_treshold = (eeprom_val & 0xff00) >> 8; - priv->rf_chip = 0xff & eprom_read(dev, RFCHIPID); + eeprom_93cx6_read(&eeprom, RFCHIPID, &eeprom_val); + priv->rf_chip = 0xff & eeprom_val; priv->rf_chip = RF_ZEBRA4; priv->rf_sleep = rtl8225z4_rf_sleep; From 6de92dd6495e36c0c2cddbee3e7c6a49f608e7cf Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Thu, 11 Feb 2010 14:41:24 -0600 Subject: [PATCH 268/367] Staging: r8187se: Fix for LED not following radio switch The current driver does not follow the state of the RF switch. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8187se/r8180_core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index ac987d149219..0b7ec6b949b4 100644 --- a/drivers/staging/rtl8187se/r8180_core.c +++ b/drivers/staging/rtl8187se/r8180_core.c @@ -4238,11 +4238,12 @@ void GPIOChangeRFWorkItemCallBack(struct work_struct *work) /* HW radio On/Off according to the value of FF51[4](config0) */ btConfig0 = btPSR = read_nic_byte(dev, CONFIG0); - /* Turn on LED. */ - write_nic_byte(dev, PSR, btPSR | BIT3); - eRfPowerStateToSet = (btConfig0 & BIT4) ? eRfOn : eRfOff; + /* Turn LED back on when radio enabled */ + if (eRfPowerStateToSet == eRfOn) + write_nic_byte(dev, PSR, btPSR | BIT3); + if ((priv->ieee80211->bHwRadioOff == true) && (eRfPowerStateToSet == eRfOn)) { priv->ieee80211->bHwRadioOff = false; From cd9d25ba31b2def7f84da1e3cedf21e8ebb90722 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 12 Feb 2010 14:48:01 +0300 Subject: [PATCH 269/367] staging: vt6655: add missing curly braces It's clear from the indent levels and the context that there are supposed to be curly braces here. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vt6655/card.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c index db786142717f..bf4fd49709df 100644 --- a/drivers/staging/vt6655/card.c +++ b/drivers/staging/vt6655/card.c @@ -2788,16 +2788,18 @@ void CARDvUpdateBasicTopRate (PVOID pDeviceHandler) //Determines the highest basic rate. for (ii = RATE_54M; ii >= RATE_6M; ii --) { - if ( (pDevice->wBasicRate) & ((WORD)(1<wBasicRate) & ((WORD)(1<byTopOFDMBasicRate = byTopOFDM; for (ii = RATE_11M;; ii --) { - if ( (pDevice->wBasicRate) & ((WORD)(1<wBasicRate) & ((WORD)(1< Date: Sat, 13 Feb 2010 20:21:43 +0000 Subject: [PATCH 270/367] Staging: comedi: bracing fix to ni_atmio.c This is a patch to ni_atmio.c file to fix up bracing style problems found by checkpatch.pl tool Signed-off-by: Graham M Howe Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_atmio.c | 34 +++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_atmio.c b/drivers/staging/comedi/drivers/ni_atmio.c index 8ead31164d5c..003d00b595b0 100644 --- a/drivers/staging/comedi/drivers/ni_atmio.c +++ b/drivers/staging/comedi/drivers/ni_atmio.c @@ -329,11 +329,11 @@ static uint16_t ni_atmio_win_in(struct comedi_device *dev, int addr) } static struct pnp_device_id device_ids[] = { - {.id = "NIC1900",.driver_data = 0}, - {.id = "NIC2400",.driver_data = 0}, - {.id = "NIC2500",.driver_data = 0}, - {.id = "NIC2600",.driver_data = 0}, - {.id = "NIC2700",.driver_data = 0}, + {.id = "NIC1900", .driver_data = 0}, + {.id = "NIC2400", .driver_data = 0}, + {.id = "NIC2500", .driver_data = 0}, + {.id = "NIC2600", .driver_data = 0}, + {.id = "NIC2700", .driver_data = 0}, {.id = ""} }; @@ -362,9 +362,9 @@ static int ni_atmio_detach(struct comedi_device *dev) if (dev->iobase) release_region(dev->iobase, NI_SIZE); - if (dev->irq) { + if (dev->irq) free_irq(dev->irq, dev); - } + if (devpriv->isapnp_dev) pnp_device_detach(devpriv->isapnp_dev); @@ -387,8 +387,8 @@ static int ni_isapnp_find_board(struct pnp_dev **dev) if (pnp_device_attach(isapnp_dev) < 0) { printk - ("ni_atmio: %s found but already active, skipping.\n", - ni_boards[i].name); + ("ni_atmio: %s found but already active, skipping.\n", + ni_boards[i].name); continue; } if (pnp_activate_dev(isapnp_dev) < 0) { @@ -496,9 +496,9 @@ static int ni_atmio_attach(struct comedi_device *dev, /* generic E series stuff in ni_mio_common.c */ ret = ni_E_init(dev, it); - if (ret < 0) { + if (ret < 0) return ret; - } + return 0; } @@ -509,16 +509,16 @@ static int ni_getboardtype(struct comedi_device *dev) int i; for (i = 0; i < n_ni_boards; i++) { - if (ni_boards[i].device_id == device_id) { + if (ni_boards[i].device_id == device_id) return i; - } + } - if (device_id == 255) { + if (device_id == 255) printk(" can't find board\n"); - } else if (device_id == 0) { + else if (device_id == 0) printk(" EEPROM read error (?) or device not found\n"); - } else { + else printk(" unknown device ID %d -- contact author\n", device_id); - } + return -1; } From 46800b225f8c9dc264e1e9c15b1e104b9e0af5b5 Mon Sep 17 00:00:00 2001 From: Svenne Krap Date: Sun, 14 Feb 2010 18:59:42 +0100 Subject: [PATCH 271/367] Staging: wlan-ng: clean up assignments in if statements Trivial changes to code-paths. Signed-off-by: Svenne Krap Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/hfa384x_usb.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index c6a9e17ec79b..bd2eba304842 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -1909,16 +1909,20 @@ int hfa384x_drvr_flashdl_enable(hfa384x_t *hw) return -EINVAL; /* Retrieve the buffer loc&size and timeout */ - if ((result = hfa384x_drvr_getconfig(hw, HFA384x_RID_DOWNLOADBUFFER, - &(hw->bufinfo), - sizeof(hw->bufinfo)))) { + + result = hfa384x_drvr_getconfig(hw, HFA384x_RID_DOWNLOADBUFFER, + &(hw->bufinfo), sizeof(hw->bufinfo)); + if (result) { return result; } hw->bufinfo.page = le16_to_cpu(hw->bufinfo.page); hw->bufinfo.offset = le16_to_cpu(hw->bufinfo.offset); hw->bufinfo.len = le16_to_cpu(hw->bufinfo.len); - if ((result = hfa384x_drvr_getconfig16(hw, HFA384x_RID_MAXLOADTIME, - &(hw->dltimeout)))) { + + result = hfa384x_drvr_getconfig16(hw, HFA384x_RID_MAXLOADTIME, + &(hw->dltimeout)); + + if (result) { return result; } hw->dltimeout = le16_to_cpu(hw->dltimeout); @@ -3073,7 +3077,9 @@ static void hfa384x_usbctlxq_run(hfa384x_t *hw) /* Now submit the URB and update the CTLX's state */ - if ((result = SUBMIT_URB(&hw->ctlx_urb, GFP_ATOMIC)) == 0) { + + result = SUBMIT_URB(&hw->ctlx_urb, GFP_ATOMIC); + if (result == 0) { /* This CTLX is now running on the active queue */ head->state = CTLX_REQ_SUBMITTED; @@ -3599,7 +3605,8 @@ static void hfa384x_int_rxmonitor(wlandevice_t *wlandev, skblen - sizeof(p80211_caphdr_t)); } - if ((skb = dev_alloc_skb(skblen)) == NULL) { + skb = dev_alloc_skb(skblen); + if (skb == NULL) { printk(KERN_ERR "alloc_skb failed trying to allocate %d bytes\n", skblen); @@ -3870,7 +3877,8 @@ retry: delresp: if (delete_resptimer) { - if ((timer_ok = del_timer(&hw->resptimer)) != 0) { + timer_ok = del_timer(&hw->resptimer); + if (timer_ok != 0) { hw->resp_timer_done = 1; } } From 5dd8acc8fd6b0476a2dc49bc6de4712d22c368c0 Mon Sep 17 00:00:00 2001 From: Svenne Krap Date: Sun, 14 Feb 2010 18:59:00 +0100 Subject: [PATCH 272/367] Staging: wlan-ng: multiple safe style cleanups Cleanups as suggested by checkpatch.pl utiltiy. .o's from before and after cleanup have matching SHA1s. Signed-off-by: Svenne Krap Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/hfa384x.h | 70 ++++++++++++------------- drivers/staging/wlan-ng/hfa384x_usb.c | 8 +-- drivers/staging/wlan-ng/p80211conv.c | 23 ++++---- drivers/staging/wlan-ng/p80211conv.h | 4 +- drivers/staging/wlan-ng/p80211metadef.h | 18 +++---- drivers/staging/wlan-ng/p80211mgmt.h | 42 +++++++-------- drivers/staging/wlan-ng/p80211netdev.c | 7 +-- drivers/staging/wlan-ng/p80211netdev.h | 42 +++++++-------- drivers/staging/wlan-ng/p80211req.c | 2 +- drivers/staging/wlan-ng/p80211req.h | 2 +- drivers/staging/wlan-ng/p80211types.h | 18 +++---- drivers/staging/wlan-ng/p80211wext.c | 55 +++++++++---------- drivers/staging/wlan-ng/prism2fw.c | 60 ++++++++++----------- drivers/staging/wlan-ng/prism2mgmt.c | 4 +- drivers/staging/wlan-ng/prism2mgmt.h | 48 ++++++++--------- drivers/staging/wlan-ng/prism2mib.c | 6 +-- drivers/staging/wlan-ng/prism2sta.c | 18 +++---- 17 files changed, 214 insertions(+), 213 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h index 46cce8159e59..d93e6e90720b 100644 --- a/drivers/staging/wlan-ng/hfa384x.h +++ b/drivers/staging/wlan-ng/hfa384x.h @@ -115,8 +115,8 @@ /* Make a 32-bit flat address from AUX format 16-bit page and offset */ #define HFA384x_ADDR_AUX_MKFLAT(p, o) \ - (((u32)(((u16)(p))&HFA384x_ADDR_AUX_PAGE_MASK)) << 7) | \ - ((u32)(((u16)(o))&HFA384x_ADDR_AUX_OFF_MASK)) + ((((u32)(((u16)(p))&HFA384x_ADDR_AUX_PAGE_MASK)) << 7) | \ + ((u32)(((u16)(o))&HFA384x_ADDR_AUX_OFF_MASK))) /* Make CMD format offset and page from a 32-bit flat address */ #define HFA384x_ADDR_CMD_MKPAGE(f) \ @@ -402,7 +402,7 @@ typedef struct hfa384x_authenticateStation_data { /*-- Configuration Record: WPAData (data portion only) --*/ typedef struct hfa384x_WPAData { u16 datalen; - u8 data[0]; // max 80 + u8 data[0]; /* max 80 */ } __attribute__ ((packed)) hfa384x_WPAData_t; /*-------------------------------------------------------------------- @@ -1133,7 +1133,7 @@ struct hfa384x; typedef void (*ctlx_cmdcb_t) (struct hfa384x *, const struct hfa384x_usbctlx *); -typedef void (*ctlx_usercb_t) (struct hfa384x * hw, +typedef void (*ctlx_usercb_t) (struct hfa384x *hw, void *ctlxresult, void *usercb_data); typedef struct hfa384x_usbctlx { @@ -1320,25 +1320,25 @@ typedef struct hfa384x { } hfa384x_t; -void hfa384x_create(hfa384x_t * hw, struct usb_device *usb); -void hfa384x_destroy(hfa384x_t * hw); +void hfa384x_create(hfa384x_t *hw, struct usb_device *usb); +void hfa384x_destroy(hfa384x_t *hw); int -hfa384x_corereset(hfa384x_t * hw, int holdtime, int settletime, int genesis); -int hfa384x_drvr_commtallies(hfa384x_t * hw); -int hfa384x_drvr_disable(hfa384x_t * hw, u16 macport); -int hfa384x_drvr_enable(hfa384x_t * hw, u16 macport); -int hfa384x_drvr_flashdl_enable(hfa384x_t * hw); -int hfa384x_drvr_flashdl_disable(hfa384x_t * hw); -int hfa384x_drvr_flashdl_write(hfa384x_t * hw, u32 daddr, void *buf, u32 len); -int hfa384x_drvr_getconfig(hfa384x_t * hw, u16 rid, void *buf, u16 len); -int hfa384x_drvr_ramdl_enable(hfa384x_t * hw, u32 exeaddr); -int hfa384x_drvr_ramdl_disable(hfa384x_t * hw); -int hfa384x_drvr_ramdl_write(hfa384x_t * hw, u32 daddr, void *buf, u32 len); -int hfa384x_drvr_readpda(hfa384x_t * hw, void *buf, unsigned int len); -int hfa384x_drvr_setconfig(hfa384x_t * hw, u16 rid, void *buf, u16 len); +hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime, int genesis); +int hfa384x_drvr_commtallies(hfa384x_t *hw); +int hfa384x_drvr_disable(hfa384x_t *hw, u16 macport); +int hfa384x_drvr_enable(hfa384x_t *hw, u16 macport); +int hfa384x_drvr_flashdl_enable(hfa384x_t *hw); +int hfa384x_drvr_flashdl_disable(hfa384x_t *hw); +int hfa384x_drvr_flashdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len); +int hfa384x_drvr_getconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len); +int hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr); +int hfa384x_drvr_ramdl_disable(hfa384x_t *hw); +int hfa384x_drvr_ramdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len); +int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len); +int hfa384x_drvr_setconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len); -static inline int hfa384x_drvr_getconfig16(hfa384x_t * hw, u16 rid, void *val) +static inline int hfa384x_drvr_getconfig16(hfa384x_t *hw, u16 rid, void *val) { int result = 0; result = hfa384x_drvr_getconfig(hw, rid, val, sizeof(u16)); @@ -1347,44 +1347,44 @@ static inline int hfa384x_drvr_getconfig16(hfa384x_t * hw, u16 rid, void *val) return result; } -static inline int hfa384x_drvr_setconfig16(hfa384x_t * hw, u16 rid, u16 val) +static inline int hfa384x_drvr_setconfig16(hfa384x_t *hw, u16 rid, u16 val) { u16 value = cpu_to_le16(val); return hfa384x_drvr_setconfig(hw, rid, &value, sizeof(value)); } int -hfa384x_drvr_getconfig_async(hfa384x_t * hw, +hfa384x_drvr_getconfig_async(hfa384x_t *hw, u16 rid, ctlx_usercb_t usercb, void *usercb_data); int -hfa384x_drvr_setconfig_async(hfa384x_t * hw, +hfa384x_drvr_setconfig_async(hfa384x_t *hw, u16 rid, void *buf, u16 len, ctlx_usercb_t usercb, void *usercb_data); static inline int -hfa384x_drvr_setconfig16_async(hfa384x_t * hw, u16 rid, u16 val) +hfa384x_drvr_setconfig16_async(hfa384x_t *hw, u16 rid, u16 val) { u16 value = cpu_to_le16(val); return hfa384x_drvr_setconfig_async(hw, rid, &value, sizeof(value), NULL, NULL); } -int hfa384x_drvr_start(hfa384x_t * hw); -int hfa384x_drvr_stop(hfa384x_t * hw); +int hfa384x_drvr_start(hfa384x_t *hw); +int hfa384x_drvr_stop(hfa384x_t *hw); int -hfa384x_drvr_txframe(hfa384x_t * hw, struct sk_buff *skb, - p80211_hdr_t * p80211_hdr, p80211_metawep_t * p80211_wep); -void hfa384x_tx_timeout(wlandevice_t * wlandev); +hfa384x_drvr_txframe(hfa384x_t *hw, struct sk_buff *skb, + p80211_hdr_t *p80211_hdr, p80211_metawep_t *p80211_wep); +void hfa384x_tx_timeout(wlandevice_t *wlandev); -int hfa384x_cmd_initialize(hfa384x_t * hw); -int hfa384x_cmd_enable(hfa384x_t * hw, u16 macport); -int hfa384x_cmd_disable(hfa384x_t * hw, u16 macport); -int hfa384x_cmd_allocate(hfa384x_t * hw, u16 len); -int hfa384x_cmd_monitor(hfa384x_t * hw, u16 enable); +int hfa384x_cmd_initialize(hfa384x_t *hw); +int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport); +int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport); +int hfa384x_cmd_allocate(hfa384x_t *hw, u16 len); +int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable); int -hfa384x_cmd_download(hfa384x_t * hw, +hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr, u16 highaddr, u16 codelen); #endif /* __KERNEL__ */ diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index bd2eba304842..612995b3d576 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -126,7 +126,7 @@ #include #include -#define SUBMIT_URB(u,f) usb_submit_urb(u,f) +#define SUBMIT_URB(u, f) usb_submit_urb(u, f) #include "p80211types.h" #include "p80211hdr.h" @@ -627,7 +627,7 @@ static hfa384x_usbctlx_t *usbctlx_alloc(void) { hfa384x_usbctlx_t *ctlx; - ctlx = kmalloc(sizeof(*ctlx), in_interrupt()? GFP_ATOMIC : GFP_KERNEL); + ctlx = kmalloc(sizeof(*ctlx), in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); if (ctlx != NULL) { memset(ctlx, 0, sizeof(*ctlx)); init_completion(&ctlx->done); @@ -675,7 +675,7 @@ struct usbctlx_cmd_completor { }; typedef struct usbctlx_cmd_completor usbctlx_cmd_completor_t; -static int usbctlx_cmd_completor_fn(usbctlx_completor_t * head) +static int usbctlx_cmd_completor_fn(usbctlx_completor_t *head) { usbctlx_cmd_completor_t *complete = (usbctlx_cmd_completor_t *) head; return usbctlx_get_status(complete->cmdresp, complete->result); @@ -3649,7 +3649,7 @@ static void hfa384x_int_rxmonitor(wlandevice_t *wlandev, /* check for unencrypted stuff if WEP bit set. */ if (*(datap - hdrlen + 1) & 0x40) /* wep set */ if ((*(datap) == 0xaa) && (*(datap + 1) == 0xaa)) - *(datap - hdrlen + 1) &= 0xbf; // clear wep; it's the 802.2 header! + *(datap - hdrlen + 1) &= 0xbf; /* clear wep; it's the 802.2 header! */ } if (hw->sniff_fcs) { diff --git a/drivers/staging/wlan-ng/p80211conv.c b/drivers/staging/wlan-ng/p80211conv.c index 5952c671073f..99c5ec45b00d 100644 --- a/drivers/staging/wlan-ng/p80211conv.c +++ b/drivers/staging/wlan-ng/p80211conv.c @@ -206,12 +206,12 @@ int skb_ether_to_p80211(wlandevice_t *wlandev, u32 ethconv, /* XXXX need to pick keynum other than default? */ p80211_wep->data = kmalloc(skb->len, GFP_ATOMIC); - - if ((foo = wep_encrypt(wlandev, skb->data, p80211_wep->data, - skb->len, - (wlandev->hostwep & - HOSTWEP_DEFAULTKEY_MASK), - p80211_wep->iv, p80211_wep->icv))) { + foo = wep_encrypt(wlandev, skb->data, p80211_wep->data, + skb->len, + (wlandev->hostwep & + HOSTWEP_DEFAULTKEY_MASK), + p80211_wep->iv, p80211_wep->icv); + if (foo) { printk(KERN_WARNING "Host en-WEP failed, dropping frame (%d).\n", foo); @@ -323,11 +323,12 @@ int skb_p80211_to_ether(wlandevice_t *wlandev, u32 ethconv, skb->len); return 1; } - if ((foo = wep_decrypt(wlandev, skb->data + payload_offset + 4, - payload_length - 8, -1, - skb->data + payload_offset, - skb->data + payload_offset + - payload_length - 4))) { + foo = wep_decrypt(wlandev, skb->data + payload_offset + 4, + payload_length - 8, -1, + skb->data + payload_offset, + skb->data + payload_offset + + payload_length - 4); + if (foo) { /* de-wep failed, drop skb. */ pr_debug("Host de-WEP failed, dropping frame (%d).\n", foo); diff --git a/drivers/staging/wlan-ng/p80211conv.h b/drivers/staging/wlan-ng/p80211conv.h index 0c62df19fa7f..6fe163be24f6 100644 --- a/drivers/staging/wlan-ng/p80211conv.h +++ b/drivers/staging/wlan-ng/p80211conv.h @@ -153,8 +153,8 @@ struct wlandevice; int skb_p80211_to_ether(struct wlandevice *wlandev, u32 ethconv, struct sk_buff *skb); int skb_ether_to_p80211(struct wlandevice *wlandev, u32 ethconv, - struct sk_buff *skb, p80211_hdr_t * p80211_hdr, - p80211_metawep_t * p80211_wep); + struct sk_buff *skb, p80211_hdr_t *p80211_hdr, + p80211_metawep_t *p80211_wep); int p80211_stt_findproto(u16 proto); diff --git a/drivers/staging/wlan-ng/p80211metadef.h b/drivers/staging/wlan-ng/p80211metadef.h index da8b6f53c74f..10605285cf6e 100644 --- a/drivers/staging/wlan-ng/p80211metadef.h +++ b/drivers/staging/wlan-ng/p80211metadef.h @@ -190,9 +190,9 @@ (P80211DID_MKSECTION(2) | \ P80211DID_MKGROUP(1)) #define DIDmib_dot11mac_dot11OperationTable_dot11MACAddress \ - (P80211DID_MKSECTION(2) | \ - P80211DID_MKGROUP(1) | \ - P80211DID_MKITEM(1) | 0x18000000) + ((P80211DID_MKSECTION(2) | \ + P80211DID_MKGROUP(1) | \ + P80211DID_MKITEM(1) | 0x18000000)) #define DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold \ (P80211DID_MKSECTION(2) | \ P80211DID_MKGROUP(1) | \ @@ -210,18 +210,18 @@ P80211DID_MKGROUP(1) | \ P80211DID_MKITEM(5) | 0x18000000) #define DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime \ - (P80211DID_MKSECTION(2) | \ - P80211DID_MKGROUP(1) | \ - P80211DID_MKITEM(6) | 0x10000000) + (P80211DID_MKSECTION(2) | \ + P80211DID_MKGROUP(1) | \ + P80211DID_MKITEM(6) | 0x10000000) #define DIDmib_cat_dot11phy \ P80211DID_MKSECTION(3) #define DIDmib_dot11phy_dot11PhyOperationTable \ (P80211DID_MKSECTION(3) | \ P80211DID_MKGROUP(1)) #define DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel \ - (P80211DID_MKSECTION(3) | \ - P80211DID_MKGROUP(3) | \ - P80211DID_MKITEM(10) | 0x18000000) + (P80211DID_MKSECTION(3) | \ + P80211DID_MKGROUP(3) | \ + P80211DID_MKITEM(10) | 0x18000000) #define DIDmib_dot11phy_dot11PhyDSSSTable \ (P80211DID_MKSECTION(3) | \ P80211DID_MKGROUP(5)) diff --git a/drivers/staging/wlan-ng/p80211mgmt.h b/drivers/staging/wlan-ng/p80211mgmt.h index 14cdc86d1676..deb52f5fd780 100644 --- a/drivers/staging/wlan-ng/p80211mgmt.h +++ b/drivers/staging/wlan-ng/p80211mgmt.h @@ -100,7 +100,7 @@ #ifndef _P80211MGMT_H #define _P80211MGMT_H -#ifndef _P80211HDR_H +#ifndef _P80211HDR_H #include "p80211hdr.h" #endif @@ -496,25 +496,25 @@ typedef struct wlan_fr_deauthen { } wlan_fr_deauthen_t; -void wlan_mgmt_encode_beacon(wlan_fr_beacon_t * f); -void wlan_mgmt_decode_beacon(wlan_fr_beacon_t * f); -void wlan_mgmt_encode_disassoc(wlan_fr_disassoc_t * f); -void wlan_mgmt_decode_disassoc(wlan_fr_disassoc_t * f); -void wlan_mgmt_encode_assocreq(wlan_fr_assocreq_t * f); -void wlan_mgmt_decode_assocreq(wlan_fr_assocreq_t * f); -void wlan_mgmt_encode_assocresp(wlan_fr_assocresp_t * f); -void wlan_mgmt_decode_assocresp(wlan_fr_assocresp_t * f); -void wlan_mgmt_encode_reassocreq(wlan_fr_reassocreq_t * f); -void wlan_mgmt_decode_reassocreq(wlan_fr_reassocreq_t * f); -void wlan_mgmt_encode_reassocresp(wlan_fr_reassocresp_t * f); -void wlan_mgmt_decode_reassocresp(wlan_fr_reassocresp_t * f); -void wlan_mgmt_encode_probereq(wlan_fr_probereq_t * f); -void wlan_mgmt_decode_probereq(wlan_fr_probereq_t * f); -void wlan_mgmt_encode_proberesp(wlan_fr_proberesp_t * f); -void wlan_mgmt_decode_proberesp(wlan_fr_proberesp_t * f); -void wlan_mgmt_encode_authen(wlan_fr_authen_t * f); -void wlan_mgmt_decode_authen(wlan_fr_authen_t * f); -void wlan_mgmt_encode_deauthen(wlan_fr_deauthen_t * f); -void wlan_mgmt_decode_deauthen(wlan_fr_deauthen_t * f); +void wlan_mgmt_encode_beacon(wlan_fr_beacon_t *f); +void wlan_mgmt_decode_beacon(wlan_fr_beacon_t *f); +void wlan_mgmt_encode_disassoc(wlan_fr_disassoc_t *f); +void wlan_mgmt_decode_disassoc(wlan_fr_disassoc_t *f); +void wlan_mgmt_encode_assocreq(wlan_fr_assocreq_t *f); +void wlan_mgmt_decode_assocreq(wlan_fr_assocreq_t *f); +void wlan_mgmt_encode_assocresp(wlan_fr_assocresp_t *f); +void wlan_mgmt_decode_assocresp(wlan_fr_assocresp_t *f); +void wlan_mgmt_encode_reassocreq(wlan_fr_reassocreq_t *f); +void wlan_mgmt_decode_reassocreq(wlan_fr_reassocreq_t *f); +void wlan_mgmt_encode_reassocresp(wlan_fr_reassocresp_t *f); +void wlan_mgmt_decode_reassocresp(wlan_fr_reassocresp_t *f); +void wlan_mgmt_encode_probereq(wlan_fr_probereq_t *f); +void wlan_mgmt_decode_probereq(wlan_fr_probereq_t *f); +void wlan_mgmt_encode_proberesp(wlan_fr_proberesp_t *f); +void wlan_mgmt_decode_proberesp(wlan_fr_proberesp_t *f); +void wlan_mgmt_encode_authen(wlan_fr_authen_t *f); +void wlan_mgmt_decode_authen(wlan_fr_authen_t *f); +void wlan_mgmt_encode_deauthen(wlan_fr_deauthen_t *f); +void wlan_mgmt_decode_deauthen(wlan_fr_deauthen_t *f); #endif /* _P80211MGMT_H */ diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c index 22424c8903ee..763ab1187a1c 100644 --- a/drivers/staging/wlan-ng/p80211netdev.c +++ b/drivers/staging/wlan-ng/p80211netdev.c @@ -586,7 +586,8 @@ static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd) } /* Allocate a buf of size req->len */ - if ((msgbuf = kmalloc(req->len, GFP_KERNEL))) { + msgbuf = kmalloc(req->len, GFP_KERNEL); + if (msgbuf) { if (copy_from_user(msgbuf, (void __user *)req->data, req->len)) result = -EFAULT; else @@ -646,7 +647,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr) /* Set up some convenience pointers. */ mibattr = &dot11req.mibattribute; - macaddr = (p80211item_pstr6_t *) & mibattr->data; + macaddr = (p80211item_pstr6_t *) &mibattr->data; resultcode = &dot11req.resultcode; /* Set up a dot11req_mibset */ @@ -674,7 +675,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr) resultcode->data = 0; /* now fire the request */ - result = p80211req_dorequest(dev->ml_priv, (u8 *) & dot11req); + result = p80211req_dorequest(dev->ml_priv, (u8 *) &dot11req); /* If the request wasn't successful, report an error and don't * change the netdev address diff --git a/drivers/staging/wlan-ng/p80211netdev.h b/drivers/staging/wlan-ng/p80211netdev.h index 8bd9dfb3b9b4..3c8c64800567 100644 --- a/drivers/staging/wlan-ng/p80211netdev.h +++ b/drivers/staging/wlan-ng/p80211netdev.h @@ -179,16 +179,16 @@ typedef struct wlandevice { unsigned int ethconv; /* device methods (init by MSD, used by p80211 */ - int (*open) (struct wlandevice * wlandev); - int (*close) (struct wlandevice * wlandev); - void (*reset) (struct wlandevice * wlandev); - int (*txframe) (struct wlandevice * wlandev, struct sk_buff * skb, - p80211_hdr_t * p80211_hdr, - p80211_metawep_t * p80211_wep); - int (*mlmerequest) (struct wlandevice * wlandev, p80211msg_t * msg); - int (*set_multicast_list) (struct wlandevice * wlandev, - netdevice_t * dev); - void (*tx_timeout) (struct wlandevice * wlandev); + int (*open) (struct wlandevice *wlandev); + int (*close) (struct wlandevice *wlandev); + void (*reset) (struct wlandevice *wlandev); + int (*txframe) (struct wlandevice *wlandev, struct sk_buff *skb, + p80211_hdr_t *p80211_hdr, + p80211_metawep_t *p80211_wep); + int (*mlmerequest) (struct wlandevice *wlandev, p80211msg_t *msg); + int (*set_multicast_list) (struct wlandevice *wlandev, + netdevice_t *dev); + void (*tx_timeout) (struct wlandevice *wlandev); /* 802.11 State */ u8 bssid[WLAN_BSSID_LEN]; @@ -227,16 +227,16 @@ typedef struct wlandevice { } wlandevice_t; /* WEP stuff */ -int wep_change_key(wlandevice_t * wlandev, int keynum, u8 * key, int keylen); -int wep_decrypt(wlandevice_t * wlandev, u8 * buf, u32 len, int key_override, - u8 * iv, u8 * icv); -int wep_encrypt(wlandevice_t * wlandev, u8 * buf, u8 * dst, u32 len, int keynum, - u8 * iv, u8 * icv); +int wep_change_key(wlandevice_t *wlandev, int keynum, u8 *key, int keylen); +int wep_decrypt(wlandevice_t *wlandev, u8 *buf, u32 len, int key_override, + u8 *iv, u8 *icv); +int wep_encrypt(wlandevice_t *wlandev, u8 *buf, u8 *dst, u32 len, int keynum, + u8 *iv, u8 *icv); -int wlan_setup(wlandevice_t * wlandev); -int wlan_unsetup(wlandevice_t * wlandev); -int register_wlandev(wlandevice_t * wlandev); -int unregister_wlandev(wlandevice_t * wlandev); -void p80211netdev_rx(wlandevice_t * wlandev, struct sk_buff *skb); -void p80211netdev_hwremoved(wlandevice_t * wlandev); +int wlan_setup(wlandevice_t *wlandev); +int wlan_unsetup(wlandevice_t *wlandev); +int register_wlandev(wlandevice_t *wlandev); +int unregister_wlandev(wlandevice_t *wlandev); +void p80211netdev_rx(wlandevice_t *wlandev, struct sk_buff *skb); +void p80211netdev_hwremoved(wlandevice_t *wlandev); #endif diff --git a/drivers/staging/wlan-ng/p80211req.c b/drivers/staging/wlan-ng/p80211req.c index c88156cdf681..c2e95f166828 100644 --- a/drivers/staging/wlan-ng/p80211req.c +++ b/drivers/staging/wlan-ng/p80211req.c @@ -94,7 +94,7 @@ static int p80211req_mibset_mibget(wlandevice_t *wlandev, * Potentially blocks the caller, so it's a good idea to * not call this function from an interrupt context. ----------------------------------------------------------------*/ -int p80211req_dorequest(wlandevice_t * wlandev, u8 * msgbuf) +int p80211req_dorequest(wlandevice_t *wlandev, u8 *msgbuf) { int result = 0; p80211msg_t *msg = (p80211msg_t *) msgbuf; diff --git a/drivers/staging/wlan-ng/p80211req.h b/drivers/staging/wlan-ng/p80211req.h index 5d9176762ba7..a95a45a6814d 100644 --- a/drivers/staging/wlan-ng/p80211req.h +++ b/drivers/staging/wlan-ng/p80211req.h @@ -48,6 +48,6 @@ #ifndef _LINUX_P80211REQ_H #define _LINUX_P80211REQ_H -int p80211req_dorequest(wlandevice_t * wlandev, u8 * msgbuf); +int p80211req_dorequest(wlandevice_t *wlandev, u8 *msgbuf); #endif diff --git a/drivers/staging/wlan-ng/p80211types.h b/drivers/staging/wlan-ng/p80211types.h index 2b83ab0c711b..41a99c59c6c5 100644 --- a/drivers/staging/wlan-ng/p80211types.h +++ b/drivers/staging/wlan-ng/p80211types.h @@ -168,12 +168,12 @@ P80211DID_MASK_ISTABLE, \ P80211DID_LSB_ISTABLE) -#define P80211DID_MKID(s,g,i,n,t,a) (P80211DID_MKSECTION(s) | \ - P80211DID_MKGROUP(g) | \ - P80211DID_MKITEM(i) | \ - P80211DID_MKINDEX(n) | \ - P80211DID_MKISTABLE(t) | \ - (a)) +#define P80211DID_MKID(s, g, i, n, t, a) (P80211DID_MKSECTION(s) | \ + P80211DID_MKGROUP(g) | \ + P80211DID_MKITEM(i) | \ + P80211DID_MKINDEX(n) | \ + P80211DID_MKISTABLE(t) | \ + (a)) #define P80211DID_GET(a, m, l) ((((u32)(a)) >> (l)) & (m)) @@ -340,11 +340,11 @@ struct catlistitem; /* metadata items. Some components may choose to use more, */ /* less or different metadata items. */ -typedef void (*p80211_totext_t) (struct catlistitem *, u32 did, u8 * itembuf, +typedef void (*p80211_totext_t) (struct catlistitem *, u32 did, u8 *itembuf, char *textbuf); -typedef void (*p80211_fromtext_t) (struct catlistitem *, u32 did, u8 * itembuf, +typedef void (*p80211_fromtext_t) (struct catlistitem *, u32 did, u8 *itembuf, char *textbuf); -typedef u32(*p80211_valid_t) (struct catlistitem *, u32 did, u8 * itembuf); +typedef u32(*p80211_valid_t) (struct catlistitem *, u32 did, u8 *itembuf); /*----------------------------------------------------------------*/ /* Enumeration Lists */ diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c index cc4b1ca80d6f..9fb9532c72a7 100644 --- a/drivers/staging/wlan-ng/p80211wext.c +++ b/drivers/staging/wlan-ng/p80211wext.c @@ -138,7 +138,7 @@ static int p80211wext_dorequest(wlandevice_t *wlandev, u32 did, u32 data) mibitem.did = did; mibitem.data = data; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); return result; } @@ -175,7 +175,7 @@ static int p80211wext_autojoin(wlandevice_t *wlandev) memcpy(msg.ssid.data.data, ssid, data.length); msg.ssid.data.len = data.length; - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -212,7 +212,7 @@ struct iw_statistics *p80211wext_get_wireless_stats(netdevice_t *dev) if (wlandev->mlmerequest == NULL) return NULL; - retval = wlandev->mlmerequest(wlandev, (p80211msg_t *) & quality); + retval = wlandev->mlmerequest(wlandev, (p80211msg_t *) &quality); wstats->qual.qual = qual_as_percent(quality.link.data); /* overall link quality */ wstats->qual.level = quality.level.data; /* instant signal level */ @@ -273,7 +273,7 @@ static int p80211wext_giwfreq(netdevice_t *dev, memset(&mibitem, 0, sizeof(mibitem)); mibitem.did = DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -321,7 +321,7 @@ static int p80211wext_siwfreq(netdevice_t *dev, mibitem.data = p80211_mhz_to_channel(freq->m); memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -403,7 +403,7 @@ static int p80211wext_siwmode(netdevice_t *dev, mibitem.did = DIDmib_p2_p2Static_p2CnfPortType; mibitem.data = (*mode == IW_MODE_ADHOC) ? 0 : 1; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) err = -EFAULT; @@ -553,7 +553,8 @@ static int p80211wext_siwencode(netdevice_t *dev, } /* Check the Key index first. */ - if ((i = (erq->flags & IW_ENCODE_INDEX))) { + i = (erq->flags & IW_ENCODE_INDEX); + if (i) { if ((i < 1) || (i > NUM_WEPKEYS)) { err = -EINVAL; @@ -625,7 +626,7 @@ static int p80211wext_siwencode(netdevice_t *dev, msg.msgcode = DIDmsg_dot11req_mibset; memcpy(&msg.mibattribute.data, &pstr, sizeof(pstr)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -733,7 +734,7 @@ static int p80211wext_siwessid(netdevice_t *dev, msg.ssid.data.len = length; pr_debug("autojoin_ssid for %s \n", essid); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); pr_debug("autojoin_ssid %d\n", result); if (result) { @@ -778,7 +779,7 @@ static int p80211wext_giwrate(netdevice_t *dev, memset(&mibitem, 0, sizeof(mibitem)); mibitem.did = DIDmib_p2_p2MAC_p2CurrentTxRate; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -830,7 +831,7 @@ static int p80211wext_giwrts(netdevice_t *dev, memset(&mibitem, 0, sizeof(mibitem)); mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -871,7 +872,7 @@ static int p80211wext_siwrts(netdevice_t *dev, mibitem.data = rts->value; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -897,7 +898,7 @@ static int p80211wext_giwfrag(netdevice_t *dev, mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -940,7 +941,7 @@ static int p80211wext_siwfrag(netdevice_t *dev, mibitem.data = frag->value; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -975,7 +976,7 @@ static int p80211wext_giwretry(netdevice_t *dev, mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11ShortRetryLimit; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -989,7 +990,7 @@ static int p80211wext_giwretry(netdevice_t *dev, mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11LongRetryLimit; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -1004,7 +1005,7 @@ static int p80211wext_giwretry(netdevice_t *dev, DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -1067,7 +1068,7 @@ static int p80211wext_siwretry(netdevice_t *dev, mibitem.data = rrq->value /= 1024; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -1081,7 +1082,7 @@ static int p80211wext_siwretry(netdevice_t *dev, memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -1096,7 +1097,7 @@ static int p80211wext_siwretry(netdevice_t *dev, memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -1134,7 +1135,7 @@ static int p80211wext_siwtxpow(netdevice_t *dev, else mibitem.data = rrq->value; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -1162,7 +1163,7 @@ static int p80211wext_giwtxpow(netdevice_t *dev, DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -1310,7 +1311,7 @@ static int p80211wext_siwscan(netdevice_t *dev, msg.maxchanneltime.data = 250; msg.minchanneltime.data = 200; - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) err = prism2_result2err(msg.resultcode.data); @@ -1429,7 +1430,7 @@ static int p80211wext_giwscan(netdevice_t *dev, msg.msgcode = DIDmsg_dot11req_scan_results; msg.bssindex.data = i; - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if ((result != 0) || (msg.resultcode.data != P80211ENUM_resultcode_success)) { break; @@ -1504,7 +1505,7 @@ static int p80211wext_set_encodeext(struct net_device *dev, memcpy(wlandev->wep_keys[idx], ext->key, ext->key_len); memset(&msg, 0, sizeof(msg)); - pstr = (p80211item_pstr32_t *) & msg.mibattribute.data; + pstr = (p80211item_pstr32_t *) &msg.mibattribute.data; memcpy(pstr->data.data, ext->key, ext->key_len); pstr->data.len = ext->key_len; switch (idx) { @@ -1528,7 +1529,7 @@ static int p80211wext_set_encodeext(struct net_device *dev, break; } msg.msgcode = DIDmsg_dot11req_mibset; - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); pr_debug("result (%d)\n", result); } return result; @@ -1748,7 +1749,7 @@ struct iw_handler_def p80211wext_handler_def = { .get_wireless_stats = p80211wext_get_wireless_stats }; -int p80211wext_event_associated(wlandevice_t * wlandev, int assoc) +int p80211wext_event_associated(wlandevice_t *wlandev, int assoc) { union iwreq_data data; diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c index 5e95c482fb7b..baa20a7c930d 100644 --- a/drivers/staging/wlan-ng/prism2fw.c +++ b/drivers/staging/wlan-ng/prism2fw.c @@ -265,7 +265,7 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev) /* Build the PDA we're going to use. */ if (read_cardpda(&pda, wlandev)) { printk(KERN_ERR "load_cardpda failed, exiting.\n"); - return (1); + return 1; } /* read the card's PRI-SUP */ @@ -287,9 +287,8 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev) /* DIDmsg_dot11req_mibget */ prism2mgmt_mibset_mibget(wlandev, &getmsg); - if (getmsg.resultcode.data != P80211ENUM_resultcode_success) { + if (getmsg.resultcode.data != P80211ENUM_resultcode_success) printk(KERN_ERR "Couldn't fetch PRI-SUP info\n"); - } /* Already in host order */ priid.role = *data++; @@ -302,19 +301,19 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev) result = read_fwfile(rfptr); if (result) { printk(KERN_ERR "Failed to read the data exiting.\n"); - return (1); + return 1; } result = validate_identity(); if (result) { printk(KERN_ERR "Incompatible firmware image.\n"); - return (1); + return 1; } if (startaddr == 0x00000000) { printk(KERN_ERR "Can't RAM download a Flash image!\n"); - return (1); + return 1; } /* Make the image chunks */ @@ -324,20 +323,20 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev) result = plugimage(fchunk, nfchunks, s3plug, ns3plug, &pda); if (result) { printk(KERN_ERR "Failed to plug data.\n"); - return (1); + return 1; } /* Insert any CRCs */ if (crcimage(fchunk, nfchunks, s3crc, ns3crc)) { printk(KERN_ERR "Failed to insert all CRCs\n"); - return (1); + return 1; } /* Write the image */ result = writeimage(wlandev, fchunk, nfchunks); if (result) { printk(KERN_ERR "Failed to ramwrite image data.\n"); - return (1); + return 1; } /* clear any allocated memory */ @@ -435,9 +434,8 @@ void free_chunks(imgchunk_t *fchunk, unsigned int *nfchunks) { int i; for (i = 0; i < *nfchunks; i++) { - if (fchunk[i].data != NULL) { + if (fchunk[i].data != NULL) kfree(fchunk[i].data); - } } *nfchunks = 0; memset(fchunk, 0, sizeof(*fchunk)); @@ -532,7 +530,7 @@ int mkimage(imgchunk_t *clist, unsigned int *ccnt) if (clist[i].data == NULL) { printk(KERN_ERR "failed to allocate image space, exitting.\n"); - return (1); + return 1; } memset(clist[i].data, 0, clist[i].len); pr_debug("chunk[%d]: addr=0x%06x len=%d\n", @@ -546,15 +544,14 @@ int mkimage(imgchunk_t *clist, unsigned int *ccnt) for (j = 0; j < *ccnt; j++) { cstart = clist[j].addr; cend = cstart + clist[j].len - 1; - if (s3start >= cstart && s3end <= cend) { + if (s3start >= cstart && s3end <= cend) break; - } } if (((unsigned int)j) >= (*ccnt)) { printk(KERN_ERR "s3rec(a=0x%06x,l=%d), no chunk match, exiting.\n", s3start, s3data[i].len); - return (1); + return 1; } coffset = s3start - cstart; memcpy(clist[j].data + coffset, s3data[i].data, s3data[i].len); @@ -587,7 +584,7 @@ int mkpdrlist(pda_t *pda) curroff = 0; while (curroff < (HFA384x_PDA_LEN_MAX / 2) && le16_to_cpu(pda16[curroff + 1]) != HFA384x_PDR_END_OF_PDA) { - pda->rec[pda->nrec] = (hfa384x_pdrec_t *) & (pda16[curroff]); + pda->rec[pda->nrec] = (hfa384x_pdrec_t *) &(pda16[curroff]); if (le16_to_cpu(pda->rec[pda->nrec]->code) == HFA384x_PDR_NICID) { memcpy(&nicid, &pda->rec[pda->nrec]->data.nicid, @@ -624,10 +621,10 @@ int mkpdrlist(pda_t *pda) printk(KERN_ERR "no end record found or invalid lengths in " "PDR data, exiting. %x %d\n", curroff, pda->nrec); - return (1); + return 1; } if (le16_to_cpu(pda16[curroff + 1]) == HFA384x_PDR_END_OF_PDA) { - pda->rec[pda->nrec] = (hfa384x_pdrec_t *) & (pda16[curroff]); + pda->rec[pda->nrec] = (hfa384x_pdrec_t *) &(pda16[curroff]); (pda->nrec)++; } return result; @@ -870,7 +867,7 @@ int read_fwfile(const struct ihex_binrec *record) ptr16 = (u16 *) record->data; /* parse what was an S3 srec and put it in the right array */ - switch(addr) { + switch (addr) { case S3ADDR_START: startaddr = *ptr32; pr_debug(" S7 start addr, record=%d " @@ -891,7 +888,7 @@ int read_fwfile(const struct ihex_binrec *record) s3plug[ns3plug].len); ns3plug++; - if ( ns3plug == S3PLUG_MAX ) { + if (ns3plug == S3PLUG_MAX) { printk(KERN_ERR "S3 plugrec limit reached - aborting\n"); return 1; } @@ -908,7 +905,7 @@ int read_fwfile(const struct ihex_binrec *record) s3crc[ns3crc].len, s3crc[ns3crc].dowrite); ns3crc++; - if ( ns3crc == S3CRC_MAX ) { + if (ns3crc == S3CRC_MAX) { printk(KERN_ERR "S3 crcrec limit reached - aborting\n"); return 1; } @@ -922,12 +919,12 @@ int read_fwfile(const struct ihex_binrec *record) rcnt, s3info[ns3info].len, s3info[ns3info].type); - if ( ((s3info[ns3info].len - 1) * sizeof(u16)) > sizeof(s3info[ns3info].info) ) { + if (((s3info[ns3info].len - 1) * sizeof(u16)) > sizeof(s3info[ns3info].info)) { printk(KERN_ERR " S3 inforec length too long - aborting\n"); return 1; } - tmpinfo = (u16*)&(s3info[ns3info].info.version); + tmpinfo = (u16 *)&(s3info[ns3info].info.version); pr_debug(" info="); for (i = 0; i < s3info[ns3info].len - 1; i++) { tmpinfo[i] = *(ptr16 + 2 + i); @@ -936,7 +933,7 @@ int read_fwfile(const struct ihex_binrec *record) pr_debug("\n"); ns3info++; - if ( ns3info == S3INFO_MAX ) { + if (ns3info == S3INFO_MAX) { printk(KERN_ERR "S3 inforec limit reached - aborting\n"); return 1; } @@ -946,7 +943,7 @@ int read_fwfile(const struct ihex_binrec *record) s3data[ns3data].len = len; s3data[ns3data].data = (uint8_t *) record->data; ns3data++; - if ( ns3data == S3DATA_MAX ) { + if (ns3data == S3DATA_MAX) { printk(KERN_ERR "S3 datarec limit reached - aborting\n"); return 1; } @@ -1024,7 +1021,7 @@ int writeimage(wlandevice_t *wlandev, imgchunk_t *fchunk, rstatemsg.enable.data = P80211ENUM_truth_true; rstatemsg.exeaddr.data = startaddr; - msgp = (p80211msg_t *) & rstatemsg; + msgp = (p80211msg_t *) &rstatemsg; result = prism2mgmt_ramdl_state(wlandev, msgp); if (result) { printk(KERN_ERR @@ -1064,7 +1061,7 @@ int writeimage(wlandevice_t *wlandev, imgchunk_t *fchunk, ("Sending xxxdl_write message addr=%06x len=%d.\n", currdaddr, currlen); - msgp = (p80211msg_t *) & rwritemsg; + msgp = (p80211msg_t *) &rwritemsg; result = prism2mgmt_ramdl_write(wlandev, msgp); /* Check the results */ @@ -1091,7 +1088,7 @@ int writeimage(wlandevice_t *wlandev, imgchunk_t *fchunk, rstatemsg.enable.data = P80211ENUM_truth_false; rstatemsg.exeaddr.data = 0; - msgp = (p80211msg_t *) & rstatemsg; + msgp = (p80211msg_t *) &rstatemsg; result = prism2mgmt_ramdl_state(wlandev, msgp); if (result) { printk(KERN_ERR @@ -1162,7 +1159,7 @@ int validate_identity(void) /* SEC compat range */ if ((s3info[i].info.compat.role == 1) && (s3info[i].info.compat.id == 4)) { - + /* FIXME: isn't something missing here? */ } break; @@ -1197,8 +1194,9 @@ int validate_identity(void) pr_debug("Unknown inforec type %d\n", s3info[i].type); } } - // walk through + /* walk through */ - if (trump && (result != 2)) result = 0; + if (trump && (result != 2)) + result = 0; return result; } diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c index 9f7d96cae8e3..eb7469eaf4b1 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.c +++ b/drivers/staging/wlan-ng/prism2mgmt.c @@ -541,7 +541,7 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp) /*** STATION ***/ /* Set the REQUIRED config items */ /* SSID */ - pstr = (p80211pstrd_t *) & (msg->ssid.data); + pstr = (p80211pstrd_t *) &(msg->ssid.data); prism2mgmt_pstr2bytestr(p2bytestr, pstr); result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFOWNSSID, bytebuf, HFA384x_RID_CNFOWNSSID_LEN); @@ -1034,7 +1034,7 @@ int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp) /* Set the ssid */ memset(bytebuf, 0, 256); - pstr = (p80211pstrd_t *) & (msg->ssid.data); + pstr = (p80211pstrd_t *) &(msg->ssid.data); prism2mgmt_pstr2bytestr(p2bytestr, pstr); result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFDESIREDSSID, bytebuf, diff --git a/drivers/staging/wlan-ng/prism2mgmt.h b/drivers/staging/wlan-ng/prism2mgmt.h index bdf2b3e03253..07eecebeb6cc 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.h +++ b/drivers/staging/wlan-ng/prism2mgmt.h @@ -63,43 +63,43 @@ extern int prism2_reset_holdtime; extern int prism2_reset_settletime; -u32 prism2sta_ifstate(wlandevice_t * wlandev, u32 ifstate); +u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate); -void prism2sta_ev_info(wlandevice_t * wlandev, hfa384x_InfFrame_t * inf); -void prism2sta_ev_txexc(wlandevice_t * wlandev, u16 status); -void prism2sta_ev_tx(wlandevice_t * wlandev, u16 status); -void prism2sta_ev_rx(wlandevice_t * wlandev, struct sk_buff *skb); -void prism2sta_ev_alloc(wlandevice_t * wlandev); +void prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf); +void prism2sta_ev_txexc(wlandevice_t *wlandev, u16 status); +void prism2sta_ev_tx(wlandevice_t *wlandev, u16 status); +void prism2sta_ev_rx(wlandevice_t *wlandev, struct sk_buff *skb); +void prism2sta_ev_alloc(wlandevice_t *wlandev); -int prism2mgmt_mibset_mibget(wlandevice_t * wlandev, void *msgp); -int prism2mgmt_scan(wlandevice_t * wlandev, void *msgp); -int prism2mgmt_scan_results(wlandevice_t * wlandev, void *msgp); -int prism2mgmt_start(wlandevice_t * wlandev, void *msgp); -int prism2mgmt_wlansniff(wlandevice_t * wlandev, void *msgp); -int prism2mgmt_readpda(wlandevice_t * wlandev, void *msgp); -int prism2mgmt_ramdl_state(wlandevice_t * wlandev, void *msgp); -int prism2mgmt_ramdl_write(wlandevice_t * wlandev, void *msgp); -int prism2mgmt_flashdl_state(wlandevice_t * wlandev, void *msgp); -int prism2mgmt_flashdl_write(wlandevice_t * wlandev, void *msgp); -int prism2mgmt_autojoin(wlandevice_t * wlandev, void *msgp); +int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp); +int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp); +int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp); +int prism2mgmt_start(wlandevice_t *wlandev, void *msgp); +int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp); +int prism2mgmt_readpda(wlandevice_t *wlandev, void *msgp); +int prism2mgmt_ramdl_state(wlandevice_t *wlandev, void *msgp); +int prism2mgmt_ramdl_write(wlandevice_t *wlandev, void *msgp); +int prism2mgmt_flashdl_state(wlandevice_t *wlandev, void *msgp); +int prism2mgmt_flashdl_write(wlandevice_t *wlandev, void *msgp); +int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp); /*--------------------------------------------------------------- * conversion functions going between wlan message data types and * Prism2 data types ---------------------------------------------------------------*/ /* byte area conversion functions*/ -void prism2mgmt_pstr2bytearea(u8 * bytearea, p80211pstrd_t * pstr); -void prism2mgmt_bytearea2pstr(u8 * bytearea, p80211pstrd_t * pstr, int len); +void prism2mgmt_pstr2bytearea(u8 *bytearea, p80211pstrd_t *pstr); +void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len); /* byte string conversion functions*/ -void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t * bytestr, p80211pstrd_t * pstr); -void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t * bytestr, p80211pstrd_t * pstr); +void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr); +void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr); /* functions to convert Group Addresses */ -void prism2mgmt_get_grpaddr(u32 did, p80211pstrd_t * pstr, hfa384x_t * priv); +void prism2mgmt_get_grpaddr(u32 did, p80211pstrd_t *pstr, hfa384x_t *priv); int prism2mgmt_set_grpaddr(u32 did, - u8 * prism2buf, p80211pstrd_t * pstr, - hfa384x_t * priv); + u8 *prism2buf, p80211pstrd_t *pstr, + hfa384x_t *priv); int prism2mgmt_get_grpaddr_index(u32 did); void prism2sta_processing_defer(struct work_struct *data); diff --git a/drivers/staging/wlan-ng/prism2mib.c b/drivers/staging/wlan-ng/prism2mib.c index 2fff0a110bcb..10b671e973a5 100644 --- a/drivers/staging/wlan-ng/prism2mib.c +++ b/drivers/staging/wlan-ng/prism2mib.c @@ -114,7 +114,7 @@ static int prism2mib_flag(mibrec_t *mib, static int prism2mib_wepdefaultkey(mibrec_t *mib, int isget, - wlandevice_t * wlandev, + wlandevice_t *wlandev, hfa384x_t *hw, p80211msg_dot11req_mibset_t *msg, void *data); @@ -726,7 +726,7 @@ static int prism2mib_priv(mibrec_t *mib, if (isget) { hfa384x_drvr_getconfig(hw, HFA384x_RID_CNFWPADATA, - (u8 *) & wpa, + (u8 *) &wpa, sizeof(wpa)); pstr->len = le16_to_cpu(wpa.datalen); memcpy(pstr->data, wpa.data, pstr->len); @@ -737,7 +737,7 @@ static int prism2mib_priv(mibrec_t *mib, result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFWPADATA, - (u8 *) & wpa, + (u8 *) &wpa, sizeof(wpa)); } break; diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index 50f301d65212..2da405490c65 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -1023,13 +1023,13 @@ static void prism2sta_inf_tallies(wlandevice_t *wlandev, cnt = sizeof(hfa384x_CommTallies32_t) / sizeof(u32); if (inf->framelen > 22) { - dst = (u32 *) & hw->tallies; - src32 = (u32 *) & inf->info.commtallies32; + dst = (u32 *) &hw->tallies; + src32 = (u32 *) &inf->info.commtallies32; for (i = 0; i < cnt; i++, dst++, src32++) *dst += le32_to_cpu(*src32); } else { - dst = (u32 *) & hw->tallies; - src16 = (u16 *) & inf->info.commtallies16; + dst = (u32 *) &hw->tallies; + src16 = (u16 *) &inf->info.commtallies16; for (i = 0; i < cnt; i++, dst++, src16++) *dst += le16_to_cpu(*src16); } @@ -1280,7 +1280,7 @@ void prism2sta_processing_defer(struct work_struct *data) HFA384x_RID_CURRENTSSID, result); goto failed; } - prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) & ssid, + prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) &ssid, (p80211pstrd_t *) & wlandev->ssid); @@ -1368,8 +1368,8 @@ void prism2sta_processing_defer(struct work_struct *data) HFA384x_RID_CURRENTSSID, result); goto failed; } - prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) & ssid, - (p80211pstrd_t *) & wlandev->ssid); + prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) &ssid, + (p80211pstrd_t *) &wlandev->ssid); hw->link_status = HFA384x_LINK_CONNECTED; netif_carrier_on(wlandev->netdev); @@ -2028,8 +2028,8 @@ void prism2sta_commsqual_defer(struct work_struct *data) HFA384x_RID_CURRENTSSID, result); goto done; } - prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) & ssid, - (p80211pstrd_t *) & wlandev->ssid); + prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) &ssid, + (p80211pstrd_t *) &wlandev->ssid); /* Reschedule timer */ mod_timer(&hw->commsqual_timer, jiffies + HZ); From b1b7621b08e49638aa65b5f67cdd35478f00a4c4 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Sun, 14 Feb 2010 21:55:16 -0600 Subject: [PATCH 273/367] staging: r8187se: Remove write_phy routine Remove a routine that is not used. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8187se/r8180_core.c | 37 -------------------------- 1 file changed, 37 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index 0b7ec6b949b4..5d0bffc27f7c 100644 --- a/drivers/staging/rtl8187se/r8180_core.c +++ b/drivers/staging/rtl8187se/r8180_core.c @@ -3165,43 +3165,6 @@ void write_phy_cck (struct net_device *dev, u8 adr, u32 data) rtl8185_write_phy(dev, adr, data | 0x10000); } -/* 70*3 = 210 ms - * I hope this is enougth - */ -#define MAX_PHY 70 -void write_phy(struct net_device *dev, u8 adr, u8 data) -{ - u32 phy; - int i; - - phy = 0xff0000; - phy |= adr; - phy |= 0x80; /* this should enable writing */ - phy |= (data<<8); - - //PHY_ADR, PHY_R and PHY_W are contig and treated as one dword - write_nic_dword(dev,PHY_ADR, phy); - - phy= 0xffff00; - phy |= adr; - - write_nic_dword(dev,PHY_ADR, phy); - for(i=0;i> 16; - if(phy == data){ //SUCCESS! - force_pci_posting(dev); - mdelay(3); //random value - return; - }else{ - force_pci_posting(dev); - mdelay(3); //random value - } - } - DMESGW ("Phy writing %x %x failed!", adr,data); -} - void rtl8185_set_rate(struct net_device *dev) { int i; From 8daba6b94dce76254b10de0a9a777f792a120322 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Sun, 14 Feb 2010 22:04:56 -0600 Subject: [PATCH 274/367] Staging: r8187se: Remove two private variables that have a fixed value For the RTL8187SE, the variable priv->rf_chip is always RF_ZEBRA4 and priv->RegThreeWireMode is always HW_THREE_WIRE_SI. Remove these 2 variables. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8187se/r8180.h | 4 - drivers/staging/rtl8187se/r8180_core.c | 90 ----- drivers/staging/rtl8187se/r8180_dm.c | 65 +--- drivers/staging/rtl8187se/r8180_rtl8225z2.c | 236 ++++++------ drivers/staging/rtl8187se/r8185b_init.c | 378 +++++--------------- 5 files changed, 198 insertions(+), 575 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180.h b/drivers/staging/rtl8187se/r8180.h index ce828885b64f..d15bdf64efd0 100644 --- a/drivers/staging/rtl8187se/r8180.h +++ b/drivers/staging/rtl8187se/r8180.h @@ -366,7 +366,6 @@ typedef struct r8180_priv short diversity; u8 cs_treshold; short rcr_csense; - short rf_chip; u32 key0[4]; short (*rf_set_sens)(struct net_device *dev,short sens); void (*rf_set_chan)(struct net_device *dev,short ch); @@ -479,9 +478,6 @@ typedef struct r8180_priv u8 retry_rts; u16 rts; -//add for RF power on power off by lizhaoming 080512 - u8 RegThreeWireMode; // See "Three wire mode" defined above, 2006.05.31, by rcnjko. - //by amy for led LED_STRATEGY_8185 LedStrategy; //by amy for led diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index 5d0bffc27f7c..b49eed81debc 100644 --- a/drivers/staging/rtl8187se/r8180_core.c +++ b/drivers/staging/rtl8187se/r8180_core.c @@ -663,11 +663,8 @@ unsigned char STRENGTH_MAP[] = { void rtl8180_RSSI_calc(struct net_device *dev, u8 *rssi, u8 *qual) { - struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); u32 temp; u32 temp2; - u32 temp3; - u32 lsb; u32 q; u32 orig_qual; u8 _rssi; @@ -689,88 +686,6 @@ void rtl8180_RSSI_calc(struct net_device *dev, u8 *rssi, u8 *qual) *qual = temp; temp2 = *rssi; - switch(priv->rf_chip){ - case RFCHIPID_RFMD: - lsb = temp2 & 1; - temp2 &= 0x7e; - if ( !lsb || !(temp2 <= 0x3c) ) { - temp2 = 0x64; - } else { - temp2 = 100 * temp2 / 0x3c; - } - *rssi = temp2 & 0xff; - _rssi = temp2 & 0xff; - break; - case RFCHIPID_INTERSIL: - lsb = temp2; - temp2 &= 0xfffffffe; - temp2 *= 251; - temp3 = temp2; - temp2 <<= 6; - temp3 += temp2; - temp3 <<= 1; - temp2 = 0x4950df; - temp2 -= temp3; - lsb &= 1; - if ( temp2 <= 0x3e0000 ) { - if ( temp2 < 0xffef0000 ) - temp2 = 0xffef0000; - } else { - temp2 = 0x3e0000; - } - if ( !lsb ) { - temp2 -= 0xf0000; - } else { - temp2 += 0xf0000; - } - - temp3 = 0x4d0000; - temp3 -= temp2; - temp3 *= 100; - temp3 = temp3 / 0x6d; - temp3 >>= 0x10; - _rssi = temp3 & 0xff; - *rssi = temp3 & 0xff; - break; - case RFCHIPID_GCT: - lsb = temp2 & 1; - temp2 &= 0x7e; - if ( ! lsb || !(temp2 <= 0x3c) ){ - temp2 = 0x64; - } else { - temp2 = (100 * temp2) / 0x3c; - } - *rssi = temp2 & 0xff; - _rssi = temp2 & 0xff; - break; - case RFCHIPID_PHILIPS: - if( orig_qual <= 0x4e ){ - _rssi = STRENGTH_MAP[orig_qual]; - *rssi = _rssi; - } else { - orig_qual -= 0x80; - if ( !orig_qual ){ - _rssi = 1; - *rssi = 1; - } else { - _rssi = 0x32; - *rssi = 0x32; - } - } - break; - case RFCHIPID_MAXIM: - lsb = temp2 & 1; - temp2 &= 0x7e; - temp2 >>= 1; - temp2 += 0x42; - if( lsb != 0 ){ - temp2 += 0xa; - } - *rssi = temp2 & 0xff; - _rssi = temp2 & 0xff; - break; - } - if ( _rssi < 0x64 ){ if ( _rssi == 0 ) { *rssi = 1; @@ -2707,8 +2622,6 @@ short rtl8180_init(struct net_device *dev) priv->txbeaconcount = 2; priv->rx_skb_complete = 1; - priv->RegThreeWireMode = HW_THREE_WIRE_SI; - priv->RFChangeInProgress = false; priv->SetRFPowerStateInProgress = false; priv->RFProgType = 0; @@ -2999,9 +2912,6 @@ short rtl8180_init(struct net_device *dev) priv->cs_treshold = (eeprom_val & 0xff00) >> 8; eeprom_93cx6_read(&eeprom, RFCHIPID, &eeprom_val); - priv->rf_chip = 0xff & eeprom_val; - - priv->rf_chip = RF_ZEBRA4; priv->rf_sleep = rtl8225z4_rf_sleep; priv->rf_wakeup = rtl8225z4_rf_wakeup; DMESGW("**PLEASE** REPORT SUCCESSFUL/UNSUCCESSFUL TO Realtek!"); diff --git a/drivers/staging/rtl8187se/r8180_dm.c b/drivers/staging/rtl8187se/r8180_dm.c index cbca58db85e1..fc4907839c58 100644 --- a/drivers/staging/rtl8187se/r8180_dm.c +++ b/drivers/staging/rtl8187se/r8180_dm.c @@ -282,30 +282,13 @@ DIG_Zebra( // Dispatch DIG implementation according to RF. // void -DynamicInitGain( - struct net_device *dev - ) +DynamicInitGain(struct net_device *dev) { - struct r8180_priv *priv = ieee80211_priv(dev); - - switch(priv->rf_chip) - { - case RF_ZEBRA2: // [AnnieWorkaround] For Zebra2, 2005-08-01. - case RF_ZEBRA4: - DIG_Zebra( dev ); - break; - - default: - printk("DynamicInitGain(): unknown RFChipID(%d) !!!\n", priv->rf_chip); - break; - } + DIG_Zebra(dev); } void rtl8180_hw_dig_wq (struct work_struct *work) { -// struct r8180_priv *priv = container_of(work, struct r8180_priv, watch_dog_wq); -// struct ieee80211_device * ieee = (struct ieee80211_device*) -// container_of(work, struct ieee80211_device, watch_dog_wq); struct delayed_work *dwork = to_delayed_work(work); struct ieee80211_device *ieee = container_of(dwork,struct ieee80211_device,hw_dig_wq); struct net_device *dev = ieee->dev; @@ -1310,44 +1293,24 @@ SetAntenna8185( switch(u1bAntennaIndex) { case 0: - switch(priv->rf_chip) - { - case RF_ZEBRA2: - case RF_ZEBRA4: - // Mac register, main antenna - write_nic_byte(dev, ANTSEL, 0x03); - //base band - write_phy_cck(dev,0x11, 0x9b); // Config CCK RX antenna. - write_phy_ofdm(dev, 0x0d, 0x5c); // Config OFDM RX antenna. + /* Mac register, main antenna */ + write_nic_byte(dev, ANTSEL, 0x03); + /* base band */ + write_phy_cck(dev, 0x11, 0x9b); /* Config CCK RX antenna. */ + write_phy_ofdm(dev, 0x0d, 0x5c); /* Config OFDM RX antenna. */ - - bAntennaSwitched = true; - break; - - default: - printk("SetAntenna8185: unknown RFChipID(%d)\n", priv->rf_chip); - break; - } + bAntennaSwitched = true; break; case 1: - switch(priv->rf_chip) - { - case RF_ZEBRA2: - case RF_ZEBRA4: - // Mac register, aux antenna - write_nic_byte(dev, ANTSEL, 0x00); - //base band - write_phy_cck(dev, 0x11, 0xbb); // Config CCK RX antenna. - write_phy_ofdm(dev, 0x0d, 0x54); // Config OFDM RX antenna. + /* Mac register, aux antenna */ + write_nic_byte(dev, ANTSEL, 0x00); + /* base band */ + write_phy_cck(dev, 0x11, 0xbb); /* Config CCK RX antenna. */ + write_phy_ofdm(dev, 0x0d, 0x54); /* Config OFDM RX antenna. */ - bAntennaSwitched = true; - break; + bAntennaSwitched = true; - default: - printk("SetAntenna8185: unknown RFChipID(%d)\n", priv->rf_chip); - break; - } break; default: diff --git a/drivers/staging/rtl8187se/r8180_rtl8225z2.c b/drivers/staging/rtl8187se/r8180_rtl8225z2.c index afe10f0b75a8..6edf5a46fa40 100644 --- a/drivers/staging/rtl8187se/r8180_rtl8225z2.c +++ b/drivers/staging/rtl8187se/r8180_rtl8225z2.c @@ -854,134 +854,48 @@ bool SetZebraRFPowerState8185(struct net_device *dev, btConfig3 = read_nic_byte(dev, CONFIG3); write_nic_byte(dev, CONFIG3, (btConfig3 | CONFIG3_PARM_En)); - switch (priv->rf_chip) { - case RF_ZEBRA2: - switch (eRFPowerState) { - case eRfOn: - RF_WriteReg(dev,0x4,0x9FF); + switch (eRFPowerState) { + case eRfOn: + write_nic_word(dev, 0x37C, 0x00EC); - write_nic_dword(dev, ANAPARAM, ANAPARM_ON); - write_nic_dword(dev, ANAPARAM2, ANAPARM2_ON); + /* turn on AFE */ + write_nic_byte(dev, 0x54, 0x00); + write_nic_byte(dev, 0x62, 0x00); - write_nic_byte(dev, CONFIG4, priv->RFProgType); + /* turn on RF */ + RF_WriteReg(dev, 0x0, 0x009f); udelay(500); + RF_WriteReg(dev, 0x4, 0x0972); udelay(500); - /* turn on CCK and OFDM */ - u1bTmp = read_nic_byte(dev, 0x24E); - write_nic_byte(dev, 0x24E, (u1bTmp & (~(BIT5 | BIT6)))); - break; - case eRfSleep: - break; - case eRfOff: - break; - default: - bResult = false; - break; - } + /* turn on RF again */ + RF_WriteReg(dev, 0x0, 0x009f); udelay(500); + RF_WriteReg(dev, 0x4, 0x0972); udelay(500); + + /* turn on BB */ + write_phy_ofdm(dev, 0x10, 0x40); + write_phy_ofdm(dev, 0x12, 0x40); + + /* Avoid power down at init time. */ + write_nic_byte(dev, CONFIG4, priv->RFProgType); + + u1bTmp = read_nic_byte(dev, 0x24E); + write_nic_byte(dev, 0x24E, (u1bTmp & (~(BIT5 | BIT6)))); break; - case RF_ZEBRA4: - switch (eRFPowerState) { - case eRfOn: - write_nic_word(dev, 0x37C, 0x00EC); - - /* turn on AFE */ - write_nic_byte(dev, 0x54, 0x00); - write_nic_byte(dev, 0x62, 0x00); - - /* turn on RF */ - RF_WriteReg(dev, 0x0, 0x009f); udelay(500); - RF_WriteReg(dev, 0x4, 0x0972); udelay(500); - - /* turn on RF again */ - RF_WriteReg(dev, 0x0, 0x009f); udelay(500); - RF_WriteReg(dev, 0x4, 0x0972); udelay(500); - - /* turn on BB */ - write_phy_ofdm(dev,0x10,0x40); - write_phy_ofdm(dev,0x12,0x40); - - /* Avoid power down at init time. */ - write_nic_byte(dev, CONFIG4, priv->RFProgType); - - u1bTmp = read_nic_byte(dev, 0x24E); - write_nic_byte(dev, 0x24E, (u1bTmp & (~(BIT5 | BIT6)))); - break; - case eRfSleep: - for (QueueID = 0, i = 0; QueueID < 6;) { - if (get_curr_tx_free_desc(dev, QueueID) == priv->txringcount) { - QueueID++; - continue; - } else { - priv->TxPollingTimes ++; - if (priv->TxPollingTimes >= LPS_MAX_SLEEP_WAITING_TIMES_87SE) { - bActionAllowed = false; - break; - } else - udelay(10); - } - } - - if (bActionAllowed) { - /* turn off BB RXIQ matrix to cut off rx signal */ - write_phy_ofdm(dev, 0x10, 0x00); - write_phy_ofdm(dev, 0x12, 0x00); - - /* turn off RF */ - RF_WriteReg(dev, 0x4, 0x0000); - RF_WriteReg(dev, 0x0, 0x0000); - - /* turn off AFE except PLL */ - write_nic_byte(dev, 0x62, 0xff); - write_nic_byte(dev, 0x54, 0xec); - - mdelay(1); - - { - int i = 0; - while (true) { - u8 tmp24F = read_nic_byte(dev, 0x24f); - - if ((tmp24F == 0x01) || (tmp24F == 0x09)) { - bTurnOffBB = true; - break; - } else { - udelay(10); - i++; - priv->TxPollingTimes++; - - if (priv->TxPollingTimes >= LPS_MAX_SLEEP_WAITING_TIMES_87SE) { - bTurnOffBB = false; - break; - } else - udelay(10); - } - } - } - - if (bTurnOffBB) { - /* turn off BB */ - u1bTmp = read_nic_byte(dev, 0x24E); - write_nic_byte(dev, 0x24E, (u1bTmp | BIT5 | BIT6)); - - /* turn off AFE PLL */ - write_nic_byte(dev, 0x54, 0xFC); - write_nic_word(dev, 0x37C, 0x00FC); - } - } - break; - case eRfOff: - for (QueueID = 0, i = 0; QueueID < 6;) { - if (get_curr_tx_free_desc(dev, QueueID) == priv->txringcount) { - QueueID++; - continue; - } else { - udelay(10); - i++; - } - - if (i >= MAX_DOZE_WAITING_TIMES_85B) + case eRfSleep: + for (QueueID = 0, i = 0; QueueID < 6;) { + if (get_curr_tx_free_desc(dev, QueueID) == priv->txringcount) { + QueueID++; + continue; + } else { + priv->TxPollingTimes++; + if (priv->TxPollingTimes >= LPS_MAX_SLEEP_WAITING_TIMES_87SE) { + bActionAllowed = false; break; + } else + udelay(10); } + } + if (bActionAllowed) { /* turn off BB RXIQ matrix to cut off rx signal */ write_phy_ofdm(dev, 0x10, 0x00); write_phy_ofdm(dev, 0x12, 0x00); @@ -998,22 +912,23 @@ bool SetZebraRFPowerState8185(struct net_device *dev, { int i = 0; - - while (true) - { + while (true) { u8 tmp24F = read_nic_byte(dev, 0x24f); if ((tmp24F == 0x01) || (tmp24F == 0x09)) { bTurnOffBB = true; break; } else { - bTurnOffBB = false; udelay(10); i++; - } + priv->TxPollingTimes++; - if (i > MAX_POLLING_24F_TIMES_87SE) - break; + if (priv->TxPollingTimes >= LPS_MAX_SLEEP_WAITING_TIMES_87SE) { + bTurnOffBB = false; + break; + } else + udelay(10); + } } } @@ -1022,15 +937,68 @@ bool SetZebraRFPowerState8185(struct net_device *dev, u1bTmp = read_nic_byte(dev, 0x24E); write_nic_byte(dev, 0x24E, (u1bTmp | BIT5 | BIT6)); - /* turn off AFE PLL (80M) */ + /* turn off AFE PLL */ write_nic_byte(dev, 0x54, 0xFC); write_nic_word(dev, 0x37C, 0x00FC); } - break; - default: - bResult = false; - printk("SetZebraRFPowerState8185(): unknown state to set: 0x%X!!!\n", eRFPowerState); - break; + } + break; + case eRfOff: + for (QueueID = 0, i = 0; QueueID < 6;) { + if (get_curr_tx_free_desc(dev, QueueID) == priv->txringcount) { + QueueID++; + continue; + } else { + udelay(10); + i++; + } + + if (i >= MAX_DOZE_WAITING_TIMES_85B) + break; + } + + /* turn off BB RXIQ matrix to cut off rx signal */ + write_phy_ofdm(dev, 0x10, 0x00); + write_phy_ofdm(dev, 0x12, 0x00); + + /* turn off RF */ + RF_WriteReg(dev, 0x4, 0x0000); + RF_WriteReg(dev, 0x0, 0x0000); + + /* turn off AFE except PLL */ + write_nic_byte(dev, 0x62, 0xff); + write_nic_byte(dev, 0x54, 0xec); + + mdelay(1); + + { + int i = 0; + + while (true) { + u8 tmp24F = read_nic_byte(dev, 0x24f); + + if ((tmp24F == 0x01) || (tmp24F == 0x09)) { + bTurnOffBB = true; + break; + } else { + bTurnOffBB = false; + udelay(10); + i++; + } + + if (i > MAX_POLLING_24F_TIMES_87SE) + break; + } + } + + if (bTurnOffBB) { + /* turn off BB */ + u1bTmp = read_nic_byte(dev, 0x24E); + write_nic_byte(dev, 0x24E, (u1bTmp | BIT5 | BIT6)); + + /* turn off AFE PLL (80M) */ + write_nic_byte(dev, 0x54, 0xFC); + write_nic_word(dev, 0x37C, 0x00FC); } break; } diff --git a/drivers/staging/rtl8187se/r8185b_init.c b/drivers/staging/rtl8187se/r8185b_init.c index 50309f2da9c1..19b5c9f90b51 100644 --- a/drivers/staging/rtl8187se/r8185b_init.c +++ b/drivers/staging/rtl8187se/r8185b_init.c @@ -238,22 +238,9 @@ PlatformIORead4Byte( return data; } -void -SetOutputEnableOfRfPins( - struct net_device *dev - ) +void SetOutputEnableOfRfPins(struct net_device *dev) { - struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); - - switch(priv->rf_chip) - { - case RFCHIPID_RTL8225: - case RF_ZEBRA2: - case RF_ZEBRA4: - write_nic_word(dev, RFPinsEnable, 0x1bff); - //write_nic_word(dev, RFPinsEnable, 0x1fff); - break; - } + write_nic_word(dev, RFPinsEnable, 0x1bff); } void @@ -603,111 +590,27 @@ HwThreeWire( void -RF_WriteReg( - struct net_device *dev, - u8 offset, - u32 data - ) +RF_WriteReg(struct net_device *dev, u8 offset, u32 data) { - //RFReg reg; - u32 data2Write; - u8 len; - u8 low2high; - //u32 RF_Read = 0; - struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); + u32 data2Write; + u8 len; + /* Pure HW 3-wire. */ + data2Write = (data << 4) | (u32)(offset & 0x0f); + len = 16; - switch(priv->rf_chip) - { - case RFCHIPID_RTL8225: - case RF_ZEBRA2: // Annie 2006-05-12. - case RF_ZEBRA4: //by amy - switch(priv->RegThreeWireMode) - { - case SW_THREE_WIRE: - { // Perform SW 3-wire programming by driver. - data2Write = (data << 4) | (u32)(offset & 0x0f); - len = 16; - low2high = 0; - ZEBRA_RFSerialWrite(dev, data2Write, len, low2high); - } - break; - - case HW_THREE_WIRE: - { // Pure HW 3-wire. - data2Write = (data << 4) | (u32)(offset & 0x0f); - len = 16; - HwThreeWire( - dev, - (u8 *)(&data2Write), // pDataBuf, - len, // nDataBufBitCnt, - 0, // bHold, - 1); // bWrite - } - break; - case HW_THREE_WIRE_PI: //Parallel Interface - { // Pure HW 3-wire. - data2Write = (data << 4) | (u32)(offset & 0x0f); - len = 16; - HwHSSIThreeWire( - dev, - (u8*)(&data2Write), // pDataBuf, - len, // nDataBufBitCnt, - 0, // bSI - 1); // bWrite - - //printk("33333\n"); - } - break; - - case HW_THREE_WIRE_SI: //Serial Interface - { // Pure HW 3-wire. - data2Write = (data << 4) | (u32)(offset & 0x0f); - len = 16; -// printk(" enter ZEBRA_RFSerialWrite\n "); -// low2high = 0; -// ZEBRA_RFSerialWrite(dev, data2Write, len, low2high); - - HwHSSIThreeWire( - dev, - (u8*)(&data2Write), // pDataBuf, - len, // nDataBufBitCnt, - 1, // bSI - 1); // bWrite - -// printk(" exit ZEBRA_RFSerialWrite\n "); - } - break; - - - default: - DMESGE("RF_WriteReg(): invalid RegThreeWireMode(%d) !!!", priv->RegThreeWireMode); - break; - } - break; - - default: - DMESGE("RF_WriteReg(): unknown RFChipID: %#X", priv->rf_chip); - break; - } + HwHSSIThreeWire(dev, (u8 *)(&data2Write), len, 1, 1); } - void -ZEBRA_RFSerialRead( - struct net_device *dev, - u32 data2Write, - u8 wLength, - u32 *data2Read, - u8 rLength, - u8 low2high - ) +ZEBRA_RFSerialRead(struct net_device *dev, u32 data2Write, u8 wLength, + u32 *data2Read, u8 rLength, u8 low2high) { ThreeWireReg twreg; - int i; - u16 oval,oval2,oval3,tmp, wReg80; - u32 mask; - u8 u1bTmp; + int i; + u16 oval, oval2, oval3, tmp, wReg80; + u32 mask; + u8 u1bTmp; ThreeWireReg tdata; //PHAL_DATA_8187 pHalData = GetHalData8187(pAdapter); { // RTL8187S HSSI Read/Write Function @@ -818,71 +721,16 @@ ZEBRA_RFSerialRead( } -u32 -RF_ReadReg( - struct net_device *dev, - u8 offset - ) +u32 RF_ReadReg(struct net_device *dev, u8 offset) { - struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); - u32 data2Write; - u8 wlen; - u8 rlen; - u8 low2high; - u32 dataRead; + u32 data2Write; + u8 wlen; + u32 dataRead; - switch(priv->rf_chip) - { - case RFCHIPID_RTL8225: - case RF_ZEBRA2: - case RF_ZEBRA4: - switch(priv->RegThreeWireMode) - { - case HW_THREE_WIRE_PI: // For 87S Parallel Interface. - { - data2Write = ((u32)(offset&0x0f)); - wlen=16; - HwHSSIThreeWire( - dev, - (u8*)(&data2Write), // pDataBuf, - wlen, // nDataBufBitCnt, - 0, // bSI - 0); // bWrite - dataRead= data2Write; - } - break; - - case HW_THREE_WIRE_SI: // For 87S Serial Interface. - { - data2Write = ((u32)(offset&0x0f)) ; - wlen=16; - HwHSSIThreeWire( - dev, - (u8*)(&data2Write), // pDataBuf, - wlen, // nDataBufBitCnt, - 1, // bSI - 0 // bWrite - ); - dataRead= data2Write; - } - break; - - // Perform SW 3-wire programming by driver. - default: - { - data2Write = ((u32)(offset&0x1f)) << 27; // For Zebra E-cut. 2005.04.11, by rcnjko. - wlen = 6; - rlen = 12; - low2high = 0; - ZEBRA_RFSerialRead(dev, data2Write, wlen,&dataRead,rlen, low2high); - } - break; - } - break; - default: - dataRead = 0; - break; - } + data2Write = ((u32)(offset & 0x0f)); + wlen = 16; + HwHSSIThreeWire(dev, (u8 *)(&data2Write), wlen, 1, 0); + dataRead = data2Write; return dataRead; } @@ -1291,81 +1139,59 @@ UpdateInitialGain( return; } - switch(priv->rf_chip) - { - case RF_ZEBRA4: - // Dynamic set initial gain, follow 87B - switch(priv->InitialGain) - { - case 1: //m861dBm - //DMESG("RTL8187 + 8225 Initial Gain State 1: -82 dBm \n"); - write_phy_ofdm(dev, 0x17, 0x26); mdelay(1); - write_phy_ofdm(dev, 0x24, 0x86); mdelay(1); - write_phy_ofdm(dev, 0x05, 0xfa); mdelay(1); - break; - - case 2: //m862dBm - //DMESG("RTL8187 + 8225 Initial Gain State 2: -82 dBm \n"); - write_phy_ofdm(dev, 0x17, 0x36); mdelay(1); - write_phy_ofdm(dev, 0x24, 0x86); mdelay(1); - write_phy_ofdm(dev, 0x05, 0xfa); mdelay(1); - break; - - case 3: //m863dBm - //DMESG("RTL8187 + 8225 Initial Gain State 3: -82 dBm \n"); - write_phy_ofdm(dev, 0x17, 0x36); mdelay(1); - write_phy_ofdm(dev, 0x24, 0x86); mdelay(1); - write_phy_ofdm(dev, 0x05, 0xfb); mdelay(1); - break; - - case 4: //m864dBm - //DMESG("RTL8187 + 8225 Initial Gain State 4: -78 dBm \n"); - write_phy_ofdm(dev, 0x17, 0x46); mdelay(1); - write_phy_ofdm(dev, 0x24, 0x86); mdelay(1); - write_phy_ofdm(dev, 0x05, 0xfb); mdelay(1); - break; - - case 5: //m82dBm - //DMESG("RTL8187 + 8225 Initial Gain State 5: -74 dBm \n"); - write_phy_ofdm(dev, 0x17, 0x46); mdelay(1); - write_phy_ofdm(dev, 0x24, 0x96); mdelay(1); - write_phy_ofdm(dev, 0x05, 0xfb); mdelay(1); - break; - - case 6: //m78dBm - //DMESG ("RTL8187 + 8225 Initial Gain State 6: -70 dBm \n"); - write_phy_ofdm(dev, 0x17, 0x56); mdelay(1); - write_phy_ofdm(dev, 0x24, 0x96); mdelay(1); - write_phy_ofdm(dev, 0x05, 0xfc); mdelay(1); - break; - - case 7: //m74dBm - //DMESG("RTL8187 + 8225 Initial Gain State 7: -66 dBm \n"); - write_phy_ofdm(dev, 0x17, 0x56); mdelay(1); - write_phy_ofdm(dev, 0x24, 0xa6); mdelay(1); - write_phy_ofdm(dev, 0x05, 0xfc); mdelay(1); - break; - - case 8: - //DMESG("RTL8187 + 8225 Initial Gain State 8:\n"); - write_phy_ofdm(dev, 0x17, 0x66); mdelay(1); - write_phy_ofdm(dev, 0x24, 0xb6); mdelay(1); - write_phy_ofdm(dev, 0x05, 0xfc); mdelay(1); - break; - - - default: //MP - //DMESG("RTL8187 + 8225 Initial Gain State 1: -82 dBm (default)\n"); - write_phy_ofdm(dev, 0x17, 0x26); mdelay(1); - write_phy_ofdm(dev, 0x24, 0x86); mdelay(1); - write_phy_ofdm(dev, 0x05, 0xfa); mdelay(1); - break; - } + switch (priv->InitialGain) { + case 1: /* m861dBm */ + write_phy_ofdm(dev, 0x17, 0x26); mdelay(1); + write_phy_ofdm(dev, 0x24, 0x86); mdelay(1); + write_phy_ofdm(dev, 0x05, 0xfa); mdelay(1); break; + case 2: /* m862dBm */ + write_phy_ofdm(dev, 0x17, 0x36); mdelay(1); + write_phy_ofdm(dev, 0x24, 0x86); mdelay(1); + write_phy_ofdm(dev, 0x05, 0xfa); mdelay(1); + break; - default: - DMESG("UpdateInitialGain(): unknown RFChipID: %#X\n", priv->rf_chip); + case 3: /* m863dBm */ + write_phy_ofdm(dev, 0x17, 0x36); mdelay(1); + write_phy_ofdm(dev, 0x24, 0x86); mdelay(1); + write_phy_ofdm(dev, 0x05, 0xfb); mdelay(1); + break; + + case 4: /* m864dBm */ + write_phy_ofdm(dev, 0x17, 0x46); mdelay(1); + write_phy_ofdm(dev, 0x24, 0x86); mdelay(1); + write_phy_ofdm(dev, 0x05, 0xfb); mdelay(1); + break; + + case 5: /* m82dBm */ + write_phy_ofdm(dev, 0x17, 0x46); mdelay(1); + write_phy_ofdm(dev, 0x24, 0x96); mdelay(1); + write_phy_ofdm(dev, 0x05, 0xfb); mdelay(1); + break; + + case 6: /* m78dBm */ + write_phy_ofdm(dev, 0x17, 0x56); mdelay(1); + write_phy_ofdm(dev, 0x24, 0x96); mdelay(1); + write_phy_ofdm(dev, 0x05, 0xfc); mdelay(1); + break; + + case 7: /* m74dBm */ + write_phy_ofdm(dev, 0x17, 0x56); mdelay(1); + write_phy_ofdm(dev, 0x24, 0xa6); mdelay(1); + write_phy_ofdm(dev, 0x05, 0xfc); mdelay(1); + break; + + case 8: + write_phy_ofdm(dev, 0x17, 0x66); mdelay(1); + write_phy_ofdm(dev, 0x24, 0xb6); mdelay(1); + write_phy_ofdm(dev, 0x05, 0xfc); mdelay(1); + break; + + default: /* MP */ + write_phy_ofdm(dev, 0x17, 0x26); mdelay(1); + write_phy_ofdm(dev, 0x24, 0x86); mdelay(1); + write_phy_ofdm(dev, 0x05, 0xfa); mdelay(1); break; } } @@ -1397,14 +1223,8 @@ PhyConfig8185( struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); write_nic_dword(dev, RCR, priv->ReceiveConfig); priv->RFProgType = read_nic_byte(dev, CONFIG4) & 0x03; - // RF config - switch(priv->rf_chip) - { - case RF_ZEBRA2: - case RF_ZEBRA4: - ZEBRA_Config_85BASIC_HardCode( dev); - break; - } + /* RF config */ + ZEBRA_Config_85BASIC_HardCode(dev); //{by amy 080312 // Set default initial gain state to 4, approved by SD3 DZ, by Bruce, 2007-06-06. if(priv->bDigMechanism) @@ -1614,19 +1434,8 @@ GetSupportedWirelessMode8185( ) { u8 btSupportedWirelessMode = 0; - struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); - - switch(priv->rf_chip) - { - case RF_ZEBRA2: - case RF_ZEBRA4: - btSupportedWirelessMode = (WIRELESS_MODE_B | WIRELESS_MODE_G); - break; - default: - btSupportedWirelessMode = WIRELESS_MODE_B; - break; - } + btSupportedWirelessMode = (WIRELESS_MODE_B | WIRELESS_MODE_G); return btSupportedWirelessMode; } @@ -1881,23 +1690,11 @@ ActSetWirelessMode8185( } - // 2. Swtich band: RF or BB specific actions, - // for example, refresh tables in omc8255, or change initial gain if necessary. - switch(priv->rf_chip) - { - case RF_ZEBRA2: - case RF_ZEBRA4: - { - // Nothing to do for Zebra to switch band. - // Update current wireless mode if we swtich to specified band successfully. - ieee->mode = (WIRELESS_MODE)btWirelessMode; - } - break; - - default: - DMESGW("ActSetWirelessMode8185(): unsupported RF: 0x%X !!!\n", priv->rf_chip); - break; - } + /* 2. Swtich band: RF or BB specific actions, + * for example, refresh tables in omc8255, or change initial gain if necessary. + * Nothing to do for Zebra to switch band. + * Update current wireless mode if we swtich to specified band successfully. */ + ieee->mode = (WIRELESS_MODE)btWirelessMode; // 3. Change related setting. if( ieee->mode == WIRELESS_MODE_A ){ @@ -2108,18 +1905,7 @@ SetRFPowerState( return bResult; } - switch(priv->rf_chip) - { - case RF_ZEBRA2: - case RF_ZEBRA4: - bResult = SetZebraRFPowerState8185(dev, eRFPowerState); - break; - - default: - printk("SetRFPowerState8185(): unknown RFChipID: 0x%X!!!\n", priv->rf_chip); - break;; -} -// printk("<--------- SetRFPowerState(): bResult(%d)\n", bResult); + bResult = SetZebraRFPowerState8185(dev, eRFPowerState); return bResult; } From cd18964a1d67c4989474ffca0109ef1c0f8502a3 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Sun, 14 Feb 2010 22:07:57 -0600 Subject: [PATCH 275/367] Staging: r8187se: Remove dead code from r8185b_init.c Remove dead code from r8185b_init.c. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8187se/r8185b_init.c | 632 +----------------------- 1 file changed, 2 insertions(+), 630 deletions(-) diff --git a/drivers/staging/rtl8187se/r8185b_init.c b/drivers/staging/rtl8187se/r8185b_init.c index 19b5c9f90b51..a0ece1fd64a5 100644 --- a/drivers/staging/rtl8187se/r8185b_init.c +++ b/drivers/staging/rtl8187se/r8185b_init.c @@ -243,82 +243,7 @@ void SetOutputEnableOfRfPins(struct net_device *dev) write_nic_word(dev, RFPinsEnable, 0x1bff); } -void -ZEBRA_RFSerialWrite( - struct net_device *dev, - u32 data2Write, - u8 totalLength, - u8 low2high - ) -{ - ThreeWireReg twreg; - int i; - u16 oval,oval2,oval3; - u32 mask; - u16 UshortBuffer; - - u8 u1bTmp; - // RTL8187S HSSI Read/Write Function - u1bTmp = read_nic_byte(dev, RF_SW_CONFIG); - u1bTmp |= RF_SW_CFG_SI; //reg08[1]=1 Serial Interface(SI) - write_nic_byte(dev, RF_SW_CONFIG, u1bTmp); - UshortBuffer = read_nic_word(dev, RFPinsOutput); - oval = UshortBuffer & 0xfff8; // We shall clear bit0, 1, 2 first, 2005.10.28, by rcnjko. - - oval2 = read_nic_word(dev, RFPinsEnable); - oval3 = read_nic_word(dev, RFPinsSelect); - - // 3-wire should be controled by HW when we finish SW 3-wire programming. 2005.08.10, by rcnjko. - oval3 &= 0xfff8; - - write_nic_word(dev, RFPinsEnable, (oval2|0x0007)); // Set To Output Enable - write_nic_word(dev, RFPinsSelect, (oval3|0x0007)); // Set To SW Switch - udelay(10); - - // Add this to avoid hardware and software 3-wire conflict. - // 2005.03.01, by rcnjko. - twreg.longData = 0; - twreg.struc.enableB = 1; - write_nic_word(dev, RFPinsOutput, (twreg.longData|oval)); // Set SI_EN (RFLE) - udelay(2); - twreg.struc.enableB = 0; - write_nic_word(dev, RFPinsOutput, (twreg.longData|oval)); // Clear SI_EN (RFLE) - udelay(10); - - mask = (low2high)?0x01:((u32)0x01<<(totalLength-1)); - - for(i=0; i>1); - twreg.struc.data = ((data2Write&mask)!=0) ? 1 : 0; - write_nic_word(dev, RFPinsOutput, (twreg.longData|oval)); - write_nic_word(dev, RFPinsOutput, (twreg.longData|oval)); - twreg.struc.clk = 0; - write_nic_word(dev, RFPinsOutput, (twreg.longData|oval)); - mask = (low2high)?(mask<<1):(mask>>1); - } - - twreg.struc.enableB = 1; - twreg.struc.clk = 0; - twreg.struc.data = 0; - write_nic_word(dev, RFPinsOutput, twreg.longData|oval); - udelay(10); - - write_nic_word(dev, RFPinsOutput, oval|0x0004); - write_nic_word(dev, RFPinsSelect, oval3|0x0000); - - SetOutputEnableOfRfPins(dev); -} -//by amy - - -int +static int HwHSSIThreeWire( struct net_device *dev, u8 *pDataBuf, @@ -456,138 +381,6 @@ HwHSSIThreeWire( return bResult; } -//by amy - -int -HwThreeWire( - struct net_device *dev, - u8 *pDataBuf, - u8 nDataBufBitCnt, - int bHold, - int bWrite - ) -{ - int bResult = 1; - u8 TryCnt; - u8 u1bTmp; - - do - { - // Check if WE and RE are cleared. - for(TryCnt = 0; TryCnt < TC_3W_POLL_MAX_TRY_CNT; TryCnt++) - { - u1bTmp = read_nic_byte(dev, SW_3W_CMD1); - if( (u1bTmp & (SW_3W_CMD1_RE|SW_3W_CMD1_WE)) == 0 ) - { - break; - } - udelay(10); - } - if (TryCnt == TC_3W_POLL_MAX_TRY_CNT) - panic("HwThreeWire(): CmdReg: %#X RE|WE bits are not clear!!\n", u1bTmp); - - // Fill up data buffer for write operation. - if(nDataBufBitCnt == 16) - { - write_nic_word(dev, SW_3W_DB0, *((u16 *)pDataBuf)); - } - else if(nDataBufBitCnt == 64) - { - write_nic_dword(dev, SW_3W_DB0, *((u32 *)pDataBuf)); - write_nic_dword(dev, SW_3W_DB1, *((u32 *)(pDataBuf + 4))); - } - else - { - int idx; - int ByteCnt = nDataBufBitCnt / 8; - - if ((nDataBufBitCnt % 8) != 0) - panic("HwThreeWire(): nDataBufBitCnt(%d) should be multiple of 8!!!\n", - nDataBufBitCnt); - - if (nDataBufBitCnt > 64) - panic("HwThreeWire(): nDataBufBitCnt(%d) should <= 64!!!\n", - nDataBufBitCnt); - - for(idx = 0; idx < ByteCnt; idx++) - { - write_nic_byte(dev, (SW_3W_DB0+idx), *(pDataBuf+idx)); - } - } - - // Fill up length field. - u1bTmp = (u8)(nDataBufBitCnt - 1); // Number of bits - 1. - if(bHold) - u1bTmp |= SW_3W_CMD0_HOLD; - write_nic_byte(dev, SW_3W_CMD0, u1bTmp); - - // Set up command: WE or RE. - if(bWrite) - { - write_nic_byte(dev, SW_3W_CMD1, SW_3W_CMD1_WE); - } - else - { - write_nic_byte(dev, SW_3W_CMD1, SW_3W_CMD1_RE); - } - - // Check if WE and RE are cleared and DONE is set. - for(TryCnt = 0; TryCnt < TC_3W_POLL_MAX_TRY_CNT; TryCnt++) - { - u1bTmp = read_nic_byte(dev, SW_3W_CMD1); - if( (u1bTmp & (SW_3W_CMD1_RE|SW_3W_CMD1_WE)) == 0 && - (u1bTmp & SW_3W_CMD1_DONE) != 0 ) - { - break; - } - udelay(10); - } - if(TryCnt == TC_3W_POLL_MAX_TRY_CNT) - { - //RT_ASSERT(TryCnt != TC_3W_POLL_MAX_TRY_CNT, - // ("HwThreeWire(): CmdReg: %#X RE|WE bits are not clear or DONE is not set!!\n", u1bTmp)); - // Workaround suggested by wcchu: clear WE here. 2006.07.07, by rcnjko. - write_nic_byte(dev, SW_3W_CMD1, 0); - } - - // Read back data for read operation. - // I am not sure if this is correct output format of a read operation. - if(bWrite == 0) - { - if(nDataBufBitCnt == 16) - { - *((u16 *)pDataBuf) = read_nic_word(dev, SW_3W_DB0); - } - else if(nDataBufBitCnt == 64) - { - *((u32 *)pDataBuf) = read_nic_dword(dev, SW_3W_DB0); - *((u32 *)(pDataBuf + 4)) = read_nic_dword(dev, SW_3W_DB1); - } - else - { - int idx; - int ByteCnt = nDataBufBitCnt / 8; - - if ((nDataBufBitCnt % 8) != 0) - panic("HwThreeWire(): nDataBufBitCnt(%d) should be multiple of 8!!!\n", - nDataBufBitCnt); - - if (nDataBufBitCnt > 64) - panic("HwThreeWire(): nDataBufBitCnt(%d) should <= 64!!!\n", - nDataBufBitCnt); - - for(idx = 0; idx < ByteCnt; idx++) - { - *(pDataBuf+idx) = read_nic_byte(dev, (SW_3W_DB0+idx)); - } - } - } - - }while(0); - - return bResult; -} - void RF_WriteReg(struct net_device *dev, u8 offset, u32 data) @@ -602,125 +395,6 @@ RF_WriteReg(struct net_device *dev, u8 offset, u32 data) HwHSSIThreeWire(dev, (u8 *)(&data2Write), len, 1, 1); } -void -ZEBRA_RFSerialRead(struct net_device *dev, u32 data2Write, u8 wLength, - u32 *data2Read, u8 rLength, u8 low2high) -{ - ThreeWireReg twreg; - int i; - u16 oval, oval2, oval3, tmp, wReg80; - u32 mask; - u8 u1bTmp; - ThreeWireReg tdata; - //PHAL_DATA_8187 pHalData = GetHalData8187(pAdapter); - { // RTL8187S HSSI Read/Write Function - u1bTmp = read_nic_byte(dev, RF_SW_CONFIG); - u1bTmp |= RF_SW_CFG_SI; //reg08[1]=1 Serial Interface(SI) - write_nic_byte(dev, RF_SW_CONFIG, u1bTmp); - } - - wReg80 = oval = read_nic_word(dev, RFPinsOutput); - oval2 = read_nic_word(dev, RFPinsEnable); - oval3 = read_nic_word(dev, RFPinsSelect); - - write_nic_word(dev, RFPinsEnable, oval2|0xf); - write_nic_word(dev, RFPinsSelect, oval3|0xf); - - *data2Read = 0; - - // We must clear BIT0-3 here, otherwise, - // SW_Enalbe will be true when we first call ZEBRA_RFSerialRead() after 8187MPVC open, - // which will cause the value read become 0. 2005.04.11, by rcnjko. - oval &= ~0xf; - - // Avoid collision with hardware three-wire. - twreg.longData = 0; - twreg.struc.enableB = 1; - write_nic_word(dev, RFPinsOutput, twreg.longData|oval); udelay(4); - - twreg.longData = 0; - twreg.struc.enableB = 0; - twreg.struc.clk = 0; - twreg.struc.read_write = 0; - write_nic_word(dev, RFPinsOutput, twreg.longData|oval); udelay(5); - - mask = (low2high) ? 0x01 : ((u32)0x01<<(32-1)); - for(i = 0; i < wLength/2; i++) - { - twreg.struc.data = ((data2Write&mask) != 0) ? 1 : 0; - write_nic_word(dev, RFPinsOutput, twreg.longData|oval); udelay(1); - twreg.struc.clk = 1; - write_nic_word(dev, RFPinsOutput, twreg.longData|oval); udelay(2); - write_nic_word(dev, RFPinsOutput, twreg.longData|oval); udelay(2); - - mask = (low2high) ? (mask<<1): (mask>>1); - - if(i == 2) - { - // Commented out by Jackie, 2004.08.26. We must comment out the following two lines for we cannot pull down VCOPDN during RF Serail Read. - //PlatformEFIOWrite2Byte(pAdapter, RFPinsEnable, 0xe); // turn off data enable - //PlatformEFIOWrite2Byte(pAdapter, RFPinsSelect, 0xe); - - twreg.struc.read_write=1; - write_nic_word(dev, RFPinsOutput, twreg.longData|oval); udelay(2); - twreg.struc.clk = 0; - write_nic_word(dev, RFPinsOutput, twreg.longData|oval); udelay(2); - break; - } - twreg.struc.data = ((data2Write&mask) != 0) ? 1: 0; - write_nic_word(dev, RFPinsOutput, twreg.longData|oval); udelay(2); - write_nic_word(dev, RFPinsOutput, twreg.longData|oval); udelay(2); - - twreg.struc.clk = 0; - write_nic_word(dev, RFPinsOutput, twreg.longData|oval); udelay(1); - - mask = (low2high) ? (mask<<1) : (mask>>1); - } - - twreg.struc.clk = 0; - twreg.struc.data = 0; - write_nic_word(dev, RFPinsOutput, twreg.longData|oval); udelay(2); - mask = (low2high) ? 0x01 : ((u32)0x01 << (12-1)); - - // - // 061016, by rcnjko: - // We must set data pin to HW controled, otherwise RF can't driver it and - // value RF register won't be able to read back properly. - // - write_nic_word(dev, RFPinsEnable, ( ((oval2|0x0E) & (~0x01))) ); - - for(i = 0; i < rLength; i++) - { - write_nic_word(dev, RFPinsOutput, twreg.longData|oval); udelay(1); - twreg.struc.clk = 1; - write_nic_word(dev, RFPinsOutput, twreg.longData|oval); udelay(2); - write_nic_word(dev, RFPinsOutput, twreg.longData|oval); udelay(2); - write_nic_word(dev, RFPinsOutput, twreg.longData|oval); udelay(2); - tmp = read_nic_word(dev, RFPinsInput); - tdata.longData = tmp; - *data2Read |= tdata.struc.clk ? mask : 0; - - twreg.struc.clk = 0; - write_nic_word(dev, RFPinsOutput, twreg.longData|oval); udelay(2); - - mask = (low2high) ? (mask<<1) : (mask>>1); - } - twreg.struc.enableB = 1; - twreg.struc.clk = 0; - twreg.struc.data = 0; - twreg.struc.read_write = 1; - write_nic_word(dev, RFPinsOutput, twreg.longData|oval); udelay(2); - - //PlatformEFIOWrite2Byte(pAdapter, RFPinsEnable, oval2|0x8); // Set To Output Enable - write_nic_word(dev, RFPinsEnable, oval2); // Set To Output Enable, We cannot enable BIT3 here, otherwise, we will failed to switch channel. 2005.04.12. - //PlatformEFIOWrite2Byte(pAdapter, RFPinsEnable, 0x1bff); - write_nic_word(dev, RFPinsSelect, oval3); // Set To SW Switch - //PlatformEFIOWrite2Byte(pAdapter, RFPinsSelect, 0x0488); - write_nic_word(dev, RFPinsOutput, 0x3a0); - //PlatformEFIOWrite2Byte(pAdapter, RFPinsOutput, 0x0480); -} - - u32 RF_ReadReg(struct net_device *dev, u8 offset) { u32 data2Write; @@ -891,15 +565,12 @@ ZEBRA_Config_85BASIC_HardCode( // Page0 : reg0-reg15 -// RF_WriteReg(dev, 0x00, 0x003f); mdelay(1);//1 RF_WriteReg(dev, 0x00, 0x009f); mdelay(1);// 1 RF_WriteReg(dev, 0x01, 0x06e0); mdelay(1); -// RF_WriteReg(dev, 0x02, 0x004c); mdelay(1);//2 RF_WriteReg(dev, 0x02, 0x004d); mdelay(1);// 2 -// RF_WriteReg(dev, 0x03, 0x0000); mdelay(1);//3 RF_WriteReg(dev, 0x03, 0x07f1); mdelay(1);// 3 RF_WriteReg(dev, 0x04, 0x0975); mdelay(1); @@ -928,8 +599,6 @@ ZEBRA_Config_85BASIC_HardCode( RF_WriteReg(dev, 0x07, 0x01A0); mdelay(1); // Don't write RF23/RF24 to make a difference between 87S C cut and D cut. asked by SD3 stevenl. -// RF_WriteReg(dev, 0x08, 0x0597); mdelay(1); -// RF_WriteReg(dev, 0x09, 0x050a); mdelay(1); RF_WriteReg(dev, 0x0a, 0x0001); mdelay(1); RF_WriteReg(dev, 0x0b, 0x0418); mdelay(1); @@ -945,7 +614,6 @@ ZEBRA_Config_85BASIC_HardCode( RF_WriteReg(dev, 0x0f, 0x0acc); mdelay(1); -// RF_WriteReg(dev, 0x00, 0x017f); mdelay(1);//6 RF_WriteReg(dev, 0x00, 0x01d7); mdelay(1);// 6 RF_WriteReg(dev, 0x03, 0x0e00); mdelay(1); @@ -954,20 +622,14 @@ ZEBRA_Config_85BASIC_HardCode( { RF_WriteReg(dev, 0x01, i); mdelay(1); RF_WriteReg(dev, 0x02, ZEBRA_RF_RX_GAIN_TABLE[i]); mdelay(1); - //DbgPrint("RF - 0x%x = 0x%x", i, ZEBRA_RF_RX_GAIN_TABLE[i]); } RF_WriteReg(dev, 0x05, 0x0203); mdelay(1); /// 203, 343 - //RF_WriteReg(dev, 0x06, 0x0300); mdelay(1); // 400 RF_WriteReg(dev, 0x06, 0x0200); mdelay(1); // 400 RF_WriteReg(dev, 0x00, 0x0137); mdelay(1); // switch to reg16-reg30, and HSSI disable 137 mdelay(10); // Deay 10 ms. //0xfd -// RF_WriteReg(dev, 0x0c, 0x09be); mdelay(1); // 7 - //RF_WriteReg(dev, 0x0c, 0x07be); mdelay(1); - //mdelay(10); // Deay 10 ms. //0xfd - RF_WriteReg(dev, 0x0d, 0x0008); mdelay(1); // Z4 synthesizer loop filter setting, 392 mdelay(10); // Deay 10 ms. //0xfd @@ -1013,10 +675,8 @@ ZEBRA_Config_85BASIC_HardCode( RF_WriteReg(dev, 0x0f, 0x0acc); mdelay(1); } //by amy 080312 -// RF_WriteReg(dev, 0x0f, 0x0acc); mdelay(1); //-by amy 080312 RF_WriteReg(dev, 0x00, 0x00bf); mdelay(1); // switch to reg0-reg15, and HSSI enable -// RF_WriteReg(dev, 0x0d, 0x009f); mdelay(1); // Rx BB start calibration, 00c//-edward RF_WriteReg(dev, 0x0d, 0x08df); mdelay(1); // Rx BB start calibration, 00c//+edward RF_WriteReg(dev, 0x02, 0x004d); mdelay(1); // temperature meter off RF_WriteReg(dev, 0x04, 0x0975); mdelay(1); // Rx mode @@ -1065,13 +725,10 @@ ZEBRA_Config_85BASIC_HardCode( // AGC.txt //============================================================================= -// PlatformIOWrite4Byte( dev, PhyAddr, 0x00001280); // Annie, 2006-05-05 write_phy_ofdm(dev, 0x00, 0x12); - //WriteBBPortUchar(dev, 0x00001280); for (i=0; i<128; i++) { - //DbgPrint("AGC - [%x+1] = 0x%x\n", i, ZEBRA_AGC[i+1]); data = ZEBRA_AGC[i+1]; data = data << 8; @@ -1087,7 +744,6 @@ ZEBRA_Config_85BASIC_HardCode( } PlatformIOWrite4Byte( dev, PhyAddr, 0x00001080); // Annie, 2006-05-05 - //WriteBBPortUchar(dev, 0x00001080); //============================================================================= @@ -1100,8 +756,6 @@ ZEBRA_Config_85BASIC_HardCode( u4bRegOffset=i; u4bRegValue=OFDM_CONFIG[i]; - //DbgPrint("OFDM - 0x%x = 0x%x\n", u4bRegOffset, u4bRegValue); - WriteBBPortUchar(dev, (0x00000080 | (u4bRegOffset & 0x7f) | @@ -1125,9 +779,6 @@ UpdateInitialGain( ) { struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); - //unsigned char* IGTable; - //u8 DIG_CurrentInitialGain = 4; - //unsigned char u1Tmp; //lzm add 080826 if(priv->eRFPowerState != eRfOn) @@ -1205,13 +856,11 @@ InitTxPwrTracking87SE( struct net_device *dev ) { - //struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); u32 u4bRfReg; u4bRfReg = RF_ReadReg(dev, 0x02); // Enable Thermal meter indication. - //printk("InitTxPwrTracking87SE(): Enable thermal meter indication, Write RF[0x02] = %#x", u4bRfReg|PWR_METER_EN); RF_WriteReg(dev, 0x02, u4bRfReg|PWR_METER_EN); mdelay(1); } @@ -1231,7 +880,6 @@ PhyConfig8185( { if(priv->InitialGain == 0) priv->InitialGain = 4; - //printk("PhyConfig8185(): DIG is enabled, set default initial gain index to %d\n", priv->InitialGain); } // @@ -1249,34 +897,17 @@ PhyConfig8185( return; } - - - void HwConfigureRTL8185( struct net_device *dev ) { //RTL8185_TODO: Determine Retrylimit, TxAGC, AutoRateFallback control. -// u8 bUNIVERSAL_CONTROL_RL = 1; u8 bUNIVERSAL_CONTROL_RL = 0; - u8 bUNIVERSAL_CONTROL_AGC = 1; u8 bUNIVERSAL_CONTROL_ANT = 1; u8 bAUTO_RATE_FALLBACK_CTL = 1; u8 val8; - //struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); - //struct ieee80211_device *ieee = priv->ieee80211; - //if(IS_WIRELESS_MODE_A(dev) || IS_WIRELESS_MODE_G(dev)) -//{by amy 080312 if((ieee->mode == IEEE_G)||(ieee->mode == IEEE_A)) -// { -// write_nic_word(dev, BRSR, 0xffff); -// } -// else -// { -// write_nic_word(dev, BRSR, 0x000f); -// } -//by amy 080312} write_nic_word(dev, BRSR, 0x0fff); // Retry limit val8 = read_nic_byte(dev, CW_CONF); @@ -1327,20 +958,11 @@ HwConfigureRTL8185( val8 |= RATE_FALLBACK_CTL_ENABLE | RATE_FALLBACK_CTL_AUTO_STEP1; // We shall set up the ARFR according to user's setting. - //write_nic_word(dev, ARFR, 0x0fff); // set 1M ~ 54M -//by amy - // Aadded by Roger, 2007.11.15. PlatformIOWrite2Byte(dev, ARFR, 0x0fff); //set 1M ~ 54Mbps. -//by amy - } - else - { } write_nic_byte(dev, RATE_FALLBACK, val8); } - - static void MacConfig_85BASIC_HardCode( struct net_device *dev) @@ -1368,14 +990,11 @@ MacConfig_85BASIC_HardCode( { u4bRegOffset |= (u4bPageIndex << 8); } - //DbgPrint("MAC - 0x%x = 0x%x\n", u4bRegOffset, u4bRegValue); write_nic_byte(dev, u4bRegOffset, (u8)u4bRegValue); } //============================================================================ } - - static void MacConfig_85BASIC( struct net_device *dev) @@ -1398,8 +1017,6 @@ MacConfig_85BASIC( PlatformIOWrite1Byte(dev, 0x1F8, 0x00); // Asked for by SD3 CM Lin, 2006.06.27, by rcnjko. - //PlatformIOWrite4Byte(dev, RFTiming, 0x00004001); -//by amy // power save parameter based on "87SE power save parameters 20071127.doc", as follow. //Enable DA10 TX power saving @@ -1418,16 +1035,10 @@ MacConfig_85BASIC( write_nic_word(dev, 0x378, 0x0560); write_nic_word(dev, 0x37A, 0x0560); write_nic_word(dev, 0x37C, 0x00EC); -// write_nic_word(dev, 0x37E, 0x00FE);//-edward write_nic_word(dev, 0x37E, 0x00EC);//+edward write_nic_byte(dev, 0x24E,0x01); -//by amy - } - - - u8 GetSupportedWirelessMode8185( struct net_device *dev @@ -1450,7 +1061,6 @@ ActUpdateChannelAccessSetting( struct ieee80211_device *ieee = priv->ieee80211; AC_CODING eACI; AC_PARAM AcParam; - //PSTA_QOS pStaQos = Adapter->MgntInfo.pStaQos; u8 bFollowLegacySetting = 0; u8 u1bAIFS; @@ -1472,40 +1082,14 @@ ActUpdateChannelAccessSetting( ChnlAccessSetting->CWmaxIndex = 7; // 2006.06.02, by rcnjko. write_nic_byte(dev, SIFS, ChnlAccessSetting->SIFS_Timer); - //Adapter->HalFunc.SetHwRegHandler( Adapter, HW_VAR_SLOT_TIME, &ChnlAccessSetting->SlotTimeTimer ); // Rewrited from directly use PlatformEFIOWrite1Byte(), by Annie, 2006-03-29. write_nic_byte(dev, SLOT, ChnlAccessSetting->SlotTimeTimer); // Rewrited from directly use PlatformEFIOWrite1Byte(), by Annie, 2006-03-29. u1bAIFS = aSifsTime + (2 * ChnlAccessSetting->SlotTimeTimer ); - //write_nic_byte(dev, AC_VO_PARAM, u1bAIFS); - //write_nic_byte(dev, AC_VI_PARAM, u1bAIFS); - //write_nic_byte(dev, AC_BE_PARAM, u1bAIFS); - //write_nic_byte(dev, AC_BK_PARAM, u1bAIFS); - write_nic_byte(dev, EIFS, ChnlAccessSetting->EIFS_Timer); write_nic_byte(dev, AckTimeOutReg, 0x5B); // Suggested by wcchu, it is the default value of EIFS register, 2005.12.08. -#ifdef TODO - // Update ECWmin/ECWmax, AIFS, TXOP Limit of each AC to the value defined by SPEC. - if( pStaQos->CurrentQosMode > QOS_DISABLE ) - { // QoS mode. - if(pStaQos->QBssWirelessMode == WirelessMode) - { - // Follow AC Parameters of the QBSS. - for(eACI = 0; eACI < AC_MAX; eACI++) - { - Adapter->HalFunc.SetHwRegHandler(Adapter, HW_VAR_AC_PARAM, (pu1Byte)(&(pStaQos->WMMParamEle.AcParam[eACI])) ); - } - } - else - { - // Follow Default WMM AC Parameters. - bFollowLegacySetting = 1; - } - } - else -#endif { // Legacy 802.11. bFollowLegacySetting = 1; @@ -1528,14 +1112,12 @@ ActUpdateChannelAccessSetting( AcParam.f.TXOPLimit = 0; //lzm reserved 080826 -#if 1 // For turbo mode setting. port from 87B by Isaiah 2008-08-01 if( ieee->current_network.Turbo_Enable == 1 ) AcParam.f.TXOPLimit = 0x01FF; // For 87SE with Intel 4965 Ad-Hoc mode have poor throughput (19MB) if (ieee->iw_mode == IW_MODE_ADHOC) AcParam.f.TXOPLimit = 0x0020; -#endif for(eACI = 0; eACI < AC_MAX; eACI++) { @@ -1579,18 +1161,13 @@ ActUpdateChannelAccessSetting( // Cehck ACM bit. // If it is set, immediately set ACM control bit to downgrading AC for passing WMM testplan. Annie, 2005-12-13. - //write_nic_byte(dev, ACM_CONTROL, pAcParam->f.AciAifsn); { PACI_AIFSN pAciAifsn = (PACI_AIFSN)(&pAcParam->f.AciAifsn); AC_CODING eACI = pAciAifsn->f.ACI; //modified Joseph //for 8187B AsynIORead issue -#ifdef TODO - u8 AcmCtrl = pHalData->AcmControl; -#else u8 AcmCtrl = 0; -#endif if( pAciAifsn->f.ACM ) { // ACM bit is 1. switch(eACI) @@ -1632,19 +1209,10 @@ ActUpdateChannelAccessSetting( break; } } - - //printk(KERN_WARNING "SetHwReg8185(): [HW_VAR_ACM_CTRL] Write 0x%X\n", AcmCtrl); - -#ifdef TO_DO - pHalData->AcmControl = AcmCtrl; -#endif - //write_nic_byte(dev, ACM_CONTROL, AcmCtrl); write_nic_byte(dev, ACM_CONTROL, 0); } } } - - } } @@ -1656,7 +1224,6 @@ ActSetWirelessMode8185( { struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); struct ieee80211_device *ieee = priv->ieee80211; - //PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); u8 btSupportedWirelessMode = GetSupportedWirelessMode8185(dev); if( (btWirelessMode & btSupportedWirelessMode) == 0 ) @@ -1689,7 +1256,6 @@ ActSetWirelessMode8185( } } - /* 2. Swtich band: RF or BB specific actions, * for example, refresh tables in omc8255, or change initial gain if necessary. * Nothing to do for Zebra to switch band. @@ -1706,7 +1272,6 @@ ActSetWirelessMode8185( else if( ieee->mode == WIRELESS_MODE_G ){ DMESG("WIRELESS_MODE_G\n"); } - ActUpdateChannelAccessSetting( dev, ieee->mode, &priv->ChannelAccessSetting); } @@ -1724,11 +1289,7 @@ DrvIFIndicateDisassociation( u16 reason ) { - //printk("==> DrvIFIndicateDisassociation()\n"); - // nothing is needed after disassociation request. - - //printk("<== DrvIFIndicateDisassociation()\n"); } void MgntDisconnectIBSS( @@ -1738,11 +1299,7 @@ MgntDisconnectIBSS( struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); u8 i; - //printk("XXXXXXXXXX MgntDisconnect IBSS\n"); - DrvIFIndicateDisassociation(dev, unspec_reason); - -// PlatformZeroMemory( pMgntInfo->Bssid, 6 ); for(i=0;i<6;i++) priv->ieee80211->current_network.bssid[i] = 0x55; priv->ieee80211->state = IEEE80211_NOLINK; @@ -1754,16 +1311,10 @@ MgntDisconnectIBSS( // Because Bcn DMA isn't complete, mgnt queue would stuck until Bcn packet send. // Disable Beacon Queue Own bit, suggested by jong -// Adapter->HalFunc.SetTxDescOWNHandler(Adapter, BEACON_QUEUE, 0, 0); ieee80211_stop_send_beacons(priv->ieee80211); priv->ieee80211->link_change(dev); notify_wx_assoc_event(priv->ieee80211); - - // Stop SW Beacon.Use hw beacon so do not need to do so.by amy - -// MgntIndicateMediaStatus( Adapter, RT_MEDIA_DISCONNECT, GENERAL_INDICATE ); - } void MlmeDisassociateRequest( @@ -1783,14 +1334,8 @@ MlmeDisassociateRequest( DrvIFIndicateDisassociation(dev, unspec_reason); - // pMgntInfo->AsocTimestamp = 0; for(i=0;i<6;i++) priv->ieee80211->current_network.bssid[i] = 0x22; -// pMgntInfo->mBrates.Length = 0; -// Adapter->HalFunc.SetHwRegHandler( Adapter, HW_VAR_BASIC_RATE, (pu1Byte)(&pMgntInfo->mBrates) ); - ieee80211_disassociate(priv->ieee80211); - - } } @@ -1808,23 +1353,12 @@ MgntDisconnectAP( // I move SecClearAllKeys() to MgntActSet_802_11_DISASSOCIATE(). // // //2004/09/15, kcwu, the key should be cleared, or the new handshaking will not success -// SecClearAllKeys(Adapter); // In WPA WPA2 need to Clear all key ... because new key will set after new handshaking. -#ifdef TODO - if( pMgntInfo->SecurityInfo.AuthMode > RT_802_11AuthModeAutoSwitch || - (pMgntInfo->bAPSuportCCKM && pMgntInfo->bCCX8021xenable) ) // In CCKM mode will Clear key - { - SecClearAllKeys(Adapter); - RT_TRACE(COMP_SEC, DBG_LOUD,("======>CCKM clear key...")) - } -#endif // 2004.10.11, by rcnjko. - //MlmeDisassociateRequest( Adapter, pMgntInfo->Bssid, disas_lv_ss ); MlmeDisassociateRequest( dev, priv->ieee80211->current_network.bssid, asRsn ); priv->ieee80211->state = IEEE80211_NOLINK; -// pMgntInfo->AsocTimestamp = 0; } bool MgntDisconnect( @@ -1836,20 +1370,7 @@ MgntDisconnect( // // Schedule an workitem to wake up for ps mode, 070109, by rcnjko. // -#ifdef TODO - if(pMgntInfo->mPss != eAwake) - { - // - // Using AwkaeTimer to prevent mismatch ps state. - // In the timer the state will be changed according to the RF is being awoke or not. By Bruce, 2007-10-31. - // - // PlatformScheduleWorkItem( &(pMgntInfo->AwakeWorkItem) ); - PlatformSetTimer( Adapter, &(pMgntInfo->AwakeTimer), 0 ); - } -#endif - // Indication of disassociation event. - //DrvIFIndicateDisassociation(Adapter, asRsn); if(IS_DOT11D_ENABLE(priv->ieee80211)) Dot11d_Reset(priv->ieee80211); // In adhoc mode, update beacon frame. @@ -1857,8 +1378,6 @@ MgntDisconnect( { if( priv->ieee80211->iw_mode == IW_MODE_ADHOC ) { -// RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntDisconnect() ===> MgntDisconnectIBSS\n")); - //printk("MgntDisconnect() ===> MgntDisconnectIBSS\n"); MgntDisconnectIBSS(dev); } if( priv->ieee80211->iw_mode == IW_MODE_INFRA ) @@ -1868,17 +1387,10 @@ MgntDisconnect( // e.g. OID_802_11_DISASSOCIATE in Windows while as MgntDisconnectAP() is // used to handle disassociation related things to AP, e.g. send Disassoc // frame to AP. 2005.01.27, by rcnjko. -// SecClearAllKeys(Adapter); - -// RT_TRACE(COMP_MLME, DBG_LOUD, ("MgntDisconnect() ===> MgntDisconnectAP\n")); - //printk("MgntDisconnect() ===> MgntDisconnectAP\n"); MgntDisconnectAP(dev, asRsn); } - // Inidicate Disconnect, 2005.02.23, by rcnjko. -// MgntIndicateMediaStatus( Adapter, RT_MEDIA_DISCONNECT, GENERAL_INDICATE); } - return true; } // @@ -1898,10 +1410,8 @@ SetRFPowerState( struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); bool bResult = false; -// printk("---------> SetRFPowerState(): eRFPowerState(%d)\n", eRFPowerState); if(eRFPowerState == priv->eRFPowerState) { -// printk("<--------- SetRFPowerState(): discard the request for eRFPowerState(%d) is the same.\n", eRFPowerState); return bResult; } @@ -1935,33 +1445,25 @@ MgntActSet_RF_State( RT_RF_POWER_STATE rtState; u16 RFWaitCounter = 0; unsigned long flag; -// printk("===>MgntActSet_RF_State(): StateToSet(%d), ChangeSource(0x%x)\n",StateToSet, ChangeSource); // // Prevent the race condition of RF state change. By Bruce, 2007-11-28. // Only one thread can change the RF state at one time, and others should wait to be executed. // -#if 1 while(true) { -// down(&priv->rf_state); spin_lock_irqsave(&priv->rf_ps_lock,flag); if(priv->RFChangeInProgress) { -// printk("====================>haha111111111\n"); -// up(&priv->rf_state); -// RT_TRACE(COMP_RF, DBG_LOUD, ("MgntActSet_RF_State(): RF Change in progress! Wait to set..StateToSet(%d).\n", StateToSet)); spin_unlock_irqrestore(&priv->rf_ps_lock,flag); // Set RF after the previous action is done. while(priv->RFChangeInProgress) { RFWaitCounter ++; -// RT_TRACE(COMP_RF, DBG_LOUD, ("MgntActSet_RF_State(): Wait 1 ms (%d times)...\n", RFWaitCounter)); udelay(1000); // 1 ms // Wait too long, return FALSE to avoid to be stuck here. if(RFWaitCounter > 1000) // 1sec { -// RT_ASSERT(FALSE, ("MgntActSet_RF_State(): Wait too logn to set RF\n")); printk("MgntActSet_RF_State(): Wait too long to set RF\n"); // TODO: Reset RF state? return false; @@ -1970,17 +1472,13 @@ MgntActSet_RF_State( } else { -// printk("========================>haha2\n"); priv->RFChangeInProgress = true; -// up(&priv->rf_state); spin_unlock_irqrestore(&priv->rf_ps_lock,flag); break; } } -#endif rtState = priv->eRFPowerState; - switch(StateToSet) { case eRfOn: @@ -2001,7 +1499,6 @@ MgntActSet_RF_State( } } else -// RT_TRACE(COMP_RF, DBG_LOUD, ("MgntActSet_RF_State - eRfon reject pMgntInfo->RfOffReason= 0x%x, ChangeSource=0x%X\n", pMgntInfo->RfOffReason, ChangeSource)); ; break; @@ -2018,38 +1515,26 @@ MgntActSet_RF_State( // // Calling MgntDisconnect() instead of MgntActSet_802_11_DISASSOCIATE(), // because we do NOT need to set ssid to dummy ones. - // Revised by Roger, 2007.12.04. // MgntDisconnect( dev, disas_lv_ss ); // Clear content of bssDesc[] and bssDesc4Query[] to avoid reporting old bss to UI. - // 2007.05.28, by shien chang. -// PlatformZeroMemory( pMgntInfo->bssDesc, sizeof(RT_WLAN_BSS)*MAX_BSS_DESC ); -// pMgntInfo->NumBssDesc = 0; -// PlatformZeroMemory( pMgntInfo->bssDesc4Query, sizeof(RT_WLAN_BSS)*MAX_BSS_DESC ); -// pMgntInfo->NumBssDesc4Query = 0; } - - priv->RfOffReason |= ChangeSource; bActionAllowed = true; break; - case eRfSleep: priv->RfOffReason |= ChangeSource; bActionAllowed = true; break; - default: break; } if(bActionAllowed) { -// RT_TRACE(COMP_RF, DBG_LOUD, ("MgntActSet_RF_State(): Action is allowed.... StateToSet(%d), RfOffReason(%#X)\n", StateToSet, pMgntInfo->RfOffReason)); // Config HW to the specified mode. -// printk("MgntActSet_RF_State(): Action is allowed.... StateToSet(%d), RfOffReason(%#X)\n", StateToSet, priv->RfOffReason); SetRFPowerState(dev, StateToSet); // Turn on RF. @@ -2059,7 +1544,6 @@ MgntActSet_RF_State( if(bConnectBySSID) { // by amy not supported -// MgntActSet_802_11_SSID(Adapter, Adapter->MgntInfo.Ssid.Octet, Adapter->MgntInfo.Ssid.Length, TRUE ); } } // Turn off RF. @@ -2068,18 +1552,11 @@ MgntActSet_RF_State( HalDisableRx8185Dummy(dev); } } - else - { - // printk("MgntActSet_RF_State(): Action is rejected.... StateToSet(%d), ChangeSource(%#X), RfOffReason(%#X)\n", StateToSet, ChangeSource, priv->RfOffReason); - } // Release RF spinlock -// down(&priv->rf_state); spin_lock_irqsave(&priv->rf_ps_lock,flag); priv->RFChangeInProgress = false; -// up(&priv->rf_state); spin_unlock_irqrestore(&priv->rf_ps_lock,flag); -// printk("<===MgntActSet_RF_State()\n"); return bActionAllowed; } void @@ -2088,15 +1565,12 @@ InactivePowerSave( ) { struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); - //u8 index = 0; - // // This flag "bSwRfProcessing", indicates the status of IPS procedure, should be set if the IPS workitem // is really scheduled. // The old code, sets this flag before scheduling the IPS workitem and however, at the same time the // previous IPS workitem did not end yet, fails to schedule the current workitem. Thus, bSwRfProcessing // blocks the IPS procedure of switching RF. - // By Bruce, 2007-12-25. // priv->bSwRfProcessing = true; @@ -2112,7 +1586,6 @@ InactivePowerSave( // // Description: // Enter the inactive power save mode. RF will be off -// 2007.08.17, by shien chang. // void IPSEnter( @@ -2121,13 +1594,11 @@ IPSEnter( { struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); RT_RF_POWER_STATE rtState; - //printk("==============================>enter IPS\n"); if (priv->bInactivePs) { rtState = priv->eRFPowerState; // - // Added by Bruce, 2007-12-25. // Do not enter IPS in the following conditions: // (1) RF is already OFF or Sleep // (2) bSwRfProcessing (indicates the IPS is still under going) @@ -2138,12 +1609,10 @@ IPSEnter( if (rtState == eRfOn && !priv->bSwRfProcessing && (priv->ieee80211->state != IEEE80211_LINKED )) { - // printk("IPSEnter(): Turn off RF.\n"); priv->eInactivePowerState = eRfOff; InactivePowerSave(dev); } } -// printk("priv->eRFPowerState is %d\n",priv->eRFPowerState); } void IPSLeave( @@ -2152,20 +1621,17 @@ IPSLeave( { struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); RT_RF_POWER_STATE rtState; - //printk("===================================>leave IPS\n"); if (priv->bInactivePs) { rtState = priv->eRFPowerState; if ((rtState == eRfOff || rtState == eRfSleep) && (!priv->bSwRfProcessing) && priv->RfOffReason <= RF_CHANGE_BY_IPS) { -// printk("IPSLeave(): Turn on RF.\n"); priv->eInactivePowerState = eRfOn; InactivePowerSave(dev); } } -// printk("priv->eRFPowerState is %d\n",priv->eRFPowerState); } -//by amy for power save + void rtl8185b_adapter_start(struct net_device *dev) { struct r8180_priv *priv = ieee80211_priv(dev); @@ -2174,75 +1640,45 @@ void rtl8185b_adapter_start(struct net_device *dev) u8 SupportedWirelessMode; u8 InitWirelessMode; u8 bInvalidWirelessMode = 0; - //int i; u8 tmpu8; - //u8 u1tmp,u2tmp; u8 btCR9346; u8 TmpU1b; u8 btPSR; - //rtl8180_rtx_disable(dev); -//{by amy 080312 write_nic_byte(dev,0x24e, (BIT5|BIT6|BIT0)); -//by amy 080312} rtl8180_reset(dev); priv->dma_poll_mask = 0; priv->dma_poll_stop_mask = 0; - //rtl8180_beacon_tx_disable(dev); - HwConfigureRTL8185(dev); - write_nic_dword(dev, MAC0, ((u32*)dev->dev_addr)[0]); write_nic_word(dev, MAC4, ((u32*)dev->dev_addr)[1] & 0xffff ); - write_nic_byte(dev, MSR, read_nic_byte(dev, MSR) & 0xf3); // default network type to 'No Link' - - //write_nic_byte(dev, BRSR, 0x0); // Set BRSR= 1M - write_nic_word(dev, BcnItv, 100); write_nic_word(dev, AtimWnd, 2); - - //PlatformEFIOWrite2Byte(dev, FEMR, 0xFFFF); PlatformIOWrite2Byte(dev, FEMR, 0xFFFF); - write_nic_byte(dev, WPA_CONFIG, 0); - MacConfig_85BASIC(dev); - // Override the RFSW_CTRL (MAC offset 0x272-0x273), 2006.06.07, by rcnjko. // BT_DEMO_BOARD type PlatformIOWrite2Byte(dev, RFSW_CTRL, 0x569a); -//by amy -//#ifdef CONFIG_RTL818X_S - // for jong required -// PlatformIOWrite2Byte(dev, RFSW_CTRL, 0x9a56); -//#endif -//by amy - //BT_QA_BOARD - //PlatformIOWrite2Byte(dev, RFSW_CTRL, 0x9a56); //----------------------------------------------------------------------------- // Set up PHY related. //----------------------------------------------------------------------------- // Enable Config3.PARAM_En to revise AnaaParm. write_nic_byte(dev, CR9346, 0xc0); // enable config register write -//by amy tmpu8 = read_nic_byte(dev, CONFIG3); write_nic_byte(dev, CONFIG3, (tmpu8 |CONFIG3_PARM_En) ); -//by amy // Turn on Analog power. // Asked for by William, otherwise, MAC 3-wire can't work, 2006.06.27, by rcnjko. write_nic_dword(dev, ANAPARAM2, ANAPARM2_ASIC_ON); write_nic_dword(dev, ANAPARAM, ANAPARM_ASIC_ON); -//by amy write_nic_word(dev, ANAPARAM3, 0x0010); -//by amy write_nic_byte(dev, CONFIG3, tmpu8); write_nic_byte(dev, CR9346, 0x00); -//{by amy 080312 for led // enable EEM0 and EEM1 in 9346CR btCR9346 = read_nic_byte(dev, CR9346); write_nic_byte(dev, CR9346, (btCR9346|0xC0) ); @@ -2260,7 +1696,6 @@ void rtl8185b_adapter_start(struct net_device *dev) // B-cut RF Radio on/off 5e[3]=0 btPSR = read_nic_byte(dev, PSR); write_nic_byte(dev, PSR, (btPSR | BIT3)); -//by amy 080312 for led} // setup initial timing for RFE. write_nic_word(dev, RFPinsOutput, 0x0480); SetOutputEnableOfRfPins(dev); @@ -2323,55 +1758,19 @@ void rtl8185b_adapter_start(struct net_device *dev) InitWirelessMode = ieee->mode; } //by amy for power save -// printk("initialize ENABLE_IPS\n"); priv->eRFPowerState = eRfOff; priv->RfOffReason = 0; { - // u32 tmp2; - // u32 tmp = jiffies; MgntActSet_RF_State(dev, eRfOn, 0); - // tmp2 = jiffies; - // printk("rf on cost jiffies:%lx\n", (tmp2-tmp)*1000/HZ); } -// DrvIFIndicateCurrentPhyStatus(priv); // // If inactive power mode is enabled, disable rf while in disconnected state. - // 2007.07.16, by shien chang. // if (priv->bInactivePs) { - // u32 tmp2; - // u32 tmp = jiffies; MgntActSet_RF_State(dev,eRfOff, RF_CHANGE_BY_IPS); - // tmp2 = jiffies; - // printk("rf off cost jiffies:%lx\n", (tmp2-tmp)*1000/HZ); - } -// IPSEnter(dev); //by amy for power save -#ifdef TODO - // Turn off RF if necessary. 2005.08.23, by rcnjko. - // We shall turn off RF after setting CMDR, otherwise, - // RF will be turnned on after we enable MAC Tx/Rx. - if(Adapter->MgntInfo.RegRfOff == TRUE) - { - SetRFPowerState8185(Adapter, RF_OFF); - } - else - { - SetRFPowerState8185(Adapter, RF_ON); - } -#endif - -/* //these is equal with above TODO. - write_nic_byte(dev, CR9346, 0xc0); // enable config register write - write_nic_byte(dev, CONFIG3, read_nic_byte(dev, CONFIG3) | CONFIG3_PARM_En); - RF_WriteReg(dev, 0x4, 0x9FF); - write_nic_dword(dev, ANAPARAM2, ANAPARM2_ASIC_ON); - write_nic_dword(dev, ANAPARAM, ANAPARM_ASIC_ON); - write_nic_byte(dev, CONFIG3, (read_nic_byte(dev, CONFIG3)&(~CONFIG3_PARM_En))); - write_nic_byte(dev, CR9346, 0x00); -*/ ActSetWirelessMode8185(dev, (u8)(InitWirelessMode)); @@ -2380,14 +1779,11 @@ void rtl8185b_adapter_start(struct net_device *dev) rtl8185b_irq_enable(dev); netif_start_queue(dev); - } - void rtl8185b_rx_enable(struct net_device *dev) { u8 cmd; - //u32 rxconf; /* for now we accept data, management & ctl frame*/ struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); @@ -2399,11 +1795,6 @@ void rtl8185b_rx_enable(struct net_device *dev) priv->ReceiveConfig = priv->ReceiveConfig | RCR_AAP; } - /*if(priv->ieee80211->iw_mode == IW_MODE_MASTER){ - rxconf = rxconf | (1<ieee80211->iw_mode == IW_MODE_MONITOR){ priv->ReceiveConfig = priv->ReceiveConfig | RCR_ACF | RCR_APWRMGT | RCR_AICV; } @@ -2415,9 +1806,6 @@ void rtl8185b_rx_enable(struct net_device *dev) fix_rx_fifo(dev); -#ifdef DEBUG_RX - DMESG("rxconf: %x %x",priv->ReceiveConfig ,read_nic_dword(dev,RCR)); -#endif cmd=read_nic_byte(dev,CMD); write_nic_byte(dev,CMD,cmd | (1<TransmitConfig); @@ -2438,21 +1824,7 @@ void rtl8185b_tx_enable(struct net_device *dev) fix_tx_fifo(dev); -#ifdef DEBUG_TX - DMESG("txconf: %x %x",priv->TransmitConfig,read_nic_dword(dev,TCR)); -#endif - cmd=read_nic_byte(dev,CMD); write_nic_byte(dev,CMD,cmd | (1<dma_poll_mask); - rtl8180_set_mode(dev,EPROM_CMD_NORMAL); - */ } - From 1d31a9ee698f9b8d72c5813fe62a5184197443c3 Mon Sep 17 00:00:00 2001 From: Bernie Thompson Date: Mon, 15 Feb 2010 06:45:43 -0800 Subject: [PATCH 276/367] Staging: udlfb: checkpatch cleanup Eliminate checkpatch.pl warnings and errors so later patches in series are clean Signed-off-by: Bernie Thompson Signed-off-by: Greg Kroah-Hartman --- drivers/staging/udlfb/udlfb.c | 74 ++++++++++++++++------------------- drivers/staging/udlfb/udlfb.h | 1 - 2 files changed, 34 insertions(+), 41 deletions(-) diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c index b61a3e58a9ec..d2adfe416a0c 100644 --- a/drivers/staging/udlfb/udlfb.c +++ b/drivers/staging/udlfb/udlfb.c @@ -30,13 +30,13 @@ #define DRIVER_VERSION "DisplayLink Framebuffer Driver 0.4.1" static struct fb_fix_screeninfo dlfb_fix = { - .id = "displaylinkfb", - .type = FB_TYPE_PACKED_PIXELS, - .visual = FB_VISUAL_TRUECOLOR, - .xpanstep = 0, - .ypanstep = 0, - .ywrapstep = 0, - .accel = FB_ACCEL_NONE, + .id = "displaylinkfb", + .type = FB_TYPE_PACKED_PIXELS, + .visual = FB_VISUAL_TRUECOLOR, + .xpanstep = 0, + .ypanstep = 0, + .ywrapstep = 0, + .accel = FB_ACCEL_NONE, }; #define NR_USB_REQUEST_I2C_SUB_IO 0x02 @@ -48,21 +48,21 @@ static struct fb_fix_screeninfo dlfb_fix = { */ static char *insert_command(char *buf, u8 reg, u8 val) { - *buf++ = 0xAF; - *buf++ = 0x20; - *buf++ = reg; - *buf++ = val; - return buf; + *buf++ = 0xAF; + *buf++ = 0x20; + *buf++ = reg; + *buf++ = val; + return buf; } static char *insert_vidreg_lock(char *buf) { - return insert_command(buf, 0xFF, 0x00); + return insert_command(buf, 0xFF, 0x00); } static char *insert_vidreg_unlock(char *buf) { - return insert_command(buf, 0xFF, 0xFF); + return insert_command(buf, 0xFF, 0xFF); } /* @@ -71,33 +71,33 @@ static char *insert_vidreg_unlock(char *buf) */ static char *insert_enable_hvsync(char *buf) { - return insert_command(buf, 0x1F, 0x00); + return insert_command(buf, 0x1F, 0x00); } static char *insert_set_color_depth(char *buf, u8 selection) { - return insert_command(buf, 0x00, selection); + return insert_command(buf, 0x00, selection); } static char *insert_set_base16bpp(char *wrptr, u32 base) { - /* the base pointer is 16 bits wide, 0x20 is hi byte. */ - wrptr = insert_command(wrptr, 0x20, base >> 16); - wrptr = insert_command(wrptr, 0x21, base >> 8); - return insert_command(wrptr, 0x22, base); + /* the base pointer is 16 bits wide, 0x20 is hi byte. */ + wrptr = insert_command(wrptr, 0x20, base >> 16); + wrptr = insert_command(wrptr, 0x21, base >> 8); + return insert_command(wrptr, 0x22, base); } static char *insert_set_base8bpp(char *wrptr, u32 base) { - wrptr = insert_command(wrptr, 0x26, base >> 16); - wrptr = insert_command(wrptr, 0x27, base >> 8); - return insert_command(wrptr, 0x28, base); + wrptr = insert_command(wrptr, 0x26, base >> 16); + wrptr = insert_command(wrptr, 0x27, base >> 8); + return insert_command(wrptr, 0x28, base); } static char *insert_command_16(char *wrptr, u8 reg, u16 value) { - wrptr = insert_command(wrptr, reg, value >> 8); - return insert_command(wrptr, reg+1, value); + wrptr = insert_command(wrptr, reg, value >> 8); + return insert_command(wrptr, reg+1, value); } /* @@ -106,8 +106,8 @@ static char *insert_command_16(char *wrptr, u8 reg, u16 value) */ static char *insert_command_16be(char *wrptr, u8 reg, u16 value) { - wrptr = insert_command(wrptr, reg, value); - return insert_command(wrptr, reg+1, value >> 8); + wrptr = insert_command(wrptr, reg, value); + return insert_command(wrptr, reg+1, value >> 8); } /* @@ -339,7 +339,7 @@ MODULE_DEVICE_TABLE(usb, id_table); static struct usb_driver dlfb_driver; -// thanks to Henrik Bjerregaard Pedersen for this function +/* thanks to Henrik Bjerregaard Pedersen for this function */ static char *rle_compress16(uint16_t * src, char *dst, int rem) { @@ -347,7 +347,7 @@ static char *rle_compress16(uint16_t * src, char *dst, int rem) uint16_t pix0; char *end_if_raw = dst + 6 + 2 * rem; - dst += 6; // header will be filled in if RLE is worth it + dst += 6; /* header will be filled in if RLE is worth it */ while (rem && dst < end_if_raw) { char *start = (char *)src; @@ -366,8 +366,8 @@ static char *rle_compress16(uint16_t * src, char *dst, int rem) } /* -Thanks to Henrik Bjerregaard Pedersen for rle implementation and code refactoring. -Next step is huffman compression. +Thanks to Henrik Bjerregaard Pedersen for rle implementation +and code refactoring. Next step is huffman compression. */ static int @@ -419,7 +419,7 @@ image_blit(struct dlfb_data *dev_info, int x, int y, int width, int height, bufptr - dev_info->buf); bufptr = dev_info->buf; } - // number of pixels to consider this time + /* number of pixels to consider this time */ thistime = rem; if (thistime > 255) thistime = 255; @@ -467,7 +467,7 @@ image_blit(struct dlfb_data *dev_info, int x, int y, int width, int height, bufptr = end_of_rle; } else { - // fallback to raw (or some other encoding?) + /* fallback to raw (or other?) */ *bufptr++ = 0xAF; *bufptr++ = 0x68; @@ -479,7 +479,6 @@ image_blit(struct dlfb_data *dev_info, int x, int y, int width, int height, *bufptr++ = (char)(base + firstdiff * 2); *bufptr++ = thistime - firstdiff; - // PUT COMPRESSION HERE for (j = firstdiff * 2; j < thistime * 2; j += 2) { *bufptr++ = data[j + 1]; @@ -621,7 +620,7 @@ static void swapfb(struct dlfb_data *dev_info) bufptr = dlfb_set_register(bufptr, 0xFF, 0x00); - // set addresses + /* set addresses */ bufptr = dlfb_set_register(bufptr, 0x20, (char)(dev_info->base16 >> 16)); bufptr = dlfb_set_register(bufptr, 0x21, (char)(dev_info->base16 >> 8)); @@ -803,9 +802,6 @@ static void dlfb_copyarea(struct fb_info *info, const struct fb_copyarea *area) copyarea(dev, area->dx, area->dy, area->sx, area->sy, area->width, area->height); - - /* printk("COPY AREA %d %d %d %d %d %d !!!\n", area->dx, area->dy, area->sx, area->sy, area->width, area->height); */ - } static void dlfb_imageblit(struct fb_info *info, const struct fb_image *image) @@ -813,12 +809,10 @@ static void dlfb_imageblit(struct fb_info *info, const struct fb_image *image) int ret; struct dlfb_data *dev = info->par; - /* printk("IMAGE BLIT (1) %d %d %d %d DEPTH %d {%p}!!!\n", image->dx, image->dy, image->width, image->height, image->depth, dev->udev); */ cfb_imageblit(info, image); ret = image_blit(dev, image->dx, image->dy, image->width, image->height, info->screen_base); - /* printk("IMAGE BLIT (2) %d %d %d %d DEPTH %d {%p} %d!!!\n", image->dx, image->dy, image->width, image->height, image->depth, dev->udev, ret); */ } static void dlfb_fillrect(struct fb_info *info, diff --git a/drivers/staging/udlfb/udlfb.h b/drivers/staging/udlfb/udlfb.h index cdf91d0d4389..245234b2f131 100644 --- a/drivers/staging/udlfb/udlfb.h +++ b/drivers/staging/udlfb/udlfb.h @@ -44,7 +44,6 @@ static void dlfb_edid(struct dlfb_data *dev_info) usb_rcvctrlpipe(dev_info->udev, 0), (0x02), (0x80 | (0x02 << 5)), i << 8, 0xA1, rbuf, 2, 0); - /*printk("ret control msg edid %d: %d [%d]\n",i, ret, rbuf[1]); */ dev_info->edid[i] = rbuf[1]; } From cc403dc67d10b895fec14b837fa2a6cb6ee6c8bd Mon Sep 17 00:00:00 2001 From: Bernie Thompson Date: Mon, 15 Feb 2010 06:45:49 -0800 Subject: [PATCH 277/367] Staging: udlfb: reorganize function order Reorganize the location of a few things to be closer to related code Signed-off-by: Bernie Thompson Signed-off-by: Greg Kroah-Hartman --- drivers/staging/udlfb/udlfb.c | 62 ++++++++++++++++------------------- drivers/staging/udlfb/udlfb.h | 3 ++ 2 files changed, 32 insertions(+), 33 deletions(-) diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c index d2adfe416a0c..3306bba9df3d 100644 --- a/drivers/staging/udlfb/udlfb.c +++ b/drivers/staging/udlfb/udlfb.c @@ -39,8 +39,17 @@ static struct fb_fix_screeninfo dlfb_fix = { .accel = FB_ACCEL_NONE, }; -#define NR_USB_REQUEST_I2C_SUB_IO 0x02 -#define NR_USB_REQUEST_CHANNEL 0x12 +/* + * There are many DisplayLink-based products, all with unique PIDs. We are able + * to support all volume ones (circa 2009) with a single driver, so we match + * globally on VID. TODO: Probe() needs to detect when we might be running + * "future" chips, and bail on those, so a compatible driver can match. + */ +static struct usb_device_id id_table[] = { + {.idVendor = 0x17e9, .match_flags = USB_DEVICE_ID_MATCH_VENDOR,}, + {}, +}; +MODULE_DEVICE_TABLE(usb, id_table); /* * Inserts a specific DisplayLink controller command into the provided @@ -252,24 +261,6 @@ error: return retval; } -/* - * This is necessary before we can communicate with the display controller. - */ -static int dlfb_select_std_channel(struct dlfb_data *dev) -{ - int ret; - u8 set_def_chn[] = { 0x57, 0xCD, 0xDC, 0xA7, - 0x1C, 0x88, 0x5E, 0x15, - 0x60, 0xFE, 0xC6, 0x97, - 0x16, 0x3D, 0x47, 0xF2 }; - - ret = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0), - NR_USB_REQUEST_CHANNEL, - (USB_DIR_OUT | USB_TYPE_VENDOR), 0, 0, - set_def_chn, sizeof(set_def_chn), USB_CTRL_SET_TIMEOUT); - return ret; -} - /* * Query EDID from the handware, then hand it off to fbdev's edid parse @@ -325,18 +316,6 @@ struct dloarea { int x2, y2; }; -/* - * There are many DisplayLink-based products, all with unique PIDs. We are able - * to support all volume ones (circa 2009) with a single driver, so we match - * globally on VID. TODO: Probe() needs to detect when we might be running - * "future" chips, and bail on those, so a compatible driver can match. - */ -static struct usb_device_id id_table[] = { - {.idVendor = 0x17e9, .match_flags = USB_DEVICE_ID_MATCH_VENDOR,}, - {}, -}; -MODULE_DEVICE_TABLE(usb, id_table); - static struct usb_driver dlfb_driver; /* thanks to Henrik Bjerregaard Pedersen for this function */ @@ -888,7 +867,6 @@ static int dlfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) } /* taken from vesafb */ - static int dlfb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue, unsigned transp, struct fb_info *info) @@ -952,6 +930,24 @@ static struct fb_ops dlfb_ops = { .fb_blank = dlfb_blank, }; +/* + * This is necessary before we can communicate with the display controller. + */ +static int dlfb_select_std_channel(struct dlfb_data *dev) +{ + int ret; + u8 set_def_chn[] = { 0x57, 0xCD, 0xDC, 0xA7, + 0x1C, 0x88, 0x5E, 0x15, + 0x60, 0xFE, 0xC6, 0x97, + 0x16, 0x3D, 0x47, 0xF2 }; + + ret = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0), + NR_USB_REQUEST_CHANNEL, + (USB_DIR_OUT | USB_TYPE_VENDOR), 0, 0, + set_def_chn, sizeof(set_def_chn), USB_CTRL_SET_TIMEOUT); + return ret; +} + static int dlfb_probe(struct usb_interface *interface, const struct usb_device_id *id) { diff --git a/drivers/staging/udlfb/udlfb.h b/drivers/staging/udlfb/udlfb.h index 245234b2f131..15f3d3a68364 100644 --- a/drivers/staging/udlfb/udlfb.h +++ b/drivers/staging/udlfb/udlfb.h @@ -26,6 +26,9 @@ struct dlfb_data { u32 pseudo_palette[256]; }; +#define NR_USB_REQUEST_I2C_SUB_IO 0x02 +#define NR_USB_REQUEST_CHANNEL 0x12 + static void dlfb_bulk_callback(struct urb *urb) { struct dlfb_data *dev_info = urb->context; From 4a4854dd2049ddc066a162a0f843dc2a78481060 Mon Sep 17 00:00:00 2001 From: Bernie Thompson Date: Mon, 15 Feb 2010 06:45:55 -0800 Subject: [PATCH 278/367] Staging: udlfb: pre-allocated urb list helpers Add functions to pre-allocate and free usb bulk urbs for core render path. Udlfb currently allocates a single urb, guarded by a mutex, that is a key bottleneck. Because udlfb sends so much data, preallocation is most efficient. Functions will be used by new rendering functions in later patches. Signed-off-by: Bernie Thompson Signed-off-by: Greg Kroah-Hartman --- drivers/staging/udlfb/udlfb.c | 192 ++++++++++++++++++++++++++++++++++ drivers/staging/udlfb/udlfb.h | 35 +++++++ 2 files changed, 227 insertions(+) diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c index 3306bba9df3d..592b1857924f 100644 --- a/drivers/staging/udlfb/udlfb.c +++ b/drivers/staging/udlfb/udlfb.c @@ -51,6 +51,13 @@ static struct usb_device_id id_table[] = { }; MODULE_DEVICE_TABLE(usb, id_table); +/* dlfb keeps a list of urbs for efficient bulk transfers */ +static void dlfb_urb_completion(struct urb *urb); +static struct urb *dlfb_get_urb(struct dlfb_data *dev); +static int dlfb_submit_urb(struct dlfb_data *dev, struct urb * urb, size_t len); +static int dlfb_alloc_urb_list(struct dlfb_data *dev, int count, size_t size); +static void dlfb_free_urb_list(struct dlfb_data *dev); + /* * Inserts a specific DisplayLink controller command into the provided * buffer. @@ -901,6 +908,21 @@ static int dlfb_release(struct fb_info *info, int user) return 0; } +/* + * Called when all client interfaces to start transactions have been disabled, + * and all references to our device instance (dlfb_data) are released. + * Every transaction must have a reference, so we know are fully spun down + */ +static void dlfb_delete(struct kref *kref) +{ + struct dlfb_data *dev = container_of(kref, struct dlfb_data, kref); + + if (dev->backing_buffer) + vfree(dev->backing_buffer); + + kfree(dev); +} + static int dlfb_blank(int blank_mode, struct fb_info *info) { struct dlfb_data *dev_info = info->par; @@ -974,6 +996,7 @@ static int dlfb_probe(struct usb_interface *interface, mutex_init(&dev->bulk_mutex); dev->udev = usbdev; + dev->gdev = &usbdev->dev; /* our generic struct device * */ dev->interface = interface; usb_set_intfdata(interface, dev); @@ -1168,6 +1191,175 @@ static void __exit dlfb_exit(void) module_init(dlfb_init); module_exit(dlfb_exit); +static void dlfb_urb_completion(struct urb *urb) +{ + struct urb_node *unode = urb->context; + struct dlfb_data *dev = unode->dev; + unsigned long flags; + + /* sync/async unlink faults aren't errors */ + if (urb->status) { + if (!(urb->status == -ENOENT || + urb->status == -ECONNRESET || + urb->status == -ESHUTDOWN)) { + dl_err("%s - nonzero write bulk status received: %d\n", + __func__, urb->status); + atomic_set(&dev->lost_pixels, 1); + } + } + + urb->transfer_buffer_length = dev->urbs.size; /* reset to actual */ + + spin_lock_irqsave(&dev->urbs.lock, flags); + list_add_tail(&unode->entry, &dev->urbs.list); + dev->urbs.available++; + spin_unlock_irqrestore(&dev->urbs.lock, flags); + + up(&dev->urbs.limit_sem); +} + +static void dlfb_free_urb_list(struct dlfb_data *dev) +{ + int count = dev->urbs.count; + struct list_head *node; + struct urb_node *unode; + struct urb *urb; + int ret; + unsigned long flags; + + dl_notice("Waiting for completes and freeing all render urbs\n"); + + /* keep waiting and freeing, until we've got 'em all */ + while (count--) { + /* Timeout means a memory leak and/or fault */ + ret = down_timeout(&dev->urbs.limit_sem, FREE_URB_TIMEOUT); + if (ret) { + BUG_ON(ret); + break; + } + spin_lock_irqsave(&dev->urbs.lock, flags); + + node = dev->urbs.list.next; /* have reserved one with sem */ + list_del_init(node); + + spin_unlock_irqrestore(&dev->urbs.lock, flags); + + unode = list_entry(node, struct urb_node, entry); + urb = unode->urb; + + /* Free each separately allocated piece */ + usb_buffer_free(urb->dev, dev->urbs.size, + urb->transfer_buffer, urb->transfer_dma); + usb_free_urb(urb); + kfree(node); + } + + kref_put(&dev->kref, dlfb_delete); + +} + +static int dlfb_alloc_urb_list(struct dlfb_data *dev, int count, size_t size) +{ + int i = 0; + struct urb *urb; + struct urb_node *unode; + char *buf; + + spin_lock_init(&dev->urbs.lock); + + dev->urbs.size = size; + INIT_LIST_HEAD(&dev->urbs.list); + + while (i < count) { + unode = kzalloc(sizeof(struct urb_node), GFP_KERNEL); + if (!unode) + break; + unode->dev = dev; + + urb = usb_alloc_urb(0, GFP_KERNEL); + if (!urb) { + kfree(unode); + break; + } + unode->urb = urb; + + buf = usb_buffer_alloc(dev->udev, MAX_TRANSFER, GFP_KERNEL, + &urb->transfer_dma); + if (!buf) { + kfree(unode); + usb_free_urb(urb); + break; + } + + /* urb->transfer_buffer_length set to actual before submit */ + usb_fill_bulk_urb(urb, dev->udev, usb_sndbulkpipe(dev->udev, 1), + buf, size, dlfb_urb_completion, unode); + urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; + + list_add_tail(&unode->entry, &dev->urbs.list); + + i++; + } + + sema_init(&dev->urbs.limit_sem, i); + dev->urbs.count = i; + dev->urbs.available = i; + + kref_get(&dev->kref); /* released in free_render_urbs() */ + + dl_notice("allocated %d %d byte urbs \n", i, (int) size); + + return i; +} + +static struct urb *dlfb_get_urb(struct dlfb_data *dev) +{ + int ret = 0; + struct list_head *entry; + struct urb_node *unode; + struct urb *urb = NULL; + unsigned long flags; + + /* Wait for an in-flight buffer to complete and get re-queued */ + ret = down_timeout(&dev->urbs.limit_sem, GET_URB_TIMEOUT); + if (ret) { + atomic_set(&dev->lost_pixels, 1); + dl_err("wait for urb interrupted: %x\n", ret); + goto error; + } + + spin_lock_irqsave(&dev->urbs.lock, flags); + + BUG_ON(list_empty(&dev->urbs.list)); /* reserved one with limit_sem */ + entry = dev->urbs.list.next; + list_del_init(entry); + dev->urbs.available--; + + spin_unlock_irqrestore(&dev->urbs.lock, flags); + + unode = list_entry(entry, struct urb_node, entry); + urb = unode->urb; + +error: + return urb; +} + +static int dlfb_submit_urb(struct dlfb_data *dev, struct urb *urb, size_t len) +{ + int ret; + + BUG_ON(len > dev->urbs.size); + + urb->transfer_buffer_length = len; /* set to actual payload len */ + ret = usb_submit_urb(urb, GFP_KERNEL); + if (ret) { + dlfb_urb_completion(urb); /* because no one else will */ + atomic_set(&dev->lost_pixels, 1); + dl_err("usb_submit_urb error %x\n", ret); + } + return ret; +} + MODULE_AUTHOR("Roberto De Ioris , " "Jaya Kumar "); MODULE_DESCRIPTION(DRIVER_VERSION); diff --git a/drivers/staging/udlfb/udlfb.h b/drivers/staging/udlfb/udlfb.h index 15f3d3a68364..13f992fe45f7 100644 --- a/drivers/staging/udlfb/udlfb.h +++ b/drivers/staging/udlfb/udlfb.h @@ -5,16 +5,35 @@ #define BUF_HIGH_WATER_MARK 1024 #define BUF_SIZE (64*1024) +struct urb_node { + struct list_head entry; + struct dlfb_data *dev; + struct urb *urb; +}; + +struct urb_list { + struct list_head list; + spinlock_t lock; + struct semaphore limit_sem; + int available; + int count; + size_t size; +}; + struct dlfb_data { struct usb_device *udev; + struct device *gdev; /* &udev->dev */ struct usb_interface *interface; struct urb *tx_urb, *ctrl_urb; struct usb_ctrlrequest dr; struct fb_info *info; + struct urb_list urbs; + struct kref kref; char *buf; char *bufend; char *backing_buffer; struct mutex bulk_mutex; + atomic_t lost_pixels; /* 1 = a render op failed. Need screen refresh */ char edid[128]; int screen_size; int line_length; @@ -29,6 +48,14 @@ struct dlfb_data { #define NR_USB_REQUEST_I2C_SUB_IO 0x02 #define NR_USB_REQUEST_CHANNEL 0x12 +/* -BULK_SIZE as per usb-skeleton. Can we get full page and avoid overhead? */ +#define BULK_SIZE 512 +#define MAX_TRANSFER (PAGE_SIZE*16 - BULK_SIZE) +#define WRITES_IN_FLIGHT (4) + +#define GET_URB_TIMEOUT HZ +#define FREE_URB_TIMEOUT (HZ*2) + static void dlfb_bulk_callback(struct urb *urb) { struct dlfb_data *dev_info = urb->context; @@ -72,4 +99,12 @@ static int dlfb_bulk_msg(struct dlfb_data *dev_info, int len) #define dlfb_set_register insert_command +#define dl_err(format, arg...) \ + dev_err(dev->gdev, "dlfb: " format, ## arg) +#define dl_warn(format, arg...) \ + dev_warn(dev->gdev, "dlfb: " format, ## arg) +#define dl_notice(format, arg...) \ + dev_notice(dev->gdev, "dlfb: " format, ## arg) +#define dl_info(format, arg...) \ + dev_info(dev->gdev, "dlfb: " format, ## arg) #endif From 4574203f45eb26b3fd76a171a77dd298dc1dc1ae Mon Sep 17 00:00:00 2001 From: Bernie Thompson Date: Mon, 15 Feb 2010 06:46:04 -0800 Subject: [PATCH 279/367] Staging: udlfb: clean up function naming Move to more consistent naming scheme All udlfb functions start with udlfb_ All functions for udlfb's fbdev interface start with udlfb_ops_ All functinos for udlfb's usb interface start with udlfb_usb_ Signed-off-by: Bernie Thompson Signed-off-by: Greg Kroah-Hartman --- drivers/staging/udlfb/udlfb.c | 133 +++++++++++++++++----------------- 1 file changed, 67 insertions(+), 66 deletions(-) diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c index 592b1857924f..8d8372fd1b36 100644 --- a/drivers/staging/udlfb/udlfb.c +++ b/drivers/staging/udlfb/udlfb.c @@ -62,7 +62,7 @@ static void dlfb_free_urb_list(struct dlfb_data *dev); * Inserts a specific DisplayLink controller command into the provided * buffer. */ -static char *insert_command(char *buf, u8 reg, u8 val) +static char *dlfb_set_register(char *buf, u8 reg, u8 val) { *buf++ = 0xAF; *buf++ = 0x20; @@ -71,59 +71,59 @@ static char *insert_command(char *buf, u8 reg, u8 val) return buf; } -static char *insert_vidreg_lock(char *buf) +static char *dlfb_vidreg_lock(char *buf) { - return insert_command(buf, 0xFF, 0x00); + return dlfb_set_register(buf, 0xFF, 0x00); } -static char *insert_vidreg_unlock(char *buf) +static char *dlfb_vidreg_unlock(char *buf) { - return insert_command(buf, 0xFF, 0xFF); + return dlfb_set_register(buf, 0xFF, 0xFF); } /* * Once you send this command, the DisplayLink framebuffer gets driven to the * display. */ -static char *insert_enable_hvsync(char *buf) +static char *dlfb_enable_hvsync(char *buf) { - return insert_command(buf, 0x1F, 0x00); + return dlfb_set_register(buf, 0x1F, 0x00); } -static char *insert_set_color_depth(char *buf, u8 selection) +static char *dlfb_set_color_depth(char *buf, u8 selection) { - return insert_command(buf, 0x00, selection); + return dlfb_set_register(buf, 0x00, selection); } -static char *insert_set_base16bpp(char *wrptr, u32 base) +static char *dlfb_set_base16bpp(char *wrptr, u32 base) { /* the base pointer is 16 bits wide, 0x20 is hi byte. */ - wrptr = insert_command(wrptr, 0x20, base >> 16); - wrptr = insert_command(wrptr, 0x21, base >> 8); - return insert_command(wrptr, 0x22, base); + wrptr = dlfb_set_register(wrptr, 0x20, base >> 16); + wrptr = dlfb_set_register(wrptr, 0x21, base >> 8); + return dlfb_set_register(wrptr, 0x22, base); } -static char *insert_set_base8bpp(char *wrptr, u32 base) +static char *dlfb_set_base8bpp(char *wrptr, u32 base) { - wrptr = insert_command(wrptr, 0x26, base >> 16); - wrptr = insert_command(wrptr, 0x27, base >> 8); - return insert_command(wrptr, 0x28, base); + wrptr = dlfb_set_register(wrptr, 0x26, base >> 16); + wrptr = dlfb_set_register(wrptr, 0x27, base >> 8); + return dlfb_set_register(wrptr, 0x28, base); } -static char *insert_command_16(char *wrptr, u8 reg, u16 value) +static char *dlfb_set_register_16(char *wrptr, u8 reg, u16 value) { - wrptr = insert_command(wrptr, reg, value >> 8); - return insert_command(wrptr, reg+1, value); + wrptr = dlfb_set_register(wrptr, reg, value >> 8); + return dlfb_set_register(wrptr, reg+1, value); } /* * This is kind of weird because the controller takes some * register values in a different byte order than other registers. */ -static char *insert_command_16be(char *wrptr, u8 reg, u16 value) +static char *dlfb_set_register_16be(char *wrptr, u8 reg, u16 value) { - wrptr = insert_command(wrptr, reg, value); - return insert_command(wrptr, reg+1, value >> 8); + wrptr = dlfb_set_register(wrptr, reg, value); + return dlfb_set_register(wrptr, reg+1, value >> 8); } /* @@ -152,64 +152,65 @@ static u16 lfsr16(u16 actual_count) * This does LFSR conversion on the value that is to be written. * See LFSR explanation above for more detail. */ -static char *insert_command_lfsr16(char *wrptr, u8 reg, u16 value) +static char *dlfb_set_register_lfsr16(char *wrptr, u8 reg, u16 value) { - return insert_command_16(wrptr, reg, lfsr16(value)); + return dlfb_set_register_16(wrptr, reg, lfsr16(value)); } /* * This takes a standard fbdev screeninfo struct and all of its monitor mode * details and converts them into the DisplayLink equivalent register commands. */ -static char *insert_set_vid_cmds(char *wrptr, struct fb_var_screeninfo *var) +static char *dlfb_set_vid_cmds(char *wrptr, struct fb_var_screeninfo *var) { u16 xds, yds; u16 xde, yde; u16 yec; - /* x display start */ xds = var->left_margin + var->hsync_len; - wrptr = insert_command_lfsr16(wrptr, 0x01, xds); + wrptr = dlfb_set_register_lfsr16(wrptr, 0x01, xds); /* x display end */ xde = xds + var->xres; - wrptr = insert_command_lfsr16(wrptr, 0x03, xde); + wrptr = dlfb_set_register_lfsr16(wrptr, 0x03, xde); /* y display start */ yds = var->upper_margin + var->vsync_len; - wrptr = insert_command_lfsr16(wrptr, 0x05, yds); + wrptr = dlfb_set_register_lfsr16(wrptr, 0x05, yds); /* y display end */ yde = yds + var->yres; - wrptr = insert_command_lfsr16(wrptr, 0x07, yde); + wrptr = dlfb_set_register_lfsr16(wrptr, 0x07, yde); /* x end count is active + blanking - 1 */ - wrptr = insert_command_lfsr16(wrptr, 0x09, xde + var->right_margin - 1); + wrptr = dlfb_set_register_lfsr16(wrptr, 0x09, + xde + var->right_margin - 1); /* libdlo hardcodes hsync start to 1 */ - wrptr = insert_command_lfsr16(wrptr, 0x0B, 1); + wrptr = dlfb_set_register_lfsr16(wrptr, 0x0B, 1); /* hsync end is width of sync pulse + 1 */ - wrptr = insert_command_lfsr16(wrptr, 0x0D, var->hsync_len + 1); + wrptr = dlfb_set_register_lfsr16(wrptr, 0x0D, var->hsync_len + 1); /* hpixels is active pixels */ - wrptr = insert_command_16(wrptr, 0x0F, var->xres); + wrptr = dlfb_set_register_16(wrptr, 0x0F, var->xres); /* yendcount is vertical active + vertical blanking */ yec = var->yres + var->upper_margin + var->lower_margin + var->vsync_len; - wrptr = insert_command_lfsr16(wrptr, 0x11, yec); + wrptr = dlfb_set_register_lfsr16(wrptr, 0x11, yec); /* libdlo hardcodes vsync start to 0 */ - wrptr = insert_command_lfsr16(wrptr, 0x13, 0); + wrptr = dlfb_set_register_lfsr16(wrptr, 0x13, 0); /* vsync end is width of vsync pulse */ - wrptr = insert_command_lfsr16(wrptr, 0x15, var->vsync_len); + wrptr = dlfb_set_register_lfsr16(wrptr, 0x15, var->vsync_len); /* vpixels is active pixels */ - wrptr = insert_command_16(wrptr, 0x17, var->yres); + wrptr = dlfb_set_register_16(wrptr, 0x17, var->yres); /* convert picoseconds to 5kHz multiple for pclk5k = x * 1E12/5k */ - wrptr = insert_command_16be(wrptr, 0x1B, 200*1000*1000/var->pixclock); + wrptr = dlfb_set_register_16be(wrptr, 0x1B, + 200*1000*1000/var->pixclock); return wrptr; } @@ -234,16 +235,16 @@ static int dlfb_set_video_mode(struct dlfb_data *dev, * controller * associated with the display. There are 2 base * pointers, currently, we only * use the 16 bpp segment. */ - wrptr = insert_vidreg_lock(buf); - wrptr = insert_set_color_depth(wrptr, 0x00); + wrptr = dlfb_vidreg_lock(buf); + wrptr = dlfb_set_color_depth(wrptr, 0x00); /* set base for 16bpp segment to 0 */ - wrptr = insert_set_base16bpp(wrptr, 0); + wrptr = dlfb_set_base16bpp(wrptr, 0); /* set base for 8bpp segment to end of fb */ - wrptr = insert_set_base8bpp(wrptr, dev->info->fix.smem_len); + wrptr = dlfb_set_base8bpp(wrptr, dev->info->fix.smem_len); - wrptr = insert_set_vid_cmds(wrptr, var); - wrptr = insert_enable_hvsync(wrptr); - wrptr = insert_vidreg_unlock(wrptr); + wrptr = dlfb_set_vid_cmds(wrptr, var); + wrptr = dlfb_enable_hvsync(wrptr); + wrptr = dlfb_vidreg_unlock(wrptr); writesize = wrptr - buf; @@ -284,7 +285,7 @@ static int dlfb_get_var_from_edid(struct dlfb_data *dev, return ret; } -static int dlfb_mmap(struct fb_info *info, struct vm_area_struct *vma) +static int dlfb_ops_mmap(struct fb_info *info, struct vm_area_struct *vma) { unsigned long start = vma->vm_start; unsigned long size = vma->vm_end - vma->vm_start; @@ -781,18 +782,18 @@ copyarea(struct dlfb_data *dev_info, int dx, int dy, int sx, int sy, return 1; } -static void dlfb_copyarea(struct fb_info *info, const struct fb_copyarea *area) +static void dlfb_ops_copyarea(struct fb_info *info, + const struct fb_copyarea *area) { - struct dlfb_data *dev = info->par; copyarea(dev, area->dx, area->dy, area->sx, area->sy, area->width, area->height); } -static void dlfb_imageblit(struct fb_info *info, const struct fb_image *image) +static void dlfb_ops_imageblit(struct fb_info *info, + const struct fb_image *image) { - int ret; struct dlfb_data *dev = info->par; cfb_imageblit(info, image); @@ -801,7 +802,7 @@ static void dlfb_imageblit(struct fb_info *info, const struct fb_image *image) info->screen_base); } -static void dlfb_fillrect(struct fb_info *info, +static void dlfb_ops_fillrect(struct fb_info *info, const struct fb_fillrect *region) { @@ -817,9 +818,9 @@ static void dlfb_fillrect(struct fb_info *info, } -static int dlfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) +static int dlfb_ops_ioctl(struct fb_info *info, unsigned int cmd, + unsigned long arg) { - struct dlfb_data *dev_info = info->par; struct dloarea *area = NULL; @@ -875,7 +876,7 @@ static int dlfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) /* taken from vesafb */ static int -dlfb_setcolreg(unsigned regno, unsigned red, unsigned green, +dlfb_ops_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue, unsigned transp, struct fb_info *info) { int err = 0; @@ -900,7 +901,7 @@ dlfb_setcolreg(unsigned regno, unsigned red, unsigned green, return err; } -static int dlfb_release(struct fb_info *info, int user) +static int dlfb_ops_release(struct fb_info *info, int user) { struct dlfb_data *dev_info = info->par; image_blit(dev_info, 0, 0, info->var.xres, info->var.yres, @@ -923,7 +924,7 @@ static void dlfb_delete(struct kref *kref) kfree(dev); } -static int dlfb_blank(int blank_mode, struct fb_info *info) +static int dlfb_ops_blank(int blank_mode, struct fb_info *info) { struct dlfb_data *dev_info = info->par; char *bufptr = dev_info->buf; @@ -942,14 +943,14 @@ static int dlfb_blank(int blank_mode, struct fb_info *info) } static struct fb_ops dlfb_ops = { - .fb_setcolreg = dlfb_setcolreg, - .fb_fillrect = dlfb_fillrect, - .fb_copyarea = dlfb_copyarea, - .fb_imageblit = dlfb_imageblit, - .fb_mmap = dlfb_mmap, - .fb_ioctl = dlfb_ioctl, - .fb_release = dlfb_release, - .fb_blank = dlfb_blank, + .fb_setcolreg = dlfb_ops_setcolreg, + .fb_fillrect = dlfb_ops_fillrect, + .fb_copyarea = dlfb_ops_copyarea, + .fb_imageblit = dlfb_ops_imageblit, + .fb_mmap = dlfb_ops_mmap, + .fb_ioctl = dlfb_ops_ioctl, + .fb_release = dlfb_ops_release, + .fb_blank = dlfb_ops_blank, }; /* From 7d9485e2c53caaaed9606a39de1c2746cc9ba262 Mon Sep 17 00:00:00 2001 From: Bernie Thompson Date: Mon, 15 Feb 2010 06:46:08 -0800 Subject: [PATCH 280/367] Staging: udlfb: Add functions to expose sysfs metrics and controls Add sysfs controls for edid and performance metrics There are 8 new files exposed in /sys/class/graphics/fb* edid - returns 128 byte edid blog, suitable for parsing with parse-edid metrics_bytes_identical metrics_bytes_rendered metrics_bytes_sent metrics_cpu_kcycles_used metrics_misc and metrics_reset, which resets all perf metrics to zero The 6 perf metrics are of type atomic_t. So these metrics return precise results for short benchmarks, but any test approx a minute or longer runtime may roll over. Signed-off-by: Bernie Thompson Signed-off-by: Greg Kroah-Hartman --- drivers/staging/udlfb/udlfb.c | 251 ++++++++++++++++++++++++++++++++++ drivers/staging/udlfb/udlfb.h | 18 +++ 2 files changed, 269 insertions(+) diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c index 8d8372fd1b36..01672df7a243 100644 --- a/drivers/staging/udlfb/udlfb.c +++ b/drivers/staging/udlfb/udlfb.c @@ -818,6 +818,21 @@ static void dlfb_ops_fillrect(struct fb_info *info, } +static void dlfb_get_edid(struct dlfb_data *dev) +{ + int i; + int ret; + char rbuf[2]; + + for (i = 0; i < sizeof(dev->edid); i++) { + ret = usb_control_msg(dev->udev, + usb_rcvctrlpipe(dev->udev, 0), (0x02), + (0x80 | (0x02 << 5)), i << 8, 0xA1, rbuf, 2, + 0); + dev->edid[i] = rbuf[1]; + } +} + static int dlfb_ops_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) { @@ -924,6 +939,33 @@ static void dlfb_delete(struct kref *kref) kfree(dev); } +/* + * Check whether a video mode is supported by the DisplayLink chip + * We start from monitor's modes, so don't need to filter that here + */ +static int dlfb_is_valid_mode(struct fb_videomode *mode, + struct fb_info *info) +{ + struct dlfb_data *dev = info->par; + + if (mode->xres * mode->yres > dev->sku_pixel_limit) + return 0; + + return 1; +} + +static void dlfb_var_color_format(struct fb_var_screeninfo *var) +{ + const struct fb_bitfield red = { 11, 5, 0 }; + const struct fb_bitfield green = { 5, 6, 0 }; + const struct fb_bitfield blue = { 0, 5, 0 }; + + var->bits_per_pixel = 16; + var->red = red; + var->green = green; + var->blue = blue; +} + static int dlfb_ops_blank(int blank_mode, struct fb_info *info) { struct dlfb_data *dev_info = info->par; @@ -953,6 +995,215 @@ static struct fb_ops dlfb_ops = { .fb_blank = dlfb_ops_blank, }; +/* + * Calls dlfb_get_edid() to query the EDID of attached monitor via usb cmds + * Then parses EDID into three places used by various parts of fbdev: + * fb_var_screeninfo contains the timing of the monitor's preferred mode + * fb_info.monspecs is full parsed EDID info, including monspecs.modedb + * fb_info.modelist is a linked list of all monitor & VESA modes which work + * + * If EDID is not readable/valid, then modelist is all VESA modes, + * monspecs is NULL, and fb_var_screeninfo is set to safe VESA mode + * Returns 0 if EDID parses successfully + */ +static int dlfb_parse_edid(struct dlfb_data *dev, + struct fb_var_screeninfo *var, + struct fb_info *info) +{ + int i; + const struct fb_videomode *default_vmode = NULL; + int result = 0; + + fb_destroy_modelist(&info->modelist); + memset(&info->monspecs, 0, sizeof(info->monspecs)); + + dlfb_get_edid(dev); + fb_edid_to_monspecs(dev->edid, &info->monspecs); + + if (info->monspecs.modedb_len > 0) { + + for (i = 0; i < info->monspecs.modedb_len; i++) { + if (dlfb_is_valid_mode(&info->monspecs.modedb[i], info)) + fb_add_videomode(&info->monspecs.modedb[i], + &info->modelist); + } + + default_vmode = fb_find_best_display(&info->monspecs, + &info->modelist); + } else { + struct fb_videomode fb_vmode = {0}; + + dl_err("Unable to get valid EDID from device/display\n"); + result = 1; + + /* + * Add the standard VESA modes to our modelist + * Since we don't have EDID, there may be modes that + * overspec monitor and/or are incorrect aspect ratio, etc. + * But at least the user has a chance to choose + */ + for (i = 0; i < VESA_MODEDB_SIZE; i++) { + if (dlfb_is_valid_mode((struct fb_videomode *) + &vesa_modes[i], info)) + fb_add_videomode(&vesa_modes[i], + &info->modelist); + } + + /* + * default to resolution safe for projectors + * (since they are most common case without EDID) + */ + fb_vmode.xres = 800; + fb_vmode.yres = 600; + fb_vmode.refresh = 60; + default_vmode = fb_find_nearest_mode(&fb_vmode, + &info->modelist); + } + + fb_videomode_to_var(var, default_vmode); + dlfb_var_color_format(var); + + return result; +} + +static ssize_t metrics_bytes_rendered_show(struct device *fbdev, + struct device_attribute *a, char *buf) { + struct fb_info *fb_info = dev_get_drvdata(fbdev); + struct dlfb_data *dev = fb_info->par; + return snprintf(buf, PAGE_SIZE, "%u\n", + atomic_read(&dev->bytes_rendered)); +} + +static ssize_t metrics_bytes_identical_show(struct device *fbdev, + struct device_attribute *a, char *buf) { + struct fb_info *fb_info = dev_get_drvdata(fbdev); + struct dlfb_data *dev = fb_info->par; + return snprintf(buf, PAGE_SIZE, "%u\n", + atomic_read(&dev->bytes_identical)); +} + +static ssize_t metrics_bytes_sent_show(struct device *fbdev, + struct device_attribute *a, char *buf) { + struct fb_info *fb_info = dev_get_drvdata(fbdev); + struct dlfb_data *dev = fb_info->par; + return snprintf(buf, PAGE_SIZE, "%u\n", + atomic_read(&dev->bytes_sent)); +} + +static ssize_t metrics_cpu_kcycles_used_show(struct device *fbdev, + struct device_attribute *a, char *buf) { + struct fb_info *fb_info = dev_get_drvdata(fbdev); + struct dlfb_data *dev = fb_info->par; + return snprintf(buf, PAGE_SIZE, "%u\n", + atomic_read(&dev->cpu_kcycles_used)); +} + +static ssize_t metrics_misc_show(struct device *fbdev, + struct device_attribute *a, char *buf) { + struct fb_info *fb_info = dev_get_drvdata(fbdev); + struct dlfb_data *dev = fb_info->par; + return snprintf(buf, PAGE_SIZE, + "Calls to\ndamage: %u\nblit: %u\n" + "defio faults: %u\ncopy: %u\n" + "fill: %u\n\n" + "active framebuffer clients: %d\n" + "urbs available %d(%d)\n" + "Shadow framebuffer in use? %s\n" + "Any lost pixels? %s\n", + atomic_read(&dev->damage_count), + atomic_read(&dev->blit_count), + atomic_read(&dev->defio_fault_count), + atomic_read(&dev->copy_count), + atomic_read(&dev->fill_count), + dev->fb_count, + dev->urbs.available, dev->urbs.limit_sem.count, + (dev->backing_buffer) ? "yes" : "no", + atomic_read(&dev->lost_pixels) ? "yes" : "no"); +} + +static ssize_t edid_show(struct kobject *kobj, struct bin_attribute *a, + char *buf, loff_t off, size_t count) { + struct device *fbdev = container_of(kobj, struct device, kobj); + struct fb_info *fb_info = dev_get_drvdata(fbdev); + struct dlfb_data *dev = fb_info->par; + char *edid = &dev->edid[0]; + const size_t size = sizeof(dev->edid); + + if (dlfb_parse_edid(dev, &fb_info->var, fb_info)) + return 0; + + if (off >= size) + return 0; + + if (off + count > size) + count = size - off; + memcpy(buf, edid + off, count); + + return count; +} + + +static ssize_t metrics_reset_store(struct device *fbdev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct fb_info *fb_info = dev_get_drvdata(fbdev); + struct dlfb_data *dev = fb_info->par; + + atomic_set(&dev->bytes_rendered, 0); + atomic_set(&dev->bytes_identical, 0); + atomic_set(&dev->bytes_sent, 0); + atomic_set(&dev->cpu_kcycles_used, 0); + atomic_set(&dev->blit_count, 0); + atomic_set(&dev->copy_count, 0); + atomic_set(&dev->fill_count, 0); + atomic_set(&dev->defio_fault_count, 0); + atomic_set(&dev->damage_count, 0); + + return count; +} + +static ssize_t use_defio_show(struct device *fbdev, + struct device_attribute *a, char *buf) { + struct fb_info *fb_info = dev_get_drvdata(fbdev); + struct dlfb_data *dev = fb_info->par; + return snprintf(buf, PAGE_SIZE, "%d\n", + atomic_read(&dev->use_defio)); +} + +static ssize_t use_defio_store(struct device *fbdev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct fb_info *fb_info = dev_get_drvdata(fbdev); + struct dlfb_data *dev = fb_info->par; + + if (count > 0) { + if (buf[0] == '0') + atomic_set(&dev->use_defio, 0); + if (buf[0] == '1') + atomic_set(&dev->use_defio, 1); + } + return count; +} + +static struct bin_attribute edid_attr = { + .attr.name = "edid", + .attr.mode = 0444, + .size = 128, + .read = edid_show, +}; + +static struct device_attribute fb_device_attrs[] = { + __ATTR_RO(metrics_bytes_rendered), + __ATTR_RO(metrics_bytes_identical), + __ATTR_RO(metrics_bytes_sent), + __ATTR_RO(metrics_cpu_kcycles_used), + __ATTR_RO(metrics_misc), + __ATTR(metrics_reset, S_IWUGO, NULL, metrics_reset_store), + __ATTR_RW(use_defio), +}; + /* * This is necessary before we can communicate with the display controller. */ diff --git a/drivers/staging/udlfb/udlfb.h b/drivers/staging/udlfb/udlfb.h index 13f992fe45f7..ef343a6052d6 100644 --- a/drivers/staging/udlfb/udlfb.h +++ b/drivers/staging/udlfb/udlfb.h @@ -33,8 +33,12 @@ struct dlfb_data { char *bufend; char *backing_buffer; struct mutex bulk_mutex; + int fb_count; + atomic_t usb_active; /* 0 = update virtual buffer, but no usb traffic */ atomic_t lost_pixels; /* 1 = a render op failed. Need screen refresh */ + atomic_t use_defio; /* 0 = rely on ioctls and blit/copy/fill rects */ char edid[128]; + int sku_pixel_limit; int screen_size; int line_length; struct completion done; @@ -43,6 +47,17 @@ struct dlfb_data { int base8; int base8d; u32 pseudo_palette[256]; + /* blit-only rendering path metrics, exposed through sysfs */ + atomic_t bytes_rendered; /* raw pixel-bytes driver asked to render */ + atomic_t bytes_identical; /* saved effort with backbuffer comparison */ + atomic_t bytes_sent; /* to usb, after compression including overhead */ + atomic_t cpu_kcycles_used; /* transpired during pixel processing */ + /* interface usage metrics. Clients can call driver via several */ + atomic_t blit_count; + atomic_t copy_count; + atomic_t fill_count; + atomic_t damage_count; + atomic_t defio_fault_count; }; #define NR_USB_REQUEST_I2C_SUB_IO 0x02 @@ -99,6 +114,9 @@ static int dlfb_bulk_msg(struct dlfb_data *dev_info, int len) #define dlfb_set_register insert_command +/* remove once this gets added to sysfs.h */ +#define __ATTR_RW(attr) __ATTR(attr, 0644, attr##_show, attr##_store) + #define dl_err(format, arg...) \ dev_err(dev->gdev, "dlfb: " format, ## arg) #define dl_warn(format, arg...) \ From 2469d5dbcafe064859475a8aaf8da00ab33d440c Mon Sep 17 00:00:00 2001 From: Bernie Thompson Date: Mon, 15 Feb 2010 06:46:13 -0800 Subject: [PATCH 281/367] Staging: udlfb: Rework startup and teardown to fix race conditions Rework probe to use refcounts and std functions Because the different parts of the driver (usb, fbdev) tear down in different orders, the driver previously could crash accessing data that had already been freed. Refcounting system used to handle. Reworked probe to make use of refcounts, set mode using std fbops, and set up sysfs and pre-allocated urbs. Signed-off-by: Bernie Thompson Signed-off-by: Greg Kroah-Hartman --- drivers/staging/udlfb/udlfb.c | 308 ++++++++++++++++++++++------------ drivers/staging/udlfb/udlfb.h | 3 +- 2 files changed, 200 insertions(+), 111 deletions(-) diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c index 01672df7a243..8ee55c86cff7 100644 --- a/drivers/staging/udlfb/udlfb.c +++ b/drivers/staging/udlfb/udlfb.c @@ -3,6 +3,7 @@ * * Copyright (C) 2009 Roberto De Ioris * Copyright (C) 2009 Jaya Kumar + * Copyright (C) 2009 Bernie Thompson * * This file is subject to the terms and conditions of the GNU General Public * License v2. See the file COPYING in the main directory of this archive for @@ -27,10 +28,8 @@ #include "udlfb.h" -#define DRIVER_VERSION "DisplayLink Framebuffer Driver 0.4.1" - static struct fb_fix_screeninfo dlfb_fix = { - .id = "displaylinkfb", + .id = "udlfb", .type = FB_TYPE_PACKED_PIXELS, .visual = FB_VISUAL_TRUECOLOR, .xpanstep = 0, @@ -39,6 +38,13 @@ static struct fb_fix_screeninfo dlfb_fix = { .accel = FB_ACCEL_NONE, }; +static const u32 udlfb_info_flags = FBINFO_DEFAULT | FBINFO_READS_FAST | +#ifdef FBINFO_VIRTFB + FBINFO_VIRTFB | +#endif + FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_FILLRECT | + FBINFO_HWACCEL_COPYAREA | FBINFO_MISC_ALWAYS_SETPAR; + /* * There are many DisplayLink-based products, all with unique PIDs. We are able * to support all volume ones (circa 2009) with a single driver, so we match @@ -939,6 +945,29 @@ static void dlfb_delete(struct kref *kref) kfree(dev); } +/* + * Called by fbdev as last part of unregister_framebuffer() process + * No new clients can open connections. Deallocate everything fb_info. + */ +static void dlfb_ops_destroy(struct fb_info *info) +{ + struct dlfb_data *dev = info->par; + + if (info->cmap.len != 0) + fb_dealloc_cmap(&info->cmap); + if (info->monspecs.modedb) + fb_destroy_modedb(info->monspecs.modedb); + if (info->screen_base) + vfree(info->screen_base); + + fb_destroy_modelist(&info->modelist); + + framebuffer_release(info); + + /* ref taken before register_framebuffer() for dlfb_data clients */ + kref_put(&dev->kref, dlfb_delete); +} + /* * Check whether a video mode is supported by the DisplayLink chip * We start from monitor's modes, so don't need to filter that here @@ -966,6 +995,35 @@ static void dlfb_var_color_format(struct fb_var_screeninfo *var) var->blue = blue; } +static int dlfb_ops_check_var(struct fb_var_screeninfo *var, + struct fb_info *info) +{ + struct fb_videomode mode; + + /* TODO: support dynamically changing framebuffer size */ + if ((var->xres * var->yres * 2) > info->fix.smem_len) + return -EINVAL; + + /* set device-specific elements of var unrelated to mode */ + dlfb_var_color_format(var); + + fb_var_to_videomode(&mode, var); + + if (!dlfb_is_valid_mode(&mode, info)) + return -EINVAL; + + return 0; +} + +static int dlfb_ops_set_par(struct fb_info *info) +{ + struct dlfb_data *dev = info->par; + + dl_notice("set_par mode %dx%d\n", info->var.xres, info->var.yres); + + return dlfb_set_video_mode(dev, &info->var); +} + static int dlfb_ops_blank(int blank_mode, struct fb_info *info) { struct dlfb_data *dev_info = info->par; @@ -985,6 +1043,7 @@ static int dlfb_ops_blank(int blank_mode, struct fb_info *info) } static struct fb_ops dlfb_ops = { + .owner = THIS_MODULE, .fb_setcolreg = dlfb_ops_setcolreg, .fb_fillrect = dlfb_ops_fillrect, .fb_copyarea = dlfb_ops_copyarea, @@ -993,6 +1052,8 @@ static struct fb_ops dlfb_ops = { .fb_ioctl = dlfb_ops_ioctl, .fb_release = dlfb_ops_release, .fb_blank = dlfb_ops_blank, + .fb_check_var = dlfb_ops_check_var, + .fb_set_par = dlfb_ops_set_par, }; /* @@ -1222,37 +1283,48 @@ static int dlfb_select_std_channel(struct dlfb_data *dev) return ret; } -static int dlfb_probe(struct usb_interface *interface, + +static int dlfb_usb_probe(struct usb_interface *interface, const struct usb_device_id *id) { - struct device *mydev; struct usb_device *usbdev; struct dlfb_data *dev; struct fb_info *info; int videomemorysize; + int i; unsigned char *videomemory; int retval = -ENOMEM; struct fb_var_screeninfo *var; - struct fb_bitfield red = { 11, 5, 0 }; - struct fb_bitfield green = { 5, 6, 0 }; - struct fb_bitfield blue = { 0, 5, 0 }; + int registered = 0; + u16 *pix_framebuffer; - usbdev = usb_get_dev(interface_to_usbdev(interface)); - mydev = &usbdev->dev; + /* usb initialization */ + + usbdev = interface_to_usbdev(interface); dev = kzalloc(sizeof(*dev), GFP_KERNEL); if (dev == NULL) { - dev_err(mydev, "failed alloc of dev struct\n"); - goto err_devalloc; + err("dlfb_usb_probe: failed alloc of dev struct\n"); + goto error; } + /* we need to wait for both usb and fbdev to spin down on disconnect */ + kref_init(&dev->kref); /* matching kref_put in usb .disconnect fn */ + kref_get(&dev->kref); /* matching kref_put in .fb_destroy function*/ + mutex_init(&dev->bulk_mutex); + dev->udev = usbdev; dev->gdev = &usbdev->dev; /* our generic struct device * */ - dev->interface = interface; usb_set_intfdata(interface, dev); - dev_info(mydev, "dlfb_probe: setting up DisplayLink device\n"); + if (!dlfb_alloc_urb_list(dev, WRITES_IN_FLIGHT, MAX_TRANSFER)) { + retval = -ENOMEM; + dl_err("dlfb_alloc_urb_list failed\n"); + goto error; + } + + mutex_init(&dev->fb_open_lock); /* * TODO: replace single 64K buffer with buffer list @@ -1260,8 +1332,8 @@ static int dlfb_probe(struct usb_interface *interface, */ dev->buf = kmalloc(BUF_SIZE, GFP_KERNEL); if (dev->buf == NULL) { - dev_err(mydev, "unable to allocate memory for dlfb commands\n"); - goto err_usballoc; + dl_err("unable to allocate memory for dlfb commands\n"); + goto error; } dev->bufend = dev->buf + BUF_SIZE; @@ -1270,49 +1342,51 @@ static int dlfb_probe(struct usb_interface *interface, usb_sndbulkpipe(dev->udev, 1), dev->buf, 0, dlfb_bulk_callback, dev); - /* allocates framebuffer driver structure, not framebuffer memory */ - info = framebuffer_alloc(0, mydev); - if (!info) - goto err_fballoc; + /* We don't register a new USB class. Our client interface is fbdev */ + /* allocates framebuffer driver structure, not framebuffer memory */ + info = framebuffer_alloc(0, &usbdev->dev); + if (!info) { + retval = -ENOMEM; + dl_err("framebuffer_alloc failed\n"); + goto error; + } dev->info = info; info->par = dev; info->pseudo_palette = dev->pseudo_palette; + info->fbops = &dlfb_ops; var = &info->var; - retval = dlfb_get_var_from_edid(dev, var); - if (retval) { - /* had a problem getting edid. so fallback to 640x480 */ - dev_err(mydev, "Problem %d with EDID.\n", retval); - var->xres = 640; - var->yres = 480; - } + + /* TODO set limit based on actual SKU detection */ + dev->sku_pixel_limit = 2048 * 1152; + + INIT_LIST_HEAD(&info->modelist); + dlfb_parse_edid(dev, var, info); /* * ok, now that we've got the size info, we can alloc our framebuffer. - * We are using 16bpp. */ - info->var.bits_per_pixel = 16; info->fix = dlfb_fix; info->fix.line_length = var->xres * (var->bits_per_pixel / 8); videomemorysize = info->fix.line_length * var->yres; /* * The big chunk of system memory we use as a virtual framebuffer. - * Pages don't need to be set RESERVED (non-swap) immediately on 2.6 - * remap_pfn_page() syscall in our mmap and/or defio will handle. + * TODO: Handle fbcon cursor code calling blit in interrupt context */ videomemory = vmalloc(videomemorysize); - if (!videomemory) - goto err_vidmem; - memset(videomemory, 0, videomemorysize); + if (!videomemory) { + retval = -ENOMEM; + dl_err("Virtual framebuffer alloc failed\n"); + goto error; + } info->screen_base = videomemory; info->fix.smem_len = PAGE_ALIGN(videomemorysize); info->fix.smem_start = (unsigned long) videomemory; - info->flags = - FBINFO_DEFAULT | FBINFO_READS_FAST | FBINFO_HWACCEL_IMAGEBLIT | - FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT; + info->flags = udlfb_info_flags; + /* * Second framebuffer copy, mirroring the state of the framebuffer @@ -1320,109 +1394,121 @@ static int dlfb_probe(struct usb_interface *interface, * But with imperfect damage info we may end up sending pixels over USB * that were, in fact, unchanged -- wasting limited USB bandwidth */ - dev->backing_buffer = vmalloc(dev->screen_size); + dev->backing_buffer = vmalloc(videomemorysize); if (!dev->backing_buffer) - dev_info(mydev, "No backing buffer allocated!\n"); - - info->fbops = &dlfb_ops; - - var->vmode = FB_VMODE_NONINTERLACED; - var->red = red; - var->green = green; - var->blue = blue; - - /* - * TODO: Enable FB_CONFIG_DEFIO support - - info->fbdefio = &dlfb_defio; - fb_deferred_io_init(info); - - */ + dl_warn("No shadow/backing buffer allcoated\n"); + else + memset(dev->backing_buffer, 0, videomemorysize); retval = fb_alloc_cmap(&info->cmap, 256, 0); if (retval < 0) { - dev_err(mydev, "Failed to allocate colormap\n"); - goto err_cmap; + dl_err("fb_alloc_cmap failed %x\n", retval); + goto error; } + /* ready to begin using device */ + +/* +#ifdef CONFIG_FB_DEFERRED_IO + atomic_set(&dev->use_defio, 1); +#endif +*/ + atomic_set(&dev->usb_active, 1); dlfb_select_std_channel(dev); - dlfb_set_video_mode(dev, var); - /* TODO: dlfb_dpy_update(dev); */ + dlfb_ops_check_var(var, info); + dlfb_ops_set_par(info); + + /* paint greenscreen */ +/* + pix_framebuffer = (u16 *) videomemory; + for (i = 0; i < videomemorysize / 2; i++) + pix_framebuffer[i] = 0x37e6; + + dlfb_handle_damage(dev, 0, 0, info->var.xres, info->var.yres, + videomemory); +*/ retval = register_framebuffer(info); - if (retval < 0) - goto err_regfb; + if (retval < 0) { + dl_err("register_framebuffer failed %d\n", retval); + goto error; + } + registered = 1; - /* paint "successful" green screen */ - draw_rect(dev, 0, 0, dev->info->var.xres, - dev->info->var.yres, 0x30, 0xff, 0x30); + for (i = 0; i < ARRAY_SIZE(fb_device_attrs); i++) + device_create_file(info->dev, &fb_device_attrs[i]); - dev_info(mydev, "DisplayLink USB device %d now attached, " - "using %dK of memory\n", info->node, - ((dev->backing_buffer) ? - videomemorysize * 2 : videomemorysize) >> 10); + device_create_bin_file(info->dev, &edid_attr); + + dl_err("DisplayLink USB device /dev/fb%d attached. %dx%d resolution." + " Using %dK framebuffer memory\n", info->node, + var->xres, var->yres, + ((dev->backing_buffer) ? + videomemorysize * 2 : videomemorysize) >> 10); return 0; -err_regfb: - fb_dealloc_cmap(&info->cmap); -err_cmap: - /* TODO: fb_deferred_io_cleanup(info); */ - vfree(videomemory); -err_vidmem: - framebuffer_release(info); -err_fballoc: - kfree(dev->buf); -err_usballoc: - usb_set_intfdata(interface, NULL); - usb_put_dev(dev->udev); - kfree(dev); -err_devalloc: +error: + if (dev) { + if (registered) { + unregister_framebuffer(info); + dlfb_ops_destroy(info); + } else + kref_put(&dev->kref, dlfb_delete); + + if (dev->urbs.count > 0) + dlfb_free_urb_list(dev); + kref_put(&dev->kref, dlfb_delete); /* last ref from kref_init */ + + /* dev has been deallocated. Do not dereference */ + } + return retval; } -static void dlfb_disconnect(struct usb_interface *interface) +static void dlfb_usb_disconnect(struct usb_interface *interface) { struct dlfb_data *dev; struct fb_info *info; + int i; dev = usb_get_intfdata(interface); - usb_set_intfdata(interface, NULL); - usb_put_dev(dev->udev); - - /* - * TODO: since, upon usb disconnect(), usb will cancel in-flight urbs - * and error out any new ones, look at eliminating need for mutex - */ - mutex_lock(&dev->bulk_mutex); - dev->interface = NULL; info = dev->info; - mutex_unlock(&dev->bulk_mutex); + + /* when non-active we'll update virtual framebuffer, but no new urbs */ + atomic_set(&dev->usb_active, 0); + + usb_set_intfdata(interface, NULL); + + for (i = 0; i < ARRAY_SIZE(fb_device_attrs); i++) + device_remove_file(info->dev, &fb_device_attrs[i]); + + device_remove_bin_file(info->dev, &edid_attr); + + /* this function will wait for all in-flight urbs to complete */ + dlfb_free_urb_list(dev); if (info) { - dev_info(&interface->dev, "Detaching DisplayLink device %d.\n", - info->node); + dl_notice("Detaching /dev/fb%d\n", info->node); unregister_framebuffer(info); - fb_dealloc_cmap(&info->cmap); - /* TODO: fb_deferred_io_cleanup(info); */ - fb_dealloc_cmap(&info->cmap); - vfree((void __force *)info->screen_base); - framebuffer_release(info); + dlfb_ops_destroy(info); } - if (dev->backing_buffer) - vfree(dev->backing_buffer); + /* release reference taken by kref_init in probe() */ + kref_put(&dev->kref, dlfb_delete); - kfree(dev); + /* consider dlfb_data freed */ + + return; } static struct usb_driver dlfb_driver = { .name = "udlfb", - .probe = dlfb_probe, - .disconnect = dlfb_disconnect, + .probe = dlfb_usb_probe, + .disconnect = dlfb_usb_disconnect, .id_table = id_table, }; -static int __init dlfb_init(void) +static int __init dlfb_module_init(void) { int res; @@ -1435,13 +1521,13 @@ static int __init dlfb_init(void) return res; } -static void __exit dlfb_exit(void) +static void __exit dlfb_module_exit(void) { usb_deregister(&dlfb_driver); } -module_init(dlfb_init); -module_exit(dlfb_exit); +module_init(dlfb_module_init); +module_exit(dlfb_module_exit); static void dlfb_urb_completion(struct urb *urb) { @@ -1613,6 +1699,8 @@ static int dlfb_submit_urb(struct dlfb_data *dev, struct urb *urb, size_t len) } MODULE_AUTHOR("Roberto De Ioris , " - "Jaya Kumar "); -MODULE_DESCRIPTION(DRIVER_VERSION); + "Jaya Kumar , " + "Bernie Thompson "); +MODULE_DESCRIPTION("DisplayLink kernel framebuffer driver"); MODULE_LICENSE("GPL"); + diff --git a/drivers/staging/udlfb/udlfb.h b/drivers/staging/udlfb/udlfb.h index ef343a6052d6..e6c68c654677 100644 --- a/drivers/staging/udlfb/udlfb.h +++ b/drivers/staging/udlfb/udlfb.h @@ -25,13 +25,14 @@ struct dlfb_data { struct device *gdev; /* &udev->dev */ struct usb_interface *interface; struct urb *tx_urb, *ctrl_urb; - struct usb_ctrlrequest dr; struct fb_info *info; struct urb_list urbs; struct kref kref; char *buf; char *bufend; char *backing_buffer; + struct delayed_work deferred_work; + struct mutex fb_open_lock; struct mutex bulk_mutex; int fb_count; atomic_t usb_active; /* 0 = update virtual buffer, but no usb traffic */ From 530f43a8a69d9fa10ec6d30652244bb5e2a29694 Mon Sep 17 00:00:00 2001 From: Bernie Thompson Date: Mon, 15 Feb 2010 06:46:21 -0800 Subject: [PATCH 282/367] Staging: udlfb: improved rendering performance Rework rendering for improved performance Approx 10-20% gain avg across several "benchmarks": x11perf, gtkperf, glxgears Moves from a single pre-alloc'd urb protected by a long-held mutex To a list of (4) pre-alloc'd urbs which can be dispatched asynchonously Improved rendering algorithm to hardware with lower CPU consumption, fewer system memory accesses, and slightly higher compression. Better scalability to multiple processors, especially with multiple framebuffers active. Signed-off-by: Bernie Thompson Signed-off-by: Greg Kroah-Hartman --- drivers/staging/udlfb/udlfb.c | 814 +++++++++++++--------------------- drivers/staging/udlfb/udlfb.h | 79 ++-- 2 files changed, 327 insertions(+), 566 deletions(-) diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c index 8ee55c86cff7..22f3dc310ff2 100644 --- a/drivers/staging/udlfb/udlfb.c +++ b/drivers/staging/udlfb/udlfb.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include "udlfb.h" @@ -88,12 +87,14 @@ static char *dlfb_vidreg_unlock(char *buf) } /* - * Once you send this command, the DisplayLink framebuffer gets driven to the - * display. + * On/Off for driving the DisplayLink framebuffer to the display */ -static char *dlfb_enable_hvsync(char *buf) +static char *dlfb_enable_hvsync(char *buf, bool enable) { - return dlfb_set_register(buf, 0x1F, 0x00); + if (enable) + return dlfb_set_register(buf, 0x1F, 0x00); + else + return dlfb_set_register(buf, 0x1F, 0x01); } static char *dlfb_set_color_depth(char *buf, u8 selection) @@ -233,8 +234,15 @@ static int dlfb_set_video_mode(struct dlfb_data *dev, char *wrptr; int retval = 0; int writesize; + struct urb *urb; - buf = dev->buf; + if (!atomic_read(&dev->usb_active)) + return -EPERM; + + urb = dlfb_get_urb(dev); + if (!urb) + return -ENOMEM; + buf = (char *) urb->transfer_buffer; /* * This first section has to do with setting the base address on the @@ -249,48 +257,16 @@ static int dlfb_set_video_mode(struct dlfb_data *dev, wrptr = dlfb_set_base8bpp(wrptr, dev->info->fix.smem_len); wrptr = dlfb_set_vid_cmds(wrptr, var); - wrptr = dlfb_enable_hvsync(wrptr); + wrptr = dlfb_enable_hvsync(wrptr, true); wrptr = dlfb_vidreg_unlock(wrptr); writesize = wrptr - buf; - mutex_lock(&dev->bulk_mutex); - if (!dev->interface) { /* disconnect() was called */ - mutex_unlock(&dev->bulk_mutex); - retval = -ENODEV; - goto error; - } + retval = dlfb_submit_urb(dev, urb, writesize); - retval = dlfb_bulk_msg(dev, writesize); - mutex_unlock(&dev->bulk_mutex); - if (retval) { - dev_err(&dev->udev->dev, "Problem %d with submit write bulk.\n", - retval); - goto error; - } - - return 0; - -error: return retval; } - -/* - * Query EDID from the handware, then hand it off to fbdev's edid parse - * routine which should give us back a filled in screeninfo structure. - */ -static int dlfb_get_var_from_edid(struct dlfb_data *dev, - struct fb_var_screeninfo *var) -{ - int ret; - - dlfb_edid(dev); - ret = fb_parse_edid(dev->edid, var); - - return ret; -} - static int dlfb_ops_mmap(struct fb_info *info, struct vm_area_struct *vma) { unsigned long start = vma->vm_start; @@ -323,504 +299,333 @@ static int dlfb_ops_mmap(struct fb_info *info, struct vm_area_struct *vma) } -/* ioctl structure */ -struct dloarea { - int x, y; - int w, h; - int x2, y2; -}; - -static struct usb_driver dlfb_driver; - -/* thanks to Henrik Bjerregaard Pedersen for this function */ -static char *rle_compress16(uint16_t * src, char *dst, int rem) +/* + * Trims identical data from front and back of line + * Sets new front buffer address and width + * And returns byte count of identical pixels + * Assumes CPU natural alignment (unsigned long) + * for back and front buffer ptrs and width + */ +static int dlfb_trim_hline(const u8 *bback, const u8 **bfront, int *width_bytes) { + int j, k; + const unsigned long *back = (const unsigned long *) bback; + const unsigned long *front = (const unsigned long *) *bfront; + const int width = *width_bytes / sizeof(unsigned long); + int identical = width; + int start = width; + int end = width; - int rl; - uint16_t pix0; - char *end_if_raw = dst + 6 + 2 * rem; + prefetch((void *) front); + prefetch((void *) back); - dst += 6; /* header will be filled in if RLE is worth it */ - - while (rem && dst < end_if_raw) { - char *start = (char *)src; - - pix0 = *src++; - rl = 1; - rem--; - while (rem && *src == pix0) - rem--, rl++, src++; - *dst++ = rl; - *dst++ = start[1]; - *dst++ = start[0]; + for (j = 0; j < width; j++) { + if (back[j] != front[j]) { + start = j; + break; + } } - return dst; + for (k = width - 1; k > j; k--) { + if (back[k] != front[k]) { + end = k+1; + break; + } + } + + identical = start + (width - end); + *bfront = (u8 *) &front[start]; + *width_bytes = (end - start) * sizeof(unsigned long); + + return identical * sizeof(unsigned long); } /* -Thanks to Henrik Bjerregaard Pedersen for rle implementation -and code refactoring. Next step is huffman compression. +Render a command stream for an encoded horizontal line segment of pixels. + +A command buffer holds several commands. +It always begins with a fresh command header +(the protocol doesn't require this, but we enforce it to allow +multiple buffers to be potentially encoded and sent in parallel). +A single command encodes one contiguous horizontal line of pixels + +The function relies on the client to do all allocation, so that +rendering can be done directly to output buffers (e.g. USB URBs). +The function fills the supplied command buffer, providing information +on where it left off, so the client may call in again with additional +buffers if the line will take several buffers to complete. + +A single command can transmit a maximum of 256 pixels, +regardless of the compression ratio (protocol design limit). +To the hardware, 0 for a size byte means 256 + +Rather than 256 pixel commands which are either rl or raw encoded, +the rlx command simply assumes alternating raw and rl spans within one cmd. +This has a slightly larger header overhead, but produces more even results. +It also processes all data (read and write) in a single pass. +Performance benchmarks of common cases show it having just slightly better +compression than 256 pixel raw -or- rle commands, with similar CPU consumpion. +But for very rl friendly data, will compress not quite as well. */ - -static int -image_blit(struct dlfb_data *dev_info, int x, int y, int width, int height, - char *data) +static void dlfb_compress_hline( + const uint16_t **pixel_start_ptr, + const uint16_t *const pixel_end, + uint32_t *device_address_ptr, + uint8_t **command_buffer_ptr, + const uint8_t *const cmd_buffer_end) { + const uint16_t *pixel = *pixel_start_ptr; + uint32_t dev_addr = *device_address_ptr; + uint8_t *cmd = *command_buffer_ptr; + const int bpp = 2; - int i, j, base; - int rem = width; - int ret; + while ((pixel_end > pixel) && + (cmd_buffer_end - MIN_RLX_CMD_BYTES > cmd)) { + uint8_t *raw_pixels_count_byte = 0; + uint8_t *cmd_pixels_count_byte = 0; + const uint16_t *raw_pixel_start = 0; + const uint16_t *cmd_pixel_start, *cmd_pixel_end = 0; + const uint32_t be_dev_addr = cpu_to_be32(dev_addr); - int firstdiff, thistime; + prefetchw((void *) cmd); /* pull in one cache line at least */ - char *bufptr; + *cmd++ = 0xAF; + *cmd++ = 0x6B; + *cmd++ = (uint8_t) ((be_dev_addr >> 8) & 0xFF); + *cmd++ = (uint8_t) ((be_dev_addr >> 16) & 0xFF); + *cmd++ = (uint8_t) ((be_dev_addr >> 24) & 0xFF); - if (x + width > dev_info->info->var.xres) - return -EINVAL; + cmd_pixels_count_byte = cmd++; /* we'll know this later */ + cmd_pixel_start = pixel; - if (y + height > dev_info->info->var.yres) - return -EINVAL; + raw_pixels_count_byte = cmd++; /* we'll know this later */ + raw_pixel_start = pixel; - mutex_lock(&dev_info->bulk_mutex); + cmd_pixel_end = pixel + min(MAX_CMD_PIXELS + 1, + min((int)(pixel_end - pixel), + (int)(cmd_buffer_end - cmd) / bpp)); - base = - dev_info->base16 + ((dev_info->info->var.xres * 2 * y) + (x * 2)); + prefetch_range((void *) pixel, (cmd_pixel_end - pixel) * bpp); - data += (dev_info->info->var.xres * 2 * y) + (x * 2); + while (pixel < cmd_pixel_end) { + const uint16_t * const repeating_pixel = pixel; - /* printk("IMAGE_BLIT\n"); */ + *(uint16_t *)cmd = cpu_to_be16p(pixel); + cmd += 2; + pixel++; - bufptr = dev_info->buf; + if (unlikely((pixel < cmd_pixel_end) && + (*pixel == *repeating_pixel))) { + /* go back and fill in raw pixel count */ + *raw_pixels_count_byte = ((repeating_pixel - + raw_pixel_start) + 1) & 0xFF; - for (i = y; i < y + height; i++) { - - if (dev_info->bufend - bufptr < BUF_HIGH_WATER_MARK) { - ret = dlfb_bulk_msg(dev_info, bufptr - dev_info->buf); - bufptr = dev_info->buf; - } - - rem = width; - - /* printk("WRITING LINE %d\n", i); */ - - while (rem) { - - if (dev_info->bufend - bufptr < BUF_HIGH_WATER_MARK) { - ret = - dlfb_bulk_msg(dev_info, - bufptr - dev_info->buf); - bufptr = dev_info->buf; - } - /* number of pixels to consider this time */ - thistime = rem; - if (thistime > 255) - thistime = 255; - - if (dev_info->backing_buffer) { - /* find first pixel that has changed */ - firstdiff = -1; - for (j = 0; j < thistime * 2; j++) { - if (dev_info->backing_buffer - [base - dev_info->base16 + j] - != data[j]) { - firstdiff = j / 2; - break; - } + while ((pixel < cmd_pixel_end) + && (*pixel == *repeating_pixel)) { + pixel++; } - } else { - firstdiff = 0; + /* immediately after raw data is repeat byte */ + *cmd++ = ((pixel - repeating_pixel) - 1) & 0xFF; + /* Then start another raw pixel span */ + raw_pixel_start = pixel; + raw_pixels_count_byte = cmd++; } - - if (firstdiff >= 0) { - char *end_of_rle; - - end_of_rle = - rle_compress16((uint16_t *) (data + - firstdiff * 2), - bufptr, - thistime - firstdiff); - - if (end_of_rle < - bufptr + 6 + 2 * (thistime - firstdiff)) { - bufptr[0] = 0xAF; - bufptr[1] = 0x69; - - bufptr[2] = - (char)((base + - firstdiff * 2) >> 16); - bufptr[3] = - (char)((base + firstdiff * 2) >> 8); - bufptr[4] = - (char)(base + firstdiff * 2); - bufptr[5] = thistime - firstdiff; - - bufptr = end_of_rle; - - } else { - /* fallback to raw (or other?) */ - *bufptr++ = 0xAF; - *bufptr++ = 0x68; - - *bufptr++ = - (char)((base + - firstdiff * 2) >> 16); - *bufptr++ = - (char)((base + firstdiff * 2) >> 8); - *bufptr++ = - (char)(base + firstdiff * 2); - *bufptr++ = thistime - firstdiff; - for (j = firstdiff * 2; - j < thistime * 2; j += 2) { - *bufptr++ = data[j + 1]; - *bufptr++ = data[j]; - } - } - } - - base += thistime * 2; - data += thistime * 2; - rem -= thistime; } - if (dev_info->backing_buffer) - memcpy(dev_info->backing_buffer + - (base - dev_info->base16) - - (width * 2), data - (width * 2), width * 2); - - base += (dev_info->info->var.xres * 2) - (width * 2); - data += (dev_info->info->var.xres * 2) - (width * 2); + if (pixel > raw_pixel_start) { + /* finalize last RAW span */ + *raw_pixels_count_byte = (pixel-raw_pixel_start) & 0xFF; + } + *cmd_pixels_count_byte = (pixel - cmd_pixel_start) & 0xFF; + dev_addr += (pixel - cmd_pixel_start) * bpp; } - if (bufptr > dev_info->buf) { - ret = dlfb_bulk_msg(dev_info, bufptr - dev_info->buf); + if (cmd_buffer_end <= MIN_RLX_CMD_BYTES + cmd) { + /* Fill leftover bytes with no-ops */ + if (cmd_buffer_end > cmd) + memset(cmd, 0xAF, cmd_buffer_end - cmd); + cmd = (uint8_t *) cmd_buffer_end; } - mutex_unlock(&dev_info->bulk_mutex); - - return base; + *command_buffer_ptr = cmd; + *pixel_start_ptr = pixel; + *device_address_ptr = dev_addr; + return; } -static int -draw_rect(struct dlfb_data *dev_info, int x, int y, int width, int height, - unsigned char red, unsigned char green, unsigned char blue) +/* + * There are 3 copies of every pixel: The front buffer that the fbdev + * client renders to, the actual framebuffer across the USB bus in hardware + * (that we can only write to, slowly, and can never read), and (optionally) + * our shadow copy that tracks what's been sent to that hardware buffer. + */ +static void dlfb_render_hline(struct dlfb_data *dev, struct urb **urb_ptr, + const char *front, char **urb_buf_ptr, + u32 byte_offset, u32 byte_width, + int *ident_ptr, int *sent_ptr) { + const u8 *line_start, *line_end, *next_pixel; + u32 dev_addr = dev->base16 + byte_offset; + struct urb *urb = *urb_ptr; + u8 *cmd = *urb_buf_ptr; + u8 *cmd_end = (u8 *) urb->transfer_buffer + urb->transfer_buffer_length; - int i, j, base; - int ret; - unsigned short col = - (((((red) & 0xF8) | ((green) >> 5)) & 0xFF) << 8) + - (((((green) & 0x1C) << 3) | ((blue) >> 3)) & 0xFF); - int rem = width; + line_start = (u8 *) (front + byte_offset); + next_pixel = line_start; + line_end = next_pixel + byte_width; - char *bufptr; + if (dev->backing_buffer) { + int offset; + const u8 *back_start = (u8 *) (dev->backing_buffer + + byte_offset); - if (x + width > dev_info->info->var.xres) - return -EINVAL; + *ident_ptr += dlfb_trim_hline(back_start, &next_pixel, + &byte_width); - if (y + height > dev_info->info->var.yres) - return -EINVAL; - - mutex_lock(&dev_info->bulk_mutex); - - base = dev_info->base16 + (dev_info->info->var.xres * 2 * y) + (x * 2); - - bufptr = dev_info->buf; - - for (i = y; i < y + height; i++) { - - if (dev_info->backing_buffer) { - for (j = 0; j < width * 2; j += 2) { - dev_info->backing_buffer - [base - dev_info->base16 + j] = - (char)(col >> 8); - dev_info->backing_buffer - [base - dev_info->base16 + j + 1] = - (char)(col); - } - } - - if (dev_info->bufend - bufptr < BUF_HIGH_WATER_MARK) { - ret = dlfb_bulk_msg(dev_info, bufptr - dev_info->buf); - bufptr = dev_info->buf; - } - - rem = width; - - while (rem) { - - if (dev_info->bufend - bufptr < BUF_HIGH_WATER_MARK) { - ret = - dlfb_bulk_msg(dev_info, - bufptr - dev_info->buf); - bufptr = dev_info->buf; - } - - *bufptr++ = 0xAF; - *bufptr++ = 0x69; - - *bufptr++ = (char)(base >> 16); - *bufptr++ = (char)(base >> 8); - *bufptr++ = (char)(base); - - if (rem > 255) { - *bufptr++ = 255; - *bufptr++ = 255; - rem -= 255; - base += 255 * 2; - } else { - *bufptr++ = rem; - *bufptr++ = rem; - base += rem * 2; - rem = 0; - } - - *bufptr++ = (char)(col >> 8); - *bufptr++ = (char)(col); - - } - - base += (dev_info->info->var.xres * 2) - (width * 2); + offset = next_pixel - line_start; + line_end = next_pixel + byte_width; + dev_addr += offset; + back_start += offset; + line_start += offset; + memcpy((char *)back_start, (char *) line_start, + byte_width); } - if (bufptr > dev_info->buf) - ret = dlfb_bulk_msg(dev_info, bufptr - dev_info->buf); + while (next_pixel < line_end) { - mutex_unlock(&dev_info->bulk_mutex); + dlfb_compress_hline((const uint16_t **) &next_pixel, + (const uint16_t *) line_end, &dev_addr, + (u8 **) &cmd, (u8 *) cmd_end); - return 1; + if (cmd >= cmd_end) { + int len = cmd - (u8 *) urb->transfer_buffer; + if (dlfb_submit_urb(dev, urb, len)) + return; /* lost pixels is set */ + *sent_ptr += len; + urb = dlfb_get_urb(dev); + if (!urb) + return; /* lost_pixels is set */ + *urb_ptr = urb; + cmd = urb->transfer_buffer; + cmd_end = &cmd[urb->transfer_buffer_length]; + } + } + + *urb_buf_ptr = cmd; } -static void swapfb(struct dlfb_data *dev_info) +int dlfb_handle_damage(struct dlfb_data *dev, int x, int y, + int width, int height, char *data) { - - int tmpbase; - char *bufptr; - - mutex_lock(&dev_info->bulk_mutex); - - tmpbase = dev_info->base16; - - dev_info->base16 = dev_info->base16d; - dev_info->base16d = tmpbase; - - bufptr = dev_info->buf; - - bufptr = dlfb_set_register(bufptr, 0xFF, 0x00); - - /* set addresses */ - bufptr = - dlfb_set_register(bufptr, 0x20, (char)(dev_info->base16 >> 16)); - bufptr = dlfb_set_register(bufptr, 0x21, (char)(dev_info->base16 >> 8)); - bufptr = dlfb_set_register(bufptr, 0x22, (char)(dev_info->base16)); - - bufptr = dlfb_set_register(bufptr, 0xFF, 0x00); - - dlfb_bulk_msg(dev_info, bufptr - dev_info->buf); - - mutex_unlock(&dev_info->bulk_mutex); -} - -static int copyfb(struct dlfb_data *dev_info) -{ - int base; - int source; - int rem; int i, ret; + char *cmd; + cycles_t start_cycles, end_cycles; + int bytes_sent = 0; + int bytes_identical = 0; + struct urb *urb; + int aligned_x; - char *bufptr; + start_cycles = get_cycles(); - base = dev_info->base16d; + aligned_x = DL_ALIGN_DOWN(x, sizeof(unsigned long)); + width = DL_ALIGN_UP(width + (x-aligned_x), sizeof(unsigned long)); + x = aligned_x; - mutex_lock(&dev_info->bulk_mutex); - - source = dev_info->base16; - - bufptr = dev_info->buf; - - for (i = 0; i < dev_info->info->var.yres; i++) { - - if (dev_info->bufend - bufptr < BUF_HIGH_WATER_MARK) { - ret = dlfb_bulk_msg(dev_info, bufptr - dev_info->buf); - bufptr = dev_info->buf; - } - - rem = dev_info->info->var.xres; - - while (rem) { - - if (dev_info->bufend - bufptr < BUF_HIGH_WATER_MARK) { - ret = - dlfb_bulk_msg(dev_info, - bufptr - dev_info->buf); - bufptr = dev_info->buf; - - } - - *bufptr++ = 0xAF; - *bufptr++ = 0x6A; - - *bufptr++ = (char)(base >> 16); - *bufptr++ = (char)(base >> 8); - *bufptr++ = (char)(base); - - if (rem > 255) { - *bufptr++ = 255; - *bufptr++ = (char)(source >> 16); - *bufptr++ = (char)(source >> 8); - *bufptr++ = (char)(source); - - rem -= 255; - base += 255 * 2; - source += 255 * 2; - - } else { - *bufptr++ = rem; - *bufptr++ = (char)(source >> 16); - *bufptr++ = (char)(source >> 8); - *bufptr++ = (char)(source); - - base += rem * 2; - source += rem * 2; - rem = 0; - } - } - } - - if (bufptr > dev_info->buf) - ret = dlfb_bulk_msg(dev_info, bufptr - dev_info->buf); - - mutex_unlock(&dev_info->bulk_mutex); - - return 1; - -} - -static int -copyarea(struct dlfb_data *dev_info, int dx, int dy, int sx, int sy, - int width, int height) -{ - int base; - int source; - int rem; - int i, ret; - - char *bufptr; - - if (dx + width > dev_info->info->var.xres) + if ((width <= 0) || + (x + width > dev->info->var.xres) || + (y + height > dev->info->var.yres)) return -EINVAL; - if (dy + height > dev_info->info->var.yres) - return -EINVAL; + if (!atomic_read(&dev->usb_active)) + return 0; - mutex_lock(&dev_info->bulk_mutex); + urb = dlfb_get_urb(dev); + if (!urb) + return 0; + cmd = urb->transfer_buffer; - base = - dev_info->base16 + (dev_info->info->var.xres * 2 * dy) + (dx * 2); - source = (dev_info->info->var.xres * 2 * sy) + (sx * 2); + for (i = y; i < y + height ; i++) { + const int line_offset = dev->info->fix.line_length * i; + const int byte_offset = line_offset + (x * BPP); - bufptr = dev_info->buf; - - for (i = sy; i < sy + height; i++) { - - memcpy(dev_info->backing_buffer + base - dev_info->base16, - dev_info->backing_buffer + source, width * 2); - - if (dev_info->bufend - bufptr < BUF_HIGH_WATER_MARK) { - ret = dlfb_bulk_msg(dev_info, bufptr - dev_info->buf); - bufptr = dev_info->buf; - } - - rem = width; - - while (rem) { - - if (dev_info->bufend - bufptr < BUF_HIGH_WATER_MARK) { - ret = - dlfb_bulk_msg(dev_info, - bufptr - dev_info->buf); - bufptr = dev_info->buf; - } - - *bufptr++ = 0xAF; - *bufptr++ = 0x6A; - - *bufptr++ = (char)(base >> 16); - *bufptr++ = (char)(base >> 8); - *bufptr++ = (char)(base); - - if (rem > 255) { - *bufptr++ = 255; - *bufptr++ = (char)(source >> 16); - *bufptr++ = (char)(source >> 8); - *bufptr++ = (char)(source); - - rem -= 255; - base += 255 * 2; - source += 255 * 2; - - } else { - *bufptr++ = rem; - *bufptr++ = (char)(source >> 16); - *bufptr++ = (char)(source >> 8); - *bufptr++ = (char)(source); - - base += rem * 2; - source += rem * 2; - rem = 0; - } - } - - base += (dev_info->info->var.xres * 2) - (width * 2); - source += (dev_info->info->var.xres * 2) - (width * 2); + dlfb_render_hline(dev, &urb, (char *) dev->info->fix.smem_start, + &cmd, byte_offset, width * BPP, + &bytes_identical, &bytes_sent); } - if (bufptr > dev_info->buf) - ret = dlfb_bulk_msg(dev_info, bufptr - dev_info->buf); + if (cmd > (char *) urb->transfer_buffer) { + /* Send partial buffer remaining before exiting */ + int len = cmd - (char *) urb->transfer_buffer; + ret = dlfb_submit_urb(dev, urb, len); + bytes_sent += len; + } else + dlfb_urb_completion(urb); - mutex_unlock(&dev_info->bulk_mutex); + atomic_add(bytes_sent, &dev->bytes_sent); + atomic_add(bytes_identical, &dev->bytes_identical); + atomic_add(width*height*2, &dev->bytes_rendered); + end_cycles = get_cycles(); + atomic_add(((unsigned int) ((end_cycles - start_cycles) + >> 10)), /* Kcycles */ + &dev->cpu_kcycles_used); - return 1; + return 0; } +/* hardware has native COPY command (see libdlo), but not worth it for fbcon */ static void dlfb_ops_copyarea(struct fb_info *info, - const struct fb_copyarea *area) + const struct fb_copyarea *area) { + struct dlfb_data *dev = info->par; - copyarea(dev, area->dx, area->dy, area->sx, area->sy, area->width, - area->height); +#if defined CONFIG_FB_SYS_COPYAREA || defined CONFIG_FB_SYS_COPYAREA_MODULE + + sys_copyarea(info, area); + + dlfb_handle_damage(dev, area->dx, area->dy, + area->width, area->height, info->screen_base); +#endif + atomic_inc(&dev->copy_count); + } static void dlfb_ops_imageblit(struct fb_info *info, - const struct fb_image *image) + const struct fb_image *image) { - int ret; struct dlfb_data *dev = info->par; - cfb_imageblit(info, image); - ret = - image_blit(dev, image->dx, image->dy, image->width, image->height, - info->screen_base); + +#if defined CONFIG_FB_SYS_IMAGEBLIT || defined CONFIG_FB_SYS_IMAGEBLIT_MODULE + + sys_imageblit(info, image); + + dlfb_handle_damage(dev, image->dx, image->dy, + image->width, image->height, info->screen_base); + +#endif + + atomic_inc(&dev->blit_count); } static void dlfb_ops_fillrect(struct fb_info *info, - const struct fb_fillrect *region) + const struct fb_fillrect *rect) { - - unsigned char red, green, blue; struct dlfb_data *dev = info->par; - memcpy(&red, ®ion->color, 1); - memcpy(&green, ®ion->color + 1, 1); - memcpy(&blue, ®ion->color + 2, 1); - draw_rect(dev, region->dx, region->dy, region->width, region->height, - red, green, blue); - /* printk("FILL RECT %d %d !!!\n", region->dx, region->dy); */ +#if defined CONFIG_FB_SYS_FILLRECT || defined CONFIG_FB_SYS_FILLRECT_MODULE + + sys_fillrect(info, rect); + + dlfb_handle_damage(dev, rect->dx, rect->dy, rect->width, + rect->height, info->screen_base); +#endif + + atomic_inc(&dev->fill_count); } @@ -840,21 +645,26 @@ static void dlfb_get_edid(struct dlfb_data *dev) } static int dlfb_ops_ioctl(struct fb_info *info, unsigned int cmd, - unsigned long arg) + unsigned long arg) { - struct dlfb_data *dev_info = info->par; + + struct dlfb_data *dev = info->par; struct dloarea *area = NULL; - if (cmd == 0xAD) { + if (!atomic_read(&dev->usb_active)) + return 0; + + /* TODO: Update X server to get this from sysfs instead */ + if (cmd == DLFB_IOCTL_RETURN_EDID) { char *edid = (char *)arg; - dlfb_edid(dev_info); - if (copy_to_user(edid, dev_info->edid, 128)) { + dlfb_get_edid(dev); + if (copy_to_user(edid, dev->edid, sizeof(dev->edid))) return -EFAULT; - } return 0; } - if (cmd == 0xAA || cmd == 0xAB || cmd == 0xAC) { + /* TODO: Help propose a standard fb.h ioctl to report mmap damage */ + if (cmd == DLFB_IOCTL_REPORT_DAMAGE) { area = (struct dloarea *)arg; @@ -869,29 +679,14 @@ static int dlfb_ops_ioctl(struct fb_info *info, unsigned int cmd, if (area->y > info->var.yres) area->y = info->var.yres; - } - if (cmd == 0xAA) { - image_blit(dev_info, area->x, area->y, area->w, area->h, + atomic_set(&dev->use_defio, 0); + + dlfb_handle_damage(dev, area->x, area->y, area->w, area->h, info->screen_base); + atomic_inc(&dev->damage_count); } - if (cmd == 0xAC) { - copyfb(dev_info); - image_blit(dev_info, area->x, area->y, area->w, area->h, - info->screen_base); - swapfb(dev_info); - } else if (cmd == 0xAB) { - if (area->x2 < 0) - area->x2 = 0; - - if (area->y2 < 0) - area->y2 = 0; - - copyarea(dev_info, - area->x2, area->y2, area->x, area->y, area->w, - area->h); - } return 0; } @@ -925,8 +720,6 @@ dlfb_ops_setcolreg(unsigned regno, unsigned red, unsigned green, static int dlfb_ops_release(struct fb_info *info, int user) { struct dlfb_data *dev_info = info->par; - image_blit(dev_info, 0, 0, info->var.xres, info->var.yres, - info->screen_base); return 0; } @@ -1026,18 +819,28 @@ static int dlfb_ops_set_par(struct fb_info *info) static int dlfb_ops_blank(int blank_mode, struct fb_info *info) { - struct dlfb_data *dev_info = info->par; - char *bufptr = dev_info->buf; + struct dlfb_data *dev = info->par; + char *bufptr; + struct urb *urb; - bufptr = dlfb_set_register(bufptr, 0xFF, 0x00); + urb = dlfb_get_urb(dev); + if (!urb) + return 0; + bufptr = (char *) urb->transfer_buffer; + + /* overloading usb_active. UNBLANK can conflict with teardown */ + + bufptr = dlfb_vidreg_lock(bufptr); if (blank_mode != FB_BLANK_UNBLANK) { - bufptr = dlfb_set_register(bufptr, 0x1F, 0x01); + atomic_set(&dev->usb_active, 0); + bufptr = dlfb_enable_hvsync(bufptr, false); } else { - bufptr = dlfb_set_register(bufptr, 0x1F, 0x00); + atomic_set(&dev->usb_active, 1); + bufptr = dlfb_enable_hvsync(bufptr, true); } - bufptr = dlfb_set_register(bufptr, 0xFF, 0xFF); + bufptr = dlfb_vidreg_unlock(bufptr); - dlfb_bulk_msg(dev_info, bufptr - dev_info->buf); + dlfb_submit_urb(dev, urb, bufptr - (char *) urb->transfer_buffer); return 0; } @@ -1312,8 +1115,6 @@ static int dlfb_usb_probe(struct usb_interface *interface, kref_init(&dev->kref); /* matching kref_put in usb .disconnect fn */ kref_get(&dev->kref); /* matching kref_put in .fb_destroy function*/ - mutex_init(&dev->bulk_mutex); - dev->udev = usbdev; dev->gdev = &usbdev->dev; /* our generic struct device * */ usb_set_intfdata(interface, dev); @@ -1326,22 +1127,6 @@ static int dlfb_usb_probe(struct usb_interface *interface, mutex_init(&dev->fb_open_lock); - /* - * TODO: replace single 64K buffer with buffer list - * and async dispatch - */ - dev->buf = kmalloc(BUF_SIZE, GFP_KERNEL); - if (dev->buf == NULL) { - dl_err("unable to allocate memory for dlfb commands\n"); - goto error; - } - dev->bufend = dev->buf + BUF_SIZE; - - dev->tx_urb = usb_alloc_urb(0, GFP_KERNEL); - usb_fill_bulk_urb(dev->tx_urb, dev->udev, - usb_sndbulkpipe(dev->udev, 1), dev->buf, 0, - dlfb_bulk_callback, dev); - /* We don't register a new USB class. Our client interface is fbdev */ /* allocates framebuffer driver structure, not framebuffer memory */ @@ -1420,14 +1205,13 @@ static int dlfb_usb_probe(struct usb_interface *interface, dlfb_ops_set_par(info); /* paint greenscreen */ -/* pix_framebuffer = (u16 *) videomemory; for (i = 0; i < videomemorysize / 2; i++) pix_framebuffer[i] = 0x37e6; dlfb_handle_damage(dev, 0, 0, info->var.xres, info->var.yres, videomemory); -*/ + retval = register_framebuffer(info); if (retval < 0) { dl_err("register_framebuffer failed %d\n", retval); diff --git a/drivers/staging/udlfb/udlfb.h b/drivers/staging/udlfb/udlfb.h index e6c68c654677..b07a69371f1f 100644 --- a/drivers/staging/udlfb/udlfb.h +++ b/drivers/staging/udlfb/udlfb.h @@ -1,9 +1,20 @@ #ifndef UDLFB_H #define UDLFB_H -/* as libdlo */ -#define BUF_HIGH_WATER_MARK 1024 -#define BUF_SIZE (64*1024) +/* + * TODO: Propose standard fb.h ioctl for reporting damage, + * using _IOWR() and one of the existing area structs from fb.h + * Consider these ioctls deprecated, but they're still used by the + * DisplayLink X server as yet - need both to be modified in tandem + * when new ioctl(s) are ready. + */ +#define DLFB_IOCTL_RETURN_EDID 0xAD +#define DLFB_IOCTL_REPORT_DAMAGE 0xAA +struct dloarea { + int x, y; + int w, h; + int x2, y2; +}; struct urb_node { struct list_head entry; @@ -23,30 +34,20 @@ struct urb_list { struct dlfb_data { struct usb_device *udev; struct device *gdev; /* &udev->dev */ - struct usb_interface *interface; - struct urb *tx_urb, *ctrl_urb; struct fb_info *info; struct urb_list urbs; struct kref kref; - char *buf; - char *bufend; char *backing_buffer; struct delayed_work deferred_work; struct mutex fb_open_lock; - struct mutex bulk_mutex; int fb_count; atomic_t usb_active; /* 0 = update virtual buffer, but no usb traffic */ atomic_t lost_pixels; /* 1 = a render op failed. Need screen refresh */ atomic_t use_defio; /* 0 = rely on ioctls and blit/copy/fill rects */ char edid[128]; int sku_pixel_limit; - int screen_size; - int line_length; - struct completion done; int base16; - int base16d; int base8; - int base8d; u32 pseudo_palette[256]; /* blit-only rendering path metrics, exposed through sysfs */ atomic_t bytes_rendered; /* raw pixel-bytes driver asked to render */ @@ -72,48 +73,24 @@ struct dlfb_data { #define GET_URB_TIMEOUT HZ #define FREE_URB_TIMEOUT (HZ*2) -static void dlfb_bulk_callback(struct urb *urb) -{ - struct dlfb_data *dev_info = urb->context; - complete(&dev_info->done); -} +#define BPP 2 +#define MAX_CMD_PIXELS 255 -static void dlfb_edid(struct dlfb_data *dev_info) -{ - int i; - int ret; - char rbuf[2]; +#define RLX_HEADER_BYTES 7 +#define MIN_RLX_PIX_BYTES 4 +#define MIN_RLX_CMD_BYTES (RLX_HEADER_BYTES + MIN_RLX_PIX_BYTES) - for (i = 0; i < 128; i++) { - ret = - usb_control_msg(dev_info->udev, - usb_rcvctrlpipe(dev_info->udev, 0), (0x02), - (0x80 | (0x02 << 5)), i << 8, 0xA1, rbuf, 2, - 0); - dev_info->edid[i] = rbuf[1]; - } +#define RLE_HEADER_BYTES 6 +#define MIN_RLE_PIX_BYTES 3 +#define MIN_RLE_CMD_BYTES (RLE_HEADER_BYTES + MIN_RLE_PIX_BYTES) -} +#define RAW_HEADER_BYTES 6 +#define MIN_RAW_PIX_BYTES 2 +#define MIN_RAW_CMD_BYTES (RAW_HEADER_BYTES + MIN_RAW_PIX_BYTES) -static int dlfb_bulk_msg(struct dlfb_data *dev_info, int len) -{ - int ret; - - init_completion(&dev_info->done); - - dev_info->tx_urb->actual_length = 0; - dev_info->tx_urb->transfer_buffer_length = len; - - ret = usb_submit_urb(dev_info->tx_urb, GFP_KERNEL); - if (!wait_for_completion_timeout(&dev_info->done, 1000)) { - usb_kill_urb(dev_info->tx_urb); - printk("usb timeout !!!\n"); - } - - return dev_info->tx_urb->actual_length; -} - -#define dlfb_set_register insert_command +/* remove these once align.h patch is taken into kernel */ +#define DL_ALIGN_UP(x, a) ALIGN(x, a) +#define DL_ALIGN_DOWN(x, a) ALIGN(x-(a-1), a) /* remove once this gets added to sysfs.h */ #define __ATTR_RW(attr) __ATTR(attr, 0644, attr##_show, attr##_store) From 3e8f3d6fa672896096068296658a769649186150 Mon Sep 17 00:00:00 2001 From: Bernie Thompson Date: Mon, 15 Feb 2010 06:46:26 -0800 Subject: [PATCH 283/367] Staging: udlfb: Support for fbdev mmap clients (defio) Add support for fbdev mmap clients who don't send damage ioctls Because DisplayLink devices are out on the other end of usb, their "framebuffer" is just normal system memory. So memory mapped writes don't automatically trigger anything. So up to this point, standard fbdev clients who rely on mmap() will get an unchanging screen. This patch makes udlfb a client of Jaya Kumar's defio framework - which sets up page fault triggers, and those faults are accumulated and sent to udlfb on a defferred basis, to process as damage notifications for the framebuffer. Because this involves more overhead than a notification directly from the application (e.g. just passing on X DAMAGE extension notifications), a sysfs attribute is provided by udlfb to control defio support. /sys/class/graphics/fb*/use_defio - writing a "0" to this file before calling mmap() causes defio to not be initialized - instead udlfb will rely on getting damage notifications directly through the damage ioctl. There are unsolved rendering problems with defio (horizontal dead regions on framebuffer, that accumulate over time) which still needs a fix. Signed-off-by: Bernie Thompson Signed-off-by: Greg Kroah-Hartman --- drivers/staging/udlfb/udlfb.c | 124 +++++++++++++++++++++++++++++++++- 1 file changed, 121 insertions(+), 3 deletions(-) diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c index 22f3dc310ff2..939b8faba0ff 100644 --- a/drivers/staging/udlfb/udlfb.c +++ b/drivers/staging/udlfb/udlfb.c @@ -63,6 +63,11 @@ static int dlfb_submit_urb(struct dlfb_data *dev, struct urb * urb, size_t len); static int dlfb_alloc_urb_list(struct dlfb_data *dev, int count, size_t size); static void dlfb_free_urb_list(struct dlfb_data *dev); +/* other symbols with dependents */ +#ifdef CONFIG_FB_DEFERRED_IO +static struct fb_deferred_io dlfb_defio; +#endif + /* * Inserts a specific DisplayLink controller command into the provided * buffer. @@ -717,9 +722,59 @@ dlfb_ops_setcolreg(unsigned regno, unsigned red, unsigned green, return err; } +/* + * It's common for several clients to have framebuffer open simultaneously. + * e.g. both fbcon and X. Makes things interesting. + */ +static int dlfb_ops_open(struct fb_info *info, int user) +{ + struct dlfb_data *dev = info->par; + +/* if (user == 0) + * We could special case kernel mode clients (fbcon) here + */ + + mutex_lock(&dev->fb_open_lock); + + dev->fb_count++; + +#ifdef CONFIG_FB_DEFERRED_IO + if ((atomic_read(&dev->use_defio)) && (info->fbdefio == NULL)) { + /* enable defio */ + info->fbdefio = &dlfb_defio; + fb_deferred_io_init(info); + } +#endif + + dl_notice("open /dev/fb%d user=%d fb_info=%p count=%d\n", + info->node, user, info, dev->fb_count); + + mutex_unlock(&dev->fb_open_lock); + + return 0; +} + static int dlfb_ops_release(struct fb_info *info, int user) { - struct dlfb_data *dev_info = info->par; + struct dlfb_data *dev = info->par; + + mutex_lock(&dev->fb_open_lock); + + dev->fb_count--; + +#ifdef CONFIG_FB_DEFERRED_IO + if ((dev->fb_count == 0) && (info->fbdefio)) { + fb_deferred_io_cleanup(info); + info->fbdefio = NULL; + info->fbops->fb_mmap = dlfb_ops_mmap; + } +#endif + + dl_notice("release /dev/fb%d user=%d count=%d\n", + info->node, user, dev->fb_count); + + mutex_unlock(&dev->fb_open_lock); + return 0; } @@ -735,6 +790,8 @@ static void dlfb_delete(struct kref *kref) if (dev->backing_buffer) vfree(dev->backing_buffer); + mutex_destroy(&dev->fb_open_lock); + kfree(dev); } @@ -853,6 +910,7 @@ static struct fb_ops dlfb_ops = { .fb_imageblit = dlfb_ops_imageblit, .fb_mmap = dlfb_ops_mmap, .fb_ioctl = dlfb_ops_ioctl, + .fb_open = dlfb_ops_open, .fb_release = dlfb_ops_release, .fb_blank = dlfb_ops_blank, .fb_check_var = dlfb_ops_check_var, @@ -1068,6 +1126,68 @@ static struct device_attribute fb_device_attrs[] = { __ATTR_RW(use_defio), }; +#ifdef CONFIG_FB_DEFERRED_IO +static void dlfb_dpy_deferred_io(struct fb_info *info, + struct list_head *pagelist) +{ + struct page *cur; + struct fb_deferred_io *fbdefio = info->fbdefio; + struct dlfb_data *dev = info->par; + struct urb *urb; + char *cmd; + cycles_t start_cycles, end_cycles; + int bytes_sent = 0; + int bytes_identical = 0; + int bytes_rendered = 0; + int fault_count = 0; + + if (!atomic_read(&dev->use_defio)) + return; + + if (!atomic_read(&dev->usb_active)) + return; + + start_cycles = get_cycles(); + + urb = dlfb_get_urb(dev); + if (!urb) + return; + cmd = urb->transfer_buffer; + + /* walk the written page list and render each to device */ + list_for_each_entry(cur, &fbdefio->pagelist, lru) { + dlfb_render_hline(dev, &urb, (char *) info->fix.smem_start, + &cmd, cur->index << PAGE_SHIFT, + PAGE_SIZE, &bytes_identical, &bytes_sent); + bytes_rendered += PAGE_SIZE; + fault_count++; + } + + if (cmd > (char *) urb->transfer_buffer) { + /* Send partial buffer remaining before exiting */ + int len = cmd - (char *) urb->transfer_buffer; + dlfb_submit_urb(dev, urb, len); + bytes_sent += len; + } else + dlfb_urb_completion(urb); + + atomic_add(fault_count, &dev->defio_fault_count); + atomic_add(bytes_sent, &dev->bytes_sent); + atomic_add(bytes_identical, &dev->bytes_identical); + atomic_add(bytes_rendered, &dev->bytes_rendered); + end_cycles = get_cycles(); + atomic_add(((unsigned int) ((end_cycles - start_cycles) + >> 10)), /* Kcycles */ + &dev->cpu_kcycles_used); +} + +static struct fb_deferred_io dlfb_defio = { + .delay = 5, + .deferred_io = dlfb_dpy_deferred_io, +}; + +#endif + /* * This is necessary before we can communicate with the display controller. */ @@ -1193,11 +1313,9 @@ static int dlfb_usb_probe(struct usb_interface *interface, /* ready to begin using device */ -/* #ifdef CONFIG_FB_DEFERRED_IO atomic_set(&dev->use_defio, 1); #endif -*/ atomic_set(&dev->usb_active, 1); dlfb_select_std_channel(dev); From dd8015f1c83bfde9966c86a5958abd466a304398 Mon Sep 17 00:00:00 2001 From: Bernie Thompson Date: Mon, 15 Feb 2010 06:46:35 -0800 Subject: [PATCH 284/367] Staging: udlfb: explicit dependencies and warnings Specify Kconfig dependencies, and include warnings for building as a module udlfb is dependent on FB_DEFERRED_IO, FB_SYS_*, and FB_MODE_HELPERS Because many kernels do not include defio (which cannot be built as a module), yet users want to be able to build udlfb as a module later, udlfb has ifdefs and these dependency warnings to help udlfb build with or without certain dependencies, but also print warnings for any lost function. Even though this kind of flexibility isn't common, we've gotten feedback from a significant portion of users that they were frustrated without it. Signed-off-by: Bernie Thompson Signed-off-by: Greg Kroah-Hartman --- drivers/staging/udlfb/Kconfig | 14 ++++++++++---- drivers/staging/udlfb/udlfb.c | 14 ++++++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/drivers/staging/udlfb/Kconfig b/drivers/staging/udlfb/Kconfig index 641692da0e4f..65bd5db4ca56 100644 --- a/drivers/staging/udlfb/Kconfig +++ b/drivers/staging/udlfb/Kconfig @@ -1,8 +1,14 @@ config FB_UDL tristate "Displaylink USB Framebuffer support" depends on FB && USB + select FB_MODE_HELPERS + select FB_SYS_FILLRECT + select FB_SYS_COPYAREA + select FB_SYS_IMAGEBLIT + select FB_SYS_FOPS + select FB_DEFERRED_IO ---help--- - This is an experimental driver for DisplayLink USB devices - that provides a framebuffer device. A normal framebuffer can - be used with this driver, or xorg can be run on the device - using it. + This is a kernel framebuffer driver for DisplayLink USB devices. + Supports fbdev clients like xf86-video-fbdev, kdrive, fbi, and + mplayer -vo fbdev. Supports all USB 2.0 era DisplayLink devices. + To compile as a module, choose M here: the module name is udlfb. diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c index 939b8faba0ff..baad03a8a873 100644 --- a/drivers/staging/udlfb/udlfb.c +++ b/drivers/staging/udlfb/udlfb.c @@ -56,6 +56,20 @@ static struct usb_device_id id_table[] = { }; MODULE_DEVICE_TABLE(usb, id_table); +#ifndef CONFIG_FB_DEFERRED_IO +#warning message "kernel FB_DEFFERRED_IO option to support generic fbdev apps" +#endif + +#ifndef CONFIG_FB_SYS_IMAGEBLIT +#ifndef CONFIG_FB_SYS_IMAGEBLIT_MODULE +#warning message "FB_SYS_* in kernel or module option to support fb console" +#endif +#endif + +#ifndef CONFIG_FB_MODE_HELPERS +#warning message "kernel FB_MODE_HELPERS required. Expect build break" +#endif + /* dlfb keeps a list of urbs for efficient bulk transfers */ static void dlfb_urb_completion(struct urb *urb); static struct urb *dlfb_get_urb(struct dlfb_data *dev); From bd80816b2877879d36011815858c8681408cc625 Mon Sep 17 00:00:00 2001 From: Bernie Thompson Date: Mon, 15 Feb 2010 06:46:48 -0800 Subject: [PATCH 285/367] Staging: udlfb: remove printk and small cleanup Remove last remaining printk and clarify comments Signed-off-by: Bernie Thompson Signed-off-by: Greg Kroah-Hartman --- drivers/staging/udlfb/udlfb.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c index baad03a8a873..8f6223c8303a 100644 --- a/drivers/staging/udlfb/udlfb.c +++ b/drivers/staging/udlfb/udlfb.c @@ -83,8 +83,8 @@ static struct fb_deferred_io dlfb_defio; #endif /* - * Inserts a specific DisplayLink controller command into the provided - * buffer. + * All DisplayLink bulk operations start with 0xAF, followed by specific code + * All operations are written to buffers which then later get sent to device */ static char *dlfb_set_register(char *buf, u8 reg, u8 val) { @@ -129,6 +129,10 @@ static char *dlfb_set_base16bpp(char *wrptr, u32 base) return dlfb_set_register(wrptr, 0x22, base); } +/* + * DisplayLink HW has separate 16bpp and 8bpp framebuffers. + * In 24bpp modes, the low 323 RGB bits go in the 8bpp framebuffer + */ static char *dlfb_set_base8bpp(char *wrptr, u32 base) { wrptr = dlfb_set_register(wrptr, 0x26, base >> 16); @@ -161,7 +165,7 @@ static char *dlfb_set_register_16be(char *wrptr, u8 reg, u16 value) * same actual count. This makes sense once you read above a couple of * times and think about it from a hardware perspective. */ -static u16 lfsr16(u16 actual_count) +static u16 dlfb_lfsr16(u16 actual_count) { u32 lv = 0xFFFF; /* This is the lfsr value that the hw starts with */ @@ -180,7 +184,7 @@ static u16 lfsr16(u16 actual_count) */ static char *dlfb_set_register_lfsr16(char *wrptr, u8 reg, u16 value) { - return dlfb_set_register_16(wrptr, reg, lfsr16(value)); + return dlfb_set_register_16(wrptr, reg, dlfb_lfsr16(value)); } /* @@ -292,8 +296,9 @@ static int dlfb_ops_mmap(struct fb_info *info, struct vm_area_struct *vma) unsigned long size = vma->vm_end - vma->vm_start; unsigned long offset = vma->vm_pgoff << PAGE_SHIFT; unsigned long page, pos; + struct dlfb_data *dev = info->par; - printk("MMAP: %lu %u\n", offset + size, info->fix.smem_len); + dl_notice("MMAP: %lu %u\n", offset + size, info->fix.smem_len); if (offset + size > info->fix.smem_len) return -EINVAL; From a94f530a5ee36f72e0377d081023b8d23dacf7ce Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Tue, 16 Feb 2010 14:59:07 -0800 Subject: [PATCH 286/367] Staging: rtl8187se: needs semaphore.h rtl8187se needs to include semaphore.h to prevent build errors: drivers/staging/rtl8187se/ieee80211/ieee80211.h:1004: error: field 'wx_sem' has incomplete type drivers/staging/rtl8187se/ieee80211/ieee80211.h:1005: error: field 'scan_sem' has incomplete type Signed-off-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8187se/ieee80211/ieee80211.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h index 04a48e7e76e6..c4ab683e8f61 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h @@ -29,6 +29,7 @@ #include #include #include +#include #include #include From 66bd8db52ab48e7189e02d4bf1f23109cc1ede70 Mon Sep 17 00:00:00 2001 From: Martyn Welch Date: Thu, 18 Feb 2010 15:12:52 +0000 Subject: [PATCH 287/367] Staging: vme: Renaming following split of GE Fanuc joint venture This patch corrects author email addresses and Copyright notices as a result of the split up of the GE Fanuc joint venture. Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vme/bridges/vme_ca91cx42.c | 4 ++-- drivers/staging/vme/bridges/vme_ca91cx42.h | 4 ++-- drivers/staging/vme/bridges/vme_tsi148.c | 4 ++-- drivers/staging/vme/devices/vme_user.c | 6 +++--- drivers/staging/vme/vme.c | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c index 807278485bbf..272cc26ba5ac 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.c +++ b/drivers/staging/vme/bridges/vme_ca91cx42.c @@ -1,8 +1,8 @@ /* * Support for the Tundra Universe I/II VME-PCI Bridge Chips * - * Author: Martyn Welch - * Copyright 2008 GE Fanuc Intelligent Platforms Embedded Systems, Inc. + * Author: Martyn Welch + * Copyright 2008 GE Intelligent Platforms Embedded Systems, Inc. * * Based on work by Tom Armistead and Ajit Prem * Copyright 2004 Motorola Inc. diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.h b/drivers/staging/vme/bridges/vme_ca91cx42.h index 95a42c240a20..2a9ad1454f4e 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.h +++ b/drivers/staging/vme/bridges/vme_ca91cx42.h @@ -7,8 +7,8 @@ * Updated by Ajit Prem * Copyright 2004 Motorola Inc. * - * Further updated by Martyn Welch - * Copyright 2009 GE Fanuc Intelligent Platforms Embedded Systems, Inc. + * Further updated by Martyn Welch + * Copyright 2009 GE Intelligent Platforms Embedded Systems, Inc. * * Derived from ca91c042.h by Michael Wyrick * diff --git a/drivers/staging/vme/bridges/vme_tsi148.c b/drivers/staging/vme/bridges/vme_tsi148.c index ed8297daf9ee..2ca5126627cd 100644 --- a/drivers/staging/vme/bridges/vme_tsi148.c +++ b/drivers/staging/vme/bridges/vme_tsi148.c @@ -1,8 +1,8 @@ /* * Support for the Tundra TSI148 VME-PCI Bridge Chip * - * Author: Martyn Welch - * Copyright 2008 GE Fanuc Intelligent Platforms Embedded Systems, Inc. + * Author: Martyn Welch + * Copyright 2008 GE Intelligent Platforms Embedded Systems, Inc. * * Based on work by Tom Armistead and Ajit Prem * Copyright 2004 Motorola Inc. diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c index 2159540d9383..48d46cadb13f 100644 --- a/drivers/staging/vme/devices/vme_user.c +++ b/drivers/staging/vme/devices/vme_user.c @@ -1,8 +1,8 @@ /* * VMEbus User access driver * - * Author: Martyn Welch - * Copyright 2008 GE Fanuc Intelligent Platforms Embedded Systems, Inc. + * Author: Martyn Welch + * Copyright 2008 GE Intelligent Platforms Embedded Systems, Inc. * * Based on work by: * Tom Armistead and Ajit Prem @@ -818,7 +818,7 @@ MODULE_PARM_DESC(bus, "Enumeration of VMEbus to which the driver is connected"); module_param_array(bus, int, &bus_num, 0); MODULE_DESCRIPTION("VME User Space Access Driver"); -MODULE_AUTHOR("Martyn Welch - * Copyright 2008 GE Fanuc Intelligent Platforms Embedded Systems, Inc. + * Author: Martyn Welch + * Copyright 2008 GE Intelligent Platforms Embedded Systems, Inc. * * Based on work by Tom Armistead and Ajit Prem * Copyright 2004 Motorola Inc. @@ -1533,7 +1533,7 @@ static void __exit vme_exit(void) } MODULE_DESCRIPTION("VME bridge driver framework"); -MODULE_AUTHOR("Martyn Welch Date: Thu, 18 Feb 2010 15:12:58 +0000 Subject: [PATCH 288/367] Staging: vme: Attribute Testing For Dma Request Check the directions in which the DMA controller is expected to operate before giving control of a resource. Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vme/TODO | 22 ------------------ drivers/staging/vme/bridges/vme_ca91cx42.c | 2 ++ drivers/staging/vme/bridges/vme_tsi148.c | 4 ++++ drivers/staging/vme/vme.c | 8 ++++--- drivers/staging/vme/vme.h | 10 +++++++- drivers/staging/vme/vme_api.txt | 27 +++++++++++++++------- drivers/staging/vme/vme_bridge.h | 1 + 7 files changed, 40 insertions(+), 34 deletions(-) diff --git a/drivers/staging/vme/TODO b/drivers/staging/vme/TODO index 2201ff6f74d1..bdc5f6248bcc 100644 --- a/drivers/staging/vme/TODO +++ b/drivers/staging/vme/TODO @@ -4,28 +4,6 @@ API === -DMA Resource Allocation incomplete ----------------------------------- - -The current DMA resource Allocation provides no means of selecting the -suitability of a DMA controller based on it's supported modes of operation, as -opposed to the resource allocation mechanisms for master and slave windows: - - struct vme_resource *vme_dma_request(struct device *dev); - -As opposed to: - - struct vme_resource * vme_master_request(struct device *dev, - vme_address_t aspace, vme_cycle_t cycle, vme_width_t width); - -The TSI148 can perform, VME-to-PCI, PCI-to-VME, PATTERN-to-VME, PATTERN-to-PCI, -VME-to-VME and PCI-to-PCI transfers. The CA91C142 can only provide VME-to-PCI -and PCI-to-VME. - -Add a mechanism to select a VME controller based on source/target type, -required aspace, cycle and width requirements. - - Master window broadcast select mask ----------------------------------- diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c index 272cc26ba5ac..7eaba3511ea8 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.c +++ b/drivers/staging/vme/bridges/vme_ca91cx42.c @@ -1109,6 +1109,8 @@ static int ca91cx42_probe(struct pci_dev *pdev, const struct pci_device_id *id) mutex_init(&(dma_ctrlr->mtx)); dma_ctrlr->locked = 0; dma_ctrlr->number = i; + dma_ctrlr->route_attr = VME_DMA_VME_TO_MEM | + VME_DMA_MEM_TO_VME; INIT_LIST_HEAD(&(dma_ctrlr->pending)); INIT_LIST_HEAD(&(dma_ctrlr->running)); list_add_tail(&(dma_ctrlr->list), diff --git a/drivers/staging/vme/bridges/vme_tsi148.c b/drivers/staging/vme/bridges/vme_tsi148.c index 2ca5126627cd..e74c4a953b2d 100644 --- a/drivers/staging/vme/bridges/vme_tsi148.c +++ b/drivers/staging/vme/bridges/vme_tsi148.c @@ -2421,6 +2421,10 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id) mutex_init(&(dma_ctrlr->mtx)); dma_ctrlr->locked = 0; dma_ctrlr->number = i; + dma_ctrlr->route_attr = VME_DMA_VME_TO_MEM | + VME_DMA_MEM_TO_VME | VME_DMA_VME_TO_VME | + VME_DMA_MEM_TO_MEM | VME_DMA_PATTERN_TO_VME | + VME_DMA_PATTERN_TO_MEM; INIT_LIST_HEAD(&(dma_ctrlr->pending)); INIT_LIST_HEAD(&(dma_ctrlr->running)); list_add_tail(&(dma_ctrlr->list), diff --git a/drivers/staging/vme/vme.c b/drivers/staging/vme/vme.c index 8d8f9cb2974d..79c501dac5f9 100644 --- a/drivers/staging/vme/vme.c +++ b/drivers/staging/vme/vme.c @@ -643,7 +643,7 @@ EXPORT_SYMBOL(vme_master_free); * Request a DMA controller with specific attributes, return some unique * identifier. */ -struct vme_resource *vme_dma_request(struct device *dev) +struct vme_resource *vme_dma_request(struct device *dev, vme_dma_route_t route) { struct vme_bridge *bridge; struct list_head *dma_pos = NULL; @@ -670,9 +670,11 @@ struct vme_resource *vme_dma_request(struct device *dev) continue; } - /* Find an unlocked controller */ + /* Find an unlocked and compatible controller */ mutex_lock(&(dma_ctrlr->mtx)); - if (dma_ctrlr->locked == 0) { + if (((dma_ctrlr->route_attr & route) == route) && + (dma_ctrlr->locked == 0)) { + dma_ctrlr->locked = 1; mutex_unlock(&(dma_ctrlr->mtx)); allocated_ctrlr = dma_ctrlr; diff --git a/drivers/staging/vme/vme.h b/drivers/staging/vme/vme.h index 5a4d163fae10..48768ca97e16 100644 --- a/drivers/staging/vme/vme.h +++ b/drivers/staging/vme/vme.h @@ -68,6 +68,14 @@ typedef u32 vme_pattern_t; #define VME_DMA_PATTERN_WORD (1<<1) #define VME_DMA_PATTERN_INCREMENT (1<<2) +typedef u32 vme_dma_route_t; +#define VME_DMA_VME_TO_MEM (1<<0) +#define VME_DMA_MEM_TO_VME (1<<1) +#define VME_DMA_VME_TO_VME (1<<2) +#define VME_DMA_MEM_TO_MEM (1<<3) +#define VME_DMA_PATTERN_TO_VME (1<<4) +#define VME_DMA_PATTERN_TO_MEM (1<<5) + struct vme_dma_attr { vme_dma_t type; void *private; @@ -124,7 +132,7 @@ unsigned int vme_master_rmw(struct vme_resource *, unsigned int, unsigned int, unsigned int, loff_t); void vme_master_free(struct vme_resource *); -struct vme_resource *vme_dma_request(struct device *); +struct vme_resource *vme_dma_request(struct device *, vme_dma_route_t); struct vme_dma_list *vme_new_dma_list(struct vme_resource *); struct vme_dma_attr *vme_dma_pattern_attribute(u32, vme_pattern_t); struct vme_dma_attr *vme_dma_pci_attribute(dma_addr_t); diff --git a/drivers/staging/vme/vme_api.txt b/drivers/staging/vme/vme_api.txt index a5c1b1cd5fcc..a910a0c4388b 100644 --- a/drivers/staging/vme/vme_api.txt +++ b/drivers/staging/vme/vme_api.txt @@ -77,16 +77,21 @@ driver in question: struct vme_resource * vme_slave_request(struct device *dev, vme_address_t aspace, vme_cycle_t cycle); - struct vme_resource *vme_dma_request(struct device *dev); + struct vme_resource *vme_dma_request(struct device *dev, + vme_dma_route_t route); For slave windows these attributes are split into those of type 'vme_address_t' -and 'vme_cycle_t'. Master windows add a further set of attributes 'vme_cycle_t'. -These attributes are defined as bitmasks and as such any combination of the -attributes can be requested for a single window, the core will assign a window -that meets the requirements, returning a pointer of type vme_resource that -should be used to identify the allocated resource when it is used. If an -unallocated window fitting the requirements can not be found a NULL pointer will -be returned. +and 'vme_cycle_t'. Master windows add a further set of attributes +'vme_cycle_t'. These attributes are defined as bitmasks and as such any +combination of the attributes can be requested for a single window, the core +will assign a window that meets the requirements, returning a pointer of type +vme_resource that should be used to identify the allocated resource when it is +used. For DMA controllers, the request function requires the potential +direction of any transfers to be provided in the route attributes. This is +typically VME-to-MEM and/or MEM-to-VME, though some hardware can support +VME-to-VME and MEM-to-MEM transfers as well as test pattern generation. If an +unallocated window fitting the requirements can not be found a NULL pointer +will be returned. Functions are also provided to free window allocations once they are no longer required. These functions should be passed the pointer to the resource provided @@ -237,6 +242,12 @@ covered under "Transfer Attributes"): struct vme_dma_attr *src, struct vme_dma_attr *dest, size_t count); +NOTE: The detailed attributes of the transfers source and destination + are not checked until an entry is added to a DMA list, the request + for a DMA channel purely checks the directions in which the + controller is expected to transfer data. As a result it is + possible for this call to return an error, for example if the + source or destination is in an unsupported VME address space. Transfer Attributes ------------------- diff --git a/drivers/staging/vme/vme_bridge.h b/drivers/staging/vme/vme_bridge.h index 92e5614ab910..f8ead21c94fb 100644 --- a/drivers/staging/vme/vme_bridge.h +++ b/drivers/staging/vme/vme_bridge.h @@ -64,6 +64,7 @@ struct vme_dma_resource { int number; struct list_head pending; struct list_head running; + vme_dma_route_t route_attr; }; struct vme_lm_resource { From 29848ac9f3b33bf171439ae2d66d40e6a71446c4 Mon Sep 17 00:00:00 2001 From: Martyn Welch Date: Thu, 18 Feb 2010 15:13:05 +0000 Subject: [PATCH 289/367] Staging: vme: Enable drivers to handle more than one bridge At the moment the vme bridge drivers are written in a way that only allows them to support one bridge at a time. Modify the drivers to enable more than one bridge to be present per board. Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vme/TODO | 2 - drivers/staging/vme/bridges/vme_ca91cx42.c | 411 +++++++------ drivers/staging/vme/bridges/vme_ca91cx42.h | 16 + drivers/staging/vme/bridges/vme_tsi148.c | 634 ++++++++++++--------- drivers/staging/vme/bridges/vme_tsi148.h | 16 + drivers/staging/vme/vme.c | 10 +- drivers/staging/vme/vme_bridge.h | 8 +- 7 files changed, 633 insertions(+), 464 deletions(-) diff --git a/drivers/staging/vme/TODO b/drivers/staging/vme/TODO index bdc5f6248bcc..83d44cbf9a5f 100644 --- a/drivers/staging/vme/TODO +++ b/drivers/staging/vme/TODO @@ -47,7 +47,6 @@ Bridge Support Tempe (tsi148) -------------- -- Driver can currently only support a single bridge. - 2eSST Broadcast mode. - Mailboxes unsupported. - Improve error detection. @@ -58,7 +57,6 @@ Tempe (tsi148) Universe II (ca91c142) ---------------------- -- Driver can currently only support a single bridge. - DMA unsupported. - RMW transactions unsupported. - Location Monitors unsupported. diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c index 7eaba3511ea8..c2f86a6996d5 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.c +++ b/drivers/staging/vme/bridges/vme_ca91cx42.c @@ -41,24 +41,6 @@ static void __exit ca91cx42_exit(void); /* Module parameters */ static int geoid; -static struct vme_bridge *ca91cx42_bridge; -static wait_queue_head_t dma_queue; -static wait_queue_head_t iack_queue; -#if 0 -static wait_queue_head_t lm_queue; -#endif -static wait_queue_head_t mbox_queue; - -static void (*lm_callback[4])(int); /* Called in interrupt handler */ -static void *crcsr_kernel; -static dma_addr_t crcsr_bus; - -static struct mutex vme_rmw; /* Only one RMW cycle at a time */ -static struct mutex vme_int; /* - * Only one VME interrupt can be - * generated at a time, provide locking - */ - static char driver_name[] = "vme_ca91cx42"; static const struct pci_device_id ca91cx42_ids[] = { @@ -73,14 +55,14 @@ static struct pci_driver ca91cx42_driver = { .remove = ca91cx42_remove, }; -static u32 ca91cx42_DMA_irqhandler(void) +static u32 ca91cx42_DMA_irqhandler(struct ca91cx42_driver *bridge) { - wake_up(&dma_queue); + wake_up(&(bridge->dma_queue)); return CA91CX42_LINT_DMA; } -static u32 ca91cx42_LM_irqhandler(u32 stat) +static u32 ca91cx42_LM_irqhandler(struct ca91cx42_driver *bridge, u32 stat) { int i; u32 serviced = 0; @@ -88,7 +70,7 @@ static u32 ca91cx42_LM_irqhandler(u32 stat) for (i = 0; i < 4; i++) { if (stat & CA91CX42_LINT_LM[i]) { /* We only enable interrupts if the callback is set */ - lm_callback[i](i); + bridge->lm_callback[i](i); serviced |= CA91CX42_LINT_LM[i]; } } @@ -97,16 +79,16 @@ static u32 ca91cx42_LM_irqhandler(u32 stat) } /* XXX This needs to be split into 4 queues */ -static u32 ca91cx42_MB_irqhandler(int mbox_mask) +static u32 ca91cx42_MB_irqhandler(struct ca91cx42_driver *bridge, int mbox_mask) { - wake_up(&mbox_queue); + wake_up(&(bridge->mbox_queue)); return CA91CX42_LINT_MBOX; } -static u32 ca91cx42_IACK_irqhandler(void) +static u32 ca91cx42_IACK_irqhandler(struct ca91cx42_driver *bridge) { - wake_up(&iack_queue); + wake_up(&(bridge->iack_queue)); return CA91CX42_LINT_SW_IACK; } @@ -115,22 +97,22 @@ static u32 ca91cx42_IACK_irqhandler(void) int ca91cx42_bus_error_chk(int clrflag) { int tmp; - tmp = ioread32(ca91cx42_bridge->base + PCI_COMMAND); + tmp = ioread32(bridge->base + PCI_COMMAND); if (tmp & 0x08000000) { /* S_TA is Set */ if (clrflag) iowrite32(tmp | 0x08000000, - ca91cx42_bridge->base + PCI_COMMAND); + bridge->base + PCI_COMMAND); return 1; } return 0; } #endif -static u32 ca91cx42_VERR_irqhandler(void) +static u32 ca91cx42_VERR_irqhandler(struct ca91cx42_driver *bridge) { int val; - val = ioread32(ca91cx42_bridge->base + DGCS); + val = ioread32(bridge->base + DGCS); if (!(val & 0x00000800)) { printk(KERN_ERR "ca91c042: ca91cx42_VERR_irqhandler DMA Read " @@ -140,11 +122,11 @@ static u32 ca91cx42_VERR_irqhandler(void) return CA91CX42_LINT_VERR; } -static u32 ca91cx42_LERR_irqhandler(void) +static u32 ca91cx42_LERR_irqhandler(struct ca91cx42_driver *bridge) { int val; - val = ioread32(ca91cx42_bridge->base + DGCS); + val = ioread32(bridge->base + DGCS); if (!(val & 0x00000800)) { printk(KERN_ERR "ca91c042: ca91cx42_LERR_irqhandler DMA Read " @@ -156,13 +138,18 @@ static u32 ca91cx42_LERR_irqhandler(void) } -static u32 ca91cx42_VIRQ_irqhandler(int stat) +static u32 ca91cx42_VIRQ_irqhandler(struct vme_bridge *ca91cx42_bridge, + int stat) { int vec, i, serviced = 0; + struct ca91cx42_driver *bridge; + + bridge = ca91cx42_bridge->driver_priv; + for (i = 7; i > 0; i--) { if (stat & (1 << i)) { - vec = ioread32(ca91cx42_bridge->base + + vec = ioread32(bridge->base + CA91CX42_V_STATID[i]) & 0xff; vme_irq_handler(ca91cx42_bridge, i, vec); @@ -174,15 +161,18 @@ static u32 ca91cx42_VIRQ_irqhandler(int stat) return serviced; } -static irqreturn_t ca91cx42_irqhandler(int irq, void *dev_id) +static irqreturn_t ca91cx42_irqhandler(int irq, void *ptr) { u32 stat, enable, serviced = 0; + struct vme_bridge *ca91cx42_bridge; + struct ca91cx42_driver *bridge; - if (dev_id != ca91cx42_bridge->base) - return IRQ_NONE; + ca91cx42_bridge = ptr; - enable = ioread32(ca91cx42_bridge->base + LINT_EN); - stat = ioread32(ca91cx42_bridge->base + LINT_STAT); + bridge = ca91cx42_bridge->driver_priv; + + enable = ioread32(bridge->base + LINT_EN); + stat = ioread32(bridge->base + LINT_STAT); /* Only look at unmasked interrupts */ stat &= enable; @@ -191,42 +181,45 @@ static irqreturn_t ca91cx42_irqhandler(int irq, void *dev_id) return IRQ_NONE; if (stat & CA91CX42_LINT_DMA) - serviced |= ca91cx42_DMA_irqhandler(); + serviced |= ca91cx42_DMA_irqhandler(bridge); if (stat & (CA91CX42_LINT_LM0 | CA91CX42_LINT_LM1 | CA91CX42_LINT_LM2 | CA91CX42_LINT_LM3)) - serviced |= ca91cx42_LM_irqhandler(stat); + serviced |= ca91cx42_LM_irqhandler(bridge, stat); if (stat & CA91CX42_LINT_MBOX) - serviced |= ca91cx42_MB_irqhandler(stat); + serviced |= ca91cx42_MB_irqhandler(bridge, stat); if (stat & CA91CX42_LINT_SW_IACK) - serviced |= ca91cx42_IACK_irqhandler(); + serviced |= ca91cx42_IACK_irqhandler(bridge); if (stat & CA91CX42_LINT_VERR) - serviced |= ca91cx42_VERR_irqhandler(); + serviced |= ca91cx42_VERR_irqhandler(bridge); if (stat & CA91CX42_LINT_LERR) - serviced |= ca91cx42_LERR_irqhandler(); + serviced |= ca91cx42_LERR_irqhandler(bridge); if (stat & (CA91CX42_LINT_VIRQ1 | CA91CX42_LINT_VIRQ2 | CA91CX42_LINT_VIRQ3 | CA91CX42_LINT_VIRQ4 | CA91CX42_LINT_VIRQ5 | CA91CX42_LINT_VIRQ6 | CA91CX42_LINT_VIRQ7)) - serviced |= ca91cx42_VIRQ_irqhandler(stat); + serviced |= ca91cx42_VIRQ_irqhandler(ca91cx42_bridge, stat); /* Clear serviced interrupts */ - iowrite32(stat, ca91cx42_bridge->base + LINT_STAT); + iowrite32(stat, bridge->base + LINT_STAT); return IRQ_HANDLED; } -static int ca91cx42_irq_init(struct vme_bridge *bridge) +static int ca91cx42_irq_init(struct vme_bridge *ca91cx42_bridge) { int result, tmp; struct pci_dev *pdev; + struct ca91cx42_driver *bridge; + + bridge = ca91cx42_bridge->driver_priv; /* Need pdev */ - pdev = container_of(bridge->parent, struct pci_dev, dev); + pdev = container_of(ca91cx42_bridge->parent, struct pci_dev, dev); /* Initialise list for VME bus errors */ - INIT_LIST_HEAD(&(bridge->vme_errors)); + INIT_LIST_HEAD(&(ca91cx42_bridge->vme_errors)); - mutex_init(&(bridge->irq_mtx)); + mutex_init(&(ca91cx42_bridge->irq_mtx)); /* Disable interrupts from PCI to VME */ iowrite32(0, bridge->base + VINT_EN); @@ -237,7 +230,7 @@ static int ca91cx42_irq_init(struct vme_bridge *bridge) iowrite32(0x00FFFFFF, bridge->base + LINT_STAT); result = request_irq(pdev->irq, ca91cx42_irqhandler, IRQF_SHARED, - driver_name, pdev); + driver_name, ca91cx42_bridge); if (result) { dev_err(&pdev->dev, "Can't get assigned pci irq vector %02X\n", pdev->irq); @@ -259,15 +252,16 @@ static int ca91cx42_irq_init(struct vme_bridge *bridge) return 0; } -static void ca91cx42_irq_exit(struct pci_dev *pdev) +static void ca91cx42_irq_exit(struct ca91cx42_driver *bridge, + struct pci_dev *pdev) { /* Disable interrupts from PCI to VME */ - iowrite32(0, ca91cx42_bridge->base + VINT_EN); + iowrite32(0, bridge->base + VINT_EN); /* Disable PCI interrupts */ - iowrite32(0, ca91cx42_bridge->base + LINT_EN); + iowrite32(0, bridge->base + LINT_EN); /* Clear Any Pending PCI Interrupts */ - iowrite32(0x00FFFFFF, ca91cx42_bridge->base + LINT_STAT); + iowrite32(0x00FFFFFF, bridge->base + LINT_STAT); free_irq(pdev->irq, pdev); } @@ -275,21 +269,25 @@ static void ca91cx42_irq_exit(struct pci_dev *pdev) /* * Set up an VME interrupt */ -void ca91cx42_irq_set(int level, int state, int sync) +void ca91cx42_irq_set(struct vme_bridge *ca91cx42_bridge, int level, int state, + int sync) { struct pci_dev *pdev; u32 tmp; + struct ca91cx42_driver *bridge; + + bridge = ca91cx42_bridge->driver_priv; /* Enable IRQ level */ - tmp = ioread32(ca91cx42_bridge->base + LINT_EN); + tmp = ioread32(bridge->base + LINT_EN); if (state == 0) tmp &= ~CA91CX42_LINT_VIRQ[level]; else tmp |= CA91CX42_LINT_VIRQ[level]; - iowrite32(tmp, ca91cx42_bridge->base + LINT_EN); + iowrite32(tmp, bridge->base + LINT_EN); if ((state == 0) && (sync != 0)) { pdev = container_of(ca91cx42_bridge->parent, struct pci_dev, @@ -299,34 +297,38 @@ void ca91cx42_irq_set(int level, int state, int sync) } } -int ca91cx42_irq_generate(int level, int statid) +int ca91cx42_irq_generate(struct vme_bridge *ca91cx42_bridge, int level, + int statid) { u32 tmp; + struct ca91cx42_driver *bridge; + + bridge = ca91cx42_bridge->driver_priv; /* Universe can only generate even vectors */ if (statid & 1) return -EINVAL; - mutex_lock(&(vme_int)); + mutex_lock(&(bridge->vme_int)); - tmp = ioread32(ca91cx42_bridge->base + VINT_EN); + tmp = ioread32(bridge->base + VINT_EN); /* Set Status/ID */ - iowrite32(statid << 24, ca91cx42_bridge->base + STATID); + iowrite32(statid << 24, bridge->base + STATID); /* Assert VMEbus IRQ */ tmp = tmp | (1 << (level + 24)); - iowrite32(tmp, ca91cx42_bridge->base + VINT_EN); + iowrite32(tmp, bridge->base + VINT_EN); /* Wait for IACK */ - wait_event_interruptible(iack_queue, 0); + wait_event_interruptible(bridge->iack_queue, 0); /* Return interrupt to low state */ - tmp = ioread32(ca91cx42_bridge->base + VINT_EN); + tmp = ioread32(bridge->base + VINT_EN); tmp = tmp & ~(1 << (level + 24)); - iowrite32(tmp, ca91cx42_bridge->base + VINT_EN); + iowrite32(tmp, bridge->base + VINT_EN); - mutex_unlock(&(vme_int)); + mutex_unlock(&(bridge->vme_int)); return 0; } @@ -338,6 +340,9 @@ int ca91cx42_slave_set(struct vme_slave_resource *image, int enabled, unsigned int i, addr = 0, granularity = 0; unsigned int temp_ctl = 0; unsigned int vme_bound, pci_offset; + struct ca91cx42_driver *bridge; + + bridge = image->parent->driver_priv; i = image->number; @@ -397,14 +402,14 @@ int ca91cx42_slave_set(struct vme_slave_resource *image, int enabled, } /* Disable while we are mucking around */ - temp_ctl = ioread32(ca91cx42_bridge->base + CA91CX42_VSI_CTL[i]); + temp_ctl = ioread32(bridge->base + CA91CX42_VSI_CTL[i]); temp_ctl &= ~CA91CX42_VSI_CTL_EN; - iowrite32(temp_ctl, ca91cx42_bridge->base + CA91CX42_VSI_CTL[i]); + iowrite32(temp_ctl, bridge->base + CA91CX42_VSI_CTL[i]); /* Setup mapping */ - iowrite32(vme_base, ca91cx42_bridge->base + CA91CX42_VSI_BS[i]); - iowrite32(vme_bound, ca91cx42_bridge->base + CA91CX42_VSI_BD[i]); - iowrite32(pci_offset, ca91cx42_bridge->base + CA91CX42_VSI_TO[i]); + iowrite32(vme_base, bridge->base + CA91CX42_VSI_BS[i]); + iowrite32(vme_bound, bridge->base + CA91CX42_VSI_BD[i]); + iowrite32(pci_offset, bridge->base + CA91CX42_VSI_TO[i]); /* XXX Prefetch stuff currently unsupported */ #if 0 @@ -434,12 +439,12 @@ int ca91cx42_slave_set(struct vme_slave_resource *image, int enabled, temp_ctl |= CA91CX42_VSI_CTL_PGM_DATA; /* Write ctl reg without enable */ - iowrite32(temp_ctl, ca91cx42_bridge->base + CA91CX42_VSI_CTL[i]); + iowrite32(temp_ctl, bridge->base + CA91CX42_VSI_CTL[i]); if (enabled) temp_ctl |= CA91CX42_VSI_CTL_EN; - iowrite32(temp_ctl, ca91cx42_bridge->base + CA91CX42_VSI_CTL[i]); + iowrite32(temp_ctl, bridge->base + CA91CX42_VSI_CTL[i]); return 0; } @@ -450,6 +455,9 @@ int ca91cx42_slave_get(struct vme_slave_resource *image, int *enabled, { unsigned int i, granularity = 0, ctl = 0; unsigned long long vme_bound, pci_offset; + struct ca91cx42_driver *bridge; + + bridge = image->parent->driver_priv; i = image->number; @@ -459,11 +467,11 @@ int ca91cx42_slave_get(struct vme_slave_resource *image, int *enabled, granularity = 0x10000; /* Read Registers */ - ctl = ioread32(ca91cx42_bridge->base + CA91CX42_VSI_CTL[i]); + ctl = ioread32(bridge->base + CA91CX42_VSI_CTL[i]); - *vme_base = ioread32(ca91cx42_bridge->base + CA91CX42_VSI_BS[i]); - vme_bound = ioread32(ca91cx42_bridge->base + CA91CX42_VSI_BD[i]); - pci_offset = ioread32(ca91cx42_bridge->base + CA91CX42_VSI_TO[i]); + *vme_base = ioread32(bridge->base + CA91CX42_VSI_BS[i]); + vme_bound = ioread32(bridge->base + CA91CX42_VSI_BD[i]); + pci_offset = ioread32(bridge->base + CA91CX42_VSI_TO[i]); *pci_base = (dma_addr_t)vme_base + pci_offset; *size = (unsigned long long)((vme_bound - *vme_base) + granularity); @@ -507,6 +515,9 @@ static int ca91cx42_alloc_resource(struct vme_master_resource *image, unsigned long long existing_size; int retval = 0; struct pci_dev *pdev; + struct vme_bridge *ca91cx42_bridge; + + ca91cx42_bridge = image->parent; /* Find pci_dev container of dev */ if (ca91cx42_bridge->parent == NULL) { @@ -601,6 +612,9 @@ int ca91cx42_master_set(struct vme_master_resource *image, int enabled, unsigned int i; unsigned int temp_ctl = 0; unsigned long long pci_bound, vme_offset, pci_base; + struct ca91cx42_driver *bridge; + + bridge = image->parent->driver_priv; /* Verify input data */ if (vme_base & 0xFFF) { @@ -644,9 +658,9 @@ int ca91cx42_master_set(struct vme_master_resource *image, int enabled, i = image->number; /* Disable while we are mucking around */ - temp_ctl = ioread32(ca91cx42_bridge->base + CA91CX42_LSI_CTL[i]); + temp_ctl = ioread32(bridge->base + CA91CX42_LSI_CTL[i]); temp_ctl &= ~CA91CX42_LSI_CTL_EN; - iowrite32(temp_ctl, ca91cx42_bridge->base + CA91CX42_LSI_CTL[i]); + iowrite32(temp_ctl, bridge->base + CA91CX42_LSI_CTL[i]); /* XXX Prefetch stuff currently unsupported */ #if 0 @@ -723,17 +737,17 @@ int ca91cx42_master_set(struct vme_master_resource *image, int enabled, temp_ctl |= CA91CX42_LSI_CTL_PGM_PGM; /* Setup mapping */ - iowrite32(pci_base, ca91cx42_bridge->base + CA91CX42_LSI_BS[i]); - iowrite32(pci_bound, ca91cx42_bridge->base + CA91CX42_LSI_BD[i]); - iowrite32(vme_offset, ca91cx42_bridge->base + CA91CX42_LSI_TO[i]); + iowrite32(pci_base, bridge->base + CA91CX42_LSI_BS[i]); + iowrite32(pci_bound, bridge->base + CA91CX42_LSI_BD[i]); + iowrite32(vme_offset, bridge->base + CA91CX42_LSI_TO[i]); /* Write ctl reg without enable */ - iowrite32(temp_ctl, ca91cx42_bridge->base + CA91CX42_LSI_CTL[i]); + iowrite32(temp_ctl, bridge->base + CA91CX42_LSI_CTL[i]); if (enabled) temp_ctl |= CA91CX42_LSI_CTL_EN; - iowrite32(temp_ctl, ca91cx42_bridge->base + CA91CX42_LSI_CTL[i]); + iowrite32(temp_ctl, bridge->base + CA91CX42_LSI_CTL[i]); spin_unlock(&(image->lock)); return 0; @@ -752,14 +766,17 @@ int __ca91cx42_master_get(struct vme_master_resource *image, int *enabled, { unsigned int i, ctl; unsigned long long pci_base, pci_bound, vme_offset; + struct ca91cx42_driver *bridge; + + bridge = image->parent->driver_priv; i = image->number; - ctl = ioread32(ca91cx42_bridge->base + CA91CX42_LSI_CTL[i]); + ctl = ioread32(bridge->base + CA91CX42_LSI_CTL[i]); - pci_base = ioread32(ca91cx42_bridge->base + CA91CX42_LSI_BS[i]); - vme_offset = ioread32(ca91cx42_bridge->base + CA91CX42_LSI_TO[i]); - pci_bound = ioread32(ca91cx42_bridge->base + CA91CX42_LSI_BD[i]); + pci_base = ioread32(bridge->base + CA91CX42_LSI_BS[i]); + vme_offset = ioread32(bridge->base + CA91CX42_LSI_TO[i]); + pci_bound = ioread32(bridge->base + CA91CX42_LSI_BD[i]); *vme_base = pci_base + vme_offset; *size = (pci_bound - pci_base) + 0x1000; @@ -882,12 +899,15 @@ ssize_t ca91cx42_master_write(struct vme_master_resource *image, void *buf, return retval; } -int ca91cx42_slot_get(void) +int ca91cx42_slot_get(struct vme_bridge *ca91cx42_bridge) { u32 slot = 0; + struct ca91cx42_driver *bridge; + + bridge = ca91cx42_bridge->driver_priv; if (!geoid) { - slot = ioread32(ca91cx42_bridge->base + VCSR_BS); + slot = ioread32(bridge->base + VCSR_BS); slot = ((slot & CA91CX42_VCSR_BS_SLOT_M) >> 27); } else slot = geoid; @@ -909,19 +929,23 @@ static int __init ca91cx42_init(void) * Auto-ID or Geographic address. This function ensures that the window is * enabled at an offset consistent with the boards geopgraphic address. */ -static int ca91cx42_crcsr_init(struct pci_dev *pdev) +static int ca91cx42_crcsr_init(struct vme_bridge *ca91cx42_bridge, + struct pci_dev *pdev) { unsigned int crcsr_addr; int tmp, slot; + struct ca91cx42_driver *bridge; + + bridge = ca91cx42_bridge->driver_priv; /* XXX We may need to set this somehow as the Universe II does not support * geographical addressing. */ #if 0 if (vme_slotnum != -1) - iowrite32(vme_slotnum << 27, ca91cx42_bridge->base + VCSR_BS); + iowrite32(vme_slotnum << 27, bridge->base + VCSR_BS); #endif - slot = ca91cx42_slot_get(); + slot = ca91cx42_slot_get(ca91cx42_bridge); dev_info(&pdev->dev, "CR/CSR Offset: %d\n", slot); if (slot == 0) { dev_err(&pdev->dev, "Slot number is unset, not configuring " @@ -930,39 +954,44 @@ static int ca91cx42_crcsr_init(struct pci_dev *pdev) } /* Allocate mem for CR/CSR image */ - crcsr_kernel = pci_alloc_consistent(pdev, VME_CRCSR_BUF_SIZE, - &crcsr_bus); - if (crcsr_kernel == NULL) { + bridge->crcsr_kernel = pci_alloc_consistent(pdev, VME_CRCSR_BUF_SIZE, + &(bridge->crcsr_bus)); + if (bridge->crcsr_kernel == NULL) { dev_err(&pdev->dev, "Failed to allocate memory for CR/CSR " "image\n"); return -ENOMEM; } - memset(crcsr_kernel, 0, VME_CRCSR_BUF_SIZE); + memset(bridge->crcsr_kernel, 0, VME_CRCSR_BUF_SIZE); crcsr_addr = slot * (512 * 1024); - iowrite32(crcsr_bus - crcsr_addr, ca91cx42_bridge->base + VCSR_TO); + iowrite32(bridge->crcsr_bus - crcsr_addr, bridge->base + VCSR_TO); - tmp = ioread32(ca91cx42_bridge->base + VCSR_CTL); + tmp = ioread32(bridge->base + VCSR_CTL); tmp |= CA91CX42_VCSR_CTL_EN; - iowrite32(tmp, ca91cx42_bridge->base + VCSR_CTL); + iowrite32(tmp, bridge->base + VCSR_CTL); return 0; } -static void ca91cx42_crcsr_exit(struct pci_dev *pdev) +static void ca91cx42_crcsr_exit(struct vme_bridge *ca91cx42_bridge, + struct pci_dev *pdev) { u32 tmp; + struct ca91cx42_driver *bridge; + + bridge = ca91cx42_bridge->driver_priv; /* Turn off CR/CSR space */ - tmp = ioread32(ca91cx42_bridge->base + VCSR_CTL); + tmp = ioread32(bridge->base + VCSR_CTL); tmp &= ~CA91CX42_VCSR_CTL_EN; - iowrite32(tmp, ca91cx42_bridge->base + VCSR_CTL); + iowrite32(tmp, bridge->base + VCSR_CTL); /* Free image */ - iowrite32(0, ca91cx42_bridge->base + VCSR_TO); + iowrite32(0, bridge->base + VCSR_TO); - pci_free_consistent(pdev, VME_CRCSR_BUF_SIZE, crcsr_kernel, crcsr_bus); + pci_free_consistent(pdev, VME_CRCSR_BUF_SIZE, bridge->crcsr_kernel, + bridge->crcsr_bus); } static int ca91cx42_probe(struct pci_dev *pdev, const struct pci_device_id *id) @@ -970,6 +999,8 @@ static int ca91cx42_probe(struct pci_dev *pdev, const struct pci_device_id *id) int retval, i; u32 data; struct list_head *pos = NULL; + struct vme_bridge *ca91cx42_bridge; + struct ca91cx42_driver *ca91cx42_device; struct vme_master_resource *master_image; struct vme_slave_resource *slave_image; #if 0 @@ -991,6 +1022,19 @@ static int ca91cx42_probe(struct pci_dev *pdev, const struct pci_device_id *id) memset(ca91cx42_bridge, 0, sizeof(struct vme_bridge)); + ca91cx42_device = kmalloc(sizeof(struct ca91cx42_driver), GFP_KERNEL); + + if (ca91cx42_device == NULL) { + dev_err(&pdev->dev, "Failed to allocate memory for device " + "structure\n"); + retval = -ENOMEM; + goto err_driver; + } + + memset(ca91cx42_device, 0, sizeof(struct ca91cx42_driver)); + + ca91cx42_bridge->driver_priv = ca91cx42_device; + /* Enable the device */ retval = pci_enable_device(pdev); if (retval) { @@ -1006,16 +1050,16 @@ static int ca91cx42_probe(struct pci_dev *pdev, const struct pci_device_id *id) } /* map registers in BAR 0 */ - ca91cx42_bridge->base = ioremap_nocache(pci_resource_start(pdev, 0), + ca91cx42_device->base = ioremap_nocache(pci_resource_start(pdev, 0), 4096); - if (!ca91cx42_bridge->base) { + if (!ca91cx42_device->base) { dev_err(&pdev->dev, "Unable to remap CRG region\n"); retval = -EIO; goto err_remap; } /* Check to see if the mapping worked out */ - data = ioread32(ca91cx42_bridge->base + CA91CX42_PCI_ID) & 0x0000FFFF; + data = ioread32(ca91cx42_device->base + CA91CX42_PCI_ID) & 0x0000FFFF; if (data != PCI_VENDOR_ID_TUNDRA) { dev_err(&pdev->dev, "PCI_ID check failed\n"); retval = -EIO; @@ -1023,11 +1067,10 @@ static int ca91cx42_probe(struct pci_dev *pdev, const struct pci_device_id *id) } /* Initialize wait queues & mutual exclusion flags */ - /* XXX These need to be moved to the vme_bridge structure */ - init_waitqueue_head(&dma_queue); - init_waitqueue_head(&iack_queue); - mutex_init(&(vme_int)); - mutex_init(&(vme_rmw)); + init_waitqueue_head(&(ca91cx42_device->dma_queue)); + init_waitqueue_head(&(ca91cx42_device->iack_queue)); + mutex_init(&(ca91cx42_device->vme_int)); + mutex_init(&(ca91cx42_device->vme_rmw)); ca91cx42_bridge->parent = &(pdev->dev); strcpy(ca91cx42_bridge->name, driver_name); @@ -1155,12 +1198,13 @@ static int ca91cx42_probe(struct pci_dev *pdev, const struct pci_device_id *id) #endif ca91cx42_bridge->slot_get = ca91cx42_slot_get; - data = ioread32(ca91cx42_bridge->base + MISC_CTL); + data = ioread32(ca91cx42_device->base + MISC_CTL); dev_info(&pdev->dev, "Board is%s the VME system controller\n", (data & CA91CX42_MISC_CTL_SYSCON) ? "" : " not"); - dev_info(&pdev->dev, "Slot ID is %d\n", ca91cx42_slot_get()); + dev_info(&pdev->dev, "Slot ID is %d\n", + ca91cx42_slot_get(ca91cx42_bridge)); - if (ca91cx42_crcsr_init(pdev)) { + if (ca91cx42_crcsr_init(ca91cx42_bridge, pdev)) { dev_err(&pdev->dev, "CR/CSR configuration failed.\n"); retval = -EINVAL; #if 0 @@ -1177,11 +1221,13 @@ static int ca91cx42_probe(struct pci_dev *pdev, const struct pci_device_id *id) goto err_reg; } + pci_set_drvdata(pdev, ca91cx42_bridge); + return 0; vme_unregister_bridge(ca91cx42_bridge); err_reg: - ca91cx42_crcsr_exit(pdev); + ca91cx42_crcsr_exit(ca91cx42_bridge, pdev); #if 0 err_crcsr: #endif @@ -1217,15 +1263,17 @@ err_master: kfree(master_image); } - ca91cx42_irq_exit(pdev); + ca91cx42_irq_exit(ca91cx42_device, pdev); err_irq: err_test: - iounmap(ca91cx42_bridge->base); + iounmap(ca91cx42_device->base); err_remap: pci_release_regions(pdev); err_resource: pci_disable_device(pdev); err_enable: + kfree(ca91cx42_device); +err_driver: kfree(ca91cx42_bridge); err_struct: return retval; @@ -1239,27 +1287,32 @@ void ca91cx42_remove(struct pci_dev *pdev) struct vme_slave_resource *slave_image; struct vme_dma_resource *dma_ctrlr; struct vme_lm_resource *lm; + struct ca91cx42_driver *bridge; + struct vme_bridge *ca91cx42_bridge = pci_get_drvdata(pdev); + + bridge = ca91cx42_bridge->driver_priv; + /* Turn off Ints */ - iowrite32(0, ca91cx42_bridge->base + LINT_EN); + iowrite32(0, bridge->base + LINT_EN); /* Turn off the windows */ - iowrite32(0x00800000, ca91cx42_bridge->base + LSI0_CTL); - iowrite32(0x00800000, ca91cx42_bridge->base + LSI1_CTL); - iowrite32(0x00800000, ca91cx42_bridge->base + LSI2_CTL); - iowrite32(0x00800000, ca91cx42_bridge->base + LSI3_CTL); - iowrite32(0x00800000, ca91cx42_bridge->base + LSI4_CTL); - iowrite32(0x00800000, ca91cx42_bridge->base + LSI5_CTL); - iowrite32(0x00800000, ca91cx42_bridge->base + LSI6_CTL); - iowrite32(0x00800000, ca91cx42_bridge->base + LSI7_CTL); - iowrite32(0x00F00000, ca91cx42_bridge->base + VSI0_CTL); - iowrite32(0x00F00000, ca91cx42_bridge->base + VSI1_CTL); - iowrite32(0x00F00000, ca91cx42_bridge->base + VSI2_CTL); - iowrite32(0x00F00000, ca91cx42_bridge->base + VSI3_CTL); - iowrite32(0x00F00000, ca91cx42_bridge->base + VSI4_CTL); - iowrite32(0x00F00000, ca91cx42_bridge->base + VSI5_CTL); - iowrite32(0x00F00000, ca91cx42_bridge->base + VSI6_CTL); - iowrite32(0x00F00000, ca91cx42_bridge->base + VSI7_CTL); + iowrite32(0x00800000, bridge->base + LSI0_CTL); + iowrite32(0x00800000, bridge->base + LSI1_CTL); + iowrite32(0x00800000, bridge->base + LSI2_CTL); + iowrite32(0x00800000, bridge->base + LSI3_CTL); + iowrite32(0x00800000, bridge->base + LSI4_CTL); + iowrite32(0x00800000, bridge->base + LSI5_CTL); + iowrite32(0x00800000, bridge->base + LSI6_CTL); + iowrite32(0x00800000, bridge->base + LSI7_CTL); + iowrite32(0x00F00000, bridge->base + VSI0_CTL); + iowrite32(0x00F00000, bridge->base + VSI1_CTL); + iowrite32(0x00F00000, bridge->base + VSI2_CTL); + iowrite32(0x00F00000, bridge->base + VSI3_CTL); + iowrite32(0x00F00000, bridge->base + VSI4_CTL); + iowrite32(0x00F00000, bridge->base + VSI5_CTL); + iowrite32(0x00F00000, bridge->base + VSI6_CTL); + iowrite32(0x00F00000, bridge->base + VSI7_CTL); vme_unregister_bridge(ca91cx42_bridge); #if 0 @@ -1294,9 +1347,9 @@ void ca91cx42_remove(struct pci_dev *pdev) kfree(master_image); } - ca91cx42_irq_exit(pdev); + ca91cx42_irq_exit(bridge, pdev); - iounmap(ca91cx42_bridge->base); + iounmap(bridge->base); pci_release_regions(pdev); @@ -1346,7 +1399,7 @@ int ca91cx42_master_rmw(vmeRmwCfg_t *vmeRmw) } /* Find the PCI address that maps to the desired VME address */ for (i = 0; i < 8; i++) { - temp_ctl = ioread32(ca91cx42_bridge->base + + temp_ctl = ioread32(bridge->base + CA91CX42_LSI_CTL[i]); if ((temp_ctl & 0x80000000) == 0) { continue; @@ -1357,9 +1410,9 @@ int ca91cx42_master_rmw(vmeRmwCfg_t *vmeRmw) if (vmeOut.addrSpace != vmeRmw->addrSpace) { continue; } - tempBS = ioread32(ca91cx42_bridge->base + CA91CX42_LSI_BS[i]); - tempBD = ioread32(ca91cx42_bridge->base + CA91CX42_LSI_BD[i]); - tempTO = ioread32(ca91cx42_bridge->base + CA91CX42_LSI_TO[i]); + tempBS = ioread32(bridge->base + CA91CX42_LSI_BS[i]); + tempBD = ioread32(bridge->base + CA91CX42_LSI_BD[i]); + tempTO = ioread32(bridge->base + CA91CX42_LSI_TO[i]); vmeBS = tempBS + tempTO; vmeBD = tempBD + tempTO; if ((vmeRmw->targetAddr >= vmeBS) && @@ -1378,13 +1431,13 @@ int ca91cx42_master_rmw(vmeRmwCfg_t *vmeRmw) return -EINVAL; } /* Setup the RMW registers. */ - iowrite32(0, ca91cx42_bridge->base + SCYC_CTL); - iowrite32(SWIZZLE(vmeRmw->enableMask), ca91cx42_bridge->base + SCYC_EN); - iowrite32(SWIZZLE(vmeRmw->compareData), ca91cx42_bridge->base + + iowrite32(0, bridge->base + SCYC_CTL); + iowrite32(SWIZZLE(vmeRmw->enableMask), bridge->base + SCYC_EN); + iowrite32(SWIZZLE(vmeRmw->compareData), bridge->base + SCYC_CMP); - iowrite32(SWIZZLE(vmeRmw->swapData), ca91cx42_bridge->base + SCYC_SWP); - iowrite32((int)rmw_pci_data_ptr, ca91cx42_bridge->base + SCYC_ADDR); - iowrite32(1, ca91cx42_bridge->base + SCYC_CTL); + iowrite32(SWIZZLE(vmeRmw->swapData), bridge->base + SCYC_SWP); + iowrite32((int)rmw_pci_data_ptr, bridge->base + SCYC_ADDR); + iowrite32(1, bridge->base + SCYC_CTL); /* Run the RMW cycle until either success or max attempts. */ vmeRmw->numAttempts = 1; @@ -1393,7 +1446,7 @@ int ca91cx42_master_rmw(vmeRmwCfg_t *vmeRmw) if ((ioread32(vaDataPtr) & vmeRmw->enableMask) == (vmeRmw->swapData & vmeRmw->enableMask)) { - iowrite32(0, ca91cx42_bridge->base + SCYC_CTL); + iowrite32(0, bridge->base + SCYC_CTL); break; } @@ -1478,8 +1531,8 @@ ca91cx42_start_dma(int channel, unsigned int dgcsreg, TDMA_Cmd_Packet *vmeLL) /* Setup registers as needed for direct or chained. */ if (dgcsreg & 0x8000000) { - iowrite32(0, ca91cx42_bridge->base + DTBC); - iowrite32((unsigned int)vmeLL, ca91cx42_bridge->base + DCPP); + iowrite32(0, bridge->base + DTBC); + iowrite32((unsigned int)vmeLL, bridge->base + DCPP); } else { #if 0 printk(KERN_ERR "Starting: DGCS = %08x\n", dgcsreg); @@ -1493,17 +1546,17 @@ ca91cx42_start_dma(int channel, unsigned int dgcsreg, TDMA_Cmd_Packet *vmeLL) ioread32(&vmeLL->dctl)); #endif /* Write registers */ - iowrite32(ioread32(&vmeLL->dva), ca91cx42_bridge->base + DVA); - iowrite32(ioread32(&vmeLL->dlv), ca91cx42_bridge->base + DLA); - iowrite32(ioread32(&vmeLL->dtbc), ca91cx42_bridge->base + DTBC); - iowrite32(ioread32(&vmeLL->dctl), ca91cx42_bridge->base + DCTL); - iowrite32(0, ca91cx42_bridge->base + DCPP); + iowrite32(ioread32(&vmeLL->dva), bridge->base + DVA); + iowrite32(ioread32(&vmeLL->dlv), bridge->base + DLA); + iowrite32(ioread32(&vmeLL->dtbc), bridge->base + DTBC); + iowrite32(ioread32(&vmeLL->dctl), bridge->base + DCTL); + iowrite32(0, bridge->base + DCPP); } /* Start the operation */ - iowrite32(dgcsreg, ca91cx42_bridge->base + DGCS); + iowrite32(dgcsreg, bridge->base + DGCS); val = get_tbl(); - iowrite32(dgcsreg | 0x8000000F, ca91cx42_bridge->base + DGCS); + iowrite32(dgcsreg | 0x8000000F, bridge->base + DGCS); return val; } @@ -1704,10 +1757,10 @@ int ca91cx42_do_dma(vmeDmaPacket_t *vmeDma) } wait_event_interruptible(dma_queue, - ioread32(ca91cx42_bridge->base + DGCS) & 0x800); + ioread32(bridge->base + DGCS) & 0x800); - val = ioread32(ca91cx42_bridge->base + DGCS); - iowrite32(val | 0xF00, ca91cx42_bridge->base + DGCS); + val = ioread32(bridge->base + DGCS); + iowrite32(val | 0xF00, bridge->base + DGCS); vmeDma->vmeDmaStatus = 0; @@ -1715,15 +1768,15 @@ int ca91cx42_do_dma(vmeDmaPacket_t *vmeDma) vmeDma->vmeDmaStatus = val & 0x700; printk(KERN_ERR "ca91c042: DMA Error in ca91cx42_DMA_irqhandler" " DGCS=%08X\n", val); - val = ioread32(ca91cx42_bridge->base + DCPP); + val = ioread32(bridge->base + DCPP); printk(KERN_ERR "ca91c042: DCPP=%08X\n", val); - val = ioread32(ca91cx42_bridge->base + DCTL); + val = ioread32(bridge->base + DCTL); printk(KERN_ERR "ca91c042: DCTL=%08X\n", val); - val = ioread32(ca91cx42_bridge->base + DTBC); + val = ioread32(bridge->base + DTBC); printk(KERN_ERR "ca91c042: DTBC=%08X\n", val); - val = ioread32(ca91cx42_bridge->base + DLA); + val = ioread32(bridge->base + DLA); printk(KERN_ERR "ca91c042: DLA=%08X\n", val); - val = ioread32(ca91cx42_bridge->base + DVA); + val = ioread32(bridge->base + DVA); printk(KERN_ERR "ca91c042: DVA=%08X\n", val); } @@ -1766,9 +1819,9 @@ int ca91cx42_lm_set(vmeLmCfg_t *vmeLm) } /* Disable while we are mucking around */ - iowrite32(0x00000000, ca91cx42_bridge->base + LM_CTL); + iowrite32(0x00000000, bridge->base + LM_CTL); - iowrite32(vmeLm->addr, ca91cx42_bridge->base + LM_BS); + iowrite32(vmeLm->addr, bridge->base + LM_BS); /* Setup CTL register. */ if (vmeLm->userAccessType & VME_SUPER) @@ -1782,8 +1835,8 @@ int ca91cx42_lm_set(vmeLmCfg_t *vmeLm) /* Write ctl reg and enable */ - iowrite32(0x80000000 | temp_ctl, ca91cx42_bridge->base + LM_CTL); - temp_ctl = ioread32(ca91cx42_bridge->base + LM_CTL); + iowrite32(0x80000000 | temp_ctl, bridge->base + LM_CTL); + temp_ctl = ioread32(bridge->base + LM_CTL); return 0; } @@ -1800,7 +1853,7 @@ int ca91cx42_wait_lm(vmeLmCfg_t *vmeLm) vmeLm->lmWait = 10; interruptible_sleep_on_timeout(&lm_queue, vmeLm->lmWait); } - iowrite32(0x00000000, ca91cx42_bridge->base + LM_CTL); + iowrite32(0x00000000, bridge->base + LM_CTL); return 0; } @@ -1812,7 +1865,7 @@ int ca91cx42_set_arbiter(vmeArbiterCfg_t *vmeArb) int temp_ctl = 0; int vbto = 0; - temp_ctl = ioread32(ca91cx42_bridge->base + MISC_CTL); + temp_ctl = ioread32(bridge->base + MISC_CTL); temp_ctl &= 0x00FFFFFF; if (vmeArb->globalTimeoutTimer == 0xFFFFFFFF) { @@ -1834,7 +1887,7 @@ int ca91cx42_set_arbiter(vmeArbiterCfg_t *vmeArb) if (vmeArb->arbiterTimeoutFlag) temp_ctl |= 2 << 24; - iowrite32(temp_ctl, ca91cx42_bridge->base + MISC_CTL); + iowrite32(temp_ctl, bridge->base + MISC_CTL); return 0; } @@ -1843,7 +1896,7 @@ int ca91cx42_get_arbiter(vmeArbiterCfg_t *vmeArb) int temp_ctl = 0; int vbto = 0; - temp_ctl = ioread32(ca91cx42_bridge->base + MISC_CTL); + temp_ctl = ioread32(bridge->base + MISC_CTL); vbto = (temp_ctl >> 28) & 0xF; if (vbto != 0) @@ -1864,7 +1917,7 @@ int ca91cx42_set_requestor(vmeRequesterCfg_t *vmeReq) { int temp_ctl = 0; - temp_ctl = ioread32(ca91cx42_bridge->base + MAST_CTL); + temp_ctl = ioread32(bridge->base + MAST_CTL); temp_ctl &= 0xFF0FFFFF; if (vmeReq->releaseMode == 1) @@ -1875,7 +1928,7 @@ int ca91cx42_set_requestor(vmeRequesterCfg_t *vmeReq) temp_ctl |= (vmeReq->requestLevel << 22); - iowrite32(temp_ctl, ca91cx42_bridge->base + MAST_CTL); + iowrite32(temp_ctl, bridge->base + MAST_CTL); return 0; } @@ -1883,7 +1936,7 @@ int ca91cx42_get_requestor(vmeRequesterCfg_t *vmeReq) { int temp_ctl = 0; - temp_ctl = ioread32(ca91cx42_bridge->base + MAST_CTL); + temp_ctl = ioread32(bridge->base + MAST_CTL); if (temp_ctl & (1 << 20)) vmeReq->releaseMode = 1; diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.h b/drivers/staging/vme/bridges/vme_ca91cx42.h index 2a9ad1454f4e..df1050297849 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.h +++ b/drivers/staging/vme/bridges/vme_ca91cx42.h @@ -37,6 +37,22 @@ #define CA91C142_MAX_DMA 1 /* Max DMA Controllers */ #define CA91C142_MAX_MAILBOX 4 /* Max Mail Box registers */ +/* Structure used to hold driver specific information */ +struct ca91cx42_driver { + void *base; /* Base Address of device registers */ + wait_queue_head_t dma_queue; + wait_queue_head_t iack_queue; + wait_queue_head_t mbox_queue; + void (*lm_callback[4])(int); /* Called in interrupt handler */ + void *crcsr_kernel; + dma_addr_t crcsr_bus; + struct mutex vme_rmw; /* Only one RMW cycle at a time */ + struct mutex vme_int; /* + * Only one VME interrupt can be + * generated at a time, provide locking + */ +}; + /* See Page 2-77 in the Universe User Manual */ struct ca91cx42_dma_descriptor { unsigned int dctl; /* DMA Control */ diff --git a/drivers/staging/vme/bridges/vme_tsi148.c b/drivers/staging/vme/bridges/vme_tsi148.c index e74c4a953b2d..e3d300c9bfba 100644 --- a/drivers/staging/vme/bridges/vme_tsi148.c +++ b/drivers/staging/vme/bridges/vme_tsi148.c @@ -59,26 +59,11 @@ int tsi148_dma_list_add (struct vme_dma_list *, struct vme_dma_attr *, int tsi148_dma_list_exec(struct vme_dma_list *); int tsi148_dma_list_empty(struct vme_dma_list *); int tsi148_generate_irq(int, int); -int tsi148_slot_get(void); -/* Modue parameter */ +/* Module parameter */ static int err_chk; static int geoid; -/* XXX These should all be in a per device structure */ -static struct vme_bridge *tsi148_bridge; -static wait_queue_head_t dma_queue[2]; -static wait_queue_head_t iack_queue; -static void (*lm_callback[4])(int); /* Called in interrupt handler */ -static void *crcsr_kernel; -static dma_addr_t crcsr_bus; -static struct vme_master_resource *flush_image; -static struct mutex vme_rmw; /* Only one RMW cycle at a time */ -static struct mutex vme_int; /* - * Only one VME interrupt can be - * generated at a time, provide locking - */ - static char driver_name[] = "vme_tsi148"; static const struct pci_device_id tsi148_ids[] = { @@ -110,16 +95,17 @@ static void reg_split(unsigned long long variable, unsigned int *high, /* * Wakes up DMA queue. */ -static u32 tsi148_DMA_irqhandler(int channel_mask) +static u32 tsi148_DMA_irqhandler(struct tsi148_driver *bridge, + int channel_mask) { u32 serviced = 0; if (channel_mask & TSI148_LCSR_INTS_DMA0S) { - wake_up(&dma_queue[0]); + wake_up(&(bridge->dma_queue[0])); serviced |= TSI148_LCSR_INTC_DMA0C; } if (channel_mask & TSI148_LCSR_INTS_DMA1S) { - wake_up(&dma_queue[1]); + wake_up(&(bridge->dma_queue[1])); serviced |= TSI148_LCSR_INTC_DMA1C; } @@ -129,7 +115,7 @@ static u32 tsi148_DMA_irqhandler(int channel_mask) /* * Wake up location monitor queue */ -static u32 tsi148_LM_irqhandler(u32 stat) +static u32 tsi148_LM_irqhandler(struct tsi148_driver *bridge, u32 stat) { int i; u32 serviced = 0; @@ -137,7 +123,7 @@ static u32 tsi148_LM_irqhandler(u32 stat) for (i = 0; i < 4; i++) { if(stat & TSI148_LCSR_INTS_LMS[i]) { /* We only enable interrupts if the callback is set */ - lm_callback[i](i); + bridge->lm_callback[i](i); serviced |= TSI148_LCSR_INTC_LMC[i]; } } @@ -150,7 +136,7 @@ static u32 tsi148_LM_irqhandler(u32 stat) * * XXX This functionality is not exposed up though API. */ -static u32 tsi148_MB_irqhandler(u32 stat) +static u32 tsi148_MB_irqhandler(struct tsi148_driver *bridge, u32 stat) { int i; u32 val; @@ -158,8 +144,7 @@ static u32 tsi148_MB_irqhandler(u32 stat) for (i = 0; i < 4; i++) { if(stat & TSI148_LCSR_INTS_MBS[i]) { - val = ioread32be(tsi148_bridge->base + - TSI148_GCSR_MBOX[i]); + val = ioread32be(bridge->base + TSI148_GCSR_MBOX[i]); printk("VME Mailbox %d received: 0x%x\n", i, val); serviced |= TSI148_LCSR_INTC_MBC[i]; } @@ -171,22 +156,21 @@ static u32 tsi148_MB_irqhandler(u32 stat) /* * Display error & status message when PERR (PCI) exception interrupt occurs. */ -static u32 tsi148_PERR_irqhandler(void) +static u32 tsi148_PERR_irqhandler(struct tsi148_driver *bridge) { printk(KERN_ERR "PCI Exception at address: 0x%08x:%08x, attributes: %08x\n", - ioread32be(tsi148_bridge->base + TSI148_LCSR_EDPAU), - ioread32be(tsi148_bridge->base + TSI148_LCSR_EDPAL), - ioread32be(tsi148_bridge->base + TSI148_LCSR_EDPAT) + ioread32be(bridge->base + TSI148_LCSR_EDPAU), + ioread32be(bridge->base + TSI148_LCSR_EDPAL), + ioread32be(bridge->base + TSI148_LCSR_EDPAT) ); printk(KERN_ERR "PCI-X attribute reg: %08x, PCI-X split completion reg: %08x\n", - ioread32be(tsi148_bridge->base + TSI148_LCSR_EDPXA), - ioread32be(tsi148_bridge->base + TSI148_LCSR_EDPXS) + ioread32be(bridge->base + TSI148_LCSR_EDPXA), + ioread32be(bridge->base + TSI148_LCSR_EDPXS) ); - iowrite32be(TSI148_LCSR_EDPAT_EDPCL, - tsi148_bridge->base + TSI148_LCSR_EDPAT); + iowrite32be(TSI148_LCSR_EDPAT_EDPCL, bridge->base + TSI148_LCSR_EDPAT); return TSI148_LCSR_INTC_PERRC; } @@ -194,16 +178,19 @@ static u32 tsi148_PERR_irqhandler(void) /* * Save address and status when VME error interrupt occurs. */ -static u32 tsi148_VERR_irqhandler(void) +static u32 tsi148_VERR_irqhandler(struct vme_bridge *tsi148_bridge) { unsigned int error_addr_high, error_addr_low; unsigned long long error_addr; u32 error_attrib; struct vme_bus_error *error; + struct tsi148_driver *bridge; - error_addr_high = ioread32be(tsi148_bridge->base + TSI148_LCSR_VEAU); - error_addr_low = ioread32be(tsi148_bridge->base + TSI148_LCSR_VEAL); - error_attrib = ioread32be(tsi148_bridge->base + TSI148_LCSR_VEAT); + bridge = tsi148_bridge->driver_priv; + + error_addr_high = ioread32be(bridge->base + TSI148_LCSR_VEAU); + error_addr_low = ioread32be(bridge->base + TSI148_LCSR_VEAL); + error_attrib = ioread32be(bridge->base + TSI148_LCSR_VEAT); reg_join(error_addr_high, error_addr_low, &error_addr); @@ -227,8 +214,7 @@ static u32 tsi148_VERR_irqhandler(void) } /* Clear Status */ - iowrite32be(TSI148_LCSR_VEAT_VESCL, - tsi148_bridge->base + TSI148_LCSR_VEAT); + iowrite32be(TSI148_LCSR_VEAT_VESCL, bridge->base + TSI148_LCSR_VEAT); return TSI148_LCSR_INTC_VERRC; } @@ -236,9 +222,9 @@ static u32 tsi148_VERR_irqhandler(void) /* * Wake up IACK queue. */ -static u32 tsi148_IACK_irqhandler(void) +static u32 tsi148_IACK_irqhandler(struct tsi148_driver *bridge) { - wake_up(&iack_queue); + wake_up(&(bridge->iack_queue)); return TSI148_LCSR_INTC_IACKC; } @@ -246,9 +232,13 @@ static u32 tsi148_IACK_irqhandler(void) /* * Calling VME bus interrupt callback if provided. */ -static u32 tsi148_VIRQ_irqhandler(u32 stat) +static u32 tsi148_VIRQ_irqhandler(struct vme_bridge *tsi148_bridge, + u32 stat) { int vec, i, serviced = 0; + struct tsi148_driver *bridge; + + bridge = tsi148_bridge->driver_priv; for (i = 7; i > 0; i--) { if (stat & (1 << i)) { @@ -258,8 +248,7 @@ static u32 tsi148_VIRQ_irqhandler(u32 stat) * 8-bit IACK cycles on the bus, read from offset * 3. */ - vec = ioread8(tsi148_bridge->base + - TSI148_LCSR_VIACK[i] + 3); + vec = ioread8(bridge->base + TSI148_LCSR_VIACK[i] + 3); vme_irq_handler(tsi148_bridge, i, vec); @@ -274,13 +263,19 @@ static u32 tsi148_VIRQ_irqhandler(u32 stat) * Top level interrupt handler. Clears appropriate interrupt status bits and * then calls appropriate sub handler(s). */ -static irqreturn_t tsi148_irqhandler(int irq, void *dev_id) +static irqreturn_t tsi148_irqhandler(int irq, void *ptr) { u32 stat, enable, serviced = 0; + struct vme_bridge *tsi148_bridge; + struct tsi148_driver *bridge; + + tsi148_bridge = ptr; + + bridge = tsi148_bridge->driver_priv; /* Determine which interrupts are unmasked and set */ - enable = ioread32be(tsi148_bridge->base + TSI148_LCSR_INTEO); - stat = ioread32be(tsi148_bridge->base + TSI148_LCSR_INTS); + enable = ioread32be(bridge->base + TSI148_LCSR_INTEO); + stat = ioread32be(bridge->base + TSI148_LCSR_INTS); /* Only look at unmasked interrupts */ stat &= enable; @@ -292,61 +287,63 @@ static irqreturn_t tsi148_irqhandler(int irq, void *dev_id) /* Call subhandlers as appropriate */ /* DMA irqs */ if (stat & (TSI148_LCSR_INTS_DMA1S | TSI148_LCSR_INTS_DMA0S)) - serviced |= tsi148_DMA_irqhandler(stat); + serviced |= tsi148_DMA_irqhandler(bridge, stat); /* Location monitor irqs */ if (stat & (TSI148_LCSR_INTS_LM3S | TSI148_LCSR_INTS_LM2S | TSI148_LCSR_INTS_LM1S | TSI148_LCSR_INTS_LM0S)) - serviced |= tsi148_LM_irqhandler(stat); + serviced |= tsi148_LM_irqhandler(bridge, stat); /* Mail box irqs */ if (stat & (TSI148_LCSR_INTS_MB3S | TSI148_LCSR_INTS_MB2S | TSI148_LCSR_INTS_MB1S | TSI148_LCSR_INTS_MB0S)) - serviced |= tsi148_MB_irqhandler(stat); + serviced |= tsi148_MB_irqhandler(bridge, stat); /* PCI bus error */ if (stat & TSI148_LCSR_INTS_PERRS) - serviced |= tsi148_PERR_irqhandler(); + serviced |= tsi148_PERR_irqhandler(bridge); /* VME bus error */ if (stat & TSI148_LCSR_INTS_VERRS) - serviced |= tsi148_VERR_irqhandler(); + serviced |= tsi148_VERR_irqhandler(tsi148_bridge); /* IACK irq */ if (stat & TSI148_LCSR_INTS_IACKS) - serviced |= tsi148_IACK_irqhandler(); + serviced |= tsi148_IACK_irqhandler(bridge); /* VME bus irqs */ if (stat & (TSI148_LCSR_INTS_IRQ7S | TSI148_LCSR_INTS_IRQ6S | TSI148_LCSR_INTS_IRQ5S | TSI148_LCSR_INTS_IRQ4S | TSI148_LCSR_INTS_IRQ3S | TSI148_LCSR_INTS_IRQ2S | TSI148_LCSR_INTS_IRQ1S)) - serviced |= tsi148_VIRQ_irqhandler(stat); + serviced |= tsi148_VIRQ_irqhandler(tsi148_bridge, stat); /* Clear serviced interrupts */ - iowrite32be(serviced, tsi148_bridge->base + TSI148_LCSR_INTC); + iowrite32be(serviced, bridge->base + TSI148_LCSR_INTC); return IRQ_HANDLED; } -static int tsi148_irq_init(struct vme_bridge *bridge) +static int tsi148_irq_init(struct vme_bridge *tsi148_bridge) { int result; unsigned int tmp; struct pci_dev *pdev; + struct tsi148_driver *bridge; - /* Need pdev */ - pdev = container_of(bridge->parent, struct pci_dev, dev); + pdev = container_of(tsi148_bridge->parent, struct pci_dev, dev); + + bridge = tsi148_bridge->driver_priv; /* Initialise list for VME bus errors */ - INIT_LIST_HEAD(&(bridge->vme_errors)); + INIT_LIST_HEAD(&(tsi148_bridge->vme_errors)); - mutex_init(&(bridge->irq_mtx)); + mutex_init(&(tsi148_bridge->irq_mtx)); result = request_irq(pdev->irq, tsi148_irqhandler, IRQF_SHARED, - driver_name, pdev); + driver_name, tsi148_bridge); if (result) { dev_err(&pdev->dev, "Can't get assigned pci irq vector %02X\n", pdev->irq); @@ -360,7 +357,7 @@ static int tsi148_irq_init(struct vme_bridge *bridge) TSI148_LCSR_INTEO_PERREO | TSI148_LCSR_INTEO_VERREO | TSI148_LCSR_INTEO_IACKEO; - /* XXX This leaves the following interrupts masked. + /* This leaves the following interrupts masked. * TSI148_LCSR_INTEO_VIEEO * TSI148_LCSR_INTEO_SYSFLEO * TSI148_LCSR_INTEO_ACFLEO @@ -393,14 +390,14 @@ static int tsi148_irq_init(struct vme_bridge *bridge) return 0; } -static void tsi148_irq_exit(struct pci_dev *pdev) +static void tsi148_irq_exit(struct tsi148_driver *bridge, struct pci_dev *pdev) { /* Turn off interrupts */ - iowrite32be(0x0, tsi148_bridge->base + TSI148_LCSR_INTEO); - iowrite32be(0x0, tsi148_bridge->base + TSI148_LCSR_INTEN); + iowrite32be(0x0, bridge->base + TSI148_LCSR_INTEO); + iowrite32be(0x0, bridge->base + TSI148_LCSR_INTEN); /* Clear all interrupts */ - iowrite32be(0xFFFFFFFF, tsi148_bridge->base + TSI148_LCSR_INTC); + iowrite32be(0xFFFFFFFF, bridge->base + TSI148_LCSR_INTC); /* Detach interrupt handler */ free_irq(pdev->irq, pdev); @@ -409,11 +406,11 @@ static void tsi148_irq_exit(struct pci_dev *pdev) /* * Check to see if an IACk has been received, return true (1) or false (0). */ -int tsi148_iack_received(void) +int tsi148_iack_received(struct tsi148_driver *bridge) { u32 tmp; - tmp = ioread32be(tsi148_bridge->base + TSI148_LCSR_VICR); + tmp = ioread32be(bridge->base + TSI148_LCSR_VICR); if (tmp & TSI148_LCSR_VICR_IRQS) return 0; @@ -424,20 +421,24 @@ int tsi148_iack_received(void) /* * Configure VME interrupt */ -void tsi148_irq_set(int level, int state, int sync) +void tsi148_irq_set(struct vme_bridge *tsi148_bridge, int level, + int state, int sync) { struct pci_dev *pdev; u32 tmp; + struct tsi148_driver *bridge; + + bridge = tsi148_bridge->driver_priv; /* We need to do the ordering differently for enabling and disabling */ if (state == 0) { - tmp = ioread32be(tsi148_bridge->base + TSI148_LCSR_INTEN); + tmp = ioread32be(bridge->base + TSI148_LCSR_INTEN); tmp &= ~TSI148_LCSR_INTEN_IRQEN[level - 1]; - iowrite32be(tmp, tsi148_bridge->base + TSI148_LCSR_INTEN); + iowrite32be(tmp, bridge->base + TSI148_LCSR_INTEN); - tmp = ioread32be(tsi148_bridge->base + TSI148_LCSR_INTEO); + tmp = ioread32be(bridge->base + TSI148_LCSR_INTEO); tmp &= ~TSI148_LCSR_INTEO_IRQEO[level - 1]; - iowrite32be(tmp, tsi148_bridge->base + TSI148_LCSR_INTEO); + iowrite32be(tmp, bridge->base + TSI148_LCSR_INTEO); if (sync != 0) { pdev = container_of(tsi148_bridge->parent, @@ -446,13 +447,13 @@ void tsi148_irq_set(int level, int state, int sync) synchronize_irq(pdev->irq); } } else { - tmp = ioread32be(tsi148_bridge->base + TSI148_LCSR_INTEO); + tmp = ioread32be(bridge->base + TSI148_LCSR_INTEO); tmp |= TSI148_LCSR_INTEO_IRQEO[level - 1]; - iowrite32be(tmp, tsi148_bridge->base + TSI148_LCSR_INTEO); + iowrite32be(tmp, bridge->base + TSI148_LCSR_INTEO); - tmp = ioread32be(tsi148_bridge->base + TSI148_LCSR_INTEN); + tmp = ioread32be(bridge->base + TSI148_LCSR_INTEN); tmp |= TSI148_LCSR_INTEN_IRQEN[level - 1]; - iowrite32be(tmp, tsi148_bridge->base + TSI148_LCSR_INTEN); + iowrite32be(tmp, bridge->base + TSI148_LCSR_INTEN); } } @@ -460,28 +461,32 @@ void tsi148_irq_set(int level, int state, int sync) * Generate a VME bus interrupt at the requested level & vector. Wait for * interrupt to be acked. */ -int tsi148_irq_generate(int level, int statid) +int tsi148_irq_generate(struct vme_bridge *tsi148_bridge, int level, int statid) { u32 tmp; + struct tsi148_driver *bridge; - mutex_lock(&(vme_int)); + bridge = tsi148_bridge->driver_priv; + + mutex_lock(&(bridge->vme_int)); /* Read VICR register */ - tmp = ioread32be(tsi148_bridge->base + TSI148_LCSR_VICR); + tmp = ioread32be(bridge->base + TSI148_LCSR_VICR); /* Set Status/ID */ tmp = (tmp & ~TSI148_LCSR_VICR_STID_M) | (statid & TSI148_LCSR_VICR_STID_M); - iowrite32be(tmp, tsi148_bridge->base + TSI148_LCSR_VICR); + iowrite32be(tmp, bridge->base + TSI148_LCSR_VICR); /* Assert VMEbus IRQ */ tmp = tmp | TSI148_LCSR_VICR_IRQL[level]; - iowrite32be(tmp, tsi148_bridge->base + TSI148_LCSR_VICR); + iowrite32be(tmp, bridge->base + TSI148_LCSR_VICR); /* XXX Consider implementing a timeout? */ - wait_event_interruptible(iack_queue, tsi148_iack_received()); + wait_event_interruptible(bridge->iack_queue, + tsi148_iack_received(bridge)); - mutex_unlock(&(vme_int)); + mutex_unlock(&(bridge->vme_int)); return 0; } @@ -489,8 +494,8 @@ int tsi148_irq_generate(int level, int statid) /* * Find the first error in this address range */ -static struct vme_bus_error *tsi148_find_error(vme_address_t aspace, - unsigned long long address, size_t count) +static struct vme_bus_error *tsi148_find_error(struct vme_bridge *tsi148_bridge, + vme_address_t aspace, unsigned long long address, size_t count) { struct list_head *err_pos; struct vme_bus_error *vme_err, *valid = NULL; @@ -521,8 +526,8 @@ static struct vme_bus_error *tsi148_find_error(vme_address_t aspace, /* * Clear errors in the provided address range. */ -static void tsi148_clear_errors(vme_address_t aspace, - unsigned long long address, size_t count) +static void tsi148_clear_errors(struct vme_bridge *tsi148_bridge, + vme_address_t aspace, unsigned long long address, size_t count) { struct list_head *err_pos, *temp; struct vme_bus_error *vme_err; @@ -562,6 +567,9 @@ int tsi148_slave_set(struct vme_slave_resource *image, int enabled, unsigned int vme_bound_low, vme_bound_high; unsigned int pci_offset_low, pci_offset_high; unsigned long long vme_bound, pci_offset; + struct tsi148_driver *bridge; + + bridge = image->parent->driver_priv; #if 0 printk("Set slave image %d to:\n", image->number); @@ -634,24 +642,24 @@ int tsi148_slave_set(struct vme_slave_resource *image, int enabled, #endif /* Disable while we are mucking around */ - temp_ctl = ioread32be(tsi148_bridge->base + TSI148_LCSR_IT[i] + + temp_ctl = ioread32be(bridge->base + TSI148_LCSR_IT[i] + TSI148_LCSR_OFFSET_ITAT); temp_ctl &= ~TSI148_LCSR_ITAT_EN; - iowrite32be(temp_ctl, tsi148_bridge->base + TSI148_LCSR_IT[i] + + iowrite32be(temp_ctl, bridge->base + TSI148_LCSR_IT[i] + TSI148_LCSR_OFFSET_ITAT); /* Setup mapping */ - iowrite32be(vme_base_high, tsi148_bridge->base + TSI148_LCSR_IT[i] + + iowrite32be(vme_base_high, bridge->base + TSI148_LCSR_IT[i] + TSI148_LCSR_OFFSET_ITSAU); - iowrite32be(vme_base_low, tsi148_bridge->base + TSI148_LCSR_IT[i] + + iowrite32be(vme_base_low, bridge->base + TSI148_LCSR_IT[i] + TSI148_LCSR_OFFSET_ITSAL); - iowrite32be(vme_bound_high, tsi148_bridge->base + TSI148_LCSR_IT[i] + + iowrite32be(vme_bound_high, bridge->base + TSI148_LCSR_IT[i] + TSI148_LCSR_OFFSET_ITEAU); - iowrite32be(vme_bound_low, tsi148_bridge->base + TSI148_LCSR_IT[i] + + iowrite32be(vme_bound_low, bridge->base + TSI148_LCSR_IT[i] + TSI148_LCSR_OFFSET_ITEAL); - iowrite32be(pci_offset_high, tsi148_bridge->base + TSI148_LCSR_IT[i] + + iowrite32be(pci_offset_high, bridge->base + TSI148_LCSR_IT[i] + TSI148_LCSR_OFFSET_ITOFU); - iowrite32be(pci_offset_low, tsi148_bridge->base + TSI148_LCSR_IT[i] + + iowrite32be(pci_offset_low, bridge->base + TSI148_LCSR_IT[i] + TSI148_LCSR_OFFSET_ITOFL); /* XXX Prefetch stuff currently unsupported */ @@ -713,13 +721,13 @@ int tsi148_slave_set(struct vme_slave_resource *image, int enabled, temp_ctl |= TSI148_LCSR_ITAT_DATA; /* Write ctl reg without enable */ - iowrite32be(temp_ctl, tsi148_bridge->base + TSI148_LCSR_IT[i] + + iowrite32be(temp_ctl, bridge->base + TSI148_LCSR_IT[i] + TSI148_LCSR_OFFSET_ITAT); if (enabled) temp_ctl |= TSI148_LCSR_ITAT_EN; - iowrite32be(temp_ctl, tsi148_bridge->base + TSI148_LCSR_IT[i] + + iowrite32be(temp_ctl, bridge->base + TSI148_LCSR_IT[i] + TSI148_LCSR_OFFSET_ITAT); return 0; @@ -739,25 +747,27 @@ int tsi148_slave_get(struct vme_slave_resource *image, int *enabled, unsigned int vme_bound_low, vme_bound_high; unsigned int pci_offset_low, pci_offset_high; unsigned long long vme_bound, pci_offset; + struct tsi148_driver *bridge; + bridge = image->parent->driver_priv; i = image->number; /* Read registers */ - ctl = ioread32be(tsi148_bridge->base + TSI148_LCSR_IT[i] + + ctl = ioread32be(bridge->base + TSI148_LCSR_IT[i] + TSI148_LCSR_OFFSET_ITAT); - vme_base_high = ioread32be(tsi148_bridge->base + TSI148_LCSR_IT[i] + + vme_base_high = ioread32be(bridge->base + TSI148_LCSR_IT[i] + TSI148_LCSR_OFFSET_ITSAU); - vme_base_low = ioread32be(tsi148_bridge->base + TSI148_LCSR_IT[i] + + vme_base_low = ioread32be(bridge->base + TSI148_LCSR_IT[i] + TSI148_LCSR_OFFSET_ITSAL); - vme_bound_high = ioread32be(tsi148_bridge->base + TSI148_LCSR_IT[i] + + vme_bound_high = ioread32be(bridge->base + TSI148_LCSR_IT[i] + TSI148_LCSR_OFFSET_ITEAU); - vme_bound_low = ioread32be(tsi148_bridge->base + TSI148_LCSR_IT[i] + + vme_bound_low = ioread32be(bridge->base + TSI148_LCSR_IT[i] + TSI148_LCSR_OFFSET_ITEAL); - pci_offset_high = ioread32be(tsi148_bridge->base + TSI148_LCSR_IT[i] + + pci_offset_high = ioread32be(bridge->base + TSI148_LCSR_IT[i] + TSI148_LCSR_OFFSET_ITOFU); - pci_offset_low = ioread32be(tsi148_bridge->base + TSI148_LCSR_IT[i] + + pci_offset_low = ioread32be(bridge->base + TSI148_LCSR_IT[i] + TSI148_LCSR_OFFSET_ITOFL); /* Convert 64-bit variables to 2x 32-bit variables */ @@ -834,6 +844,9 @@ static int tsi148_alloc_resource(struct vme_master_resource *image, unsigned long long existing_size; int retval = 0; struct pci_dev *pdev; + struct vme_bridge *tsi148_bridge; + + tsi148_bridge = image->parent; /* Find pci_dev container of dev */ if (tsi148_bridge->parent == NULL) { @@ -938,6 +951,9 @@ int tsi148_master_set( struct vme_master_resource *image, int enabled, unsigned int pci_bound_low, pci_bound_high; unsigned int vme_offset_low, vme_offset_high; unsigned long long pci_bound, vme_offset, pci_base; + struct tsi148_driver *bridge; + + bridge = image->parent->driver_priv; /* Verify input data */ if (vme_base & 0xFFFF) { @@ -1008,10 +1024,10 @@ int tsi148_master_set( struct vme_master_resource *image, int enabled, i = image->number; /* Disable while we are mucking around */ - temp_ctl = ioread32be(tsi148_bridge->base + TSI148_LCSR_OT[i] + + temp_ctl = ioread32be(bridge->base + TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTAT); temp_ctl &= ~TSI148_LCSR_OTAT_EN; - iowrite32be(temp_ctl, tsi148_bridge->base + TSI148_LCSR_OT[i] + + iowrite32be(temp_ctl, bridge->base + TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTAT); /* XXX Prefetch stuff currently unsupported */ @@ -1127,33 +1143,33 @@ int tsi148_master_set( struct vme_master_resource *image, int enabled, temp_ctl |= TSI148_LCSR_OTAT_PGM; /* Setup mapping */ - iowrite32be(pci_base_high, tsi148_bridge->base + TSI148_LCSR_OT[i] + + iowrite32be(pci_base_high, bridge->base + TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTSAU); - iowrite32be(pci_base_low, tsi148_bridge->base + TSI148_LCSR_OT[i] + + iowrite32be(pci_base_low, bridge->base + TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTSAL); - iowrite32be(pci_bound_high, tsi148_bridge->base + TSI148_LCSR_OT[i] + + iowrite32be(pci_bound_high, bridge->base + TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTEAU); - iowrite32be(pci_bound_low, tsi148_bridge->base + TSI148_LCSR_OT[i] + + iowrite32be(pci_bound_low, bridge->base + TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTEAL); - iowrite32be(vme_offset_high, tsi148_bridge->base + TSI148_LCSR_OT[i] + + iowrite32be(vme_offset_high, bridge->base + TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTOFU); - iowrite32be(vme_offset_low, tsi148_bridge->base + TSI148_LCSR_OT[i] + + iowrite32be(vme_offset_low, bridge->base + TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTOFL); /* XXX We need to deal with OTBS */ #if 0 - iowrite32be(vmeOut->bcastSelect2esst, tsi148_bridge->base + + iowrite32be(vmeOut->bcastSelect2esst, bridge->base + TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTBS); #endif /* Write ctl reg without enable */ - iowrite32be(temp_ctl, tsi148_bridge->base + TSI148_LCSR_OT[i] + + iowrite32be(temp_ctl, bridge->base + TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTAT); if (enabled) temp_ctl |= TSI148_LCSR_OTAT_EN; - iowrite32be(temp_ctl, tsi148_bridge->base + TSI148_LCSR_OT[i] + + iowrite32be(temp_ctl, bridge->base + TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTAT); spin_unlock(&(image->lock)); @@ -1184,23 +1200,26 @@ int __tsi148_master_get( struct vme_master_resource *image, int *enabled, unsigned int vme_offset_low, vme_offset_high; unsigned long long pci_base, pci_bound, vme_offset; + struct tsi148_driver *bridge; + + bridge = image->parent->driver_priv; i = image->number; - ctl = ioread32be(tsi148_bridge->base + TSI148_LCSR_OT[i] + + ctl = ioread32be(bridge->base + TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTAT); - pci_base_high = ioread32be(tsi148_bridge->base + TSI148_LCSR_OT[i] + + pci_base_high = ioread32be(bridge->base + TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTSAU); - pci_base_low = ioread32be(tsi148_bridge->base + TSI148_LCSR_OT[i] + + pci_base_low = ioread32be(bridge->base + TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTSAL); - pci_bound_high = ioread32be(tsi148_bridge->base + TSI148_LCSR_OT[i] + + pci_bound_high = ioread32be(bridge->base + TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTEAU); - pci_bound_low = ioread32be(tsi148_bridge->base + TSI148_LCSR_OT[i] + + pci_bound_low = ioread32be(bridge->base + TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTEAL); - vme_offset_high = ioread32be(tsi148_bridge->base + TSI148_LCSR_OT[i] + + vme_offset_high = ioread32be(bridge->base + TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTOFU); - vme_offset_low = ioread32be(tsi148_bridge->base + TSI148_LCSR_OT[i] + + vme_offset_low = ioread32be(bridge->base + TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTOFL); /* Convert 64-bit variables to 2x 32-bit variables */ @@ -1306,6 +1325,9 @@ ssize_t tsi148_master_read(struct vme_master_resource *image, void *buf, vme_cycle_t cycle; vme_width_t dwidth; struct vme_bus_error *vme_err = NULL; + struct vme_bridge *tsi148_bridge; + + tsi148_bridge = image->parent; spin_lock(&(image->lock)); @@ -1318,13 +1340,15 @@ ssize_t tsi148_master_read(struct vme_master_resource *image, void *buf, __tsi148_master_get(image, &enabled, &vme_base, &size, &aspace, &cycle, &dwidth); - vme_err = tsi148_find_error(aspace, vme_base + offset, count); + vme_err = tsi148_find_error(tsi148_bridge, aspace, vme_base + offset, + count); if(vme_err != NULL) { dev_err(image->parent->parent, "First VME read error detected " "an at address 0x%llx\n", vme_err->address); retval = vme_err->address - (vme_base + offset); /* Clear down save errors in this address range */ - tsi148_clear_errors(aspace, vme_base + offset, count); + tsi148_clear_errors(tsi148_bridge, aspace, vme_base + offset, + count); } skip_chk: @@ -1334,9 +1358,6 @@ skip_chk: } -/* XXX We need to change vme_master_resource->mtx to a spinlock so that read - * and write functions can be used in an interrupt context - */ ssize_t tsi148_master_write(struct vme_master_resource *image, void *buf, size_t count, loff_t offset) { @@ -1347,6 +1368,12 @@ ssize_t tsi148_master_write(struct vme_master_resource *image, void *buf, vme_width_t dwidth; struct vme_bus_error *vme_err = NULL; + struct vme_bridge *tsi148_bridge; + struct tsi148_driver *bridge; + + tsi148_bridge = image->parent; + + bridge = tsi148_bridge->driver_priv; spin_lock(&(image->lock)); @@ -1374,15 +1401,17 @@ ssize_t tsi148_master_write(struct vme_master_resource *image, void *buf, __tsi148_master_get(image, &enabled, &vme_base, &size, &aspace, &cycle, &dwidth); - ioread16(flush_image->kern_base + 0x7F000); + ioread16(bridge->flush_image->kern_base + 0x7F000); - vme_err = tsi148_find_error(aspace, vme_base + offset, count); + vme_err = tsi148_find_error(tsi148_bridge, aspace, vme_base + offset, + count); if(vme_err != NULL) { printk("First VME write error detected an at address 0x%llx\n", vme_err->address); retval = vme_err->address - (vme_base + offset); /* Clear down save errors in this address range */ - tsi148_clear_errors(aspace, vme_base + offset, count); + tsi148_clear_errors(tsi148_bridge, aspace, vme_base + offset, + count); } skip_chk: @@ -1404,48 +1433,50 @@ unsigned int tsi148_master_rmw(struct vme_master_resource *image, unsigned int pci_addr_high, pci_addr_low; u32 tmp, result; int i; + struct tsi148_driver *bridge; + bridge = image->parent->driver_priv; /* Find the PCI address that maps to the desired VME address */ i = image->number; /* Locking as we can only do one of these at a time */ - mutex_lock(&(vme_rmw)); + mutex_lock(&(bridge->vme_rmw)); /* Lock image */ spin_lock(&(image->lock)); - pci_addr_high = ioread32be(tsi148_bridge->base + TSI148_LCSR_OT[i] + + pci_addr_high = ioread32be(bridge->base + TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTSAU); - pci_addr_low = ioread32be(tsi148_bridge->base + TSI148_LCSR_OT[i] + + pci_addr_low = ioread32be(bridge->base + TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTSAL); reg_join(pci_addr_high, pci_addr_low, &pci_addr); reg_split(pci_addr + offset, &pci_addr_high, &pci_addr_low); /* Configure registers */ - iowrite32be(mask, tsi148_bridge->base + TSI148_LCSR_RMWEN); - iowrite32be(compare, tsi148_bridge->base + TSI148_LCSR_RMWC); - iowrite32be(swap, tsi148_bridge->base + TSI148_LCSR_RMWS); - iowrite32be(pci_addr_high, tsi148_bridge->base + TSI148_LCSR_RMWAU); - iowrite32be(pci_addr_low, tsi148_bridge->base + TSI148_LCSR_RMWAL); + iowrite32be(mask, bridge->base + TSI148_LCSR_RMWEN); + iowrite32be(compare, bridge->base + TSI148_LCSR_RMWC); + iowrite32be(swap, bridge->base + TSI148_LCSR_RMWS); + iowrite32be(pci_addr_high, bridge->base + TSI148_LCSR_RMWAU); + iowrite32be(pci_addr_low, bridge->base + TSI148_LCSR_RMWAL); /* Enable RMW */ - tmp = ioread32be(tsi148_bridge->base + TSI148_LCSR_VMCTRL); + tmp = ioread32be(bridge->base + TSI148_LCSR_VMCTRL); tmp |= TSI148_LCSR_VMCTRL_RMWEN; - iowrite32be(tmp, tsi148_bridge->base + TSI148_LCSR_VMCTRL); + iowrite32be(tmp, bridge->base + TSI148_LCSR_VMCTRL); /* Kick process off with a read to the required address. */ result = ioread32be(image->kern_base + offset); /* Disable RMW */ - tmp = ioread32be(tsi148_bridge->base + TSI148_LCSR_VMCTRL); + tmp = ioread32be(bridge->base + TSI148_LCSR_VMCTRL); tmp &= ~TSI148_LCSR_VMCTRL_RMWEN; - iowrite32be(tmp, tsi148_bridge->base + TSI148_LCSR_VMCTRL); + iowrite32be(tmp, bridge->base + TSI148_LCSR_VMCTRL); spin_unlock(&(image->lock)); - mutex_unlock(&(vme_rmw)); + mutex_unlock(&(bridge->vme_rmw)); return result; } @@ -1789,11 +1820,14 @@ err_mem: /* * Check to see if the provided DMA channel is busy. */ -static int tsi148_dma_busy(int channel) +static int tsi148_dma_busy(struct vme_bridge *tsi148_bridge, int channel) { u32 tmp; + struct tsi148_driver *bridge; - tmp = ioread32be(tsi148_bridge->base + TSI148_LCSR_DMA[channel] + + bridge = tsi148_bridge->driver_priv; + + tmp = ioread32be(bridge->base + TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DSTA); if (tmp & TSI148_LCSR_DSTA_BSY) @@ -1819,9 +1853,12 @@ int tsi148_dma_list_exec(struct vme_dma_list *list) #if 0 int x; #endif + struct tsi148_driver *bridge; ctrlr = list->parent; + bridge = ctrlr->parent->driver_priv; + mutex_lock(&(ctrlr->mtx)); channel = ctrlr->number; @@ -1891,21 +1928,22 @@ int tsi148_dma_list_exec(struct vme_dma_list *list) reg_split(bus_addr, &bus_addr_high, &bus_addr_low); - iowrite32be(bus_addr_high, tsi148_bridge->base + + iowrite32be(bus_addr_high, bridge->base + TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DNLAU); - iowrite32be(bus_addr_low, tsi148_bridge->base + + iowrite32be(bus_addr_low, bridge->base + TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DNLAL); /* Start the operation */ - iowrite32be(dctlreg | TSI148_LCSR_DCTL_DGO, tsi148_bridge->base + + iowrite32be(dctlreg | TSI148_LCSR_DCTL_DGO, bridge->base + TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DCTL); - wait_event_interruptible(dma_queue[channel], tsi148_dma_busy(channel)); + wait_event_interruptible(bridge->dma_queue[channel], + tsi148_dma_busy(ctrlr->parent, channel)); /* * Read status register, this register is valid until we kick off a * new transfer. */ - val = ioread32be(tsi148_bridge->base + TSI148_LCSR_DMA[channel] + + val = ioread32be(bridge->base + TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DSTA); if (val & TSI148_LCSR_DSTA_VBE) { @@ -1953,12 +1991,15 @@ int tsi148_lm_set(struct vme_lm_resource *lm, unsigned long long lm_base, { u32 lm_base_high, lm_base_low, lm_ctl = 0; int i; + struct tsi148_driver *bridge; + + bridge = lm->parent->driver_priv; mutex_lock(&(lm->mtx)); /* If we already have a callback attached, we can't move it! */ for (i = 0; i < lm->monitors; i++) { - if(lm_callback[i] != NULL) { + if (bridge->lm_callback[i] != NULL) { mutex_unlock(&(lm->mtx)); printk("Location monitor callback attached, can't " "reset\n"); @@ -1997,9 +2038,9 @@ int tsi148_lm_set(struct vme_lm_resource *lm, unsigned long long lm_base, reg_split(lm_base, &lm_base_high, &lm_base_low); - iowrite32be(lm_base_high, tsi148_bridge->base + TSI148_LCSR_LMBAU); - iowrite32be(lm_base_low, tsi148_bridge->base + TSI148_LCSR_LMBAL); - iowrite32be(lm_ctl, tsi148_bridge->base + TSI148_LCSR_LMAT); + iowrite32be(lm_base_high, bridge->base + TSI148_LCSR_LMBAU); + iowrite32be(lm_base_low, bridge->base + TSI148_LCSR_LMBAL); + iowrite32be(lm_ctl, bridge->base + TSI148_LCSR_LMAT); mutex_unlock(&(lm->mtx)); @@ -2013,12 +2054,15 @@ int tsi148_lm_get(struct vme_lm_resource *lm, unsigned long long *lm_base, vme_address_t *aspace, vme_cycle_t *cycle) { u32 lm_base_high, lm_base_low, lm_ctl, enabled = 0; + struct tsi148_driver *bridge; + + bridge = lm->parent->driver_priv; mutex_lock(&(lm->mtx)); - lm_base_high = ioread32be(tsi148_bridge->base + TSI148_LCSR_LMBAU); - lm_base_low = ioread32be(tsi148_bridge->base + TSI148_LCSR_LMBAL); - lm_ctl = ioread32be(tsi148_bridge->base + TSI148_LCSR_LMAT); + lm_base_high = ioread32be(bridge->base + TSI148_LCSR_LMBAU); + lm_base_low = ioread32be(bridge->base + TSI148_LCSR_LMBAL); + lm_ctl = ioread32be(bridge->base + TSI148_LCSR_LMAT); reg_join(lm_base_high, lm_base_low, lm_base); @@ -2061,11 +2105,14 @@ int tsi148_lm_attach(struct vme_lm_resource *lm, int monitor, void (*callback)(int)) { u32 lm_ctl, tmp; + struct tsi148_driver *bridge; + + bridge = lm->parent->driver_priv; mutex_lock(&(lm->mtx)); /* Ensure that the location monitor is configured - need PGM or DATA */ - lm_ctl = ioread32be(tsi148_bridge->base + TSI148_LCSR_LMAT); + lm_ctl = ioread32be(bridge->base + TSI148_LCSR_LMAT); if ((lm_ctl & (TSI148_LCSR_LMAT_PGM | TSI148_LCSR_LMAT_DATA)) == 0) { mutex_unlock(&(lm->mtx)); printk("Location monitor not properly configured\n"); @@ -2073,28 +2120,28 @@ int tsi148_lm_attach(struct vme_lm_resource *lm, int monitor, } /* Check that a callback isn't already attached */ - if (lm_callback[monitor] != NULL) { + if (bridge->lm_callback[monitor] != NULL) { mutex_unlock(&(lm->mtx)); printk("Existing callback attached\n"); return -EBUSY; } /* Attach callback */ - lm_callback[monitor] = callback; + bridge->lm_callback[monitor] = callback; /* Enable Location Monitor interrupt */ - tmp = ioread32be(tsi148_bridge->base + TSI148_LCSR_INTEN); + tmp = ioread32be(bridge->base + TSI148_LCSR_INTEN); tmp |= TSI148_LCSR_INTEN_LMEN[monitor]; - iowrite32be(tmp, tsi148_bridge->base + TSI148_LCSR_INTEN); + iowrite32be(tmp, bridge->base + TSI148_LCSR_INTEN); - tmp = ioread32be(tsi148_bridge->base + TSI148_LCSR_INTEO); + tmp = ioread32be(bridge->base + TSI148_LCSR_INTEO); tmp |= TSI148_LCSR_INTEO_LMEO[monitor]; - iowrite32be(tmp, tsi148_bridge->base + TSI148_LCSR_INTEO); + iowrite32be(tmp, bridge->base + TSI148_LCSR_INTEO); /* Ensure that global Location Monitor Enable set */ if ((lm_ctl & TSI148_LCSR_LMAT_EN) == 0) { lm_ctl |= TSI148_LCSR_LMAT_EN; - iowrite32be(lm_ctl, tsi148_bridge->base + TSI148_LCSR_LMAT); + iowrite32be(lm_ctl, bridge->base + TSI148_LCSR_LMAT); } mutex_unlock(&(lm->mtx)); @@ -2108,30 +2155,33 @@ int tsi148_lm_attach(struct vme_lm_resource *lm, int monitor, int tsi148_lm_detach(struct vme_lm_resource *lm, int monitor) { u32 lm_en, tmp; + struct tsi148_driver *bridge; + + bridge = lm->parent->driver_priv; mutex_lock(&(lm->mtx)); /* Disable Location Monitor and ensure previous interrupts are clear */ - lm_en = ioread32be(tsi148_bridge->base + TSI148_LCSR_INTEN); + lm_en = ioread32be(bridge->base + TSI148_LCSR_INTEN); lm_en &= ~TSI148_LCSR_INTEN_LMEN[monitor]; - iowrite32be(lm_en, tsi148_bridge->base + TSI148_LCSR_INTEN); + iowrite32be(lm_en, bridge->base + TSI148_LCSR_INTEN); - tmp = ioread32be(tsi148_bridge->base + TSI148_LCSR_INTEO); + tmp = ioread32be(bridge->base + TSI148_LCSR_INTEO); tmp &= ~TSI148_LCSR_INTEO_LMEO[monitor]; - iowrite32be(tmp, tsi148_bridge->base + TSI148_LCSR_INTEO); + iowrite32be(tmp, bridge->base + TSI148_LCSR_INTEO); iowrite32be(TSI148_LCSR_INTC_LMC[monitor], - tsi148_bridge->base + TSI148_LCSR_INTC); + bridge->base + TSI148_LCSR_INTC); /* Detach callback */ - lm_callback[monitor] = NULL; + bridge->lm_callback[monitor] = NULL; /* If all location monitors disabled, disable global Location Monitor */ if ((lm_en & (TSI148_LCSR_INTS_LM0S | TSI148_LCSR_INTS_LM1S | TSI148_LCSR_INTS_LM2S | TSI148_LCSR_INTS_LM3S)) == 0) { - tmp = ioread32be(tsi148_bridge->base + TSI148_LCSR_LMAT); + tmp = ioread32be(bridge->base + TSI148_LCSR_LMAT); tmp &= ~TSI148_LCSR_LMAT_EN; - iowrite32be(tmp, tsi148_bridge->base + TSI148_LCSR_LMAT); + iowrite32be(tmp, bridge->base + TSI148_LCSR_LMAT); } mutex_unlock(&(lm->mtx)); @@ -2142,12 +2192,15 @@ int tsi148_lm_detach(struct vme_lm_resource *lm, int monitor) /* * Determine Geographical Addressing */ -int tsi148_slot_get(void) +int tsi148_slot_get(struct vme_bridge *tsi148_bridge) { u32 slot = 0; + struct tsi148_driver *bridge; + + bridge = tsi148_bridge->driver_priv; if (!geoid) { - slot = ioread32be(tsi148_bridge->base + TSI148_LCSR_VSTAT); + slot = ioread32be(bridge->base + TSI148_LCSR_VSTAT); slot = slot & TSI148_LCSR_VSTAT_GA_M; } else slot = geoid; @@ -2172,46 +2225,50 @@ static int __init tsi148_init(void) * boards registers, this means there is a fix length 508kB window which must * be mapped onto PCI memory. */ -static int tsi148_crcsr_init(struct pci_dev *pdev) +static int tsi148_crcsr_init(struct vme_bridge *tsi148_bridge, + struct pci_dev *pdev) { u32 cbar, crat, vstat; u32 crcsr_bus_high, crcsr_bus_low; int retval; + struct tsi148_driver *bridge; + + bridge = tsi148_bridge->driver_priv; /* Allocate mem for CR/CSR image */ - crcsr_kernel = pci_alloc_consistent(pdev, VME_CRCSR_BUF_SIZE, - &crcsr_bus); - if (crcsr_kernel == NULL) { + bridge->crcsr_kernel = pci_alloc_consistent(pdev, VME_CRCSR_BUF_SIZE, + &(bridge->crcsr_bus)); + if (bridge->crcsr_kernel == NULL) { dev_err(&pdev->dev, "Failed to allocate memory for CR/CSR " "image\n"); return -ENOMEM; } - memset(crcsr_kernel, 0, VME_CRCSR_BUF_SIZE); + memset(bridge->crcsr_kernel, 0, VME_CRCSR_BUF_SIZE); - reg_split(crcsr_bus, &crcsr_bus_high, &crcsr_bus_low); + reg_split(bridge->crcsr_bus, &crcsr_bus_high, &crcsr_bus_low); - iowrite32be(crcsr_bus_high, tsi148_bridge->base + TSI148_LCSR_CROU); - iowrite32be(crcsr_bus_low, tsi148_bridge->base + TSI148_LCSR_CROL); + iowrite32be(crcsr_bus_high, bridge->base + TSI148_LCSR_CROU); + iowrite32be(crcsr_bus_low, bridge->base + TSI148_LCSR_CROL); /* Ensure that the CR/CSR is configured at the correct offset */ - cbar = ioread32be(tsi148_bridge->base + TSI148_CBAR); + cbar = ioread32be(bridge->base + TSI148_CBAR); cbar = (cbar & TSI148_CRCSR_CBAR_M)>>3; - vstat = tsi148_slot_get(); + vstat = tsi148_slot_get(tsi148_bridge); if (cbar != vstat) { cbar = vstat; dev_info(&pdev->dev, "Setting CR/CSR offset\n"); - iowrite32be(cbar<<3, tsi148_bridge->base + TSI148_CBAR); + iowrite32be(cbar<<3, bridge->base + TSI148_CBAR); } dev_info(&pdev->dev, "CR/CSR Offset: %d\n", cbar); - crat = ioread32be(tsi148_bridge->base + TSI148_LCSR_CRAT); + crat = ioread32be(bridge->base + TSI148_LCSR_CRAT); if (crat & TSI148_LCSR_CRAT_EN) { dev_info(&pdev->dev, "Enabling CR/CSR space\n"); iowrite32be(crat | TSI148_LCSR_CRAT_EN, - tsi148_bridge->base + TSI148_LCSR_CRAT); + bridge->base + TSI148_LCSR_CRAT); } else dev_info(&pdev->dev, "CR/CSR already enabled\n"); @@ -2220,8 +2277,9 @@ static int tsi148_crcsr_init(struct pci_dev *pdev) * through VME writes. */ if(err_chk) { - retval = tsi148_master_set(flush_image, 1, (vstat * 0x80000), - 0x80000, VME_CRCSR, VME_SCT, VME_D16); + retval = tsi148_master_set(bridge->flush_image, 1, + (vstat * 0x80000), 0x80000, VME_CRCSR, VME_SCT, + VME_D16); if (retval) dev_err(&pdev->dev, "Configuring flush image failed\n"); } @@ -2230,20 +2288,25 @@ static int tsi148_crcsr_init(struct pci_dev *pdev) } -static void tsi148_crcsr_exit(struct pci_dev *pdev) +static void tsi148_crcsr_exit(struct vme_bridge *tsi148_bridge, + struct pci_dev *pdev) { u32 crat; + struct tsi148_driver *bridge; + + bridge = tsi148_bridge->driver_priv; /* Turn off CR/CSR space */ - crat = ioread32be(tsi148_bridge->base + TSI148_LCSR_CRAT); + crat = ioread32be(bridge->base + TSI148_LCSR_CRAT); iowrite32be(crat & ~TSI148_LCSR_CRAT_EN, - tsi148_bridge->base + TSI148_LCSR_CRAT); + bridge->base + TSI148_LCSR_CRAT); /* Free image */ - iowrite32be(0, tsi148_bridge->base + TSI148_LCSR_CROU); - iowrite32be(0, tsi148_bridge->base + TSI148_LCSR_CROL); + iowrite32be(0, bridge->base + TSI148_LCSR_CROU); + iowrite32be(0, bridge->base + TSI148_LCSR_CROL); - pci_free_consistent(pdev, VME_CRCSR_BUF_SIZE, crcsr_kernel, crcsr_bus); + pci_free_consistent(pdev, VME_CRCSR_BUF_SIZE, bridge->crcsr_kernel, + bridge->crcsr_bus); } static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id) @@ -2251,6 +2314,8 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id) int retval, i, master_num; u32 data; struct list_head *pos = NULL; + struct vme_bridge *tsi148_bridge; + struct tsi148_driver *tsi148_device; struct vme_master_resource *master_image; struct vme_slave_resource *slave_image; struct vme_dma_resource *dma_ctrlr; @@ -2270,6 +2335,18 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id) memset(tsi148_bridge, 0, sizeof(struct vme_bridge)); + tsi148_device = kmalloc(sizeof(struct tsi148_driver), GFP_KERNEL); + if (tsi148_device == NULL) { + dev_err(&pdev->dev, "Failed to allocate memory for device " + "structure\n"); + retval = -ENOMEM; + goto err_driver; + } + + memset(tsi148_device, 0, sizeof(struct tsi148_driver)); + + tsi148_bridge->driver_priv = tsi148_device; + /* Enable the device */ retval = pci_enable_device(pdev); if (retval) { @@ -2285,15 +2362,16 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id) } /* map registers in BAR 0 */ - tsi148_bridge->base = ioremap_nocache(pci_resource_start(pdev, 0), 4096); - if (!tsi148_bridge->base) { + tsi148_device->base = ioremap_nocache(pci_resource_start(pdev, 0), + 4096); + if (!tsi148_device->base) { dev_err(&pdev->dev, "Unable to remap CRG region\n"); retval = -EIO; goto err_remap; } /* Check to see if the mapping worked out */ - data = ioread32(tsi148_bridge->base + TSI148_PCFS_ID) & 0x0000FFFF; + data = ioread32(tsi148_device->base + TSI148_PCFS_ID) & 0x0000FFFF; if (data != PCI_VENDOR_ID_TUNDRA) { dev_err(&pdev->dev, "CRG region check failed\n"); retval = -EIO; @@ -2301,12 +2379,11 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id) } /* Initialize wait queues & mutual exclusion flags */ - /* XXX These need to be moved to the vme_bridge structure */ - init_waitqueue_head(&dma_queue[0]); - init_waitqueue_head(&dma_queue[1]); - init_waitqueue_head(&iack_queue); - mutex_init(&(vme_int)); - mutex_init(&(vme_rmw)); + init_waitqueue_head(&(tsi148_device->dma_queue[0])); + init_waitqueue_head(&(tsi148_device->dma_queue[1])); + init_waitqueue_head(&(tsi148_device->iack_queue)); + mutex_init(&(tsi148_device->vme_int)); + mutex_init(&(tsi148_device->vme_rmw)); tsi148_bridge->parent = &(pdev->dev); strcpy(tsi148_bridge->name, driver_name); @@ -2326,29 +2403,29 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id) master_num = TSI148_MAX_MASTER; if(err_chk){ master_num--; - /* XXX */ - flush_image = (struct vme_master_resource *)kmalloc( - sizeof(struct vme_master_resource), GFP_KERNEL); - if (flush_image == NULL) { + + tsi148_device->flush_image = (struct vme_master_resource *) + kmalloc(sizeof(struct vme_master_resource), GFP_KERNEL); + if (tsi148_device->flush_image == NULL) { dev_err(&pdev->dev, "Failed to allocate memory for " "flush resource structure\n"); retval = -ENOMEM; goto err_master; } - flush_image->parent = tsi148_bridge; - spin_lock_init(&(flush_image->lock)); - flush_image->locked = 1; - flush_image->number = master_num; - flush_image->address_attr = VME_A16 | VME_A24 | VME_A32 | - VME_A64; - flush_image->cycle_attr = VME_SCT | VME_BLT | VME_MBLT | - VME_2eVME | VME_2eSST | VME_2eSSTB | VME_2eSST160 | - VME_2eSST267 | VME_2eSST320 | VME_SUPER | VME_USER | - VME_PROG | VME_DATA; - flush_image->width_attr = VME_D16 | VME_D32; - memset(&(flush_image->pci_resource), 0, + tsi148_device->flush_image->parent = tsi148_bridge; + spin_lock_init(&(tsi148_device->flush_image->lock)); + tsi148_device->flush_image->locked = 1; + tsi148_device->flush_image->number = master_num; + tsi148_device->flush_image->address_attr = VME_A16 | VME_A24 | + VME_A32 | VME_A64; + tsi148_device->flush_image->cycle_attr = VME_SCT | VME_BLT | + VME_MBLT | VME_2eVME | VME_2eSST | VME_2eSSTB | + VME_2eSST160 | VME_2eSST267 | VME_2eSST320 | VME_SUPER | + VME_USER | VME_PROG | VME_DATA; + tsi148_device->flush_image->width_attr = VME_D16 | VME_D32; + memset(&(tsi148_device->flush_image->pci_resource), 0, sizeof(struct resource)); - flush_image->kern_base = NULL; + tsi148_device->flush_image->kern_base = NULL; } /* Add master windows to list */ @@ -2465,45 +2542,42 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id) tsi148_bridge->lm_detach = tsi148_lm_detach; tsi148_bridge->slot_get = tsi148_slot_get; - data = ioread32be(tsi148_bridge->base + TSI148_LCSR_VSTAT); + data = ioread32be(tsi148_device->base + TSI148_LCSR_VSTAT); dev_info(&pdev->dev, "Board is%s the VME system controller\n", (data & TSI148_LCSR_VSTAT_SCONS)? "" : " not"); - if (!geoid) { + if (!geoid) dev_info(&pdev->dev, "VME geographical address is %d\n", data & TSI148_LCSR_VSTAT_GA_M); - } else { + else dev_info(&pdev->dev, "VME geographical address is set to %d\n", geoid); - } + dev_info(&pdev->dev, "VME Write and flush and error check is %s\n", err_chk ? "enabled" : "disabled"); - if(tsi148_crcsr_init(pdev)) { + if (tsi148_crcsr_init(tsi148_bridge, pdev)) dev_err(&pdev->dev, "CR/CSR configuration failed.\n"); goto err_crcsr; - } - - /* Need to save tsi148_bridge pointer locally in link list for use in - * tsi148_remove() - */ retval = vme_register_bridge(tsi148_bridge); if (retval != 0) { dev_err(&pdev->dev, "Chip Registration failed.\n"); goto err_reg; } + pci_set_drvdata(pdev, tsi148_bridge); + /* Clear VME bus "board fail", and "power-up reset" lines */ - data = ioread32be(tsi148_bridge->base + TSI148_LCSR_VSTAT); + data = ioread32be(tsi148_device->base + TSI148_LCSR_VSTAT); data &= ~TSI148_LCSR_VSTAT_BRDFL; data |= TSI148_LCSR_VSTAT_CPURST; - iowrite32be(data, tsi148_bridge->base + TSI148_LCSR_VSTAT); + iowrite32be(data, tsi148_device->base + TSI148_LCSR_VSTAT); return 0; vme_unregister_bridge(tsi148_bridge); err_reg: - tsi148_crcsr_exit(pdev); + tsi148_crcsr_exit(tsi148_bridge, pdev); err_crcsr: err_lm: /* resources are stored in link list */ @@ -2534,15 +2608,17 @@ err_master: kfree(master_image); } - tsi148_irq_exit(pdev); + tsi148_irq_exit(tsi148_device, pdev); err_irq: err_test: - iounmap(tsi148_bridge->base); + iounmap(tsi148_device->base); err_remap: pci_release_regions(pdev); err_resource: pci_disable_device(pdev); err_enable: + kfree(tsi148_device); +err_driver: kfree(tsi148_bridge); err_struct: return retval; @@ -2556,56 +2632,58 @@ static void tsi148_remove(struct pci_dev *pdev) struct vme_slave_resource *slave_image; struct vme_dma_resource *dma_ctrlr; int i; + struct tsi148_driver *bridge; + struct vme_bridge *tsi148_bridge = pci_get_drvdata(pdev); + + bridge = tsi148_bridge->driver_priv; + dev_dbg(&pdev->dev, "Driver is being unloaded.\n"); - /* XXX We need to find the pdev->dev in the list of vme_bridge->dev's */ - /* * Shutdown all inbound and outbound windows. */ for (i = 0; i < 8; i++) { - iowrite32be(0, tsi148_bridge->base + TSI148_LCSR_IT[i] + + iowrite32be(0, bridge->base + TSI148_LCSR_IT[i] + TSI148_LCSR_OFFSET_ITAT); - iowrite32be(0, tsi148_bridge->base + TSI148_LCSR_OT[i] + + iowrite32be(0, bridge->base + TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTAT); } /* * Shutdown Location monitor. */ - iowrite32be(0, tsi148_bridge->base + TSI148_LCSR_LMAT); + iowrite32be(0, bridge->base + TSI148_LCSR_LMAT); /* * Shutdown CRG map. */ - iowrite32be(0, tsi148_bridge->base + TSI148_LCSR_CSRAT); + iowrite32be(0, bridge->base + TSI148_LCSR_CSRAT); /* * Clear error status. */ - iowrite32be(0xFFFFFFFF, tsi148_bridge->base + TSI148_LCSR_EDPAT); - iowrite32be(0xFFFFFFFF, tsi148_bridge->base + TSI148_LCSR_VEAT); - iowrite32be(0x07000700, tsi148_bridge->base + TSI148_LCSR_PSTAT); + iowrite32be(0xFFFFFFFF, bridge->base + TSI148_LCSR_EDPAT); + iowrite32be(0xFFFFFFFF, bridge->base + TSI148_LCSR_VEAT); + iowrite32be(0x07000700, bridge->base + TSI148_LCSR_PSTAT); /* * Remove VIRQ interrupt (if any) */ - if (ioread32be(tsi148_bridge->base + TSI148_LCSR_VICR) & 0x800) { - iowrite32be(0x8000, tsi148_bridge->base + TSI148_LCSR_VICR); - } + if (ioread32be(bridge->base + TSI148_LCSR_VICR) & 0x800) + iowrite32be(0x8000, bridge->base + TSI148_LCSR_VICR); /* * Map all Interrupts to PCI INTA */ - iowrite32be(0x0, tsi148_bridge->base + TSI148_LCSR_INTM1); - iowrite32be(0x0, tsi148_bridge->base + TSI148_LCSR_INTM2); + iowrite32be(0x0, bridge->base + TSI148_LCSR_INTM1); + iowrite32be(0x0, bridge->base + TSI148_LCSR_INTM2); - tsi148_irq_exit(pdev); + tsi148_irq_exit(bridge, pdev); vme_unregister_bridge(tsi148_bridge); - tsi148_crcsr_exit(pdev); + tsi148_crcsr_exit(tsi148_bridge, pdev); /* resources are stored in link list */ list_for_each(pos, &(tsi148_bridge->dma_resources)) { @@ -2629,14 +2707,16 @@ static void tsi148_remove(struct pci_dev *pdev) kfree(master_image); } - tsi148_irq_exit(pdev); + tsi148_irq_exit(bridge, pdev); - iounmap(tsi148_bridge->base); + iounmap(bridge->base); pci_release_regions(pdev); pci_disable_device(pdev); + kfree(tsi148_bridge->driver_priv); + kfree(tsi148_bridge); } @@ -2724,29 +2804,29 @@ int tsi148_dma_run(struct vme_dma_resource *resource, struct vme_dma_attr src, } /* Program registers for DMA transfer */ - iowrite32be(dmaLL->dsau, tsi148_bridge->base + + iowrite32be(dmaLL->dsau, tsi148_bridge->driver_priv->base + TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DSAU); - iowrite32be(dmaLL->dsal, tsi148_bridge->base + + iowrite32be(dmaLL->dsal, tsi148_bridge->driver_priv->base + TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DSAL); - iowrite32be(dmaLL->ddau, tsi148_bridge->base + + iowrite32be(dmaLL->ddau, tsi148_bridge->driver_priv->base + TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DDAU); - iowrite32be(dmaLL->ddal, tsi148_bridge->base + + iowrite32be(dmaLL->ddal, tsi148_bridge->driver_priv->base + TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DDAL); - iowrite32be(dmaLL->dsat, tsi148_bridge->base + + iowrite32be(dmaLL->dsat, tsi148_bridge->driver_priv->base + TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DSAT); - iowrite32be(dmaLL->ddat, tsi148_bridge->base + + iowrite32be(dmaLL->ddat, tsi148_bridge->driver_priv->base + TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DDAT); - iowrite32be(dmaLL->dcnt, tsi148_bridge->base + + iowrite32be(dmaLL->dcnt, tsi148_bridge->driver_priv->base + TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DCNT); - iowrite32be(dmaLL->ddbs, tsi148_bridge->base + + iowrite32be(dmaLL->ddbs, tsi148_bridge->driver_priv->base + TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DDBS); /* Start the operation */ - iowrite32be(dctlreg | 0x2000000, tsi148_bridge->base + + iowrite32be(dctlreg | 0x2000000, tsi148_bridge->driver_priv->base + TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DCTL); - tmp = ioread32be(tsi148_bridge->base + TSI148_LCSR_DMA[channel] + - TSI148_LCSR_OFFSET_DSTA); + tmp = ioread32be(tsi148_bridge->driver_priv->base + + TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DSTA); wait_event_interruptible(dma_queue[channel], (tmp & 0x1000000) == 0); /* @@ -2754,8 +2834,8 @@ int tsi148_dma_run(struct vme_dma_resource *resource, struct vme_dma_attr src, * handler rather than here so that we can be sure we haven't kicked off * another DMA transfer. */ - val = ioread32be(tsi148_bridge->base + TSI148_LCSR_DMA[channel] + - TSI148_LCSR_OFFSET_DSTA); + val = ioread32be(tsi148_bridge->driver_priv->base + + TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DSTA); vmeDma->vmeDmaStatus = 0; if (val & 0x10000000) { @@ -2782,7 +2862,8 @@ int tempe_set_arbiter(vmeArbiterCfg_t * vmeArb) int temp_ctl = 0; int gto = 0; - temp_ctl = ioread32be(tsi148_bridge->base + TSI148_LCSR_VCTRL); + temp_ctl = ioread32be(tsi148_bridge->driver_priv->base + + TSI148_LCSR_VCTRL); temp_ctl &= 0xFFEFFF00; if (vmeArb->globalTimeoutTimer == 0xFFFFFFFF) { @@ -2810,7 +2891,8 @@ int tempe_set_arbiter(vmeArbiterCfg_t * vmeArb) if (vmeArb->noEarlyReleaseFlag) { temp_ctl |= 1 << 20; } - iowrite32be(temp_ctl, tsi148_bridge->base + TSI148_LCSR_VCTRL); + iowrite32be(temp_ctl, tsi148_bridge->driver_priv->base + + TSI148_LCSR_VCTRL); return (0); } @@ -2824,7 +2906,8 @@ int tempe_get_arbiter(vmeArbiterCfg_t * vmeArb) int gto = 0; - temp_ctl = ioread32be(tsi148_bridge->base + TSI148_LCSR_VCTRL); + temp_ctl = ioread32be(tsi148_bridge->driver_priv->base + + TSI148_LCSR_VCTRL); gto = temp_ctl & 0xF; if (gto != 0) { @@ -2855,7 +2938,8 @@ int tempe_set_requestor(vmeRequesterCfg_t * vmeReq) { int temp_ctl = 0; - temp_ctl = ioread32be(tsi148_bridge->base + TSI148_LCSR_VMCTRL); + temp_ctl = ioread32be(tsi148_bridge->driver_priv->base + + TSI148_LCSR_VMCTRL); temp_ctl &= 0xFFFF0000; if (vmeReq->releaseMode == 1) { @@ -2870,7 +2954,8 @@ int tempe_set_requestor(vmeRequesterCfg_t * vmeReq) temp_ctl |= (vmeReq->timeoffTimeoutTimer & 7) << 12; temp_ctl |= vmeReq->requestLevel; - iowrite32be(temp_ctl, tsi148_bridge->base + TSI148_LCSR_VMCTRL); + iowrite32be(temp_ctl, tsi148_bridge->driver_priv->base + + TSI148_LCSR_VMCTRL); return (0); } @@ -2881,7 +2966,8 @@ int tempe_get_requestor(vmeRequesterCfg_t * vmeReq) { int temp_ctl = 0; - temp_ctl = ioread32be(tsi148_bridge->base + TSI148_LCSR_VMCTRL); + temp_ctl = ioread32be(tsi148_bridge->driver_priv->base + + TSI148_LCSR_VMCTRL); if (temp_ctl & 0x18) { vmeReq->releaseMode = 1; diff --git a/drivers/staging/vme/bridges/vme_tsi148.h b/drivers/staging/vme/bridges/vme_tsi148.h index 6f0f705ce6be..9e5f7fa1d744 100644 --- a/drivers/staging/vme/bridges/vme_tsi148.h +++ b/drivers/staging/vme/bridges/vme_tsi148.h @@ -33,6 +33,22 @@ #define TSI148_MAX_MAILBOX 4 /* Max Mail Box registers */ #define TSI148_MAX_SEMAPHORE 8 /* Max Semaphores */ +/* Structure used to hold driver specific information */ +struct tsi148_driver { + void *base; /* Base Address of device registers */ + wait_queue_head_t dma_queue[2]; + wait_queue_head_t iack_queue; + void (*lm_callback[4])(int); /* Called in interrupt handler */ + void *crcsr_kernel; + dma_addr_t crcsr_bus; + struct vme_master_resource *flush_image; + struct mutex vme_rmw; /* Only one RMW cycle at a time */ + struct mutex vme_int; /* + * Only one VME interrupt can be + * generated at a time, provide locking + */ +}; + /* * Layout of a DMAC Linked-List Descriptor * diff --git a/drivers/staging/vme/vme.c b/drivers/staging/vme/vme.c index 79c501dac5f9..ea2eee3f0834 100644 --- a/drivers/staging/vme/vme.c +++ b/drivers/staging/vme/vme.c @@ -993,7 +993,7 @@ void vme_irq_handler(struct vme_bridge *bridge, int level, int statid) EXPORT_SYMBOL(vme_irq_handler); int vme_irq_request(struct device *dev, int level, int statid, - void (*callback)(int level, int vector, void *priv_data), + void (*callback)(int, int, void *), void *priv_data) { struct vme_bridge *bridge; @@ -1027,7 +1027,7 @@ int vme_irq_request(struct device *dev, int level, int statid, bridge->irq[level - 1].callback[statid].func = callback; /* Enable IRQ level */ - bridge->irq_set(level, 1, 1); + bridge->irq_set(bridge, level, 1, 1); mutex_unlock(&(bridge->irq_mtx)); @@ -1061,7 +1061,7 @@ void vme_irq_free(struct device *dev, int level, int statid) /* Disable IRQ level if no more interrupts attached at this level*/ if (bridge->irq[level - 1].count == 0) - bridge->irq_set(level, 0, 1); + bridge->irq_set(bridge, level, 0, 1); bridge->irq[level - 1].callback[statid].func = NULL; bridge->irq[level - 1].callback[statid].priv_data = NULL; @@ -1090,7 +1090,7 @@ int vme_irq_generate(struct device *dev, int level, int statid) return -EINVAL; } - return bridge->irq_generate(level, statid); + return bridge->irq_generate(bridge, level, statid); } EXPORT_SYMBOL(vme_irq_generate); @@ -1303,7 +1303,7 @@ int vme_slot_get(struct device *bus) return -EINVAL; } - return bridge->slot_get(); + return bridge->slot_get(bridge); } EXPORT_SYMBOL(vme_slot_get); diff --git a/drivers/staging/vme/vme_bridge.h b/drivers/staging/vme/vme_bridge.h index f8ead21c94fb..6dc472f613e2 100644 --- a/drivers/staging/vme/vme_bridge.h +++ b/drivers/staging/vme/vme_bridge.h @@ -113,7 +113,7 @@ struct vme_bridge { /* Bridge Info - XXX Move to private structure? */ struct device *parent; /* Generic device struct (pdev->dev for PCI) */ - void *base; /* Base Address of device registers */ + void *driver_priv; /* Private pointer for the bridge driver */ struct device dev[VME_SLOTS_MAX]; /* Device registered with * device model on VME bus @@ -152,8 +152,8 @@ struct vme_bridge { int (*dma_list_empty) (struct vme_dma_list *); /* Interrupt Functions */ - void (*irq_set) (int, int, int); - int (*irq_generate) (int, int); + void (*irq_set) (struct vme_bridge *, int, int, int); + int (*irq_generate) (struct vme_bridge *, int, int); /* Location monitor functions */ int (*lm_set) (struct vme_lm_resource *, unsigned long long, @@ -164,7 +164,7 @@ struct vme_bridge { int (*lm_detach) (struct vme_lm_resource *, int); /* CR/CSR space functions */ - int (*slot_get) (void); + int (*slot_get) (struct vme_bridge *); /* Use standard master read and write functions to access CR/CSR */ #if 0 From 8fafb47638012d93134d0ff38adcc5fc661beeb1 Mon Sep 17 00:00:00 2001 From: Martyn Welch Date: Thu, 18 Feb 2010 15:13:12 +0000 Subject: [PATCH 290/367] Staging: vme: Make vme_master_resource naming bus neutral The vme_master_resource structure contains an item called "pci_resource". Rename to make bus agnostic. Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vme/TODO | 1 - drivers/staging/vme/bridges/vme_ca91cx42.c | 48 ++++++++++----------- drivers/staging/vme/bridges/vme_tsi148.c | 50 +++++++++++----------- drivers/staging/vme/vme_bridge.h | 2 +- 4 files changed, 50 insertions(+), 51 deletions(-) diff --git a/drivers/staging/vme/TODO b/drivers/staging/vme/TODO index 83d44cbf9a5f..00c0ddcfe2a0 100644 --- a/drivers/staging/vme/TODO +++ b/drivers/staging/vme/TODO @@ -37,7 +37,6 @@ chips. They are currently not supported at all by the API. Core ==== -- Rename vme_master_resource's "pci_resource" to be bus agnostic. - Improve generic sanity checks (Such as does an offset and size fit within a window and parameter checking). diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c index c2f86a6996d5..ae2f69cd9d23 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.c +++ b/drivers/staging/vme/bridges/vme_ca91cx42.c @@ -526,8 +526,8 @@ static int ca91cx42_alloc_resource(struct vme_master_resource *image, } pdev = container_of(ca91cx42_bridge->parent, struct pci_dev, dev); - existing_size = (unsigned long long)(image->pci_resource.end - - image->pci_resource.start); + existing_size = (unsigned long long)(image->bus_resource.end - + image->bus_resource.start); /* If the existing size is OK, return */ if (existing_size == (size - 1)) @@ -536,15 +536,15 @@ static int ca91cx42_alloc_resource(struct vme_master_resource *image, if (existing_size != 0) { iounmap(image->kern_base); image->kern_base = NULL; - if (image->pci_resource.name != NULL) - kfree(image->pci_resource.name); - release_resource(&(image->pci_resource)); - memset(&(image->pci_resource), 0, sizeof(struct resource)); + if (image->bus_resource.name != NULL) + kfree(image->bus_resource.name); + release_resource(&(image->bus_resource)); + memset(&(image->bus_resource), 0, sizeof(struct resource)); } - if (image->pci_resource.name == NULL) { - image->pci_resource.name = kmalloc(VMENAMSIZ+3, GFP_KERNEL); - if (image->pci_resource.name == NULL) { + if (image->bus_resource.name == NULL) { + image->bus_resource.name = kmalloc(VMENAMSIZ+3, GFP_KERNEL); + if (image->bus_resource.name == NULL) { printk(KERN_ERR "Unable to allocate memory for resource" " name\n"); retval = -ENOMEM; @@ -552,26 +552,26 @@ static int ca91cx42_alloc_resource(struct vme_master_resource *image, } } - sprintf((char *)image->pci_resource.name, "%s.%d", + sprintf((char *)image->bus_resource.name, "%s.%d", ca91cx42_bridge->name, image->number); - image->pci_resource.start = 0; - image->pci_resource.end = (unsigned long)size; - image->pci_resource.flags = IORESOURCE_MEM; + image->bus_resource.start = 0; + image->bus_resource.end = (unsigned long)size; + image->bus_resource.flags = IORESOURCE_MEM; retval = pci_bus_alloc_resource(pdev->bus, - &(image->pci_resource), size, size, PCIBIOS_MIN_MEM, + &(image->bus_resource), size, size, PCIBIOS_MIN_MEM, 0, NULL, NULL); if (retval) { printk(KERN_ERR "Failed to allocate mem resource for " "window %d size 0x%lx start 0x%lx\n", image->number, (unsigned long)size, - (unsigned long)image->pci_resource.start); + (unsigned long)image->bus_resource.start); goto err_resource; } image->kern_base = ioremap_nocache( - image->pci_resource.start, size); + image->bus_resource.start, size); if (image->kern_base == NULL) { printk(KERN_ERR "Failed to remap resource\n"); retval = -ENOMEM; @@ -583,10 +583,10 @@ static int ca91cx42_alloc_resource(struct vme_master_resource *image, iounmap(image->kern_base); image->kern_base = NULL; err_remap: - release_resource(&(image->pci_resource)); + release_resource(&(image->bus_resource)); err_resource: - kfree(image->pci_resource.name); - memset(&(image->pci_resource), 0, sizeof(struct resource)); + kfree(image->bus_resource.name); + memset(&(image->bus_resource), 0, sizeof(struct resource)); err_name: return retval; } @@ -598,9 +598,9 @@ static void ca91cx42_free_resource(struct vme_master_resource *image) { iounmap(image->kern_base); image->kern_base = NULL; - release_resource(&(image->pci_resource)); - kfree(image->pci_resource.name); - memset(&(image->pci_resource), 0, sizeof(struct resource)); + release_resource(&(image->bus_resource)); + kfree(image->bus_resource.name); + memset(&(image->bus_resource), 0, sizeof(struct resource)); } @@ -646,7 +646,7 @@ int ca91cx42_master_set(struct vme_master_resource *image, int enabled, goto err_res; } - pci_base = (unsigned long long)image->pci_resource.start; + pci_base = (unsigned long long)image->bus_resource.start; /* * Bound address is a valid address for the window, adjust @@ -1102,7 +1102,7 @@ static int ca91cx42_probe(struct pci_dev *pdev, const struct pci_device_id *id) master_image->cycle_attr = VME_SCT | VME_BLT | VME_MBLT | VME_SUPER | VME_USER | VME_PROG | VME_DATA; master_image->width_attr = VME_D8 | VME_D16 | VME_D32 | VME_D64; - memset(&(master_image->pci_resource), 0, + memset(&(master_image->bus_resource), 0, sizeof(struct resource)); master_image->kern_base = NULL; list_add_tail(&(master_image->list), diff --git a/drivers/staging/vme/bridges/vme_tsi148.c b/drivers/staging/vme/bridges/vme_tsi148.c index e3d300c9bfba..a6f853a3dc24 100644 --- a/drivers/staging/vme/bridges/vme_tsi148.c +++ b/drivers/staging/vme/bridges/vme_tsi148.c @@ -855,8 +855,8 @@ static int tsi148_alloc_resource(struct vme_master_resource *image, } pdev = container_of(tsi148_bridge->parent, struct pci_dev, dev); - existing_size = (unsigned long long)(image->pci_resource.end - - image->pci_resource.start); + existing_size = (unsigned long long)(image->bus_resource.end - + image->bus_resource.start); /* If the existing size is OK, return */ if ((size != 0) && (existing_size == (size - 1))) @@ -865,10 +865,10 @@ static int tsi148_alloc_resource(struct vme_master_resource *image, if (existing_size != 0) { iounmap(image->kern_base); image->kern_base = NULL; - if (image->pci_resource.name != NULL) - kfree(image->pci_resource.name); - release_resource(&(image->pci_resource)); - memset(&(image->pci_resource), 0, sizeof(struct resource)); + if (image->bus_resource.name != NULL) + kfree(image->bus_resource.name); + release_resource(&(image->bus_resource)); + memset(&(image->bus_resource), 0, sizeof(struct resource)); } /* Exit here if size is zero */ @@ -876,9 +876,9 @@ static int tsi148_alloc_resource(struct vme_master_resource *image, return 0; } - if (image->pci_resource.name == NULL) { - image->pci_resource.name = kmalloc(VMENAMSIZ+3, GFP_KERNEL); - if (image->pci_resource.name == NULL) { + if (image->bus_resource.name == NULL) { + image->bus_resource.name = kmalloc(VMENAMSIZ+3, GFP_KERNEL); + if (image->bus_resource.name == NULL) { printk(KERN_ERR "Unable to allocate memory for resource" " name\n"); retval = -ENOMEM; @@ -886,26 +886,26 @@ static int tsi148_alloc_resource(struct vme_master_resource *image, } } - sprintf((char *)image->pci_resource.name, "%s.%d", tsi148_bridge->name, + sprintf((char *)image->bus_resource.name, "%s.%d", tsi148_bridge->name, image->number); - image->pci_resource.start = 0; - image->pci_resource.end = (unsigned long)size; - image->pci_resource.flags = IORESOURCE_MEM; + image->bus_resource.start = 0; + image->bus_resource.end = (unsigned long)size; + image->bus_resource.flags = IORESOURCE_MEM; retval = pci_bus_alloc_resource(pdev->bus, - &(image->pci_resource), size, size, PCIBIOS_MIN_MEM, + &(image->bus_resource), size, size, PCIBIOS_MIN_MEM, 0, NULL, NULL); if (retval) { printk(KERN_ERR "Failed to allocate mem resource for " "window %d size 0x%lx start 0x%lx\n", image->number, (unsigned long)size, - (unsigned long)image->pci_resource.start); + (unsigned long)image->bus_resource.start); goto err_resource; } image->kern_base = ioremap_nocache( - image->pci_resource.start, size); + image->bus_resource.start, size); if (image->kern_base == NULL) { printk(KERN_ERR "Failed to remap resource\n"); retval = -ENOMEM; @@ -917,10 +917,10 @@ static int tsi148_alloc_resource(struct vme_master_resource *image, iounmap(image->kern_base); image->kern_base = NULL; err_remap: - release_resource(&(image->pci_resource)); + release_resource(&(image->bus_resource)); err_resource: - kfree(image->pci_resource.name); - memset(&(image->pci_resource), 0, sizeof(struct resource)); + kfree(image->bus_resource.name); + memset(&(image->bus_resource), 0, sizeof(struct resource)); err_name: return retval; } @@ -932,9 +932,9 @@ static void tsi148_free_resource(struct vme_master_resource *image) { iounmap(image->kern_base); image->kern_base = NULL; - release_resource(&(image->pci_resource)); - kfree(image->pci_resource.name); - memset(&(image->pci_resource), 0, sizeof(struct resource)); + release_resource(&(image->bus_resource)); + kfree(image->bus_resource.name); + memset(&(image->bus_resource), 0, sizeof(struct resource)); } /* @@ -987,7 +987,7 @@ int tsi148_master_set( struct vme_master_resource *image, int enabled, pci_bound = 0; vme_offset = 0; } else { - pci_base = (unsigned long long)image->pci_resource.start; + pci_base = (unsigned long long)image->bus_resource.start; /* * Bound address is a valid address for the window, adjust @@ -2423,7 +2423,7 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id) VME_2eSST160 | VME_2eSST267 | VME_2eSST320 | VME_SUPER | VME_USER | VME_PROG | VME_DATA; tsi148_device->flush_image->width_attr = VME_D16 | VME_D32; - memset(&(tsi148_device->flush_image->pci_resource), 0, + memset(&(tsi148_device->flush_image->bus_resource), 0, sizeof(struct resource)); tsi148_device->flush_image->kern_base = NULL; } @@ -2450,7 +2450,7 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id) VME_2eSST267 | VME_2eSST320 | VME_SUPER | VME_USER | VME_PROG | VME_DATA; master_image->width_attr = VME_D16 | VME_D32; - memset(&(master_image->pci_resource), 0, + memset(&(master_image->bus_resource), 0, sizeof(struct resource)); master_image->kern_base = NULL; list_add_tail(&(master_image->list), diff --git a/drivers/staging/vme/vme_bridge.h b/drivers/staging/vme/vme_bridge.h index 6dc472f613e2..a2cfc1014726 100644 --- a/drivers/staging/vme/vme_bridge.h +++ b/drivers/staging/vme/vme_bridge.h @@ -19,7 +19,7 @@ struct vme_master_resource { vme_address_t address_attr; vme_cycle_t cycle_attr; vme_width_t width_attr; - struct resource pci_resource; /* XXX Rename to be bus agnostic */ + struct resource bus_resource; void *kern_base; }; From 2b82beb8c1bc81b3dde69d16cacbc22546681acf Mon Sep 17 00:00:00 2001 From: Martyn Welch Date: Thu, 18 Feb 2010 15:13:19 +0000 Subject: [PATCH 291/367] Staging: vme: Add location monitor support for ca91cx42 Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vme/TODO | 1 - drivers/staging/vme/bridges/vme_ca91cx42.c | 272 +++++++++++++++------ drivers/staging/vme/bridges/vme_ca91cx42.h | 13 + 3 files changed, 213 insertions(+), 73 deletions(-) diff --git a/drivers/staging/vme/TODO b/drivers/staging/vme/TODO index 00c0ddcfe2a0..723b67b08b91 100644 --- a/drivers/staging/vme/TODO +++ b/drivers/staging/vme/TODO @@ -58,7 +58,6 @@ Universe II (ca91c142) - DMA unsupported. - RMW transactions unsupported. -- Location Monitors unsupported. - Mailboxes unsupported. - Error Detection. - Control of prefetch size, threshold. diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c index ae2f69cd9d23..aeb11d5f919f 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.c +++ b/drivers/staging/vme/bridges/vme_ca91cx42.c @@ -899,6 +899,206 @@ ssize_t ca91cx42_master_write(struct vme_master_resource *image, void *buf, return retval; } +/* + * All 4 location monitors reside at the same base - this is therefore a + * system wide configuration. + * + * This does not enable the LM monitor - that should be done when the first + * callback is attached and disabled when the last callback is removed. + */ +int ca91cx42_lm_set(struct vme_lm_resource *lm, unsigned long long lm_base, + vme_address_t aspace, vme_cycle_t cycle) +{ + u32 temp_base, lm_ctl = 0; + int i; + struct ca91cx42_driver *bridge; + struct device *dev; + + bridge = lm->parent->driver_priv; + dev = lm->parent->parent; + + /* Check the alignment of the location monitor */ + temp_base = (u32)lm_base; + if (temp_base & 0xffff) { + dev_err(dev, "Location monitor must be aligned to 64KB " + "boundary"); + return -EINVAL; + } + + mutex_lock(&(lm->mtx)); + + /* If we already have a callback attached, we can't move it! */ + for (i = 0; i < lm->monitors; i++) { + if (bridge->lm_callback[i] != NULL) { + mutex_unlock(&(lm->mtx)); + dev_err(dev, "Location monitor callback attached, " + "can't reset\n"); + return -EBUSY; + } + } + + switch (aspace) { + case VME_A16: + lm_ctl |= CA91CX42_LM_CTL_AS_A16; + break; + case VME_A24: + lm_ctl |= CA91CX42_LM_CTL_AS_A24; + break; + case VME_A32: + lm_ctl |= CA91CX42_LM_CTL_AS_A32; + break; + default: + mutex_unlock(&(lm->mtx)); + dev_err(dev, "Invalid address space\n"); + return -EINVAL; + break; + } + + if (cycle & VME_SUPER) + lm_ctl |= CA91CX42_LM_CTL_SUPR; + if (cycle & VME_USER) + lm_ctl |= CA91CX42_LM_CTL_NPRIV; + if (cycle & VME_PROG) + lm_ctl |= CA91CX42_LM_CTL_PGM; + if (cycle & VME_DATA) + lm_ctl |= CA91CX42_LM_CTL_DATA; + + iowrite32(lm_base, bridge->base + LM_BS); + iowrite32(lm_ctl, bridge->base + LM_CTL); + + mutex_unlock(&(lm->mtx)); + + return 0; +} + +/* Get configuration of the callback monitor and return whether it is enabled + * or disabled. + */ +int ca91cx42_lm_get(struct vme_lm_resource *lm, unsigned long long *lm_base, + vme_address_t *aspace, vme_cycle_t *cycle) +{ + u32 lm_ctl, enabled = 0; + struct ca91cx42_driver *bridge; + + bridge = lm->parent->driver_priv; + + mutex_lock(&(lm->mtx)); + + *lm_base = (unsigned long long)ioread32(bridge->base + LM_BS); + lm_ctl = ioread32(bridge->base + LM_CTL); + + if (lm_ctl & CA91CX42_LM_CTL_EN) + enabled = 1; + + if ((lm_ctl & CA91CX42_LM_CTL_AS_M) == CA91CX42_LM_CTL_AS_A16) + *aspace = VME_A16; + if ((lm_ctl & CA91CX42_LM_CTL_AS_M) == CA91CX42_LM_CTL_AS_A24) + *aspace = VME_A24; + if ((lm_ctl & CA91CX42_LM_CTL_AS_M) == CA91CX42_LM_CTL_AS_A32) + *aspace = VME_A32; + + *cycle = 0; + if (lm_ctl & CA91CX42_LM_CTL_SUPR) + *cycle |= VME_SUPER; + if (lm_ctl & CA91CX42_LM_CTL_NPRIV) + *cycle |= VME_USER; + if (lm_ctl & CA91CX42_LM_CTL_PGM) + *cycle |= VME_PROG; + if (lm_ctl & CA91CX42_LM_CTL_DATA) + *cycle |= VME_DATA; + + mutex_unlock(&(lm->mtx)); + + return enabled; +} + +/* + * Attach a callback to a specific location monitor. + * + * Callback will be passed the monitor triggered. + */ +int ca91cx42_lm_attach(struct vme_lm_resource *lm, int monitor, + void (*callback)(int)) +{ + u32 lm_ctl, tmp; + struct ca91cx42_driver *bridge; + struct device *dev; + + bridge = lm->parent->driver_priv; + dev = lm->parent->parent; + + mutex_lock(&(lm->mtx)); + + /* Ensure that the location monitor is configured - need PGM or DATA */ + lm_ctl = ioread32(bridge->base + LM_CTL); + if ((lm_ctl & (CA91CX42_LM_CTL_PGM | CA91CX42_LM_CTL_DATA)) == 0) { + mutex_unlock(&(lm->mtx)); + dev_err(dev, "Location monitor not properly configured\n"); + return -EINVAL; + } + + /* Check that a callback isn't already attached */ + if (bridge->lm_callback[monitor] != NULL) { + mutex_unlock(&(lm->mtx)); + dev_err(dev, "Existing callback attached\n"); + return -EBUSY; + } + + /* Attach callback */ + bridge->lm_callback[monitor] = callback; + + /* Enable Location Monitor interrupt */ + tmp = ioread32(bridge->base + LINT_EN); + tmp |= CA91CX42_LINT_LM[monitor]; + iowrite32(tmp, bridge->base + LINT_EN); + + /* Ensure that global Location Monitor Enable set */ + if ((lm_ctl & CA91CX42_LM_CTL_EN) == 0) { + lm_ctl |= CA91CX42_LM_CTL_EN; + iowrite32(lm_ctl, bridge->base + LM_CTL); + } + + mutex_unlock(&(lm->mtx)); + + return 0; +} + +/* + * Detach a callback function forn a specific location monitor. + */ +int ca91cx42_lm_detach(struct vme_lm_resource *lm, int monitor) +{ + u32 tmp; + struct ca91cx42_driver *bridge; + + bridge = lm->parent->driver_priv; + + mutex_lock(&(lm->mtx)); + + /* Disable Location Monitor and ensure previous interrupts are clear */ + tmp = ioread32(bridge->base + LINT_EN); + tmp &= ~CA91CX42_LINT_LM[monitor]; + iowrite32(tmp, bridge->base + LINT_EN); + + iowrite32(CA91CX42_LINT_LM[monitor], + bridge->base + LINT_STAT); + + /* Detach callback */ + bridge->lm_callback[monitor] = NULL; + + /* If all location monitors disabled, disable global Location Monitor */ + if ((tmp & (CA91CX42_LINT_LM0 | CA91CX42_LINT_LM1 | CA91CX42_LINT_LM2 | + CA91CX42_LINT_LM3)) == 0) { + tmp = ioread32(bridge->base + LM_CTL); + tmp &= ~CA91CX42_LM_CTL_EN; + iowrite32(tmp, bridge->base + LM_CTL); + } + + mutex_unlock(&(lm->mtx)); + + return 0; +} + int ca91cx42_slot_get(struct vme_bridge *ca91cx42_bridge) { u32 slot = 0; @@ -1190,12 +1390,10 @@ static int ca91cx42_probe(struct pci_dev *pdev, const struct pci_device_id *id) #endif ca91cx42_bridge->irq_set = ca91cx42_irq_set; ca91cx42_bridge->irq_generate = ca91cx42_irq_generate; -#if 0 ca91cx42_bridge->lm_set = ca91cx42_lm_set; ca91cx42_bridge->lm_get = ca91cx42_lm_get; ca91cx42_bridge->lm_attach = ca91cx42_lm_attach; ca91cx42_bridge->lm_detach = ca91cx42_lm_detach; -#endif ca91cx42_bridge->slot_get = ca91cx42_slot_get; data = ioread32(ca91cx42_device->base + MISC_CTL); @@ -1786,77 +1984,7 @@ int ca91cx42_do_dma(vmeDmaPacket_t *vmeDma) return 0; } -int ca91cx42_lm_set(vmeLmCfg_t *vmeLm) -{ - int temp_ctl = 0; - if (vmeLm->addrU) - return -EINVAL; - - switch (vmeLm->addrSpace) { - case VME_A64: - case VME_USER3: - case VME_USER4: - return -EINVAL; - case VME_A16: - temp_ctl |= 0x00000; - break; - case VME_A24: - temp_ctl |= 0x10000; - break; - case VME_A32: - temp_ctl |= 0x20000; - break; - case VME_CRCSR: - temp_ctl |= 0x50000; - break; - case VME_USER1: - temp_ctl |= 0x60000; - break; - case VME_USER2: - temp_ctl |= 0x70000; - break; - } - - /* Disable while we are mucking around */ - iowrite32(0x00000000, bridge->base + LM_CTL); - - iowrite32(vmeLm->addr, bridge->base + LM_BS); - - /* Setup CTL register. */ - if (vmeLm->userAccessType & VME_SUPER) - temp_ctl |= 0x00200000; - if (vmeLm->userAccessType & VME_USER) - temp_ctl |= 0x00100000; - if (vmeLm->dataAccessType & VME_PROG) - temp_ctl |= 0x00800000; - if (vmeLm->dataAccessType & VME_DATA) - temp_ctl |= 0x00400000; - - - /* Write ctl reg and enable */ - iowrite32(0x80000000 | temp_ctl, bridge->base + LM_CTL); - temp_ctl = ioread32(bridge->base + LM_CTL); - - return 0; -} - -int ca91cx42_wait_lm(vmeLmCfg_t *vmeLm) -{ - unsigned long flags; - unsigned int tmp; - - spin_lock_irqsave(&lm_lock, flags); - spin_unlock_irqrestore(&lm_lock, flags); - if (tmp == 0) { - if (vmeLm->lmWait < 10) - vmeLm->lmWait = 10; - interruptible_sleep_on_timeout(&lm_queue, vmeLm->lmWait); - } - iowrite32(0x00000000, bridge->base + LM_CTL); - - return 0; -} diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.h b/drivers/staging/vme/bridges/vme_ca91cx42.h index df1050297849..b9b63088668c 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.h +++ b/drivers/staging/vme/bridges/vme_ca91cx42.h @@ -491,6 +491,19 @@ static const int CA91CX42_LINT_LM[] = { CA91CX42_LINT_LM0, CA91CX42_LINT_LM1, #define CA91CX42_VSI_CTL_LAS_PCI_IO (1<<0) #define CA91CX42_VSI_CTL_LAS_PCI_CONF (1<<1) +/* LM_CTL Register + * offset F64 + */ +#define CA91CX42_LM_CTL_EN (1<<31) +#define CA91CX42_LM_CTL_PGM (1<<23) +#define CA91CX42_LM_CTL_DATA (1<<22) +#define CA91CX42_LM_CTL_SUPR (1<<21) +#define CA91CX42_LM_CTL_NPRIV (1<<20) +#define CA91CX42_LM_CTL_AS_M (5<<16) +#define CA91CX42_LM_CTL_AS_A16 0 +#define CA91CX42_LM_CTL_AS_A24 (1<<16) +#define CA91CX42_LM_CTL_AS_A32 (1<<17) + /* * VRAI_CTL Register * offset F70 From 4860ab74d4d577d21fbfe0da3bd0925f3efc8907 Mon Sep 17 00:00:00 2001 From: Martyn Welch Date: Thu, 18 Feb 2010 15:13:25 +0000 Subject: [PATCH 292/367] Staging: vme: add ca91cx42 dma support Add support for the DMA controller in the ca91cx42 bridge. Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vme/TODO | 1 - drivers/staging/vme/bridges/Kconfig | 1 + drivers/staging/vme/bridges/vme_ca91cx42.c | 599 +++++++++------------ drivers/staging/vme/bridges/vme_ca91cx42.h | 93 +++- 4 files changed, 327 insertions(+), 367 deletions(-) diff --git a/drivers/staging/vme/TODO b/drivers/staging/vme/TODO index 723b67b08b91..f0dba3e4104d 100644 --- a/drivers/staging/vme/TODO +++ b/drivers/staging/vme/TODO @@ -56,7 +56,6 @@ Tempe (tsi148) Universe II (ca91c142) ---------------------- -- DMA unsupported. - RMW transactions unsupported. - Mailboxes unsupported. - Error Detection. diff --git a/drivers/staging/vme/bridges/Kconfig b/drivers/staging/vme/bridges/Kconfig index 66c49f5d8db8..9331064e0476 100644 --- a/drivers/staging/vme/bridges/Kconfig +++ b/drivers/staging/vme/bridges/Kconfig @@ -2,6 +2,7 @@ comment "VME Bridge Drivers" config VME_CA91CX42 tristate "Universe II" + depends on VIRT_TO_BUS help If you say Y here you get support for the Tundra CA91C142 (Universe II) VME bridge chip. diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c index aeb11d5f919f..eddf071df40f 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.c +++ b/drivers/staging/vme/bridges/vme_ca91cx42.c @@ -592,8 +592,8 @@ err_name: } /* - * * Free and unmap PCI Resource - * */ + * Free and unmap PCI Resource + */ static void ca91cx42_free_resource(struct vme_master_resource *image) { iounmap(image->kern_base); @@ -899,6 +899,261 @@ ssize_t ca91cx42_master_write(struct vme_master_resource *image, void *buf, return retval; } +int ca91cx42_dma_list_add(struct vme_dma_list *list, struct vme_dma_attr *src, + struct vme_dma_attr *dest, size_t count) +{ + struct ca91cx42_dma_entry *entry, *prev; + struct vme_dma_pci *pci_attr; + struct vme_dma_vme *vme_attr; + dma_addr_t desc_ptr; + int retval = 0; + + /* XXX descriptor must be aligned on 64-bit boundaries */ + entry = (struct ca91cx42_dma_entry *) + kmalloc(sizeof(struct ca91cx42_dma_entry), GFP_KERNEL); + if (entry == NULL) { + printk(KERN_ERR "Failed to allocate memory for dma resource " + "structure\n"); + retval = -ENOMEM; + goto err_mem; + } + + /* Test descriptor alignment */ + if ((unsigned long)&(entry->descriptor) & CA91CX42_DCPP_M) { + printk("Descriptor not aligned to 16 byte boundary as " + "required: %p\n", &(entry->descriptor)); + retval = -EINVAL; + goto err_align; + } + + memset(&(entry->descriptor), 0, sizeof(struct ca91cx42_dma_descriptor)); + + if (dest->type == VME_DMA_VME) { + entry->descriptor.dctl |= CA91CX42_DCTL_L2V; + vme_attr = (struct vme_dma_vme *)dest->private; + pci_attr = (struct vme_dma_pci *)src->private; + } else { + vme_attr = (struct vme_dma_vme *)src->private; + pci_attr = (struct vme_dma_pci *)dest->private; + } + + /* Check we can do fullfill required attributes */ + if ((vme_attr->aspace & ~(VME_A16 | VME_A24 | VME_A32 | VME_USER1 | + VME_USER2)) != 0) { + + printk(KERN_ERR "Unsupported cycle type\n"); + retval = -EINVAL; + goto err_aspace; + } + + if ((vme_attr->cycle & ~(VME_SCT | VME_BLT | VME_SUPER | VME_USER | + VME_PROG | VME_DATA)) != 0) { + + printk(KERN_ERR "Unsupported cycle type\n"); + retval = -EINVAL; + goto err_cycle; + } + + /* Check to see if we can fullfill source and destination */ + if (!(((src->type == VME_DMA_PCI) && (dest->type == VME_DMA_VME)) || + ((src->type == VME_DMA_VME) && (dest->type == VME_DMA_PCI)))) { + + printk(KERN_ERR "Cannot perform transfer with this " + "source-destination combination\n"); + retval = -EINVAL; + goto err_direct; + } + + /* Setup cycle types */ + if (vme_attr->cycle & VME_BLT) + entry->descriptor.dctl |= CA91CX42_DCTL_VCT_BLT; + + /* Setup data width */ + switch (vme_attr->dwidth) { + case VME_D8: + entry->descriptor.dctl |= CA91CX42_DCTL_VDW_D8; + break; + case VME_D16: + entry->descriptor.dctl |= CA91CX42_DCTL_VDW_D16; + break; + case VME_D32: + entry->descriptor.dctl |= CA91CX42_DCTL_VDW_D32; + break; + case VME_D64: + entry->descriptor.dctl |= CA91CX42_DCTL_VDW_D64; + break; + default: + printk(KERN_ERR "Invalid data width\n"); + return -EINVAL; + } + + /* Setup address space */ + switch (vme_attr->aspace) { + case VME_A16: + entry->descriptor.dctl |= CA91CX42_DCTL_VAS_A16; + break; + case VME_A24: + entry->descriptor.dctl |= CA91CX42_DCTL_VAS_A24; + break; + case VME_A32: + entry->descriptor.dctl |= CA91CX42_DCTL_VAS_A32; + break; + case VME_USER1: + entry->descriptor.dctl |= CA91CX42_DCTL_VAS_USER1; + break; + case VME_USER2: + entry->descriptor.dctl |= CA91CX42_DCTL_VAS_USER2; + break; + default: + printk(KERN_ERR "Invalid address space\n"); + return -EINVAL; + break; + } + + if (vme_attr->cycle & VME_SUPER) + entry->descriptor.dctl |= CA91CX42_DCTL_SUPER_SUPR; + if (vme_attr->cycle & VME_PROG) + entry->descriptor.dctl |= CA91CX42_DCTL_PGM_PGM; + + entry->descriptor.dtbc = count; + entry->descriptor.dla = pci_attr->address; + entry->descriptor.dva = vme_attr->address; + entry->descriptor.dcpp = CA91CX42_DCPP_NULL; + + /* Add to list */ + list_add_tail(&(entry->list), &(list->entries)); + + /* Fill out previous descriptors "Next Address" */ + if (entry->list.prev != &(list->entries)) { + prev = list_entry(entry->list.prev, struct ca91cx42_dma_entry, + list); + /* We need the bus address for the pointer */ + desc_ptr = virt_to_bus(&(entry->descriptor)); + prev->descriptor.dcpp = desc_ptr & ~CA91CX42_DCPP_M; + } + + return 0; + +err_cycle: +err_aspace: +err_direct: +err_align: + kfree(entry); +err_mem: + return retval; +} + +static int ca91cx42_dma_busy(struct vme_bridge *ca91cx42_bridge) +{ + u32 tmp; + struct ca91cx42_driver *bridge; + + bridge = ca91cx42_bridge->driver_priv; + + tmp = ioread32(bridge->base + DGCS); + + if (tmp & CA91CX42_DGCS_ACT) + return 0; + else + return 1; +} + +int ca91cx42_dma_list_exec(struct vme_dma_list *list) +{ + struct vme_dma_resource *ctrlr; + struct ca91cx42_dma_entry *entry; + int retval = 0; + dma_addr_t bus_addr; + u32 val; + + struct ca91cx42_driver *bridge; + + ctrlr = list->parent; + + bridge = ctrlr->parent->driver_priv; + + mutex_lock(&(ctrlr->mtx)); + + if (!(list_empty(&(ctrlr->running)))) { + /* + * XXX We have an active DMA transfer and currently haven't + * sorted out the mechanism for "pending" DMA transfers. + * Return busy. + */ + /* Need to add to pending here */ + mutex_unlock(&(ctrlr->mtx)); + return -EBUSY; + } else { + list_add(&(list->list), &(ctrlr->running)); + } + + /* Get first bus address and write into registers */ + entry = list_first_entry(&(list->entries), struct ca91cx42_dma_entry, + list); + + bus_addr = virt_to_bus(&(entry->descriptor)); + + mutex_unlock(&(ctrlr->mtx)); + + iowrite32(0, bridge->base + DTBC); + iowrite32(bus_addr & ~CA91CX42_DCPP_M, bridge->base + DCPP); + + /* Start the operation */ + val = ioread32(bridge->base + DGCS); + + /* XXX Could set VMEbus On and Off Counters here */ + val &= (CA91CX42_DGCS_VON_M | CA91CX42_DGCS_VOFF_M); + + val |= (CA91CX42_DGCS_CHAIN | CA91CX42_DGCS_STOP | CA91CX42_DGCS_HALT | + CA91CX42_DGCS_DONE | CA91CX42_DGCS_LERR | CA91CX42_DGCS_VERR | + CA91CX42_DGCS_PERR); + + iowrite32(val, bridge->base + DGCS); + + val |= CA91CX42_DGCS_GO; + + iowrite32(val, bridge->base + DGCS); + + wait_event_interruptible(bridge->dma_queue, + ca91cx42_dma_busy(ctrlr->parent)); + + /* + * Read status register, this register is valid until we kick off a + * new transfer. + */ + val = ioread32(bridge->base + DGCS); + + if (val & (CA91CX42_DGCS_LERR | CA91CX42_DGCS_VERR | + CA91CX42_DGCS_PERR)) { + + printk(KERN_ERR "ca91c042: DMA Error. DGCS=%08X\n", val); + val = ioread32(bridge->base + DCTL); + } + + /* Remove list from running list */ + mutex_lock(&(ctrlr->mtx)); + list_del(&(list->list)); + mutex_unlock(&(ctrlr->mtx)); + + return retval; + +} + +int ca91cx42_dma_list_empty(struct vme_dma_list *list) +{ + struct list_head *pos, *temp; + struct ca91cx42_dma_entry *entry; + + /* detach and free each entry */ + list_for_each_safe(pos, temp, &(list->entries)) { + list_del(pos); + entry = list_entry(pos, struct ca91cx42_dma_entry, list); + kfree(entry); + } + + return 0; +} + /* * All 4 location monitors reside at the same base - this is therefore a * system wide configuration. @@ -1203,9 +1458,7 @@ static int ca91cx42_probe(struct pci_dev *pdev, const struct pci_device_id *id) struct ca91cx42_driver *ca91cx42_device; struct vme_master_resource *master_image; struct vme_slave_resource *slave_image; -#if 0 struct vme_dma_resource *dma_ctrlr; -#endif struct vme_lm_resource *lm; /* We want to support more than one of each bridge so we need to @@ -1336,7 +1589,7 @@ static int ca91cx42_probe(struct pci_dev *pdev, const struct pci_device_id *id) list_add_tail(&(slave_image->list), &(ca91cx42_bridge->slave_resources)); } -#if 0 + /* Add dma engines to list */ INIT_LIST_HEAD(&(ca91cx42_bridge->dma_resources)); for (i = 0; i < CA91C142_MAX_DMA; i++) { @@ -1359,7 +1612,7 @@ static int ca91cx42_probe(struct pci_dev *pdev, const struct pci_device_id *id) list_add_tail(&(dma_ctrlr->list), &(ca91cx42_bridge->dma_resources)); } -#endif + /* Add location monitor to list */ INIT_LIST_HEAD(&(ca91cx42_bridge->lm_resources)); lm = kmalloc(sizeof(struct vme_lm_resource), GFP_KERNEL); @@ -1384,10 +1637,10 @@ static int ca91cx42_probe(struct pci_dev *pdev, const struct pci_device_id *id) ca91cx42_bridge->master_write = ca91cx42_master_write; #if 0 ca91cx42_bridge->master_rmw = ca91cx42_master_rmw; +#endif ca91cx42_bridge->dma_list_add = ca91cx42_dma_list_add; ca91cx42_bridge->dma_list_exec = ca91cx42_dma_list_exec; ca91cx42_bridge->dma_list_empty = ca91cx42_dma_list_empty; -#endif ca91cx42_bridge->irq_set = ca91cx42_irq_set; ca91cx42_bridge->irq_generate = ca91cx42_irq_generate; ca91cx42_bridge->lm_set = ca91cx42_lm_set; @@ -1436,7 +1689,6 @@ err_lm: list_del(pos); kfree(lm); } -#if 0 err_dma: /* resources are stored in link list */ list_for_each(pos, &(ca91cx42_bridge->dma_resources)) { @@ -1444,7 +1696,6 @@ err_dma: list_del(pos); kfree(dma_ctrlr); } -#endif err_slave: /* resources are stored in link list */ list_for_each(pos, &(ca91cx42_bridge->slave_resources)) { @@ -1575,7 +1826,6 @@ module_exit(ca91cx42_exit); *--------------------------------------------------------------------------*/ #if 0 -#define SWIZZLE(X) ( ((X & 0xFF000000) >> 24) | ((X & 0x00FF0000) >> 8) | ((X & 0x0000FF00) << 8) | ((X & 0x000000FF) << 24)) int ca91cx42_master_rmw(vmeRmwCfg_t *vmeRmw) { @@ -1659,335 +1909,6 @@ int ca91cx42_master_rmw(vmeRmwCfg_t *vmeRmw) return 0; } -int uniSetupDctlReg(vmeDmaPacket_t * vmeDma, int *dctlregreturn) -{ - unsigned int dctlreg = 0x80; - struct vmeAttr *vmeAttr; - - if (vmeDma->srcBus == VME_DMA_VME) { - dctlreg = 0; - vmeAttr = &vmeDma->srcVmeAttr; - } else { - dctlreg = 0x80000000; - vmeAttr = &vmeDma->dstVmeAttr; - } - - switch (vmeAttr->maxDataWidth) { - case VME_D8: - break; - case VME_D16: - dctlreg |= 0x00400000; - break; - case VME_D32: - dctlreg |= 0x00800000; - break; - case VME_D64: - dctlreg |= 0x00C00000; - break; - } - - switch (vmeAttr->addrSpace) { - case VME_A16: - break; - case VME_A24: - dctlreg |= 0x00010000; - break; - case VME_A32: - dctlreg |= 0x00020000; - break; - case VME_USER1: - dctlreg |= 0x00060000; - break; - case VME_USER2: - dctlreg |= 0x00070000; - break; - - case VME_A64: /* not supported in Universe DMA */ - case VME_CRCSR: - case VME_USER3: - case VME_USER4: - return -EINVAL; - break; - } - if (vmeAttr->userAccessType == VME_PROG) { - dctlreg |= 0x00004000; - } - if (vmeAttr->dataAccessType == VME_SUPER) { - dctlreg |= 0x00001000; - } - if (vmeAttr->xferProtocol != VME_SCT) { - dctlreg |= 0x00000100; - } - *dctlregreturn = dctlreg; - return 0; -} - -unsigned int -ca91cx42_start_dma(int channel, unsigned int dgcsreg, TDMA_Cmd_Packet *vmeLL) -{ - unsigned int val; - - /* Setup registers as needed for direct or chained. */ - if (dgcsreg & 0x8000000) { - iowrite32(0, bridge->base + DTBC); - iowrite32((unsigned int)vmeLL, bridge->base + DCPP); - } else { -#if 0 - printk(KERN_ERR "Starting: DGCS = %08x\n", dgcsreg); - printk(KERN_ERR "Starting: DVA = %08x\n", - ioread32(&vmeLL->dva)); - printk(KERN_ERR "Starting: DLV = %08x\n", - ioread32(&vmeLL->dlv)); - printk(KERN_ERR "Starting: DTBC = %08x\n", - ioread32(&vmeLL->dtbc)); - printk(KERN_ERR "Starting: DCTL = %08x\n", - ioread32(&vmeLL->dctl)); -#endif - /* Write registers */ - iowrite32(ioread32(&vmeLL->dva), bridge->base + DVA); - iowrite32(ioread32(&vmeLL->dlv), bridge->base + DLA); - iowrite32(ioread32(&vmeLL->dtbc), bridge->base + DTBC); - iowrite32(ioread32(&vmeLL->dctl), bridge->base + DCTL); - iowrite32(0, bridge->base + DCPP); - } - - /* Start the operation */ - iowrite32(dgcsreg, bridge->base + DGCS); - val = get_tbl(); - iowrite32(dgcsreg | 0x8000000F, bridge->base + DGCS); - return val; -} - -TDMA_Cmd_Packet *ca91cx42_setup_dma(vmeDmaPacket_t * vmeDma) -{ - vmeDmaPacket_t *vmeCur; - int maxPerPage; - int currentLLcount; - TDMA_Cmd_Packet *startLL; - TDMA_Cmd_Packet *currentLL; - TDMA_Cmd_Packet *nextLL; - unsigned int dctlreg = 0; - - maxPerPage = PAGESIZE / sizeof(TDMA_Cmd_Packet) - 1; - startLL = (TDMA_Cmd_Packet *) __get_free_pages(GFP_KERNEL, 0); - if (startLL == 0) { - return startLL; - } - /* First allocate pages for descriptors and create linked list */ - vmeCur = vmeDma; - currentLL = startLL; - currentLLcount = 0; - while (vmeCur != 0) { - if (vmeCur->pNextPacket != 0) { - currentLL->dcpp = (unsigned int)(currentLL + 1); - currentLLcount++; - if (currentLLcount >= maxPerPage) { - currentLL->dcpp = - __get_free_pages(GFP_KERNEL, 0); - currentLLcount = 0; - } - currentLL = (TDMA_Cmd_Packet *) currentLL->dcpp; - } else { - currentLL->dcpp = (unsigned int)0; - } - vmeCur = vmeCur->pNextPacket; - } - - /* Next fill in information for each descriptor */ - vmeCur = vmeDma; - currentLL = startLL; - while (vmeCur != 0) { - if (vmeCur->srcBus == VME_DMA_VME) { - iowrite32(vmeCur->srcAddr, ¤tLL->dva); - iowrite32(vmeCur->dstAddr, ¤tLL->dlv); - } else { - iowrite32(vmeCur->srcAddr, ¤tLL->dlv); - iowrite32(vmeCur->dstAddr, ¤tLL->dva); - } - uniSetupDctlReg(vmeCur, &dctlreg); - iowrite32(dctlreg, ¤tLL->dctl); - iowrite32(vmeCur->byteCount, ¤tLL->dtbc); - - currentLL = (TDMA_Cmd_Packet *) currentLL->dcpp; - vmeCur = vmeCur->pNextPacket; - } - - /* Convert Links to PCI addresses. */ - currentLL = startLL; - while (currentLL != 0) { - nextLL = (TDMA_Cmd_Packet *) currentLL->dcpp; - if (nextLL == 0) { - iowrite32(1, ¤tLL->dcpp); - } else { - iowrite32((unsigned int)virt_to_bus(nextLL), - ¤tLL->dcpp); - } - currentLL = nextLL; - } - - /* Return pointer to descriptors list */ - return startLL; -} - -int ca91cx42_free_dma(TDMA_Cmd_Packet *startLL) -{ - TDMA_Cmd_Packet *currentLL; - TDMA_Cmd_Packet *prevLL; - TDMA_Cmd_Packet *nextLL; - unsigned int dcppreg; - - /* Convert Links to virtual addresses. */ - currentLL = startLL; - while (currentLL != 0) { - dcppreg = ioread32(¤tLL->dcpp); - dcppreg &= ~6; - if (dcppreg & 1) { - currentLL->dcpp = 0; - } else { - currentLL->dcpp = (unsigned int)bus_to_virt(dcppreg); - } - currentLL = (TDMA_Cmd_Packet *) currentLL->dcpp; - } - - /* Free all pages associated with the descriptors. */ - currentLL = startLL; - prevLL = currentLL; - while (currentLL != 0) { - nextLL = (TDMA_Cmd_Packet *) currentLL->dcpp; - if (currentLL + 1 != nextLL) { - free_pages((int)prevLL, 0); - prevLL = nextLL; - } - currentLL = nextLL; - } - - /* Return pointer to descriptors list */ - return 0; -} - -int ca91cx42_do_dma(vmeDmaPacket_t *vmeDma) -{ - unsigned int dgcsreg = 0; - unsigned int dctlreg = 0; - int val; - int channel, x; - vmeDmaPacket_t *curDma; - TDMA_Cmd_Packet *dmaLL; - - /* Sanity check the VME chain. */ - channel = vmeDma->channel_number; - if (channel > 0) { - return -EINVAL; - } - curDma = vmeDma; - while (curDma != 0) { - if (curDma->byteCount == 0) { - return -EINVAL; - } - if (curDma->byteCount >= 0x1000000) { - return -EINVAL; - } - if ((curDma->srcAddr & 7) != (curDma->dstAddr & 7)) { - return -EINVAL; - } - switch (curDma->srcBus) { - case VME_DMA_PCI: - if (curDma->dstBus != VME_DMA_VME) { - return -EINVAL; - } - break; - case VME_DMA_VME: - if (curDma->dstBus != VME_DMA_PCI) { - return -EINVAL; - } - break; - default: - return -EINVAL; - break; - } - if (uniSetupDctlReg(curDma, &dctlreg) < 0) { - return -EINVAL; - } - - curDma = curDma->pNextPacket; - if (curDma == vmeDma) { /* Endless Loop! */ - return -EINVAL; - } - } - - /* calculate control register */ - if (vmeDma->pNextPacket != 0) { - dgcsreg = 0x8000000; - } else { - dgcsreg = 0; - } - - for (x = 0; x < 8; x++) { /* vme block size */ - if ((256 << x) >= vmeDma->maxVmeBlockSize) { - break; - } - } - if (x == 8) - x = 7; - dgcsreg |= (x << 20); - - if (vmeDma->vmeBackOffTimer) { - for (x = 1; x < 8; x++) { /* vme timer */ - if ((16 << (x - 1)) >= vmeDma->vmeBackOffTimer) { - break; - } - } - if (x == 8) - x = 7; - dgcsreg |= (x << 16); - } - /*` Setup the dma chain */ - dmaLL = ca91cx42_setup_dma(vmeDma); - - /* Start the DMA */ - if (dgcsreg & 0x8000000) { - vmeDma->vmeDmaStartTick = - ca91cx42_start_dma(channel, dgcsreg, - (TDMA_Cmd_Packet *) virt_to_phys(dmaLL)); - } else { - vmeDma->vmeDmaStartTick = - ca91cx42_start_dma(channel, dgcsreg, dmaLL); - } - - wait_event_interruptible(dma_queue, - ioread32(bridge->base + DGCS) & 0x800); - - val = ioread32(bridge->base + DGCS); - iowrite32(val | 0xF00, bridge->base + DGCS); - - vmeDma->vmeDmaStatus = 0; - - if (!(val & 0x00000800)) { - vmeDma->vmeDmaStatus = val & 0x700; - printk(KERN_ERR "ca91c042: DMA Error in ca91cx42_DMA_irqhandler" - " DGCS=%08X\n", val); - val = ioread32(bridge->base + DCPP); - printk(KERN_ERR "ca91c042: DCPP=%08X\n", val); - val = ioread32(bridge->base + DCTL); - printk(KERN_ERR "ca91c042: DCTL=%08X\n", val); - val = ioread32(bridge->base + DTBC); - printk(KERN_ERR "ca91c042: DTBC=%08X\n", val); - val = ioread32(bridge->base + DLA); - printk(KERN_ERR "ca91c042: DLA=%08X\n", val); - val = ioread32(bridge->base + DVA); - printk(KERN_ERR "ca91c042: DVA=%08X\n", val); - - } - /* Free the dma chain */ - ca91cx42_free_dma(dmaLL); - - return 0; -} - - - - - int ca91cx42_set_arbiter(vmeArbiterCfg_t *vmeArb) { int temp_ctl = 0; diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.h b/drivers/staging/vme/bridges/vme_ca91cx42.h index b9b63088668c..221d20f0b925 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.h +++ b/drivers/staging/vme/bridges/vme_ca91cx42.h @@ -57,7 +57,7 @@ struct ca91cx42_driver { struct ca91cx42_dma_descriptor { unsigned int dctl; /* DMA Control */ unsigned int dtbc; /* Transfer Byte Count */ - unsigned int dlv; /* PCI Address */ + unsigned int dla; /* PCI Address */ unsigned int res1; /* Reserved */ unsigned int dva; /* Vme Address */ unsigned int res2; /* Reserved */ @@ -253,32 +253,6 @@ static const int CA91CX42_VSI_TO[] = { VSI0_TO, VSI1_TO, VSI2_TO, VSI3_TO, #define VCSR_SET 0x0FF8 #define VCSR_BS 0x0FFC -// DMA General Control/Status Register DGCS (0x220) -// 32-24 || GO | STOPR | HALTR | 0 || CHAIN | 0 | 0 | 0 || -// 23-16 || VON || VOFF || -// 15-08 || ACT | STOP | HALT | 0 || DONE | LERR | VERR | P_ERR || -// 07-00 || 0 | INT_S | INT_H | 0 || I_DNE | I_LER | I_VER | I_PER || - -// VON - Length Per DMA VMEBus Transfer -// 0000 = None -// 0001 = 256 Bytes -// 0010 = 512 -// 0011 = 1024 -// 0100 = 2048 -// 0101 = 4096 -// 0110 = 8192 -// 0111 = 16384 - -// VOFF - wait between DMA tenures -// 0000 = 0 us -// 0001 = 16 -// 0010 = 32 -// 0011 = 64 -// 0100 = 128 -// 0101 = 256 -// 0110 = 512 -// 0111 = 1024 - /* * PCI Class Register * offset 008 @@ -370,6 +344,71 @@ static const int CA91CX42_VSI_TO[] = { VSI0_TO, VSI1_TO, VSI2_TO, VSI3_TO, #define CA91CX42_OF_SLSI_LAS 0 #define CA91CX42_BM_SLSI_RESERVED 0x3F0F0000 +/* + * DCTL Register + * offset 200 + */ +#define CA91CX42_DCTL_L2V (1<<31) +#define CA91CX42_DCTL_VDW_M (3<<22) +#define CA91CX42_DCTL_VDW_M (3<<22) +#define CA91CX42_DCTL_VDW_D8 0 +#define CA91CX42_DCTL_VDW_D16 (1<<22) +#define CA91CX42_DCTL_VDW_D32 (1<<23) +#define CA91CX42_DCTL_VDW_D64 (3<<22) + +#define CA91CX42_DCTL_VAS_M (7<<16) +#define CA91CX42_DCTL_VAS_A16 0 +#define CA91CX42_DCTL_VAS_A24 (1<<16) +#define CA91CX42_DCTL_VAS_A32 (1<<17) +#define CA91CX42_DCTL_VAS_USER1 (3<<17) +#define CA91CX42_DCTL_VAS_USER2 (7<<16) + +#define CA91CX42_DCTL_PGM_M (1<<14) +#define CA91CX42_DCTL_PGM_DATA 0 +#define CA91CX42_DCTL_PGM_PGM (1<<14) + +#define CA91CX42_DCTL_SUPER_M (1<<12) +#define CA91CX42_DCTL_SUPER_NPRIV 0 +#define CA91CX42_DCTL_SUPER_SUPR (1<<12) + +#define CA91CX42_DCTL_VCT_M (1<<8) +#define CA91CX42_DCTL_VCT_BLT (1<<8) +#define CA91CX42_DCTL_LD64EN (1<<7) + +/* + * DCPP Register + * offset 218 + */ +#define CA91CX42_DCPP_M 0xf +#define CA91CX42_DCPP_NULL (1<<0) + +/* + * DMA General Control/Status Register (DGCS) + * offset 220 + */ +#define CA91CX42_DGCS_GO (1<<31) +#define CA91CX42_DGCS_STOP_REQ (1<<30) +#define CA91CX42_DGCS_HALT_REQ (1<<29) +#define CA91CX42_DGCS_CHAIN (1<<27) + +#define CA91CX42_DGCS_VON_M (7<<20) + +#define CA91CX42_DGCS_VOFF_M (0xf<<16) + +#define CA91CX42_DGCS_ACT (1<<15) +#define CA91CX42_DGCS_STOP (1<<14) +#define CA91CX42_DGCS_HALT (1<<13) +#define CA91CX42_DGCS_DONE (1<<11) +#define CA91CX42_DGCS_LERR (1<<10) +#define CA91CX42_DGCS_VERR (1<<9) +#define CA91CX42_DGCS_PERR (1<<8) +#define CA91CX42_DGCS_INT_STOP (1<<6) +#define CA91CX42_DGCS_INT_HALT (1<<5) +#define CA91CX42_DGCS_INT_DONE (1<<3) +#define CA91CX42_DGCS_INT_LERR (1<<2) +#define CA91CX42_DGCS_INT_VERR (1<<1) +#define CA91CX42_DGCS_INT_PERR (1<<0) + /* * PCI Interrupt Enable Register * offset 300 From 21e0cf6d2e59e19f77096e73d83157734e7f7782 Mon Sep 17 00:00:00 2001 From: Martyn Welch Date: Thu, 18 Feb 2010 15:13:32 +0000 Subject: [PATCH 293/367] Staging: vme: Correct ca91cx42 resource handling The ca91cx42 driver currently incorrectly handles master windows, setting and retrieving the sizing parameters incorrectly. Also, in the slave window handling, it uses an incorrectly set variable. Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vme/bridges/vme_ca91cx42.c | 25 +++++++++++++--------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c index eddf071df40f..0348cc847302 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.c +++ b/drivers/staging/vme/bridges/vme_ca91cx42.c @@ -337,7 +337,7 @@ int ca91cx42_slave_set(struct vme_slave_resource *image, int enabled, unsigned long long vme_base, unsigned long long size, dma_addr_t pci_base, vme_address_t aspace, vme_cycle_t cycle) { - unsigned int i, addr = 0, granularity = 0; + unsigned int i, addr = 0, granularity; unsigned int temp_ctl = 0; unsigned int vme_bound, pci_offset; struct ca91cx42_driver *bridge; @@ -376,7 +376,7 @@ int ca91cx42_slave_set(struct vme_slave_resource *image, int enabled, * Bound address is a valid address for the window, adjust * accordingly */ - vme_bound = vme_base + size - granularity; + vme_bound = vme_base + size; pci_offset = pci_base - vme_base; /* XXX Need to check that vme_base, vme_bound and pci_offset aren't @@ -609,20 +609,27 @@ int ca91cx42_master_set(struct vme_master_resource *image, int enabled, vme_address_t aspace, vme_cycle_t cycle, vme_width_t dwidth) { int retval = 0; - unsigned int i; + unsigned int i, granularity = 0; unsigned int temp_ctl = 0; unsigned long long pci_bound, vme_offset, pci_base; struct ca91cx42_driver *bridge; bridge = image->parent->driver_priv; + i = image->number; + + if ((i == 0) || (i == 4)) + granularity = 0x1000; + else + granularity = 0x10000; + /* Verify input data */ - if (vme_base & 0xFFF) { + if (vme_base & (granularity - 1)) { printk(KERN_ERR "Invalid VME Window alignment\n"); retval = -EINVAL; goto err_window; } - if (size & 0xFFF) { + if (size & (granularity - 1)) { printk(KERN_ERR "Invalid VME Window alignment\n"); retval = -EINVAL; goto err_window; @@ -652,11 +659,9 @@ int ca91cx42_master_set(struct vme_master_resource *image, int enabled, * Bound address is a valid address for the window, adjust * according to window granularity. */ - pci_bound = pci_base + (size - 0x1000); + pci_bound = pci_base + size; vme_offset = vme_base - pci_base; - i = image->number; - /* Disable while we are mucking around */ temp_ctl = ioread32(bridge->base + CA91CX42_LSI_CTL[i]); temp_ctl &= ~CA91CX42_LSI_CTL_EN; @@ -779,7 +784,7 @@ int __ca91cx42_master_get(struct vme_master_resource *image, int *enabled, pci_bound = ioread32(bridge->base + CA91CX42_LSI_BD[i]); *vme_base = pci_base + vme_offset; - *size = (pci_bound - pci_base) + 0x1000; + *size = (unsigned long long)(pci_bound - pci_base); *enabled = 0; *aspace = 0; @@ -872,7 +877,7 @@ int ca91cx42_master_get(struct vme_master_resource *image, int *enabled, ssize_t ca91cx42_master_read(struct vme_master_resource *image, void *buf, size_t count, loff_t offset) { - int retval; + ssize_t retval; spin_lock(&(image->lock)); From 04e10e15f9509d08c5e2194ea2ae680c013d5b63 Mon Sep 17 00:00:00 2001 From: Martyn Welch Date: Thu, 18 Feb 2010 15:13:38 +0000 Subject: [PATCH 294/367] Staging: vme: Add ca91cx42 rmw support Add support for Master Read-Modify-Write cycles on the ca91cx42. Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vme/TODO | 1 - drivers/staging/vme/bridges/vme_ca91cx42.c | 138 ++++++++------------- drivers/staging/vme/bridges/vme_ca91cx42.h | 10 ++ 3 files changed, 64 insertions(+), 85 deletions(-) diff --git a/drivers/staging/vme/TODO b/drivers/staging/vme/TODO index f0dba3e4104d..82c222b4a146 100644 --- a/drivers/staging/vme/TODO +++ b/drivers/staging/vme/TODO @@ -56,7 +56,6 @@ Tempe (tsi148) Universe II (ca91c142) ---------------------- -- RMW transactions unsupported. - Mailboxes unsupported. - Error Detection. - Control of prefetch size, threshold. diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c index 0348cc847302..1edfa442d53b 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.c +++ b/drivers/staging/vme/bridges/vme_ca91cx42.c @@ -904,6 +904,60 @@ ssize_t ca91cx42_master_write(struct vme_master_resource *image, void *buf, return retval; } +unsigned int ca91cx42_master_rmw(struct vme_master_resource *image, + unsigned int mask, unsigned int compare, unsigned int swap, + loff_t offset) +{ + u32 pci_addr, result; + int i; + struct ca91cx42_driver *bridge; + struct device *dev; + + bridge = image->parent->driver_priv; + dev = image->parent->parent; + + /* Find the PCI address that maps to the desired VME address */ + i = image->number; + + /* Locking as we can only do one of these at a time */ + mutex_lock(&(bridge->vme_rmw)); + + /* Lock image */ + spin_lock(&(image->lock)); + + pci_addr = (u32)image->kern_base + offset; + + /* Address must be 4-byte aligned */ + if (pci_addr & 0x3) { + dev_err(dev, "RMW Address not 4-byte aligned\n"); + return -EINVAL; + } + + /* Ensure RMW Disabled whilst configuring */ + iowrite32(0, bridge->base + SCYC_CTL); + + /* Configure registers */ + iowrite32(mask, bridge->base + SCYC_EN); + iowrite32(compare, bridge->base + SCYC_CMP); + iowrite32(swap, bridge->base + SCYC_SWP); + iowrite32(pci_addr, bridge->base + SCYC_ADDR); + + /* Enable RMW */ + iowrite32(CA91CX42_SCYC_CTL_CYC_RMW, bridge->base + SCYC_CTL); + + /* Kick process off with a read to the required address. */ + result = ioread32(image->kern_base + offset); + + /* Disable RMW */ + iowrite32(0, bridge->base + SCYC_CTL); + + spin_unlock(&(image->lock)); + + mutex_unlock(&(bridge->vme_rmw)); + + return result; +} + int ca91cx42_dma_list_add(struct vme_dma_list *list, struct vme_dma_attr *src, struct vme_dma_attr *dest, size_t count) { @@ -1640,9 +1694,7 @@ static int ca91cx42_probe(struct pci_dev *pdev, const struct pci_device_id *id) ca91cx42_bridge->master_set = ca91cx42_master_set; ca91cx42_bridge->master_read = ca91cx42_master_read; ca91cx42_bridge->master_write = ca91cx42_master_write; -#if 0 ca91cx42_bridge->master_rmw = ca91cx42_master_rmw; -#endif ca91cx42_bridge->dma_list_add = ca91cx42_dma_list_add; ca91cx42_bridge->dma_list_exec = ca91cx42_dma_list_exec; ca91cx42_bridge->dma_list_empty = ca91cx42_dma_list_empty; @@ -1832,88 +1884,6 @@ module_exit(ca91cx42_exit); #if 0 -int ca91cx42_master_rmw(vmeRmwCfg_t *vmeRmw) -{ - int temp_ctl = 0; - int tempBS = 0; - int tempBD = 0; - int tempTO = 0; - int vmeBS = 0; - int vmeBD = 0; - int *rmw_pci_data_ptr = NULL; - int *vaDataPtr = NULL; - int i; - vmeOutWindowCfg_t vmeOut; - if (vmeRmw->maxAttempts < 1) { - return -EINVAL; - } - if (vmeRmw->targetAddrU) { - return -EINVAL; - } - /* Find the PCI address that maps to the desired VME address */ - for (i = 0; i < 8; i++) { - temp_ctl = ioread32(bridge->base + - CA91CX42_LSI_CTL[i]); - if ((temp_ctl & 0x80000000) == 0) { - continue; - } - memset(&vmeOut, 0, sizeof(vmeOut)); - vmeOut.windowNbr = i; - ca91cx42_get_out_bound(&vmeOut); - if (vmeOut.addrSpace != vmeRmw->addrSpace) { - continue; - } - tempBS = ioread32(bridge->base + CA91CX42_LSI_BS[i]); - tempBD = ioread32(bridge->base + CA91CX42_LSI_BD[i]); - tempTO = ioread32(bridge->base + CA91CX42_LSI_TO[i]); - vmeBS = tempBS + tempTO; - vmeBD = tempBD + tempTO; - if ((vmeRmw->targetAddr >= vmeBS) && - (vmeRmw->targetAddr < vmeBD)) { - rmw_pci_data_ptr = - (int *)(tempBS + (vmeRmw->targetAddr - vmeBS)); - vaDataPtr = - (int *)(out_image_va[i] + - (vmeRmw->targetAddr - vmeBS)); - break; - } - } - - /* If no window - fail. */ - if (rmw_pci_data_ptr == NULL) { - return -EINVAL; - } - /* Setup the RMW registers. */ - iowrite32(0, bridge->base + SCYC_CTL); - iowrite32(SWIZZLE(vmeRmw->enableMask), bridge->base + SCYC_EN); - iowrite32(SWIZZLE(vmeRmw->compareData), bridge->base + - SCYC_CMP); - iowrite32(SWIZZLE(vmeRmw->swapData), bridge->base + SCYC_SWP); - iowrite32((int)rmw_pci_data_ptr, bridge->base + SCYC_ADDR); - iowrite32(1, bridge->base + SCYC_CTL); - - /* Run the RMW cycle until either success or max attempts. */ - vmeRmw->numAttempts = 1; - while (vmeRmw->numAttempts <= vmeRmw->maxAttempts) { - - if ((ioread32(vaDataPtr) & vmeRmw->enableMask) == - (vmeRmw->swapData & vmeRmw->enableMask)) { - - iowrite32(0, bridge->base + SCYC_CTL); - break; - - } - vmeRmw->numAttempts++; - } - - /* If no success, set num Attempts to be greater than max attempts */ - if (vmeRmw->numAttempts > vmeRmw->maxAttempts) { - vmeRmw->numAttempts = vmeRmw->maxAttempts + 1; - } - - return 0; -} - int ca91cx42_set_arbiter(vmeArbiterCfg_t *vmeArb) { int temp_ctl = 0; diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.h b/drivers/staging/vme/bridges/vme_ca91cx42.h index 221d20f0b925..e72c65b193ec 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.h +++ b/drivers/staging/vme/bridges/vme_ca91cx42.h @@ -316,6 +316,16 @@ static const int CA91CX42_VSI_TO[] = { VSI0_TO, VSI1_TO, VSI2_TO, VSI3_TO, #define CA91CX42_LSI_CTL_VCT_MBLT (1<<8) #define CA91CX42_LSI_CTL_LAS (1<<0) +/* + * SCYC_CTL Register + * offset 178 + */ +#define CA91CX42_SCYC_CTL_LAS_PCIMEM 0 +#define CA91CX42_SCYC_CTL_LAS_PCIIO (1<<2) + +#define CA91CX42_SCYC_CTL_CYC_M (3<<0) +#define CA91CX42_SCYC_CTL_CYC_RMW (1<<0) +#define CA91CX42_SCYC_CTL_CYC_ADOH (1<<1) /* * LMISC Register From 25331ba2f8e36abe77211765fa879106cdbc43e6 Mon Sep 17 00:00:00 2001 From: Martyn Welch Date: Thu, 18 Feb 2010 15:13:45 +0000 Subject: [PATCH 295/367] Staging: vme: ca91cx42 slot detection Sort out slot detection on the ca91cx42. Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vme/bridges/vme_ca91cx42.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c index 1edfa442d53b..ecd917986678 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.c +++ b/drivers/staging/vme/bridges/vme_ca91cx42.c @@ -1452,14 +1452,12 @@ static int ca91cx42_crcsr_init(struct vme_bridge *ca91cx42_bridge, bridge = ca91cx42_bridge->driver_priv; -/* XXX We may need to set this somehow as the Universe II does not support - * geographical addressing. - */ -#if 0 - if (vme_slotnum != -1) - iowrite32(vme_slotnum << 27, bridge->base + VCSR_BS); -#endif slot = ca91cx42_slot_get(ca91cx42_bridge); + + /* Write CSR Base Address if slot ID is supplied as a module param */ + if (geoid) + iowrite32(geoid << 27, bridge->base + VCSR_BS); + dev_info(&pdev->dev, "CR/CSR Offset: %d\n", slot); if (slot == 0) { dev_err(&pdev->dev, "Slot number is unset, not configuring " @@ -1714,10 +1712,6 @@ static int ca91cx42_probe(struct pci_dev *pdev, const struct pci_device_id *id) if (ca91cx42_crcsr_init(ca91cx42_bridge, pdev)) { dev_err(&pdev->dev, "CR/CSR configuration failed.\n"); - retval = -EINVAL; -#if 0 - goto err_crcsr; -#endif } /* Need to save ca91cx42_bridge pointer locally in link list for use in @@ -1736,9 +1730,6 @@ static int ca91cx42_probe(struct pci_dev *pdev, const struct pci_device_id *id) vme_unregister_bridge(ca91cx42_bridge); err_reg: ca91cx42_crcsr_exit(ca91cx42_bridge, pdev); -#if 0 -err_crcsr: -#endif err_lm: /* resources are stored in link list */ list_for_each(pos, &(ca91cx42_bridge->lm_resources)) { From bb9ea89ec8a3d80a835d53afc388ad5f67fd3cb3 Mon Sep 17 00:00:00 2001 From: Martyn Welch Date: Thu, 18 Feb 2010 16:22:13 +0000 Subject: [PATCH 296/367] Staging: vme: Remove legacy unsupported code Remove the code from the drivers that we are not going to implement before submitting for review. Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vme/bridges/vme_ca91cx42.c | 150 +-------- drivers/staging/vme/bridges/vme_tsi148.c | 351 +-------------------- drivers/staging/vme/vme.c | 4 - drivers/staging/vme/vme_bridge.h | 58 ---- 4 files changed, 4 insertions(+), 559 deletions(-) diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c index ecd917986678..2795ff2411e0 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.c +++ b/drivers/staging/vme/bridges/vme_ca91cx42.c @@ -93,21 +93,6 @@ static u32 ca91cx42_IACK_irqhandler(struct ca91cx42_driver *bridge) return CA91CX42_LINT_SW_IACK; } -#if 0 -int ca91cx42_bus_error_chk(int clrflag) -{ - int tmp; - tmp = ioread32(bridge->base + PCI_COMMAND); - if (tmp & 0x08000000) { /* S_TA is Set */ - if (clrflag) - iowrite32(tmp | 0x08000000, - bridge->base + PCI_COMMAND); - return 1; - } - return 0; -} -#endif - static u32 ca91cx42_VERR_irqhandler(struct ca91cx42_driver *bridge) { int val; @@ -379,10 +364,6 @@ int ca91cx42_slave_set(struct vme_slave_resource *image, int enabled, vme_bound = vme_base + size; pci_offset = pci_base - vme_base; - /* XXX Need to check that vme_base, vme_bound and pci_offset aren't - * too big for registers - */ - if ((i == 0) || (i == 4)) granularity = 0x1000; else @@ -411,18 +392,6 @@ int ca91cx42_slave_set(struct vme_slave_resource *image, int enabled, iowrite32(vme_bound, bridge->base + CA91CX42_VSI_BD[i]); iowrite32(pci_offset, bridge->base + CA91CX42_VSI_TO[i]); -/* XXX Prefetch stuff currently unsupported */ -#if 0 - if (vmeIn->wrPostEnable) - temp_ctl |= CA91CX42_VSI_CTL_PWEN; - if (vmeIn->prefetchEnable) - temp_ctl |= CA91CX42_VSI_CTL_PREN; - if (vmeIn->rmwLock) - temp_ctl |= CA91CX42_VSI_CTL_LLRMW; - if (vmeIn->data64BitCapable) - temp_ctl |= CA91CX42_VSI_CTL_LD64EN; -#endif - /* Setup address space */ temp_ctl &= ~CA91CX42_VSI_CTL_VAS_M; temp_ctl |= addr; @@ -637,9 +606,6 @@ int ca91cx42_master_set(struct vme_master_resource *image, int enabled, spin_lock(&(image->lock)); - /* XXX We should do this much later, so that we can exit without - * needing to redo the mapping... - */ /* * Let's allocate the resource here rather than further up the stack as * it avoids pushing loads of bus dependant stuff up the stack @@ -667,12 +633,6 @@ int ca91cx42_master_set(struct vme_master_resource *image, int enabled, temp_ctl &= ~CA91CX42_LSI_CTL_EN; iowrite32(temp_ctl, bridge->base + CA91CX42_LSI_CTL[i]); -/* XXX Prefetch stuff currently unsupported */ -#if 0 - if (vmeOut->wrPostEnable) - temp_ctl |= 0x40000000; -#endif - /* Setup cycle types */ temp_ctl &= ~CA91CX42_LSI_CTL_VCT_M; if (cycle & VME_BLT) @@ -849,12 +809,6 @@ int __ca91cx42_master_get(struct vme_master_resource *image, int *enabled, break; } -/* XXX Prefetch stuff currently unsupported */ -#if 0 - if (ctl & 0x40000000) - vmeOut->wrPostEnable = 1; -#endif - return 0; } @@ -1812,9 +1766,9 @@ void ca91cx42_remove(struct pci_dev *pdev) iowrite32(0x00F00000, bridge->base + VSI7_CTL); vme_unregister_bridge(ca91cx42_bridge); -#if 0 - ca91cx42_crcsr_exit(pdev); -#endif + + ca91cx42_crcsr_exit(ca91cx42_bridge, pdev); + /* resources are stored in link list */ list_for_each(pos, &(ca91cx42_bridge->lm_resources)) { lm = list_entry(pos, struct vme_lm_resource, list); @@ -1868,101 +1822,3 @@ MODULE_LICENSE("GPL"); module_init(ca91cx42_init); module_exit(ca91cx42_exit); - -/*---------------------------------------------------------------------------- - * STAGING - *--------------------------------------------------------------------------*/ - -#if 0 - -int ca91cx42_set_arbiter(vmeArbiterCfg_t *vmeArb) -{ - int temp_ctl = 0; - int vbto = 0; - - temp_ctl = ioread32(bridge->base + MISC_CTL); - temp_ctl &= 0x00FFFFFF; - - if (vmeArb->globalTimeoutTimer == 0xFFFFFFFF) { - vbto = 7; - } else if (vmeArb->globalTimeoutTimer > 1024) { - return -EINVAL; - } else if (vmeArb->globalTimeoutTimer == 0) { - vbto = 0; - } else { - vbto = 1; - while ((16 * (1 << (vbto - 1))) < vmeArb->globalTimeoutTimer) - vbto += 1; - } - temp_ctl |= (vbto << 28); - - if (vmeArb->arbiterMode == VME_PRIORITY_MODE) - temp_ctl |= 1 << 26; - - if (vmeArb->arbiterTimeoutFlag) - temp_ctl |= 2 << 24; - - iowrite32(temp_ctl, bridge->base + MISC_CTL); - return 0; -} - -int ca91cx42_get_arbiter(vmeArbiterCfg_t *vmeArb) -{ - int temp_ctl = 0; - int vbto = 0; - - temp_ctl = ioread32(bridge->base + MISC_CTL); - - vbto = (temp_ctl >> 28) & 0xF; - if (vbto != 0) - vmeArb->globalTimeoutTimer = (16 * (1 << (vbto - 1))); - - if (temp_ctl & (1 << 26)) - vmeArb->arbiterMode = VME_PRIORITY_MODE; - else - vmeArb->arbiterMode = VME_R_ROBIN_MODE; - - if (temp_ctl & (3 << 24)) - vmeArb->arbiterTimeoutFlag = 1; - - return 0; -} - -int ca91cx42_set_requestor(vmeRequesterCfg_t *vmeReq) -{ - int temp_ctl = 0; - - temp_ctl = ioread32(bridge->base + MAST_CTL); - temp_ctl &= 0xFF0FFFFF; - - if (vmeReq->releaseMode == 1) - temp_ctl |= (1 << 20); - - if (vmeReq->fairMode == 1) - temp_ctl |= (1 << 21); - - temp_ctl |= (vmeReq->requestLevel << 22); - - iowrite32(temp_ctl, bridge->base + MAST_CTL); - return 0; -} - -int ca91cx42_get_requestor(vmeRequesterCfg_t *vmeReq) -{ - int temp_ctl = 0; - - temp_ctl = ioread32(bridge->base + MAST_CTL); - - if (temp_ctl & (1 << 20)) - vmeReq->releaseMode = 1; - - if (temp_ctl & (1 << 21)) - vmeReq->fairMode = 1; - - vmeReq->requestLevel = (temp_ctl & 0xC00000) >> 22; - - return 0; -} - - -#endif diff --git a/drivers/staging/vme/bridges/vme_tsi148.c b/drivers/staging/vme/bridges/vme_tsi148.c index a6f853a3dc24..faf652edb70f 100644 --- a/drivers/staging/vme/bridges/vme_tsi148.c +++ b/drivers/staging/vme/bridges/vme_tsi148.c @@ -571,16 +571,6 @@ int tsi148_slave_set(struct vme_slave_resource *image, int enabled, bridge = image->parent->driver_priv; -#if 0 - printk("Set slave image %d to:\n", image->number); - printk("\tEnabled: %s\n", (enabled == 1)? "yes" : "no"); - printk("\tVME Base:0x%llx\n", vme_base); - printk("\tWindow Size:0x%llx\n", size); - printk("\tPCI Base:0x%lx\n", (unsigned long)pci_base); - printk("\tAddress Space:0x%x\n", aspace); - printk("\tTransfer Cycle Properties:0x%x\n", cycle); -#endif - i = image->number; switch (aspace) { @@ -636,11 +626,6 @@ int tsi148_slave_set(struct vme_slave_resource *image, int enabled, return -EINVAL; } -#if 0 - printk("\tVME Bound:0x%llx\n", vme_bound); - printk("\tPCI Offset:0x%llx\n", pci_offset); -#endif - /* Disable while we are mucking around */ temp_ctl = ioread32be(bridge->base + TSI148_LCSR_IT[i] + TSI148_LCSR_OFFSET_ITAT); @@ -662,23 +647,6 @@ int tsi148_slave_set(struct vme_slave_resource *image, int enabled, iowrite32be(pci_offset_low, bridge->base + TSI148_LCSR_IT[i] + TSI148_LCSR_OFFSET_ITOFL); -/* XXX Prefetch stuff currently unsupported */ -#if 0 - - for (x = 0; x < 4; x++) { - if ((64 << x) >= vmeIn->prefetchSize) { - break; - } - } - if (x == 4) - x--; - temp_ctl |= (x << 16); - - if (vmeIn->prefetchThreshold) - if (vmeIn->prefetchThreshold) - temp_ctl |= 0x40000; -#endif - /* Setup 2eSST speeds */ temp_ctl &= ~TSI148_LCSR_ITAT_2eSSTM_M; switch (cycle & (VME_2eSST160 | VME_2eSST267 | VME_2eSST320)) { @@ -735,8 +703,6 @@ int tsi148_slave_set(struct vme_slave_resource *image, int enabled, /* * Get slave window configuration. - * - * XXX Prefetch currently unsupported. */ int tsi148_slave_get(struct vme_slave_resource *image, int *enabled, unsigned long long *vme_base, unsigned long long *size, @@ -1030,20 +996,6 @@ int tsi148_master_set( struct vme_master_resource *image, int enabled, iowrite32be(temp_ctl, bridge->base + TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTAT); -/* XXX Prefetch stuff currently unsupported */ -#if 0 - if (vmeOut->prefetchEnable) { - temp_ctl |= 0x40000; - for (x = 0; x < 4; x++) { - if ((2 << x) >= vmeOut->prefetchSize) - break; - } - if (x == 4) - x = 3; - temp_ctl |= (x << 16); - } -#endif - /* Setup 2eSST speeds */ temp_ctl &= ~TSI148_LCSR_OTAT_2eSSTM_M; switch (cycle & (VME_2eSST160 | VME_2eSST267 | VME_2eSST320)) { @@ -1156,12 +1108,6 @@ int tsi148_master_set( struct vme_master_resource *image, int enabled, iowrite32be(vme_offset_low, bridge->base + TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTOFL); -/* XXX We need to deal with OTBS */ -#if 0 - iowrite32be(vmeOut->bcastSelect2esst, bridge->base + - TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTBS); -#endif - /* Write ctl reg without enable */ iowrite32be(temp_ctl, bridge->base + TSI148_LCSR_OT[i] + TSI148_LCSR_OFFSET_OTAT); @@ -1669,8 +1615,6 @@ static int tsi148_dma_set_vme_dest_attributes(u32 *attr, vme_address_t aspace, /* * Add a link list descriptor to the list - * - * XXX Need to handle 2eSST Broadcast select bits */ int tsi148_dma_list_add (struct vme_dma_list *list, struct vme_dma_attr *src, struct vme_dma_attr *dest, size_t count) @@ -1683,7 +1627,7 @@ int tsi148_dma_list_add (struct vme_dma_list *list, struct vme_dma_attr *src, dma_addr_t desc_ptr; int retval = 0; - /* XXX descriptor must be aligned on 64-bit boundaries */ + /* Descriptor must be aligned on 64-bit boundaries */ entry = (struct tsi148_dma_entry *)kmalloc( sizeof(struct tsi148_dma_entry), GFP_KERNEL); if (entry == NULL) { @@ -1850,9 +1794,6 @@ int tsi148_dma_list_exec(struct vme_dma_list *list) dma_addr_t bus_addr; u32 bus_addr_high, bus_addr_low; u32 val, dctlreg = 0; -#if 0 - int x; -#endif struct tsi148_driver *bridge; ctrlr = list->parent; @@ -1875,48 +1816,6 @@ int tsi148_dma_list_exec(struct vme_dma_list *list) } else { list_add(&(list->list), &(ctrlr->running)); } -#if 0 - /* XXX Still todo */ - for (x = 0; x < 8; x++) { /* vme block size */ - if ((32 << x) >= vmeDma->maxVmeBlockSize) { - break; - } - } - if (x == 8) - x = 7; - dctlreg |= (x << 12); - - for (x = 0; x < 8; x++) { /* pci block size */ - if ((32 << x) >= vmeDma->maxPciBlockSize) { - break; - } - } - if (x == 8) - x = 7; - dctlreg |= (x << 4); - - if (vmeDma->vmeBackOffTimer) { - for (x = 1; x < 8; x++) { /* vme timer */ - if ((1 << (x - 1)) >= vmeDma->vmeBackOffTimer) { - break; - } - } - if (x == 8) - x = 7; - dctlreg |= (x << 8); - } - - if (vmeDma->pciBackOffTimer) { - for (x = 1; x < 8; x++) { /* pci timer */ - if ((1 << (x - 1)) >= vmeDma->pciBackOffTimer) { - break; - } - } - if (x == 8) - x = 7; - dctlreg |= (x << 0); - } -#endif /* Get first bus address and write into registers */ entry = list_first_entry(&(list->entries), struct tsi148_dma_entry, @@ -2738,251 +2637,3 @@ MODULE_LICENSE("GPL"); module_init(tsi148_init); module_exit(tsi148_exit); - -/*---------------------------------------------------------------------------- - * STAGING - *--------------------------------------------------------------------------*/ - -#if 0 -/* - * Direct Mode DMA transfer - * - * XXX Not looking at direct mode for now, we can always use link list mode - * with a single entry. - */ -int tsi148_dma_run(struct vme_dma_resource *resource, struct vme_dma_attr src, - struct vme_dma_attr dest, size_t count) -{ - u32 dctlreg = 0; - unsigned int tmp; - int val; - int channel, x; - struct vmeDmaPacket *cur_dma; - struct tsi148_dma_descriptor *dmaLL; - - /* direct mode */ - dctlreg = 0x800000; - - for (x = 0; x < 8; x++) { /* vme block size */ - if ((32 << x) >= vmeDma->maxVmeBlockSize) { - break; - } - } - if (x == 8) - x = 7; - dctlreg |= (x << 12); - - for (x = 0; x < 8; x++) { /* pci block size */ - if ((32 << x) >= vmeDma->maxPciBlockSize) { - break; - } - } - if (x == 8) - x = 7; - dctlreg |= (x << 4); - - if (vmeDma->vmeBackOffTimer) { - for (x = 1; x < 8; x++) { /* vme timer */ - if ((1 << (x - 1)) >= vmeDma->vmeBackOffTimer) { - break; - } - } - if (x == 8) - x = 7; - dctlreg |= (x << 8); - } - - if (vmeDma->pciBackOffTimer) { - for (x = 1; x < 8; x++) { /* pci timer */ - if ((1 << (x - 1)) >= vmeDma->pciBackOffTimer) { - break; - } - } - if (x == 8) - x = 7; - dctlreg |= (x << 0); - } - - /* Program registers for DMA transfer */ - iowrite32be(dmaLL->dsau, tsi148_bridge->driver_priv->base + - TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DSAU); - iowrite32be(dmaLL->dsal, tsi148_bridge->driver_priv->base + - TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DSAL); - iowrite32be(dmaLL->ddau, tsi148_bridge->driver_priv->base + - TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DDAU); - iowrite32be(dmaLL->ddal, tsi148_bridge->driver_priv->base + - TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DDAL); - iowrite32be(dmaLL->dsat, tsi148_bridge->driver_priv->base + - TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DSAT); - iowrite32be(dmaLL->ddat, tsi148_bridge->driver_priv->base + - TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DDAT); - iowrite32be(dmaLL->dcnt, tsi148_bridge->driver_priv->base + - TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DCNT); - iowrite32be(dmaLL->ddbs, tsi148_bridge->driver_priv->base + - TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DDBS); - - /* Start the operation */ - iowrite32be(dctlreg | 0x2000000, tsi148_bridge->driver_priv->base + - TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DCTL); - - tmp = ioread32be(tsi148_bridge->driver_priv->base + - TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DSTA); - wait_event_interruptible(dma_queue[channel], (tmp & 0x1000000) == 0); - - /* - * Read status register, we should probably do this in some error - * handler rather than here so that we can be sure we haven't kicked off - * another DMA transfer. - */ - val = ioread32be(tsi148_bridge->driver_priv->base + - TSI148_LCSR_DMA[channel] + TSI148_LCSR_OFFSET_DSTA); - - vmeDma->vmeDmaStatus = 0; - if (val & 0x10000000) { - printk(KERN_ERR - "DMA Error in DMA_tempe_irqhandler DSTA=%08X\n", - val); - vmeDma->vmeDmaStatus = val; - - } - return (0); -} -#endif - -#if 0 - -/* Global VME controller information */ -struct pci_dev *vme_pci_dev; - -/* - * Set the VME bus arbiter with the requested attributes - */ -int tempe_set_arbiter(vmeArbiterCfg_t * vmeArb) -{ - int temp_ctl = 0; - int gto = 0; - - temp_ctl = ioread32be(tsi148_bridge->driver_priv->base + - TSI148_LCSR_VCTRL); - temp_ctl &= 0xFFEFFF00; - - if (vmeArb->globalTimeoutTimer == 0xFFFFFFFF) { - gto = 8; - } else if (vmeArb->globalTimeoutTimer > 2048) { - return (-EINVAL); - } else if (vmeArb->globalTimeoutTimer == 0) { - gto = 0; - } else { - gto = 1; - while ((16 * (1 << (gto - 1))) < vmeArb->globalTimeoutTimer) { - gto += 1; - } - } - temp_ctl |= gto; - - if (vmeArb->arbiterMode != VME_PRIORITY_MODE) { - temp_ctl |= 1 << 6; - } - - if (vmeArb->arbiterTimeoutFlag) { - temp_ctl |= 1 << 7; - } - - if (vmeArb->noEarlyReleaseFlag) { - temp_ctl |= 1 << 20; - } - iowrite32be(temp_ctl, tsi148_bridge->driver_priv->base + - TSI148_LCSR_VCTRL); - - return (0); -} - -/* - * Return the attributes of the VME bus arbiter. - */ -int tempe_get_arbiter(vmeArbiterCfg_t * vmeArb) -{ - int temp_ctl = 0; - int gto = 0; - - - temp_ctl = ioread32be(tsi148_bridge->driver_priv->base + - TSI148_LCSR_VCTRL); - - gto = temp_ctl & 0xF; - if (gto != 0) { - vmeArb->globalTimeoutTimer = (16 * (1 << (gto - 1))); - } - - if (temp_ctl & (1 << 6)) { - vmeArb->arbiterMode = VME_R_ROBIN_MODE; - } else { - vmeArb->arbiterMode = VME_PRIORITY_MODE; - } - - if (temp_ctl & (1 << 7)) { - vmeArb->arbiterTimeoutFlag = 1; - } - - if (temp_ctl & (1 << 20)) { - vmeArb->noEarlyReleaseFlag = 1; - } - - return (0); -} - -/* - * Set the VME bus requestor with the requested attributes - */ -int tempe_set_requestor(vmeRequesterCfg_t * vmeReq) -{ - int temp_ctl = 0; - - temp_ctl = ioread32be(tsi148_bridge->driver_priv->base + - TSI148_LCSR_VMCTRL); - temp_ctl &= 0xFFFF0000; - - if (vmeReq->releaseMode == 1) { - temp_ctl |= (1 << 3); - } - - if (vmeReq->fairMode == 1) { - temp_ctl |= (1 << 2); - } - - temp_ctl |= (vmeReq->timeonTimeoutTimer & 7) << 8; - temp_ctl |= (vmeReq->timeoffTimeoutTimer & 7) << 12; - temp_ctl |= vmeReq->requestLevel; - - iowrite32be(temp_ctl, tsi148_bridge->driver_priv->base + - TSI148_LCSR_VMCTRL); - return (0); -} - -/* - * Return the attributes of the VME bus requestor - */ -int tempe_get_requestor(vmeRequesterCfg_t * vmeReq) -{ - int temp_ctl = 0; - - temp_ctl = ioread32be(tsi148_bridge->driver_priv->base + - TSI148_LCSR_VMCTRL); - - if (temp_ctl & 0x18) { - vmeReq->releaseMode = 1; - } - - if (temp_ctl & (1 << 2)) { - vmeReq->fairMode = 1; - } - - vmeReq->requestLevel = temp_ctl & 3; - vmeReq->timeonTimeoutTimer = (temp_ctl >> 8) & 7; - vmeReq->timeoffTimeoutTimer = (temp_ctl >> 12) & 7; - - return (0); -} - - -#endif diff --git a/drivers/staging/vme/vme.c b/drivers/staging/vme/vme.c index ea2eee3f0834..d6d84ebeeec0 100644 --- a/drivers/staging/vme/vme.c +++ b/drivers/staging/vme/vme.c @@ -825,8 +825,6 @@ struct vme_dma_attr *vme_dma_vme_attribute(unsigned long long address, struct vme_dma_attr *attributes; struct vme_dma_vme *vme_attr; - /* XXX Run some sanity checks here */ - attributes = kmalloc( sizeof(struct vme_dma_attr), GFP_KERNEL); if (attributes == NULL) { @@ -1191,8 +1189,6 @@ int vme_lm_set(struct vme_resource *resource, unsigned long long lm_base, return -EINVAL; } - /* XXX Check parameters */ - return bridge->lm_set(lm, lm_base, aspace, cycle); } EXPORT_SYMBOL(vme_lm_set); diff --git a/drivers/staging/vme/vme_bridge.h b/drivers/staging/vme/vme_bridge.h index a2cfc1014726..b653ec02e1fc 100644 --- a/drivers/staging/vme/vme_bridge.h +++ b/drivers/staging/vme/vme_bridge.h @@ -165,16 +165,6 @@ struct vme_bridge { /* CR/CSR space functions */ int (*slot_get) (struct vme_bridge *); - /* Use standard master read and write functions to access CR/CSR */ - -#if 0 - int (*set_prefetch) (void); - int (*get_prefetch) (void); - int (*set_arbiter) (void); - int (*get_arbiter) (void); - int (*set_requestor) (void); - int (*get_requestor) (void); -#endif }; void vme_irq_handler(struct vme_bridge *, int, int); @@ -183,51 +173,3 @@ int vme_register_bridge(struct vme_bridge *); void vme_unregister_bridge(struct vme_bridge *); #endif /* _VME_BRIDGE_H_ */ - -#if 0 -/* - * VMEbus GET INFO Arg Structure - */ -struct vmeInfoCfg { - int vmeSlotNum; /* VME slot number of interest */ - int boardResponded; /* Board responded */ - char sysConFlag; /* System controller flag */ - int vmeControllerID; /* Vendor/device ID of VME bridge */ - int vmeControllerRev; /* Revision of VME bridge */ - char osName[8]; /* Name of OS e.g. "Linux" */ - int vmeSharedDataValid; /* Validity of data struct */ - int vmeDriverRev; /* Revision of VME driver */ - unsigned int vmeAddrHi[8]; /* Address on VME bus */ - unsigned int vmeAddrLo[8]; /* Address on VME bus */ - unsigned int vmeSize[8]; /* Size on VME bus */ - unsigned int vmeAm[8]; /* Address modifier on VME bus */ - int reserved; /* For future use */ -}; -typedef struct vmeInfoCfg vmeInfoCfg_t; - -/* - * VMEbus Requester Arg Structure - */ -struct vmeRequesterCfg { - int requestLevel; /* Requester Bus Request Level */ - char fairMode; /* Requester Fairness Mode Indicator */ - int releaseMode; /* Requester Bus Release Mode */ - int timeonTimeoutTimer; /* Master Time-on Time-out Timer */ - int timeoffTimeoutTimer; /* Master Time-off Time-out Timer */ - int reserved; /* For future use */ -}; -typedef struct vmeRequesterCfg vmeRequesterCfg_t; - -/* - * VMEbus Arbiter Arg Structure - */ -struct vmeArbiterCfg { - vme_arbitration_t arbiterMode; /* Arbitration Scheduling Algorithm */ - char arbiterTimeoutFlag; /* Arbiter Time-out Timer Indicator */ - int globalTimeoutTimer; /* VMEbus Global Time-out Timer */ - char noEarlyReleaseFlag; /* No Early Release on BBUSY */ - int reserved; /* For future use */ -}; -typedef struct vmeArbiterCfg vmeArbiterCfg_t; - -#endif From 877de4b4866f1cc0a25a4d67d3927304556f5d1f Mon Sep 17 00:00:00 2001 From: Arthur Benilov Date: Tue, 16 Feb 2010 15:40:30 +0100 Subject: [PATCH 297/367] Staging: vme: llseek support in user driver Provide vme_user_llseek() implementation. Signed-off-by: Arthur Benilov Signed-off-by: Vincent Bossier Acked-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vme/devices/vme_user.c | 35 ++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c index 48d46cadb13f..ddecbe5105b9 100644 --- a/drivers/staging/vme/devices/vme_user.c +++ b/drivers/staging/vme/devices/vme_user.c @@ -400,8 +400,39 @@ static ssize_t vme_user_write(struct file *file, const char *buf, size_t count, static loff_t vme_user_llseek(struct file *file, loff_t off, int whence) { - printk(KERN_ERR "Llseek currently incomplete\n"); - return -EINVAL; + loff_t absolute = -1; + unsigned int minor = MINOR(file->f_dentry->d_inode->i_rdev); + size_t image_size; + + down(&image[minor].sem); + image_size = vme_get_size(image[minor].resource); + + switch (whence) { + case SEEK_SET: + absolute = off; + break; + case SEEK_CUR: + absolute = file->f_pos + off; + break; + case SEEK_END: + absolute = image_size + off; + break; + default: + up(&image[minor].sem); + return -EINVAL; + break; + } + + if ((absolute < 0) || (absolute >= image_size)) { + up(&image[minor].sem); + return -EINVAL; + } + + file->f_pos = absolute; + + up(&image[minor].sem); + + return absolute; } /* From 5188d74cc4597a63a0907b8996ca0a2d36f1b970 Mon Sep 17 00:00:00 2001 From: Arthur Benilov Date: Tue, 16 Feb 2010 15:40:58 +0100 Subject: [PATCH 298/367] Staging: vme: Use A24 when requesting slave resource When requesting slave resources A16 addressing mode flag is used to find available windows. Since the ca91cx42 bridge only supports two A16 slave windows but four are requested, the driver fails to initialize. The flag has been changed to A24, which is supported by all slave windows. Signed-off-by: Arthur Benilov Signed-off-by: Vincent Bossier Acked-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vme/devices/vme_user.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c index ddecbe5105b9..0d404f1a27f4 100644 --- a/drivers/staging/vme/devices/vme_user.c +++ b/drivers/staging/vme/devices/vme_user.c @@ -701,8 +701,12 @@ static int __init vme_user_probe(struct device *dev, int cur_bus, int cur_slot) /* Request slave resources and allocate buffers (128kB wide) */ for (i = SLAVE_MINOR; i < (SLAVE_MAX + 1); i++) { /* XXX Need to properly request attributes */ + /* For ca91cx42 bridge there are only two slave windows + * supporting A16 addressing, so we request A24 supported + * by all windows. + */ image[i].resource = vme_slave_request(vme_user_bridge, - VME_A16, VME_SCT); + VME_A24, VME_SCT); if (image[i].resource == NULL) { printk(KERN_WARNING "Unable to allocate slave " "resource\n"); From 33e920d9ebaddbc9cf51cf6e1de7baa8d7b8d6dd Mon Sep 17 00:00:00 2001 From: Arthur Benilov Date: Tue, 16 Feb 2010 15:41:21 +0100 Subject: [PATCH 299/367] Staging: vme: Allocate memory buffers for master windows For VME device I/O operations on master windows the user driver tends to use kern_buf buffer array which is not allocated. This causes an error when reading from master window device files. Signed-off-by: Arthur Benilov Signed-off-by: Vincent Bossier Acked-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vme/devices/vme_user.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c index 0d404f1a27f4..c60c80fb241d 100644 --- a/drivers/staging/vme/devices/vme_user.c +++ b/drivers/staging/vme/devices/vme_user.c @@ -738,6 +738,14 @@ static int __init vme_user_probe(struct device *dev, int cur_bus, int cur_slot) "resource\n"); goto err_master; } + image[i].size_buf = PCI_BUF_SIZE; + image[i].kern_buf = kmalloc(image[i].size_buf, GFP_KERNEL); + if (image[i].kern_buf == NULL) { + printk(KERN_WARNING "Unable to allocate memory for " + "master window buffers\n"); + err = -ENOMEM; + goto err_master_buf; + } } /* Create sysfs entries - on udev systems this creates the dev files */ @@ -791,6 +799,9 @@ err_sysfs: /* Ensure counter set correcty to unalloc all master windows */ i = MASTER_MAX + 1; +err_master_buf: + for (i = MASTER_MINOR; i < (MASTER_MAX + 1); i++) + kfree(image[i].kern_buf); err_master: while (i > MASTER_MINOR) { i--; @@ -826,6 +837,9 @@ static int __exit vme_user_remove(struct device *dev, int cur_bus, int cur_slot) } class_destroy(vme_user_sysfs_class); + for (i = MASTER_MINOR; i < (MASTER_MAX + 1); i++) + kfree(image[i].kern_buf); + for (i = SLAVE_MINOR; i < (SLAVE_MAX + 1); i++) { vme_slave_set(image[i].resource, 0, 0, 0, 0, VME_A32, 0); vme_slave_free(image[i].resource); From 3c2aabc41da7e9f957bc826363115a54764fb396 Mon Sep 17 00:00:00 2001 From: Arthur Benilov Date: Tue, 16 Feb 2010 15:41:51 +0100 Subject: [PATCH 300/367] Staging: vme: VMIVME-7805 board support VMIVME-7805 board has a special control register that has to be used in order to activate the VME bus access via the Universe II bridge. This control register also handles endianess convertion. Signed-off-by: Arthur Benilov Signed-off-by: Vincent Bossier Acked-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vme/Kconfig | 2 + drivers/staging/vme/Makefile | 1 + drivers/staging/vme/boards/Kconfig | 9 ++ drivers/staging/vme/boards/Makefile | 5 + drivers/staging/vme/boards/vme_vmivme7805.c | 124 ++++++++++++++++++++ drivers/staging/vme/boards/vme_vmivme7805.h | 37 ++++++ 6 files changed, 178 insertions(+) create mode 100644 drivers/staging/vme/boards/Kconfig create mode 100644 drivers/staging/vme/boards/Makefile create mode 100644 drivers/staging/vme/boards/vme_vmivme7805.c create mode 100644 drivers/staging/vme/boards/vme_vmivme7805.h diff --git a/drivers/staging/vme/Kconfig b/drivers/staging/vme/Kconfig index ae628a58b0c6..6411ae51ed3f 100644 --- a/drivers/staging/vme/Kconfig +++ b/drivers/staging/vme/Kconfig @@ -14,4 +14,6 @@ source "drivers/staging/vme/bridges/Kconfig" source "drivers/staging/vme/devices/Kconfig" +source "drivers/staging/vme/boards/Kconfig" + endif # VME diff --git a/drivers/staging/vme/Makefile b/drivers/staging/vme/Makefile index 8c3b90ee5853..b4ea3f8d0a50 100644 --- a/drivers/staging/vme/Makefile +++ b/drivers/staging/vme/Makefile @@ -5,3 +5,4 @@ obj-$(CONFIG_VME_BUS) += vme.o obj-y += bridges/ obj-y += devices/ +obj-y += boards/ diff --git a/drivers/staging/vme/boards/Kconfig b/drivers/staging/vme/boards/Kconfig new file mode 100644 index 000000000000..761631353527 --- /dev/null +++ b/drivers/staging/vme/boards/Kconfig @@ -0,0 +1,9 @@ +comment "VME Board Drivers" + +config VMIVME_7805 + tristate "VMIVME-7805" + help + If you say Y here you get support for the VMIVME-7805 board. + This board has an additional control interface to the Universe II + chip. This driver has to be included if you want to access VME bus + with VMIVME-7805 board. diff --git a/drivers/staging/vme/boards/Makefile b/drivers/staging/vme/boards/Makefile new file mode 100644 index 000000000000..43658340885d --- /dev/null +++ b/drivers/staging/vme/boards/Makefile @@ -0,0 +1,5 @@ +# +# Makefile for the VME board drivers. +# + +obj-$(CONFIG_VMIVME_7805) += vme_vmivme7805.o diff --git a/drivers/staging/vme/boards/vme_vmivme7805.c b/drivers/staging/vme/boards/vme_vmivme7805.c new file mode 100644 index 000000000000..843c9edde555 --- /dev/null +++ b/drivers/staging/vme/boards/vme_vmivme7805.c @@ -0,0 +1,124 @@ +/* + * Support for the VMIVME-7805 board access to the Universe II bridge. + * + * Author: Arthur Benilov + * Copyright 2010 Ion Beam Application, Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "vme_vmivme7805.h" + +static int __init vmic_init(void); +static int vmic_probe(struct pci_dev *, const struct pci_device_id *); +static void vmic_remove(struct pci_dev *); +static void __exit vmic_exit(void); + +/** Base address to access FPGA register */ +static void *vmic_base; + +static char driver_name[] = "vmivme_7805"; + +static struct pci_device_id vmic_ids[] = { + { PCI_DEVICE(PCI_VENDOR_ID_VMIC, PCI_DEVICE_ID_VTIMR) }, + { }, +}; + +static struct pci_driver vmic_driver = { + .name = driver_name, + .id_table = vmic_ids, + .probe = vmic_probe, + .remove = vmic_remove, +}; + +static int __init vmic_init(void) +{ + return pci_register_driver(&vmic_driver); +} + +static int vmic_probe(struct pci_dev *pdev, const struct pci_device_id *id) +{ + int retval; + u32 data; + + /* Enable the device */ + retval = pci_enable_device(pdev); + if (retval) { + dev_err(&pdev->dev, "Unable to enable device\n"); + goto err; + } + + /* Map Registers */ + retval = pci_request_regions(pdev, driver_name); + if (retval) { + dev_err(&pdev->dev, "Unable to reserve resources\n"); + goto err_resource; + } + + /* Map registers in BAR 0 */ + vmic_base = ioremap_nocache(pci_resource_start(pdev, 0), 16); + if (!vmic_base) { + dev_err(&pdev->dev, "Unable to remap CRG region\n"); + retval = -EIO; + goto err_remap; + } + + /* Clear the FPGA VME IF contents */ + iowrite32(0, vmic_base + VME_CONTROL); + + /* Clear any initial BERR */ + data = ioread32(vmic_base + VME_CONTROL) & 0x00000FFF; + data |= BM_VME_CONTROL_BERRST; + iowrite32(data, vmic_base + VME_CONTROL); + + /* Enable the vme interface and byte swapping */ + data = ioread32(vmic_base + VME_CONTROL) & 0x00000FFF; + data = data | BM_VME_CONTROL_MASTER_ENDIAN | + BM_VME_CONTROL_SLAVE_ENDIAN | + BM_VME_CONTROL_ABLE | + BM_VME_CONTROL_BERRI | + BM_VME_CONTROL_BPENA | + BM_VME_CONTROL_VBENA; + iowrite32(data, vmic_base + VME_CONTROL); + + return 0; + +err_remap: + pci_release_regions(pdev); +err_resource: + pci_disable_device(pdev); +err: + return retval; +} + +static void vmic_remove(struct pci_dev *pdev) +{ + iounmap(vmic_base); + pci_release_regions(pdev); + pci_disable_device(pdev); + +} + +static void __exit vmic_exit(void) +{ + pci_unregister_driver(&vmic_driver); +} + +MODULE_DESCRIPTION("VMIVME-7805 board support driver"); +MODULE_AUTHOR("Arthur Benilov "); +MODULE_LICENSE("GPL"); + +module_init(vmic_init); +module_exit(vmic_exit); + diff --git a/drivers/staging/vme/boards/vme_vmivme7805.h b/drivers/staging/vme/boards/vme_vmivme7805.h new file mode 100644 index 000000000000..44c2c449808c --- /dev/null +++ b/drivers/staging/vme/boards/vme_vmivme7805.h @@ -0,0 +1,37 @@ +/* + * vmivme_7805.h + * + * Support for the VMIVME-7805 board access to the Universe II bridge. + * + * Author: Arthur Benilov + * Copyright 2010 Ion Beam Application, Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + + +#ifndef _VMIVME_7805_H +#define _VMIVME_7805_H + +#ifndef PCI_VENDOR_ID_VMIC +#define PCI_VENDOR_ID_VMIC 0x114A +#endif + +#ifndef PCI_DEVICE_ID_VTIMR +#define PCI_DEVICE_ID_VTIMR 0x0004 +#endif + +#define VME_CONTROL 0x0000 +#define BM_VME_CONTROL_MASTER_ENDIAN 0x0001 +#define BM_VME_CONTROL_SLAVE_ENDIAN 0x0002 +#define BM_VME_CONTROL_ABLE 0x0004 +#define BM_VME_CONTROL_BERRI 0x0040 +#define BM_VME_CONTROL_BERRST 0x0080 +#define BM_VME_CONTROL_BPENA 0x0400 +#define BM_VME_CONTROL_VBENA 0x0800 + +#endif /* _VMIVME_7805_H */ + From 9a16a92c11e82a0a80b4847343cfb8b5c54ed6b6 Mon Sep 17 00:00:00 2001 From: Graham M Howe Date: Mon, 15 Feb 2010 10:04:26 +0000 Subject: [PATCH 301/367] Staging: comedi: fix brace and 80 character coding style issue in ni_daq_700.c This is a patch to the ni_daq_700.c file that fixes up brace and 80 character warnings found by the checkpatch.pl tool Signed-off-by: Graham M Howe Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_daq_700.c | 24 ++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c b/drivers/staging/comedi/drivers/ni_daq_700.c index ef5e1183d47d..c9b0395a6103 100644 --- a/drivers/staging/comedi/drivers/ni_daq_700.c +++ b/drivers/staging/comedi/drivers/ni_daq_700.c @@ -76,13 +76,15 @@ struct dio700_board { static const struct dio700_board dio700_boards[] = { { .name = "daqcard-700", - .device_id = 0x4743, /* 0x10b is manufacturer id, 0x4743 is device id */ + /* 0x10b is manufacturer id, 0x4743 is device id */ + .device_id = 0x4743, .bustype = pcmcia_bustype, .have_dio = 1, }, { .name = "ni_daq_700", - .device_id = 0x4743, /* 0x10b is manufacturer id, 0x4743 is device id */ + /* 0x10b is manufacturer id, 0x4743 is device id */ + .device_id = 0x4743, .bustype = pcmcia_bustype, .have_dio = 1, }, @@ -309,11 +311,11 @@ int subdev_700_init(struct comedi_device *dev, struct comedi_subdevice *s, return -ENOMEM; CALLBACK_ARG = arg; - if (cb == NULL) { + if (cb == NULL) CALLBACK_FUNC = subdev_700_cb; - } else { + else CALLBACK_FUNC = cb; - } + s->insn_bits = subdev_700_insn; s->insn_config = subdev_700_insn_config; @@ -345,12 +347,10 @@ int subdev_700_init_irq(struct comedi_device *dev, struct comedi_subdevice *s, void subdev_700_cleanup(struct comedi_device *dev, struct comedi_subdevice *s) { - if (s->private) { - if (subdevpriv->have_irq) { - } + if (s->private) + if (subdevpriv->have_irq) - kfree(s->private); - } + kfree(s->private); } EXPORT_SYMBOL(subdev_700_init); @@ -390,9 +390,9 @@ static int dio700_attach(struct comedi_device *dev, struct comedi_devconfig *it) printk("comedi%d: ni_daq_700: %s, io 0x%lx", dev->minor, thisboard->name, iobase); #ifdef incomplete - if (irq) { + if (irq) printk(", irq %u", irq); - } + #endif printk("\n"); From 77712e5fbe2e47476823f4853d756cc5ad1dfabc Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 18 Feb 2010 17:19:17 +0000 Subject: [PATCH 302/367] Staging: iio: Staticise non-exported functions Staticise a number of functions which aren't exported outside their source files, and also add a __user annotation for the buffer in iio_event_chrdev_read(). Signed-off-by: Mark Brown Acked-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/industrialio-core.c | 14 +++++++------- drivers/staging/iio/trigger_consumer.h | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c index 4ff683a3df31..b456dfc8fe27 100644 --- a/drivers/staging/iio/industrialio-core.c +++ b/drivers/staging/iio/industrialio-core.c @@ -118,7 +118,7 @@ int iio_push_event(struct iio_dev *dev_info, EXPORT_SYMBOL(iio_push_event); /* Generic interrupt line interrupt handler */ -irqreturn_t iio_interrupt_handler(int irq, void *_int_info) +static irqreturn_t iio_interrupt_handler(int irq, void *_int_info) { struct iio_interrupt *int_info = _int_info; struct iio_dev *dev_info = int_info->dev_info; @@ -252,10 +252,10 @@ void iio_remove_event_from_list(struct iio_event_handler_list *el, } EXPORT_SYMBOL(iio_remove_event_from_list); -ssize_t iio_event_chrdev_read(struct file *filep, - char *buf, - size_t count, - loff_t *f_ps) +static ssize_t iio_event_chrdev_read(struct file *filep, + char __user *buf, + size_t count, + loff_t *f_ps) { struct iio_event_interface *ev_int = filep->private_data; struct iio_detected_event_list *el; @@ -313,7 +313,7 @@ error_ret: return ret; } -int iio_event_chrdev_release(struct inode *inode, struct file *filep) +static int iio_event_chrdev_release(struct inode *inode, struct file *filep) { struct iio_handler *hand = iio_cdev_to_handler(inode->i_cdev); struct iio_event_interface *ev_int = hand->private; @@ -335,7 +335,7 @@ int iio_event_chrdev_release(struct inode *inode, struct file *filep) return 0; } -int iio_event_chrdev_open(struct inode *inode, struct file *filep) +static int iio_event_chrdev_open(struct inode *inode, struct file *filep) { struct iio_handler *hand = iio_cdev_to_handler(inode->i_cdev); struct iio_event_interface *ev_int = hand->private; diff --git a/drivers/staging/iio/trigger_consumer.h b/drivers/staging/iio/trigger_consumer.h index a02d70b0d24a..9d52d9637777 100644 --- a/drivers/staging/iio/trigger_consumer.h +++ b/drivers/staging/iio/trigger_consumer.h @@ -27,7 +27,7 @@ int iio_device_unregister_trigger_consumer(struct iio_dev *dev_info); * iio_device_register_trigger_consumer() - set up an iio_dev to use triggers * @dev_info: iio_dev associated with the device that will consume the trigger **/ -int iio_device_register_trigger_consumer(struct iio_dev *dev_info) +static int iio_device_register_trigger_consumer(struct iio_dev *dev_info) { return 0; }; @@ -36,7 +36,7 @@ int iio_device_register_trigger_consumer(struct iio_dev *dev_info) * iio_device_unregister_trigger_consumer() - reverse the registration process * @dev_info: iio_dev associated with the device that consumed the trigger **/ -int iio_device_unregister_trigger_consumer(struct iio_dev *dev_info) +static int iio_device_unregister_trigger_consumer(struct iio_dev *dev_info) { return 0; }; From 0fce64362d4f2144586e3ffcff6f259bf8abc2f8 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Fri, 19 Feb 2010 16:18:04 +0100 Subject: [PATCH 303/367] Staging: batman-adv: depend on NET instead of PACKET in Kconfig The code which uses the raw packet sockets was removed. The only related dependencies are the skb and netdev handling code. This is provided by NET in Kconfig. Signed-off-by: Sven Eckelmann Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/batman-adv/Kconfig b/drivers/staging/batman-adv/Kconfig index 69e8fb039be0..1e7e0a8dbc8b 100644 --- a/drivers/staging/batman-adv/Kconfig +++ b/drivers/staging/batman-adv/Kconfig @@ -4,7 +4,7 @@ config BATMAN_ADV tristate "B.A.T.M.A.N. Advanced Meshing Protocol" - depends on PROC_FS && PACKET + depends on PROC_FS && NET default n ---help--- From eb50081d8fb76d5de9d65628d7f41977ece7044b Mon Sep 17 00:00:00 2001 From: Simon Wunderlich Date: Fri, 19 Feb 2010 16:18:05 +0100 Subject: [PATCH 304/367] Staging: batman-adv: don't lock while sending packets As in other parts of batman-adv, we should not lock while sending a packet but keep the lock held for as short as possible. Additionally, we should check whether the interface is active, otherwise batman_if->net_dev might not be available ... Signed-off-by: Simon Wunderlich Acked-by: Marek Lindner Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/device.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/staging/batman-adv/device.c b/drivers/staging/batman-adv/device.c index a3e74296abfd..451898cd9ecb 100644 --- a/drivers/staging/batman-adv/device.c +++ b/drivers/staging/batman-adv/device.c @@ -25,6 +25,7 @@ #include "send.h" #include "types.h" #include "hash.h" +#include "hard-interface.h" static struct class *batman_class; @@ -206,6 +207,7 @@ ssize_t bat_device_write(struct file *file, const char __user *buff, struct icmp_packet icmp_packet; struct orig_node *orig_node; struct batman_if *batman_if; + uint8_t dstaddr[ETH_ALEN]; unsigned long flags; if (len < sizeof(struct icmp_packet)) { @@ -251,9 +253,15 @@ ssize_t bat_device_write(struct file *file, const char __user *buff, goto unlock; batman_if = orig_node->batman_if; + memcpy(dstaddr, orig_node->router->addr, ETH_ALEN); + + spin_unlock_irqrestore(&orig_hash_lock, flags); if (!batman_if) - goto unlock; + goto dst_unreach; + + if (batman_if->if_active != IF_ACTIVE) + goto dst_unreach; memcpy(icmp_packet.orig, batman_if->net_dev->dev_addr, @@ -261,9 +269,8 @@ ssize_t bat_device_write(struct file *file, const char __user *buff, send_raw_packet((unsigned char *)&icmp_packet, sizeof(struct icmp_packet), - batman_if, orig_node->router->addr); + batman_if, dstaddr); - spin_unlock_irqrestore(&orig_hash_lock, flags); goto out; unlock: From 149de2e58b53cb87c9637a46441c477f0caf74bd Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Fri, 19 Feb 2010 16:18:06 +0100 Subject: [PATCH 305/367] Staging: batman-adv: avoid having the same error message more than once The routing code has 2 sections which warn about ttl exceeded. The corresponding warnings were identical which makes it hard to debug. In addition, batman-adv does not need to warn about ttl exceeded in case we encountered an echo request as this is commonly used to generate traceroute graphs. Signed-off-by: Marek Lindner Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/routing.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c index 09917e57b41c..8abaa6193ac3 100644 --- a/drivers/staging/batman-adv/routing.c +++ b/drivers/staging/batman-adv/routing.c @@ -655,14 +655,15 @@ static int recv_icmp_ttl_exceeded(struct sk_buff *skb) unsigned long flags; uint8_t dstaddr[ETH_ALEN]; - icmp_packet = (struct icmp_packet *) skb->data; - ethhdr = (struct ethhdr *) skb_mac_header(skb); - - printk(KERN_WARNING "batman-adv:Warning - can't send packet from %pM to %pM: ttl exceeded\n", icmp_packet->orig, icmp_packet->dst); + icmp_packet = (struct icmp_packet *)skb->data; + ethhdr = (struct ethhdr *)skb_mac_header(skb); /* send TTL exceeded if packet is an echo request (traceroute) */ - if (icmp_packet->msg_type != ECHO_REQUEST) + if (icmp_packet->msg_type != ECHO_REQUEST) { + printk(KERN_WARNING "batman-adv:Warning - can't forward icmp packet from %pM to %pM: ttl exceeded\n", + icmp_packet->orig, icmp_packet->dst); return NET_RX_DROP; + } /* get routing information */ spin_lock_irqsave(&orig_hash_lock, flags); @@ -825,7 +826,8 @@ int recv_unicast_packet(struct sk_buff *skb) /* TTL exceeded */ if (unicast_packet->ttl < 2) { - printk(KERN_WARNING "batman-adv:Warning - can't send packet from %pM to %pM: ttl exceeded\n", ethhdr->h_source, unicast_packet->dest); + printk(KERN_WARNING "batman-adv:Warning - can't forward unicast packet from %pM to %pM: ttl exceeded\n", + ethhdr->h_source, unicast_packet->dest); return NET_RX_DROP; } From bc0ad071a788625abb23aee4cb3c07d17d501641 Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Fri, 19 Feb 2010 16:18:07 +0100 Subject: [PATCH 306/367] Staging: batman-adv: remove obsolete variables This patch removes a variable that became obsolete since the skb handling replaced the packet handling thread. Signed-off-by: Marek Lindner Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/routing.c | 2 -- drivers/staging/batman-adv/routing.h | 1 - 2 files changed, 3 deletions(-) diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c index 8abaa6193ac3..7dc9aef9bef4 100644 --- a/drivers/staging/batman-adv/routing.c +++ b/drivers/staging/batman-adv/routing.c @@ -35,8 +35,6 @@ DECLARE_WAIT_QUEUE_HEAD(thread_wait); -atomic_t exit_cond; - void slide_own_bcast_window(struct batman_if *batman_if) { HASHIT(hashit); diff --git a/drivers/staging/batman-adv/routing.h b/drivers/staging/batman-adv/routing.h index c217241d0efd..939b8d4f733c 100644 --- a/drivers/staging/batman-adv/routing.h +++ b/drivers/staging/batman-adv/routing.h @@ -22,7 +22,6 @@ #include "types.h" extern wait_queue_head_t thread_wait; -extern atomic_t exit_cond; void slide_own_bcast_window(struct batman_if *batman_if); void receive_bat_packet(struct ethhdr *ethhdr, From 837b8248f6206a6b08b3d6defe2946282e432679 Mon Sep 17 00:00:00 2001 From: Linus Luessing Date: Fri, 19 Feb 2010 16:18:08 +0100 Subject: [PATCH 307/367] Staging: batman-adv: atomic variable for vis-srv activation This fixes the bug discovered by Marek Lindner which did not allow turning on the vis-server before an interface has been added. With this patch we are using a global atomic variable for activating and deactiating the vis-server-mode, which can be used before inserting an interface. Signed-off-by: Linus Luessing Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/main.c | 2 ++ drivers/staging/batman-adv/main.h | 1 + drivers/staging/batman-adv/proc.c | 15 +++++----- drivers/staging/batman-adv/send.c | 3 +- drivers/staging/batman-adv/vis.c | 46 ++++--------------------------- drivers/staging/batman-adv/vis.h | 2 -- 6 files changed, 18 insertions(+), 51 deletions(-) diff --git a/drivers/staging/batman-adv/main.c b/drivers/staging/batman-adv/main.c index 3f780753a2bf..2e0b482e710a 100644 --- a/drivers/staging/batman-adv/main.c +++ b/drivers/staging/batman-adv/main.c @@ -43,6 +43,7 @@ DEFINE_SPINLOCK(forw_bcast_list_lock); atomic_t originator_interval; atomic_t vis_interval; +atomic_t vis_mode; atomic_t aggregation_enabled; int16_t num_hna; int16_t num_ifs; @@ -83,6 +84,7 @@ int init_module(void) atomic_set(&originator_interval, 1000); atomic_set(&vis_interval, 1000);/* TODO: raise this later, this is only * for debugging now. */ + atomic_set(&vis_mode, VIS_TYPE_CLIENT_UPDATE); atomic_set(&aggregation_enabled, 1); /* the name should not be longer than 10 chars - see diff --git a/drivers/staging/batman-adv/main.h b/drivers/staging/batman-adv/main.h index eb6a702c6444..deb41f5beda6 100644 --- a/drivers/staging/batman-adv/main.h +++ b/drivers/staging/batman-adv/main.h @@ -130,6 +130,7 @@ extern spinlock_t forw_bcast_list_lock; extern atomic_t originator_interval; extern atomic_t vis_interval; +extern atomic_t vis_mode; extern atomic_t aggregation_enabled; extern int16_t num_hna; extern int16_t num_ifs; diff --git a/drivers/staging/batman-adv/proc.c b/drivers/staging/batman-adv/proc.c index 68c36b097a07..0eadc6b48d75 100644 --- a/drivers/staging/batman-adv/proc.c +++ b/drivers/staging/batman-adv/proc.c @@ -338,11 +338,11 @@ static ssize_t proc_vis_srv_write(struct file *file, const char __user * buffer, if ((strcmp(vis_mode_string, "client") == 0) || (strcmp(vis_mode_string, "disabled") == 0)) { printk(KERN_INFO "batman-adv:Setting VIS mode to client (disabling vis server)\n"); - vis_set_mode(VIS_TYPE_CLIENT_UPDATE); + atomic_set(&vis_mode, VIS_TYPE_CLIENT_UPDATE); } else if ((strcmp(vis_mode_string, "server") == 0) || (strcmp(vis_mode_string, "enabled") == 0)) { printk(KERN_INFO "batman-adv:Setting VIS mode to server (enabling vis server)\n"); - vis_set_mode(VIS_TYPE_SERVER_SYNC); + atomic_set(&vis_mode, VIS_TYPE_SERVER_SYNC); } else printk(KERN_ERR "batman-adv:Unknown VIS mode: %s\n", vis_mode_string); @@ -353,12 +353,12 @@ static ssize_t proc_vis_srv_write(struct file *file, const char __user * buffer, static int proc_vis_srv_read(struct seq_file *seq, void *offset) { - int vis_server = is_vis_server(); + int vis_server = atomic_read(&vis_mode); seq_printf(seq, "[%c] client mode (server disabled) \n", - (!vis_server) ? 'x' : ' '); + (vis_server == VIS_TYPE_CLIENT_UPDATE) ? 'x' : ' '); seq_printf(seq, "[%c] server mode (server enabled) \n", - (vis_server) ? 'x' : ' '); + (vis_server == VIS_TYPE_SERVER_SYNC) ? 'x' : ' '); return 0; } @@ -377,9 +377,10 @@ static int proc_vis_data_read(struct seq_file *seq, void *offset) int i; char tmp_addr_str[ETH_STR_LEN]; unsigned long flags; + int vis_server = atomic_read(&vis_mode); rcu_read_lock(); - if (list_empty(&if_list) || (!is_vis_server())) { + if (list_empty(&if_list) || (vis_server == VIS_TYPE_CLIENT_UPDATE)) { rcu_read_unlock(); goto end; } @@ -672,5 +673,3 @@ int setup_procfs(void) return 0; } - - diff --git a/drivers/staging/batman-adv/send.c b/drivers/staging/batman-adv/send.c index 944b2cdbdff8..2a9fac8c240e 100644 --- a/drivers/staging/batman-adv/send.c +++ b/drivers/staging/batman-adv/send.c @@ -248,6 +248,7 @@ void schedule_own_packet(struct batman_if *batman_if) { unsigned long send_time; struct batman_packet *batman_packet; + int vis_server = atomic_read(&vis_mode); /** * the interface gets activated here to avoid race conditions between @@ -272,7 +273,7 @@ void schedule_own_packet(struct batman_if *batman_if) /* change sequence number to network order */ batman_packet->seqno = htons((uint16_t)atomic_read(&batman_if->seqno)); - if (is_vis_server()) + if (vis_server == VIS_TYPE_SERVER_SYNC) batman_packet->flags = VIS_SERVER; else batman_packet->flags = 0; diff --git a/drivers/staging/batman-adv/vis.c b/drivers/staging/batman-adv/vis.c index ec8bb3f382c6..fedec1bb3097 100644 --- a/drivers/staging/batman-adv/vis.c +++ b/drivers/staging/batman-adv/vis.c @@ -48,41 +48,6 @@ static void free_info(void *data) kfree(info); } -/* set the mode of the visualization to client or server */ -void vis_set_mode(int mode) -{ - unsigned long flags; - spin_lock_irqsave(&vis_hash_lock, flags); - - if (my_vis_info != NULL) - my_vis_info->packet.vis_type = mode; - - spin_unlock_irqrestore(&vis_hash_lock, flags); -} - -/* is_vis_server(), locked outside */ -static int is_vis_server_locked(void) -{ - if (my_vis_info != NULL) - if (my_vis_info->packet.vis_type == VIS_TYPE_SERVER_SYNC) - return 1; - - return 0; -} - -/* get the current set mode */ -int is_vis_server(void) -{ - int ret = 0; - unsigned long flags; - - spin_lock_irqsave(&vis_hash_lock, flags); - ret = is_vis_server_locked(); - spin_unlock_irqrestore(&vis_hash_lock, flags); - - return ret; -} - /* Compare two vis packets, used by the hashing algorithm */ static int vis_info_cmp(void *data1, void *data2) { @@ -271,6 +236,7 @@ void receive_server_sync_packet(struct vis_packet *vis_packet, int vis_info_len) struct vis_info *info; int is_new; unsigned long flags; + int vis_server = atomic_read(&vis_mode); spin_lock_irqsave(&vis_hash_lock, flags); info = add_packet(vis_packet, vis_info_len, &is_new); @@ -279,7 +245,7 @@ void receive_server_sync_packet(struct vis_packet *vis_packet, int vis_info_len) /* only if we are server ourselves and packet is newer than the one in * hash.*/ - if (is_vis_server_locked() && is_new) { + if (vis_server == VIS_TYPE_SERVER_SYNC && is_new) { memcpy(info->packet.target_orig, broadcastAddr, ETH_ALEN); if (list_empty(&info->send_list)) list_add_tail(&info->send_list, &send_list); @@ -295,6 +261,7 @@ void receive_client_update_packet(struct vis_packet *vis_packet, struct vis_info *info; int is_new; unsigned long flags; + int vis_server = atomic_read(&vis_mode); /* clients shall not broadcast. */ if (is_bcast(vis_packet->target_orig)) @@ -308,7 +275,7 @@ void receive_client_update_packet(struct vis_packet *vis_packet, /* send only if we're the target server or ... */ - if (is_vis_server_locked() && + if (vis_server == VIS_TYPE_SERVER_SYNC && is_my_mac(info->packet.target_orig) && is_new) { info->packet.vis_type = VIS_TYPE_SERVER_SYNC; /* upgrade! */ @@ -372,6 +339,7 @@ static int generate_vis_packet(void) unsigned long flags; info->first_seen = jiffies; + info->packet.vis_type = atomic_read(&vis_mode); spin_lock_irqsave(&orig_hash_lock, flags); memcpy(info->packet.target_orig, broadcastAddr, ETH_ALEN); @@ -379,7 +347,7 @@ static int generate_vis_packet(void) info->packet.seqno++; info->packet.entries = 0; - if (!is_vis_server_locked()) { + if (info->packet.vis_type == VIS_TYPE_CLIENT_UPDATE) { best_tq = find_best_vis_server(info); if (best_tq < 0) { spin_unlock_irqrestore(&orig_hash_lock, flags); @@ -577,7 +545,6 @@ int vis_init(void) INIT_LIST_HEAD(&my_vis_info->send_list); my_vis_info->packet.version = COMPAT_VERSION; my_vis_info->packet.packet_type = BAT_VIS; - my_vis_info->packet.vis_type = VIS_TYPE_CLIENT_UPDATE; my_vis_info->packet.ttl = TTL; my_vis_info->packet.seqno = 0; my_vis_info->packet.entries = 0; @@ -628,4 +595,3 @@ static void start_vis_timer(void) queue_delayed_work(bat_event_workqueue, &vis_timer_wq, (atomic_read(&vis_interval) * HZ) / 1000); } - diff --git a/drivers/staging/batman-adv/vis.h b/drivers/staging/batman-adv/vis.h index 2e24258e69a4..0cdafde0ec3a 100644 --- a/drivers/staging/batman-adv/vis.h +++ b/drivers/staging/batman-adv/vis.h @@ -48,8 +48,6 @@ struct recvlist_node { extern struct hashtable_t *vis_hash; extern spinlock_t vis_hash_lock; -void vis_set_mode(int mode); -int is_vis_server(void); void proc_vis_read_entry(struct seq_file *seq, struct vis_info_entry *entry, struct hlist_head *if_list, From 8d03847c090b12694fb9fa81dbefa7b3e4f10f1d Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Fri, 19 Feb 2010 16:18:09 +0100 Subject: [PATCH 308/367] Staging: batman-adv: Fix skbuff leak in VIS code. The vis code takes a copy of the data inside the skbuf if it is interesting for us, so we always need to release the skbuf. Reported-by: Linus Luessing Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/routing.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c index 7dc9aef9bef4..d89048beebe1 100644 --- a/drivers/staging/batman-adv/routing.c +++ b/drivers/staging/batman-adv/routing.c @@ -939,7 +939,6 @@ int recv_vis_packet(struct sk_buff *skb) struct vis_packet *vis_packet; struct ethhdr *ethhdr; int hdr_size = sizeof(struct vis_packet); - int ret; if (skb_headlen(skb) < hdr_size) return NET_RX_DROP; @@ -962,18 +961,18 @@ int recv_vis_packet(struct sk_buff *skb) case VIS_TYPE_SERVER_SYNC: /* TODO: handle fragmented skbs properly */ receive_server_sync_packet(vis_packet, skb_headlen(skb)); - ret = NET_RX_SUCCESS; break; case VIS_TYPE_CLIENT_UPDATE: /* TODO: handle fragmented skbs properly */ receive_client_update_packet(vis_packet, skb_headlen(skb)); - ret = NET_RX_SUCCESS; break; default: /* ignore unknown packet */ - ret = NET_RX_DROP; break; } - return ret; + + /* We take a copy of the data in the packet, so we should + always free the skbuf. */ + return NET_RX_DROP; } From da6d6c7ac366ad3189e494cd78376db7a4f40d59 Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Fri, 19 Feb 2010 16:18:10 +0100 Subject: [PATCH 309/367] Staging: batman-adv: avoid crash on memory allocation error skb_share_check() returns NULL if it can't allocate more memory but it still frees the skbuff. Signed-off-by: Marek Lindner Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/hard-interface.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/staging/batman-adv/hard-interface.c b/drivers/staging/batman-adv/hard-interface.c index f8b1ba3910ad..0f94158b2660 100644 --- a/drivers/staging/batman-adv/hard-interface.c +++ b/drivers/staging/batman-adv/hard-interface.c @@ -426,10 +426,11 @@ int batman_skb_recv(struct sk_buff *skb, struct net_device *dev, struct net_device_stats *stats; int ret; - skb = skb_share_check(skb, GFP_ATOMIC); + skb = skb_share_check(skb, GFP_ATOMIC); - if (skb == NULL) - goto err_free; + /* skb was released by skb_share_check() */ + if (!skb) + goto err_out; /* packet should hold at least type and version */ if (unlikely(skb_headlen(skb) < 2)) @@ -444,7 +445,7 @@ int batman_skb_recv(struct sk_buff *skb, struct net_device *dev, if (!batman_if) goto err_free; - stats = (struct net_device_stats *) dev_get_stats(skb->dev); + stats = (struct net_device_stats *)dev_get_stats(skb->dev); if (stats) { stats->rx_packets++; stats->rx_bytes += skb->len; @@ -490,6 +491,7 @@ int batman_skb_recv(struct sk_buff *skb, struct net_device *dev, default: ret = NET_RX_DROP; } + if (ret == NET_RX_DROP) kfree_skb(skb); @@ -500,9 +502,9 @@ int batman_skb_recv(struct sk_buff *skb, struct net_device *dev, return NET_RX_SUCCESS; err_free: - kfree_skb(skb); - return NET_RX_DROP; - + kfree_skb(skb); +err_out: + return NET_RX_DROP; } From af71b816cdc623bc7c0b616ededbf3dadaf03156 Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Fri, 19 Feb 2010 16:18:11 +0100 Subject: [PATCH 310/367] Staging: batman-adv: fix module initialization Make sure that batman-adv does not process packets before its initialization is complete. Some sanity checks added to the receiver function. Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/hard-interface.c | 7 +++++++ drivers/staging/batman-adv/proc.c | 17 ++++++----------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/staging/batman-adv/hard-interface.c b/drivers/staging/batman-adv/hard-interface.c index 0f94158b2660..befd48839519 100644 --- a/drivers/staging/batman-adv/hard-interface.c +++ b/drivers/staging/batman-adv/hard-interface.c @@ -432,6 +432,9 @@ int batman_skb_recv(struct sk_buff *skb, struct net_device *dev, if (!skb) goto err_out; + if (atomic_read(&module_state) != MODULE_ACTIVE) + goto err_free; + /* packet should hold at least type and version */ if (unlikely(skb_headlen(skb) < 2)) goto err_free; @@ -445,6 +448,10 @@ int batman_skb_recv(struct sk_buff *skb, struct net_device *dev, if (!batman_if) goto err_free; + /* discard frames on not active interfaces */ + if (batman_if->if_active != IF_ACTIVE) + goto err_free; + stats = (struct net_device_stats *)dev_get_stats(skb->dev); if (stats) { stats->rx_packets++; diff --git a/drivers/staging/batman-adv/proc.c b/drivers/staging/batman-adv/proc.c index 0eadc6b48d75..7de60e84bc96 100644 --- a/drivers/staging/batman-adv/proc.c +++ b/drivers/staging/batman-adv/proc.c @@ -63,7 +63,7 @@ static ssize_t proc_interfaces_write(struct file *instance, size_t count, loff_t *data) { char *if_string, *colon_ptr = NULL, *cr_ptr = NULL; - int not_copied = 0, if_num = 0; + int not_copied = 0, if_num = 0, add_success; struct batman_if *batman_if = NULL; if_string = kmalloc(count, GFP_KERNEL); @@ -109,22 +109,17 @@ static ssize_t proc_interfaces_write(struct file *instance, } rcu_read_unlock(); - hardif_add_interface(if_string, if_num); + add_success = hardif_add_interface(if_string, if_num); + if (add_success < 0) + goto end; + + num_ifs = if_num + 1; if ((atomic_read(&module_state) == MODULE_INACTIVE) && (hardif_get_active_if_num() > 0)) activate_module(); - rcu_read_lock(); - if (list_empty(&if_list)) { - rcu_read_unlock(); - goto end; - } - rcu_read_unlock(); - - num_ifs = if_num + 1; return count; - end: kfree(if_string); return count; From e41a6f6d9cb7404420d596f27609a3f4f55dcaf5 Mon Sep 17 00:00:00 2001 From: Stewart Robertson Date: Sun, 21 Feb 2010 10:13:21 +0000 Subject: [PATCH 311/367] Staging: comedi: fix coding style issues in ni_labpc.c This is a patch to the ni_labpc.c file that fixes the brace warnings and comments over 80 characters found by the checkpatch.pl tool. Some code still goes over 80 characters because I didn't know what to do with it. Signed-off-by: Stewart Robertson Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_labpc.c | 231 ++++++++++++++-------- 1 file changed, 145 insertions(+), 86 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index 566b791e00c7..bc5662e2a9bf 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -90,8 +90,10 @@ NI manuals: #define DRV_NAME "ni_labpc" -#define LABPC_SIZE 32 /* size of io region used by board */ -#define LABPC_TIMER_BASE 500 /* 2 MHz master clock */ +/* size of io region used by board */ +#define LABPC_SIZE 32 +/* 2 MHz master clock */ +#define LABPC_TIMER_BASE 500 /* Registers for the lab-pc+ */ @@ -99,69 +101,110 @@ NI manuals: #define COMMAND1_REG 0x0 #define ADC_GAIN_MASK (0x7 << 4) #define ADC_CHAN_BITS(x) ((x) & 0x7) -#define ADC_SCAN_EN_BIT 0x80 /* enables multi channel scans */ +/* enables multi channel scans */ +#define ADC_SCAN_EN_BIT 0x80 #define COMMAND2_REG 0x1 -#define PRETRIG_BIT 0x1 /* enable pretriggering (used in conjunction with SWTRIG) */ -#define HWTRIG_BIT 0x2 /* enable paced conversions on external trigger */ -#define SWTRIG_BIT 0x4 /* enable paced conversions */ -#define CASCADE_BIT 0x8 /* use two cascaded counters for pacing */ +/* enable pretriggering (used in conjunction with SWTRIG) */ +#define PRETRIG_BIT 0x1 +/* enable paced conversions on external trigger */ +#define HWTRIG_BIT 0x2 +/* enable paced conversions */ +#define SWTRIG_BIT 0x4 +/* use two cascaded counters for pacing */ +#define CASCADE_BIT 0x8 #define DAC_PACED_BIT(channel) (0x40 << ((channel) & 0x1)) #define COMMAND3_REG 0x2 -#define DMA_EN_BIT 0x1 /* enable dma transfers */ -#define DIO_INTR_EN_BIT 0x2 /* enable interrupts for 8255 */ -#define DMATC_INTR_EN_BIT 0x4 /* enable dma terminal count interrupt */ -#define TIMER_INTR_EN_BIT 0x8 /* enable timer interrupt */ -#define ERR_INTR_EN_BIT 0x10 /* enable error interrupt */ -#define ADC_FNE_INTR_EN_BIT 0x20 /* enable fifo not empty interrupt */ +/* enable dma transfers */ +#define DMA_EN_BIT 0x1 +/* enable interrupts for 8255 */ +#define DIO_INTR_EN_BIT 0x2 +/* enable dma terminal count interrupt */ +#define DMATC_INTR_EN_BIT 0x4 +/* enable timer interrupt */ +#define TIMER_INTR_EN_BIT 0x8 +/* enable error interrupt */ +#define ERR_INTR_EN_BIT 0x10 +/* enable fifo not empty interrupt */ +#define ADC_FNE_INTR_EN_BIT 0x20 #define ADC_CONVERT_REG 0x3 #define DAC_LSB_REG(channel) (0x4 + 2 * ((channel) & 0x1)) #define DAC_MSB_REG(channel) (0x5 + 2 * ((channel) & 0x1)) #define ADC_CLEAR_REG 0x8 #define DMATC_CLEAR_REG 0xa #define TIMER_CLEAR_REG 0xc -#define COMMAND6_REG 0xe /* 1200 boards only */ -#define ADC_COMMON_BIT 0x1 /* select ground or common-mode reference */ -#define ADC_UNIP_BIT 0x2 /* adc unipolar */ -#define DAC_UNIP_BIT(channel) (0x4 << ((channel) & 0x1)) /* dac unipolar */ -#define ADC_FHF_INTR_EN_BIT 0x20 /* enable fifo half full interrupt */ -#define A1_INTR_EN_BIT 0x40 /* enable interrupt on end of hardware count */ -#define ADC_SCAN_UP_BIT 0x80 /* scan up from channel zero instead of down to zero */ +/* 1200 boards only */ +#define COMMAND6_REG 0xe +/* select ground or common-mode reference */ +#define ADC_COMMON_BIT 0x1 +/* adc unipolar */ +#define ADC_UNIP_BIT 0x2 +/* dac unipolar */ +#define DAC_UNIP_BIT(channel) (0x4 << ((channel) & 0x1)) +/* enable fifo half full interrupt */ +#define ADC_FHF_INTR_EN_BIT 0x20 +/* enable interrupt on end of hardware count */ +#define A1_INTR_EN_BIT 0x40 +/* scan up from channel zero instead of down to zero */ +#define ADC_SCAN_UP_BIT 0x80 #define COMMAND4_REG 0xf -#define INTERVAL_SCAN_EN_BIT 0x1 /* enables 'interval' scanning */ -#define EXT_SCAN_EN_BIT 0x2 /* enables external signal on counter b1 output to trigger scan */ -#define EXT_CONVERT_OUT_BIT 0x4 /* chooses direction (output or input) for EXTCONV* line */ -#define ADC_DIFF_BIT 0x8 /* chooses differential inputs for adc (in conjunction with board jumper) */ +/* enables 'interval' scanning */ +#define INTERVAL_SCAN_EN_BIT 0x1 +/* enables external signal on counter b1 output to trigger scan */ +#define EXT_SCAN_EN_BIT 0x2 +/* chooses direction (output or input) for EXTCONV* line */ +#define EXT_CONVERT_OUT_BIT 0x4 +/* chooses differential inputs for adc (in conjunction with board jumper) */ +#define ADC_DIFF_BIT 0x8 #define EXT_CONVERT_DISABLE_BIT 0x10 -#define COMMAND5_REG 0x1c /* 1200 boards only, calibration stuff */ -#define EEPROM_WRITE_UNPROTECT_BIT 0x4 /* enable eeprom for write */ -#define DITHER_EN_BIT 0x8 /* enable dithering */ -#define CALDAC_LOAD_BIT 0x10 /* load calibration dac */ -#define SCLOCK_BIT 0x20 /* serial clock - rising edge writes, falling edge reads */ -#define SDATA_BIT 0x40 /* serial data bit for writing to eeprom or calibration dacs */ -#define EEPROM_EN_BIT 0x80 /* enable eeprom for read/write */ +/* 1200 boards only, calibration stuff */ +#define COMMAND5_REG 0x1c +/* enable eeprom for write */ +#define EEPROM_WRITE_UNPROTECT_BIT 0x4 +/* enable dithering */ +#define DITHER_EN_BIT 0x8 +/* load calibration dac */ +#define CALDAC_LOAD_BIT 0x10 +/* serial clock - rising edge writes, falling edge reads */ +#define SCLOCK_BIT 0x20 +/* serial data bit for writing to eeprom or calibration dacs */ +#define SDATA_BIT 0x40 +/* enable eeprom for read/write */ +#define EEPROM_EN_BIT 0x80 #define INTERVAL_COUNT_REG 0x1e #define INTERVAL_LOAD_REG 0x1f #define INTERVAL_LOAD_BITS 0x1 /* read-only registers */ #define STATUS1_REG 0x0 -#define DATA_AVAIL_BIT 0x1 /* data is available in fifo */ -#define OVERRUN_BIT 0x2 /* overrun has occurred */ -#define OVERFLOW_BIT 0x4 /* fifo overflow */ -#define TIMER_BIT 0x8 /* timer interrupt has occured */ -#define DMATC_BIT 0x10 /* dma terminal count has occured */ -#define EXT_TRIG_BIT 0x40 /* external trigger has occured */ -#define STATUS2_REG 0x1d /* 1200 boards only */ -#define EEPROM_OUT_BIT 0x1 /* programmable eeprom serial output */ -#define A1_TC_BIT 0x2 /* counter A1 terminal count */ -#define FNHF_BIT 0x4 /* fifo not half full */ +/* data is available in fifo */ +#define DATA_AVAIL_BIT 0x1 +/* overrun has occurred */ +#define OVERRUN_BIT 0x2 +/* fifo overflow */ +#define OVERFLOW_BIT 0x4 +/* timer interrupt has occured */ +#define TIMER_BIT 0x8 +/* dma terminal count has occured */ +#define DMATC_BIT 0x10 +/* external trigger has occured */ +#define EXT_TRIG_BIT 0x40 +/* 1200 boards only */ +#define STATUS2_REG 0x1d +/* programmable eeprom serial output */ +#define EEPROM_OUT_BIT 0x1 +/* counter A1 terminal count */ +#define A1_TC_BIT 0x2 +/* fifo not half full */ +#define FNHF_BIT 0x4 #define ADC_FIFO_REG 0xa #define DIO_BASE_REG 0x10 #define COUNTER_A_BASE_REG 0x14 #define COUNTER_A_CONTROL_REG (COUNTER_A_BASE_REG + 0x3) -#define INIT_A0_BITS 0x14 /* check modes put conversion pacer output in harmless state (a0 mode 2) */ -#define INIT_A1_BITS 0x70 /* put hardware conversion counter output in harmless state (a1 mode 0) */ +/* check modes put conversion pacer output in harmless state (a0 mode 2) */ +#define INIT_A0_BITS 0x14 +/* put hardware conversion counter output in harmless state (a1 mode 0) */ +#define INIT_A1_BITS 0x70 #define COUNTER_B_BASE_REG 0x18 static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it); @@ -423,7 +466,7 @@ static const struct labpc_board_struct labpc_boards[] = { .ai_scan_up = 1, .memory_mapped_io = 1, }, - /* dummy entry so pci board works when comedi_config is passed driver name */ +/* dummy entry so pci board works when comedi_config is passed driver name */ { .name = DRV_NAME, .bustype = pci_bustype, @@ -436,8 +479,10 @@ static const struct labpc_board_struct labpc_boards[] = { */ #define thisboard ((struct labpc_board_struct *)dev->board_ptr) -static const int dma_buffer_size = 0xff00; /* size in bytes of dma buffer */ -static const int sample_size = 2; /* 2 bytes per sample */ +/* size in bytes of dma buffer */ +static const int dma_buffer_size = 0xff00; +/* 2 bytes per sample */ +static const int sample_size = 2; #define devpriv ((struct labpc_private *)dev->private) @@ -511,7 +556,7 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase, devpriv->read_byte = labpc_inb; devpriv->write_byte = labpc_outb; } - /* initialize board's command registers */ + /* initialize board's command registers */ devpriv->write_byte(devpriv->command1_bits, dev->iobase + COMMAND1_REG); devpriv->write_byte(devpriv->command2_bits, dev->iobase + COMMAND2_REG); devpriv->write_byte(devpriv->command3_bits, dev->iobase + COMMAND3_REG); @@ -536,12 +581,12 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase, } dev->irq = irq; - /* grab dma channel */ + /* grab dma channel */ if (dma_chan > 3) { printk(" invalid dma channel %u\n", dma_chan); return -EINVAL; } else if (dma_chan) { - /* allocate dma buffer */ + /* allocate dma buffer */ devpriv->dma_buffer = kmalloc(dma_buffer_size, GFP_KERNEL | GFP_DMA); if (devpriv->dma_buffer == NULL) { @@ -573,7 +618,7 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase, SDF_READABLE | SDF_GROUND | SDF_COMMON | SDF_DIFF | SDF_CMD_READ; s->n_chan = 8; s->len_chanlist = 8; - s->maxdata = (1 << 12) - 1; /* 12 bit resolution */ + s->maxdata = (1 << 12) - 1; /* 12 bit resolution */ s->range_table = thisboard->ai_range_table; s->do_cmd = labpc_ai_cmd; s->do_cmdtest = labpc_ai_cmdtest; @@ -667,7 +712,7 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it) if (alloc_private(dev, sizeof(struct labpc_private)) < 0) return -ENOMEM; - /* get base address, irq etc. based on bustype */ + /* get base address, irq etc. based on bustype */ switch (thisboard->bustype) { case isa_bustype: iobase = it->options[0]; @@ -712,7 +757,7 @@ static int labpc_find_device(struct comedi_device *dev, int bus, int slot) for (mite = mite_devices; mite; mite = mite->next) { if (mite->used) continue; - /* if bus/slot are specified then make sure we have the right bus/slot */ +/* if bus/slot are specified then make sure we have the right bus/slot */ if (bus || slot) { if (bus != mite->pcidev->bus->number || slot != PCI_SLOT(mite->pcidev->devfn)) @@ -723,7 +768,7 @@ static int labpc_find_device(struct comedi_device *dev, int bus, int slot) continue; if (mite_device_id(mite) == labpc_boards[i].device_id) { devpriv->mite = mite; - /* fixup board pointer, in case we were using the dummy "ni_labpc" entry */ +/* fixup board pointer, in case we were using the dummy "ni_labpc" entry */ dev->board_ptr = &labpc_boards[i]; return 0; } @@ -991,7 +1036,7 @@ static int labpc_ai_cmdtest(struct comedi_device *dev, cmd->stop_src != TRIG_EXT && cmd->stop_src != TRIG_NONE) err++; - /* can't have external stop and start triggers at once */ + /* can't have external stop and start triggers at once */ if (cmd->start_src == TRIG_EXT && cmd->stop_src == TRIG_EXT) err++; @@ -1019,7 +1064,7 @@ static int labpc_ai_cmdtest(struct comedi_device *dev, err++; } } - /* make sure scan timing is not too fast */ + /* make sure scan timing is not too fast */ if (cmd->scan_begin_src == TRIG_TIMER) { if (cmd->convert_src == TRIG_TIMER && cmd->scan_begin_arg < @@ -1035,7 +1080,7 @@ static int labpc_ai_cmdtest(struct comedi_device *dev, err++; } } - /* stop source */ + /* stop source */ switch (cmd->stop_src) { case TRIG_COUNT: if (!cmd->stop_arg) { @@ -1092,7 +1137,7 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) range = CR_RANGE(cmd->chanlist[0]); aref = CR_AREF(cmd->chanlist[0]); - /* make sure board is disabled before setting up aquisition */ + /* make sure board is disabled before setting up aquisition */ spin_lock_irqsave(&dev->spinlock, flags); devpriv->command2_bits &= ~SWTRIG_BIT & ~HWTRIG_BIT & ~PRETRIG_BIT; devpriv->write_byte(devpriv->command2_bits, dev->iobase + COMMAND2_REG); @@ -1172,17 +1217,18 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) channel = CR_CHAN(cmd->chanlist[cmd->chanlist_len - 1]); else channel = CR_CHAN(cmd->chanlist[0]); - /* munge channel bits for differential / scan disabled mode */ + /* munge channel bits for differential / scan disabled mode */ if (labpc_ai_scan_mode(cmd) != MODE_SINGLE_CHAN && aref == AREF_DIFF) channel *= 2; devpriv->command1_bits |= ADC_CHAN_BITS(channel); devpriv->command1_bits |= thisboard->ai_range_code[range]; devpriv->write_byte(devpriv->command1_bits, dev->iobase + COMMAND1_REG); - /* manual says to set scan enable bit on second pass */ + /* manual says to set scan enable bit on second pass */ if (labpc_ai_scan_mode(cmd) == MODE_MULT_CHAN_UP || labpc_ai_scan_mode(cmd) == MODE_MULT_CHAN_DOWN) { devpriv->command1_bits |= ADC_SCAN_EN_BIT; - /* need a brief delay before enabling scan, or scan list will get screwed when you switch + /* need a brief delay before enabling scan, or scan + * list will get screwed when you switch * between scan up to scan down mode - dunno why */ udelay(1); devpriv->write_byte(devpriv->command1_bits, @@ -1334,7 +1380,7 @@ static irqreturn_t labpc_interrupt(int irq, void *d) cmd = &async->cmd; async->events = 0; - /* read board status */ + /* read board status */ devpriv->status1_bits = devpriv->read_byte(dev->iobase + STATUS1_REG); if (thisboard->register_layout == labpc_1200_layout) devpriv->status2_bits = @@ -1348,7 +1394,7 @@ static irqreturn_t labpc_interrupt(int irq, void *d) } if (devpriv->status1_bits & OVERRUN_BIT) { - /* clear error interrupt */ + /* clear error interrupt */ devpriv->write_byte(0x1, dev->iobase + ADC_CLEAR_REG); async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA; comedi_event(dev, s); @@ -1357,7 +1403,7 @@ static irqreturn_t labpc_interrupt(int irq, void *d) } if (devpriv->current_transfer == isa_dma_transfer) { - /* if a dma terminal count of external stop trigger has occurred */ + /* if a dma terminal count of external stop trigger has occurred */ if (devpriv->status1_bits & DMATC_BIT || (thisboard->register_layout == labpc_1200_layout && devpriv->status2_bits & A1_TC_BIT)) { @@ -1532,41 +1578,41 @@ static int labpc_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s, chan = CR_CHAN(insn->chanspec); range = CR_RANGE(insn->chanspec); devpriv->command1_bits |= thisboard->ai_range_code[range]; - /* munge channel bits for differential/scan disabled mode */ + /* munge channel bits for differential/scan disabled mode */ if (CR_AREF(insn->chanspec) == AREF_DIFF) chan *= 2; devpriv->command1_bits |= ADC_CHAN_BITS(chan); devpriv->write_byte(devpriv->command1_bits, dev->iobase + COMMAND1_REG); - /* setup command6 register for 1200 boards */ + /* setup command6 register for 1200 boards */ if (thisboard->register_layout == labpc_1200_layout) { /* reference inputs to ground or common? */ if (CR_AREF(insn->chanspec) != AREF_GROUND) devpriv->command6_bits |= ADC_COMMON_BIT; else devpriv->command6_bits &= ~ADC_COMMON_BIT; - /* bipolar or unipolar range? */ + /* bipolar or unipolar range? */ if (thisboard->ai_range_is_unipolar[range]) devpriv->command6_bits |= ADC_UNIP_BIT; else devpriv->command6_bits &= ~ADC_UNIP_BIT; - /* don't interrupt on fifo half full */ + /* don't interrupt on fifo half full */ devpriv->command6_bits &= ~ADC_FHF_INTR_EN_BIT; - /* don't enable interrupt on counter a1 terminal count? */ + /* don't enable interrupt on counter a1 terminal count? */ devpriv->command6_bits &= ~A1_INTR_EN_BIT; - /* write to register */ + /* write to register */ devpriv->write_byte(devpriv->command6_bits, dev->iobase + COMMAND6_REG); } - /* setup command4 register */ + /* setup command4 register */ devpriv->command4_bits = 0; devpriv->command4_bits |= EXT_CONVERT_DISABLE_BIT; - /* single-ended/differential */ + /* single-ended/differential */ if (CR_AREF(insn->chanspec) == AREF_DIFF) devpriv->command4_bits |= ADC_DIFF_BIT; devpriv->write_byte(devpriv->command4_bits, dev->iobase + COMMAND4_REG); - /* initialize pacer counter output to make sure it doesn't cause any problems */ + /* initialize pacer counter output to make sure it doesn't cause any problems */ devpriv->write_byte(INIT_A0_BITS, dev->iobase + COUNTER_A_CONTROL_REG); labpc_clear_adc_fifo(dev); @@ -1603,7 +1649,7 @@ static int labpc_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s, channel = CR_CHAN(insn->chanspec); - /* turn off pacing of analog output channel */ + /* turn off pacing of analog output channel */ /* note: hardware bug in daqcard-1200 means pacing cannot * be independently enabled/disabled for its the two channels */ spin_lock_irqsave(&dev->spinlock, flags); @@ -1611,7 +1657,7 @@ static int labpc_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s, devpriv->write_byte(devpriv->command2_bits, dev->iobase + COMMAND2_REG); spin_unlock_irqrestore(&dev->spinlock, flags); - /* set range */ + /* set range */ if (thisboard->register_layout == labpc_1200_layout) { range = CR_RANGE(insn->chanspec); if (range & AO_RANGE_IS_UNIPOLAR) @@ -1622,13 +1668,13 @@ static int labpc_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s, devpriv->write_byte(devpriv->command6_bits, dev->iobase + COMMAND6_REG); } - /* send data */ + /* send data */ lsb = data[0] & 0xff; msb = (data[0] >> 8) & 0xff; devpriv->write_byte(lsb, dev->iobase + DAC_LSB_REG(channel)); devpriv->write_byte(msb, dev->iobase + DAC_MSB_REG(channel)); - /* remember value for readback */ + /* remember value for readback */ devpriv->ao_value[channel] = data[0]; return 1; @@ -1700,14 +1746,14 @@ static unsigned int labpc_suggest_transfer_size(struct comedi_cmd cmd) if (cmd.convert_src == TRIG_TIMER) freq = 1000000000 / cmd.convert_arg; - /* return some default value */ + /* return some default value */ else freq = 0xffffffff; - /* make buffer fill in no more than 1/3 second */ + /* make buffer fill in no more than 1/3 second */ size = (freq / 3) * sample_size; - /* set a minimum and maximum size allowed */ + /* set a minimum and maximum size allowed */ if (size > dma_buffer_size) size = dma_buffer_size - dma_buffer_size % sample_size; else if (size < sample_size) @@ -1719,13 +1765,21 @@ static unsigned int labpc_suggest_transfer_size(struct comedi_cmd cmd) /* figures out what counter values to use based on command */ static void labpc_adc_timing(struct comedi_device *dev, struct comedi_cmd *cmd) { - const int max_counter_value = 0x10000; /* max value for 16 bit counter in mode 2 */ - const int min_counter_value = 2; /* min value for 16 bit counter in mode 2 */ + /* max value for 16 bit counter in mode 2 */ + const int max_counter_value = 0x10000; + /* min value for 16 bit counter in mode 2 */ + const int min_counter_value = 2; unsigned int base_period; - /* if both convert and scan triggers are TRIG_TIMER, then they both rely on counter b0 */ + /* + * if both convert and scan triggers are TRIG_TIMER, then they + * both rely on counter b0 + */ if (labpc_ai_convert_period(cmd) && labpc_ai_scan_period(cmd)) { - /* pick the lowest b0 divisor value we can (for maximum input clock speed on convert and scan counters) */ + /* + * pick the lowest b0 divisor value we can (for maximum input + * clock speed on convert and scan counters) + */ devpriv->divisor_b0 = (labpc_ai_scan_period(cmd) - 1) / (LABPC_TIMER_BASE * max_counter_value) + 1; if (devpriv->divisor_b0 < min_counter_value) @@ -1775,7 +1829,10 @@ static void labpc_adc_timing(struct comedi_device *dev, struct comedi_cmd *cmd) base_period * devpriv->divisor_a0); labpc_set_ai_scan_period(cmd, base_period * devpriv->divisor_b1); - /* if only one TRIG_TIMER is used, we can employ the generic cascaded timing functions */ + /* + * if only one TRIG_TIMER is used, we can employ the generic + * cascaded timing functions + */ } else if (labpc_ai_scan_period(cmd)) { unsigned int scan_period; @@ -1870,8 +1927,10 @@ static unsigned int labpc_eeprom_read(struct comedi_device *dev, unsigned int address) { unsigned int value; - const int read_instruction = 0x3; /* bits to tell eeprom to expect a read */ - const int write_length = 8; /* 8 bit write lengths to eeprom */ + /* bits to tell eeprom to expect a read */ + const int read_instruction = 0x3; + /* 8 bit write lengths to eeprom */ + const int write_length = 8; /* enable read/write to eeprom */ devpriv->command5_bits &= ~EEPROM_EN_BIT; From e20ad20d849eb902628553be1fd2dc9ccc40a4bd Mon Sep 17 00:00:00 2001 From: Benjamin Adolphi Date: Sun, 21 Feb 2010 21:25:33 +0100 Subject: [PATCH 312/367] Staging: comedi: aio_iiro_16: Checkpatch cleanups This fixes all checkpatch issues in the aio_iiro_16 comedi driver. Signed-off-by: Benjamin Adolphi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/aio_iiro_16.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/aio_iiro_16.c b/drivers/staging/comedi/drivers/aio_iiro_16.c index 3857fd566d21..4baef9ff932a 100644 --- a/drivers/staging/comedi/drivers/aio_iiro_16.c +++ b/drivers/staging/comedi/drivers/aio_iiro_16.c @@ -98,7 +98,7 @@ static int aio_iiro_16_attach(struct comedi_device *dev, int iobase; struct comedi_subdevice *s; - printk("comedi%d: aio_iiro_16: ", dev->minor); + printk(KERN_INFO "comedi%d: aio_iiro_16: ", dev->minor); dev->board_name = thisboard->name; @@ -140,7 +140,7 @@ static int aio_iiro_16_attach(struct comedi_device *dev, static int aio_iiro_16_detach(struct comedi_device *dev) { - printk("comedi%d: aio_iiro_16: remove\n", dev->minor); + printk(KERN_INFO "comedi%d: aio_iiro_16: remove\n", dev->minor); if (dev->iobase) release_region(dev->iobase, AIO_IIRO_16_SIZE); From 669c930c8fe266917865f923db51c3b654ab78a3 Mon Sep 17 00:00:00 2001 From: Benjamin Adolphi Date: Sun, 21 Feb 2010 21:44:57 +0100 Subject: [PATCH 313/367] Staging: comedi: amplc_dio200: Checkpatch cleanups This fixes all checkpatch issues in the amplc_dio200 comedi driver. Signed-off-by: Benjamin Adolphi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/amplc_dio200.c | 122 ++++++++---------- 1 file changed, 51 insertions(+), 71 deletions(-) diff --git a/drivers/staging/comedi/drivers/amplc_dio200.c b/drivers/staging/comedi/drivers/amplc_dio200.c index 69ab2813dd2e..204f30ef6e96 100644 --- a/drivers/staging/comedi/drivers/amplc_dio200.c +++ b/drivers/staging/comedi/drivers/amplc_dio200.c @@ -48,8 +48,8 @@ Passing a zero for an option is the same as leaving it unspecified. SUBDEVICES - PC218E PC212E PC215E/PCI215 - ------------- ------------- ------------- + PC218E PC212E PC215E/PCI215 + ------------- ------------- ------------- Subdevices 7 6 5 0 CTR-X1 PPI-X PPI-X 1 CTR-X2 CTR-Y1 PPI-Y @@ -59,8 +59,8 @@ SUBDEVICES 5 CTR-Z2 INTERRUPT 6 INTERRUPT - PC214E PC272E/PCI272 - ------------- ------------- + PC214E PC272E/PCI272 + ------------- ------------- Subdevices 4 4 0 PPI-X PPI-X 1 PPI-Y PPI-Y @@ -96,8 +96,8 @@ instructions are supported: 0 to 7 as follows: 0. CLK n, the counter channel's dedicated CLK input from the SK1 - connector. (N.B. for other values, the counter channel's CLKn - pin on the SK1 connector is an output!) + connector. (N.B. for other values, the counter channel's CLKn + pin on the SK1 connector is an output!) 1. Internal 10 MHz clock. 2. Internal 1 MHz clock. 3. Internal 100 kHz clock. @@ -105,8 +105,8 @@ instructions are supported: 5. Internal 1 kHz clock. 6. OUT n-1, the output of counter channel n-1 (see note 1 below). 7. Ext Clock, the counter chip's dedicated Ext Clock input from - the SK1 connector. This pin is shared by all three counter - channels on the chip. + the SK1 connector. This pin is shared by all three counter + channels on the chip. INSN_CONFIG_GET_CLOCK_SRC. Returns the counter channel's current clock source in data[1]. For internal clock sources, data[2] is set @@ -120,10 +120,10 @@ instructions are supported: 0. VCC (internal +5V d.c.), i.e. gate permanently enabled. 1. GND (internal 0V d.c.), i.e. gate permanently disabled. 2. GAT n, the counter channel's dedicated GAT input from the SK1 - connector. (N.B. for other values, the counter channel's GATn - pin on the SK1 connector is an output!) + connector. (N.B. for other values, the counter channel's GATn + pin on the SK1 connector is an output!) 3. /OUT n-2, the inverted output of counter channel n-2 (see note - 2 below). + 2 below). 4. Reserved. 5. Reserved. 6. Reserved. @@ -153,8 +153,8 @@ below. INTERRUPT SOURCES - PC218E PC212E PC215E/PCI215 - ------------- ------------- ------------- + PC218E PC212E PC215E/PCI215 + ------------- ------------- ------------- Sources 6 6 6 0 CTR-X1-OUT PPI-X-C0 PPI-X-C0 1 CTR-X2-OUT PPI-X-C3 PPI-X-C3 @@ -163,8 +163,8 @@ INTERRUPT SOURCES 4 CTR-Z1-OUT CTR-Z1-OUT CTR-Z1-OUT 5 CTR-Z2-OUT CTR-Z2-OUT CTR-Z2-OUT - PC214E PC272E/PCI272 - ------------- ------------- + PC214E PC272E/PCI272 + ------------- ------------- Sources 1 6 0 JUMPER-J5 PPI-X-C0 1 PPI-X-C3 @@ -435,11 +435,13 @@ MODULE_DEVICE_TABLE(pci, dio200_pci_table); * Useful for shorthand access to the particular board structure */ #define thisboard ((const struct dio200_board *)dev->board_ptr) -#define thislayout (&dio200_layouts[((struct dio200_board *)dev->board_ptr)->layout]) +#define thislayout (&dio200_layouts[((struct dio200_board *) \ + dev->board_ptr)->layout]) /* this structure is for data unique to this hardware driver. If several hardware drivers keep similar information in this structure, - feel free to suggest moving the variable to the struct comedi_device struct. */ + feel free to suggest moving the variable to the struct comedi_device struct. + */ struct dio200_private { #ifdef CONFIG_COMEDI_PCI struct pci_dev *pci_dev; /* PCI device */ @@ -603,9 +605,8 @@ static void dio200_stop_intr(struct comedi_device *dev, subpriv->active = 0; subpriv->enabled_isns = 0; - if (subpriv->has_int_sce) { + if (subpriv->has_int_sce) outb(0, subpriv->iobase); - } } /* @@ -629,16 +630,14 @@ static int dio200_start_intr(struct comedi_device *dev, /* Determine interrupt sources to enable. */ isn_bits = 0; if (cmd->chanlist) { - for (n = 0; n < cmd->chanlist_len; n++) { + for (n = 0; n < cmd->chanlist_len; n++) isn_bits |= (1U << CR_CHAN(cmd->chanlist[n])); - } } isn_bits &= subpriv->valid_isns; /* Enable interrupt sources. */ subpriv->enabled_isns = isn_bits; - if (subpriv->has_int_sce) { + if (subpriv->has_int_sce) outb(isn_bits, subpriv->iobase); - } } return retval; @@ -662,14 +661,13 @@ dio200_inttrig_start_intr(struct comedi_device *dev, struct comedi_subdevice *s, spin_lock_irqsave(&subpriv->spinlock, flags); s->async->inttrig = 0; - if (subpriv->active) { + if (subpriv->active) event = dio200_start_intr(dev, s); - } + spin_unlock_irqrestore(&subpriv->spinlock, flags); - if (event) { + if (event) comedi_event(dev, s); - } return 1; } @@ -726,9 +724,8 @@ static int dio200_handle_read_intr(struct comedi_device *dev, * Reenable them NOW to minimize the time they are disabled. */ cur_enabled = subpriv->enabled_isns; - if (subpriv->has_int_sce) { + if (subpriv->has_int_sce) outb(cur_enabled, subpriv->iobase); - } if (subpriv->active) { /* @@ -747,9 +744,8 @@ static int dio200_handle_read_intr(struct comedi_device *dev, len = s->async->cmd.chanlist_len; for (n = 0; n < len; n++) { ch = CR_CHAN(s->async->cmd.chanlist[n]); - if (triggered & (1U << ch)) { + if (triggered & (1U << ch)) val |= (1U << n); - } } /* Write the scan to the buffer. */ if (comedi_buf_put(s->async, val)) { @@ -781,9 +777,8 @@ static int dio200_handle_read_intr(struct comedi_device *dev, } spin_unlock_irqrestore(&subpriv->spinlock, flags); - if (oldevents != s->async->events) { + if (oldevents != s->async->events) comedi_event(dev, s); - } return (triggered != 0); } @@ -798,9 +793,9 @@ static int dio200_subdev_intr_cancel(struct comedi_device *dev, unsigned long flags; spin_lock_irqsave(&subpriv->spinlock, flags); - if (subpriv->active) { + if (subpriv->active) dio200_stop_intr(dev, s); - } + spin_unlock_irqrestore(&subpriv->spinlock, flags); return 0; @@ -846,7 +841,8 @@ dio200_subdev_intr_cmdtest(struct comedi_device *dev, if (err) return 1; - /* step 2: make sure trigger sources are unique and mutually compatible */ + /* step 2: make sure trigger sources are unique and mutually + compatible */ /* these tests are true if more than one _src bit is set */ if ((cmd->start_src & (cmd->start_src - 1)) != 0) @@ -952,9 +948,8 @@ static int dio200_subdev_intr_cmd(struct comedi_device *dev, } spin_unlock_irqrestore(&subpriv->spinlock, flags); - if (event) { + if (event) comedi_event(dev, s); - } return 0; } @@ -980,9 +975,8 @@ dio200_subdev_intr_init(struct comedi_device *dev, struct comedi_subdevice *s, subpriv->valid_isns = valid_isns; spin_lock_init(&subpriv->spinlock); - if (has_int_sce) { + if (has_int_sce) outb(0, subpriv->iobase); /* Disable interrupt sources. */ - } s->private = subpriv; s->type = COMEDI_SUBD_DI; @@ -1013,10 +1007,7 @@ dio200_subdev_intr_cleanup(struct comedi_device *dev, struct comedi_subdevice *s) { struct dio200_subdev_intr *subpriv = s->private; - - if (subpriv) { - kfree(subpriv); - } + kfree(subpriv); } /* @@ -1027,9 +1018,8 @@ static irqreturn_t dio200_interrupt(int irq, void *d) struct comedi_device *dev = d; int handled; - if (!dev->attached) { + if (!dev->attached) return IRQ_NONE; - } if (devpriv->intr_sd >= 0) { handled = dio200_handle_read_intr(dev, @@ -1266,10 +1256,7 @@ dio200_subdev_8254_cleanup(struct comedi_device *dev, struct comedi_subdevice *s) { struct dio200_subdev_intr *subpriv = s->private; - - if (subpriv) { - kfree(subpriv); - } + kfree(subpriv); } /* @@ -1348,9 +1335,8 @@ static int dio200_attach(struct comedi_device *dev, struct comedi_devconfig *it) #endif { ret = dio200_request_region(dev->minor, iobase, DIO200_IO_SIZE); - if (ret < 0) { + if (ret < 0) return ret; - } } dev->iobase = iobase; @@ -1371,17 +1357,17 @@ static int dio200_attach(struct comedi_device *dev, struct comedi_devconfig *it) ret = dio200_subdev_8254_init(dev, s, iobase, layout->sdinfo[n], layout->has_clk_gat_sce); - if (ret < 0) { + if (ret < 0) return ret; - } + break; case sd_8255: /* digital i/o subdevice (8255) */ ret = subdev_8255_init(dev, s, 0, iobase + layout->sdinfo[n]); - if (ret < 0) { + if (ret < 0) return ret; - } + break; case sd_intr: /* 'INTERRUPT' subdevice */ @@ -1392,9 +1378,9 @@ static int dio200_attach(struct comedi_device *dev, struct comedi_devconfig *it) layout->sdinfo[n], layout-> has_int_sce); - if (ret < 0) { + if (ret < 0) return ret; - } + devpriv->intr_sd = n; } else { s->type = COMEDI_SUBD_UNUSED; @@ -1407,9 +1393,8 @@ static int dio200_attach(struct comedi_device *dev, struct comedi_devconfig *it) } sdx = devpriv->intr_sd; - if (sdx >= 0 && sdx < dev->n_subdevices) { + if (sdx >= 0 && sdx < dev->n_subdevices) dev->read_subdev = &dev->subdevices[sdx]; - } dev->board_name = thisboard->name; @@ -1434,11 +1419,10 @@ static int dio200_attach(struct comedi_device *dev, struct comedi_devconfig *it) printk("(pci %s) ", pci_name(pci_dev)); #endif } - if (irq) { + if (irq) printk("(irq %u%s) ", irq, (dev->irq ? "" : " UNAVAILABLE")); - } else { + else printk("(no irq) "); - } printk("attached\n"); @@ -1461,9 +1445,8 @@ static int dio200_detach(struct comedi_device *dev) printk(KERN_DEBUG "comedi%d: %s: detach\n", dev->minor, DIO200_DRIVER_NAME); - if (dev->irq) { + if (dev->irq) free_irq(dev->irq, dev); - } if (dev->subdevices) { layout = thislayout; for (n = 0; n < dev->n_subdevices; n++) { @@ -1486,22 +1469,19 @@ static int dio200_detach(struct comedi_device *dev) if (devpriv) { #ifdef CONFIG_COMEDI_PCI if (devpriv->pci_dev) { - if (dev->iobase) { + if (dev->iobase) comedi_pci_disable(devpriv->pci_dev); - } pci_dev_put(devpriv->pci_dev); } else #endif { - if (dev->iobase) { + if (dev->iobase) release_region(dev->iobase, DIO200_IO_SIZE); - } } } - if (dev->board_name) { + if (dev->board_name) printk(KERN_INFO "comedi%d: %s removed\n", dev->minor, dev->board_name); - } return 0; } From 9f7a344b69485dc1052534a4e1b2e5a8f7de086e Mon Sep 17 00:00:00 2001 From: Benjamin Adolphi Date: Sun, 21 Feb 2010 21:51:00 +0100 Subject: [PATCH 314/367] Staging: comedi: amplc_pc236: Checkpatch cleanups This fixes all checkpatch issues in the amplc_pc236 comedi driver. Signed-off-by: Benjamin Adolphi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/amplc_pc236.c | 46 +++++++++----------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/drivers/staging/comedi/drivers/amplc_pc236.c b/drivers/staging/comedi/drivers/amplc_pc236.c index 1032a8110d6e..a307d68d79c6 100644 --- a/drivers/staging/comedi/drivers/amplc_pc236.c +++ b/drivers/staging/comedi/drivers/amplc_pc236.c @@ -78,18 +78,18 @@ unused. */ /* Disable interrupt, also clear any interrupt there */ #define PCI236_INTR_DISABLE (PLX9052_INTCSR_LI1ENAB_DISABLED \ - | PLX9052_INTCSR_LI1POL_HIGH \ - | PLX9052_INTCSR_LI2POL_HIGH \ - | PLX9052_INTCSR_PCIENAB_DISABLED \ - | PLX9052_INTCSR_LI1SEL_EDGE \ - | PLX9052_INTCSR_LI1CLRINT_ASSERTED) + | PLX9052_INTCSR_LI1POL_HIGH \ + | PLX9052_INTCSR_LI2POL_HIGH \ + | PLX9052_INTCSR_PCIENAB_DISABLED \ + | PLX9052_INTCSR_LI1SEL_EDGE \ + | PLX9052_INTCSR_LI1CLRINT_ASSERTED) /* Enable interrupt, also clear any interrupt there. */ #define PCI236_INTR_ENABLE (PLX9052_INTCSR_LI1ENAB_ENABLED \ - | PLX9052_INTCSR_LI1POL_HIGH \ - | PLX9052_INTCSR_LI2POL_HIGH \ - | PLX9052_INTCSR_PCIENAB_ENABLED \ - | PLX9052_INTCSR_LI1SEL_EDGE \ - | PLX9052_INTCSR_LI1CLRINT_ASSERTED) + | PLX9052_INTCSR_LI1POL_HIGH \ + | PLX9052_INTCSR_LI2POL_HIGH \ + | PLX9052_INTCSR_PCIENAB_ENABLED \ + | PLX9052_INTCSR_LI1SEL_EDGE \ + | PLX9052_INTCSR_LI1CLRINT_ASSERTED) /* * Board descriptions for Amplicon PC36AT and PCI236. @@ -150,12 +150,13 @@ MODULE_DEVICE_TABLE(pci, pc236_pci_table); /* this structure is for data unique to this hardware driver. If several hardware drivers keep similar information in this structure, - feel free to suggest moving the variable to the struct comedi_device struct. */ + feel free to suggest moving the variable to the struct comedi_device struct. + */ struct pc236_private { #ifdef CONFIG_COMEDI_PCI /* PCI device */ struct pci_dev *pci_dev; - unsigned long lcr_iobase; /* PLX PCI9052 config registers in PCIBAR1 */ + unsigned long lcr_iobase; /* PLX PCI9052 config registers in PCIBAR1 */ #endif int enable_irq; }; @@ -345,9 +346,8 @@ static int pc236_attach(struct comedi_device *dev, struct comedi_devconfig *it) #endif { ret = pc236_request_region(dev->minor, iobase, PC236_IO_SIZE); - if (ret < 0) { + if (ret < 0) return ret; - } } dev->iobase = iobase; @@ -399,11 +399,10 @@ static int pc236_attach(struct comedi_device *dev, struct comedi_devconfig *it) printk("(pci %s) ", pci_name(pci_dev)); #endif } - if (irq) { + if (irq) printk("(irq %u%s) ", irq, (dev->irq ? "" : " UNAVAILABLE")); - } else { + else printk("(no irq) "); - } printk("attached\n"); @@ -422,27 +421,24 @@ static int pc236_detach(struct comedi_device *dev) { printk(KERN_DEBUG "comedi%d: %s: detach\n", dev->minor, PC236_DRIVER_NAME); - if (devpriv) { + if (devpriv) pc236_intr_disable(dev); - } + if (dev->irq) free_irq(dev->irq, dev); - if (dev->subdevices) { + if (dev->subdevices) subdev_8255_cleanup(dev, dev->subdevices + 0); - } if (devpriv) { #ifdef CONFIG_COMEDI_PCI if (devpriv->pci_dev) { - if (dev->iobase) { + if (dev->iobase) comedi_pci_disable(devpriv->pci_dev); - } pci_dev_put(devpriv->pci_dev); } else #endif { - if (dev->iobase) { + if (dev->iobase) release_region(dev->iobase, PC236_IO_SIZE); - } } } if (dev->board_name) { From 2021937c6d8ec1212b8f4fa01e86f852c9b96368 Mon Sep 17 00:00:00 2001 From: OGAWA Hirofumi Date: Tue, 23 Feb 2010 03:04:42 +0900 Subject: [PATCH 315/367] Staging: comedi: serial2002: Fix filp_open usage Signed-off-by: OGAWA Hirofumi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/serial2002.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/serial2002.c b/drivers/staging/comedi/drivers/serial2002.c index db37dcdd98b6..dd2b90372794 100644 --- a/drivers/staging/comedi/drivers/serial2002.c +++ b/drivers/staging/comedi/drivers/serial2002.c @@ -397,7 +397,7 @@ static void serial_2002_open(struct comedi_device *dev) char port[20]; sprintf(port, "/dev/ttyS%d", devpriv->port); - devpriv->tty = filp_open(port, 0, O_RDWR); + devpriv->tty = filp_open(port, O_RDWR, 0); if (IS_ERR(devpriv->tty)) { printk("serial_2002: file open error = %ld\n", PTR_ERR(devpriv->tty)); From ea12ac4fd241a141cc64683f4293f48bed84fd42 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Mon, 22 Feb 2010 15:32:32 -0500 Subject: [PATCH 316/367] Staging: comedi: Increased timeout for digital output dma loading Increased timeout for digital output dma loading, due to report of it being too short for some hardware. Signed-off-by: Frank Mori Hess Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_mio_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index d6d49c3bbf1c..bd16f913af23 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -3795,7 +3795,7 @@ static int ni_cdo_inttrig(struct comedi_device *dev, struct comedi_subdevice *s, #endif int retval = 0; unsigned i; - const unsigned timeout = 100; + const unsigned timeout = 1000; s->async->inttrig = NULL; From 0f7cf0034c6b9aafea3605ec61145c9b54b1b208 Mon Sep 17 00:00:00 2001 From: Sylvain Trias Date: Wed, 24 Feb 2010 00:17:52 +0100 Subject: [PATCH 317/367] Staging: line6: variax.c: fixed a space a "x ? a : b" coding style issue Fixed a coding style issue. Signed-off-by: Sylvain Trias Signed-off-by: Greg Kroah-Hartman --- drivers/staging/line6/variax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/line6/variax.c b/drivers/staging/line6/variax.c index 48d834b0fa1b..58fef82c247d 100644 --- a/drivers/staging/line6/variax.c +++ b/drivers/staging/line6/variax.c @@ -254,7 +254,7 @@ static ssize_t variax_set_active(struct device *dev, if (ret) return ret; - variax->buffer_activate[VARIAX_OFFSET_ACTIVATE] = value ? 1: 0; + variax->buffer_activate[VARIAX_OFFSET_ACTIVATE] = value ? 1 : 0; line6_send_raw_message_async(&variax->line6, variax->buffer_activate, sizeof(variax_activate)); return count; From 128a5d0223ebef1cb6c0d94b3f87b49e38a11443 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Wed, 24 Feb 2010 11:39:20 -0800 Subject: [PATCH 318/367] Staging: rtl8192* needs semaphore.h The rtl8192* drivers in staging use semaphores, so they need to #include . (similar to staging-rtl8187se-needs-semaphore.h.patch) drivers/staging/rtl8192e/ieee80211/ieee80211.h:2038: error: field 'ips_sem' has incomplete type drivers/staging/rtl8192e/ieee80211/ieee80211.h:2249: error: field 'wx_sem' has incomplete type drivers/staging/rtl8192e/ieee80211/ieee80211.h:2250: error: field 'scan_sem' has incomplete type drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c:442: error: implicit declaration of function 'down' drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c:500: error: implicit declaration of function 'up' drivers/staging/rtl8192e/ieee80 211/ieee80211_softmac.c:3165: error: implicit declaration of function 'sema_init' drivers/staging/rtl8192su/ieee80211/ieee80211.h:1330: error: field 'wx_sem' has incomplete type drivers/staging/rtl8192su/ieee80211/ieee80211.h:1331: error: field 'scan_sem' has incomplete type drivers/staging/rtl8192u/ieee80211/ieee80211.h:2010: error: field 'wx_sem' has incomplete type drivers/staging/rtl8192u/ieee80211/ieee80211.h:2011: error: field 'scan_sem' has incomplete type Signed-off-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192e/ieee80211/ieee80211.h | 1 + drivers/staging/rtl8192su/ieee80211/ieee80211.h | 1 + drivers/staging/rtl8192u/ieee80211/ieee80211.h | 1 + 3 files changed, 3 insertions(+) diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211.h b/drivers/staging/rtl8192e/ieee80211/ieee80211.h index 5859f66ff013..1f613a28152f 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211.h @@ -35,6 +35,7 @@ #endif #include #include +#include #include #include diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211.h b/drivers/staging/rtl8192su/ieee80211/ieee80211.h index 159fddf628e2..caa580e2c662 100644 --- a/drivers/staging/rtl8192su/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192su/ieee80211/ieee80211.h @@ -30,6 +30,7 @@ #include #include #include +#include #include #include diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h index 3cda38bb6b77..39847c81e29c 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h @@ -30,6 +30,7 @@ #include #include #include +#include #include #include From 83a0f9bc658b20b06740691d9ee711c5d14b6e8a Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Thu, 25 Feb 2010 09:55:03 -0800 Subject: [PATCH 319/367] Staging: fix wlan-ng printk format warning Fix prism2fw.c printk format warning: drivers/staging/wlan-ng/prism2fw.c:209: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' Signed-off-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/prism2fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c index baa20a7c930d..b57601250dc7 100644 --- a/drivers/staging/wlan-ng/prism2fw.c +++ b/drivers/staging/wlan-ng/prism2fw.c @@ -205,7 +205,7 @@ int prism2_fwtry(struct usb_device *udev, wlandevice_t *wlandev) return 1; } - printk(KERN_INFO "prism2_usb: %s will be processed, size %d\n", + printk(KERN_INFO "prism2_usb: %s will be processed, size %zu\n", PRISM2_USB_FWFILE, fw_entry->size); prism2_fwapply((const struct ihex_binrec *)fw_entry->data, wlandev); From 582de7caf578f3ed1f52bc93ad926a580af885b4 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Thu, 25 Feb 2010 14:41:22 -0800 Subject: [PATCH 320/367] Staging/pohmelfs: fix write_inode parameter warning sparse warns that: drivers/staging/pohmelfs/inode.c:1797: warning: initialization from incompatible pointer type so fix pohmelfs_write_inode() to have the expected parameters. Signed-off-by: Randy Dunlap Cc: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman --- drivers/staging/pohmelfs/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/pohmelfs/inode.c b/drivers/staging/pohmelfs/inode.c index eec3798eaf25..bf38280def3f 100644 --- a/drivers/staging/pohmelfs/inode.c +++ b/drivers/staging/pohmelfs/inode.c @@ -396,7 +396,8 @@ int pohmelfs_remove_child(struct pohmelfs_inode *pi, struct pohmelfs_name *n) /* * Writeback for given inode. */ -static int pohmelfs_write_inode(struct inode *inode, int sync) +static int pohmelfs_write_inode(struct inode *inode, + struct writeback_control *wbc) { struct pohmelfs_inode *pi = POHMELFS_I(inode); From 092579690107ffdf9b146de7e67379d8434e9bb0 Mon Sep 17 00:00:00 2001 From: Jim Dog Date: Thu, 25 Feb 2010 11:38:21 +0000 Subject: [PATCH 321/367] Staging: wlan-ng: Fixed line length issues in prism2usb.c This is a patch to the prism2usb.c that fixes one line which was over the 80 character limit by wrapping it to a new line and removes a commented out configuration for a ZyDAS ZD1201 device since support for this device with this driver is now deprecated. Signed-off-by: Jim Dog Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/prism2usb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wlan-ng/prism2usb.c b/drivers/staging/wlan-ng/prism2usb.c index 9dde68be8d74..501d27f74c7d 100644 --- a/drivers/staging/wlan-ng/prism2usb.c +++ b/drivers/staging/wlan-ng/prism2usb.c @@ -24,8 +24,9 @@ static struct usb_device_id usb_prism_tbl[] = { (0x066b, 0x2213, "Linksys WUSB12v1.1 11Mbps WLAN USB Adapter")}, {PRISM_USB_DEVICE (0x067c, 0x1022, "Siemens SpeedStream 1022 11Mbps WLAN USB Adapter")}, - {PRISM_USB_DEVICE(0x049f, 0x0033, - "Compaq/Intel W100 PRO/Wireless 11Mbps multiport WLAN Adapter")}, + {PRISM_USB_DEVICE + (0x049f, 0x0033, + "Compaq/Intel W100 PRO/Wireless 11Mbps multiport WLAN Adapter")}, {PRISM_USB_DEVICE (0x0411, 0x0016, "Melco WLI-USB-S11 11Mbps WLAN Adapter")}, {PRISM_USB_DEVICE @@ -55,7 +56,6 @@ static struct usb_device_id usb_prism_tbl[] = { (0x04f1, 0x3009, "JVC MP-XP7250 Builtin USB WLAN Adapter")}, {PRISM_USB_DEVICE(0x0846, 0x4110, "NetGear MA111")}, {PRISM_USB_DEVICE(0x03f3, 0x0020, "Adaptec AWN-8020 USB WLAN Adapter")}, -/* {PRISM_USB_DEVICE(0x0ace, 0x1201, "ZyDAS ZD1201 Wireless USB Adapter")}, */ {PRISM_USB_DEVICE(0x2821, 0x3300, "ASUS-WL140 Wireless USB Adapter")}, {PRISM_USB_DEVICE(0x2001, 0x3700, "DWL-122 Wireless USB Adapter")}, {PRISM_USB_DEVICE From 21b0838c1a03686277e0cfeda42015e4538b9ea3 Mon Sep 17 00:00:00 2001 From: Ameya Palande <2ameya@gmail.com> Date: Wed, 24 Feb 2010 20:18:28 +0200 Subject: [PATCH 322/367] Staging: crystalhd: Misc improvements for crystalhd_lnx.c This patch does following improvements: 1. Follow kernel style for comments 2. Reorganize code for readability improvement 3. Use PCI helper macros 4. Use __devinit, __devexit, __devexit_p at necessary places 5. Mark functions and data as static when it is not exported Signed-off-by: Ameya Palande <2ameya@gmail.com> Cc: Naren Sankar Cc: Jarod Wilson Cc: Scott Davilla Cc: Manu Abraham Signed-off-by: Greg Kroah-Hartman --- drivers/staging/crystalhd/crystalhd_cmds.c | 4 +- drivers/staging/crystalhd/crystalhd_lnx.c | 77 +++++++++------------- drivers/staging/crystalhd/crystalhd_misc.c | 3 +- 3 files changed, 35 insertions(+), 49 deletions(-) diff --git a/drivers/staging/crystalhd/crystalhd_cmds.c b/drivers/staging/crystalhd/crystalhd_cmds.c index 39c641d6b672..26145a8d0f78 100644 --- a/drivers/staging/crystalhd/crystalhd_cmds.c +++ b/drivers/staging/crystalhd/crystalhd_cmds.c @@ -948,7 +948,7 @@ BC_STATUS crystalhd_user_close(struct crystalhd_cmd *ctx, struct crystalhd_user * * Called at the time of driver load. */ -BC_STATUS crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx, +BC_STATUS __devinit crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx, struct crystalhd_adp *adp) { int i = 0; @@ -983,7 +983,7 @@ BC_STATUS crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx, * * Called at the time of driver un-load. */ -BC_STATUS crystalhd_delete_cmd_context(struct crystalhd_cmd *ctx) +BC_STATUS __devexit crystalhd_delete_cmd_context(struct crystalhd_cmd *ctx) { BCMLOG(BCMLOG_DBG, "Deleting Command context..\n"); diff --git a/drivers/staging/crystalhd/crystalhd_lnx.c b/drivers/staging/crystalhd/crystalhd_lnx.c index 1f36b4db6fce..3eac70aa213c 100644 --- a/drivers/staging/crystalhd/crystalhd_lnx.c +++ b/drivers/staging/crystalhd/crystalhd_lnx.c @@ -1,28 +1,19 @@ /*************************************************************************** - * Copyright (c) 2005-2009, Broadcom Corporation. - * - * Name: crystalhd_lnx . c - * - * Description: - * BCM70010 Linux driver - * - * HISTORY: - * - ********************************************************************** - * This file is part of the crystalhd device driver. - * - * This driver is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 2 of the License. - * - * This driver is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this driver. If not, see . - **********************************************************************/ + BCM70010 Linux driver + Copyright (c) 2005-2009, Broadcom Corporation. + + This driver is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, version 2 of the License. + + This driver is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this driver. If not, see . +***************************************************************************/ #include @@ -268,7 +259,7 @@ static int chd_dec_api_cmd(struct crystalhd_adp *adp, unsigned long ua, return rc; } -/* ========================= API interfaces =================================*/ +/* API interfaces */ static int chd_dec_ioctl(struct inode *in, struct file *fd, unsigned int cmd, unsigned long ua) { @@ -358,7 +349,7 @@ static const struct file_operations chd_dec_fops = { .release = chd_dec_close, }; -static int chd_dec_init_chdev(struct crystalhd_adp *adp) +static int __devinit chd_dec_init_chdev(struct crystalhd_adp *adp) { crystalhd_ioctl_data *temp; struct device *dev; @@ -420,7 +411,7 @@ fail: return rc; } -static void chd_dec_release_chdev(struct crystalhd_adp *adp) +static void __devexit chd_dec_release_chdev(struct crystalhd_adp *adp) { crystalhd_ioctl_data *temp = NULL; if (!adp) @@ -446,7 +437,7 @@ static void chd_dec_release_chdev(struct crystalhd_adp *adp) crystalhd_delete_elem_pool(adp); } -static int chd_pci_reserve_mem(struct crystalhd_adp *pinfo) +static int __devinit chd_pci_reserve_mem(struct crystalhd_adp *pinfo) { int rc; unsigned long bar2 = pci_resource_start(pinfo->pdev, 2); @@ -499,7 +490,7 @@ static int chd_pci_reserve_mem(struct crystalhd_adp *pinfo) return 0; } -static void chd_pci_release_mem(struct crystalhd_adp *pinfo) +static void __devexit chd_pci_release_mem(struct crystalhd_adp *pinfo) { if (!pinfo) return; @@ -514,7 +505,7 @@ static void chd_pci_release_mem(struct crystalhd_adp *pinfo) } -static void chd_dec_pci_remove(struct pci_dev *pdev) +static void __devexit chd_dec_pci_remove(struct pci_dev *pdev) { struct crystalhd_adp *pinfo; BC_STATUS sts = BC_STS_SUCCESS; @@ -542,7 +533,7 @@ static void chd_dec_pci_remove(struct pci_dev *pdev) g_adp_info = NULL; } -static int chd_dec_pci_probe(struct pci_dev *pdev, +static int __devinit chd_dec_pci_probe(struct pci_dev *pdev, const struct pci_device_id *entry) { struct crystalhd_adp *pinfo; @@ -621,7 +612,6 @@ static int chd_dec_pci_probe(struct pci_dev *pdev, g_adp_info = pinfo; return 0; - } #ifdef CONFIG_PM @@ -700,24 +690,22 @@ int chd_dec_pci_resume(struct pci_dev *pdev) } #endif -static struct pci_device_id chd_dec_pci_id_table[] = { -/* vendor, device, subvendor, subdevice, class, classmask, driver_data */ - { 0x14e4, 0x1612, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 }, +static DEFINE_PCI_DEVICE_TABLE(chd_dec_pci_id_table) = { + { PCI_VDEVICE(BROADCOM, 0x1612), 8 }, { 0, }, }; +MODULE_DEVICE_TABLE(pci, chd_dec_pci_id_table); -struct pci_driver bc_chd_70012_driver = { +static struct pci_driver bc_chd_70012_driver = { .name = "Broadcom 70012 Decoder", .probe = chd_dec_pci_probe, - .remove = chd_dec_pci_remove, + .remove = __devexit_p(chd_dec_pci_remove), .id_table = chd_dec_pci_id_table, #ifdef CONFIG_PM .suspend = chd_dec_pci_suspend, .resume = chd_dec_pci_resume #endif }; -MODULE_DEVICE_TABLE(pci, chd_dec_pci_id_table); - void chd_set_log_level(struct crystalhd_adp *adp, char *arg) { @@ -744,7 +732,7 @@ struct crystalhd_adp *chd_get_adp(void) return g_adp_info; } -int __init chd_dec_module_init(void) +static int __init chd_dec_module_init(void) { int rc; @@ -759,22 +747,19 @@ int __init chd_dec_module_init(void) return rc; } +module_init(chd_dec_module_init); -void __exit chd_dec_module_cleanup(void) +static void __exit chd_dec_module_cleanup(void) { BCMLOG(BCMLOG_DATA, "unloading crystalhd %d.%d.%d \n", crystalhd_kmod_major, crystalhd_kmod_minor, crystalhd_kmod_rev); pci_unregister_driver(&bc_chd_70012_driver); } - +module_exit(chd_dec_module_cleanup); MODULE_AUTHOR("Naren Sankar "); MODULE_AUTHOR("Prasad Bolisetty "); MODULE_DESCRIPTION(CRYSTAL_HD_NAME); MODULE_LICENSE("GPL"); MODULE_ALIAS("bcm70012"); - -module_init(chd_dec_module_init); -module_exit(chd_dec_module_cleanup); - diff --git a/drivers/staging/crystalhd/crystalhd_misc.c b/drivers/staging/crystalhd/crystalhd_misc.c index 32e632c2ab3e..587dcc477865 100644 --- a/drivers/staging/crystalhd/crystalhd_misc.c +++ b/drivers/staging/crystalhd/crystalhd_misc.c @@ -959,7 +959,8 @@ void crystalhd_destroy_dio_pool(struct crystalhd_adp *adp) * Create general purpose list element pool to hold pending, * and active requests. */ -int crystalhd_create_elem_pool(struct crystalhd_adp *adp, uint32_t pool_size) +int __devinit crystalhd_create_elem_pool(struct crystalhd_adp *adp, + uint32_t pool_size) { uint32_t i; crystalhd_elem_t *temp; From c852ab66727558e7fb9c994a12ff30cc3d0e2448 Mon Sep 17 00:00:00 2001 From: Sven-Thorsten Dietrich Date: Tue, 23 Feb 2010 13:59:18 -0800 Subject: [PATCH 323/367] Staging: make drivers use spin_lock_init() This fixes some RT-triggered compile errors and typos. Signed-off-by: Sven-Thorsten Dietrich Acked-by: Marek Lindner Acked-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/staging/batman-adv/device.c | 2 +- drivers/staging/iio/ring_generic.h | 3 +-- drivers/staging/iio/ring_sw.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/batman-adv/device.c b/drivers/staging/batman-adv/device.c index 451898cd9ecb..e7f44215b5f3 100644 --- a/drivers/staging/batman-adv/device.c +++ b/drivers/staging/batman-adv/device.c @@ -118,7 +118,7 @@ int bat_device_open(struct inode *inode, struct file *file) INIT_LIST_HEAD(&device_client->queue_list); device_client->queue_len = 0; device_client->index = i; - device_client->lock = __SPIN_LOCK_UNLOCKED(device_client->lock); + spin_lock_init(&device_client->lock); init_waitqueue_head(&device_client->queue_wait); file->private_data = device_client; diff --git a/drivers/staging/iio/ring_generic.h b/drivers/staging/iio/ring_generic.h index 93b91b28a02f..09044adf7327 100644 --- a/drivers/staging/iio/ring_generic.h +++ b/drivers/staging/iio/ring_generic.h @@ -146,8 +146,7 @@ static inline void __iio_init_ring_buffer(struct iio_ring_buffer *ring, ring->length = length; ring->loopcount = 0; ring->shared_ev_pointer.ev_p = 0; - ring->shared_ev_pointer.lock = - __SPIN_LOCK_UNLOCKED(ring->shared_ev_pointer->loc); + spin_lock_init(&ring->shared_ev_pointer.lock); } /** diff --git a/drivers/staging/iio/ring_sw.c b/drivers/staging/iio/ring_sw.c index b746cf603225..6f7f4d5a93f3 100644 --- a/drivers/staging/iio/ring_sw.c +++ b/drivers/staging/iio/ring_sw.c @@ -20,7 +20,7 @@ static inline int __iio_init_sw_ring_buffer(struct iio_sw_ring_buffer *ring, return -EINVAL; __iio_init_ring_buffer(&ring->buf, bytes_per_datum, length); - ring->use_lock = __SPIN_LOCK_UNLOCKED((ring)->use_lock); + spin_lock_init(&ring->use_lock); ring->data = kmalloc(length*ring->buf.bpd, GFP_KERNEL); ring->read_p = 0; ring->write_p = 0; From 2f22560880786acceb6bc63cbda7125e8d9a2206 Mon Sep 17 00:00:00 2001 From: Florian Schilhabel Date: Fri, 19 Feb 2010 20:10:00 +0100 Subject: [PATCH 324/367] Staging: rtl8192su: Remove Firmware from r8192SU_HWImg.c Because the Firmware is loaded from RTL8192SU/rtl8192sfw.bin, it it save, to remove it from r8192SU_HWImg.c Signed-off-by: Florian Schilhabel Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192su/r8192SU_HWImg.c | 4276 ------------------- drivers/staging/rtl8192su/r8192SU_HWImg.h | 2 - drivers/staging/rtl8192su/r8192S_firmware.c | 129 +- drivers/staging/rtl8192su/r8192S_firmware.h | 7 - drivers/staging/rtl8192su/r8192U.h | 1 - 5 files changed, 35 insertions(+), 4380 deletions(-) diff --git a/drivers/staging/rtl8192su/r8192SU_HWImg.c b/drivers/staging/rtl8192su/r8192SU_HWImg.c index cbb65795a302..ba8e12c209ca 100644 --- a/drivers/staging/rtl8192su/r8192SU_HWImg.c +++ b/drivers/staging/rtl8192su/r8192SU_HWImg.c @@ -2,4282 +2,6 @@ #include "r8192SU_HWImg.h" -u8 Rtl8192SUFwImgArray[ImgArrayLength] = { -0x92,0x81,0x2b,0x90,0x30,0x00,0x00,0x00,0x08,0x74,0x00,0x00,0x88,0x96,0x00,0x00, -0x30,0x00,0x00,0x00,0x00,0x95,0x00,0x00,0x00,0x00,0x2b,0x00,0x03,0x03,0x23,0x00, -0x92,0x81,0x02,0x01,0x00,0x00,0x12,0x04,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x01,0x01,0x01,0x00,0x00, -0x00,0x01,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x7f,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x1f,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x25,0xb0,0x1a,0x3c,0x80,0x03,0x5a,0x37,0x00,0x80,0x1b,0x3c,0x80,0x00,0x7b,0x37, -0x00,0x00,0x5b,0xaf,0x25,0xb0,0x1a,0x3c,0x18,0x03,0x5a,0x37,0x00,0x80,0x1b,0x3c, -0x80,0x00,0x7b,0x37,0x00,0x00,0x5b,0xaf,0x00,0x80,0x1a,0x3c,0x10,0x6d,0x5a,0x27, -0x08,0x00,0x40,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x04,0x00,0xa1,0xaf,0x08,0x00,0xa2,0xaf,0x0c,0x00,0xa3,0xaf,0x10,0x00,0xa4,0xaf, -0x14,0x00,0xa5,0xaf,0x18,0x00,0xa6,0xaf,0x1c,0x00,0xa7,0xaf,0x20,0x00,0xa8,0xaf, -0x24,0x00,0xa9,0xaf,0x28,0x00,0xaa,0xaf,0x2c,0x00,0xab,0xaf,0x30,0x00,0xac,0xaf, -0x34,0x00,0xad,0xaf,0x38,0x00,0xae,0xaf,0x3c,0x00,0xaf,0xaf,0x12,0x40,0x00,0x00, -0x10,0x48,0x00,0x00,0x00,0x70,0x0a,0x40,0x40,0x00,0xb0,0xaf,0x44,0x00,0xb1,0xaf, -0x48,0x00,0xb2,0xaf,0x4c,0x00,0xb3,0xaf,0x50,0x00,0xb4,0xaf,0x54,0x00,0xb5,0xaf, -0x58,0x00,0xb6,0xaf,0x5c,0x00,0xb7,0xaf,0x60,0x00,0xb8,0xaf,0x64,0x00,0xb9,0xaf, -0x68,0x00,0xbc,0xaf,0x6c,0x00,0xbd,0xaf,0x70,0x00,0xbe,0xaf,0x74,0x00,0xbf,0xaf, -0x78,0x00,0xa8,0xaf,0x7c,0x00,0xa9,0xaf,0x80,0x00,0xaa,0xaf,0xdf,0x1a,0x00,0x08, -0x21,0x20,0xa0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x25,0xb0,0x06,0x3c,0x00,0x80,0x02,0x3c,0xe8,0xff,0xbd,0x27,0x18,0x03,0xc3,0x34, -0x00,0x03,0x42,0x24,0x14,0x00,0xbf,0xaf,0x10,0x00,0xb0,0xaf,0x00,0x00,0x62,0xac, -0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40,0x42,0xb0,0x03,0x3c, -0x03,0x00,0x63,0x34,0x00,0x00,0x62,0x90,0x02,0x80,0x0a,0x3c,0x02,0x80,0x10,0x3c, -0xff,0x00,0x42,0x30,0x00,0x46,0x02,0x00,0x10,0x00,0x42,0x30,0x13,0x00,0x40,0x10, -0x03,0x46,0x08,0x00,0xc4,0x7d,0x42,0x8d,0x68,0x15,0x05,0x26,0xd4,0x63,0xa4,0x94, -0x01,0x00,0x47,0x24,0x10,0x00,0x02,0x24,0xb0,0x03,0xc9,0x34,0x00,0x00,0x62,0xa0, -0x07,0x00,0x80,0x10,0x1c,0x03,0xc6,0x34,0xd8,0x63,0xa2,0x8c,0xd4,0x63,0xa0,0xa4, -0xd8,0x63,0xa0,0xac,0x00,0x00,0x04,0x24,0x00,0x00,0xc2,0xac,0x00,0x00,0x20,0xad, -0x01,0x00,0x82,0x24,0xc4,0x7d,0x47,0xad,0xd4,0x63,0xa2,0xa4,0x12,0x00,0x00,0x05, -0x42,0xb0,0x02,0x3c,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x01,0x00,0x21,0x38, -0x00,0x60,0x81,0x40,0x68,0x15,0x04,0x26,0x0c,0x4b,0x83,0x94,0x08,0x4b,0x85,0x94, -0x14,0x00,0xbf,0x8f,0x10,0x00,0xb0,0x8f,0x80,0x00,0x63,0x30,0x41,0xb0,0x02,0x3c, -0x25,0x18,0x65,0x00,0x08,0x00,0x42,0x34,0x18,0x00,0xbd,0x27,0x00,0x00,0x43,0xa4, -0x08,0x00,0xe0,0x03,0x08,0x4b,0x83,0xa4,0x80,0xff,0x03,0x24,0x03,0x00,0x42,0x34, -0x00,0x00,0x43,0xa0,0xc8,0x0e,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x60,0x01,0x40, -0x01,0x00,0x21,0x34,0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40,0x68,0x15,0x04,0x26, -0x0c,0x4b,0x83,0x94,0x08,0x4b,0x85,0x94,0x14,0x00,0xbf,0x8f,0x10,0x00,0xb0,0x8f, -0x80,0x00,0x63,0x30,0x41,0xb0,0x02,0x3c,0x25,0x18,0x65,0x00,0x08,0x00,0x42,0x34, -0x18,0x00,0xbd,0x27,0x00,0x00,0x43,0xa4,0x08,0x00,0xe0,0x03,0x08,0x4b,0x83,0xa4, -0xff,0x00,0x84,0x30,0x0b,0x00,0x82,0x2c,0xff,0xff,0xe7,0x30,0x10,0x00,0xa8,0x93, -0x19,0x00,0x40,0x10,0x21,0x18,0x00,0x00,0x02,0x80,0x03,0x3c,0x80,0x10,0x04,0x00, -0xc0,0x91,0x63,0x24,0x21,0x10,0x43,0x00,0x00,0x00,0x44,0x8c,0x00,0x00,0x00,0x00, -0x08,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x43,0xb0,0x02,0x3c,0x78,0x00,0x44,0x34, -0x07,0x00,0xe2,0x30,0x00,0x00,0x85,0xac,0x04,0x00,0x86,0xac,0x04,0x00,0x40,0x18, -0x00,0x00,0x00,0x00,0xf8,0xff,0xe2,0x30,0x08,0x00,0x42,0x24,0xff,0xff,0x47,0x30, -0x21,0x10,0xe8,0x00,0x00,0x80,0x03,0x3c,0x08,0x00,0x82,0xac,0x25,0x10,0x43,0x00, -0x08,0x00,0x82,0xac,0x01,0x00,0x03,0x24,0x08,0x00,0xe0,0x03,0x21,0x10,0x60,0x00, -0x43,0xb0,0x02,0x3c,0x20,0x01,0x00,0x08,0x6c,0x00,0x44,0x34,0x43,0xb0,0x02,0x3c, -0x20,0x01,0x00,0x08,0x60,0x00,0x44,0x34,0x43,0xb0,0x02,0x3c,0x20,0x01,0x00,0x08, -0x54,0x00,0x44,0x34,0x43,0xb0,0x02,0x3c,0x20,0x01,0x00,0x08,0x48,0x00,0x44,0x34, -0x43,0xb0,0x02,0x3c,0x20,0x01,0x00,0x08,0x3c,0x00,0x44,0x34,0x43,0xb0,0x02,0x3c, -0x20,0x01,0x00,0x08,0x30,0x00,0x44,0x34,0x43,0xb0,0x02,0x3c,0x20,0x01,0x00,0x08, -0x24,0x00,0x44,0x34,0x43,0xb0,0x02,0x3c,0x20,0x01,0x00,0x08,0x18,0x00,0x44,0x34, -0x43,0xb0,0x02,0x3c,0x20,0x01,0x00,0x08,0x0c,0x00,0x44,0x34,0x20,0x01,0x00,0x08, -0x43,0xb0,0x04,0x3c,0x01,0x00,0x02,0x24,0x25,0xb0,0x03,0x3c,0x04,0x20,0x82,0x00, -0x18,0x03,0x67,0x34,0x00,0x80,0x02,0x3c,0x43,0xb0,0x03,0x3c,0x34,0x05,0x46,0x24, -0x88,0x00,0x65,0x34,0x21,0x10,0x00,0x00,0x01,0x00,0x42,0x24,0xff,0xff,0x42,0x30, -0x05,0x00,0x43,0x2c,0xfd,0xff,0x60,0x14,0x01,0x00,0x42,0x24,0x00,0x00,0xe6,0xac, -0x00,0x00,0xa2,0x94,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0x30,0x24,0x10,0x44,0x00, -0xf4,0xff,0x40,0x1c,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0x25,0xb0,0x08,0x3c,0x00,0x80,0x02,0x3c,0xc8,0xff,0xbd,0x27,0x18,0x03,0x03,0x35, -0x90,0x05,0x42,0x24,0x00,0x00,0x62,0xac,0x30,0x00,0xb6,0xaf,0x28,0x00,0xb4,0xaf, -0x24,0x00,0xb3,0xaf,0x1c,0x00,0xb1,0xaf,0x34,0x00,0xbf,0xaf,0x2c,0x00,0xb5,0xaf, -0x20,0x00,0xb2,0xaf,0x18,0x00,0xb0,0xaf,0x0c,0x00,0xf2,0x84,0x08,0x00,0xf5,0x8c, -0xff,0x00,0xc6,0x30,0x00,0x01,0x02,0x24,0x23,0x10,0x46,0x00,0xff,0xff,0x51,0x30, -0xd0,0x03,0x08,0x35,0xff,0x00,0x96,0x30,0x00,0x00,0x12,0xad,0x21,0xa0,0xa0,0x00, -0x21,0x30,0xc5,0x00,0x00,0x00,0x15,0xad,0x21,0x20,0xc0,0x02,0x21,0x28,0xa0,0x02, -0x21,0x38,0x20,0x02,0x10,0x01,0x00,0x0c,0x10,0x00,0xa0,0xaf,0x23,0x18,0x51,0x02, -0xff,0xff,0x82,0x32,0x00,0x94,0x03,0x00,0x03,0x94,0x12,0x00,0xa6,0x01,0x00,0x08, -0x02,0x9a,0x02,0x00,0x28,0xb0,0x03,0x3c,0xc0,0x10,0x13,0x00,0x21,0x10,0x43,0x00, -0x00,0x00,0x44,0x90,0x25,0xb0,0x10,0x3c,0x20,0x10,0x02,0x3c,0xff,0x00,0x93,0x30, -0x00,0x22,0x13,0x00,0xff,0xff,0x43,0x32,0x01,0x01,0x45,0x2a,0x21,0xa0,0x82,0x00, -0x21,0xa8,0xb1,0x02,0xd0,0x03,0x02,0x36,0x00,0x01,0x11,0x24,0x0b,0x88,0x65,0x00, -0x21,0x20,0xc0,0x02,0x00,0x00,0x53,0xac,0x4d,0x01,0x00,0x0c,0xb0,0x03,0x10,0x36, -0x21,0x30,0x80,0x02,0x21,0x20,0xc0,0x02,0x21,0x28,0xa0,0x02,0x21,0x38,0x20,0x02, -0x10,0x01,0x00,0x0c,0x10,0x00,0xa0,0xaf,0x23,0x18,0x51,0x02,0x00,0x94,0x03,0x00, -0x03,0x94,0x12,0x00,0x00,0x00,0x12,0xae,0xe2,0xff,0x40,0x1e,0x00,0x00,0x00,0x00, -0x34,0x00,0xbf,0x8f,0x30,0x00,0xb6,0x8f,0x2c,0x00,0xb5,0x8f,0x28,0x00,0xb4,0x8f, -0x24,0x00,0xb3,0x8f,0x20,0x00,0xb2,0x8f,0x1c,0x00,0xb1,0x8f,0x18,0x00,0xb0,0x8f, -0x08,0x00,0xe0,0x03,0x38,0x00,0xbd,0x27,0xc8,0xff,0xbd,0x27,0x02,0x80,0x02,0x3c, -0x25,0xb0,0x04,0x3c,0x20,0x00,0xb2,0xaf,0x68,0x15,0x52,0x24,0x00,0x80,0x02,0x3c, -0x18,0x03,0x83,0x34,0xc8,0x06,0x42,0x24,0x28,0x00,0xb4,0xaf,0x24,0x00,0xb3,0xaf, -0x30,0x00,0xbf,0xaf,0x2c,0x00,0xb5,0xaf,0x1c,0x00,0xb1,0xaf,0x18,0x00,0xb0,0xaf, -0x00,0x00,0x62,0xac,0xb0,0x03,0x93,0x34,0x21,0xa0,0x40,0x02,0x54,0x64,0x42,0x8e, -0xc0,0x64,0x50,0x8e,0x21,0x20,0x00,0x00,0x00,0x00,0x62,0xae,0x58,0x64,0x42,0xae, -0x00,0x00,0x70,0xae,0x4d,0x01,0x00,0x0c,0x00,0x00,0x00,0x00,0xc0,0x64,0x44,0x8e, -0xc4,0x64,0x43,0x8e,0x20,0x00,0x84,0x24,0x3f,0x00,0x62,0x24,0x2b,0x10,0x44,0x00, -0x0a,0x18,0x82,0x00,0xc0,0x64,0x43,0xae,0xc0,0x64,0x85,0x8e,0x00,0x00,0x00,0x00, -0x00,0x00,0x65,0xae,0x02,0x80,0x02,0x3c,0xff,0xff,0x10,0x32,0x25,0x80,0x02,0x02, -0x00,0x00,0x70,0xae,0x0c,0x00,0x02,0x92,0xff,0x00,0x15,0x24,0x21,0x20,0x00,0x00, -0x00,0x00,0x62,0xae,0x0c,0x00,0x11,0x92,0x20,0x10,0x02,0x3c,0x20,0x00,0x07,0x24, -0x00,0x1a,0x11,0x00,0x21,0x18,0x62,0x00,0x05,0x00,0x35,0x12,0x21,0x30,0x60,0x00, -0x08,0x64,0x91,0xa2,0x54,0x64,0x83,0xae,0x10,0x01,0x00,0x0c,0x10,0x00,0xa0,0xaf, -0x04,0x00,0x04,0x8e,0x08,0x00,0x03,0x8e,0xff,0xe0,0x02,0x3c,0xff,0xff,0x42,0x34, -0x1f,0x00,0x84,0x30,0x24,0x18,0x62,0x00,0x00,0x26,0x04,0x00,0xff,0xdf,0x02,0x3c, -0x25,0x18,0x64,0x00,0xff,0xff,0x42,0x34,0x24,0x18,0x62,0x00,0x00,0x40,0x04,0x3c, -0x25,0x18,0x64,0x00,0xc0,0xff,0x02,0x24,0x24,0x18,0x62,0x00,0x08,0x00,0x03,0xae, -0xc9,0x64,0x84,0x92,0x2a,0xb0,0x02,0x3c,0x01,0x00,0x03,0x24,0x01,0x00,0x84,0x24, -0x01,0x00,0x42,0x34,0x00,0x00,0x43,0xa0,0xc4,0xff,0x35,0x16,0xc9,0x64,0x84,0xa2, -0xfc,0x4a,0x82,0x8e,0x41,0xb0,0x03,0x3c,0x30,0x00,0xbf,0x8f,0x00,0x38,0x42,0x34, -0x00,0x00,0x62,0xac,0x2c,0x00,0xb5,0x8f,0xfc,0x4a,0x82,0xae,0x24,0x00,0xb3,0x8f, -0x28,0x00,0xb4,0x8f,0x20,0x00,0xb2,0x8f,0x1c,0x00,0xb1,0x8f,0x18,0x00,0xb0,0x8f, -0x08,0x00,0xe0,0x03,0x38,0x00,0xbd,0x27,0x25,0xb0,0x04,0x3c,0x00,0x80,0x02,0x3c, -0xc8,0xff,0xbd,0x27,0x18,0x03,0x83,0x34,0x38,0x08,0x42,0x24,0x34,0x00,0xbf,0xaf, -0x30,0x00,0xb6,0xaf,0x2c,0x00,0xb5,0xaf,0x28,0x00,0xb4,0xaf,0x24,0x00,0xb3,0xaf, -0x20,0x00,0xb2,0xaf,0x1c,0x00,0xb1,0xaf,0x18,0x00,0xb0,0xaf,0x00,0x00,0x62,0xac, -0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40,0x02,0x80,0x16,0x3c, -0x68,0x15,0xd2,0x26,0xb0,0x03,0x93,0x34,0x2d,0x02,0x00,0x08,0x21,0xa8,0x40,0x02, -0x2a,0xb0,0x02,0x3c,0x08,0x00,0x04,0xae,0x09,0x00,0x42,0x34,0x01,0x00,0x03,0x24, -0x02,0x00,0x04,0x24,0x00,0x00,0x43,0xa0,0x00,0x00,0x44,0xa0,0x42,0x00,0x34,0x12, -0x00,0x00,0x00,0x00,0x6c,0x64,0x42,0x8e,0xd8,0x64,0x50,0x8e,0x01,0x00,0x04,0x24, -0x00,0x00,0x62,0xae,0x70,0x64,0x42,0xae,0x00,0x00,0x70,0xae,0x4d,0x01,0x00,0x0c, -0x00,0x00,0x00,0x00,0xd8,0x64,0x44,0x8e,0xdc,0x64,0x43,0x8e,0x20,0x00,0x84,0x24, -0x3f,0x00,0x62,0x24,0x2b,0x10,0x44,0x00,0x0a,0x18,0x82,0x00,0xd8,0x64,0x43,0xae, -0xd8,0x64,0xa5,0x8e,0x00,0x00,0x00,0x00,0x00,0x00,0x65,0xae,0x02,0x80,0x02,0x3c, -0xff,0xff,0x10,0x32,0x25,0x80,0x02,0x02,0x00,0x00,0x70,0xae,0x0c,0x00,0x02,0x92, -0xff,0x00,0x14,0x24,0x01,0x00,0x04,0x24,0x00,0x00,0x62,0xae,0x0c,0x00,0x11,0x92, -0x20,0x10,0x02,0x3c,0x20,0x00,0x07,0x24,0x00,0x1a,0x11,0x00,0x21,0x18,0x62,0x00, -0x05,0x00,0x34,0x12,0x21,0x30,0x60,0x00,0x6c,0x64,0xa3,0xae,0x10,0x64,0xb1,0xa2, -0x10,0x01,0x00,0x0c,0x10,0x00,0xa0,0xaf,0x04,0x00,0x04,0x8e,0x08,0x00,0x03,0x8e, -0xff,0xe0,0x02,0x3c,0xff,0xff,0x42,0x34,0x1f,0x00,0x84,0x30,0x24,0x18,0x62,0x00, -0x00,0x26,0x04,0x00,0xff,0xdf,0x02,0x3c,0x25,0x18,0x64,0x00,0xff,0xff,0x42,0x34, -0x24,0x18,0x62,0x00,0x00,0x40,0x04,0x3c,0x25,0x18,0x64,0x00,0xc0,0xff,0x05,0x24, -0x82,0x11,0x03,0x00,0x24,0x20,0x65,0x00,0x01,0x00,0x42,0x30,0xc0,0xff,0x40,0x10, -0x04,0x00,0x84,0x34,0x2a,0xb0,0x02,0x3c,0x08,0x00,0x03,0xae,0x09,0x00,0x42,0x34, -0x01,0x00,0x03,0x24,0x02,0x00,0x04,0x24,0x00,0x00,0x43,0xa0,0x00,0x00,0x44,0xa0, -0xc0,0xff,0x34,0x16,0x00,0x00,0x00,0x00,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34, -0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40,0x68,0x15,0xc2,0x26,0xfc,0x4a,0x43,0x8c, -0x34,0x00,0xbf,0x8f,0x30,0x00,0xb6,0x8f,0x2c,0x00,0xb5,0x8f,0x28,0x00,0xb4,0x8f, -0x24,0x00,0xb3,0x8f,0x20,0x00,0xb2,0x8f,0x1c,0x00,0xb1,0x8f,0x18,0x00,0xb0,0x8f, -0x00,0x38,0x63,0x34,0x41,0xb0,0x04,0x3c,0x38,0x00,0xbd,0x27,0x00,0x00,0x83,0xac, -0x08,0x00,0xe0,0x03,0xfc,0x4a,0x43,0xac,0x25,0xb0,0x04,0x3c,0x00,0x80,0x02,0x3c, -0xc0,0xff,0xbd,0x27,0x18,0x03,0x83,0x34,0x08,0x0a,0x42,0x24,0x38,0x00,0xbf,0xaf, -0x34,0x00,0xb7,0xaf,0x30,0x00,0xb6,0xaf,0x2c,0x00,0xb5,0xaf,0x28,0x00,0xb4,0xaf, -0x24,0x00,0xb3,0xaf,0x20,0x00,0xb2,0xaf,0x1c,0x00,0xb1,0xaf,0x18,0x00,0xb0,0xaf, -0x00,0x00,0x62,0xac,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40, -0x02,0x80,0x17,0x3c,0x68,0x15,0xf2,0x26,0xb0,0x03,0x93,0x34,0x02,0x80,0x14,0x3c, -0xab,0x02,0x00,0x08,0x21,0xb0,0x40,0x02,0x2a,0xb0,0x03,0x3c,0x08,0x00,0x04,0xae, -0x05,0x00,0x63,0x34,0x01,0x00,0x02,0x24,0x02,0x00,0x04,0x24,0x00,0x00,0x62,0xa0, -0x00,0x00,0x64,0xa0,0xca,0x7d,0x82,0x96,0x00,0x00,0x00,0x00,0x01,0x00,0x42,0x24, -0xca,0x7d,0x82,0xa6,0xca,0x7d,0x83,0x96,0x25,0xb0,0x02,0x3c,0x66,0x03,0x42,0x34, -0x00,0x00,0x43,0xa4,0x4a,0x00,0x35,0x12,0x00,0x00,0x00,0x00,0x60,0x64,0x42,0x8e, -0xcc,0x64,0x50,0x8e,0x01,0x00,0x04,0x24,0x00,0x00,0x62,0xae,0x64,0x64,0x42,0xae, -0x00,0x00,0x70,0xae,0x4d,0x01,0x00,0x0c,0x00,0x00,0x00,0x00,0xcc,0x64,0x44,0x8e, -0xd0,0x64,0x43,0x8e,0x20,0x00,0x84,0x24,0x3f,0x00,0x62,0x24,0x2b,0x10,0x44,0x00, -0x0a,0x18,0x82,0x00,0xcc,0x64,0x43,0xae,0xcc,0x64,0xc5,0x8e,0x00,0x00,0x00,0x00, -0x00,0x00,0x65,0xae,0x02,0x80,0x02,0x3c,0xff,0xff,0x10,0x32,0x25,0x80,0x02,0x02, -0x00,0x00,0x70,0xae,0x0c,0x00,0x02,0x92,0xff,0x00,0x15,0x24,0x01,0x00,0x04,0x24, -0x00,0x00,0x62,0xae,0x0c,0x00,0x11,0x92,0x20,0x10,0x02,0x3c,0x20,0x00,0x07,0x24, -0x00,0x1a,0x11,0x00,0x21,0x18,0x62,0x00,0x05,0x00,0x35,0x12,0x21,0x30,0x60,0x00, -0x60,0x64,0xc3,0xae,0x0c,0x64,0xd1,0xa2,0x10,0x01,0x00,0x0c,0x10,0x00,0xa0,0xaf, -0x04,0x00,0x04,0x8e,0x08,0x00,0x03,0x8e,0xff,0xe0,0x02,0x3c,0xff,0xff,0x42,0x34, -0x1f,0x00,0x84,0x30,0x24,0x18,0x62,0x00,0x00,0x26,0x04,0x00,0xff,0xdf,0x02,0x3c, -0x25,0x18,0x64,0x00,0xff,0xff,0x42,0x34,0x24,0x18,0x62,0x00,0x00,0x40,0x04,0x3c, -0x25,0x18,0x64,0x00,0xc0,0xff,0x05,0x24,0x82,0x11,0x03,0x00,0x24,0x20,0x65,0x00, -0x01,0x00,0x42,0x30,0xb8,0xff,0x40,0x10,0x04,0x00,0x84,0x34,0x08,0x00,0x03,0xae, -0x2a,0xb0,0x03,0x3c,0x05,0x00,0x63,0x34,0x01,0x00,0x02,0x24,0x02,0x00,0x04,0x24, -0x00,0x00,0x62,0xa0,0x00,0x00,0x64,0xa0,0xca,0x7d,0x82,0x96,0x00,0x00,0x00,0x00, -0x01,0x00,0x42,0x24,0xca,0x7d,0x82,0xa6,0xca,0x7d,0x83,0x96,0x25,0xb0,0x02,0x3c, -0x66,0x03,0x42,0x34,0x00,0x00,0x43,0xa4,0xb8,0xff,0x35,0x16,0x00,0x00,0x00,0x00, -0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40, -0x68,0x15,0xe2,0x26,0xfc,0x4a,0x43,0x8c,0x38,0x00,0xbf,0x8f,0x34,0x00,0xb7,0x8f, -0x30,0x00,0xb6,0x8f,0x2c,0x00,0xb5,0x8f,0x28,0x00,0xb4,0x8f,0x24,0x00,0xb3,0x8f, -0x20,0x00,0xb2,0x8f,0x1c,0x00,0xb1,0x8f,0x18,0x00,0xb0,0x8f,0x00,0x38,0x63,0x34, -0x41,0xb0,0x04,0x3c,0x40,0x00,0xbd,0x27,0x00,0x00,0x83,0xac,0x08,0x00,0xe0,0x03, -0xfc,0x4a,0x43,0xac,0xc0,0xff,0xbd,0x27,0x2c,0x00,0xb5,0xaf,0x38,0x00,0xbf,0xaf, -0x34,0x00,0xb7,0xaf,0x30,0x00,0xb6,0xaf,0x28,0x00,0xb4,0xaf,0x24,0x00,0xb3,0xaf, -0x20,0x00,0xb2,0xaf,0x1c,0x00,0xb1,0xaf,0x18,0x00,0xb0,0xaf,0x02,0x80,0x06,0x3c, -0x7c,0x7e,0xc5,0x90,0x00,0x80,0x03,0x3c,0x25,0xb0,0x02,0x3c,0x18,0x03,0x42,0x34, -0x24,0x0c,0x63,0x24,0x40,0x00,0xa4,0x30,0x00,0x00,0x43,0xac,0x21,0xa8,0x00,0x00, -0x03,0x00,0x80,0x10,0x7f,0x00,0xa2,0x30,0xbf,0x00,0xa2,0x30,0x01,0x00,0x15,0x24, -0x7c,0x7e,0xc2,0xa0,0x7c,0x7e,0xc2,0x90,0x25,0xb0,0x04,0x3c,0x88,0x02,0x83,0x34, -0x00,0x00,0x62,0xac,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40, -0x02,0x80,0x16,0x3c,0x68,0x15,0xd2,0x26,0xb0,0x03,0x93,0x34,0x02,0x80,0x14,0x3c, -0x43,0x03,0x00,0x08,0x21,0xb8,0x40,0x02,0x24,0x10,0xa2,0x00,0x04,0x00,0x42,0x34, -0x2a,0xb0,0x07,0x3c,0x08,0x00,0x02,0xae,0x0d,0x00,0xe2,0x34,0x04,0x00,0x43,0x24, -0x0b,0x10,0x75,0x00,0x01,0x00,0x04,0x24,0x02,0x00,0x03,0x24,0x00,0x00,0x44,0xa0, -0x00,0x00,0x43,0xa0,0xca,0x7d,0x84,0x96,0x25,0xb0,0x06,0x3c,0x66,0x03,0xc5,0x34, -0x01,0x00,0x84,0x24,0xca,0x7d,0x84,0xa6,0xca,0x7d,0x82,0x96,0xff,0x00,0x03,0x24, -0x00,0x00,0xa2,0xa4,0x5a,0x00,0x23,0x12,0x00,0x00,0x00,0x00,0x24,0x64,0x42,0x8e, -0x90,0x64,0x50,0x8e,0x03,0x00,0x04,0x24,0x00,0x00,0x62,0xae,0x28,0x64,0x42,0xae, -0x00,0x00,0x70,0xae,0x4d,0x01,0x00,0x0c,0x00,0x00,0x00,0x00,0x90,0x64,0x44,0x8e, -0x94,0x64,0x43,0x8e,0x20,0x00,0x84,0x24,0x3f,0x00,0x62,0x24,0x2b,0x10,0x44,0x00, -0x0a,0x18,0x82,0x00,0x90,0x64,0x43,0xae,0x90,0x64,0xe2,0x8e,0x00,0x00,0x00,0x00, -0x00,0x00,0x62,0xae,0x02,0x80,0x02,0x3c,0xff,0xff,0x10,0x32,0x25,0x80,0x02,0x02, -0x00,0x00,0x70,0xae,0x0c,0x00,0x02,0x92,0x00,0x00,0x00,0x00,0x00,0x00,0x62,0xae, -0x0c,0x00,0x11,0x92,0xff,0x00,0x02,0x24,0x0d,0x00,0x22,0x12,0x00,0x12,0x11,0x00, -0x20,0x10,0x03,0x3c,0x21,0x10,0x43,0x00,0x5a,0x00,0xa0,0x12,0x24,0x64,0xe2,0xae, -0xec,0x63,0xf1,0xa2,0x68,0x15,0xc2,0x26,0x24,0x64,0x46,0x8c,0x90,0x64,0x45,0x8c, -0x03,0x00,0x04,0x24,0x20,0x00,0x07,0x24,0x10,0x01,0x00,0x0c,0x10,0x00,0xa0,0xaf, -0x04,0x00,0x04,0x8e,0x14,0x00,0x03,0x8e,0x08,0x00,0x05,0x8e,0xff,0xe0,0x02,0x3c, -0x1f,0x00,0x84,0x30,0x42,0x1a,0x03,0x00,0xff,0xff,0x42,0x34,0x00,0x26,0x04,0x00, -0x24,0x28,0xa2,0x00,0x3f,0x00,0x63,0x30,0x25,0x28,0xa4,0x00,0x0c,0x00,0x63,0x28, -0x06,0x00,0x60,0x14,0x21,0x20,0xa0,0x00,0x00,0x00,0x02,0x96,0x00,0x00,0x00,0x00, -0xfd,0x0f,0x42,0x28,0x08,0x00,0x40,0x14,0x82,0x11,0x05,0x00,0xff,0xdf,0x02,0x3c, -0xff,0xff,0x42,0x34,0x24,0x28,0x82,0x00,0x00,0x40,0x03,0x3c,0x25,0x20,0xa3,0x00, -0x21,0x28,0x80,0x00,0x82,0x11,0x05,0x00,0x01,0x00,0x42,0x30,0xa6,0xff,0x40,0x10, -0xc0,0xff,0x02,0x24,0x2a,0xb0,0x07,0x3c,0x0d,0x00,0xe2,0x34,0x04,0x00,0x43,0x24, -0x08,0x00,0x04,0xae,0x0b,0x10,0x75,0x00,0x01,0x00,0x04,0x24,0x02,0x00,0x03,0x24, -0x00,0x00,0x44,0xa0,0x00,0x00,0x43,0xa0,0xca,0x7d,0x84,0x96,0x25,0xb0,0x06,0x3c, -0x66,0x03,0xc5,0x34,0x01,0x00,0x84,0x24,0xca,0x7d,0x84,0xa6,0xca,0x7d,0x82,0x96, -0xff,0x00,0x03,0x24,0x00,0x00,0xa2,0xa4,0xa8,0xff,0x23,0x16,0x00,0x00,0x00,0x00, -0x22,0x00,0xa0,0x12,0x68,0x15,0xc2,0x26,0xec,0x63,0x43,0x90,0x41,0x00,0xe4,0x34, -0xb0,0x03,0xc5,0x34,0x00,0x00,0x83,0xa0,0x00,0x00,0xa3,0xac,0x00,0x60,0x01,0x40, -0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34, -0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40,0x68,0x15,0xc5,0x26,0xfc,0x4a,0xa4,0x8c, -0x01,0x00,0x02,0x3c,0x38,0x00,0xbf,0x8f,0x34,0x00,0xb7,0x8f,0x30,0x00,0xb6,0x8f, -0x2c,0x00,0xb5,0x8f,0x28,0x00,0xb4,0x8f,0x24,0x00,0xb3,0x8f,0x20,0x00,0xb2,0x8f, -0x1c,0x00,0xb1,0x8f,0x18,0x00,0xb0,0x8f,0x00,0x80,0x42,0x34,0x25,0x20,0x82,0x00, -0x41,0xb0,0x03,0x3c,0x40,0x00,0xbd,0x27,0x00,0x00,0x64,0xac,0x08,0x00,0xe0,0x03, -0xfc,0x4a,0xa4,0xac,0x65,0x03,0x00,0x08,0xe8,0x63,0xf1,0xa2,0xe8,0x63,0x43,0x90, -0x40,0x00,0xe4,0x34,0xb0,0x03,0xc5,0x34,0x00,0x00,0x83,0xa0,0x00,0x00,0xa3,0xac, -0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40,0x00,0x60,0x01,0x40, -0x01,0x00,0x21,0x34,0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40,0x68,0x15,0xc5,0x26, -0xfc,0x4a,0xa4,0x8c,0x01,0x00,0x02,0x3c,0x38,0x00,0xbf,0x8f,0x34,0x00,0xb7,0x8f, -0x30,0x00,0xb6,0x8f,0x2c,0x00,0xb5,0x8f,0x28,0x00,0xb4,0x8f,0x24,0x00,0xb3,0x8f, -0x20,0x00,0xb2,0x8f,0x1c,0x00,0xb1,0x8f,0x18,0x00,0xb0,0x8f,0x00,0x80,0x42,0x34, -0x25,0x20,0x82,0x00,0x41,0xb0,0x03,0x3c,0x40,0x00,0xbd,0x27,0x00,0x00,0x64,0xac, -0x08,0x00,0xe0,0x03,0xfc,0x4a,0xa4,0xac,0xc0,0xff,0xbd,0x27,0x2c,0x00,0xb5,0xaf, -0x38,0x00,0xbf,0xaf,0x34,0x00,0xb7,0xaf,0x30,0x00,0xb6,0xaf,0x28,0x00,0xb4,0xaf, -0x24,0x00,0xb3,0xaf,0x20,0x00,0xb2,0xaf,0x1c,0x00,0xb1,0xaf,0x18,0x00,0xb0,0xaf, -0x02,0x80,0x06,0x3c,0x7c,0x7e,0xc5,0x90,0x00,0x80,0x03,0x3c,0x25,0xb0,0x02,0x3c, -0x18,0x03,0x42,0x34,0x78,0x0f,0x63,0x24,0x10,0x00,0xa4,0x30,0x00,0x00,0x43,0xac, -0x21,0xa8,0x00,0x00,0x03,0x00,0x80,0x10,0xdf,0x00,0xa2,0x30,0xef,0x00,0xa2,0x30, -0x01,0x00,0x15,0x24,0x7c,0x7e,0xc2,0xa0,0x7c,0x7e,0xc3,0x90,0x25,0xb0,0x02,0x3c, -0xb0,0x03,0x42,0x34,0x00,0x00,0x43,0xac,0x00,0x00,0x43,0xac,0x00,0x60,0x01,0x40, -0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40,0x02,0x80,0x16,0x3c,0x68,0x15,0xd2,0x26, -0x21,0x98,0x40,0x00,0x02,0x80,0x14,0x3c,0x19,0x04,0x00,0x08,0x21,0xb8,0x40,0x02, -0x24,0x10,0xa2,0x00,0x04,0x00,0x42,0x34,0x2a,0xb0,0x07,0x3c,0x08,0x00,0x02,0xae, -0x15,0x00,0xe2,0x34,0x04,0x00,0x43,0x24,0x0b,0x10,0x75,0x00,0x01,0x00,0x04,0x24, -0x02,0x00,0x03,0x24,0x00,0x00,0x44,0xa0,0x00,0x00,0x43,0xa0,0xca,0x7d,0x84,0x96, -0x25,0xb0,0x06,0x3c,0x66,0x03,0xc5,0x34,0x01,0x00,0x84,0x24,0xca,0x7d,0x84,0xa6, -0xca,0x7d,0x82,0x96,0xff,0x00,0x03,0x24,0x00,0x00,0xa2,0xa4,0x5a,0x00,0x23,0x12, -0x00,0x00,0x00,0x00,0x30,0x64,0x42,0x8e,0x9c,0x64,0x50,0x8e,0x04,0x00,0x04,0x24, -0x00,0x00,0x62,0xae,0x34,0x64,0x42,0xae,0x00,0x00,0x70,0xae,0x4d,0x01,0x00,0x0c, -0x00,0x00,0x00,0x00,0x9c,0x64,0x44,0x8e,0xa0,0x64,0x43,0x8e,0x20,0x00,0x84,0x24, -0x3f,0x00,0x62,0x24,0x2b,0x10,0x44,0x00,0x0a,0x18,0x82,0x00,0x9c,0x64,0x43,0xae, -0x9c,0x64,0xe2,0x8e,0x00,0x00,0x00,0x00,0x00,0x00,0x62,0xae,0x02,0x80,0x02,0x3c, -0xff,0xff,0x10,0x32,0x25,0x80,0x02,0x02,0x00,0x00,0x70,0xae,0x0c,0x00,0x02,0x92, -0x00,0x00,0x00,0x00,0x00,0x00,0x62,0xae,0x0c,0x00,0x11,0x92,0xff,0x00,0x02,0x24, -0x0d,0x00,0x22,0x12,0x00,0x12,0x11,0x00,0x20,0x10,0x03,0x3c,0x21,0x10,0x43,0x00, -0x59,0x00,0xa0,0x12,0x30,0x64,0xe2,0xae,0xf4,0x63,0xf1,0xa2,0x68,0x15,0xc2,0x26, -0x30,0x64,0x46,0x8c,0x9c,0x64,0x45,0x8c,0x04,0x00,0x04,0x24,0x20,0x00,0x07,0x24, -0x10,0x01,0x00,0x0c,0x10,0x00,0xa0,0xaf,0x04,0x00,0x04,0x8e,0x14,0x00,0x03,0x8e, -0x08,0x00,0x05,0x8e,0xff,0xe0,0x02,0x3c,0x1f,0x00,0x84,0x30,0x42,0x1a,0x03,0x00, -0xff,0xff,0x42,0x34,0x00,0x26,0x04,0x00,0x24,0x28,0xa2,0x00,0x3f,0x00,0x63,0x30, -0x25,0x28,0xa4,0x00,0x0c,0x00,0x63,0x28,0x06,0x00,0x60,0x14,0x21,0x20,0xa0,0x00, -0x00,0x00,0x02,0x96,0x00,0x00,0x00,0x00,0xfd,0x0f,0x42,0x28,0x08,0x00,0x40,0x14, -0x82,0x11,0x05,0x00,0xff,0xdf,0x02,0x3c,0xff,0xff,0x42,0x34,0x24,0x28,0x82,0x00, -0x00,0x40,0x03,0x3c,0x25,0x20,0xa3,0x00,0x21,0x28,0x80,0x00,0x82,0x11,0x05,0x00, -0x01,0x00,0x42,0x30,0xa6,0xff,0x40,0x10,0xc0,0xff,0x02,0x24,0x2a,0xb0,0x07,0x3c, -0x15,0x00,0xe2,0x34,0x04,0x00,0x43,0x24,0x08,0x00,0x04,0xae,0x0b,0x10,0x75,0x00, -0x01,0x00,0x04,0x24,0x02,0x00,0x03,0x24,0x00,0x00,0x44,0xa0,0x00,0x00,0x43,0xa0, -0xca,0x7d,0x84,0x96,0x25,0xb0,0x06,0x3c,0x66,0x03,0xc5,0x34,0x01,0x00,0x84,0x24, -0xca,0x7d,0x84,0xa6,0xca,0x7d,0x82,0x96,0xff,0x00,0x03,0x24,0x00,0x00,0xa2,0xa4, -0xa8,0xff,0x23,0x16,0x00,0x00,0x00,0x00,0x21,0x00,0xa0,0x12,0x68,0x15,0xc2,0x26, -0xf4,0x63,0x43,0x90,0x43,0x00,0xe4,0x34,0xb0,0x03,0xc5,0x34,0x00,0x00,0x83,0xa0, -0x00,0x00,0xa3,0xac,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40, -0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40, -0x68,0x15,0xc5,0x26,0xfc,0x4a,0xa2,0x8c,0x38,0x00,0xbf,0x8f,0x34,0x00,0xb7,0x8f, -0x30,0x00,0xb6,0x8f,0x2c,0x00,0xb5,0x8f,0x28,0x00,0xb4,0x8f,0x24,0x00,0xb3,0x8f, -0x20,0x00,0xb2,0x8f,0x1c,0x00,0xb1,0x8f,0x18,0x00,0xb0,0x8f,0x06,0x00,0x03,0x3c, -0x25,0x10,0x43,0x00,0x41,0xb0,0x04,0x3c,0x40,0x00,0xbd,0x27,0x00,0x00,0x82,0xac, -0x08,0x00,0xe0,0x03,0xfc,0x4a,0xa2,0xac,0x3b,0x04,0x00,0x08,0xf0,0x63,0xf1,0xa2, -0xf0,0x63,0x43,0x90,0x42,0x00,0xe4,0x34,0xb0,0x03,0xc5,0x34,0x00,0x00,0x83,0xa0, -0x00,0x00,0xa3,0xac,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40, -0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40, -0x68,0x15,0xc5,0x26,0xfc,0x4a,0xa2,0x8c,0x38,0x00,0xbf,0x8f,0x34,0x00,0xb7,0x8f, -0x30,0x00,0xb6,0x8f,0x2c,0x00,0xb5,0x8f,0x28,0x00,0xb4,0x8f,0x24,0x00,0xb3,0x8f, -0x20,0x00,0xb2,0x8f,0x1c,0x00,0xb1,0x8f,0x18,0x00,0xb0,0x8f,0x06,0x00,0x03,0x3c, -0x25,0x10,0x43,0x00,0x41,0xb0,0x04,0x3c,0x40,0x00,0xbd,0x27,0x00,0x00,0x82,0xac, -0x08,0x00,0xe0,0x03,0xfc,0x4a,0xa2,0xac,0xc0,0xff,0xbd,0x27,0x2c,0x00,0xb5,0xaf, -0x38,0x00,0xbf,0xaf,0x34,0x00,0xb7,0xaf,0x30,0x00,0xb6,0xaf,0x28,0x00,0xb4,0xaf, -0x24,0x00,0xb3,0xaf,0x20,0x00,0xb2,0xaf,0x1c,0x00,0xb1,0xaf,0x18,0x00,0xb0,0xaf, -0x02,0x80,0x06,0x3c,0x7c,0x7e,0xc5,0x90,0x00,0x80,0x03,0x3c,0x25,0xb0,0x02,0x3c, -0x18,0x03,0x42,0x34,0xc8,0x12,0x63,0x24,0x01,0x00,0xa4,0x30,0x00,0x00,0x43,0xac, -0x21,0xa8,0x00,0x00,0x03,0x00,0x80,0x10,0xf7,0x00,0xa2,0x30,0xfe,0x00,0xa2,0x30, -0x01,0x00,0x15,0x24,0x7c,0x7e,0xc2,0xa0,0x7c,0x7e,0xc3,0x90,0x25,0xb0,0x02,0x3c, -0xb0,0x03,0x42,0x34,0x00,0x00,0x43,0xac,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34, -0x00,0x60,0x81,0x40,0x02,0x80,0x16,0x3c,0x68,0x15,0xd2,0x26,0x21,0x98,0x40,0x00, -0x02,0x80,0x14,0x3c,0xf8,0x04,0x00,0x08,0x21,0xb8,0x40,0x02,0x00,0x00,0x02,0x96, -0x00,0x00,0x00,0x00,0xfd,0x0f,0x42,0x28,0x54,0x00,0x40,0x10,0xff,0xdf,0x02,0x3c, -0x00,0x20,0x02,0x3c,0x25,0x28,0xa2,0x00,0x82,0x11,0x05,0x00,0x01,0x00,0x42,0x30, -0x57,0x00,0x40,0x14,0x2a,0xb0,0x07,0x3c,0xc0,0xff,0x02,0x24,0x24,0x10,0xa2,0x00, -0x04,0x00,0x42,0x34,0x2a,0xb0,0x07,0x3c,0x08,0x00,0x02,0xae,0x1d,0x00,0xe2,0x34, -0x04,0x00,0x43,0x24,0x0b,0x10,0x75,0x00,0x01,0x00,0x04,0x24,0x02,0x00,0x03,0x24, -0x00,0x00,0x44,0xa0,0x00,0x00,0x43,0xa0,0xca,0x7d,0x84,0x96,0x25,0xb0,0x06,0x3c, -0x66,0x03,0xc5,0x34,0x01,0x00,0x84,0x24,0xca,0x7d,0x84,0xa6,0xca,0x7d,0x82,0x96, -0xff,0x00,0x03,0x24,0x00,0x00,0xa2,0xa4,0x53,0x00,0x23,0x12,0x00,0x00,0x00,0x00, -0x3c,0x64,0x42,0x8e,0xa8,0x64,0x50,0x8e,0x05,0x00,0x04,0x24,0x00,0x00,0x62,0xae, -0x40,0x64,0x42,0xae,0x00,0x00,0x70,0xae,0x4d,0x01,0x00,0x0c,0x00,0x00,0x00,0x00, -0xa8,0x64,0x44,0x8e,0xac,0x64,0x43,0x8e,0x20,0x00,0x84,0x24,0x3f,0x00,0x62,0x24, -0x2b,0x10,0x44,0x00,0x0a,0x18,0x82,0x00,0xa8,0x64,0x43,0xae,0xa8,0x64,0xe2,0x8e, -0x00,0x00,0x00,0x00,0x00,0x00,0x62,0xae,0x02,0x80,0x02,0x3c,0xff,0xff,0x10,0x32, -0x25,0x80,0x02,0x02,0x00,0x00,0x70,0xae,0x0c,0x00,0x02,0x92,0x00,0x00,0x00,0x00, -0x00,0x00,0x62,0xae,0x0c,0x00,0x11,0x92,0xff,0x00,0x02,0x24,0x0d,0x00,0x22,0x12, -0x00,0x12,0x11,0x00,0x20,0x10,0x03,0x3c,0x21,0x10,0x43,0x00,0x52,0x00,0xa0,0x12, -0x3c,0x64,0xe2,0xae,0x04,0x64,0xf1,0xa2,0x68,0x15,0xc2,0x26,0x3c,0x64,0x46,0x8c, -0xa8,0x64,0x45,0x8c,0x05,0x00,0x04,0x24,0x20,0x00,0x07,0x24,0x10,0x01,0x00,0x0c, -0x10,0x00,0xa0,0xaf,0x14,0x00,0x03,0x8e,0x04,0x00,0x04,0x8e,0x08,0x00,0x05,0x8e, -0x42,0x1a,0x03,0x00,0xff,0xe0,0x02,0x3c,0x1f,0x00,0x84,0x30,0x3f,0x00,0x63,0x30, -0xff,0xff,0x42,0x34,0x24,0x28,0xa2,0x00,0x00,0x26,0x04,0x00,0x0c,0x00,0x63,0x28, -0xaa,0xff,0x60,0x10,0x25,0x28,0xa4,0x00,0xff,0xdf,0x02,0x3c,0xff,0xff,0x42,0x34, -0x24,0x10,0xa2,0x00,0x00,0x40,0x03,0x3c,0x25,0x28,0x43,0x00,0x82,0x11,0x05,0x00, -0x01,0x00,0x42,0x30,0xad,0xff,0x40,0x10,0xc0,0xff,0x02,0x24,0x2a,0xb0,0x07,0x3c, -0x1d,0x00,0xe2,0x34,0x04,0x00,0x43,0x24,0x0b,0x10,0x75,0x00,0x01,0x00,0x04,0x24, -0x02,0x00,0x03,0x24,0x08,0x00,0x05,0xae,0x00,0x00,0x44,0xa0,0x00,0x00,0x43,0xa0, -0xca,0x7d,0x84,0x96,0x25,0xb0,0x06,0x3c,0x66,0x03,0xc5,0x34,0x01,0x00,0x84,0x24, -0xca,0x7d,0x84,0xa6,0xca,0x7d,0x82,0x96,0xff,0x00,0x03,0x24,0x00,0x00,0xa2,0xa4, -0xaf,0xff,0x23,0x16,0x00,0x00,0x00,0x00,0x21,0x00,0xa0,0x12,0x68,0x15,0xc2,0x26, -0x04,0x64,0x43,0x90,0x45,0x00,0xe4,0x34,0xb0,0x03,0xc5,0x34,0x00,0x00,0x83,0xa0, -0x00,0x00,0xa3,0xac,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40, -0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40, -0x68,0x15,0xc5,0x26,0xfc,0x4a,0xa2,0x8c,0x38,0x00,0xbf,0x8f,0x34,0x00,0xb7,0x8f, -0x30,0x00,0xb6,0x8f,0x2c,0x00,0xb5,0x8f,0x28,0x00,0xb4,0x8f,0x24,0x00,0xb3,0x8f, -0x20,0x00,0xb2,0x8f,0x1c,0x00,0xb1,0x8f,0x18,0x00,0xb0,0x8f,0x18,0x00,0x03,0x3c, -0x25,0x10,0x43,0x00,0x41,0xb0,0x04,0x3c,0x40,0x00,0xbd,0x27,0x00,0x00,0x82,0xac, -0x08,0x00,0xe0,0x03,0xfc,0x4a,0xa2,0xac,0x1a,0x05,0x00,0x08,0xf8,0x63,0xf1,0xa2, -0xf8,0x63,0x43,0x90,0x44,0x00,0xe4,0x34,0xb0,0x03,0xc5,0x34,0x00,0x00,0x83,0xa0, -0x00,0x00,0xa3,0xac,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40, -0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40, -0x68,0x15,0xc5,0x26,0xfc,0x4a,0xa2,0x8c,0x38,0x00,0xbf,0x8f,0x34,0x00,0xb7,0x8f, -0x30,0x00,0xb6,0x8f,0x2c,0x00,0xb5,0x8f,0x28,0x00,0xb4,0x8f,0x24,0x00,0xb3,0x8f, -0x20,0x00,0xb2,0x8f,0x1c,0x00,0xb1,0x8f,0x18,0x00,0xb0,0x8f,0x18,0x00,0x03,0x3c, -0x25,0x10,0x43,0x00,0x41,0xb0,0x04,0x3c,0x40,0x00,0xbd,0x27,0x00,0x00,0x82,0xac, -0x08,0x00,0xe0,0x03,0xfc,0x4a,0xa2,0xac,0xc0,0xff,0xbd,0x27,0x2c,0x00,0xb5,0xaf, -0x38,0x00,0xbf,0xaf,0x34,0x00,0xb7,0xaf,0x30,0x00,0xb6,0xaf,0x28,0x00,0xb4,0xaf, -0x24,0x00,0xb3,0xaf,0x20,0x00,0xb2,0xaf,0x1c,0x00,0xb1,0xaf,0x18,0x00,0xb0,0xaf, -0x02,0x80,0x06,0x3c,0x7c,0x7e,0xc5,0x90,0x00,0x80,0x03,0x3c,0x25,0xb0,0x02,0x3c, -0x18,0x03,0x42,0x34,0x28,0x16,0x63,0x24,0x02,0x00,0xa4,0x30,0x00,0x00,0x43,0xac, -0x21,0xa8,0x00,0x00,0x03,0x00,0x80,0x10,0xfb,0x00,0xa2,0x30,0xfd,0x00,0xa2,0x30, -0x01,0x00,0x15,0x24,0x7c,0x7e,0xc2,0xa0,0x7c,0x7e,0xc3,0x90,0x25,0xb0,0x02,0x3c, -0xb0,0x03,0x42,0x34,0x00,0x00,0x43,0xac,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34, -0x00,0x60,0x81,0x40,0x02,0x80,0x16,0x3c,0x68,0x15,0xd2,0x26,0x21,0x98,0x40,0x00, -0x02,0x80,0x14,0x3c,0xd0,0x05,0x00,0x08,0x21,0xb8,0x40,0x02,0x00,0x00,0x02,0x96, -0x00,0x00,0x00,0x00,0xfd,0x0f,0x42,0x28,0x54,0x00,0x40,0x10,0xff,0xdf,0x02,0x3c, -0x00,0x20,0x02,0x3c,0x25,0x28,0xa2,0x00,0x82,0x11,0x05,0x00,0x01,0x00,0x42,0x30, -0x57,0x00,0x40,0x14,0x2a,0xb0,0x07,0x3c,0xc0,0xff,0x02,0x24,0x24,0x10,0xa2,0x00, -0x04,0x00,0x42,0x34,0x2a,0xb0,0x07,0x3c,0x08,0x00,0x02,0xae,0x25,0x00,0xe2,0x34, -0x04,0x00,0x43,0x24,0x0b,0x10,0x75,0x00,0x01,0x00,0x04,0x24,0x02,0x00,0x03,0x24, -0x00,0x00,0x44,0xa0,0x00,0x00,0x43,0xa0,0xca,0x7d,0x84,0x96,0x25,0xb0,0x06,0x3c, -0x66,0x03,0xc5,0x34,0x01,0x00,0x84,0x24,0xca,0x7d,0x84,0xa6,0xca,0x7d,0x82,0x96, -0xff,0x00,0x03,0x24,0x00,0x00,0xa2,0xa4,0x53,0x00,0x23,0x12,0x00,0x00,0x00,0x00, -0x48,0x64,0x42,0x8e,0xb4,0x64,0x50,0x8e,0x06,0x00,0x04,0x24,0x00,0x00,0x62,0xae, -0x4c,0x64,0x42,0xae,0x00,0x00,0x70,0xae,0x4d,0x01,0x00,0x0c,0x00,0x00,0x00,0x00, -0xb4,0x64,0x44,0x8e,0xb8,0x64,0x43,0x8e,0x20,0x00,0x84,0x24,0x3f,0x00,0x62,0x24, -0x2b,0x10,0x44,0x00,0x0a,0x18,0x82,0x00,0xb4,0x64,0x43,0xae,0xb4,0x64,0xe2,0x8e, -0x00,0x00,0x00,0x00,0x00,0x00,0x62,0xae,0x02,0x80,0x02,0x3c,0xff,0xff,0x10,0x32, -0x25,0x80,0x02,0x02,0x00,0x00,0x70,0xae,0x0c,0x00,0x02,0x92,0x00,0x00,0x00,0x00, -0x00,0x00,0x62,0xae,0x0c,0x00,0x11,0x92,0xff,0x00,0x02,0x24,0x0d,0x00,0x22,0x12, -0x00,0x12,0x11,0x00,0x20,0x10,0x03,0x3c,0x21,0x10,0x43,0x00,0x52,0x00,0xa0,0x12, -0x48,0x64,0xe2,0xae,0x00,0x64,0xf1,0xa2,0x68,0x15,0xc2,0x26,0x48,0x64,0x46,0x8c, -0xb4,0x64,0x45,0x8c,0x06,0x00,0x04,0x24,0x20,0x00,0x07,0x24,0x10,0x01,0x00,0x0c, -0x10,0x00,0xa0,0xaf,0x14,0x00,0x03,0x8e,0x04,0x00,0x04,0x8e,0x08,0x00,0x05,0x8e, -0x42,0x1a,0x03,0x00,0xff,0xe0,0x02,0x3c,0x1f,0x00,0x84,0x30,0x3f,0x00,0x63,0x30, -0xff,0xff,0x42,0x34,0x24,0x28,0xa2,0x00,0x00,0x26,0x04,0x00,0x0c,0x00,0x63,0x28, -0xaa,0xff,0x60,0x10,0x25,0x28,0xa4,0x00,0xff,0xdf,0x02,0x3c,0xff,0xff,0x42,0x34, -0x24,0x10,0xa2,0x00,0x00,0x40,0x03,0x3c,0x25,0x28,0x43,0x00,0x82,0x11,0x05,0x00, -0x01,0x00,0x42,0x30,0xad,0xff,0x40,0x10,0xc0,0xff,0x02,0x24,0x2a,0xb0,0x07,0x3c, -0x25,0x00,0xe2,0x34,0x04,0x00,0x43,0x24,0x0b,0x10,0x75,0x00,0x01,0x00,0x04,0x24, -0x02,0x00,0x03,0x24,0x08,0x00,0x05,0xae,0x00,0x00,0x44,0xa0,0x00,0x00,0x43,0xa0, -0xca,0x7d,0x84,0x96,0x25,0xb0,0x06,0x3c,0x66,0x03,0xc5,0x34,0x01,0x00,0x84,0x24, -0xca,0x7d,0x84,0xa6,0xca,0x7d,0x82,0x96,0xff,0x00,0x03,0x24,0x00,0x00,0xa2,0xa4, -0xaf,0xff,0x23,0x16,0x00,0x00,0x00,0x00,0x21,0x00,0xa0,0x12,0x68,0x15,0xc2,0x26, -0x00,0x64,0x43,0x90,0x47,0x00,0xe4,0x34,0xb0,0x03,0xc5,0x34,0x00,0x00,0x83,0xa0, -0x00,0x00,0xa3,0xac,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40, -0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40, -0x68,0x15,0xc5,0x26,0xfc,0x4a,0xa2,0x8c,0x38,0x00,0xbf,0x8f,0x34,0x00,0xb7,0x8f, -0x30,0x00,0xb6,0x8f,0x2c,0x00,0xb5,0x8f,0x28,0x00,0xb4,0x8f,0x24,0x00,0xb3,0x8f, -0x20,0x00,0xb2,0x8f,0x1c,0x00,0xb1,0x8f,0x18,0x00,0xb0,0x8f,0x60,0x00,0x03,0x3c, -0x25,0x10,0x43,0x00,0x41,0xb0,0x04,0x3c,0x40,0x00,0xbd,0x27,0x00,0x00,0x82,0xac, -0x08,0x00,0xe0,0x03,0xfc,0x4a,0xa2,0xac,0xf2,0x05,0x00,0x08,0xfc,0x63,0xf1,0xa2, -0xfc,0x63,0x43,0x90,0x46,0x00,0xe4,0x34,0xb0,0x03,0xc5,0x34,0x00,0x00,0x83,0xa0, -0x00,0x00,0xa3,0xac,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40, -0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40, -0x68,0x15,0xc5,0x26,0xfc,0x4a,0xa2,0x8c,0x38,0x00,0xbf,0x8f,0x34,0x00,0xb7,0x8f, -0x30,0x00,0xb6,0x8f,0x2c,0x00,0xb5,0x8f,0x28,0x00,0xb4,0x8f,0x24,0x00,0xb3,0x8f, -0x20,0x00,0xb2,0x8f,0x1c,0x00,0xb1,0x8f,0x18,0x00,0xb0,0x8f,0x60,0x00,0x03,0x3c, -0x25,0x10,0x43,0x00,0x41,0xb0,0x04,0x3c,0x40,0x00,0xbd,0x27,0x00,0x00,0x82,0xac, -0x08,0x00,0xe0,0x03,0xfc,0x4a,0xa2,0xac,0x00,0x80,0x03,0x3c,0x25,0xb0,0x02,0x3c, -0x88,0x19,0x63,0x24,0x18,0x03,0x42,0x34,0x00,0x00,0x43,0xac,0x00,0x60,0x01,0x40, -0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34, -0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40,0x02,0x80,0x05,0x3c,0x68,0x15,0xa5,0x24, -0x04,0x4b,0xa2,0x8c,0xfc,0x4a,0xa4,0x8c,0x00,0x08,0x03,0x3c,0x24,0x10,0x43,0x00, -0x25,0x20,0x82,0x00,0x41,0xb0,0x03,0x3c,0x00,0x00,0x64,0xac,0x08,0x00,0xe0,0x03, -0xfc,0x4a,0xa4,0xac,0x25,0xb0,0x04,0x3c,0x00,0x80,0x02,0x3c,0xc0,0xff,0xbd,0x27, -0x18,0x03,0x83,0x34,0xe4,0x19,0x42,0x24,0x3c,0x00,0xbf,0xaf,0x38,0x00,0xbe,0xaf, -0x34,0x00,0xb7,0xaf,0x30,0x00,0xb6,0xaf,0x2c,0x00,0xb5,0xaf,0x28,0x00,0xb4,0xaf, -0x24,0x00,0xb3,0xaf,0x20,0x00,0xb2,0xaf,0x1c,0x00,0xb1,0xaf,0x18,0x00,0xb0,0xaf, -0x00,0x00,0x62,0xac,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40, -0x02,0x80,0x02,0x3c,0x2a,0xb0,0x03,0x3c,0x68,0x15,0x51,0x24,0xb0,0x03,0x93,0x34, -0x2c,0x00,0x77,0x34,0x02,0x80,0x15,0x3c,0x02,0x80,0x16,0x3c,0x9c,0x06,0x00,0x08, -0x02,0x80,0x1e,0x3c,0x14,0x64,0x26,0x92,0xe4,0x64,0x25,0x8e,0x00,0x32,0x06,0x00, -0x21,0x30,0xc2,0x00,0x78,0x64,0x26,0xae,0x10,0x01,0x00,0x0c,0x10,0x00,0xa0,0xaf, -0xe4,0x64,0x30,0x8e,0x0a,0x00,0x04,0x24,0x21,0x90,0x00,0x00,0x00,0x00,0x70,0xae, -0x4d,0x01,0x00,0x0c,0xff,0xff,0x10,0x32,0x02,0x80,0x02,0x3c,0x25,0x80,0x02,0x02, -0x0c,0x00,0x05,0x92,0x02,0x00,0x04,0x92,0xff,0x00,0x02,0x24,0xff,0x00,0xa3,0x30, -0x04,0x00,0x62,0x10,0x21,0x80,0x04,0x02,0x00,0x00,0x63,0xae,0x01,0x00,0x12,0x24, -0x14,0x64,0x25,0xa2,0x88,0x96,0xb0,0xae,0x21,0x28,0x00,0x02,0x02,0x00,0xa2,0x90, -0x08,0x00,0x10,0x26,0x21,0x20,0x00,0x02,0xff,0x00,0x42,0x30,0x00,0x00,0x62,0xae, -0x03,0x00,0xa3,0x90,0x00,0x00,0x00,0x00,0x7f,0x00,0x63,0x30,0x00,0x00,0x63,0xae, -0x00,0x00,0x72,0xae,0x03,0x00,0xa2,0x90,0x84,0x96,0xc3,0x92,0x02,0x00,0xa2,0x90, -0x00,0x00,0x00,0x00,0xff,0x00,0x42,0x30,0x2c,0x00,0x42,0x28,0x11,0x00,0x40,0x10, -0x08,0x00,0x02,0x24,0x03,0x00,0xa2,0x90,0x00,0x00,0x00,0x00,0x7f,0x00,0x42,0x30, -0x84,0x96,0xc2,0xa2,0x02,0x00,0xa3,0x90,0x02,0x80,0x02,0x3c,0x74,0x84,0x42,0x24, -0xff,0x00,0x63,0x30,0xc0,0x18,0x03,0x00,0x21,0x18,0x62,0x00,0x04,0x00,0x62,0x8c, -0x00,0x00,0x00,0x00,0x09,0xf8,0x40,0x00,0x80,0x96,0xc2,0xaf,0x21,0xa0,0x40,0x00, -0x08,0x00,0x02,0x24,0x0a,0x00,0x04,0x24,0x05,0x00,0x82,0x12,0x00,0x01,0x07,0x24, -0x01,0x00,0x02,0x24,0x02,0x00,0x03,0x24,0x01,0x00,0xe2,0xa2,0x01,0x00,0xe3,0xa2, -0xbc,0xff,0x40,0x16,0x20,0x10,0x02,0x3c,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34, -0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40,0xfc,0x4a,0x22,0x8e,0x00,0x04,0x03,0x3c, -0x41,0xb0,0x04,0x3c,0x25,0x10,0x43,0x00,0x00,0x00,0x82,0xac,0x3c,0x00,0xbf,0x8f, -0xfc,0x4a,0x22,0xae,0x38,0x00,0xbe,0x8f,0x34,0x00,0xb7,0x8f,0x30,0x00,0xb6,0x8f, -0x2c,0x00,0xb5,0x8f,0x28,0x00,0xb4,0x8f,0x24,0x00,0xb3,0x8f,0x20,0x00,0xb2,0x8f, -0x1c,0x00,0xb1,0x8f,0x18,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03,0x40,0x00,0xbd,0x27, -0xc8,0xff,0xbd,0x27,0xff,0xff,0xa8,0x30,0x02,0x80,0x02,0x3c,0x25,0x40,0x02,0x01, -0x30,0x00,0xb6,0xaf,0x20,0x00,0xb2,0xaf,0x34,0x00,0xbf,0xaf,0x2c,0x00,0xb5,0xaf, -0x28,0x00,0xb4,0xaf,0x24,0x00,0xb3,0xaf,0x1c,0x00,0xb1,0xaf,0x18,0x00,0xb0,0xaf, -0x00,0x00,0x03,0x8d,0xff,0xff,0xd2,0x30,0x21,0xb0,0xa0,0x00,0x00,0xc0,0x02,0x24, -0x08,0x00,0x45,0x26,0x04,0x00,0x06,0x8d,0x24,0x18,0x62,0x00,0xff,0x3f,0xa5,0x30, -0xf0,0xff,0x02,0x3c,0x25,0x18,0x65,0x00,0xff,0xff,0x42,0x34,0x24,0x18,0x62,0x00, -0x00,0x80,0x05,0x3c,0x25,0x18,0x65,0x00,0xff,0x01,0xc6,0x34,0x00,0x00,0x03,0xad, -0x04,0x00,0x06,0xad,0x21,0x48,0x80,0x00,0xff,0xff,0xe7,0x30,0x18,0x00,0x12,0xa5, -0x1a,0x00,0x07,0xa1,0x18,0x00,0x03,0x8d,0xff,0x7f,0x02,0x3c,0xff,0xff,0x42,0x34, -0x24,0x18,0x62,0x00,0x02,0x80,0x15,0x3c,0x18,0x00,0x03,0xad,0x68,0x15,0xa5,0x26, -0xd6,0x63,0xa3,0x90,0x00,0x00,0x00,0x00,0x01,0x00,0x62,0x24,0xd6,0x63,0xa2,0xa0, -0x18,0x00,0x04,0x8d,0xff,0x80,0x02,0x3c,0x20,0x00,0x45,0x26,0xff,0xff,0x42,0x34, -0x7f,0x00,0x63,0x30,0xff,0xff,0xb2,0x30,0x24,0x20,0x82,0x00,0x00,0x1e,0x03,0x00, -0x25,0xb0,0x02,0x3c,0xc0,0x00,0x42,0x34,0x25,0x20,0x83,0x00,0x07,0x00,0x45,0x32, -0x18,0x00,0x04,0xad,0x00,0x00,0x52,0xa4,0x03,0x00,0xa0,0x10,0xff,0xff,0x42,0x32, -0x08,0x00,0x42,0x26,0xff,0xff,0x42,0x30,0x68,0x15,0xb4,0x26,0x54,0x65,0x86,0x8e, -0x58,0x65,0x90,0x8e,0xf8,0xff,0x52,0x30,0x21,0x10,0xd2,0x00,0x2b,0x10,0x02,0x02, -0x31,0x00,0x40,0x10,0xff,0x00,0x33,0x31,0x23,0x80,0x06,0x02,0x21,0x28,0xc0,0x02, -0xff,0xff,0x07,0x32,0x01,0x00,0x11,0x24,0x21,0x20,0x60,0x02,0x10,0x01,0x00,0x0c, -0x10,0x00,0xb1,0xaf,0x23,0x18,0x50,0x02,0xff,0xff,0x72,0x30,0x22,0x10,0x02,0x3c, -0x21,0x10,0x42,0x02,0x21,0x20,0x60,0x02,0x4d,0x01,0x00,0x0c,0x54,0x65,0x82,0xae, -0x21,0x28,0xd0,0x02,0x21,0x38,0x40,0x02,0x21,0x20,0x60,0x02,0x10,0x00,0xb1,0xaf, -0x22,0x10,0x06,0x3c,0x10,0x01,0x00,0x0c,0x68,0x15,0xb1,0x26,0x54,0x65,0x23,0x8e, -0x25,0xb0,0x10,0x3c,0xb0,0x03,0x02,0x36,0x21,0x20,0x60,0x02,0x00,0x00,0x43,0xac, -0x4d,0x01,0x00,0x0c,0x00,0x00,0x00,0x00,0x54,0x65,0x25,0x8e,0xec,0x00,0x02,0x36, -0xbd,0x00,0x04,0x36,0x00,0x00,0x45,0xac,0x00,0x00,0x83,0x90,0xc2,0x00,0x10,0x36, -0x34,0x00,0xbf,0x8f,0x10,0x00,0x63,0x34,0x00,0x00,0x83,0xa0,0x30,0x00,0xb6,0x8f, -0x00,0x00,0x05,0xa6,0x2c,0x00,0xb5,0x8f,0x28,0x00,0xb4,0x8f,0x24,0x00,0xb3,0x8f, -0x20,0x00,0xb2,0x8f,0x1c,0x00,0xb1,0x8f,0x18,0x00,0xb0,0x8f,0x01,0x00,0x02,0x24, -0x08,0x00,0xe0,0x03,0x38,0x00,0xbd,0x27,0x21,0x28,0xc0,0x02,0x21,0x20,0x60,0x02, -0x21,0x38,0x40,0x02,0x01,0x00,0x02,0x24,0x10,0x01,0x00,0x0c,0x10,0x00,0xa2,0xaf, -0x54,0x65,0x83,0x8e,0x68,0x15,0xb1,0x26,0x25,0xb0,0x10,0x3c,0x21,0x18,0x72,0x00, -0x54,0x65,0x83,0xae,0x54,0x65,0x23,0x8e,0xb0,0x03,0x02,0x36,0x21,0x20,0x60,0x02, -0x00,0x00,0x43,0xac,0x4d,0x01,0x00,0x0c,0x00,0x00,0x00,0x00,0x54,0x65,0x25,0x8e, -0xec,0x00,0x02,0x36,0xbd,0x00,0x04,0x36,0x00,0x00,0x45,0xac,0x00,0x00,0x83,0x90, -0xc2,0x00,0x10,0x36,0x34,0x00,0xbf,0x8f,0x10,0x00,0x63,0x34,0x00,0x00,0x83,0xa0, -0x30,0x00,0xb6,0x8f,0x00,0x00,0x05,0xa6,0x2c,0x00,0xb5,0x8f,0x28,0x00,0xb4,0x8f, -0x24,0x00,0xb3,0x8f,0x20,0x00,0xb2,0x8f,0x1c,0x00,0xb1,0x8f,0x18,0x00,0xb0,0x8f, -0x01,0x00,0x02,0x24,0x08,0x00,0xe0,0x03,0x38,0x00,0xbd,0x27,0xe0,0xff,0xbd,0x27, -0x25,0xb0,0x02,0x3c,0x14,0x00,0xb1,0xaf,0x18,0x00,0xbf,0xaf,0x10,0x00,0xb0,0xaf, -0xbf,0x00,0x42,0x34,0x00,0x00,0x43,0x90,0x21,0x28,0x00,0x00,0x08,0x00,0x06,0x24, -0x04,0x00,0x63,0x2c,0x12,0x00,0x60,0x14,0x21,0x88,0x80,0x00,0x00,0x60,0x02,0x40, -0x01,0x00,0x41,0x34,0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40,0x02,0x80,0x03,0x3c, -0x00,0x7b,0x63,0x24,0x04,0x00,0x64,0x8c,0x00,0x00,0x23,0xae,0x04,0x00,0x71,0xac, -0x00,0x00,0x91,0xac,0x04,0x00,0x24,0xae,0x00,0x60,0x82,0x40,0x18,0x00,0xbf,0x8f, -0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03,0x20,0x00,0xbd,0x27, -0x08,0x00,0x82,0x94,0x02,0x80,0x04,0x3c,0x97,0x45,0x00,0x0c,0x25,0x20,0x44,0x00, -0x00,0x60,0x10,0x40,0x01,0x00,0x01,0x36,0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40, -0x08,0x00,0x25,0x8e,0x0c,0x00,0x26,0x96,0x14,0x00,0x27,0x96,0xf0,0x06,0x00,0x0c, -0x09,0x00,0x04,0x24,0x04,0x00,0x23,0x8e,0x00,0x00,0x22,0x8e,0x21,0x20,0x20,0x02, -0x00,0x00,0x62,0xac,0x04,0x00,0x43,0xac,0x00,0x00,0x31,0xae,0xbd,0x4e,0x00,0x0c, -0x04,0x00,0x31,0xae,0x00,0x60,0x90,0x40,0x18,0x00,0xbf,0x8f,0x14,0x00,0xb1,0x8f, -0x10,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03,0x20,0x00,0xbd,0x27,0x02,0x80,0x02,0x3c, -0x68,0x15,0x47,0x24,0x8c,0x64,0xe3,0x90,0xff,0xff,0xa5,0x30,0x09,0x00,0xa3,0x10, -0x21,0x20,0xc0,0x00,0xfc,0x64,0xe2,0x8c,0x00,0x00,0x00,0x00,0x08,0x00,0xc2,0xac, -0x06,0x65,0xe3,0x94,0x0e,0x00,0x02,0x24,0x14,0x00,0xc2,0xac,0x8b,0x07,0x00,0x08, -0x0c,0x00,0xc3,0xac,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x00,0x80,0x03,0x3c, -0x25,0xb0,0x02,0x3c,0xd0,0xff,0xbd,0x27,0x4c,0x1f,0x63,0x24,0x18,0x03,0x42,0x34, -0x28,0x00,0xbf,0xaf,0x24,0x00,0xb3,0xaf,0x20,0x00,0xb2,0xaf,0x1c,0x00,0xb1,0xaf, -0x18,0x00,0xb0,0xaf,0x00,0x00,0x43,0xac,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34, -0x00,0x60,0x81,0x40,0x2a,0xb0,0x02,0x3c,0x36,0x00,0x42,0x34,0x00,0x00,0x43,0x90, -0x02,0x80,0x13,0x3c,0x68,0x15,0x66,0x26,0xc0,0x18,0x03,0x00,0x5c,0x65,0xc5,0x8c, -0x23,0xb0,0x04,0x3c,0xf0,0x07,0x63,0x30,0xff,0x1f,0x02,0x3c,0x21,0x18,0x64,0x00, -0xff,0xff,0x42,0x34,0x24,0x20,0x62,0x00,0x23,0x88,0x85,0x00,0x2b,0x38,0x85,0x00, -0x00,0x04,0x22,0x26,0x00,0x65,0xc3,0x8c,0x0b,0x88,0x47,0x00,0x01,0x04,0x25,0x2e, -0xfc,0x64,0xc3,0xac,0x60,0x65,0xc4,0xac,0x06,0x65,0xc0,0xa4,0x11,0x00,0xa0,0x14, -0x05,0x65,0xc0,0xa0,0x00,0xfc,0x83,0x24,0x23,0x10,0x02,0x3c,0x0b,0x18,0x87,0x00, -0xff,0x03,0x42,0x34,0x2b,0x10,0x43,0x00,0x33,0x00,0x40,0x14,0x00,0x00,0x00,0x00, -0x23,0x88,0x83,0x00,0x2b,0x10,0x83,0x00,0x5c,0x65,0xc3,0xac,0x03,0x00,0x40,0x10, -0x01,0x04,0x25,0x2e,0x00,0x04,0x31,0x26,0x01,0x04,0x25,0x2e,0x0e,0x00,0xa0,0x10, -0x68,0x15,0x70,0x26,0x68,0x15,0x70,0x26,0x60,0x65,0x03,0x8e,0x5c,0x65,0x04,0x8e, -0x00,0x00,0x00,0x00,0x2b,0x10,0x83,0x00,0x25,0x00,0x40,0x14,0x2b,0x10,0x64,0x00, -0x51,0x00,0x40,0x14,0x25,0xb0,0x02,0x3c,0x80,0x00,0x03,0x24,0xd0,0x03,0x42,0x34, -0x00,0x00,0x43,0xac,0x68,0x15,0x70,0x26,0x5c,0x65,0x03,0x96,0x2a,0xb0,0x02,0x3c, -0x35,0x00,0x42,0x34,0xc2,0x88,0x03,0x00,0x00,0x00,0x51,0xa0,0x8f,0x10,0x00,0x0c, -0x00,0x00,0x00,0x00,0x06,0x65,0x03,0x96,0x25,0xb0,0x02,0x3c,0xb0,0x03,0x42,0x34, -0x00,0x00,0x43,0xac,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x01,0x00,0x21,0x38, -0x00,0x60,0x81,0x40,0xfc,0x4a,0x02,0x8e,0x80,0x00,0x03,0x3c,0x41,0xb0,0x04,0x3c, -0x25,0x10,0x43,0x00,0x00,0x00,0x82,0xac,0x28,0x00,0xbf,0x8f,0xfc,0x4a,0x02,0xae, -0x24,0x00,0xb3,0x8f,0x20,0x00,0xb2,0x8f,0x1c,0x00,0xb1,0x8f,0x18,0x00,0xb0,0x8f, -0x08,0x00,0xe0,0x03,0x30,0x00,0xbd,0x27,0x00,0x08,0x00,0x08,0x00,0xfc,0x63,0x24, -0xfc,0x64,0x05,0x8e,0x21,0x30,0x80,0x00,0xff,0xff,0x27,0x32,0x09,0x00,0x04,0x24, -0x10,0x01,0x00,0x0c,0x10,0x00,0xa0,0xaf,0xfc,0x64,0x03,0x8e,0x06,0x65,0x05,0x96, -0x5c,0x65,0x02,0x8e,0x21,0x18,0x71,0x00,0x21,0x28,0x25,0x02,0x21,0x10,0x51,0x00, -0x09,0x00,0x04,0x24,0x5c,0x65,0x02,0xae,0xfc,0x64,0x03,0xae,0x4d,0x01,0x00,0x0c, -0x06,0x65,0x05,0xa6,0x68,0x15,0x70,0x26,0x5c,0x65,0x03,0x96,0x2a,0xb0,0x02,0x3c, -0x35,0x00,0x42,0x34,0xc2,0x88,0x03,0x00,0x00,0x00,0x51,0xa0,0x8f,0x10,0x00,0x0c, -0x00,0x00,0x00,0x00,0x06,0x65,0x03,0x96,0x25,0xb0,0x02,0x3c,0xb0,0x03,0x42,0x34, -0x00,0x00,0x43,0xac,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x01,0x00,0x21,0x38, -0x00,0x60,0x81,0x40,0xfc,0x4a,0x02,0x8e,0x80,0x00,0x03,0x3c,0x41,0xb0,0x04,0x3c, -0x25,0x10,0x43,0x00,0x00,0x00,0x82,0xac,0x28,0x00,0xbf,0x8f,0xfc,0x4a,0x02,0xae, -0x24,0x00,0xb3,0x8f,0x20,0x00,0xb2,0x8f,0x1c,0x00,0xb1,0x8f,0x18,0x00,0xb0,0x8f, -0x08,0x00,0xe0,0x03,0x30,0x00,0xbd,0x27,0x64,0x65,0x02,0x8e,0xfc,0x64,0x05,0x8e, -0x21,0x30,0x80,0x00,0x23,0x88,0x44,0x00,0xff,0xff,0x27,0x32,0x09,0x00,0x04,0x24, -0x10,0x01,0x00,0x0c,0x10,0x00,0xa0,0xaf,0xfc,0x64,0x03,0x8e,0x06,0x65,0x02,0x96, -0x60,0x65,0x12,0x96,0x21,0x18,0x71,0x00,0x21,0x10,0x22,0x02,0x23,0x10,0x11,0x3c, -0xfc,0x64,0x03,0xae,0x06,0x65,0x02,0xa6,0x06,0x00,0x40,0x16,0x5c,0x65,0x11,0xae, -0x09,0x00,0x04,0x24,0x4d,0x01,0x00,0x0c,0x68,0x15,0x70,0x26,0x46,0x08,0x00,0x08, -0x00,0x00,0x00,0x00,0x4d,0x01,0x00,0x0c,0x09,0x00,0x04,0x24,0xfc,0x64,0x05,0x8e, -0x09,0x00,0x04,0x24,0x23,0x10,0x06,0x3c,0x21,0x38,0x40,0x02,0x10,0x01,0x00,0x0c, -0x10,0x00,0xa0,0xaf,0xfc,0x64,0x03,0x8e,0x06,0x65,0x02,0x96,0x21,0x20,0x51,0x02, -0x21,0x18,0x72,0x00,0x21,0x10,0x42,0x02,0x5c,0x65,0x04,0xae,0x09,0x00,0x04,0x24, -0xfc,0x64,0x03,0xae,0x75,0x08,0x00,0x08,0x06,0x65,0x02,0xa6,0x02,0x80,0x09,0x3c, -0x68,0x15,0x28,0x25,0xdc,0x63,0x06,0x8d,0xff,0xff,0x02,0x34,0x3f,0x00,0xc2,0x10, -0x21,0x38,0x80,0x00,0x2b,0x10,0xc7,0x00,0x30,0x00,0x40,0x10,0x02,0x19,0x06,0x00, -0x21,0x10,0xc7,0x00,0x23,0x10,0x43,0x00,0x10,0x00,0x46,0x24,0xdc,0x63,0x06,0xad, -0x68,0x15,0x26,0x25,0x04,0x40,0xc4,0x8c,0xe0,0x63,0x02,0xad,0xff,0xff,0x02,0x34, -0x2f,0x00,0x82,0x10,0x00,0x00,0x00,0x00,0x2b,0x10,0x87,0x00,0x1f,0x00,0x40,0x10, -0x02,0x19,0x04,0x00,0x21,0x10,0x87,0x00,0x23,0x10,0x43,0x00,0x10,0x00,0x44,0x24, -0x04,0x40,0xc4,0xac,0xe0,0x63,0xc2,0xac,0xc0,0x10,0x05,0x00,0x21,0x10,0x45,0x00, -0x80,0x10,0x02,0x00,0x21,0x10,0x45,0x00,0x68,0x15,0x23,0x25,0x80,0x10,0x02,0x00, -0x21,0x28,0x43,0x00,0x68,0x51,0xa6,0x8c,0x00,0x21,0x07,0x00,0xff,0xff,0xc2,0x38, -0x0a,0x30,0x82,0x00,0x2b,0x18,0xc7,0x00,0x07,0x00,0x60,0x10,0x21,0x10,0xc7,0x00, -0x02,0x19,0x06,0x00,0x23,0x10,0x43,0x00,0x10,0x00,0x46,0x24,0x68,0x51,0xa6,0xac, -0x08,0x00,0xe0,0x03,0x6c,0x51,0xa2,0xac,0x02,0x19,0x06,0x00,0x23,0x10,0x43,0x00, -0x68,0x51,0xa2,0xac,0x08,0x00,0xe0,0x03,0x6c,0x51,0xa2,0xac,0x21,0x10,0x87,0x00, -0x23,0x10,0x43,0x00,0xa5,0x08,0x00,0x08,0x04,0x40,0xc2,0xac,0x21,0x10,0xc7,0x00, -0x68,0x15,0x26,0x25,0x04,0x40,0xc4,0x8c,0x23,0x10,0x43,0x00,0xdc,0x63,0x02,0xad, -0xe0,0x63,0x02,0xad,0xff,0xff,0x02,0x34,0xd4,0xff,0x82,0x14,0x2b,0x10,0x87,0x00, -0x00,0x21,0x07,0x00,0x9e,0x08,0x00,0x08,0x04,0x40,0xc4,0xac,0x00,0x31,0x04,0x00, -0x91,0x08,0x00,0x08,0xdc,0x63,0x06,0xad,0x63,0x00,0x82,0x24,0x77,0x00,0x42,0x2c, -0x00,0x00,0x85,0x28,0x04,0x00,0x40,0x10,0x21,0x18,0x00,0x00,0x64,0x00,0x82,0x24, -0x64,0x00,0x03,0x24,0x0b,0x18,0x45,0x00,0x08,0x00,0xe0,0x03,0x21,0x10,0x60,0x00, -0x0c,0x00,0x82,0x8c,0x00,0x00,0x00,0x00,0x3f,0x00,0x42,0x30,0x04,0x00,0x42,0x28, -0x17,0x00,0x40,0x10,0x25,0xb0,0x02,0x3c,0x24,0x08,0x42,0x34,0x00,0x00,0x43,0x8c, -0x00,0x00,0x00,0x00,0x00,0x02,0x63,0x30,0x16,0x00,0x60,0x14,0x01,0x00,0x02,0x24, -0x05,0x00,0xa3,0x90,0x00,0x00,0x00,0x00,0x82,0x21,0x03,0x00,0x28,0x00,0x82,0x10, -0xf5,0xff,0x02,0x24,0x02,0x00,0x82,0x28,0x39,0x00,0x40,0x14,0x02,0x00,0x02,0x24, -0x2e,0x00,0x82,0x10,0xe9,0xff,0x02,0x24,0x03,0x00,0x02,0x24,0x24,0x00,0x82,0x10, -0x3e,0x00,0x63,0x30,0x05,0x00,0xc4,0x24,0xd2,0x08,0x00,0x08,0x00,0x00,0x00,0x00, -0x04,0x00,0xa4,0x90,0x00,0x00,0x00,0x00,0x42,0x20,0x04,0x00,0xd2,0x08,0x00,0x08, -0x96,0xff,0x84,0x24,0x05,0x00,0xa3,0x90,0x00,0x00,0x00,0x00,0x60,0x00,0x64,0x30, -0x42,0x21,0x04,0x00,0x0e,0x00,0x82,0x10,0x1f,0x00,0x62,0x30,0x02,0x00,0x82,0x28, -0x1d,0x00,0x40,0x14,0x02,0x00,0x02,0x24,0x14,0x00,0x82,0x10,0x1f,0x00,0x62,0x30, -0x03,0x00,0x02,0x24,0xeb,0xff,0x82,0x14,0x1f,0x00,0x62,0x30,0x40,0x10,0x02,0x00, -0xdd,0xff,0x03,0x24,0x23,0x30,0x62,0x00,0xf6,0x08,0x00,0x08,0x05,0x00,0xc4,0x24, -0x40,0x10,0x02,0x00,0xf5,0xff,0x03,0x24,0x0e,0x09,0x00,0x08,0x23,0x30,0x62,0x00, -0x3e,0x00,0x63,0x30,0x23,0x30,0x43,0x00,0xf6,0x08,0x00,0x08,0x05,0x00,0xc4,0x24, -0xdd,0xff,0x02,0x24,0x16,0x09,0x00,0x08,0x23,0x30,0x43,0x00,0x40,0x10,0x02,0x00, -0xe9,0xff,0x03,0x24,0x0e,0x09,0x00,0x08,0x23,0x30,0x62,0x00,0x3e,0x00,0x63,0x30, -0x16,0x09,0x00,0x08,0x23,0x30,0x43,0x00,0xd2,0xff,0x80,0x14,0x1f,0x00,0x62,0x30, -0x40,0x10,0x02,0x00,0xf8,0xff,0x03,0x24,0x0e,0x09,0x00,0x08,0x23,0x30,0x62,0x00, -0xcc,0xff,0x80,0x14,0x3e,0x00,0x63,0x30,0xf8,0xff,0x02,0x24,0x16,0x09,0x00,0x08, -0x23,0x30,0x43,0x00,0xa0,0xff,0xbd,0x27,0x02,0x80,0x02,0x3c,0x4c,0x00,0xb5,0xaf, -0x5c,0x00,0xbf,0xaf,0x58,0x00,0xbe,0xaf,0x54,0x00,0xb7,0xaf,0x50,0x00,0xb6,0xaf, -0x48,0x00,0xb4,0xaf,0x44,0x00,0xb3,0xaf,0x40,0x00,0xb2,0xaf,0x3c,0x00,0xb1,0xaf, -0x38,0x00,0xb0,0xaf,0x68,0x15,0x55,0x24,0x25,0xb0,0x03,0x3c,0x04,0x01,0x62,0x34, -0x00,0x00,0x43,0x8c,0x44,0x65,0xa7,0x8e,0x00,0x00,0x00,0x00,0x33,0x00,0xe3,0x10, -0x48,0x65,0xa3,0xae,0x2b,0x10,0x67,0x00,0xa8,0x00,0x40,0x14,0x2b,0x10,0xe3,0x00, -0xd1,0x00,0x40,0x14,0x02,0x80,0x02,0x3c,0x68,0x15,0x44,0x24,0x18,0x65,0x83,0x94, -0x02,0x80,0x02,0x3c,0x21,0x88,0x00,0x00,0x19,0x00,0x40,0x1a,0x25,0x98,0x62,0x00, -0x21,0xb8,0x80,0x00,0x21,0xb0,0x80,0x00,0x01,0x00,0x14,0x24,0x21,0x20,0x00,0x00, -0x21,0x80,0x93,0x00,0x00,0x00,0x05,0x8e,0x00,0x00,0x00,0x00,0x07,0x00,0xa0,0x10, -0x01,0x00,0x22,0x26,0x04,0x00,0x02,0x8e,0x00,0xf0,0x03,0x3c,0x00,0x20,0x04,0x3c, -0x24,0x10,0x43,0x00,0x1e,0x00,0x44,0x10,0x06,0x00,0x22,0x26,0xff,0xff,0x51,0x30, -0x82,0x16,0x05,0x00,0x01,0x00,0x42,0x30,0x34,0x00,0x54,0x10,0x00,0x00,0x00,0x00, -0x80,0x20,0x11,0x00,0x2a,0x10,0x92,0x00,0xed,0xff,0x40,0x14,0x00,0x00,0x00,0x00, -0xbd,0x4e,0x00,0x0c,0x21,0x20,0xc0,0x03,0x02,0x80,0x02,0x3c,0x08,0x04,0x44,0x24, -0x21,0x28,0x00,0x00,0x21,0x30,0x00,0x00,0x31,0x1c,0x00,0x0c,0x21,0x38,0x00,0x00, -0x25,0xb0,0x03,0x3c,0x04,0x01,0x62,0x34,0x00,0x00,0x43,0x8c,0x44,0x65,0xa7,0x8e, -0x00,0x00,0x00,0x00,0xcf,0xff,0xe3,0x14,0x48,0x65,0xa3,0xae,0x25,0xb0,0x03,0x3c, -0x00,0x01,0x62,0x34,0x00,0x00,0x47,0xac,0x66,0x09,0x00,0x08,0x44,0x65,0xa7,0xae, -0xb0,0x4c,0xe2,0x8e,0x00,0x00,0x00,0x00,0x01,0x00,0x42,0x24,0xb0,0x4c,0xe2,0xae, -0x0c,0x00,0x04,0x8e,0x0c,0x00,0x02,0x24,0x3f,0x00,0x83,0x30,0x64,0x00,0x62,0x10, -0x21,0x28,0xe0,0x02,0x3f,0x00,0x83,0x30,0x0d,0x00,0x02,0x24,0x59,0x00,0x62,0x10, -0x00,0x00,0x00,0x00,0x3f,0x00,0x83,0x30,0x0e,0x00,0x02,0x24,0x04,0x00,0x62,0x10, -0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x8e,0x5b,0x09,0x00,0x08,0x06,0x00,0x22,0x26, -0xbc,0x4c,0xe2,0x8e,0x00,0x00,0x00,0x00,0x01,0x00,0x42,0x24,0xbc,0x4c,0xe2,0xae, -0x00,0x00,0x05,0x8e,0x5b,0x09,0x00,0x08,0x06,0x00,0x22,0x26,0x00,0x40,0xc2,0x8e, -0x00,0x00,0x00,0x00,0x02,0x12,0x02,0x00,0x0f,0x00,0x42,0x30,0x05,0x00,0x54,0x10, -0xc2,0x13,0x05,0x00,0x1e,0x00,0x42,0x30,0x21,0x10,0x51,0x00,0x60,0x09,0x00,0x08, -0xff,0xff,0x51,0x30,0x02,0x40,0xc2,0x92,0x00,0x00,0x00,0x00,0x1e,0x00,0x40,0x14, -0x02,0x80,0x03,0x3c,0x04,0x00,0x03,0x8e,0x00,0x00,0x00,0x00,0x02,0x14,0x03,0x00, -0x0f,0x00,0x42,0x30,0x17,0x00,0x40,0x14,0x02,0x17,0x03,0x00,0x03,0x00,0x44,0x30, -0x08,0x00,0x80,0x10,0x00,0xc0,0x02,0x3c,0x24,0x10,0x62,0x00,0x11,0x00,0x40,0x14, -0x03,0x00,0x02,0x24,0x10,0x00,0x82,0x10,0x02,0x80,0x03,0x3c,0x0f,0x00,0x80,0x10, -0x68,0x15,0x63,0x24,0x80,0x10,0x11,0x00,0x21,0x28,0x53,0x00,0xec,0xff,0xa3,0x8c, -0x25,0xb0,0x02,0x3c,0xd4,0x02,0x42,0x34,0x21,0x20,0x00,0x02,0x00,0x00,0x43,0xac, -0xdc,0x08,0x00,0x0c,0x00,0x00,0x00,0x00,0x21,0x20,0x40,0x00,0x8b,0x08,0x00,0x0c, -0x21,0x28,0x00,0x00,0x02,0x80,0x03,0x3c,0x68,0x15,0x63,0x24,0x02,0x40,0x62,0x90, -0x00,0x00,0x00,0x00,0x85,0x00,0x54,0x10,0x00,0x00,0x00,0x00,0x02,0x80,0x04,0x3c, -0x68,0x15,0x84,0x24,0x02,0x40,0x83,0x90,0x02,0x00,0x02,0x24,0x68,0x00,0x62,0x10, -0x00,0x00,0x00,0x00,0x25,0xb0,0x03,0x3c,0x4c,0x00,0x63,0x34,0x00,0x00,0x62,0x90, -0x00,0x00,0x00,0x00,0x03,0x00,0x42,0x30,0x08,0x00,0x54,0x10,0x02,0x80,0x04,0x3c, -0x00,0x00,0x05,0x8e,0x00,0x00,0x00,0x00,0xc2,0x13,0x05,0x00,0x1e,0x00,0x42,0x30, -0x21,0x10,0x51,0x00,0x60,0x09,0x00,0x08,0xff,0xff,0x51,0x30,0xd0,0x02,0x02,0x24, -0x68,0x15,0x84,0x24,0xdc,0x63,0x82,0xac,0x00,0x00,0x05,0x8e,0xd3,0x09,0x00,0x08, -0xc2,0x13,0x05,0x00,0xb8,0x4c,0xa2,0x8c,0x00,0x00,0x00,0x00,0x01,0x00,0x42,0x24, -0xb8,0x4c,0xa2,0xac,0x0c,0x00,0x04,0x8e,0x86,0x09,0x00,0x08,0x3f,0x00,0x83,0x30, -0xb4,0x4c,0xe2,0x8e,0x00,0x00,0x00,0x00,0x01,0x00,0x42,0x24,0xb4,0x4c,0xe2,0xae, -0x0c,0x00,0x04,0x8e,0x82,0x09,0x00,0x08,0x3f,0x00,0x83,0x30,0x4c,0x65,0xa2,0x8e, -0xff,0xff,0x71,0x30,0x23,0x10,0x47,0x00,0xff,0xff,0x50,0x30,0x21,0x18,0x11,0x02, -0xff,0xff,0x72,0x30,0xa1,0x4e,0x00,0x0c,0x21,0x20,0x40,0x02,0x76,0x00,0x40,0x10, -0x21,0xf0,0x40,0x00,0x08,0x00,0x42,0x8c,0x44,0x65,0xa6,0x8e,0x21,0x38,0x00,0x02, -0x21,0x18,0x52,0x00,0x21,0x28,0x40,0x00,0x08,0x00,0x04,0x24,0x14,0x65,0xa3,0xae, -0x18,0x65,0xa2,0xae,0x10,0x01,0x00,0x0c,0x10,0x00,0xa0,0xaf,0x4d,0x01,0x00,0x0c, -0x08,0x00,0x04,0x24,0x18,0x65,0xa5,0x8e,0x25,0xb0,0x03,0x3c,0x24,0x10,0x02,0x3c, -0x21,0x28,0xb0,0x00,0x00,0x01,0x70,0x34,0x00,0x00,0x02,0xae,0x21,0x38,0x20,0x02, -0x08,0x00,0x04,0x24,0x24,0x10,0x06,0x3c,0x44,0x65,0xa2,0xae,0x10,0x01,0x00,0x0c, -0x10,0x00,0xa0,0xaf,0x48,0x65,0xa3,0x8e,0x08,0x00,0x04,0x24,0x4d,0x01,0x00,0x0c, -0x44,0x65,0xa3,0xae,0x44,0x65,0xa2,0x8e,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0xae, -0x46,0x09,0x00,0x08,0x02,0x80,0x02,0x3c,0x23,0x10,0x67,0x00,0xff,0xff,0x52,0x30, -0xa1,0x4e,0x00,0x0c,0x21,0x20,0x40,0x02,0x56,0x00,0x40,0x10,0x21,0xf0,0x40,0x00, -0x08,0x00,0x42,0x8c,0x44,0x65,0xa6,0x8e,0x08,0x00,0x04,0x24,0x21,0x18,0x52,0x00, -0x21,0x28,0x40,0x00,0x21,0x38,0x40,0x02,0x14,0x65,0xa3,0xae,0x18,0x65,0xa2,0xae, -0x10,0x01,0x00,0x0c,0x10,0x00,0xa0,0xaf,0x48,0x65,0xa3,0x8e,0x08,0x00,0x04,0x24, -0x4d,0x01,0x00,0x0c,0x44,0x65,0xa3,0xae,0x44,0x65,0xa3,0x8e,0x25,0xb0,0x04,0x3c, -0x00,0x01,0x82,0x34,0x00,0x00,0x43,0xac,0x46,0x09,0x00,0x08,0x02,0x80,0x02,0x3c, -0x04,0x00,0x03,0x8e,0x00,0x00,0x00,0x00,0x02,0x14,0x03,0x00,0x0f,0x00,0x42,0x30, -0x08,0x00,0x42,0x28,0x93,0xff,0x40,0x10,0x02,0x17,0x03,0x00,0x03,0x00,0x42,0x30, -0x90,0xff,0x40,0x14,0x80,0x10,0x11,0x00,0x21,0x28,0x53,0x00,0xec,0xff,0xa3,0x8c, -0x25,0xb0,0x02,0x3c,0xd4,0x02,0x42,0x34,0x21,0x20,0x00,0x02,0x00,0x00,0x43,0xac, -0xdc,0x08,0x00,0x0c,0x00,0x00,0x00,0x00,0x21,0x20,0x40,0x00,0x8b,0x08,0x00,0x0c, -0x21,0x28,0x00,0x00,0xca,0x09,0x00,0x08,0x25,0xb0,0x03,0x3c,0x04,0x00,0x03,0x8e, -0x00,0x00,0x00,0x00,0x02,0x14,0x03,0x00,0x0f,0x00,0x42,0x30,0x08,0x00,0x42,0x28, -0x06,0x00,0x40,0x10,0x00,0xc0,0x02,0x3c,0x02,0x17,0x03,0x00,0x03,0x00,0x42,0x30, -0x0c,0x00,0x40,0x10,0x80,0x10,0x11,0x00,0x00,0xc0,0x02,0x3c,0x24,0x10,0x62,0x00, -0x6f,0xff,0x40,0x14,0x02,0x80,0x04,0x3c,0x02,0x17,0x03,0x00,0x03,0x00,0x42,0x30, -0x03,0x00,0x03,0x24,0x6b,0xff,0x43,0x10,0x68,0x15,0x84,0x24,0x67,0xff,0x40,0x10, -0x80,0x10,0x11,0x00,0x21,0x28,0x53,0x00,0xec,0xff,0xa3,0x8c,0x25,0xb0,0x02,0x3c, -0xd4,0x02,0x42,0x34,0x21,0x20,0x00,0x02,0x00,0x00,0x43,0xac,0xdc,0x08,0x00,0x0c, -0x00,0x00,0x00,0x00,0x21,0x20,0x40,0x00,0x8b,0x08,0x00,0x0c,0x21,0x28,0x00,0x00, -0xc4,0x09,0x00,0x08,0x02,0x80,0x04,0x3c,0x25,0xb0,0x04,0x3c,0x44,0x44,0x02,0x3c, -0xbc,0x02,0x83,0x34,0x44,0x44,0x42,0x34,0x00,0x00,0x62,0xac,0x67,0x09,0x00,0x08, -0x02,0x80,0x02,0x3c,0x48,0x65,0xa5,0x8e,0x25,0xb0,0x04,0x3c,0x66,0x66,0x02,0x3c, -0x00,0x01,0x83,0x34,0x66,0x66,0x42,0x34,0xbc,0x02,0x84,0x34,0x00,0x00,0x65,0xac, -0x00,0x00,0x82,0xac,0x66,0x09,0x00,0x08,0x44,0x65,0xa5,0xae,0x00,0x60,0x02,0x40, -0x01,0x00,0x41,0x34,0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40,0x02,0x80,0x03,0x3c, -0xd8,0x8c,0x64,0xac,0x00,0x60,0x82,0x40,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0x02,0x80,0x02,0x3c,0xd8,0x8c,0x45,0x8c,0x00,0x80,0x03,0x3c,0x25,0xb0,0x02,0x3c, -0x18,0x03,0x42,0x34,0x10,0x2a,0x63,0x24,0x00,0x00,0x43,0xac,0x04,0x00,0x02,0x24, -0x1e,0x00,0xa2,0x10,0x05,0x00,0xa2,0x2c,0x10,0x00,0x40,0x10,0x05,0x00,0x02,0x24, -0x03,0x00,0x02,0x24,0x08,0x00,0xa2,0x10,0x00,0x19,0x04,0x00,0x80,0x10,0x04,0x00, -0x21,0x10,0x44,0x00,0xc0,0x10,0x02,0x00,0x23,0x10,0x44,0x00,0x00,0x11,0x02,0x00, -0x21,0x10,0x44,0x00,0x40,0x19,0x02,0x00,0xff,0xff,0x63,0x24,0xfe,0xff,0x60,0x14, -0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0xf3,0xff,0xa2,0x10, -0x06,0x00,0x02,0x24,0xf2,0xff,0xa2,0x14,0x80,0x10,0x04,0x00,0x40,0x11,0x04,0x00, -0x23,0x10,0x44,0x00,0x80,0x10,0x02,0x00,0x21,0x10,0x44,0x00,0x00,0x19,0x02,0x00, -0x23,0x18,0x62,0x00,0x9a,0x0a,0x00,0x08,0x00,0x19,0x03,0x00,0x80,0x10,0x04,0x00, -0x21,0x10,0x44,0x00,0xc0,0x10,0x02,0x00,0x23,0x10,0x44,0x00,0x00,0x11,0x02,0x00, -0x21,0x10,0x44,0x00,0x9a,0x0a,0x00,0x08,0x00,0x19,0x02,0x00,0x02,0x80,0x02,0x3c, -0xd8,0x8c,0x45,0x8c,0x00,0x80,0x03,0x3c,0x25,0xb0,0x02,0x3c,0x18,0x03,0x42,0x34, -0xcc,0x2a,0x63,0x24,0x00,0x00,0x43,0xac,0x05,0x00,0x02,0x24,0x10,0x00,0xa2,0x10, -0x06,0x00,0xa2,0x2c,0x09,0x00,0x40,0x14,0x04,0x00,0x02,0x24,0x06,0x00,0x02,0x24, -0x0f,0x00,0xa2,0x10,0x00,0x11,0x04,0x00,0xff,0xff,0x84,0x24,0xfe,0xff,0x80,0x14, -0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0xfa,0xff,0xa2,0x14, -0x80,0x10,0x04,0x00,0x21,0x10,0x44,0x00,0xc2,0x0a,0x00,0x08,0x40,0x20,0x02,0x00, -0x80,0x10,0x04,0x00,0x21,0x10,0x44,0x00,0xc2,0x0a,0x00,0x08,0x80,0x20,0x02,0x00, -0x23,0x10,0x44,0x00,0xc2,0x0a,0x00,0x08,0x40,0x20,0x02,0x00,0xff,0xff,0x85,0x30, -0x21,0x30,0x00,0x00,0x25,0xb0,0x03,0x3c,0x2a,0xb0,0x04,0x3c,0xb4,0x00,0x63,0x34, -0x01,0x00,0xa2,0x24,0x31,0x00,0x84,0x34,0x00,0x00,0x65,0xa0,0x00,0x00,0x85,0xa0, -0xff,0xff,0x45,0x30,0x12,0x00,0xa0,0x10,0x01,0x00,0x03,0x24,0x28,0xb0,0x07,0x3c, -0xe8,0x0a,0x00,0x08,0xff,0xff,0x08,0x24,0x00,0x00,0x83,0xa0,0x01,0x00,0x63,0x24, -0xff,0xff,0x63,0x30,0x2b,0x10,0xa3,0x00,0x09,0x00,0x40,0x14,0x08,0x00,0xc6,0x24, -0xf9,0xff,0x65,0x14,0x21,0x20,0xc7,0x00,0x01,0x00,0x63,0x24,0xff,0xff,0x63,0x30, -0x2b,0x10,0xa3,0x00,0x00,0x00,0x88,0xa0,0xf9,0xff,0x40,0x10,0x08,0x00,0xc6,0x24, -0x00,0x01,0xa2,0x2c,0x13,0x00,0x40,0x10,0x21,0x18,0xa0,0x00,0xff,0x00,0x08,0x24, -0x28,0xb0,0x07,0x3c,0xfc,0x0a,0x00,0x08,0xff,0xff,0x09,0x24,0xff,0xff,0x43,0x30, -0x00,0x00,0xa2,0xa0,0x00,0x01,0x62,0x2c,0x0a,0x00,0x40,0x10,0x08,0x00,0xc6,0x24, -0x01,0x00,0x62,0x24,0xf9,0xff,0x68,0x14,0x21,0x28,0xc7,0x00,0x00,0x01,0x02,0x24, -0xff,0xff,0x43,0x30,0x00,0x01,0x62,0x2c,0x00,0x00,0xa9,0xa0,0xf8,0xff,0x40,0x14, -0x08,0x00,0xc6,0x24,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0xd8,0xff,0xbd,0x27, -0x24,0x00,0xbf,0xaf,0x20,0x00,0xb4,0xaf,0x1c,0x00,0xb3,0xaf,0x18,0x00,0xb2,0xaf, -0x14,0x00,0xb1,0xaf,0x10,0x00,0xb0,0xaf,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34, -0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40,0x25,0xb0,0x10,0x3c,0x42,0x00,0x14,0x36, -0xff,0xff,0x02,0x24,0x00,0x00,0x82,0xa2,0xd8,0x00,0x05,0x36,0x40,0x00,0x11,0x36, -0xa8,0x00,0x13,0x36,0xa0,0x00,0x12,0x36,0x00,0x10,0x03,0x24,0xa4,0x00,0x10,0x36, -0x00,0x80,0x02,0x3c,0x00,0x00,0x23,0xa6,0x00,0x00,0xa0,0xa0,0x00,0x00,0x40,0xae, -0x00,0x00,0x00,0xae,0x00,0x00,0x62,0xae,0x00,0x00,0xa3,0x90,0x80,0xff,0x02,0x24, -0xfd,0x00,0x04,0x24,0x25,0x18,0x62,0x00,0xfc,0x17,0x02,0x24,0x00,0x00,0xa3,0xa0, -0x00,0x00,0x22,0xa6,0xd3,0x0a,0x00,0x0c,0x00,0x00,0x00,0x00,0x02,0x80,0x02,0x3c, -0x68,0x15,0x42,0x24,0x68,0x4b,0x45,0x8c,0x60,0x4b,0x43,0x8c,0x64,0x4b,0x44,0x8c, -0xfc,0x37,0x02,0x24,0x00,0x00,0x43,0xae,0x00,0x00,0x04,0xae,0x00,0x00,0x65,0xae, -0x00,0x00,0x22,0xa6,0x00,0x00,0x80,0xa2,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34, -0x00,0x60,0x81,0x40,0x24,0x00,0xbf,0x8f,0x20,0x00,0xb4,0x8f,0x1c,0x00,0xb3,0x8f, -0x18,0x00,0xb2,0x8f,0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03, -0x28,0x00,0xbd,0x27,0xd0,0xff,0xbd,0x27,0x2c,0x00,0xbf,0xaf,0x28,0x00,0xb6,0xaf, -0x24,0x00,0xb5,0xaf,0x20,0x00,0xb4,0xaf,0x1c,0x00,0xb3,0xaf,0x18,0x00,0xb2,0xaf, -0x14,0x00,0xb1,0xaf,0x10,0x00,0xb0,0xaf,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34, -0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40,0x25,0xb0,0x10,0x3c,0x40,0x00,0x05,0x36, -0x00,0x00,0xa2,0x94,0x24,0xfa,0x03,0x24,0xa8,0x00,0x13,0x36,0x24,0x10,0x43,0x00, -0x00,0x00,0xa2,0xa4,0xa0,0x00,0x12,0x36,0xa4,0x00,0x10,0x36,0x00,0x00,0x55,0x8e, -0x00,0x00,0x16,0x8e,0x00,0x00,0x71,0x8e,0x00,0x80,0x14,0x3c,0xfc,0x37,0x02,0x24, -0x00,0x00,0x40,0xae,0xfd,0x00,0x04,0x24,0x00,0x00,0x00,0xae,0x21,0x88,0x34,0x02, -0x00,0x00,0x74,0xae,0x00,0x00,0xa2,0xa4,0xd3,0x0a,0x00,0x0c,0x00,0x00,0x00,0x00, -0x00,0x00,0x55,0xae,0x00,0x00,0x16,0xae,0x00,0x00,0x71,0xae,0x00,0x60,0x01,0x40, -0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40,0x2c,0x00,0xbf,0x8f,0x28,0x00,0xb6,0x8f, -0x24,0x00,0xb5,0x8f,0x20,0x00,0xb4,0x8f,0x1c,0x00,0xb3,0x8f,0x18,0x00,0xb2,0x8f, -0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03,0x30,0x00,0xbd,0x27, -0xd0,0xff,0xbd,0x27,0x2c,0x00,0xbf,0xaf,0x28,0x00,0xb6,0xaf,0x24,0x00,0xb5,0xaf, -0x20,0x00,0xb4,0xaf,0x1c,0x00,0xb3,0xaf,0x18,0x00,0xb2,0xaf,0x14,0x00,0xb1,0xaf, -0x10,0x00,0xb0,0xaf,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x01,0x00,0x21,0x38, -0x00,0x60,0x81,0x40,0x25,0xb0,0x10,0x3c,0x40,0x00,0x05,0x36,0x00,0x00,0xa2,0x94, -0xaf,0xff,0x03,0x24,0xa8,0x00,0x13,0x36,0x24,0x10,0x43,0x00,0x00,0x00,0xa2,0xa4, -0xa0,0x00,0x12,0x36,0xa4,0x00,0x10,0x36,0x00,0x00,0x55,0x8e,0x00,0x00,0x16,0x8e, -0x00,0x00,0x71,0x8e,0x00,0x80,0x14,0x3c,0xfc,0x37,0x02,0x24,0x00,0x00,0x40,0xae, -0xfd,0x00,0x04,0x24,0x00,0x00,0x00,0xae,0x21,0x88,0x34,0x02,0x00,0x00,0x74,0xae, -0x00,0x00,0xa2,0xa4,0xd3,0x0a,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x55,0xae, -0x00,0x00,0x16,0xae,0x00,0x00,0x71,0xae,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34, -0x00,0x60,0x81,0x40,0x2c,0x00,0xbf,0x8f,0x28,0x00,0xb6,0x8f,0x24,0x00,0xb5,0x8f, -0x20,0x00,0xb4,0x8f,0x1c,0x00,0xb3,0x8f,0x18,0x00,0xb2,0x8f,0x14,0x00,0xb1,0x8f, -0x10,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03,0x30,0x00,0xbd,0x27,0x00,0x60,0x01,0x40, -0x01,0x00,0x21,0x34,0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40,0x25,0xb0,0x04,0x3c, -0x40,0x00,0x84,0x34,0x00,0x00,0x82,0x94,0xd8,0xfd,0x03,0x24,0x24,0x10,0x43,0x00, -0xfc,0x37,0x03,0x24,0x00,0x00,0x82,0xa4,0x00,0x00,0x83,0xa4,0x00,0x60,0x01,0x40, -0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0x00,0x00,0x82,0x8c,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x30, -0x10,0x00,0x02,0x24,0x0c,0x00,0xc2,0x10,0x11,0x00,0xc3,0x28,0x06,0x00,0x60,0x10, -0x20,0x00,0x02,0x24,0x08,0x00,0x02,0x24,0x0d,0x00,0xc2,0x10,0x00,0x00,0x00,0x00, -0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x06,0x00,0xc2,0x10,0x00,0x00,0x00,0x00, -0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x85,0xa4,0x08,0x00,0xe0,0x03, -0x00,0x00,0x00,0x00,0x00,0x00,0x85,0xac,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0x00,0x00,0x85,0xa0,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03, -0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0x25,0xb0,0x02,0x3c, -0x0a,0x00,0x42,0x34,0x00,0x00,0x43,0x90,0xff,0xff,0xa5,0x24,0x00,0x2c,0x05,0x00, -0xfd,0x00,0x63,0x30,0x03,0x2c,0x05,0x00,0xff,0xff,0x87,0x30,0x00,0x00,0x43,0xa0, -0x1a,0x00,0xa0,0x04,0x00,0x00,0x00,0x00,0x21,0x30,0x40,0x00,0x07,0x10,0xa7,0x00, -0x01,0x00,0x42,0x30,0xfd,0x00,0x64,0x30,0x00,0x00,0x42,0x38,0x02,0x00,0x63,0x34, -0x0a,0x18,0x82,0x00,0x00,0x00,0xc3,0xa0,0x04,0x00,0x63,0x34,0x00,0x00,0xc3,0xa0, -0x09,0x00,0x02,0x24,0xff,0xff,0x42,0x24,0xff,0xff,0x41,0x04,0xff,0xff,0x42,0x24, -0xfb,0x00,0x63,0x30,0x00,0x00,0xc3,0xa0,0x04,0x00,0x02,0x24,0xff,0xff,0x42,0x24, -0xff,0xff,0x41,0x04,0xff,0xff,0x42,0x24,0xff,0xff,0xa2,0x24,0x00,0x2c,0x02,0x00, -0x03,0x2c,0x05,0x00,0xea,0xff,0xa1,0x04,0x07,0x10,0xa7,0x00,0x08,0x00,0xe0,0x03, -0x00,0x00,0x00,0x00,0x25,0xb0,0x02,0x3c,0x0a,0x00,0x42,0x34,0x00,0x00,0x43,0x90, -0xff,0xff,0x84,0x24,0x00,0x24,0x04,0x00,0x03,0x24,0x04,0x00,0xff,0x00,0x65,0x30, -0x1d,0x00,0x80,0x04,0x21,0x38,0x00,0x00,0x21,0x30,0x40,0x00,0x01,0x00,0x08,0x24, -0x04,0x00,0xa5,0x34,0x00,0x00,0xc5,0xa0,0x00,0x00,0xc2,0x90,0x00,0x00,0x00,0x00, -0xff,0x00,0x45,0x30,0x01,0x00,0xa3,0x30,0x05,0x00,0x60,0x10,0x04,0x00,0x02,0x24, -0x04,0x10,0x88,0x00,0x25,0x10,0x47,0x00,0xff,0xff,0x47,0x30,0x04,0x00,0x02,0x24, -0xff,0xff,0x42,0x24,0xff,0xff,0x41,0x04,0xff,0xff,0x42,0x24,0xfb,0x00,0xa5,0x30, -0x00,0x00,0xc5,0xa0,0x09,0x00,0x02,0x24,0xff,0xff,0x42,0x24,0xff,0xff,0x41,0x04, -0xff,0xff,0x42,0x24,0xff,0xff,0x82,0x24,0x00,0x24,0x02,0x00,0x03,0x24,0x04,0x00, -0xe7,0xff,0x81,0x04,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x21,0x10,0xe0,0x00, -0xe0,0xff,0xbd,0x27,0x10,0x00,0xb0,0xaf,0x25,0xb0,0x10,0x3c,0x0a,0x00,0x10,0x36, -0x18,0x00,0xbf,0xaf,0x14,0x00,0xb1,0xaf,0x00,0x00,0x02,0x92,0xff,0xff,0x91,0x30, -0x03,0x00,0x05,0x24,0xc0,0x00,0x42,0x30,0x80,0x00,0x43,0x34,0x00,0x00,0x03,0xa2, -0x04,0x00,0x63,0x34,0x00,0x00,0x03,0xa2,0xfb,0x00,0x63,0x30,0x00,0x00,0x03,0xa2, -0x08,0x00,0x63,0x34,0x00,0x00,0x03,0xa2,0x04,0x00,0x63,0x34,0x00,0x00,0x03,0xa2, -0xfb,0x00,0x63,0x30,0x00,0x00,0x03,0xa2,0xd7,0x0b,0x00,0x0c,0x06,0x00,0x04,0x24, -0x42,0x20,0x11,0x00,0xd7,0x0b,0x00,0x0c,0x06,0x00,0x05,0x24,0xfd,0x0b,0x00,0x0c, -0x10,0x00,0x04,0x24,0x00,0x00,0x03,0x92,0x18,0x00,0xbf,0x8f,0x14,0x00,0xb1,0x8f, -0xc0,0x00,0x63,0x30,0x00,0x00,0x03,0xa2,0x10,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03, -0x20,0x00,0xbd,0x27,0xe0,0xff,0xbd,0x27,0x14,0x00,0xb1,0xaf,0xff,0xff,0xb1,0x30, -0x18,0x00,0xb2,0xaf,0x10,0x00,0xb0,0xaf,0x1c,0x00,0xbf,0xaf,0x21,0x90,0xc0,0x00, -0x0a,0x00,0x20,0x12,0xff,0xff,0x90,0x30,0x24,0x0c,0x00,0x0c,0x21,0x20,0x00,0x02, -0xfe,0xff,0x23,0x26,0x02,0x00,0x04,0x26,0x00,0x00,0x42,0xa6,0xff,0xff,0x71,0x30, -0xff,0xff,0x90,0x30,0xf8,0xff,0x20,0x16,0x02,0x00,0x52,0x26,0x1c,0x00,0xbf,0x8f, -0x18,0x00,0xb2,0x8f,0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03, -0x20,0x00,0xbd,0x27,0x25,0xb0,0x03,0x3c,0x0a,0x00,0x68,0x34,0x00,0x00,0x02,0x91, -0xff,0xff,0xa5,0x30,0xff,0x00,0x84,0x30,0x1f,0x00,0xa0,0x10,0xff,0x00,0x47,0x30, -0x21,0x48,0x00,0x01,0x0c,0x00,0x6c,0x34,0x0b,0x00,0x6b,0x34,0xc0,0xff,0x0a,0x24, -0x21,0x68,0x00,0x01,0x25,0x10,0xea,0x00,0xff,0x00,0x47,0x30,0x00,0x00,0x64,0xa1, -0x00,0x00,0x27,0xa1,0x00,0x00,0x22,0x91,0x00,0x00,0x00,0x00,0xff,0x00,0x47,0x30, -0xc0,0x00,0xe3,0x30,0x08,0x00,0x60,0x10,0x00,0x00,0x00,0x00,0x21,0x40,0xa0,0x01, -0x00,0x00,0x02,0x91,0x00,0x00,0x00,0x00,0xff,0x00,0x47,0x30,0xc0,0x00,0xe3,0x30, -0xfb,0xff,0x60,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x8d,0xfc,0xff,0xa3,0x24, -0x04,0x00,0x84,0x24,0xff,0xff,0x65,0x30,0x00,0x00,0xc2,0xac,0xff,0x00,0x84,0x30, -0xe8,0xff,0xa0,0x14,0x04,0x00,0xc6,0x24,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0xff,0x00,0x84,0x30,0x21,0x68,0xe0,0x00,0xff,0xff,0xa5,0x30,0xc0,0x50,0x04,0x00, -0x00,0x60,0x0c,0x40,0x01,0x00,0x81,0x35,0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40, -0x00,0x00,0xc2,0x90,0x01,0x00,0xc3,0x90,0x25,0xb0,0x07,0x3c,0x00,0x14,0x02,0x00, -0x25,0x28,0xa2,0x00,0x00,0x1e,0x03,0x00,0x01,0x80,0x08,0x3c,0x25,0x20,0xa3,0x00, -0x40,0x02,0xe9,0x34,0x25,0x18,0x48,0x01,0x44,0x02,0xe7,0x34,0x00,0x00,0xe4,0xac, -0x00,0x00,0x23,0xad,0x03,0x00,0xc2,0x90,0x02,0x00,0xc4,0x90,0x04,0x00,0xc3,0x90, -0x05,0x00,0xc5,0x90,0x00,0x12,0x02,0x00,0x25,0x20,0x82,0x00,0x00,0x1c,0x03,0x00, -0x01,0x00,0x4a,0x25,0x25,0x20,0x83,0x00,0x00,0x2e,0x05,0x00,0x25,0x40,0x48,0x01, -0x25,0x20,0x85,0x00,0x00,0x00,0xe4,0xac,0x01,0x00,0x4a,0x25,0x00,0x00,0x28,0xad, -0x01,0x80,0x0b,0x3c,0x21,0x40,0x00,0x00,0x21,0x10,0xa8,0x01,0x01,0x00,0x43,0x90, -0x00,0x00,0x45,0x90,0x02,0x00,0x44,0x90,0x03,0x00,0x46,0x90,0x00,0x1a,0x03,0x00, -0x25,0x28,0xa3,0x00,0x00,0x24,0x04,0x00,0x25,0x28,0xa4,0x00,0x00,0x36,0x06,0x00, -0x04,0x00,0x08,0x25,0x25,0x10,0x4b,0x01,0x25,0x20,0xa6,0x00,0x10,0x00,0x03,0x2d, -0x00,0x00,0xe4,0xac,0x01,0x00,0x4a,0x25,0x00,0x00,0x22,0xad,0xee,0xff,0x60,0x14, -0x00,0x00,0x00,0x00,0x00,0x60,0x8c,0x40,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0xff,0xff,0x84,0x30,0x42,0xb0,0x08,0x3c,0x80,0x10,0x04,0x00,0x21,0x10,0x48,0x00, -0x04,0x00,0x46,0xac,0x00,0x00,0x07,0x91,0x40,0x18,0x04,0x00,0x03,0x00,0x06,0x24, -0xff,0x00,0xe7,0x30,0x04,0x30,0x66,0x00,0x01,0x00,0x02,0x24,0x04,0x10,0x62,0x00, -0x25,0x30,0xc7,0x00,0xff,0xff,0xa5,0x30,0x25,0x10,0x47,0x00,0x02,0x00,0xa0,0x14, -0xff,0x00,0xc7,0x30,0xff,0x00,0x47,0x30,0x42,0xb0,0x02,0x3c,0x00,0x00,0x47,0xa0, -0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x42,0xb0,0x02,0x3c,0x03,0x00,0x47,0x34, -0x00,0x00,0xe3,0x90,0xff,0x00,0x84,0x30,0x04,0x00,0x84,0x24,0xff,0x00,0x65,0x30, -0x01,0x00,0x02,0x24,0x04,0x30,0x82,0x00,0x07,0x18,0x85,0x00,0x25,0xb0,0x02,0x3c, -0xe8,0x03,0x42,0x34,0x01,0x00,0x63,0x30,0x21,0x20,0xc0,0x00,0x00,0x00,0x45,0xa0, -0x02,0x00,0x60,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0xe6,0xa0,0x08,0x00,0xe0,0x03, -0x24,0x10,0x85,0x00,0x00,0x60,0x03,0x40,0x01,0x00,0x61,0x34,0x01,0x00,0x21,0x38, -0x00,0x60,0x81,0x40,0x02,0x80,0x02,0x3c,0xdc,0x8c,0x42,0x24,0x04,0x00,0x45,0x8c, -0x00,0x00,0x82,0xac,0x04,0x00,0x44,0xac,0x00,0x00,0xa4,0xac,0x04,0x00,0x85,0xac, -0x00,0x60,0x83,0x40,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x14,0x00,0x83,0x90, -0x01,0x00,0x02,0x24,0x08,0x00,0x86,0xac,0x18,0x00,0x85,0xac,0x00,0x00,0x84,0xac, -0x03,0x00,0x62,0x10,0x04,0x00,0x84,0xac,0xed,0x0c,0x00,0x08,0x0c,0x00,0x80,0xac, -0x0c,0x00,0x82,0x8c,0xed,0x0c,0x00,0x08,0x10,0x00,0x82,0xac,0x00,0x60,0x03,0x40, -0x01,0x00,0x61,0x34,0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40,0x04,0x00,0x85,0x8c, -0x00,0x00,0x82,0x8c,0x00,0x00,0x00,0x00,0x00,0x00,0xa2,0xac,0x04,0x00,0x45,0xac, -0x00,0x00,0x84,0xac,0x04,0x00,0x84,0xac,0x00,0x60,0x83,0x40,0x08,0x00,0xe0,0x03, -0x00,0x00,0x00,0x00,0xd0,0xff,0xbd,0x27,0x28,0x00,0xb6,0xaf,0x24,0x00,0xb5,0xaf, -0x20,0x00,0xb4,0xaf,0x14,0x00,0xb1,0xaf,0x2c,0x00,0xbf,0xaf,0x1c,0x00,0xb3,0xaf, -0x18,0x00,0xb2,0xaf,0x10,0x00,0xb0,0xaf,0x00,0x80,0x16,0x3c,0x02,0x80,0x14,0x3c, -0x02,0x80,0x11,0x3c,0x02,0x80,0x15,0x3c,0xc4,0x7d,0x24,0x8e,0x25,0xb0,0x02,0x3c, -0x54,0x34,0xc3,0x26,0x18,0x03,0x42,0x34,0x00,0x00,0x43,0xac,0xdc,0x8c,0x90,0x8e, -0x18,0x00,0x80,0x10,0xdc,0x8c,0x82,0x26,0x15,0x00,0x02,0x12,0x00,0x00,0x00,0x00, -0x21,0x98,0x40,0x00,0x01,0x00,0x12,0x24,0x14,0x00,0x02,0x92,0x00,0x00,0x00,0x00, -0x1d,0x00,0x52,0x10,0x00,0x00,0x00,0x00,0x09,0x00,0x40,0x14,0x00,0x00,0x00,0x00, -0x0c,0x00,0x03,0x8e,0xc4,0x7d,0x22,0x8e,0x00,0x00,0x00,0x00,0x23,0x20,0x62,0x00, -0x2b,0x10,0x43,0x00,0x0e,0x00,0x40,0x10,0x00,0x00,0x00,0x00,0x0c,0x00,0x04,0xae, -0x00,0x00,0x10,0x8e,0x00,0x00,0x00,0x00,0xef,0xff,0x13,0x16,0x00,0x00,0x00,0x00, -0xc4,0x7d,0x20,0xae,0x08,0x0c,0xa4,0x26,0x21,0x28,0x00,0x00,0x21,0x30,0x00,0x00, -0x31,0x1c,0x00,0x0c,0x21,0x38,0x00,0x00,0x22,0x0d,0x00,0x08,0x00,0x00,0x00,0x00, -0x08,0x00,0x02,0x8e,0x18,0x00,0x04,0x8e,0x09,0xf8,0x40,0x00,0x00,0x00,0x00,0x00, -0x3c,0x0d,0x00,0x08,0x0c,0x00,0x02,0xae,0x0c,0x00,0x03,0x8e,0xc4,0x7d,0x22,0x8e, -0x00,0x00,0x00,0x00,0x23,0x20,0x62,0x00,0x2b,0x10,0x43,0x00,0xe7,0xff,0x40,0x14, -0x00,0x00,0x00,0x00,0x08,0x00,0x02,0x8e,0x18,0x00,0x04,0x8e,0x09,0xf8,0x40,0x00, -0x00,0x00,0x00,0x00,0x10,0x00,0x03,0x8e,0x3c,0x0d,0x00,0x08,0x0c,0x00,0x03,0xae, -0xff,0x00,0xa5,0x30,0x25,0xb0,0x02,0x3c,0x21,0x28,0xa2,0x00,0xff,0x00,0x84,0x30, -0x60,0x01,0xa4,0xa0,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0xff,0x00,0x84,0x30, -0x01,0x00,0x03,0x24,0x10,0x00,0x02,0x3c,0x04,0x18,0x83,0x00,0xf0,0x70,0x42,0x34, -0x15,0x00,0x84,0x2c,0x06,0x00,0x80,0x10,0x24,0x28,0x62,0x00,0x0f,0x00,0x63,0x30, -0x04,0x00,0xa0,0x14,0x01,0x00,0x02,0x24,0x02,0x00,0x60,0x14,0x02,0x00,0x02,0x24, -0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0xff,0x00,0xa5,0x30, -0x04,0x00,0xa2,0x2c,0x14,0x00,0x40,0x10,0xff,0x00,0x84,0x30,0x02,0x80,0x03,0x3c, -0x8e,0x7d,0x62,0x90,0x00,0x00,0x00,0x00,0xef,0xff,0x42,0x24,0xff,0x00,0x42,0x30, -0x02,0x00,0x42,0x2c,0x0e,0x00,0x40,0x10,0x02,0x00,0x03,0x24,0x24,0x00,0x83,0x10, -0x0f,0x10,0x02,0x3c,0x03,0x00,0x82,0x28,0x14,0x00,0x40,0x10,0x03,0x00,0x02,0x24, -0x01,0x00,0x02,0x24,0x2f,0x00,0x82,0x10,0x00,0x00,0x00,0x00,0xff,0x1f,0x02,0x3c, -0x08,0x00,0xe0,0x03,0xff,0xff,0x42,0x34,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0x35,0x00,0x83,0x10,0x0f,0x1f,0x02,0x3c,0x03,0x00,0x82,0x28,0x16,0x00,0x40,0x10, -0x03,0x00,0x02,0x24,0x01,0x00,0x02,0x24,0xf4,0xff,0x82,0x14,0x00,0x00,0x00,0x00, -0x0f,0x1f,0x02,0x3c,0x08,0x00,0xe0,0x03,0x00,0x80,0x42,0x34,0xf0,0xff,0x82,0x14, -0xff,0x1f,0x02,0x3c,0x01,0x00,0x02,0x24,0x29,0x00,0xa2,0x10,0x0f,0x10,0x02,0x3c, -0x02,0x00,0xa2,0x28,0x1f,0x00,0x40,0x14,0x00,0x00,0x00,0x00,0x28,0x00,0xa3,0x10, -0x00,0x00,0x00,0x00,0xe5,0xff,0xa4,0x14,0x00,0x00,0x00,0x00,0x0f,0x10,0x02,0x3c, -0x08,0x00,0xe0,0x03,0x00,0xf0,0x42,0x34,0xe1,0xff,0x82,0x14,0xff,0x1f,0x02,0x3c, -0x01,0x00,0x02,0x24,0x1c,0x00,0xa2,0x10,0x0f,0x00,0x02,0x3c,0x02,0x00,0xa2,0x28, -0x0b,0x00,0x40,0x14,0x00,0x00,0x00,0x00,0x1c,0x00,0xa3,0x10,0x00,0x00,0x00,0x00, -0xd6,0xff,0xa4,0x14,0x00,0x00,0x00,0x00,0x0f,0x00,0x02,0x3c,0x08,0x00,0xe0,0x03, -0x00,0xf0,0x42,0x34,0x0f,0x10,0x02,0x3c,0x08,0x00,0xe0,0x03,0x00,0x80,0x42,0x34, -0xce,0xff,0xa0,0x14,0x00,0x00,0x00,0x00,0x0f,0x00,0x02,0x3c,0x08,0x00,0xe0,0x03, -0x15,0xf0,0x42,0x34,0xc9,0xff,0xa0,0x14,0x00,0x00,0x00,0x00,0x0f,0x10,0x02,0x3c, -0x08,0x00,0xe0,0x03,0x15,0xf0,0x42,0x34,0x08,0x00,0xe0,0x03,0x00,0xf0,0x42,0x34, -0x08,0x00,0xe0,0x03,0x10,0xf0,0x42,0x34,0x08,0x00,0xe0,0x03,0x10,0xf0,0x42,0x34, -0x0f,0x10,0x02,0x3c,0x08,0x00,0xe0,0x03,0x05,0xf0,0x42,0x34,0x0f,0x00,0x02,0x3c, -0x08,0x00,0xe0,0x03,0x05,0xf0,0x42,0x34,0xc0,0x40,0x04,0x00,0x21,0x18,0x04,0x01, -0x80,0x18,0x03,0x00,0x21,0x18,0x64,0x00,0x02,0x80,0x02,0x3c,0x80,0x18,0x03,0x00, -0x68,0x15,0x42,0x24,0x21,0x18,0x62,0x00,0x74,0x51,0x66,0x8c,0x21,0x38,0x60,0x00, -0x7a,0x51,0x60,0xa0,0x7b,0x51,0x60,0xa0,0x1c,0x00,0x05,0x24,0xdf,0x0d,0x00,0x08, -0x01,0x00,0x03,0x24,0x08,0x00,0xa0,0x04,0x21,0x10,0x04,0x01,0x04,0x10,0xa3,0x00, -0x24,0x10,0xc2,0x00,0xfb,0xff,0x40,0x10,0xff,0xff,0xa5,0x24,0x01,0x00,0xa5,0x24, -0x7a,0x51,0xe5,0xa0,0x21,0x10,0x04,0x01,0x80,0x10,0x02,0x00,0x21,0x10,0x44,0x00, -0x02,0x80,0x03,0x3c,0x80,0x10,0x02,0x00,0x68,0x15,0x63,0x24,0x21,0x18,0x43,0x00, -0x74,0x51,0x66,0x8c,0x21,0x28,0x00,0x00,0xf3,0x0d,0x00,0x08,0x01,0x00,0x07,0x24, -0x1d,0x00,0xa2,0x28,0x08,0x00,0x40,0x10,0x00,0x00,0x00,0x00,0x04,0x10,0xa7,0x00, -0x24,0x10,0xc2,0x00,0xfa,0xff,0x40,0x10,0x01,0x00,0xa5,0x24,0xff,0xff,0xa5,0x24, -0x08,0x00,0xe0,0x03,0x7b,0x51,0x65,0xa0,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0xc8,0xff,0xbd,0x27,0x28,0x00,0xb6,0xaf,0x02,0x80,0x16,0x3c,0x30,0x00,0xbe,0xaf, -0x2c,0x00,0xb7,0xaf,0x24,0x00,0xb5,0xaf,0x20,0x00,0xb4,0xaf,0x18,0x00,0xb2,0xaf, -0x14,0x00,0xb1,0xaf,0x01,0x00,0x15,0x24,0x21,0x88,0x00,0x00,0x68,0x15,0xde,0x26, -0x21,0xa0,0x00,0x00,0x21,0x90,0x00,0x00,0x25,0xb0,0x17,0x3c,0x34,0x00,0xbf,0xaf, -0x1c,0x00,0xb3,0xaf,0x14,0x0e,0x00,0x08,0x10,0x00,0xb0,0xaf,0x01,0x00,0x31,0x26, -0x20,0x00,0x22,0x2e,0x94,0x00,0x52,0x26,0x2e,0x00,0x40,0x10,0x94,0x00,0x94,0x26, -0x68,0x15,0xc2,0x26,0x21,0x30,0x42,0x02,0x78,0x51,0xc5,0x8c,0x00,0x00,0x00,0x00, -0x02,0x13,0x05,0x00,0x01,0x00,0x42,0x30,0xf4,0xff,0x55,0x14,0x42,0x1a,0x05,0x00, -0x68,0x51,0xc2,0x8c,0x07,0x00,0x64,0x30,0x02,0x11,0x02,0x00,0x7f,0x00,0x43,0x30, -0x2d,0x00,0x95,0x10,0x07,0x00,0xb3,0x30,0x02,0x00,0x82,0x28,0x3a,0x00,0x40,0x14, -0x02,0x00,0x02,0x24,0x30,0x00,0x82,0x10,0x03,0x00,0x02,0x24,0x3c,0x00,0x82,0x10, -0x1a,0x00,0x62,0x2c,0x21,0x80,0x9e,0x02,0x78,0x51,0x02,0x8e,0x04,0x00,0x63,0x2e, -0x42,0x12,0x02,0x00,0x0a,0x00,0x60,0x10,0x07,0x00,0x44,0x30,0x73,0x0d,0x00,0x0c, -0x21,0x28,0x60,0x02,0x80,0x20,0x13,0x00,0x70,0x51,0x02,0xae,0x21,0x20,0x97,0x00, -0x84,0x01,0x83,0x8c,0x00,0x00,0x00,0x00,0x24,0x18,0x62,0x00,0x74,0x51,0x03,0xae, -0xce,0x0d,0x00,0x0c,0x21,0x20,0x20,0x02,0x21,0x10,0x37,0x02,0x01,0x00,0x31,0x26, -0x60,0x01,0x43,0x90,0x20,0x00,0x22,0x2e,0x94,0x00,0x52,0x26,0xd4,0xff,0x40,0x14, -0x94,0x00,0x94,0x26,0x34,0x00,0xbf,0x8f,0x30,0x00,0xbe,0x8f,0x2c,0x00,0xb7,0x8f, -0x28,0x00,0xb6,0x8f,0x24,0x00,0xb5,0x8f,0x20,0x00,0xb4,0x8f,0x1c,0x00,0xb3,0x8f, -0x18,0x00,0xb2,0x8f,0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f,0x21,0x10,0x00,0x00, -0x08,0x00,0xe0,0x03,0x38,0x00,0xbd,0x27,0x32,0x00,0x62,0x2c,0xda,0xff,0x40,0x10, -0x21,0x80,0x9e,0x02,0xff,0xf1,0x03,0x24,0x24,0x10,0xa3,0x00,0x00,0x04,0x42,0x34, -0x29,0x0e,0x00,0x08,0x78,0x51,0xc2,0xac,0x38,0x00,0x62,0x2c,0x12,0x00,0x40,0x14, -0x14,0x00,0x62,0x2c,0xff,0xf1,0x03,0x24,0x24,0x10,0xa3,0x00,0x00,0x02,0x42,0x34, -0x29,0x0e,0x00,0x08,0x78,0x51,0xc2,0xac,0xcb,0xff,0x80,0x14,0x21,0x80,0x9e,0x02, -0xff,0xf1,0x03,0x24,0x24,0x10,0xa3,0x00,0x2a,0x0e,0x00,0x08,0x78,0x51,0xc2,0xac, -0xc5,0xff,0x40,0x14,0x21,0x80,0x9e,0x02,0xff,0xf1,0x03,0x24,0x24,0x10,0xa3,0x00, -0x54,0x0e,0x00,0x08,0x00,0x04,0x42,0x34,0xbf,0xff,0x40,0x10,0x21,0x80,0x9e,0x02, -0xff,0xf1,0x03,0x24,0x24,0x10,0xa3,0x00,0x00,0x06,0x42,0x34,0x2a,0x0e,0x00,0x08, -0x78,0x51,0xc2,0xac,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0xd8,0xff,0xbd,0x27, -0x10,0x00,0xb0,0xaf,0xc0,0x80,0x04,0x00,0x21,0x80,0x04,0x02,0x80,0x80,0x10,0x00, -0x21,0x80,0x04,0x02,0x02,0x80,0x02,0x3c,0x68,0x15,0x42,0x24,0x80,0x80,0x10,0x00, -0x20,0x00,0xbf,0xaf,0x1c,0x00,0xb3,0xaf,0x18,0x00,0xb2,0xaf,0x21,0x80,0x02,0x02, -0x14,0x00,0xb1,0xaf,0x78,0x51,0x03,0x8e,0x25,0xb0,0x02,0x3c,0x80,0x01,0x53,0x34, -0x07,0x00,0x63,0x30,0x80,0x18,0x03,0x00,0x21,0x18,0x62,0x00,0x00,0x00,0x71,0x92, -0x70,0x51,0x05,0x8e,0x84,0x01,0x62,0x8c,0x21,0x90,0x80,0x00,0xff,0x00,0x31,0x32, -0x24,0x10,0x45,0x00,0xce,0x0d,0x00,0x0c,0x74,0x51,0x02,0xae,0x7a,0x51,0x04,0x92, -0x5c,0x0d,0x00,0x0c,0xff,0x00,0x45,0x32,0x7a,0x51,0x04,0x92,0x63,0x0d,0x00,0x0c, -0x00,0x00,0x00,0x00,0x01,0x00,0x42,0x38,0x04,0x00,0x03,0x24,0x0a,0x88,0x62,0x00, -0x00,0x00,0x71,0xa2,0x20,0x00,0xbf,0x8f,0x1c,0x00,0xb3,0x8f,0x18,0x00,0xb2,0x8f, -0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03,0x28,0x00,0xbd,0x27, -0xff,0xff,0x84,0x30,0x00,0x02,0x82,0x30,0x07,0x00,0x03,0x24,0x0d,0x00,0x40,0x14, -0x0b,0x00,0x84,0x30,0x0c,0x00,0x82,0x2c,0x0a,0x00,0x40,0x10,0x00,0x00,0x00,0x00, -0x02,0x80,0x03,0x3c,0x80,0x10,0x04,0x00,0xf0,0x91,0x63,0x24,0x21,0x10,0x43,0x00, -0x00,0x00,0x44,0x8c,0x00,0x00,0x00,0x00,0x08,0x00,0x80,0x00,0x00,0x00,0x00,0x00, -0x07,0x00,0x03,0x24,0x08,0x00,0xe0,0x03,0x21,0x10,0x60,0x00,0x06,0x00,0x03,0x24, -0x08,0x00,0xe0,0x03,0x21,0x10,0x60,0x00,0x05,0x00,0x03,0x24,0x08,0x00,0xe0,0x03, -0x21,0x10,0x60,0x00,0x04,0x00,0x03,0x24,0x08,0x00,0xe0,0x03,0x21,0x10,0x60,0x00, -0x03,0x00,0x03,0x24,0x08,0x00,0xe0,0x03,0x21,0x10,0x60,0x00,0x02,0x00,0x03,0x24, -0x08,0x00,0xe0,0x03,0x21,0x10,0x60,0x00,0x01,0x00,0x03,0x24,0x08,0x00,0xe0,0x03, -0x21,0x10,0x60,0x00,0x21,0x18,0x00,0x00,0x08,0x00,0xe0,0x03,0x21,0x10,0x60,0x00, -0xa0,0xff,0xbd,0x27,0x02,0x80,0x02,0x3c,0x58,0x00,0xbe,0xaf,0x54,0x00,0xb7,0xaf, -0x50,0x00,0xb6,0xaf,0x4c,0x00,0xb5,0xaf,0x48,0x00,0xb4,0xaf,0x40,0x00,0xb2,0xaf, -0x3c,0x00,0xb1,0xaf,0x5c,0x00,0xbf,0xaf,0x44,0x00,0xb3,0xaf,0x38,0x00,0xb0,0xaf, -0x20,0x92,0x42,0x24,0x00,0x00,0x53,0x8c,0x08,0x00,0x03,0x24,0x02,0x80,0x0b,0x3c, -0x21,0x90,0x00,0x00,0x21,0xa0,0x00,0x00,0x21,0xb8,0x00,0x00,0x21,0xf0,0x00,0x00, -0x21,0xa8,0x00,0x00,0x21,0xb0,0x00,0x00,0x21,0x88,0x60,0x02,0x10,0x00,0xa3,0xaf, -0x14,0x00,0xa0,0xaf,0x18,0x00,0xa0,0xaf,0x1c,0x00,0xa0,0xaf,0x20,0x00,0xa0,0xaf, -0x24,0x00,0xa0,0xaf,0x28,0x00,0xa0,0xaf,0x7a,0x0f,0x00,0x08,0x2c,0x00,0xa0,0xaf, -0x44,0x51,0x22,0xae,0x60,0x51,0x24,0x8e,0x5c,0x51,0x27,0x8e,0x48,0x51,0x28,0x8e, -0x4c,0x51,0x25,0x8e,0x54,0x51,0x26,0x8e,0x58,0x51,0x23,0x8e,0x21,0x38,0xe4,0x00, -0x02,0x80,0x04,0x3c,0x68,0x15,0x84,0x24,0x21,0x10,0x04,0x02,0x21,0x40,0x05,0x01, -0x21,0x30,0xc3,0x00,0xca,0x44,0x42,0x90,0x44,0x51,0x2a,0x8e,0x0c,0x00,0xe0,0x10, -0x21,0x48,0x00,0x00,0x2b,0x48,0x47,0x00,0x0b,0x00,0x20,0x15,0x02,0x80,0x02,0x3c, -0x07,0x00,0x02,0x2e,0x59,0x01,0x40,0x14,0xc0,0x10,0x07,0x00,0x0c,0x00,0x02,0x24, -0x55,0x01,0x02,0x12,0x0d,0x00,0x02,0x24,0x54,0x01,0x02,0x12,0xc0,0x10,0x07,0x00, -0x92,0x00,0x20,0x11,0x02,0x80,0x02,0x3c,0x68,0x15,0x42,0x24,0x80,0x18,0x10,0x00, -0x21,0x18,0x62,0x00,0x21,0x20,0x30,0x02,0xb6,0x51,0x85,0x90,0xec,0x44,0x62,0x8c, -0x00,0x00,0x00,0x00,0x04,0x10,0xa2,0x00,0x2b,0x10,0x4a,0x00,0x87,0x00,0x40,0x10, -0x00,0x00,0x00,0x00,0xd4,0x51,0x22,0x8e,0x01,0x00,0x07,0x24,0x04,0x18,0x07,0x02, -0x24,0x10,0x43,0x00,0xf0,0x00,0x40,0x10,0x1c,0x00,0x02,0x2e,0x21,0x28,0x30,0x02, -0x7c,0x51,0xa6,0x90,0xb6,0x51,0xa2,0x90,0x0a,0x00,0x04,0x24,0xff,0x00,0xc3,0x30, -0x04,0x20,0x44,0x00,0x2a,0x18,0x64,0x00,0xe7,0x00,0x60,0x10,0x1c,0x00,0x02,0x2e, -0x01,0x00,0xc2,0x24,0xff,0x00,0x43,0x30,0x56,0x01,0x64,0x10,0x7c,0x51,0xa2,0xa0, -0x68,0x15,0x65,0x25,0x80,0x10,0x10,0x00,0x21,0x10,0x45,0x00,0x60,0x45,0x44,0x8c, -0xec,0x44,0x43,0x8c,0x21,0x30,0xc5,0x02,0x40,0x10,0x04,0x00,0x21,0x10,0x44,0x00, -0x21,0x18,0x62,0x00,0x82,0x50,0x03,0x00,0x44,0x51,0xca,0xac,0x8c,0x65,0xa3,0x8c, -0xff,0xff,0x02,0x34,0x07,0x00,0x62,0x10,0x21,0x20,0x00,0x02,0x21,0x20,0x00,0x02, -0xff,0x00,0x45,0x32,0x5c,0x0d,0x00,0x0c,0x30,0x00,0xab,0xaf,0x30,0x00,0xab,0x8f, -0x21,0x20,0x00,0x02,0x63,0x0d,0x00,0x0c,0x30,0x00,0xab,0xaf,0x10,0x00,0xa4,0x8f, -0x01,0x00,0x42,0x38,0x04,0x00,0x03,0x24,0x0a,0x20,0x62,0x00,0x10,0x00,0xa4,0xaf, -0x30,0x00,0xab,0x8f,0x11,0x00,0x40,0x16,0x68,0x15,0x62,0x25,0x58,0x51,0x47,0x8c, -0x54,0x51,0x43,0x8c,0x4c,0x51,0x44,0x94,0x48,0x51,0x45,0x94,0x50,0x51,0x46,0x94, -0x21,0x18,0x67,0x00,0x00,0x24,0x04,0x00,0x25,0xb0,0x02,0x3c,0x00,0x1c,0x03,0x00, -0x21,0x28,0xa4,0x00,0x21,0x30,0xc3,0x00,0x6c,0x0c,0x44,0x34,0x68,0x0c,0x42,0x34, -0x00,0x00,0x45,0xac,0x00,0x00,0x86,0xac,0x68,0x15,0x62,0x25,0x21,0x10,0x82,0x02, -0x58,0x51,0x40,0xac,0x5c,0x51,0x40,0xac,0x60,0x51,0x40,0xac,0x48,0x51,0x40,0xac, -0x4c,0x51,0x40,0xac,0x50,0x51,0x40,0xac,0x54,0x51,0x40,0xac,0x2c,0x00,0xa2,0x8f, -0x28,0x00,0xa4,0x8f,0x01,0x00,0x52,0x26,0x94,0x00,0x42,0x24,0x2c,0x00,0xa2,0xaf, -0x24,0x00,0xa2,0x8f,0x94,0x00,0x84,0x24,0x28,0x00,0xa4,0xaf,0x94,0x00,0x42,0x24, -0x20,0x00,0xa4,0x8f,0x24,0x00,0xa2,0xaf,0x1c,0x00,0xa2,0x8f,0x94,0x00,0x84,0x24, -0x20,0x00,0xa4,0xaf,0x94,0x00,0x42,0x24,0x18,0x00,0xa4,0x8f,0x1c,0x00,0xa2,0xaf, -0x14,0x00,0xa2,0x8f,0x94,0x00,0x84,0x24,0x20,0x00,0x43,0x2a,0x94,0x00,0x42,0x24, -0x94,0x00,0x31,0x26,0x94,0x00,0xd6,0x26,0x94,0x00,0xb5,0x26,0x18,0x00,0xa4,0xaf, -0x14,0x00,0xa2,0xaf,0x94,0x00,0xde,0x27,0x94,0x00,0x73,0x26,0x94,0x00,0xf7,0x26, -0xe5,0x00,0x60,0x10,0x94,0x00,0x94,0x26,0x78,0x51,0x22,0x8e,0x00,0x00,0x00,0x00, -0x02,0x13,0x02,0x00,0x01,0x00,0x42,0x30,0xd3,0xff,0x40,0x10,0x25,0xb0,0x02,0x3c, -0x21,0x10,0x42,0x02,0x60,0x01,0x44,0x90,0x60,0x51,0x23,0x8e,0x5c,0x51,0x26,0x8e, -0xff,0x00,0x90,0x30,0x02,0x80,0x04,0x3c,0x68,0x15,0x84,0x24,0x21,0x10,0x04,0x02, -0x73,0x44,0x44,0x90,0x56,0x44,0x45,0x90,0x44,0x51,0x27,0x8e,0x18,0x00,0x64,0x00, -0x12,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0xc5,0x00, -0x12,0x30,0x00,0x00,0x21,0x30,0xc3,0x00,0x2b,0x10,0xe6,0x00,0x54,0xff,0x40,0x10, -0x23,0x10,0xe6,0x00,0xe9,0x0e,0x00,0x08,0x44,0x51,0x20,0xae,0x62,0x00,0xe0,0x10, -0x00,0x00,0x00,0x00,0x63,0x00,0x20,0x15,0x68,0x15,0x62,0x25,0x40,0x10,0x07,0x00, -0x21,0x10,0x47,0x00,0x82,0x10,0x02,0x00,0x2b,0x10,0x46,0x00,0x99,0xff,0x40,0x10, -0x21,0x20,0x00,0x02,0x68,0x15,0x68,0x25,0x21,0x20,0xa8,0x02,0x21,0x30,0x90,0x00, -0xd4,0x51,0x83,0x8c,0x01,0x00,0x05,0x24,0x04,0x10,0x05,0x02,0x99,0x51,0xc7,0x90, -0x27,0x10,0x02,0x00,0x24,0x18,0x62,0x00,0xd4,0x51,0x83,0xac,0x09,0x00,0xe5,0x10, -0x7c,0x51,0xc0,0xa0,0x18,0x00,0xa2,0x8f,0x21,0x38,0x00,0x00,0x21,0x20,0x48,0x00, -0x21,0x18,0x87,0x00,0x01,0x00,0xe7,0x24,0x1d,0x00,0xe2,0x28,0xfc,0xff,0x40,0x14, -0xb6,0x51,0x60,0xa0,0x14,0x00,0xa4,0x8f,0x68,0x15,0x63,0x25,0x21,0x50,0x60,0x00, -0x21,0x10,0x83,0x00,0x21,0x10,0x50,0x00,0x99,0x51,0x40,0xa0,0x02,0x80,0x03,0x3c, -0x02,0x80,0x02,0x3c,0x4c,0x91,0x49,0x24,0xd8,0x90,0x68,0x24,0x21,0x38,0x00,0x00, -0x80,0x18,0x07,0x00,0x21,0x10,0x69,0x00,0x21,0x20,0x68,0x00,0x00,0x00,0x46,0x8c, -0x00,0x00,0x85,0x8c,0x01,0x00,0xe7,0x24,0x21,0x18,0x6a,0x00,0x1d,0x00,0xe2,0x28, -0xec,0x44,0x65,0xac,0xf6,0xff,0x40,0x14,0x60,0x45,0x66,0xac,0x14,0x00,0x00,0x12, -0x68,0x15,0x63,0x25,0x7b,0x51,0x62,0x92,0xff,0xff,0x07,0x26,0x2a,0x10,0xe2,0x00, -0x0e,0x00,0x40,0x14,0x02,0x80,0x0b,0x3c,0x68,0x15,0x62,0x25,0x21,0x10,0xc2,0x03, -0x7b,0x51,0x45,0x90,0x74,0x51,0x44,0x8c,0x01,0x00,0x06,0x24,0x04,0x18,0xe6,0x00, -0x24,0x10,0x83,0x00,0xb3,0x00,0x43,0x10,0x00,0x00,0x00,0x00,0xff,0xff,0xe7,0x24, -0x2a,0x10,0xe5,0x00,0xfa,0xff,0x40,0x10,0x04,0x18,0xe6,0x00,0x68,0x15,0x63,0x25, -0x80,0x10,0x10,0x00,0x21,0x10,0x43,0x00,0x60,0x45,0x45,0x8c,0xec,0x44,0x44,0x8c, -0x02,0x80,0x03,0x3c,0x40,0x10,0x05,0x00,0x8e,0x7d,0x66,0x90,0x21,0x10,0x45,0x00, -0x21,0x20,0x82,0x00,0x22,0x00,0x02,0x24,0x98,0x00,0xc2,0x10,0x82,0x50,0x04,0x00, -0xd4,0x51,0x63,0x8e,0x01,0x00,0x02,0x24,0x04,0x10,0x02,0x02,0x25,0x18,0x62,0x00, -0xd4,0x51,0x63,0xae,0x68,0x15,0x63,0x25,0x21,0x10,0xe3,0x02,0x44,0x51,0x4a,0xac, -0x8c,0x65,0x64,0x8c,0xff,0xff,0x02,0x34,0x3c,0xff,0x82,0x14,0x21,0x20,0x00,0x02, -0x39,0x0f,0x00,0x08,0x00,0x00,0x00,0x00,0x3e,0xff,0x20,0x11,0x21,0x20,0x00,0x02, -0x68,0x15,0x62,0x25,0x80,0x18,0x10,0x00,0x21,0x18,0x62,0x00,0x60,0x45,0x64,0x8c, -0x00,0x00,0x00,0x00,0x2b,0x20,0x44,0x01,0x36,0xff,0x80,0x10,0x21,0x20,0x00,0x02, -0xa2,0x0f,0x00,0x08,0x68,0x15,0x68,0x25,0x1e,0xff,0x40,0x10,0x68,0x15,0x65,0x25, -0x21,0x20,0x30,0x02,0x99,0x51,0x83,0x90,0x01,0x00,0x02,0x24,0x63,0x00,0x62,0x10, -0x02,0x80,0x02,0x3c,0x2c,0x00,0xa3,0x8f,0x68,0x15,0x42,0x24,0x21,0x38,0x00,0x00, -0x21,0x20,0x62,0x00,0x21,0x18,0x87,0x00,0x01,0x00,0xe7,0x24,0x1d,0x00,0xe2,0x28, -0xfc,0xff,0x40,0x14,0xb6,0x51,0x60,0xa0,0x28,0x00,0xa3,0x8f,0x02,0x80,0x0b,0x3c, -0x68,0x15,0x65,0x25,0x21,0x30,0x65,0x00,0xd4,0x51,0xc2,0x8c,0x01,0x00,0x03,0x24, -0x04,0x18,0x03,0x02,0x27,0x18,0x03,0x00,0x21,0x20,0xd0,0x00,0x24,0x10,0x43,0x00, -0x99,0x51,0x80,0xa0,0xd4,0x51,0xc2,0xac,0x12,0x00,0x00,0x16,0x7c,0x51,0x80,0xa0, -0x7a,0x51,0xc2,0x90,0x00,0x00,0x00,0x00,0x0e,0x00,0x40,0x10,0x01,0x00,0x07,0x24, -0x24,0x00,0xa4,0x8f,0x01,0x00,0x06,0x24,0x21,0x10,0x85,0x00,0x7a,0x51,0x44,0x90, -0x74,0x51,0x45,0x8c,0x04,0x18,0xe6,0x00,0x24,0x10,0xa3,0x00,0x5b,0x00,0x43,0x10, -0x00,0x00,0x00,0x00,0x01,0x00,0xe7,0x24,0x2a,0x10,0x87,0x00,0xfa,0xff,0x40,0x10, -0x04,0x18,0xe6,0x00,0x20,0x00,0xa2,0x8f,0x02,0x80,0x0b,0x3c,0x68,0x15,0x64,0x25, -0x21,0x18,0x44,0x00,0x7a,0x51,0x62,0x90,0x01,0x00,0x07,0x26,0x2a,0x10,0x47,0x00, -0x0e,0x00,0x40,0x14,0x01,0x00,0x06,0x24,0x1c,0x00,0xa3,0x8f,0x00,0x00,0x00,0x00, -0x21,0x10,0x64,0x00,0x7a,0x51,0x45,0x90,0x74,0x51,0x44,0x8c,0x04,0x18,0xe6,0x00, -0x24,0x10,0x83,0x00,0x42,0x00,0x43,0x10,0x00,0x00,0x00,0x00,0x01,0x00,0xe7,0x24, -0x2a,0x10,0xa7,0x00,0xfa,0xff,0x40,0x10,0x04,0x18,0xe6,0x00,0x02,0x80,0x02,0x3c, -0x8e,0x7d,0x44,0x90,0x22,0x00,0x03,0x24,0xd6,0xfe,0x83,0x14,0x68,0x15,0x65,0x25, -0xee,0xff,0x02,0x26,0xff,0x00,0x42,0x30,0x02,0x00,0x42,0x2c,0x18,0x00,0x03,0x24, -0x25,0x0f,0x00,0x08,0x0b,0x80,0x62,0x00,0xc0,0x10,0x07,0x00,0x23,0x10,0x47,0x00, -0xc2,0x10,0x02,0x00,0x2b,0x10,0x48,0x00,0xb6,0xfe,0x40,0x14,0x00,0x00,0x00,0x00, -0x04,0x0f,0x00,0x08,0x00,0x00,0x00,0x00,0x10,0x00,0xa3,0x8f,0x5c,0x00,0xbf,0x8f, -0x58,0x00,0xbe,0x8f,0x54,0x00,0xb7,0x8f,0x50,0x00,0xb6,0x8f,0x4c,0x00,0xb5,0x8f, -0x48,0x00,0xb4,0x8f,0x44,0x00,0xb3,0x8f,0x40,0x00,0xb2,0x8f,0x3c,0x00,0xb1,0x8f, -0x38,0x00,0xb0,0x8f,0x25,0xb0,0x02,0x3c,0x80,0x01,0x42,0x34,0x60,0x00,0xbd,0x27, -0x00,0x00,0x43,0xa0,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x18,0x00,0x02,0x2e, -0x0a,0x00,0x40,0x14,0x05,0x00,0x02,0x2e,0xb6,0x51,0x83,0x90,0x00,0x00,0x00,0x00, -0x05,0x00,0x62,0x2c,0xa0,0xff,0x40,0x10,0x01,0x00,0x62,0x24,0x16,0x10,0x00,0x08, -0xb6,0x51,0x82,0xa0,0x24,0x0f,0x00,0x08,0x99,0x51,0xa7,0xa0,0x04,0x00,0x40,0x10, -0x00,0x00,0x00,0x00,0xb6,0x51,0x83,0x90,0x75,0x10,0x00,0x08,0x03,0x00,0x62,0x2c, -0xb6,0x51,0x83,0x90,0x75,0x10,0x00,0x08,0x04,0x00,0x62,0x2c,0x13,0x00,0x02,0x24, -0x67,0xff,0x02,0x16,0x68,0x15,0x63,0x25,0xf3,0x0f,0x00,0x08,0x21,0x10,0xe3,0x02, -0xff,0x00,0xf0,0x30,0x4c,0x10,0x00,0x08,0x02,0x80,0x02,0x3c,0x35,0x10,0x00,0x08, -0xff,0x00,0xf0,0x30,0xdf,0x0f,0x00,0x08,0xff,0x00,0xf0,0x30,0xd8,0xff,0xbd,0x27, -0x02,0x80,0x02,0x3c,0x14,0x00,0xb1,0xaf,0x24,0x00,0xbf,0xaf,0x20,0x00,0xb4,0xaf, -0x1c,0x00,0xb3,0xaf,0x18,0x00,0xb2,0xaf,0x10,0x00,0xb0,0xaf,0x68,0x15,0x45,0x24, -0x05,0x65,0xa4,0x90,0x00,0x65,0xa3,0x8c,0xfc,0x64,0xa2,0x8c,0x21,0x88,0x64,0x00, -0x2b,0x10,0x22,0x02,0x60,0x00,0x40,0x10,0x21,0x80,0xa0,0x00,0x02,0x80,0x14,0x3c, -0x21,0x98,0xa0,0x00,0xa8,0x10,0x00,0x08,0x21,0x90,0xa0,0x00,0xfc,0x64,0x42,0x8e, -0x10,0x00,0x31,0x26,0x2b,0x10,0x22,0x02,0x57,0x00,0x40,0x10,0x21,0x80,0x40,0x02, -0x05,0x65,0x02,0x92,0xff,0xff,0x23,0x32,0x02,0x80,0x05,0x3c,0x10,0x00,0x42,0x24, -0x25,0x28,0x65,0x00,0x2c,0x79,0x84,0x26,0x10,0x00,0x06,0x24,0x9f,0x45,0x00,0x0c, -0x05,0x65,0x02,0xa2,0xc8,0x63,0x06,0x8e,0x00,0x00,0x00,0x00,0x42,0x24,0x06,0x00, -0x1f,0x00,0x84,0x30,0xc0,0x10,0x04,0x00,0x21,0x10,0x44,0x00,0x80,0x10,0x02,0x00, -0x21,0x10,0x44,0x00,0x80,0x10,0x02,0x00,0x21,0x38,0x50,0x00,0x78,0x51,0xe3,0x8c, -0x00,0x00,0x00,0x00,0x02,0x1b,0x03,0x00,0x01,0x00,0x63,0x30,0xe3,0xff,0x60,0x10, -0x25,0xb0,0x02,0x3c,0xc4,0x63,0x05,0x8e,0x21,0x10,0x82,0x00,0x60,0x01,0x44,0x90, -0x82,0x1d,0x05,0x00,0x3f,0x00,0x63,0x30,0x04,0x00,0x0a,0x24,0x05,0x00,0x62,0x28, -0x21,0x40,0x40,0x01,0x0b,0x40,0x62,0x00,0x07,0x00,0xa0,0x04,0xff,0x00,0x89,0x30, -0x64,0x51,0xe2,0x8c,0x04,0x00,0x08,0x24,0x01,0x00,0x42,0x24,0x64,0x51,0xe2,0xac, -0xc8,0x63,0x66,0x8e,0x00,0x00,0x00,0x00,0x02,0x13,0x06,0x00,0x1f,0x00,0x42,0x30, -0x08,0x00,0x42,0x28,0xcd,0xff,0x40,0x10,0x00,0x00,0x00,0x00,0xc4,0x63,0x62,0x8e, -0x00,0x00,0x00,0x00,0x3f,0x00,0x42,0x30,0xc8,0xff,0x49,0x14,0x00,0x00,0x00,0x00, -0x29,0x00,0x00,0x11,0x01,0x00,0x02,0x24,0x2e,0x00,0x02,0x11,0x02,0x00,0x02,0x24, -0x33,0x00,0x02,0x11,0x03,0x00,0x02,0x24,0x38,0x00,0x02,0x11,0x00,0x00,0x00,0x00, -0x3b,0x00,0x0a,0x11,0x00,0x00,0x00,0x00,0x68,0x51,0xe2,0x8c,0x21,0x18,0x33,0x01, -0x90,0x44,0x64,0x90,0x02,0x11,0x02,0x00,0x2b,0x10,0x44,0x00,0x3e,0x00,0x40,0x14, -0x00,0x00,0x00,0x00,0x5c,0x51,0xe3,0x8c,0x80,0x10,0x09,0x00,0x21,0x10,0x49,0x00, -0x01,0x00,0x63,0x24,0x21,0x10,0x53,0x00,0x5c,0x51,0xe3,0xac,0x21,0x10,0x48,0x00, -0x34,0x43,0x44,0x90,0x44,0x51,0xe3,0x8c,0x00,0x00,0x00,0x00,0x21,0x18,0x64,0x00, -0x44,0x51,0xe3,0xac,0xfc,0x64,0x42,0x8e,0x10,0x00,0x31,0x26,0x2b,0x10,0x22,0x02, -0xab,0xff,0x40,0x14,0x21,0x80,0x40,0x02,0x24,0x00,0xbf,0x8f,0x20,0x00,0xb4,0x8f, -0x1c,0x00,0xb3,0x8f,0x18,0x00,0xb2,0x8f,0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f, -0x08,0x00,0xe0,0x03,0x28,0x00,0xbd,0x27,0x48,0x51,0xe2,0x8c,0x00,0x00,0x00,0x00, -0x01,0x00,0x42,0x24,0x48,0x51,0xe2,0xac,0x01,0x00,0x02,0x24,0xd4,0xff,0x02,0x15, -0x02,0x00,0x02,0x24,0x4c,0x51,0xe2,0x8c,0x00,0x00,0x00,0x00,0x01,0x00,0x42,0x24, -0x4c,0x51,0xe2,0xac,0x02,0x00,0x02,0x24,0xcf,0xff,0x02,0x15,0x03,0x00,0x02,0x24, -0x50,0x51,0xe2,0x8c,0x00,0x00,0x00,0x00,0x01,0x00,0x42,0x24,0x50,0x51,0xe2,0xac, -0x03,0x00,0x02,0x24,0xca,0xff,0x02,0x15,0x00,0x00,0x00,0x00,0x54,0x51,0xe2,0x8c, -0x00,0x00,0x00,0x00,0x01,0x00,0x42,0x24,0xc7,0xff,0x0a,0x15,0x54,0x51,0xe2,0xac, -0x58,0x51,0xe2,0x8c,0x21,0x18,0x33,0x01,0x01,0x00,0x42,0x24,0x58,0x51,0xe2,0xac, -0x68,0x51,0xe2,0x8c,0x90,0x44,0x64,0x90,0x02,0x11,0x02,0x00,0x2b,0x10,0x44,0x00, -0xc4,0xff,0x40,0x10,0x00,0x00,0x00,0x00,0x60,0x51,0xe3,0x8c,0x80,0x10,0x09,0x00, -0x21,0x10,0x49,0x00,0x01,0x00,0x63,0x24,0x21,0x10,0x53,0x00,0x60,0x51,0xe3,0xac, -0x21,0x10,0x48,0x00,0xc5,0x43,0x44,0x90,0x44,0x51,0xe3,0x8c,0x00,0x00,0x00,0x00, -0x21,0x18,0x64,0x00,0xf9,0x10,0x00,0x08,0x44,0x51,0xe3,0xac,0x25,0xb0,0x02,0x3c, -0x25,0xb0,0x05,0x3c,0x02,0x80,0x03,0x3c,0x58,0x00,0x4a,0x34,0x5c,0x00,0x4b,0x34, -0x4c,0x00,0xa2,0x34,0x00,0x00,0x44,0x90,0x68,0x15,0x66,0x24,0xed,0x4a,0xc2,0x90, -0x29,0xb0,0x07,0x3c,0x03,0x00,0x84,0x30,0x21,0x18,0xc0,0x00,0x0f,0x00,0x44,0x10, -0x04,0x00,0xe8,0x34,0x07,0x00,0x80,0x14,0x58,0x0c,0xa9,0x34,0xe6,0x42,0xc2,0x90, -0x1c,0x00,0x06,0x24,0x03,0x00,0x40,0x14,0x50,0x0c,0xa5,0x34,0x00,0x00,0xa6,0xa0, -0x00,0x00,0x26,0xa1,0x00,0x00,0x42,0x8d,0xed,0x4a,0x64,0xa0,0x00,0x00,0xe2,0xac, -0x00,0x00,0x62,0x8d,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0xad,0x08,0x00,0xe0,0x03, -0x21,0x10,0x00,0x00,0x25,0xb0,0x0d,0x3c,0xe8,0xff,0xbd,0x27,0x10,0x00,0xbf,0xaf, -0x2d,0x0a,0xa7,0x35,0xa2,0x0d,0xa2,0x35,0xa4,0x0d,0xa3,0x35,0xa6,0x0d,0xa4,0x35, -0xa8,0x0d,0xa5,0x35,0x00,0x00,0x48,0x94,0x00,0x00,0x69,0x94,0x00,0x00,0x8a,0x94, -0x00,0x00,0xab,0x94,0x00,0x00,0xe3,0x90,0x5b,0x0a,0xa4,0x35,0x5c,0x0a,0xa6,0x35, -0x00,0x2e,0x03,0x00,0x03,0x2e,0x05,0x00,0x40,0x00,0xa2,0x34,0x00,0x00,0xe2,0xa0, -0x00,0x00,0x85,0x90,0x00,0x00,0xc3,0x90,0x02,0x80,0x0e,0x3c,0x68,0x15,0xcc,0x25, -0xff,0xff,0x22,0x31,0xff,0x00,0xa5,0x30,0xff,0xff,0x04,0x31,0x21,0x20,0x82,0x00, -0xff,0x00,0x63,0x30,0x00,0x40,0x87,0x8d,0x00,0x2a,0x05,0x00,0xff,0xff,0x46,0x31, -0x21,0x28,0xa3,0x00,0xff,0xff,0x62,0x31,0x21,0x20,0x86,0x00,0x21,0x20,0x82,0x00, -0xff,0xff,0xa3,0x30,0x64,0x0c,0xa2,0x35,0x00,0x00,0x45,0xa4,0x21,0x20,0x83,0x00, -0x0f,0x00,0xe7,0x30,0x01,0x00,0x02,0x24,0xe0,0x42,0x84,0xad,0xd8,0x42,0x88,0xa5, -0xda,0x42,0x89,0xa5,0xdc,0x42,0x8a,0xa5,0xde,0x42,0x8b,0xa5,0x07,0x00,0xe2,0x10, -0xe4,0x42,0x85,0xa5,0xa8,0x56,0x00,0x0c,0x00,0x00,0x00,0x00,0x10,0x00,0xbf,0x8f, -0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03,0x18,0x00,0xbd,0x27,0x4c,0x00,0xa3,0x35, -0x00,0x00,0x62,0x90,0x00,0x00,0x00,0x00,0x03,0x00,0x42,0x30,0x67,0x00,0x47,0x10, -0x68,0x15,0xc4,0x25,0xe6,0x42,0x82,0x90,0x00,0x00,0x00,0x00,0x2d,0x00,0x40,0x10, -0x01,0x00,0x03,0x24,0x68,0x15,0xc5,0x25,0xe6,0x42,0xa3,0x90,0xff,0x00,0x02,0x24, -0xec,0xff,0x62,0x14,0x25,0xb0,0x03,0x3c,0xc8,0x42,0xa2,0x94,0xe0,0x42,0xa6,0x8c, -0x50,0x0c,0x63,0x34,0x00,0x00,0x64,0x90,0x2b,0x10,0xc2,0x00,0x5e,0x00,0x40,0x14, -0x7f,0x00,0x84,0x30,0xca,0x42,0xa2,0x94,0x00,0x00,0x00,0x00,0x2b,0x10,0xc2,0x00, -0x09,0x00,0x40,0x14,0x00,0x00,0x00,0x00,0xcc,0x42,0xa2,0x94,0x00,0x00,0x00,0x00, -0x2b,0x10,0xc2,0x00,0x02,0x00,0x40,0x10,0x02,0x00,0x82,0x24,0x01,0x00,0x82,0x24, -0xff,0x00,0x44,0x30,0x68,0x15,0xc5,0x25,0xd0,0x42,0xa3,0x90,0x00,0x00,0x00,0x00, -0x2b,0x10,0x64,0x00,0x4e,0x00,0x40,0x10,0x00,0x00,0x00,0x00,0x21,0x20,0x60,0x00, -0x68,0x15,0xc3,0x25,0xe0,0x42,0x62,0x8c,0x00,0x00,0x00,0x00,0xe9,0x03,0x42,0x2c, -0x02,0x00,0x40,0x14,0x25,0xb0,0x02,0x3c,0xd0,0x42,0x64,0x90,0x58,0x0c,0x43,0x34, -0x50,0x0c,0x42,0x34,0x00,0x00,0x44,0xa0,0x00,0x00,0x64,0xa0,0x85,0x11,0x00,0x08, -0x00,0x00,0x00,0x00,0x00,0x40,0x82,0x8c,0x00,0x00,0x00,0x00,0x02,0x12,0x02,0x00, -0x0f,0x00,0x42,0x30,0xd0,0xff,0x43,0x14,0x68,0x15,0xc5,0x25,0x25,0xb0,0x02,0x3c, -0x4c,0x00,0x42,0x34,0x00,0x00,0x43,0x90,0x00,0x00,0x00,0x00,0x03,0x00,0x63,0x30, -0xb8,0xff,0x60,0x10,0xff,0xff,0x02,0x34,0xdc,0x63,0x83,0x8c,0x00,0x00,0x00,0x00, -0xb4,0xff,0x62,0x10,0x00,0x00,0x00,0x00,0xe0,0x42,0x83,0x8c,0x00,0x00,0x00,0x00, -0x65,0x00,0x62,0x2c,0x3b,0x00,0x40,0x14,0x28,0x00,0x62,0x2c,0xd2,0x42,0x83,0x90, -0x00,0x00,0x00,0x00,0x00,0x16,0x03,0x00,0x03,0x16,0x02,0x00,0xfe,0xff,0x42,0x24, -0xfc,0xff,0x42,0x28,0x02,0x00,0x40,0x10,0xfe,0xff,0x62,0x24,0xfc,0xff,0x02,0x24, -0xd2,0x42,0x82,0xa0,0x68,0x15,0xc4,0x25,0xdc,0x63,0x82,0x8c,0xd2,0x42,0x83,0x90, -0xce,0x42,0x86,0x90,0x02,0x11,0x02,0x00,0x7f,0x00,0x42,0x30,0x0a,0x00,0x45,0x24, -0x23,0x18,0xa3,0x00,0x00,0x2e,0x03,0x00,0x03,0x2e,0x05,0x00,0xff,0x00,0xc2,0x30, -0x2a,0x10,0x45,0x00,0x17,0x00,0x40,0x10,0x25,0xb0,0x02,0x3c,0x00,0x2e,0x06,0x00, -0x03,0x2e,0x05,0x00,0x58,0x0c,0x43,0x34,0x50,0x0c,0x42,0x34,0x00,0x00,0x45,0xa0, -0x00,0x00,0x65,0xa0,0x85,0x11,0x00,0x08,0x00,0x00,0x00,0x00,0xe6,0x42,0x82,0x91, -0x00,0x00,0x00,0x00,0x97,0xff,0x40,0x14,0x00,0x00,0x00,0x00,0xff,0xff,0x02,0x24, -0x91,0x11,0x00,0x08,0xe6,0x42,0x82,0xa1,0xac,0x11,0x00,0x08,0xff,0xff,0x82,0x24, -0xd1,0x42,0xa3,0x90,0x00,0x00,0x00,0x00,0x2b,0x10,0x83,0x00,0xb4,0x11,0x00,0x08, -0x0b,0x20,0x62,0x00,0xcf,0x42,0x83,0x80,0x00,0x00,0x00,0x00,0xff,0x00,0x62,0x30, -0x2a,0x10,0xa2,0x00,0x0b,0x28,0x62,0x00,0x25,0xb0,0x02,0x3c,0x58,0x0c,0x43,0x34, -0x50,0x0c,0x42,0x34,0x00,0x00,0x45,0xa0,0x00,0x00,0x65,0xa0,0x85,0x11,0x00,0x08, -0x00,0x00,0x00,0x00,0xcf,0xff,0x40,0x10,0x00,0x00,0x00,0x00,0xd2,0x42,0x83,0x90, -0x00,0x00,0x00,0x00,0x00,0x16,0x03,0x00,0x03,0x16,0x02,0x00,0x02,0x00,0x42,0x24, -0x0d,0x00,0x42,0x28,0x03,0x00,0x40,0x14,0x00,0x00,0x00,0x00,0xe0,0x11,0x00,0x08, -0x0c,0x00,0x02,0x24,0xe0,0x11,0x00,0x08,0x02,0x00,0x62,0x24,0xc0,0xff,0xbd,0x27, -0x18,0x00,0xb0,0xaf,0x25,0xb0,0x10,0x3c,0x28,0x00,0xb4,0xaf,0x24,0x00,0xb3,0xaf, -0x1c,0x00,0xb1,0xaf,0x3c,0x00,0xbf,0xaf,0x38,0x00,0xbe,0xaf,0x34,0x00,0xb7,0xaf, -0x30,0x00,0xb6,0xaf,0x2c,0x00,0xb5,0xaf,0x20,0x00,0xb2,0xaf,0xd8,0x00,0x06,0x36, -0x00,0x00,0xc3,0x90,0x02,0x80,0x02,0x3c,0x68,0x15,0x54,0x24,0x2a,0xb0,0x11,0x3c, -0xa0,0xff,0x02,0x24,0x25,0x18,0x62,0x00,0x34,0x00,0x25,0x36,0xfe,0xff,0x02,0x24, -0xbc,0x42,0x92,0x92,0x40,0x00,0x04,0x24,0x00,0x00,0xc3,0xa0,0x00,0x00,0xa2,0xa0, -0xa1,0x4e,0x00,0x0c,0x00,0x96,0x12,0x00,0x21,0x98,0x40,0x00,0x6b,0x00,0x60,0x12, -0x00,0x40,0x02,0x3c,0x08,0x00,0x63,0x8e,0xb0,0x03,0x02,0x36,0x21,0x20,0x60,0x02, -0x00,0x00,0x43,0xac,0x3a,0x45,0x00,0x0c,0x21,0xb8,0x80,0x02,0x01,0x00,0x1e,0x24, -0x42,0x00,0x16,0x36,0x03,0x0c,0x11,0x36,0x17,0x0e,0x15,0x36,0x04,0x00,0x14,0x24, -0x2a,0xb0,0x03,0x3c,0x06,0x00,0x63,0x34,0x00,0x00,0x62,0x94,0x00,0x00,0x00,0x00, -0x00,0xff,0x42,0x30,0x0a,0x00,0x40,0x18,0x00,0x00,0x00,0x00,0x02,0x80,0x04,0x3c, -0xc8,0x94,0x84,0x24,0x00,0x00,0x83,0x8c,0x00,0x00,0x00,0x00,0x00,0x00,0x62,0x94, -0x00,0x00,0x00,0x00,0x00,0xff,0x42,0x30,0xfc,0xff,0x40,0x1c,0x00,0x00,0x00,0x00, -0x08,0x00,0x65,0x8e,0x20,0x10,0x06,0x3c,0x00,0xfe,0xc6,0x34,0x40,0x00,0x07,0x24, -0x01,0x00,0x04,0x24,0x10,0x01,0x00,0x0c,0x10,0x00,0xbe,0xaf,0x4d,0x01,0x00,0x0c, -0x01,0x00,0x04,0x24,0x2a,0xb0,0x02,0x3c,0x05,0x00,0x42,0x34,0xff,0xff,0x03,0x24, -0x00,0x00,0x5e,0xa0,0x00,0x00,0xc3,0xa2,0x00,0x00,0x22,0x92,0xc1,0x42,0xe5,0x92, -0x2a,0xb0,0x04,0x3c,0x02,0x00,0x03,0x24,0x40,0x00,0x42,0x34,0x05,0x00,0x84,0x34, -0x00,0x00,0x22,0xa2,0x00,0x00,0x83,0xa0,0xef,0xff,0x02,0x24,0x00,0x00,0xb0,0x92, -0x64,0x00,0x04,0x24,0x00,0x00,0xa5,0xa2,0x00,0x00,0xc2,0xa2,0xb3,0x0a,0x00,0x0c, -0x00,0x00,0x00,0x00,0x00,0x00,0x22,0x92,0xbf,0xff,0x03,0x24,0x84,0x03,0x04,0x24, -0x24,0x10,0x43,0x00,0x00,0x00,0x22,0xa2,0xb3,0x0a,0x00,0x0c,0xff,0x00,0x10,0x32, -0x25,0xb0,0x02,0x3c,0xf4,0x08,0x42,0x34,0x00,0x00,0x44,0x8c,0x00,0x00,0xb0,0xa2, -0x00,0x00,0xc0,0xa2,0x00,0x00,0x22,0x92,0xbe,0x42,0xe3,0x92,0x1f,0x00,0x85,0x30, -0x40,0x00,0x42,0x34,0x00,0x00,0x22,0xa2,0x00,0x80,0x02,0x3c,0xdf,0x07,0x42,0x34, -0x2b,0x18,0xa3,0x00,0x09,0x00,0x60,0x10,0x24,0x20,0x82,0x00,0xbf,0x42,0xe2,0x92, -0x00,0x00,0x00,0x00,0x2b,0x10,0x45,0x00,0x05,0x00,0x40,0x10,0x02,0x80,0x02,0x3c, -0x01,0x00,0x02,0x3c,0x25,0x10,0xa2,0x00,0x21,0x90,0x42,0x02,0x02,0x80,0x02,0x3c, -0x8e,0x7d,0x43,0x90,0x22,0x00,0x02,0x24,0x1c,0x00,0x62,0x10,0x92,0x00,0x02,0x24, -0x1b,0x00,0x62,0x10,0x02,0x80,0x03,0x3c,0xff,0xff,0x94,0x26,0xb3,0x0a,0x00,0x0c, -0xf4,0x01,0x04,0x24,0xab,0xff,0x81,0x06,0x2a,0xb0,0x03,0x3c,0x04,0x00,0x60,0x12, -0x25,0xb0,0x02,0x3c,0xbd,0x4e,0x00,0x0c,0x21,0x20,0x60,0x02,0x25,0xb0,0x02,0x3c, -0xd8,0x02,0x42,0x34,0x00,0x00,0x52,0xac,0x21,0x10,0x40,0x02,0x3c,0x00,0xbf,0x8f, -0x38,0x00,0xbe,0x8f,0x34,0x00,0xb7,0x8f,0x30,0x00,0xb6,0x8f,0x2c,0x00,0xb5,0x8f, -0x28,0x00,0xb4,0x8f,0x24,0x00,0xb3,0x8f,0x20,0x00,0xb2,0x8f,0x1c,0x00,0xb1,0x8f, -0x18,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03,0x40,0x00,0xbd,0x27,0x02,0x80,0x03,0x3c, -0x68,0x15,0x63,0x24,0xbe,0x42,0x62,0x90,0xc0,0x07,0x83,0x30,0x82,0x19,0x03,0x00, -0x2b,0x10,0x62,0x00,0xe0,0xff,0x40,0x10,0x02,0x80,0x04,0x3c,0x68,0x15,0x84,0x24, -0xbf,0x42,0x82,0x90,0x00,0x00,0x00,0x00,0x2b,0x10,0x43,0x00,0xda,0xff,0x40,0x10, -0x00,0x12,0x03,0x00,0x10,0x00,0x03,0x3c,0x25,0x10,0x43,0x00,0x9a,0x12,0x00,0x08, -0x21,0x90,0x42,0x02,0xe8,0xff,0xbd,0x27,0x10,0x00,0xb0,0xaf,0x0f,0x00,0x10,0x3c, -0xff,0xff,0x05,0x36,0xf0,0xf8,0x06,0x34,0x14,0x00,0xbf,0xaf,0xba,0x44,0x00,0x0c, -0x15,0x00,0x04,0x24,0xb3,0x0a,0x00,0x0c,0x64,0x00,0x04,0x24,0xff,0xff,0x05,0x36, -0x56,0x30,0x06,0x24,0xba,0x44,0x00,0x0c,0x1a,0x00,0x04,0x24,0xb3,0x0a,0x00,0x0c, -0x64,0x00,0x04,0x24,0x02,0x80,0x0b,0x3c,0x68,0x15,0x64,0x25,0x04,0x43,0x83,0x90, -0x04,0x00,0x02,0x24,0x19,0x00,0x62,0x10,0x25,0xb0,0x02,0x3c,0x14,0x43,0x8a,0x8c, -0x18,0x43,0x88,0x8c,0x25,0xb0,0x02,0x3c,0x1c,0x0e,0x49,0x34,0x00,0x0e,0x43,0x34, -0x04,0x0e,0x44,0x34,0x08,0x0e,0x45,0x34,0x10,0x0e,0x46,0x34,0x14,0x0e,0x47,0x34, -0x18,0x0e,0x42,0x34,0x00,0x00,0x6a,0xac,0x00,0x00,0x8a,0xac,0x00,0x00,0xa8,0xac, -0x00,0x00,0xca,0xac,0x00,0x00,0xea,0xac,0x00,0x00,0x4a,0xac,0x00,0x00,0x2a,0xad, -0x14,0x00,0xbf,0x8f,0x10,0x00,0xb0,0x8f,0x68,0x15,0x63,0x25,0x04,0x00,0x02,0x24, -0x18,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,0x04,0x43,0x62,0xa0,0x00,0x0e,0x42,0x34, -0x00,0x00,0x43,0x8c,0x14,0x43,0x8a,0x8c,0x00,0x00,0x00,0x00,0xe4,0xff,0x6a,0x14, -0x00,0x00,0x00,0x00,0xec,0x12,0x00,0x08,0x00,0x00,0x00,0x00,0xe8,0xff,0xbd,0x27, -0x10,0x00,0xb0,0xaf,0x0f,0x00,0x10,0x3c,0xff,0xff,0x05,0x36,0xf0,0xf8,0x06,0x34, -0x14,0x00,0xbf,0xaf,0xba,0x44,0x00,0x0c,0x15,0x00,0x04,0x24,0xb3,0x0a,0x00,0x0c, -0x64,0x00,0x04,0x24,0xff,0xff,0x05,0x36,0x56,0x30,0x06,0x24,0xba,0x44,0x00,0x0c, -0x1a,0x00,0x04,0x24,0xb3,0x0a,0x00,0x0c,0x64,0x00,0x04,0x24,0x02,0x80,0x04,0x3c, -0x68,0x15,0x83,0x24,0x04,0x43,0x65,0x90,0x21,0x70,0x60,0x00,0x10,0x10,0x03,0x3c, -0x25,0xb0,0x02,0x3c,0x10,0x10,0x66,0x34,0x01,0x00,0x03,0x24,0x1c,0x0e,0x4d,0x34, -0x00,0x0e,0x4a,0x34,0x04,0x0e,0x4b,0x34,0x08,0x0e,0x4c,0x34,0x10,0x0e,0x47,0x34, -0x14,0x0e,0x48,0x34,0x0f,0x00,0xa3,0x10,0x18,0x0e,0x49,0x34,0x10,0x10,0x02,0x24, -0x00,0x00,0x46,0xad,0x00,0x00,0x66,0xad,0x00,0x00,0x82,0xad,0x00,0x00,0xe6,0xac, -0x00,0x00,0x06,0xad,0x00,0x00,0x26,0xad,0x00,0x00,0xa6,0xad,0x14,0x00,0xbf,0x8f, -0x10,0x00,0xb0,0x8f,0x01,0x00,0x02,0x24,0x18,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03, -0x04,0x43,0xc2,0xa1,0x00,0x00,0x44,0x8d,0x00,0x00,0x00,0x00,0xf0,0xff,0x86,0x14, -0x10,0x10,0x02,0x24,0x23,0x13,0x00,0x08,0x00,0x00,0x00,0x00,0xe0,0xff,0xbd,0x27, -0x14,0x00,0xb1,0xaf,0x10,0x00,0xb0,0xaf,0x01,0x00,0x11,0x3c,0x0f,0x00,0x10,0x3c, -0xff,0xff,0x05,0x36,0xf4,0x98,0x26,0x36,0x18,0x00,0xbf,0xaf,0xba,0x44,0x00,0x0c, -0x15,0x00,0x04,0x24,0xb3,0x0a,0x00,0x0c,0x64,0x00,0x04,0x24,0xff,0xff,0x05,0x36, -0x56,0x30,0x26,0x36,0xba,0x44,0x00,0x0c,0x1a,0x00,0x04,0x24,0x02,0x80,0x10,0x3c, -0xb3,0x0a,0x00,0x0c,0x64,0x00,0x04,0x24,0x68,0x15,0x04,0x26,0x04,0x43,0x82,0x90, -0x00,0x00,0x00,0x00,0x0d,0x00,0x40,0x14,0x25,0xb0,0x02,0x3c,0x00,0x0e,0x42,0x34, -0x00,0x00,0x43,0x8c,0xec,0x42,0x8f,0x8c,0x00,0x00,0x00,0x00,0x08,0x00,0x6f,0x14, -0x68,0x15,0x02,0x26,0x18,0x00,0xbf,0x8f,0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f, -0x20,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,0x04,0x43,0x40,0xa0,0xec,0x42,0x8f,0x8c, -0xe8,0x42,0x88,0x8c,0xf0,0x42,0x8a,0x8c,0xf4,0x42,0x8b,0x8c,0xf8,0x42,0x8c,0x8c, -0xfc,0x42,0x8d,0x8c,0x25,0xb0,0x02,0x3c,0x00,0x43,0x8e,0x8c,0x1c,0x0e,0x49,0x34, -0x08,0x0e,0x43,0x34,0x00,0x0e,0x44,0x34,0x04,0x0e,0x45,0x34,0x10,0x0e,0x46,0x34, -0x14,0x0e,0x47,0x34,0x18,0x0e,0x42,0x34,0x00,0x00,0x68,0xac,0x18,0x00,0xbf,0x8f, -0x00,0x00,0x8f,0xac,0x14,0x00,0xb1,0x8f,0x00,0x00,0xaa,0xac,0x00,0x00,0xcb,0xac, -0x00,0x00,0xec,0xac,0x00,0x00,0x4d,0xac,0x68,0x15,0x02,0x26,0x10,0x00,0xb0,0x8f, -0x20,0x00,0xbd,0x27,0x00,0x00,0x2e,0xad,0x08,0x00,0xe0,0x03,0x04,0x43,0x40,0xa0, -0xe0,0xff,0xbd,0x27,0x14,0x00,0xb1,0xaf,0x10,0x00,0xb0,0xaf,0x01,0x00,0x11,0x3c, -0x0f,0x00,0x10,0x3c,0xff,0xff,0x05,0x36,0xf4,0x98,0x26,0x36,0x18,0x00,0xbf,0xaf, -0xba,0x44,0x00,0x0c,0x15,0x00,0x04,0x24,0xb3,0x0a,0x00,0x0c,0x64,0x00,0x04,0x24, -0xff,0xff,0x05,0x36,0x56,0x30,0x26,0x36,0xba,0x44,0x00,0x0c,0x1a,0x00,0x04,0x24, -0xb3,0x0a,0x00,0x0c,0x64,0x00,0x04,0x24,0x02,0x80,0x18,0x3c,0x68,0x15,0x05,0x27, -0x04,0x43,0xa3,0x90,0x03,0x00,0x02,0x24,0x2a,0x00,0x62,0x10,0x25,0xb0,0x02,0x3c, -0xec,0x42,0xaf,0x8c,0x08,0x43,0xa3,0x8c,0xe8,0x42,0xa2,0x8c,0xf0,0x42,0xac,0x8c, -0xf4,0x42,0xad,0x8c,0xf8,0x42,0xa9,0x8c,0xfc,0x42,0xaa,0x8c,0x00,0x43,0xab,0x8c, -0x21,0x70,0x43,0x00,0xff,0xff,0x02,0x3c,0x25,0xb0,0x03,0x3c,0xff,0x00,0x42,0x34, -0x00,0xff,0xc4,0x31,0x04,0x0e,0x65,0x34,0x10,0x0e,0x66,0x34,0x14,0x0e,0x67,0x34, -0x18,0x0e,0x68,0x34,0x24,0x80,0xc2,0x01,0x08,0x0e,0x71,0x34,0x00,0x0e,0x62,0x34, -0x01,0x3f,0x84,0x2c,0x1c,0x0e,0x63,0x34,0x00,0x00,0x4f,0xac,0x00,0x00,0xac,0xac, -0x00,0x00,0xcd,0xac,0x00,0x00,0xe9,0xac,0x00,0x00,0x0a,0xad,0x00,0x00,0x6b,0xac, -0x0a,0x00,0x80,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x2e,0xae,0x18,0x00,0xbf,0x8f, -0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f,0x68,0x15,0x03,0x27,0x03,0x00,0x02,0x24, -0x20,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,0x04,0x43,0x62,0xa0,0xa6,0x13,0x00,0x08, -0x00,0x3f,0x0e,0x36,0x00,0x0e,0x42,0x34,0x00,0x00,0x43,0x8c,0xec,0x42,0xaf,0x8c, -0x00,0x00,0x00,0x00,0xd3,0xff,0x6f,0x14,0x00,0x00,0x00,0x00,0xa7,0x13,0x00,0x08, -0x00,0x00,0x00,0x00,0xd0,0xff,0xbd,0x27,0x18,0x00,0xb2,0xaf,0x02,0x80,0x12,0x3c, -0x24,0x00,0xb5,0xaf,0x20,0x00,0xb4,0xaf,0x28,0x00,0xbf,0xaf,0x1c,0x00,0xb3,0xaf, -0x14,0x00,0xb1,0xaf,0x10,0x00,0xb0,0xaf,0x68,0x15,0x44,0x26,0x02,0x80,0x14,0x3c, -0x00,0x40,0x85,0x8c,0xdc,0x63,0x83,0x8c,0x8e,0x7d,0x86,0x92,0x25,0xb0,0x02,0x3c, -0x0f,0x0c,0x42,0x34,0x00,0x00,0x46,0xa0,0x02,0x19,0x03,0x00,0xf0,0xf0,0xa5,0x30, -0x00,0x10,0x02,0x24,0x04,0x43,0x93,0x90,0x71,0x00,0xa2,0x10,0x7f,0x00,0x75,0x30, -0x25,0xb0,0x09,0x3c,0x4c,0x00,0x23,0x35,0x00,0x00,0x62,0x90,0x00,0x00,0x00,0x00, -0x03,0x00,0x42,0x30,0x09,0x00,0x40,0x10,0x68,0x15,0x45,0x26,0x68,0x15,0x4a,0x26, -0x00,0x40,0x42,0x8d,0x00,0x00,0x00,0x00,0x02,0x13,0x02,0x00,0x0f,0x00,0x42,0x30, -0x33,0x00,0x40,0x10,0x00,0x0e,0x25,0x35,0x68,0x15,0x45,0x26,0x04,0x43,0xa2,0x8c, -0x00,0x00,0x00,0x00,0x02,0x12,0x02,0x00,0x0f,0x00,0x40,0x14,0x68,0x15,0x4a,0x26, -0x25,0xb0,0x02,0x3c,0x84,0x01,0x42,0x34,0x00,0x00,0x44,0x8c,0x0d,0x00,0x03,0x24, -0x7e,0x00,0x83,0x10,0x3e,0x00,0x02,0x24,0x4a,0x00,0x03,0x24,0x1f,0x43,0xa2,0xa0, -0x1c,0x43,0xa3,0xa0,0x45,0x00,0x02,0x24,0x43,0x00,0x03,0x24,0x1d,0x43,0xa2,0xa0, -0x1e,0x43,0xa3,0xa0,0x68,0x15,0x4a,0x26,0xdc,0x63,0x4c,0x8d,0x04,0x40,0x42,0x8d, -0x00,0x40,0x4b,0x8d,0x1e,0x43,0x4d,0x91,0x1c,0x43,0x4e,0x91,0x25,0xb0,0x09,0x3c, -0x02,0x11,0x02,0x00,0x60,0x0c,0x27,0x35,0x02,0x19,0x0c,0x00,0x98,0x0c,0x24,0x35, -0x00,0x00,0xe3,0xa0,0x66,0x0c,0x25,0x35,0x00,0x00,0x82,0xa0,0x67,0x0c,0x26,0x35, -0xf0,0xf0,0x68,0x31,0x10,0x10,0x02,0x24,0x00,0x00,0xad,0xa0,0x00,0x00,0xce,0xa0, -0x43,0x00,0x02,0x11,0xff,0xff,0x02,0x34,0x28,0x00,0xbf,0x8f,0x24,0x00,0xb5,0x8f, -0x20,0x00,0xb4,0x8f,0x1c,0x00,0xb3,0x8f,0x18,0x00,0xb2,0x8f,0x14,0x00,0xb1,0x8f, -0x10,0x00,0xb0,0x8f,0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03,0x30,0x00,0xbd,0x27, -0x00,0x00,0xa2,0x8c,0x00,0x00,0x00,0x00,0x5d,0x00,0x40,0x10,0x10,0x0e,0x28,0x35, -0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40, -0x08,0x0e,0x22,0x35,0x04,0x0e,0x24,0x35,0x00,0x00,0x43,0x8c,0x00,0x00,0xa5,0x8c, -0x00,0x00,0x82,0x8c,0xe8,0x42,0x43,0xad,0xec,0x42,0x45,0xad,0xf0,0x42,0x42,0xad, -0x14,0x0e,0x24,0x35,0x18,0x0e,0x22,0x35,0x1c,0x0e,0x25,0x35,0x00,0x00,0x08,0x8d, -0x8e,0x7d,0x8b,0x92,0x00,0x00,0x86,0x8c,0x00,0xff,0x63,0x30,0x00,0x00,0x47,0x8c, -0x00,0x00,0xa4,0x8c,0x9a,0x0c,0x22,0x35,0x02,0x1a,0x03,0x00,0x00,0x00,0x43,0xa0, -0x22,0x00,0x02,0x24,0xf4,0x42,0x48,0xad,0xf8,0x42,0x46,0xad,0xfc,0x42,0x47,0xad, -0x58,0x00,0x62,0x11,0x00,0x43,0x44,0xad,0x92,0x00,0x02,0x24,0x56,0x00,0x62,0x11, -0x0d,0x08,0x22,0x35,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40, -0x68,0x15,0x44,0x26,0x00,0x40,0x83,0x8c,0xff,0xff,0x02,0x3c,0xff,0x0f,0x42,0x34, -0x24,0x18,0x62,0x00,0x00,0x10,0x63,0x34,0xde,0x13,0x00,0x08,0x00,0x40,0x83,0xac, -0x01,0x00,0x02,0x24,0x35,0x00,0x62,0x12,0x04,0x00,0x02,0x24,0x33,0x00,0x62,0x12, -0x68,0x15,0x43,0x26,0xff,0xff,0x02,0x24,0xd0,0x13,0x00,0x08,0x04,0x43,0x62,0xa0, -0xbd,0xff,0x82,0x11,0x02,0x12,0x0b,0x00,0x0f,0x00,0x48,0x30,0x01,0x00,0x03,0x24, -0xb9,0xff,0x03,0x15,0x4c,0x00,0x23,0x35,0x00,0x00,0x62,0x90,0x00,0x00,0x00,0x00, -0x03,0x00,0x42,0x30,0xb4,0xff,0x40,0x10,0x03,0x00,0x02,0x24,0x5f,0x00,0x62,0x12, -0x04,0x00,0x62,0x2a,0x45,0x00,0x40,0x10,0x00,0x00,0x00,0x00,0x64,0x00,0x60,0x12, -0xff,0x00,0xa2,0x31,0xac,0xff,0x68,0x16,0xff,0x00,0xc2,0x31,0x2b,0x10,0xa2,0x02, -0x52,0x00,0x40,0x10,0x00,0x00,0x00,0x00,0x1f,0x43,0x42,0x91,0x00,0x00,0x00,0x00, -0x2b,0x10,0x55,0x00,0x44,0x00,0x40,0x14,0x00,0x00,0x00,0x00,0x2f,0x13,0x00,0x0c, -0x00,0x00,0x00,0x00,0x06,0x14,0x00,0x08,0x00,0x00,0x00,0x00,0x3b,0x00,0x02,0x24, -0x46,0x00,0x03,0x24,0x1f,0x43,0xa2,0xa0,0x1c,0x43,0xa3,0xa0,0x41,0x00,0x02,0x24, -0x40,0x00,0x03,0x24,0x1d,0x43,0xa2,0xa0,0xf1,0x13,0x00,0x08,0x1e,0x43,0xa3,0xa0, -0x00,0x00,0x03,0x8d,0x3f,0x3f,0x02,0x3c,0x3f,0x3f,0x42,0x34,0xa0,0xff,0x62,0x14, -0x00,0x00,0x00,0x00,0xdf,0x13,0x00,0x08,0x68,0x15,0x45,0x26,0x0f,0x00,0x10,0x3c, -0x01,0x00,0x11,0x3c,0xff,0xff,0x05,0x36,0xf4,0x98,0x26,0x36,0xba,0x44,0x00,0x0c, -0x15,0x00,0x04,0x24,0xb3,0x0a,0x00,0x0c,0x64,0x00,0x04,0x24,0xff,0xff,0x05,0x36, -0x56,0x30,0x26,0x36,0xba,0x44,0x00,0x0c,0x1a,0x00,0x04,0x24,0xb3,0x0a,0x00,0x0c, -0x64,0x00,0x04,0x24,0x68,0x15,0x43,0x26,0xff,0xff,0x02,0x24,0xd0,0x13,0x00,0x08, -0x04,0x43,0x62,0xa0,0x0d,0x08,0x22,0x35,0x00,0x00,0x43,0x90,0x00,0x00,0x00,0x00, -0x0f,0x00,0x63,0x30,0x08,0x00,0x62,0x2c,0x0f,0x00,0x63,0x38,0xa5,0xff,0x40,0x14, -0x01,0x00,0x65,0x24,0x00,0x16,0x05,0x00,0x00,0x24,0x05,0x00,0x00,0x1a,0x05,0x00, -0x25,0x10,0x44,0x00,0x25,0x10,0x43,0x00,0x25,0x10,0x45,0x00,0x25,0x18,0x65,0x00, -0x18,0x43,0x43,0xad,0x35,0x14,0x00,0x08,0x14,0x43,0x42,0xad,0x04,0x00,0x02,0x24, -0x0d,0x00,0x62,0x12,0xff,0x00,0x02,0x24,0x67,0xff,0x62,0x16,0xff,0x00,0xa2,0x31, -0x2b,0x10,0xa2,0x02,0x1d,0x00,0x40,0x14,0xff,0x00,0xc2,0x31,0x2b,0x10,0xa2,0x02, -0x0a,0x00,0x40,0x10,0x00,0x00,0x00,0x00,0xfb,0x12,0x00,0x0c,0x00,0x00,0x00,0x00, -0x06,0x14,0x00,0x08,0x00,0x00,0x00,0x00,0x1d,0x43,0x42,0x91,0x00,0x00,0x00,0x00, -0x2b,0x10,0x55,0x00,0xf8,0xff,0x40,0x10,0x00,0x00,0x00,0x00,0xc5,0x12,0x00,0x0c, -0x00,0x00,0x00,0x00,0x06,0x14,0x00,0x08,0x00,0x00,0x00,0x00,0x20,0x43,0x42,0x91, -0x00,0x00,0x00,0x00,0x2b,0x10,0xa2,0x02,0xac,0xff,0x40,0x10,0x00,0x00,0x00,0x00, -0x70,0x13,0x00,0x0c,0x00,0x00,0x00,0x00,0x06,0x14,0x00,0x08,0x00,0x00,0x00,0x00, -0x2b,0x10,0xa2,0x02,0xe8,0xff,0x40,0x10,0x00,0x00,0x00,0x00,0x21,0x43,0x42,0x91, -0x00,0x00,0x00,0x00,0x2b,0x10,0x55,0x00,0xa0,0xff,0x40,0x14,0x00,0x00,0x00,0x00, -0x70,0x13,0x00,0x0c,0x00,0x00,0x00,0x00,0x06,0x14,0x00,0x08,0x00,0x00,0x00,0x00, -0x02,0x80,0x08,0x3c,0x68,0x15,0x05,0x25,0xdc,0x63,0xa4,0x8c,0xe6,0x42,0xa3,0x90, -0x02,0x11,0x04,0x00,0x1f,0x00,0x60,0x14,0x7f,0x00,0x46,0x30,0x25,0xb0,0x07,0x3c, -0x4c,0x00,0xe2,0x34,0x00,0x00,0x43,0x90,0x00,0x00,0x00,0x00,0x19,0x00,0x60,0x10, -0x00,0x00,0x00,0x00,0xff,0xff,0x02,0x34,0x16,0x00,0x82,0x10,0x00,0x00,0x00,0x00, -0x00,0x08,0xe3,0x34,0x00,0x00,0x62,0x90,0x00,0x00,0x00,0x00,0x01,0x00,0x42,0x30, -0x12,0x00,0x40,0x10,0x4b,0x00,0xc2,0x2c,0x29,0x00,0x40,0x10,0x01,0x00,0x04,0x24, -0xd8,0xff,0xc2,0x24,0x1e,0x00,0x42,0x2c,0x2f,0x00,0x40,0x10,0x23,0x00,0xc2,0x2c, -0x68,0x15,0x04,0x25,0xd3,0x42,0x82,0x90,0x00,0x00,0x00,0x00,0x29,0x00,0x40,0x10, -0x25,0xb0,0x02,0x3c,0x20,0x00,0x03,0x24,0x87,0x0c,0x42,0x34,0x00,0x00,0x43,0xa0, -0xd3,0x42,0x80,0xa0,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0x0f,0x00,0x40,0x10, -0x01,0x00,0x04,0x24,0xd8,0xff,0xc2,0x24,0x1e,0x00,0x42,0x2c,0x2c,0x00,0x40,0x10, -0x23,0x00,0xc2,0x2c,0x68,0x15,0x04,0x25,0xd3,0x42,0x82,0x90,0x00,0x00,0x00,0x00, -0x26,0x00,0x40,0x10,0x25,0xb0,0x02,0x3c,0x44,0x00,0x03,0x24,0x30,0x0c,0x42,0x34, -0x00,0x00,0x43,0xa0,0xed,0x14,0x00,0x08,0xd3,0x42,0x80,0xa0,0xd3,0x42,0xa2,0x90, -0x00,0x00,0x00,0x00,0xef,0xff,0x44,0x10,0x30,0x0c,0xe3,0x34,0x43,0x00,0x02,0x24, -0xd3,0x42,0xa4,0xa0,0x00,0x00,0x62,0xa0,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00, -0xd3,0x42,0xa2,0x90,0x00,0x00,0x00,0x00,0xd5,0xff,0x44,0x10,0x87,0x0c,0xe3,0x34, -0x10,0x00,0x02,0x24,0xd3,0x42,0xa4,0xa0,0x00,0x00,0x62,0xa0,0x06,0x15,0x00,0x08, -0x00,0x00,0x00,0x00,0x23,0x00,0xc2,0x2c,0xda,0xff,0x40,0x10,0x00,0x00,0x00,0x00, -0x68,0x15,0x04,0x25,0xd3,0x42,0x82,0x90,0x02,0x00,0x03,0x24,0xd5,0xff,0x43,0x10, -0x00,0x00,0x00,0x00,0x25,0xb0,0x02,0x3c,0x87,0x0c,0x42,0x34,0xd3,0x42,0x83,0xa0, -0x00,0x00,0x40,0xa0,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0x23,0x00,0xc2,0x2c, -0xcc,0xff,0x40,0x10,0x00,0x00,0x00,0x00,0x68,0x15,0x04,0x25,0xd3,0x42,0x82,0x90, -0x02,0x00,0x03,0x24,0xc7,0xff,0x43,0x10,0x00,0x00,0x00,0x00,0x25,0xb0,0x02,0x3c, -0xd3,0x42,0x83,0xa0,0x30,0x0c,0x42,0x34,0x42,0x00,0x03,0x24,0x00,0x00,0x43,0xa0, -0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0x02,0x80,0x02,0x3c,0x68,0x15,0x45,0x24, -0xd5,0x42,0xa3,0x90,0x02,0x00,0x02,0x24,0x03,0x00,0x62,0x10,0x00,0x00,0x00,0x00, -0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0xdc,0x63,0xa2,0x8c,0x25,0xb0,0x03,0x3c, -0x0a,0x0a,0x68,0x34,0x02,0x11,0x02,0x00,0x7f,0x00,0x42,0x30,0x1a,0x00,0x44,0x2c, -0x14,0x00,0x42,0x2c,0x01,0x0a,0x66,0x34,0x0b,0x00,0x40,0x14,0x2e,0x0a,0x67,0x34, -0xf3,0xff,0x80,0x14,0x00,0x00,0x00,0x00,0xd4,0x42,0xa4,0x90,0x01,0x00,0x02,0x24, -0x01,0x0a,0x67,0x34,0x0f,0x00,0x82,0x10,0x2e,0x0a,0x66,0x34,0xd4,0x42,0xa0,0xa0, -0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0x40,0x00,0x02,0x24,0x00,0x00,0xc2,0xa0, -0x01,0x00,0x03,0x24,0xdf,0xff,0x02,0x24,0xd4,0x42,0xa3,0xa0,0x00,0x00,0xe2,0xa0, -0x03,0x00,0x03,0x24,0x21,0x10,0x00,0x00,0x00,0x00,0x03,0xa1,0x08,0x00,0xe0,0x03, -0x00,0x00,0x00,0x00,0x47,0x00,0x02,0x24,0x00,0x00,0xe2,0xa0,0xd3,0xff,0x03,0x24, -0x83,0xff,0x02,0x24,0x00,0x00,0xc3,0xa0,0x00,0x00,0x02,0xa1,0x48,0x15,0x00,0x08, -0xd4,0x42,0xa0,0xa0,0xd0,0xff,0xbd,0x27,0x1c,0x00,0xb1,0xaf,0x28,0x00,0xbf,0xaf, -0x24,0x00,0xb3,0xaf,0x20,0x00,0xb2,0xaf,0x18,0x00,0xb0,0xaf,0xff,0xff,0x11,0x24, -0x02,0x80,0x13,0x3c,0x41,0xb0,0x02,0x3c,0x68,0x15,0x66,0x26,0x04,0x00,0x42,0x34, -0x00,0x00,0x47,0x8c,0x00,0x4b,0xc5,0x8c,0x02,0x80,0x03,0x3c,0x96,0x7d,0x64,0x90, -0xfc,0x4a,0xc8,0x8c,0x02,0x80,0x02,0x3c,0xb8,0x7d,0x49,0x90,0x25,0xb0,0x0a,0x3c, -0x25,0x90,0xa7,0x00,0xb0,0x03,0x42,0x35,0x00,0x00,0x52,0xac,0x00,0x24,0x04,0x00, -0x00,0x00,0x48,0xac,0x84,0x02,0x43,0x35,0x8c,0x02,0x45,0x35,0x01,0x00,0x02,0x24, -0x00,0x00,0x72,0xac,0x00,0x00,0xa4,0xac,0xb9,0x04,0x22,0x11,0x00,0x4b,0xd2,0xac, -0x68,0x15,0x66,0x26,0xfc,0x4a,0xc2,0x8c,0x00,0x00,0x00,0x00,0x24,0x28,0x52,0x00, -0x01,0x00,0xa3,0x30,0x09,0x00,0x60,0x10,0x04,0x00,0xa2,0x30,0x00,0x4b,0xc2,0x8c, -0x25,0xb0,0x03,0x3c,0x01,0x00,0x04,0x24,0x01,0x00,0x42,0x38,0xb0,0x03,0x63,0x34, -0x00,0x00,0x64,0xac,0x00,0x4b,0xc2,0xac,0x04,0x00,0xa2,0x30,0x09,0x00,0x40,0x10, -0x08,0x00,0xa2,0x30,0x00,0x4b,0xc2,0x8c,0x25,0xb0,0x03,0x3c,0x04,0x00,0x04,0x24, -0x04,0x00,0x42,0x38,0xb0,0x03,0x63,0x34,0x00,0x00,0x64,0xac,0x00,0x4b,0xc2,0xac, -0x08,0x00,0xa2,0x30,0x0e,0x00,0x40,0x10,0x68,0x15,0x64,0x26,0xc9,0x64,0xc2,0x90, -0x00,0x00,0x00,0x00,0x05,0x00,0x40,0x18,0x2a,0xb0,0x02,0x3c,0x02,0x00,0x03,0x24, -0x01,0x00,0x42,0x34,0x00,0x00,0x43,0xa0,0xc9,0x64,0xc0,0xa0,0x00,0x4b,0xc2,0x8c, -0x00,0x00,0x00,0x00,0x08,0x00,0x42,0x38,0x00,0x4b,0xc2,0xac,0x68,0x15,0x64,0x26, -0xfc,0x4a,0x82,0x8c,0x00,0x00,0x00,0x00,0x24,0x10,0x52,0x00,0x10,0x00,0x42,0x30, -0x0d,0x00,0x40,0x10,0x00,0x00,0x00,0x00,0xc9,0x64,0x82,0x90,0x00,0x00,0x00,0x00, -0x05,0x00,0x40,0x18,0x2a,0xb0,0x02,0x3c,0x02,0x00,0x03,0x24,0x01,0x00,0x42,0x34, -0x00,0x00,0x43,0xa0,0xc9,0x64,0x80,0xa0,0x00,0x4b,0x82,0x8c,0x00,0x00,0x00,0x00, -0x10,0x00,0x42,0x38,0x00,0x4b,0x82,0xac,0x68,0x15,0x64,0x26,0xfc,0x4a,0x82,0x8c, -0x00,0x00,0x00,0x00,0x24,0x10,0x52,0x00,0x20,0x00,0x42,0x30,0x0e,0x00,0x40,0x10, -0x00,0x00,0x00,0x00,0xc9,0x64,0x82,0x90,0x00,0x00,0x00,0x00,0x05,0x00,0x40,0x18, -0x2a,0xb0,0x02,0x3c,0x02,0x00,0x03,0x24,0x01,0x00,0x42,0x34,0x00,0x00,0x43,0xa0, -0xc9,0x64,0x80,0xa0,0x00,0x4b,0x82,0x8c,0x00,0x00,0x00,0x00,0x20,0x00,0x42,0x38, -0x00,0x4b,0x82,0xac,0x68,0x15,0x64,0x26,0xfc,0x4a,0x82,0x8c,0x00,0x00,0x00,0x00, -0x24,0x10,0x52,0x00,0x40,0x00,0x42,0x30,0x0d,0x00,0x40,0x10,0x00,0x00,0x00,0x00, -0xc9,0x64,0x82,0x90,0x00,0x00,0x00,0x00,0x05,0x00,0x40,0x18,0x2a,0xb0,0x02,0x3c, -0x02,0x00,0x03,0x24,0x01,0x00,0x42,0x34,0x00,0x00,0x43,0xa0,0xc9,0x64,0x80,0xa0, -0x00,0x4b,0x82,0x8c,0x00,0x00,0x00,0x00,0x40,0x00,0x42,0x38,0x00,0x4b,0x82,0xac, -0x68,0x15,0x64,0x26,0xfc,0x4a,0x82,0x8c,0x00,0x00,0x00,0x00,0x24,0x10,0x52,0x00, -0x80,0x00,0x42,0x30,0x0e,0x00,0x40,0x10,0x00,0x00,0x00,0x00,0xc9,0x64,0x82,0x90, -0x00,0x00,0x00,0x00,0x05,0x00,0x40,0x18,0x2a,0xb0,0x02,0x3c,0x02,0x00,0x03,0x24, -0x01,0x00,0x42,0x34,0x00,0x00,0x43,0xa0,0xc9,0x64,0x80,0xa0,0x00,0x4b,0x82,0x8c, -0x00,0x00,0x00,0x00,0x80,0x00,0x42,0x38,0x00,0x4b,0x82,0xac,0x68,0x15,0x64,0x26, -0xfc,0x4a,0x82,0x8c,0x00,0x00,0x00,0x00,0x24,0x10,0x52,0x00,0x00,0x01,0x42,0x30, -0x0d,0x00,0x40,0x10,0x00,0x00,0x00,0x00,0xc9,0x64,0x82,0x90,0x00,0x00,0x00,0x00, -0x05,0x00,0x40,0x18,0x2a,0xb0,0x02,0x3c,0x02,0x00,0x03,0x24,0x01,0x00,0x42,0x34, -0x00,0x00,0x43,0xa0,0xc9,0x64,0x80,0xa0,0x00,0x4b,0x82,0x8c,0x00,0x00,0x00,0x00, -0x00,0x01,0x42,0x38,0x00,0x4b,0x82,0xac,0x68,0x15,0x64,0x26,0xfc,0x4a,0x82,0x8c, -0x00,0x00,0x00,0x00,0x24,0x10,0x52,0x00,0x00,0x02,0x42,0x30,0x0e,0x00,0x40,0x10, -0x00,0x00,0x00,0x00,0xc9,0x64,0x82,0x90,0x00,0x00,0x00,0x00,0x05,0x00,0x40,0x18, -0x2a,0xb0,0x02,0x3c,0x02,0x00,0x03,0x24,0x01,0x00,0x42,0x34,0x00,0x00,0x43,0xa0, -0xc9,0x64,0x80,0xa0,0x00,0x4b,0x82,0x8c,0x00,0x00,0x00,0x00,0x00,0x02,0x42,0x38, -0x00,0x4b,0x82,0xac,0x68,0x15,0x64,0x26,0xfc,0x4a,0x82,0x8c,0x00,0x00,0x00,0x00, -0x24,0x10,0x52,0x00,0x00,0x04,0x42,0x30,0x0d,0x00,0x40,0x10,0x00,0x00,0x00,0x00, -0xc9,0x64,0x82,0x90,0x00,0x00,0x00,0x00,0x05,0x00,0x40,0x18,0x2a,0xb0,0x02,0x3c, -0x02,0x00,0x03,0x24,0x01,0x00,0x42,0x34,0x00,0x00,0x43,0xa0,0xc9,0x64,0x80,0xa0, -0x00,0x4b,0x82,0x8c,0x00,0x00,0x00,0x00,0x00,0x04,0x42,0x38,0x00,0x4b,0x82,0xac, -0x68,0x15,0x63,0x26,0xfc,0x4a,0x62,0x8c,0x00,0x00,0x00,0x00,0x24,0x10,0x52,0x00, -0x00,0x08,0x42,0x30,0x3a,0x00,0x40,0x10,0x2a,0xb0,0x05,0x3c,0x00,0x00,0xa8,0x8c, -0xff,0x00,0x02,0x24,0xff,0x00,0x04,0x31,0x31,0x00,0x82,0x10,0x00,0x80,0x02,0x31, -0x08,0x04,0x40,0x14,0x00,0x80,0x02,0x3c,0x00,0xff,0x02,0x3c,0x24,0x10,0x02,0x01, -0x05,0x00,0x40,0x14,0x00,0x00,0x00,0x00,0xc9,0x64,0x62,0x90,0x00,0x00,0x00,0x00, -0x0b,0x00,0x40,0x18,0xff,0x00,0x02,0x24,0x08,0x64,0x62,0x90,0x20,0xb0,0x03,0x3c, -0x00,0x12,0x02,0x00,0x21,0x10,0x43,0x00,0x0c,0x00,0x48,0x8c,0x25,0xb0,0x03,0x3c, -0xb0,0x03,0x63,0x34,0x00,0x00,0x68,0xac,0xff,0x00,0x04,0x31,0xff,0x00,0x02,0x24, -0x1a,0x00,0x82,0x10,0x68,0x15,0x70,0x26,0xff,0x00,0x03,0x31,0xc0,0x64,0x05,0x8e, -0x20,0x10,0x02,0x3c,0x00,0x1a,0x03,0x00,0x21,0x18,0x62,0x00,0x21,0x30,0x60,0x00, -0x54,0x64,0x03,0xae,0x21,0x20,0x00,0x00,0x08,0x64,0x08,0xa2,0x20,0x00,0x07,0x24, -0x10,0x01,0x00,0x0c,0x10,0x00,0xa0,0xaf,0xfc,0x4a,0x05,0x8e,0x02,0x80,0x06,0x3c, -0x6c,0x7e,0xc4,0x8c,0xff,0xc7,0x02,0x24,0x24,0x28,0xa2,0x00,0x25,0xb0,0x02,0x3c, -0x04,0x00,0x84,0x34,0x80,0x03,0x42,0x34,0x41,0xb0,0x03,0x3c,0x00,0x00,0x44,0xac, -0x00,0x00,0x65,0xac,0x6c,0x7e,0xc4,0xac,0xfc,0x4a,0x05,0xae,0x68,0x15,0x63,0x26, -0x00,0x4b,0x62,0x8c,0x00,0x00,0x00,0x00,0x00,0x08,0x42,0x38,0x00,0x4b,0x62,0xac, -0x68,0x15,0x65,0x26,0xfc,0x4a,0xa2,0x8c,0x00,0x00,0x00,0x00,0x24,0x10,0x52,0x00, -0x00,0x10,0x42,0x30,0x38,0x00,0x40,0x10,0x2a,0xb0,0x02,0x3c,0x08,0x00,0x43,0x34, -0x00,0x00,0x68,0x8c,0xff,0x00,0x02,0x24,0xff,0x00,0x04,0x31,0x2c,0x00,0x82,0x10, -0x00,0x80,0x02,0x31,0xca,0x03,0x40,0x14,0x00,0x80,0x02,0x3c,0x00,0xff,0x02,0x3c, -0x24,0x10,0x02,0x01,0x0b,0x00,0x40,0x10,0xff,0x00,0x02,0x24,0x10,0x64,0xa2,0x90, -0x20,0xb0,0x03,0x3c,0x00,0x12,0x02,0x00,0x21,0x10,0x43,0x00,0x0c,0x00,0x48,0x8c, -0x25,0xb0,0x03,0x3c,0xb0,0x03,0x63,0x34,0x00,0x00,0x68,0xac,0xff,0x00,0x04,0x31, -0xff,0x00,0x02,0x24,0x1a,0x00,0x82,0x10,0x68,0x15,0x70,0x26,0xff,0x00,0x03,0x31, -0xd8,0x64,0x05,0x8e,0x20,0x10,0x02,0x3c,0x00,0x1a,0x03,0x00,0x21,0x18,0x62,0x00, -0x21,0x30,0x60,0x00,0x6c,0x64,0x03,0xae,0x01,0x00,0x04,0x24,0x10,0x64,0x08,0xa2, -0x20,0x00,0x07,0x24,0x10,0x01,0x00,0x0c,0x10,0x00,0xa0,0xaf,0xfc,0x4a,0x05,0x8e, -0x02,0x80,0x06,0x3c,0x6c,0x7e,0xc4,0x8c,0xff,0xc7,0x02,0x24,0x24,0x28,0xa2,0x00, -0x25,0xb0,0x02,0x3c,0x10,0x00,0x84,0x34,0x80,0x03,0x42,0x34,0x41,0xb0,0x03,0x3c, -0x00,0x00,0x44,0xac,0x00,0x00,0x65,0xac,0x6c,0x7e,0xc4,0xac,0xfc,0x4a,0x05,0xae, -0x68,0x15,0x63,0x26,0x00,0x4b,0x62,0x8c,0x00,0x00,0x00,0x00,0x00,0x10,0x42,0x38, -0x00,0x4b,0x62,0xac,0x68,0x15,0x65,0x26,0xfc,0x4a,0xa2,0x8c,0x00,0x00,0x00,0x00, -0x24,0x10,0x52,0x00,0x00,0x20,0x42,0x30,0x37,0x00,0x40,0x10,0x2a,0xb0,0x02,0x3c, -0x04,0x00,0x43,0x34,0x00,0x00,0x68,0x8c,0xff,0x00,0x02,0x24,0xff,0x00,0x04,0x31, -0xab,0x03,0x82,0x10,0x00,0x80,0x02,0x31,0x90,0x03,0x40,0x14,0x00,0x80,0x02,0x3c, -0x00,0xff,0x02,0x3c,0x24,0x10,0x02,0x01,0x0b,0x00,0x40,0x10,0xff,0x00,0x02,0x24, -0x0c,0x64,0xa2,0x90,0x20,0xb0,0x03,0x3c,0x00,0x12,0x02,0x00,0x21,0x10,0x43,0x00, -0x0c,0x00,0x48,0x8c,0x25,0xb0,0x03,0x3c,0xb0,0x03,0x63,0x34,0x00,0x00,0x68,0xac, -0xff,0x00,0x04,0x31,0xff,0x00,0x02,0x24,0x1a,0x00,0x82,0x10,0xff,0x00,0x03,0x31, -0x68,0x15,0x70,0x26,0xcc,0x64,0x05,0x8e,0x20,0x10,0x02,0x3c,0x00,0x1a,0x03,0x00, -0x21,0x18,0x62,0x00,0x21,0x30,0x60,0x00,0x60,0x64,0x03,0xae,0x01,0x00,0x04,0x24, -0x0c,0x64,0x08,0xa2,0x20,0x00,0x07,0x24,0x10,0x01,0x00,0x0c,0x10,0x00,0xa0,0xaf, -0xfc,0x4a,0x05,0x8e,0x02,0x80,0x06,0x3c,0x6c,0x7e,0xc4,0x8c,0xff,0xc7,0x02,0x24, -0x24,0x28,0xa2,0x00,0x25,0xb0,0x02,0x3c,0x20,0x00,0x84,0x34,0x80,0x03,0x42,0x34, -0x41,0xb0,0x03,0x3c,0x00,0x00,0x44,0xac,0x00,0x00,0x65,0xac,0x6c,0x7e,0xc4,0xac, -0xfc,0x4a,0x05,0xae,0x68,0x15,0x63,0x26,0x00,0x4b,0x62,0x8c,0x00,0x00,0x00,0x00, -0x00,0x20,0x42,0x38,0x00,0x4b,0x62,0xac,0x68,0x15,0x65,0x26,0xfc,0x4a,0xa2,0x8c, -0x00,0x00,0x00,0x00,0x24,0x10,0x52,0x00,0x00,0x80,0x42,0x30,0x59,0x00,0x40,0x10, -0x2a,0xb0,0x06,0x3c,0x0c,0x00,0xc3,0x34,0x00,0x00,0x68,0x8c,0xff,0x00,0x07,0x24, -0xff,0x00,0x04,0x31,0x78,0x03,0x87,0x10,0x00,0x80,0x02,0x31,0x24,0x00,0x40,0x14, -0x00,0x80,0x02,0x3c,0x00,0xff,0x02,0x3c,0x24,0x10,0x02,0x01,0x22,0x00,0x40,0x10, -0xff,0x00,0x02,0x24,0x40,0x00,0xc6,0x34,0x00,0x00,0xc2,0x90,0x00,0x00,0x00,0x00, -0xff,0x00,0x44,0x30,0x0f,0x00,0x87,0x10,0x68,0x15,0x62,0x26,0xe8,0x63,0xa4,0xa0, -0x00,0x00,0xc2,0x90,0xff,0x00,0x83,0x30,0xff,0x00,0x44,0x30,0x09,0x00,0x83,0x10, -0x68,0x15,0x62,0x26,0x21,0x38,0xa0,0x00,0x21,0x28,0xc0,0x00,0x00,0x00,0xa2,0x90, -0x21,0x18,0x80,0x00,0xfd,0xff,0x62,0x14,0xff,0x00,0x44,0x30,0xe8,0x63,0xe3,0xa0, -0x68,0x15,0x62,0x26,0xe8,0x63,0x43,0x90,0x20,0xb0,0x02,0x3c,0x00,0x1a,0x03,0x00, -0x21,0x18,0x62,0x00,0x0c,0x00,0x68,0x8c,0x25,0xb0,0x02,0x3c,0xb0,0x03,0x42,0x34, -0xff,0x00,0x04,0x31,0x00,0x00,0x48,0xac,0x16,0x17,0x00,0x08,0xff,0x00,0x02,0x24, -0x00,0x00,0x62,0xac,0xff,0x00,0x02,0x24,0x24,0x00,0x82,0x10,0x68,0x15,0x70,0x26, -0xff,0x00,0x03,0x31,0x90,0x64,0x05,0x8e,0x20,0x10,0x02,0x3c,0x00,0x1a,0x03,0x00, -0x21,0x18,0x62,0x00,0x21,0x30,0x60,0x00,0xe8,0x63,0x08,0xa2,0x24,0x64,0x03,0xae, -0x03,0x00,0x04,0x24,0x20,0x00,0x07,0x24,0x10,0x01,0x00,0x0c,0x10,0x00,0xa0,0xaf, -0x02,0x80,0x0a,0x3c,0x7c,0x7e,0x47,0x91,0x02,0x80,0x09,0x3c,0x6c,0x7e,0x25,0x8d, -0xfc,0x4a,0x06,0x8e,0x01,0x00,0x08,0x3c,0x80,0xff,0x02,0x24,0x25,0x38,0xe2,0x00, -0x00,0x80,0x03,0x35,0x80,0x00,0xa5,0x34,0x27,0x18,0x03,0x00,0x00,0x26,0x07,0x00, -0x25,0xb0,0x02,0x3c,0x24,0x30,0xc3,0x00,0x25,0x20,0x85,0x00,0x80,0x03,0x42,0x34, -0x41,0xb0,0x03,0x3c,0x00,0x00,0x44,0xac,0x27,0x88,0x08,0x00,0x00,0x00,0x66,0xac, -0x6c,0x7e,0x25,0xad,0x7c,0x7e,0x47,0xa1,0xfc,0x4a,0x06,0xae,0x68,0x15,0x63,0x26, -0x00,0x4b,0x62,0x8c,0x00,0x00,0x00,0x00,0x00,0x80,0x42,0x38,0x00,0x4b,0x62,0xac, -0x68,0x15,0x65,0x26,0xfc,0x4a,0xa2,0x8c,0x01,0x00,0x03,0x3c,0x24,0x10,0x52,0x00, -0x24,0x10,0x51,0x00,0x24,0x10,0x43,0x00,0x56,0x00,0x40,0x10,0x2a,0xb0,0x06,0x3c, -0x10,0x00,0xc3,0x34,0x00,0x00,0x68,0x8c,0xff,0x00,0x07,0x24,0xff,0x00,0x04,0x31, -0x23,0x03,0x87,0x10,0x25,0xb0,0x02,0x3c,0x00,0x80,0x02,0x31,0x23,0x00,0x40,0x14, -0x00,0x80,0x02,0x3c,0x00,0xff,0x02,0x3c,0x24,0x10,0x02,0x01,0x21,0x00,0x40,0x10, -0xff,0x00,0x02,0x24,0x41,0x00,0xc6,0x34,0x00,0x00,0xc2,0x90,0x00,0x00,0x00,0x00, -0xff,0x00,0x44,0x30,0x0e,0x00,0x87,0x10,0x68,0x15,0x62,0x26,0xec,0x63,0xa4,0xa0, -0x00,0x00,0xc2,0x90,0xff,0x00,0x83,0x30,0xff,0x00,0x44,0x30,0x07,0x00,0x83,0x10, -0x21,0x38,0xa0,0x00,0x21,0x28,0xc0,0x00,0x00,0x00,0xa2,0x90,0x21,0x18,0x80,0x00, -0xfd,0xff,0x62,0x14,0xff,0x00,0x44,0x30,0xec,0x63,0xe3,0xa0,0x68,0x15,0x62,0x26, -0xec,0x63,0x43,0x90,0x20,0xb0,0x02,0x3c,0x00,0x1a,0x03,0x00,0x21,0x18,0x62,0x00, -0x0c,0x00,0x68,0x8c,0x25,0xb0,0x02,0x3c,0xb0,0x03,0x42,0x34,0xff,0x00,0x04,0x31, -0x00,0x00,0x48,0xac,0x75,0x17,0x00,0x08,0xff,0x00,0x02,0x24,0x00,0x00,0x62,0xac, -0xff,0x00,0x02,0x24,0x22,0x00,0x82,0x10,0x68,0x15,0x70,0x26,0xff,0x00,0x03,0x31, -0x90,0x64,0x05,0x8e,0x20,0x10,0x02,0x3c,0x00,0x1a,0x03,0x00,0x21,0x18,0x62,0x00, -0x21,0x30,0x60,0x00,0xec,0x63,0x08,0xa2,0x24,0x64,0x03,0xae,0x03,0x00,0x04,0x24, -0x20,0x00,0x07,0x24,0x10,0x01,0x00,0x0c,0x10,0x00,0xa0,0xaf,0x02,0x80,0x09,0x3c, -0x7c,0x7e,0x27,0x91,0x02,0x80,0x08,0x3c,0x6c,0x7e,0x05,0x8d,0xfc,0x4a,0x06,0x8e, -0x01,0x00,0x02,0x3c,0x00,0x80,0x42,0x34,0x40,0x00,0xe7,0x34,0x27,0x10,0x02,0x00, -0x24,0x30,0xc2,0x00,0x80,0x00,0xa5,0x34,0x00,0x26,0x07,0x00,0x25,0xb0,0x02,0x3c, -0x25,0x20,0x85,0x00,0x80,0x03,0x42,0x34,0x41,0xb0,0x03,0x3c,0x00,0x00,0x44,0xac, -0x00,0x00,0x66,0xac,0x6c,0x7e,0x05,0xad,0x7c,0x7e,0x27,0xa1,0xfc,0x4a,0x06,0xae, -0x68,0x15,0x62,0x26,0x00,0x4b,0x43,0x8c,0x01,0x00,0x04,0x3c,0x26,0x18,0x64,0x00, -0x00,0x4b,0x43,0xac,0x68,0x15,0x65,0x26,0xfc,0x4a,0xa2,0x8c,0x02,0x00,0x03,0x3c, -0x24,0x10,0x52,0x00,0x24,0x10,0x43,0x00,0x5a,0x00,0x40,0x10,0x2a,0xb0,0x06,0x3c, -0x14,0x00,0xc3,0x34,0x00,0x00,0x68,0x8c,0xff,0x00,0x07,0x24,0xff,0x00,0x04,0x31, -0xcc,0x02,0x87,0x10,0x25,0xb0,0x02,0x3c,0x00,0x80,0x02,0x31,0x23,0x00,0x40,0x14, -0x00,0x80,0x02,0x3c,0x00,0xff,0x02,0x3c,0x24,0x10,0x02,0x01,0x21,0x00,0x40,0x10, -0xff,0x00,0x02,0x24,0x42,0x00,0xc6,0x34,0x00,0x00,0xc2,0x90,0x00,0x00,0x00,0x00, -0xff,0x00,0x44,0x30,0x0e,0x00,0x87,0x10,0x68,0x15,0x62,0x26,0xf0,0x63,0xa4,0xa0, -0x00,0x00,0xc2,0x90,0xff,0x00,0x83,0x30,0xff,0x00,0x44,0x30,0x07,0x00,0x83,0x10, -0x21,0x38,0xa0,0x00,0x21,0x28,0xc0,0x00,0x00,0x00,0xa2,0x90,0x21,0x18,0x80,0x00, -0xfd,0xff,0x62,0x14,0xff,0x00,0x44,0x30,0xf0,0x63,0xe3,0xa0,0x68,0x15,0x62,0x26, -0xf0,0x63,0x43,0x90,0x20,0xb0,0x02,0x3c,0x00,0x1a,0x03,0x00,0x21,0x18,0x62,0x00, -0x0c,0x00,0x68,0x8c,0x25,0xb0,0x02,0x3c,0xb0,0x03,0x42,0x34,0xff,0x00,0x04,0x31, -0x00,0x00,0x48,0xac,0xd1,0x17,0x00,0x08,0xff,0x00,0x02,0x24,0x00,0x00,0x62,0xac, -0xff,0x00,0x02,0x24,0x25,0x00,0x82,0x10,0x68,0x15,0x70,0x26,0xff,0x00,0x03,0x31, -0x9c,0x64,0x05,0x8e,0x20,0x10,0x02,0x3c,0x00,0x1a,0x03,0x00,0x21,0x18,0x62,0x00, -0x21,0x30,0x60,0x00,0xf0,0x63,0x08,0xa2,0x30,0x64,0x03,0xae,0x04,0x00,0x04,0x24, -0x20,0x00,0x07,0x24,0x10,0x01,0x00,0x0c,0x10,0x00,0xa0,0xaf,0x02,0x80,0x0a,0x3c, -0x7c,0x7e,0x47,0x91,0x02,0x80,0x09,0x3c,0x6c,0x7e,0x25,0x8d,0xfc,0x4a,0x06,0x8e, -0x06,0x00,0x02,0x3c,0x20,0x00,0xe7,0x34,0x27,0x10,0x02,0x00,0x24,0x30,0xc2,0x00, -0x00,0x01,0xa5,0x34,0x25,0xb0,0x03,0x3c,0x04,0x00,0x02,0x3c,0x00,0x26,0x07,0x00, -0x26,0x88,0x22,0x02,0xb0,0x03,0x68,0x34,0x25,0x20,0x85,0x00,0x80,0x03,0x63,0x34, -0x41,0xb0,0x02,0x3c,0x00,0x00,0x64,0xac,0x00,0x00,0x46,0xac,0x6c,0x7e,0x25,0xad, -0x7c,0x7e,0x47,0xa1,0xfc,0x4a,0x06,0xae,0x00,0x00,0x11,0xad,0x68,0x15,0x62,0x26, -0x00,0x4b,0x43,0x8c,0x02,0x00,0x04,0x3c,0x26,0x18,0x64,0x00,0x00,0x4b,0x43,0xac, -0x68,0x15,0x65,0x26,0xfc,0x4a,0xa2,0x8c,0x04,0x00,0x03,0x3c,0x24,0x10,0x52,0x00, -0x24,0x10,0x51,0x00,0x24,0x10,0x43,0x00,0x58,0x00,0x40,0x10,0x25,0xb0,0x03,0x3c, -0xb0,0x03,0x62,0x34,0x2a,0xb0,0x09,0x3c,0x00,0x00,0x51,0xac,0x18,0x00,0x26,0x35, -0x00,0x00,0xc8,0x8c,0xff,0x00,0x07,0x24,0xff,0x00,0x04,0x31,0x3a,0x02,0x87,0x10, -0x04,0x00,0x02,0x24,0x00,0x80,0x02,0x31,0x23,0x00,0x40,0x14,0x00,0x80,0x02,0x3c, -0x00,0xff,0x02,0x3c,0x24,0x10,0x02,0x01,0x21,0x00,0x40,0x10,0xff,0x00,0x02,0x24, -0x43,0x00,0x26,0x35,0x00,0x00,0xc2,0x90,0x00,0x00,0x00,0x00,0xff,0x00,0x44,0x30, -0x0e,0x00,0x87,0x10,0x68,0x15,0x62,0x26,0xf4,0x63,0xa4,0xa0,0x00,0x00,0xc2,0x90, -0xff,0x00,0x83,0x30,0xff,0x00,0x44,0x30,0x07,0x00,0x83,0x10,0x21,0x38,0xa0,0x00, -0x21,0x28,0xc0,0x00,0x00,0x00,0xa2,0x90,0x21,0x18,0x80,0x00,0xfd,0xff,0x62,0x14, -0xff,0x00,0x44,0x30,0xf4,0x63,0xe3,0xa0,0x68,0x15,0x62,0x26,0xf4,0x63,0x43,0x90, -0x20,0xb0,0x02,0x3c,0x00,0x1a,0x03,0x00,0x21,0x18,0x62,0x00,0x0c,0x00,0x68,0x8c, -0x25,0xb0,0x02,0x3c,0xb0,0x03,0x42,0x34,0xff,0x00,0x04,0x31,0x00,0x00,0x48,0xac, -0x34,0x18,0x00,0x08,0xff,0x00,0x02,0x24,0x00,0x00,0xc2,0xac,0xff,0x00,0x02,0x24, -0x21,0x00,0x82,0x10,0x68,0x15,0x70,0x26,0xff,0x00,0x03,0x31,0x9c,0x64,0x05,0x8e, -0x20,0x10,0x02,0x3c,0x00,0x1a,0x03,0x00,0x21,0x18,0x62,0x00,0x21,0x30,0x60,0x00, -0xf4,0x63,0x08,0xa2,0x30,0x64,0x03,0xae,0x04,0x00,0x04,0x24,0x20,0x00,0x07,0x24, -0x10,0x01,0x00,0x0c,0x10,0x00,0xa0,0xaf,0x02,0x80,0x09,0x3c,0x7c,0x7e,0x27,0x91, -0x02,0x80,0x08,0x3c,0x6c,0x7e,0x05,0x8d,0xfc,0x4a,0x06,0x8e,0x06,0x00,0x02,0x3c, -0x10,0x00,0xe7,0x34,0x27,0x10,0x02,0x00,0x24,0x30,0xc2,0x00,0x00,0x01,0xa5,0x34, -0x00,0x26,0x07,0x00,0x25,0xb0,0x02,0x3c,0x25,0x20,0x85,0x00,0x80,0x03,0x42,0x34, -0x41,0xb0,0x03,0x3c,0x00,0x00,0x44,0xac,0x00,0x00,0x66,0xac,0x6c,0x7e,0x05,0xad, -0x7c,0x7e,0x27,0xa1,0xfc,0x4a,0x06,0xae,0x68,0x15,0x62,0x26,0x00,0x4b,0x43,0x8c, -0x04,0x00,0x04,0x3c,0x26,0x18,0x64,0x00,0x00,0x4b,0x43,0xac,0x68,0x15,0x65,0x26, -0xfc,0x4a,0xa2,0x8c,0x08,0x00,0x03,0x3c,0x24,0x10,0x52,0x00,0x24,0x10,0x43,0x00, -0x5a,0x00,0x40,0x10,0x2a,0xb0,0x06,0x3c,0x1c,0x00,0xc3,0x34,0x00,0x00,0x68,0x8c, -0xff,0x00,0x07,0x24,0xff,0x00,0x04,0x31,0x13,0x02,0x87,0x10,0x25,0xb0,0x02,0x3c, -0x00,0x80,0x02,0x31,0x23,0x00,0x40,0x14,0x00,0x80,0x02,0x3c,0x00,0xff,0x02,0x3c, -0x24,0x10,0x02,0x01,0x21,0x00,0x40,0x10,0xff,0x00,0x02,0x24,0x44,0x00,0xc6,0x34, -0x00,0x00,0xc2,0x90,0x00,0x00,0x00,0x00,0xff,0x00,0x44,0x30,0x0e,0x00,0x87,0x10, -0x68,0x15,0x62,0x26,0xf8,0x63,0xa4,0xa0,0x00,0x00,0xc2,0x90,0xff,0x00,0x83,0x30, -0xff,0x00,0x44,0x30,0x07,0x00,0x83,0x10,0x21,0x38,0xa0,0x00,0x21,0x28,0xc0,0x00, -0x00,0x00,0xa2,0x90,0x21,0x18,0x80,0x00,0xfd,0xff,0x62,0x14,0xff,0x00,0x44,0x30, -0xf8,0x63,0xe3,0xa0,0x68,0x15,0x62,0x26,0xf8,0x63,0x43,0x90,0x20,0xb0,0x02,0x3c, -0x00,0x1a,0x03,0x00,0x21,0x18,0x62,0x00,0x0c,0x00,0x68,0x8c,0x25,0xb0,0x02,0x3c, -0xb0,0x03,0x42,0x34,0xff,0x00,0x04,0x31,0x00,0x00,0x48,0xac,0x8f,0x18,0x00,0x08, -0xff,0x00,0x02,0x24,0x00,0x00,0x62,0xac,0xff,0x00,0x02,0x24,0x25,0x00,0x82,0x10, -0x68,0x15,0x70,0x26,0xff,0x00,0x03,0x31,0xa8,0x64,0x05,0x8e,0x20,0x10,0x02,0x3c, -0x00,0x1a,0x03,0x00,0x21,0x18,0x62,0x00,0x21,0x30,0x60,0x00,0xf8,0x63,0x08,0xa2, -0x3c,0x64,0x03,0xae,0x05,0x00,0x04,0x24,0x20,0x00,0x07,0x24,0x10,0x01,0x00,0x0c, -0x10,0x00,0xa0,0xaf,0x02,0x80,0x0a,0x3c,0x7c,0x7e,0x47,0x91,0x02,0x80,0x09,0x3c, -0x6c,0x7e,0x25,0x8d,0xfc,0x4a,0x06,0x8e,0x18,0x00,0x02,0x3c,0x08,0x00,0xe7,0x34, -0x27,0x10,0x02,0x00,0x24,0x30,0xc2,0x00,0x00,0x02,0xa5,0x34,0x25,0xb0,0x03,0x3c, -0x10,0x00,0x02,0x3c,0x00,0x26,0x07,0x00,0x26,0x88,0x22,0x02,0xb0,0x03,0x68,0x34, -0x25,0x20,0x85,0x00,0x80,0x03,0x63,0x34,0x41,0xb0,0x02,0x3c,0x00,0x00,0x64,0xac, -0x00,0x00,0x46,0xac,0x6c,0x7e,0x25,0xad,0x7c,0x7e,0x47,0xa1,0xfc,0x4a,0x06,0xae, -0x00,0x00,0x11,0xad,0x68,0x15,0x62,0x26,0x00,0x4b,0x43,0x8c,0x08,0x00,0x04,0x3c, -0x26,0x18,0x64,0x00,0x00,0x4b,0x43,0xac,0x68,0x15,0x65,0x26,0xfc,0x4a,0xa2,0x8c, -0x10,0x00,0x03,0x3c,0x24,0x10,0x52,0x00,0x24,0x10,0x51,0x00,0x24,0x10,0x43,0x00, -0x58,0x00,0x40,0x10,0x25,0xb0,0x06,0x3c,0xb0,0x03,0xc2,0x34,0x2a,0xb0,0x09,0x3c, -0x00,0x00,0x51,0xac,0x20,0x00,0x23,0x35,0x00,0x00,0x68,0x8c,0xff,0x00,0x07,0x24, -0xff,0x00,0x04,0x31,0x80,0x01,0x87,0x10,0x90,0x03,0xc2,0x34,0x00,0x80,0x02,0x31, -0x23,0x00,0x40,0x14,0x00,0x80,0x02,0x3c,0x00,0xff,0x02,0x3c,0x24,0x10,0x02,0x01, -0x21,0x00,0x40,0x10,0xff,0x00,0x02,0x24,0x45,0x00,0x26,0x35,0x00,0x00,0xc2,0x90, -0x00,0x00,0x00,0x00,0xff,0x00,0x44,0x30,0x0e,0x00,0x87,0x10,0x68,0x15,0x62,0x26, -0x04,0x64,0xa4,0xa0,0x00,0x00,0xc2,0x90,0xff,0x00,0x83,0x30,0xff,0x00,0x44,0x30, -0x07,0x00,0x83,0x10,0x21,0x38,0xa0,0x00,0x21,0x28,0xc0,0x00,0x00,0x00,0xa2,0x90, -0x21,0x18,0x80,0x00,0xfd,0xff,0x62,0x14,0xff,0x00,0x44,0x30,0x04,0x64,0xe3,0xa0, -0x68,0x15,0x62,0x26,0x04,0x64,0x43,0x90,0x20,0xb0,0x02,0x3c,0x00,0x1a,0x03,0x00, -0x21,0x18,0x62,0x00,0x0c,0x00,0x68,0x8c,0x25,0xb0,0x02,0x3c,0xb0,0x03,0x42,0x34, -0xff,0x00,0x04,0x31,0x00,0x00,0x48,0xac,0xf2,0x18,0x00,0x08,0xff,0x00,0x02,0x24, -0x00,0x00,0x62,0xac,0xff,0x00,0x02,0x24,0x21,0x00,0x82,0x10,0x68,0x15,0x70,0x26, -0xff,0x00,0x03,0x31,0xa8,0x64,0x05,0x8e,0x20,0x10,0x02,0x3c,0x00,0x1a,0x03,0x00, -0x21,0x18,0x62,0x00,0x21,0x30,0x60,0x00,0x04,0x64,0x08,0xa2,0x3c,0x64,0x03,0xae, -0x05,0x00,0x04,0x24,0x20,0x00,0x07,0x24,0x10,0x01,0x00,0x0c,0x10,0x00,0xa0,0xaf, -0x02,0x80,0x09,0x3c,0x7c,0x7e,0x27,0x91,0x02,0x80,0x08,0x3c,0x6c,0x7e,0x05,0x8d, -0xfc,0x4a,0x06,0x8e,0x18,0x00,0x02,0x3c,0x01,0x00,0xe7,0x34,0x27,0x10,0x02,0x00, -0x24,0x30,0xc2,0x00,0x00,0x02,0xa5,0x34,0x00,0x26,0x07,0x00,0x25,0xb0,0x02,0x3c, -0x25,0x20,0x85,0x00,0x80,0x03,0x42,0x34,0x41,0xb0,0x03,0x3c,0x00,0x00,0x44,0xac, -0x00,0x00,0x66,0xac,0x6c,0x7e,0x05,0xad,0x7c,0x7e,0x27,0xa1,0xfc,0x4a,0x06,0xae, -0x68,0x15,0x62,0x26,0x00,0x4b,0x43,0x8c,0x10,0x00,0x04,0x3c,0x26,0x18,0x64,0x00, -0x00,0x4b,0x43,0xac,0x68,0x15,0x65,0x26,0xfc,0x4a,0xa2,0x8c,0x20,0x00,0x03,0x3c, -0x24,0x10,0x52,0x00,0x24,0x10,0x43,0x00,0x5a,0x00,0x40,0x10,0x2a,0xb0,0x06,0x3c, -0x24,0x00,0xc3,0x34,0x00,0x00,0x68,0x8c,0xff,0x00,0x07,0x24,0xff,0x00,0x04,0x31, -0x28,0x01,0x87,0x10,0x25,0xb0,0x02,0x3c,0x00,0x80,0x02,0x31,0x23,0x00,0x40,0x14, -0x00,0x80,0x02,0x3c,0x00,0xff,0x02,0x3c,0x24,0x10,0x02,0x01,0x21,0x00,0x40,0x10, -0xff,0x00,0x02,0x24,0x46,0x00,0xc6,0x34,0x00,0x00,0xc2,0x90,0x00,0x00,0x00,0x00, -0xff,0x00,0x44,0x30,0x0e,0x00,0x87,0x10,0x68,0x15,0x62,0x26,0xfc,0x63,0xa4,0xa0, -0x00,0x00,0xc2,0x90,0xff,0x00,0x83,0x30,0xff,0x00,0x44,0x30,0x07,0x00,0x83,0x10, -0x21,0x38,0xa0,0x00,0x21,0x28,0xc0,0x00,0x00,0x00,0xa2,0x90,0x21,0x18,0x80,0x00, -0xfd,0xff,0x62,0x14,0xff,0x00,0x44,0x30,0xfc,0x63,0xe3,0xa0,0x68,0x15,0x62,0x26, -0xfc,0x63,0x43,0x90,0x20,0xb0,0x02,0x3c,0x00,0x1a,0x03,0x00,0x21,0x18,0x62,0x00, -0x0c,0x00,0x68,0x8c,0x25,0xb0,0x02,0x3c,0xb0,0x03,0x42,0x34,0xff,0x00,0x04,0x31, -0x00,0x00,0x48,0xac,0x4d,0x19,0x00,0x08,0xff,0x00,0x02,0x24,0x00,0x00,0x62,0xac, -0xff,0x00,0x02,0x24,0x25,0x00,0x82,0x10,0x68,0x15,0x70,0x26,0xff,0x00,0x03,0x31, -0xb4,0x64,0x05,0x8e,0x20,0x10,0x02,0x3c,0x00,0x1a,0x03,0x00,0x21,0x18,0x62,0x00, -0x21,0x30,0x60,0x00,0xfc,0x63,0x08,0xa2,0x48,0x64,0x03,0xae,0x06,0x00,0x04,0x24, -0x20,0x00,0x07,0x24,0x10,0x01,0x00,0x0c,0x10,0x00,0xa0,0xaf,0x02,0x80,0x0a,0x3c, -0x7c,0x7e,0x47,0x91,0x02,0x80,0x09,0x3c,0x6c,0x7e,0x25,0x8d,0xfc,0x4a,0x06,0x8e, -0x60,0x00,0x02,0x3c,0x04,0x00,0xe7,0x34,0x27,0x10,0x02,0x00,0x24,0x30,0xc2,0x00, -0x00,0x04,0xa5,0x34,0x25,0xb0,0x03,0x3c,0x40,0x00,0x02,0x3c,0x00,0x26,0x07,0x00, -0x26,0x88,0x22,0x02,0xb0,0x03,0x68,0x34,0x25,0x20,0x85,0x00,0x80,0x03,0x63,0x34, -0x41,0xb0,0x02,0x3c,0x00,0x00,0x64,0xac,0x00,0x00,0x46,0xac,0x6c,0x7e,0x25,0xad, -0x7c,0x7e,0x47,0xa1,0xfc,0x4a,0x06,0xae,0x00,0x00,0x11,0xad,0x68,0x15,0x62,0x26, -0x00,0x4b,0x43,0x8c,0x20,0x00,0x04,0x3c,0x26,0x18,0x64,0x00,0x00,0x4b,0x43,0xac, -0x68,0x15,0x65,0x26,0xfc,0x4a,0xa2,0x8c,0x40,0x00,0x03,0x3c,0x24,0x10,0x52,0x00, -0x24,0x10,0x51,0x00,0x24,0x10,0x43,0x00,0x5a,0x00,0x40,0x10,0x68,0x15,0x70,0x26, -0x25,0xb0,0x02,0x3c,0x2a,0xb0,0x07,0x3c,0xb0,0x03,0x42,0x34,0x00,0x00,0x51,0xac, -0x28,0x00,0xe3,0x34,0x00,0x00,0x68,0x8c,0xff,0x00,0x06,0x24,0xff,0x00,0x04,0x31, -0xc9,0x00,0x86,0x10,0x25,0xbd,0x02,0x3c,0x00,0x80,0x02,0x31,0x23,0x00,0x40,0x14, -0x00,0x80,0x02,0x3c,0x00,0xff,0x02,0x3c,0x24,0x10,0x02,0x01,0x21,0x00,0x40,0x10, -0xff,0x00,0x02,0x24,0x47,0x00,0xe7,0x34,0x00,0x00,0xe2,0x90,0x00,0x00,0x00,0x00, -0xff,0x00,0x44,0x30,0x0e,0x00,0x86,0x10,0x68,0x15,0x62,0x26,0x00,0x64,0xa4,0xa0, -0x00,0x00,0xe2,0x90,0xff,0x00,0x83,0x30,0xff,0x00,0x44,0x30,0x07,0x00,0x83,0x10, -0x21,0x30,0xa0,0x00,0x21,0x28,0xe0,0x00,0x00,0x00,0xa2,0x90,0x21,0x18,0x80,0x00, -0xfd,0xff,0x62,0x14,0xff,0x00,0x44,0x30,0x00,0x64,0xc3,0xa0,0x68,0x15,0x62,0x26, -0x00,0x64,0x43,0x90,0x20,0xb0,0x02,0x3c,0x00,0x1a,0x03,0x00,0x21,0x18,0x62,0x00, -0x0c,0x00,0x68,0x8c,0x25,0xb0,0x02,0x3c,0xb0,0x03,0x42,0x34,0xff,0x00,0x04,0x31, -0x00,0x00,0x48,0xac,0xb1,0x19,0x00,0x08,0xff,0x00,0x02,0x24,0x00,0x00,0x62,0xac, -0xff,0x00,0x02,0x24,0x21,0x00,0x82,0x10,0x68,0x15,0x70,0x26,0xff,0x00,0x03,0x31, -0xb4,0x64,0x05,0x8e,0x20,0x10,0x02,0x3c,0x00,0x1a,0x03,0x00,0x21,0x18,0x62,0x00, -0x21,0x30,0x60,0x00,0x00,0x64,0x08,0xa2,0x48,0x64,0x03,0xae,0x06,0x00,0x04,0x24, -0x20,0x00,0x07,0x24,0x10,0x01,0x00,0x0c,0x10,0x00,0xa0,0xaf,0x02,0x80,0x09,0x3c, -0x7c,0x7e,0x27,0x91,0x02,0x80,0x08,0x3c,0x6c,0x7e,0x05,0x8d,0xfc,0x4a,0x06,0x8e, -0x60,0x00,0x02,0x3c,0x02,0x00,0xe7,0x34,0x27,0x10,0x02,0x00,0x24,0x30,0xc2,0x00, -0x00,0x04,0xa5,0x34,0x00,0x26,0x07,0x00,0x25,0xb0,0x02,0x3c,0x25,0x20,0x85,0x00, -0x80,0x03,0x42,0x34,0x41,0xb0,0x03,0x3c,0x00,0x00,0x44,0xac,0x00,0x00,0x66,0xac, -0x6c,0x7e,0x05,0xad,0x7c,0x7e,0x27,0xa1,0xfc,0x4a,0x06,0xae,0x68,0x15,0x62,0x26, -0x00,0x4b,0x43,0x8c,0x40,0x00,0x04,0x3c,0x26,0x18,0x64,0x00,0x00,0x4b,0x43,0xac, -0x68,0x15,0x70,0x26,0xfc,0x4a,0x06,0x8e,0x00,0x04,0x11,0x3c,0x24,0x10,0xd2,0x00, -0x24,0x10,0x51,0x00,0x4c,0x00,0x40,0x14,0x00,0x00,0x00,0x00,0x24,0x28,0xd2,0x00, -0x00,0x08,0x04,0x3c,0x24,0x10,0xa4,0x00,0x08,0x00,0x40,0x10,0x80,0x00,0x07,0x3c, -0x00,0x4b,0x03,0x8e,0x25,0xb0,0x02,0x3c,0xb0,0x03,0x42,0x34,0x26,0x18,0x64,0x00, -0x00,0x00,0x44,0xac,0x00,0x4b,0x03,0xae,0x80,0x00,0x07,0x3c,0x24,0x10,0xa7,0x00, -0x21,0x00,0x40,0x10,0x00,0x00,0x00,0x00,0x00,0x4b,0x03,0x8e,0x25,0xb0,0x08,0x3c, -0xb0,0x03,0x09,0x35,0x2a,0xb0,0x02,0x3c,0x00,0x00,0x23,0xad,0x36,0x00,0x42,0x34, -0x00,0x00,0x43,0x90,0x23,0xb0,0x04,0x3c,0xff,0x1f,0x02,0x3c,0xc0,0x18,0x03,0x00, -0xf0,0x07,0x63,0x30,0x5c,0x65,0x05,0x8e,0x21,0x18,0x64,0x00,0xff,0xff,0x42,0x34, -0x24,0x18,0x62,0x00,0x59,0x00,0x65,0x10,0x60,0x65,0x03,0xae,0x02,0x80,0x05,0x3c, -0x6c,0x7e,0xa3,0x8c,0x27,0x20,0x07,0x00,0x24,0x20,0xc4,0x00,0x00,0x08,0x63,0x34, -0x41,0xb0,0x02,0x3c,0x00,0x00,0x23,0xad,0x00,0x00,0x44,0xac,0x6c,0x7e,0xa3,0xac, -0xfc,0x4a,0x04,0xae,0x68,0x15,0x62,0x26,0x00,0x4b,0x43,0x8c,0x80,0x00,0x04,0x3c, -0x26,0x18,0x64,0x00,0x00,0x4b,0x43,0xac,0x68,0x15,0x66,0x26,0xfc,0x4a,0xc3,0x8c, -0x00,0x01,0x04,0x3c,0x24,0x28,0x72,0x00,0x24,0x10,0xa4,0x00,0x06,0x00,0x40,0x10, -0x25,0xb0,0x02,0x3c,0x00,0x4b,0xc3,0x8c,0xb0,0x03,0x42,0x34,0x26,0x18,0x64,0x00, -0x00,0x00,0x44,0xac,0x00,0x4b,0xc3,0xac,0x00,0x02,0x04,0x3c,0x24,0x10,0xa4,0x00, -0x06,0x00,0x40,0x10,0x25,0xb0,0x03,0x3c,0x00,0x4b,0xc2,0x8c,0xb0,0x03,0x63,0x34, -0x26,0x10,0x44,0x00,0x00,0x4b,0xc2,0xac,0x00,0x00,0x64,0xac,0x28,0x00,0xbf,0x8f, -0x24,0x00,0xb3,0x8f,0x20,0x00,0xb2,0x8f,0x1c,0x00,0xb1,0x8f,0x18,0x00,0xb0,0x8f, -0x08,0x00,0xe0,0x03,0x30,0x00,0xbd,0x27,0x5b,0x4e,0x00,0x0c,0x07,0x00,0x04,0x24, -0x00,0x4b,0x03,0x8e,0xfc,0x4a,0x06,0x8e,0x25,0xb0,0x02,0x3c,0x26,0x18,0x71,0x00, -0xb0,0x03,0x42,0x34,0x00,0x00,0x43,0xac,0xdf,0x19,0x00,0x08,0x00,0x4b,0x03,0xae, -0x56,0x01,0x42,0x35,0x00,0x00,0x43,0x94,0x00,0x00,0x00,0x00,0x44,0xfb,0x60,0x10, -0x00,0x00,0x00,0x00,0x5b,0x4e,0x00,0x0c,0x07,0x00,0x04,0x24,0x7d,0x15,0x00,0x08, -0x68,0x15,0x66,0x26,0x00,0x00,0xa2,0xac,0x48,0x16,0x00,0x08,0xff,0x00,0x02,0x24, -0x00,0x00,0x62,0xac,0x85,0x16,0x00,0x08,0xff,0x00,0x02,0x24,0x00,0x00,0x62,0xac, -0xc2,0x16,0x00,0x08,0xff,0x00,0x02,0x24,0x90,0x03,0x63,0x34,0x00,0x00,0x62,0xac, -0x57,0x18,0x00,0x08,0x68,0x15,0x62,0x26,0x00,0x00,0x40,0xac,0x15,0x19,0x00,0x08, -0x68,0x15,0x62,0x26,0x02,0x00,0x03,0x24,0x90,0x03,0x42,0x34,0x00,0x00,0x43,0xac, -0x74,0x19,0x00,0x08,0x68,0x15,0x62,0x26,0x01,0x00,0x03,0x24,0x90,0x03,0x42,0x34, -0x00,0x00,0x43,0xac,0xd4,0x19,0x00,0x08,0x68,0x15,0x62,0x26,0xd0,0x03,0x03,0x35, -0x80,0x00,0x02,0x24,0x00,0x00,0x62,0xac,0x0a,0x1a,0x00,0x08,0x68,0x15,0x62,0x26, -0x25,0xb0,0x02,0x3c,0x07,0x00,0x03,0x24,0x90,0x03,0x42,0x34,0x00,0x00,0x43,0xac, -0x68,0x15,0x63,0x26,0x00,0x4b,0x62,0x8c,0x00,0x00,0x00,0x00,0x00,0x20,0x42,0x38, -0xe2,0x16,0x00,0x08,0x00,0x4b,0x62,0xac,0x25,0xb0,0x02,0x3c,0x07,0x00,0x03,0x24, -0x90,0x03,0x42,0x34,0x00,0x00,0x43,0xac,0x68,0x15,0x63,0x26,0x00,0x4b,0x62,0x8c, -0x00,0x00,0x00,0x00,0x00,0x80,0x42,0x38,0x40,0x17,0x00,0x08,0x00,0x4b,0x62,0xac, -0x06,0x00,0x03,0x24,0x90,0x03,0x42,0x34,0x00,0x00,0x43,0xac,0x99,0x17,0x00,0x08, -0x68,0x15,0x62,0x26,0x05,0x00,0x03,0x24,0x90,0x03,0x42,0x34,0x00,0x00,0x43,0xac, -0xf8,0x17,0x00,0x08,0x68,0x15,0x62,0x26,0x03,0x00,0x03,0x24,0x90,0x03,0x42,0x34, -0x00,0x00,0x43,0xac,0xb6,0x18,0x00,0x08,0x68,0x15,0x62,0x26,0x25,0xb0,0x0d,0x3c, -0x00,0x80,0x02,0x3c,0x18,0x03,0xa4,0x35,0xfc,0x69,0x42,0x24,0x02,0x80,0x03,0x3c, -0x41,0xb0,0x08,0x3c,0x00,0x00,0x82,0xac,0x68,0x15,0x6a,0x24,0x0a,0x00,0x02,0x35, -0x00,0x00,0x44,0x94,0x0a,0x4b,0x43,0x95,0x08,0x4b,0x4b,0x95,0x25,0x18,0x64,0x00, -0xff,0xff,0x6c,0x30,0x24,0x10,0x8b,0x01,0x02,0x00,0x42,0x30,0x4d,0x00,0x40,0x10, -0x02,0x00,0x64,0x38,0x02,0x00,0x02,0x24,0xc0,0x03,0xa3,0x35,0x00,0x00,0x62,0xac, -0x0a,0x4b,0x44,0xa5,0x24,0x38,0x8b,0x01,0x04,0x00,0xe2,0x30,0x0a,0x00,0x40,0x10, -0x08,0x00,0xe2,0x30,0x0a,0x4b,0x43,0x95,0x0c,0x00,0x04,0x35,0xc0,0x03,0xa5,0x35, -0x04,0x00,0x63,0x38,0x04,0x00,0x02,0x24,0x00,0x00,0x86,0x8c,0x00,0x00,0xa2,0xac, -0x0a,0x4b,0x43,0xa5,0x08,0x00,0xe2,0x30,0x08,0x00,0x40,0x10,0x10,0x00,0xe2,0x30, -0x0a,0x4b,0x42,0x95,0xc0,0x03,0xa4,0x35,0x08,0x00,0x03,0x24,0x08,0x00,0x42,0x38, -0x00,0x00,0x83,0xac,0x0a,0x4b,0x42,0xa5,0x10,0x00,0xe2,0x30,0x08,0x00,0x40,0x10, -0x20,0x00,0xe2,0x30,0x0a,0x4b,0x42,0x95,0xc0,0x03,0xa4,0x35,0x10,0x00,0x03,0x24, -0x10,0x00,0x42,0x38,0x00,0x00,0x83,0xac,0x0a,0x4b,0x42,0xa5,0x20,0x00,0xe2,0x30, -0x08,0x00,0x40,0x10,0x80,0x00,0xe2,0x30,0x0a,0x4b,0x42,0x95,0xc0,0x03,0xa4,0x35, -0x20,0x00,0x03,0x24,0x20,0x00,0x42,0x38,0x00,0x00,0x83,0xac,0x0a,0x4b,0x42,0xa5, -0x80,0x00,0xe2,0x30,0x15,0x00,0x40,0x10,0x24,0x10,0x8b,0x01,0x02,0x80,0x09,0x3c, -0x0a,0x4b,0x46,0x95,0x6c,0x7e,0x25,0x8d,0x08,0x00,0x02,0x3c,0x7f,0xff,0x04,0x24, -0x24,0x20,0x64,0x01,0x25,0x28,0xa2,0x00,0x80,0x00,0xc6,0x38,0xb0,0x03,0xa7,0x35, -0x08,0x00,0x08,0x35,0xc0,0x03,0xa3,0x35,0x80,0x00,0x02,0x24,0x00,0x00,0x62,0xac, -0x21,0x58,0x80,0x00,0x00,0x00,0xe5,0xac,0x0a,0x4b,0x46,0xa5,0x6c,0x7e,0x25,0xad, -0x00,0x00,0x04,0xa5,0x08,0x4b,0x44,0xa5,0x24,0x10,0x8b,0x01,0x00,0x30,0x42,0x30, -0x06,0x00,0x40,0x10,0x00,0x00,0x00,0x00,0x0a,0x4b,0x42,0x95,0x00,0x00,0x00,0x00, -0x00,0x10,0x42,0x38,0x00,0x20,0x42,0x34,0x0a,0x4b,0x42,0xa5,0x08,0x00,0xe0,0x03, -0x00,0x00,0x00,0x00,0x95,0x1a,0x00,0x08,0x0a,0x4b,0x43,0xa5,0xf8,0xff,0xbd,0x27, -0x04,0x00,0xb1,0xaf,0x00,0x00,0xb0,0xaf,0x00,0x40,0x02,0x40,0x00,0x68,0x08,0x40, -0x00,0x70,0x02,0x40,0x00,0x60,0x09,0x40,0x25,0xb0,0x05,0x3c,0x00,0x80,0x02,0x3c, -0x18,0x03,0xa3,0x34,0x7c,0x6b,0x42,0x24,0x00,0x00,0x62,0xac,0x80,0x00,0x87,0x8c, -0x7c,0x02,0xa2,0x34,0x84,0x02,0xa3,0x34,0x88,0x02,0xa6,0x34,0x00,0x00,0x47,0xac, -0x00,0x00,0x68,0xac,0x00,0x00,0xc9,0xac,0x74,0x00,0x83,0x8c,0x8c,0x02,0xa2,0x34, -0x90,0x02,0xa7,0x34,0x00,0x00,0x43,0xac,0x08,0x00,0x86,0x8c,0x94,0x02,0xa8,0x34, -0x98,0x02,0xa9,0x34,0x00,0x00,0xe6,0xac,0x0c,0x00,0x82,0x8c,0x9c,0x02,0xa6,0x34, -0xa0,0x02,0xa7,0x34,0x00,0x00,0x02,0xad,0x10,0x00,0x83,0x8c,0xa4,0x02,0xa8,0x34, -0xa8,0x02,0xaa,0x34,0x00,0x00,0x23,0xad,0x14,0x00,0x82,0x8c,0xac,0x02,0xa9,0x34, -0xb0,0x02,0xab,0x34,0x00,0x00,0xc2,0xac,0x18,0x00,0x83,0x8c,0xb4,0x02,0xa6,0x34, -0xb8,0x02,0xac,0x34,0x00,0x00,0xe3,0xac,0x1c,0x00,0x82,0x8c,0xbc,0x02,0xa7,0x34, -0xc0,0x02,0xad,0x34,0x00,0x00,0x02,0xad,0x20,0x00,0x83,0x8c,0xc4,0x02,0xa8,0x34, -0xc8,0x02,0xae,0x34,0x00,0x00,0x43,0xad,0x24,0x00,0x82,0x8c,0xcc,0x02,0xaa,0x34, -0xd0,0x02,0xaf,0x34,0x00,0x00,0x22,0xad,0x28,0x00,0x83,0x8c,0xd4,0x02,0xa9,0x34, -0xd8,0x02,0xb0,0x34,0x00,0x00,0x63,0xad,0x2c,0x00,0x82,0x8c,0x70,0x02,0xab,0x34, -0x74,0x02,0xb1,0x34,0x00,0x00,0xc2,0xac,0x30,0x00,0x83,0x8c,0x78,0x02,0xa5,0x34, -0x00,0x00,0x83,0xad,0x34,0x00,0x82,0x8c,0x00,0x00,0x00,0x00,0x00,0x00,0xe2,0xac, -0x38,0x00,0x83,0x8c,0x00,0x00,0x00,0x00,0x00,0x00,0xa3,0xad,0x3c,0x00,0x82,0x8c, -0x00,0x00,0x00,0x00,0x00,0x00,0x02,0xad,0x40,0x00,0x83,0x8c,0x00,0x00,0x00,0x00, -0x00,0x00,0xc3,0xad,0x44,0x00,0x82,0x8c,0x00,0x00,0x00,0x00,0x00,0x00,0x42,0xad, -0x48,0x00,0x83,0x8c,0x00,0x00,0x00,0x00,0x00,0x00,0xe3,0xad,0x4c,0x00,0x82,0x8c, -0x00,0x00,0x00,0x00,0x00,0x00,0x22,0xad,0x50,0x00,0x83,0x8c,0x00,0x00,0x00,0x00, -0x00,0x00,0x03,0xae,0x54,0x00,0x82,0x8c,0x00,0x00,0x00,0x00,0x00,0x00,0x62,0xad, -0x58,0x00,0x83,0x8c,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0xae,0x5c,0x00,0x82,0x8c, -0x00,0x00,0x00,0x00,0x00,0x00,0xa2,0xac,0x42,0x1b,0x00,0x08,0x00,0x00,0x00,0x00, -0x00,0x80,0x1b,0x3c,0x10,0x6d,0x7b,0x27,0x25,0xb0,0x1a,0x3c,0x18,0x03,0x5a,0x27, -0x00,0x00,0x5b,0xaf,0x21,0xd8,0xa0,0x03,0x82,0xda,0x1b,0x00,0x80,0xda,0x1b,0x00, -0x08,0x00,0x7b,0x27,0x04,0x00,0x61,0xaf,0x08,0x00,0x62,0xaf,0x0c,0x00,0x63,0xaf, -0x10,0x00,0x64,0xaf,0x14,0x00,0x65,0xaf,0x18,0x00,0x66,0xaf,0x1c,0x00,0x67,0xaf, -0x20,0x00,0x68,0xaf,0x24,0x00,0x69,0xaf,0x28,0x00,0x6a,0xaf,0x2c,0x00,0x6b,0xaf, -0x30,0x00,0x6c,0xaf,0x34,0x00,0x6d,0xaf,0x38,0x00,0x6e,0xaf,0x3c,0x00,0x6f,0xaf, -0x12,0x40,0x00,0x00,0x10,0x48,0x00,0x00,0x00,0x70,0x0a,0x40,0x40,0x00,0x70,0xaf, -0x44,0x00,0x71,0xaf,0x48,0x00,0x72,0xaf,0x4c,0x00,0x73,0xaf,0x50,0x00,0x74,0xaf, -0x54,0x00,0x75,0xaf,0x58,0x00,0x76,0xaf,0x5c,0x00,0x77,0xaf,0x60,0x00,0x78,0xaf, -0x64,0x00,0x79,0xaf,0x68,0x00,0x7c,0xaf,0x6c,0x00,0x7d,0xaf,0x70,0x00,0x7e,0xaf, -0x74,0x00,0x7f,0xaf,0x78,0x00,0x68,0xaf,0x7c,0x00,0x69,0xaf,0x80,0x00,0x6a,0xaf, -0x00,0x68,0x1a,0x40,0x25,0xb0,0x1b,0x3c,0x1c,0x03,0x7b,0x37,0x00,0x00,0x00,0x00, -0x00,0x00,0x7a,0xaf,0x7f,0x00,0x5b,0x33,0x30,0x00,0x60,0x13,0x00,0x00,0x00,0x00, -0x25,0xb0,0x1b,0x3c,0x30,0x03,0x7b,0x37,0x00,0x00,0x00,0x00,0x00,0x00,0x7a,0xaf, -0x00,0x00,0x00,0x00,0x21,0xd8,0xa0,0x03,0x82,0xda,0x1b,0x00,0x80,0xda,0x1b,0x00, -0x08,0x00,0x7b,0x27,0x04,0x00,0x61,0xaf,0x08,0x00,0x62,0xaf,0x0c,0x00,0x63,0xaf, -0x10,0x00,0x64,0xaf,0x14,0x00,0x65,0xaf,0x18,0x00,0x66,0xaf,0x1c,0x00,0x67,0xaf, -0x20,0x00,0x68,0xaf,0x24,0x00,0x69,0xaf,0x28,0x00,0x6a,0xaf,0x2c,0x00,0x6b,0xaf, -0x30,0x00,0x6c,0xaf,0x34,0x00,0x6d,0xaf,0x38,0x00,0x6e,0xaf,0x3c,0x00,0x6f,0xaf, -0x12,0x40,0x00,0x00,0x10,0x48,0x00,0x00,0x00,0x70,0x0a,0x40,0x40,0x00,0x70,0xaf, -0x44,0x00,0x71,0xaf,0x48,0x00,0x72,0xaf,0x4c,0x00,0x73,0xaf,0x50,0x00,0x74,0xaf, -0x54,0x00,0x75,0xaf,0x58,0x00,0x76,0xaf,0x5c,0x00,0x77,0xaf,0x60,0x00,0x78,0xaf, -0x64,0x00,0x79,0xaf,0x68,0x00,0x7c,0xaf,0x6c,0x00,0x7d,0xaf,0x70,0x00,0x7e,0xaf, -0x74,0x00,0x7f,0xaf,0x78,0x00,0x68,0xaf,0x7c,0x00,0x69,0xaf,0x80,0x00,0x6a,0xaf, -0xdf,0x1a,0x00,0x08,0x21,0x20,0x60,0x03,0x00,0x00,0x00,0x00,0x25,0xb0,0x08,0x3c, -0x20,0x03,0x08,0x35,0x00,0x00,0x00,0x00,0x00,0x00,0x1a,0xad,0x00,0x04,0x5b,0x33, -0x0a,0x00,0x60,0x13,0x00,0x00,0x00,0x00,0x00,0x80,0x08,0x3c,0x74,0x55,0x08,0x25, -0x00,0x00,0x00,0x00,0x25,0xb0,0x1b,0x3c,0x24,0x03,0x7b,0x37,0x00,0x00,0x00,0x00, -0x00,0x00,0x68,0xaf,0x09,0xf8,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x08,0x5b,0x33, -0x25,0xb0,0x08,0x3c,0x28,0x03,0x08,0x35,0x00,0x00,0x00,0x00,0x00,0x00,0x1b,0xad, -0x06,0x00,0x60,0x13,0x00,0x00,0x00,0x00,0x00,0x80,0x08,0x3c,0xfc,0x69,0x08,0x25, -0x00,0x00,0x00,0x00,0x09,0xf8,0x00,0x01,0x00,0x00,0x00,0x00,0x02,0x80,0x1a,0x3c, -0x6c,0x7e,0x5a,0x27,0x04,0x00,0x5b,0x97,0x25,0xb0,0x08,0x3c,0x30,0x03,0x08,0x35, -0x00,0x00,0x00,0x00,0x00,0x00,0x1b,0xad,0x18,0x00,0x60,0x13,0x00,0x00,0x00,0x00, -0x08,0xec,0x9b,0x27,0x00,0x00,0x00,0x00,0x04,0x00,0x61,0x8f,0xfc,0x03,0x70,0x7b, -0x7c,0x00,0x62,0x7b,0xbc,0x00,0x64,0x7b,0xfc,0x00,0x66,0x7b,0x3c,0x01,0x68,0x7b, -0x13,0x00,0x00,0x02,0x11,0x00,0x20,0x02,0x7c,0x01,0x6a,0x7b,0xbc,0x01,0x6c,0x7b, -0xfc,0x01,0x6e,0x7b,0x3c,0x02,0x70,0x7b,0x7c,0x02,0x72,0x7b,0xbc,0x02,0x74,0x7b, -0xfc,0x02,0x76,0x7b,0x3c,0x03,0x78,0x7b,0x7c,0x03,0x7c,0x7b,0xbc,0x03,0x7e,0x7b, -0x80,0x00,0x7b,0x8f,0x2f,0x1c,0x00,0x08,0x00,0x00,0x00,0x00,0x21,0xd8,0xa0,0x03, -0x82,0xda,0x1b,0x00,0x80,0xda,0x1b,0x00,0x08,0x00,0x7b,0x27,0x08,0x00,0x5b,0xaf, -0xfc,0xef,0x9d,0x27,0x00,0x00,0x4a,0x8f,0x00,0x00,0x00,0x00,0x21,0x00,0x40,0x11, -0x00,0x00,0x00,0x00,0x02,0x80,0x08,0x3c,0xcc,0x7d,0x08,0x25,0x21,0x48,0x00,0x00, -0x21,0x58,0x00,0x00,0x01,0x00,0x6b,0x25,0x1a,0x00,0x40,0x11,0x24,0x70,0x4b,0x01, -0x14,0x00,0xc0,0x11,0x01,0x00,0x04,0x24,0x00,0x00,0x00,0x00,0x04,0x00,0x44,0xa3, -0x26,0x50,0x4b,0x01,0x00,0x00,0x4a,0xaf,0x80,0x80,0x09,0x00,0x21,0x80,0x08,0x02, -0x00,0x00,0x10,0x8e,0x00,0x00,0x00,0x00,0x09,0xf8,0x00,0x02,0x00,0x00,0x00,0x00, -0x00,0x80,0x1b,0x3c,0xe8,0x6f,0x7b,0x27,0x25,0xb0,0x1a,0x3c,0x18,0x03,0x5a,0x27, -0x00,0x00,0x5b,0xaf,0x02,0x80,0x1a,0x3c,0x6c,0x7e,0x5a,0x27,0xe1,0xff,0x00,0x10, -0x00,0x00,0x00,0x00,0x01,0x00,0x29,0x25,0x40,0x58,0x0b,0x00,0xf2,0x1b,0x00,0x08, -0x00,0x00,0x00,0x00,0x02,0x80,0x1b,0x3c,0x6c,0x7e,0x7b,0x27,0x21,0x60,0x00,0x00, -0x04,0x00,0x6c,0xa7,0x08,0x00,0x7a,0x8f,0x00,0x00,0x00,0x00,0xf8,0xff,0x5a,0x27, -0x00,0x00,0x5a,0x8f,0x00,0x00,0x00,0x00,0x08,0x00,0x5a,0x27,0x84,0x00,0x44,0x8f, -0x00,0x00,0x00,0x00,0xf9,0xff,0x80,0x10,0x00,0x00,0x00,0x00,0x04,0x00,0x41,0x8f, -0xfc,0x03,0x50,0x7b,0x7c,0x00,0x42,0x7b,0xbc,0x00,0x44,0x7b,0xfc,0x00,0x46,0x7b, -0x3c,0x01,0x48,0x7b,0x13,0x00,0x00,0x02,0x11,0x00,0x20,0x02,0x7c,0x01,0x4a,0x7b, -0xbc,0x01,0x4c,0x7b,0xfc,0x01,0x4e,0x7b,0x3c,0x02,0x50,0x7b,0x7c,0x02,0x52,0x7b, -0xbc,0x02,0x54,0x7b,0xfc,0x02,0x56,0x7b,0x3c,0x03,0x58,0x7b,0x7c,0x03,0x5c,0x7b, -0xbc,0x03,0x5e,0x7b,0x80,0x00,0x5b,0x8f,0x00,0x00,0x00,0x00,0x08,0x00,0x60,0x03, -0x10,0x00,0x00,0x42,0x00,0x60,0x05,0x40,0x42,0x28,0x05,0x00,0x40,0x28,0x05,0x00, -0x00,0x60,0x85,0x40,0x04,0x00,0x81,0xac,0x08,0x00,0x82,0xac,0x0c,0x00,0x83,0xac, -0x20,0x00,0x88,0xac,0x24,0x00,0x89,0xac,0x28,0x00,0x8a,0xac,0x2c,0x00,0x8b,0xac, -0x30,0x00,0x8c,0xac,0x34,0x00,0x8d,0xac,0x38,0x00,0x8e,0xac,0x3c,0x00,0x8f,0xac, -0x12,0x40,0x00,0x00,0x10,0x48,0x00,0x00,0x40,0x00,0x90,0xac,0x44,0x00,0x91,0xac, -0x48,0x00,0x92,0xac,0x4c,0x00,0x93,0xac,0x50,0x00,0x94,0xac,0x54,0x00,0x95,0xac, -0x58,0x00,0x96,0xac,0x5c,0x00,0x97,0xac,0x60,0x00,0x98,0xac,0x64,0x00,0x99,0xac, -0x68,0x00,0x9c,0xac,0x6c,0x00,0x9d,0xac,0x70,0x00,0x9e,0xac,0x74,0x00,0x9f,0xac, -0x78,0x00,0x88,0xac,0x7c,0x00,0x89,0xac,0x80,0x00,0x9f,0xac,0xf8,0xff,0x84,0x24, -0x00,0x00,0x84,0x8c,0x00,0x00,0x00,0x00,0x08,0x00,0x84,0x24,0x84,0x00,0x86,0x8c, -0x00,0x00,0x00,0x00,0xf9,0xff,0xc0,0x10,0x00,0x00,0x00,0x00,0x21,0xd8,0x80,0x00, -0x01,0x00,0xba,0x24,0x04,0x00,0x61,0x8f,0xfc,0x03,0x70,0x7b,0x7c,0x00,0x62,0x7b, -0xbc,0x00,0x64,0x7b,0xfc,0x00,0x66,0x7b,0x3c,0x01,0x68,0x7b,0x13,0x00,0x00,0x02, -0x11,0x00,0x20,0x02,0x7c,0x01,0x6a,0x7b,0xbc,0x01,0x6c,0x7b,0xfc,0x01,0x6e,0x7b, -0x3c,0x02,0x70,0x7b,0x7c,0x02,0x72,0x7b,0xbc,0x02,0x74,0x7b,0xfc,0x02,0x76,0x7b, -0x3c,0x03,0x78,0x7b,0x7c,0x03,0x7c,0x7b,0xbc,0x03,0x7e,0x7b,0x80,0x00,0x7b,0x8f, -0x00,0x00,0x00,0x00,0x08,0x00,0x60,0x03,0x00,0x60,0x9a,0x40,0x00,0x60,0x05,0x40, -0x42,0x28,0x05,0x00,0x40,0x28,0x05,0x00,0x00,0x60,0x85,0x40,0x04,0x00,0x81,0xac, -0x08,0x00,0x82,0xac,0x0c,0x00,0x83,0xac,0x20,0x00,0x88,0xac,0x24,0x00,0x89,0xac, -0x28,0x00,0x8a,0xac,0x2c,0x00,0x8b,0xac,0x30,0x00,0x8c,0xac,0x34,0x00,0x8d,0xac, -0x38,0x00,0x8e,0xac,0x3c,0x00,0x8f,0xac,0x12,0x40,0x00,0x00,0x10,0x48,0x00,0x00, -0x40,0x00,0x90,0xac,0x44,0x00,0x91,0xac,0x48,0x00,0x92,0xac,0x4c,0x00,0x93,0xac, -0x50,0x00,0x94,0xac,0x54,0x00,0x94,0xac,0x58,0x00,0x96,0xac,0x5c,0x00,0x96,0xac, -0x60,0x00,0x98,0xac,0x64,0x00,0x99,0xac,0x68,0x00,0x9c,0xac,0x6c,0x00,0x9d,0xac, -0x70,0x00,0x9e,0xac,0x78,0x00,0x88,0xac,0x7c,0x00,0x89,0xac,0x80,0x00,0x9f,0xac, -0x84,0x00,0x80,0xac,0xf8,0xff,0x84,0x24,0x00,0x00,0x84,0x8c,0x00,0x00,0x00,0x00, -0x08,0x00,0x84,0x24,0x84,0x00,0x86,0x8c,0xfa,0xff,0xc0,0x10,0x00,0x00,0x00,0x00, -0x21,0xd8,0x80,0x00,0x01,0x00,0xba,0x24,0x04,0x00,0x61,0x8f,0xfc,0x03,0x70,0x7b, -0x7c,0x00,0x62,0x7b,0xbc,0x00,0x64,0x7b,0xfc,0x00,0x66,0x7b,0x3c,0x01,0x68,0x7b, -0x13,0x00,0x00,0x02,0x11,0x00,0x20,0x02,0x7c,0x01,0x6a,0x7b,0xbc,0x01,0x6c,0x7b, -0xfc,0x01,0x6e,0x7b,0x3c,0x02,0x70,0x7b,0x7c,0x02,0x72,0x7b,0xbc,0x02,0x74,0x7b, -0xfc,0x02,0x76,0x7b,0x3c,0x03,0x78,0x7b,0x7c,0x03,0x7c,0x7b,0xbc,0x03,0x7e,0x7b, -0x80,0x00,0x7b,0x8f,0x08,0x00,0x60,0x03,0x00,0x60,0x9a,0x40,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0xc6,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x1b,0x3c,0x00,0x00,0x7b,0x27, -0x25,0xb0,0x1a,0x3c,0x18,0x03,0x5a,0x27,0x00,0x00,0x5b,0xaf,0x00,0x00,0x05,0x24, -0x03,0x00,0xa4,0x24,0x00,0xa0,0x80,0x40,0x00,0xa0,0x84,0x40,0x01,0x80,0x04,0x3c, -0x98,0x03,0x84,0x24,0x08,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x01,0x80,0x1b,0x3c,0x98,0x03,0x7b,0x27,0x25,0xb0,0x1a,0x3c,0x18,0x03,0x5a,0x27, -0x00,0x00,0x5b,0xaf,0x02,0x80,0x1a,0x3c,0x00,0x00,0x5a,0x27,0xfc,0x03,0x5d,0x27, -0x02,0x80,0x1c,0x3c,0x00,0x14,0x9c,0x27,0x00,0xf0,0x08,0x3c,0x00,0x0c,0x08,0x35, -0x00,0x60,0x88,0x40,0x02,0x80,0x04,0x3c,0x00,0x00,0x84,0x24,0xff,0x7f,0x05,0x3c, -0xff,0xff,0xa5,0x34,0x24,0x20,0x85,0x00,0x00,0x20,0x84,0x4c,0xff,0xff,0x05,0x34, -0x21,0x28,0xa4,0x00,0x00,0x28,0x85,0x4c,0x00,0x80,0x04,0x3c,0x00,0x00,0x84,0x24, -0xff,0x7f,0x05,0x3c,0xff,0xff,0xa5,0x34,0x24,0x20,0x85,0x00,0x00,0x00,0x84,0x4c, -0xff,0x7f,0x06,0x24,0x21,0x30,0xc4,0x00,0x24,0x30,0xc5,0x00,0x00,0x08,0x86,0x4c, -0x00,0xa0,0x04,0x40,0x10,0x00,0x84,0x34,0x00,0xa0,0x84,0x40,0x01,0x80,0x1b,0x3c, -0x24,0x04,0x7b,0x27,0x25,0xb0,0x1a,0x3c,0x18,0x03,0x5a,0x27,0x00,0x00,0x5b,0xaf, -0x00,0x00,0x00,0x00,0x25,0xb0,0x04,0x3c,0x44,0x00,0x84,0x34,0x00,0x00,0x85,0x84, -0x20,0x00,0x06,0x24,0x25,0x28,0xa6,0x00,0x00,0x00,0x85,0xa4,0x01,0x80,0x1b,0x3c, -0x54,0x04,0x7b,0x27,0x25,0xb0,0x1a,0x3c,0x18,0x03,0x5a,0x27,0x00,0x00,0x5b,0xaf, -0x25,0xb0,0x04,0x3c,0x44,0x00,0x84,0x34,0x00,0x00,0x85,0x8c,0x00,0x00,0x00,0x00, -0x10,0x00,0xa5,0x30,0xfc,0xff,0xa0,0x10,0x00,0x00,0x00,0x00,0xff,0x1f,0x07,0x3c, -0xff,0xff,0xe7,0x34,0x02,0x80,0x05,0x3c,0x88,0x7d,0xa5,0x24,0xff,0xff,0xa5,0x30, -0x40,0xb0,0x04,0x3c,0x25,0x28,0xa4,0x00,0x24,0x28,0xa7,0x00,0x21,0x30,0x00,0x00, -0x43,0xb0,0x02,0x3c,0x00,0x80,0x04,0x3c,0x40,0x00,0x84,0x34,0x00,0x00,0x45,0xac, -0x04,0x00,0x46,0xac,0x08,0x00,0x44,0xac,0x4e,0x58,0x00,0x08,0x00,0x00,0x00,0x00, -0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x09,0x00,0x02,0x24,0xff,0xff,0x42,0x24, -0xff,0xff,0x41,0x04,0xff,0xff,0x42,0x24,0x08,0x00,0xe0,0x03,0x01,0x00,0x42,0x24, -0x00,0x60,0x02,0x40,0x01,0x00,0x41,0x34,0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40, -0x08,0x00,0xe0,0x03,0x00,0x00,0x82,0xac,0x00,0x00,0x82,0x8c,0x00,0x00,0x00,0x00, -0x21,0x18,0x40,0x00,0x00,0x60,0x83,0x40,0x08,0x00,0xe0,0x03,0x00,0x00,0x82,0xac, -0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40,0x08,0x00,0xe0,0x03, -0x00,0x00,0x00,0x00,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x01,0x00,0x21,0x38, -0x00,0x60,0x81,0x40,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x01,0x80,0x03,0x3c, -0x25,0xb0,0x02,0x3c,0x44,0x05,0x63,0x24,0x18,0x03,0x42,0x34,0x00,0x00,0x43,0xac, -0x04,0x00,0x85,0x8c,0x00,0x80,0x03,0x3c,0x01,0x00,0x02,0x24,0x25,0x28,0xa3,0x00, -0x00,0x00,0xa4,0x8c,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x01,0x80,0x03,0x3c, -0x25,0xb0,0x02,0x3c,0x74,0x05,0x63,0x24,0x18,0x03,0x42,0x34,0x00,0x00,0x43,0xac, -0x04,0x00,0x82,0x8c,0x02,0x00,0x83,0x94,0x00,0x80,0x07,0x3c,0x25,0x28,0x47,0x00, -0x00,0x00,0xa2,0x8c,0x10,0x00,0x02,0x24,0x13,0x00,0x62,0x10,0x11,0x00,0x66,0x28, -0x06,0x00,0xc0,0x10,0x20,0x00,0x02,0x24,0x08,0x00,0x02,0x24,0x17,0x00,0x62,0x10, -0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x01,0x00,0x02,0x24,0xfd,0xff,0x62,0x14, -0x00,0x00,0x00,0x00,0x08,0x00,0x83,0x8c,0x00,0x00,0x00,0x00,0x00,0x00,0xa3,0xac, -0x04,0x00,0x82,0x8c,0x00,0x00,0x00,0x00,0x25,0x10,0x47,0x00,0x00,0x00,0x42,0x8c, -0x08,0x00,0xe0,0x03,0x01,0x00,0x02,0x24,0x08,0x00,0x82,0x8c,0x00,0x00,0x00,0x00, -0x00,0x00,0xa2,0xa4,0x04,0x00,0x83,0x8c,0x00,0x00,0x00,0x00,0x25,0x18,0x67,0x00, -0x00,0x00,0x62,0x94,0x08,0x00,0xe0,0x03,0x01,0x00,0x02,0x24,0x08,0x00,0x82,0x8c, -0x00,0x00,0x00,0x00,0x00,0x00,0xa2,0xa0,0x04,0x00,0x83,0x8c,0x00,0x00,0x00,0x00, -0x25,0x18,0x67,0x00,0x00,0x00,0x62,0x90,0x08,0x00,0xe0,0x03,0x01,0x00,0x02,0x24, -0xe0,0xff,0xbd,0x27,0x14,0x00,0xb1,0xaf,0x02,0x80,0x11,0x3c,0x1c,0x00,0xbf,0xaf, -0x18,0x00,0xb2,0xaf,0x10,0x00,0xb0,0xaf,0x68,0x15,0x31,0x26,0xe4,0x64,0x30,0x96, -0x02,0x80,0x02,0x3c,0x01,0x80,0x03,0x3c,0x25,0x80,0x02,0x02,0x25,0xb0,0x02,0x3c, -0x38,0x06,0x63,0x24,0x18,0x03,0x42,0x34,0x60,0x00,0x04,0x26,0x80,0x00,0x05,0x26, -0x00,0x00,0x43,0xac,0xab,0x45,0x00,0x0c,0x03,0x00,0x06,0x24,0x21,0x20,0x00,0x02, -0x21,0x28,0x00,0x00,0x97,0x45,0x00,0x0c,0x08,0x00,0x06,0x24,0xe4,0x64,0x22,0x8e, -0x0c,0x00,0x03,0x24,0x0c,0x00,0x43,0xae,0x08,0x00,0x42,0xae,0x12,0x00,0x02,0x24, -0x14,0x00,0x42,0xae,0x21,0x20,0x40,0x02,0x1c,0x00,0xbf,0x8f,0x18,0x00,0xb2,0x8f, -0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f,0x8b,0x07,0x00,0x08,0x20,0x00,0xbd,0x27, -0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00, -0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00, -0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00, -0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00, -0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00, -0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00, -0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00, -0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00, -0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03,0x01,0x00,0x02,0x24, -0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03,0x01,0x00,0x02,0x24, -0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00, -0x08,0x00,0xe0,0x03,0x01,0x00,0x02,0x24,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00, -0x08,0x00,0xe0,0x03,0x01,0x00,0x02,0x24,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00, -0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x01,0x00,0x02,0x24, -0x08,0x00,0xe0,0x03,0x01,0x00,0x02,0x24,0x02,0x80,0x02,0x3c,0x21,0x48,0x80,0x00, -0x68,0x15,0x48,0x24,0x21,0x38,0x00,0x00,0x21,0x28,0x27,0x01,0x00,0x00,0xa2,0x90, -0x21,0x20,0xe8,0x00,0x01,0x00,0xe7,0x24,0x38,0x4c,0x82,0xa0,0x1e,0x00,0xa3,0x90, -0x1e,0x00,0xe6,0x28,0x56,0x4c,0x83,0xa0,0x3c,0x00,0xa2,0x90,0x00,0x00,0x00,0x00, -0x74,0x4c,0x82,0xa0,0x5a,0x00,0xa3,0x90,0xf3,0xff,0xc0,0x14,0x92,0x4c,0x83,0xa0, -0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03,0x01,0x00,0x02,0x24, -0x20,0xbd,0x03,0x3c,0x58,0x00,0x63,0x34,0x00,0x00,0x62,0x90,0x0f,0x27,0x07,0x24, -0x20,0x00,0x42,0x34,0x00,0x00,0x62,0xa0,0xff,0xff,0xe7,0x24,0xff,0xff,0xe1,0x04, -0xff,0xff,0xe7,0x24,0x62,0xbd,0x04,0x3c,0x24,0x10,0x82,0x34,0x00,0x00,0x40,0xa0, -0x28,0x10,0x83,0x34,0x0c,0x11,0x86,0x34,0x0e,0x00,0x02,0x24,0x00,0x00,0x60,0xa0, -0x00,0x11,0x85,0x34,0x00,0x00,0xc2,0xa0,0x00,0x00,0xa7,0x8c,0xdf,0xff,0x02,0x24, -0x10,0x00,0x86,0x34,0x24,0x38,0xe2,0x00,0x49,0x0c,0x03,0x24,0xcf,0xff,0x02,0x24, -0x00,0x00,0xc3,0xac,0x04,0x00,0x84,0x34,0x00,0x00,0xa7,0xac,0x24,0x38,0xe2,0x00, -0x41,0x0c,0x02,0x24,0x00,0x00,0xa7,0xac,0x00,0x00,0x80,0xac,0x00,0x00,0xc2,0xac, -0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0xd0,0xff,0xbd,0x27,0x25,0xb0,0x03,0x3c, -0x01,0x80,0x02,0x3c,0xb0,0x03,0x68,0x34,0x1c,0x00,0xb1,0xaf,0x18,0x03,0x63,0x34, -0xd8,0xff,0x91,0x24,0xa0,0x08,0x42,0x24,0x00,0x00,0x62,0xac,0x28,0x00,0xbf,0xaf, -0x00,0x00,0x11,0xad,0x24,0x00,0xb3,0xaf,0x20,0x00,0xb2,0xaf,0x18,0x00,0xb0,0xaf, -0x02,0x80,0x13,0x3c,0x00,0x00,0x23,0x96,0x68,0x15,0x73,0x26,0xff,0xff,0x32,0x32, -0x40,0x10,0x02,0x3c,0x78,0x64,0x65,0x8e,0x25,0x90,0x42,0x02,0x02,0x80,0x10,0x3c, -0x8c,0x96,0x10,0x26,0x20,0x00,0x42,0x26,0x00,0x00,0x03,0xad,0x20,0x00,0x06,0x24, -0x00,0x00,0x02,0xad,0x21,0x38,0x00,0x02,0x0c,0x00,0x03,0xae,0x0a,0x00,0x04,0x24, -0x64,0x01,0x00,0x0c,0x08,0x00,0x02,0xae,0x04,0x00,0x23,0x8e,0xff,0xe0,0x02,0x24, -0x28,0x00,0x04,0x24,0x24,0x18,0x62,0x00,0x00,0x10,0x63,0x34,0x02,0x00,0x24,0xa2, -0x04,0x00,0x23,0xae,0x0c,0x00,0x02,0x8e,0x0a,0x00,0x04,0x24,0xf8,0xff,0x42,0x24, -0x4d,0x01,0x00,0x0c,0x00,0x00,0x22,0xa6,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34, -0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40,0x0c,0x00,0x07,0x8e,0x20,0x10,0x06,0x3c, -0x21,0x28,0x40,0x02,0x20,0x00,0xe7,0x24,0x00,0xfe,0xc6,0x34,0xff,0xff,0xe7,0x30, -0x01,0x00,0x11,0x24,0x0a,0x00,0x04,0x24,0x10,0x01,0x00,0x0c,0x10,0x00,0xb1,0xaf, -0xd5,0x4a,0x63,0x92,0x2a,0xb0,0x10,0x3c,0x32,0x00,0x02,0x36,0x01,0x00,0x63,0x24, -0x00,0x00,0x43,0xa0,0x4d,0x01,0x00,0x0c,0x0a,0x00,0x04,0x24,0xc9,0x64,0x62,0x92, -0x00,0x00,0x00,0x00,0x01,0x00,0x42,0x24,0xc9,0x64,0x62,0xa2,0x00,0x60,0x01,0x40, -0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40,0x01,0x00,0x10,0x36,0x00,0x00,0x11,0xa2, -0x28,0x00,0xbf,0x8f,0x24,0x00,0xb3,0x8f,0x20,0x00,0xb2,0x8f,0x1c,0x00,0xb1,0x8f, -0x18,0x00,0xb0,0x8f,0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03,0x30,0x00,0xbd,0x27, -0x25,0xb0,0x05,0x3c,0x01,0x80,0x03,0x3c,0x21,0x38,0x80,0x00,0x18,0x03,0xa2,0x34, -0xe8,0x09,0x63,0x24,0x01,0x00,0x04,0x24,0x00,0x00,0x43,0xac,0x35,0x00,0xe4,0x10, -0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x10,0x20,0x08,0xa2,0x34,0x02,0x00,0x02,0x24, -0x83,0x00,0xe2,0x10,0x03,0x00,0x02,0x24,0x5a,0x00,0xe2,0x10,0x00,0x00,0x00,0x00, -0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x02,0x80,0x03,0x3c,0x00,0x00,0x44,0x8c, -0x68,0x15,0x66,0x24,0x70,0x08,0x02,0x24,0xe0,0x08,0x03,0x24,0x74,0x4b,0xc2,0xac, -0x40,0x08,0x02,0x24,0x78,0x4b,0xc3,0xac,0x84,0x4b,0xc2,0xac,0x78,0x08,0x03,0x24, -0x0c,0x08,0x02,0x24,0x88,0x4b,0xc3,0xac,0x8c,0x4b,0xc2,0xac,0x10,0x08,0x03,0x24, -0x20,0x08,0x02,0x24,0x90,0x4b,0xc3,0xac,0x94,0x4b,0xc2,0xac,0x24,0x08,0x03,0x24, -0x58,0x08,0x02,0x24,0x98,0x4b,0xc3,0xac,0x9c,0x4b,0xc2,0xac,0x50,0x0c,0x03,0x24, -0x54,0x0c,0x02,0x24,0xa0,0x4b,0xc3,0xac,0xa4,0x4b,0xc2,0xac,0x14,0x0c,0x03,0x24, -0x10,0x0c,0x02,0x24,0x60,0x08,0x05,0x24,0xa8,0x4b,0xc3,0xac,0xac,0x4b,0xc2,0xac, -0x80,0x0c,0x03,0x24,0x84,0x0c,0x02,0x24,0x00,0x01,0x84,0x30,0xb4,0x4b,0xc2,0xac, -0x80,0x4b,0xc5,0xac,0xb0,0x4b,0xc3,0xac,0x71,0x4b,0xc0,0xa0,0x7c,0x4b,0xc5,0xac, -0x02,0x00,0x80,0x10,0xa0,0x08,0x02,0x24,0xb8,0x08,0x02,0x24,0x08,0x00,0xe0,0x03, -0xb8,0x4b,0xc2,0xac,0x28,0x08,0xa2,0x34,0x02,0x80,0x03,0x3c,0x00,0x00,0x44,0x8c, -0x68,0x15,0x66,0x24,0x70,0x08,0x02,0x24,0xe0,0x08,0x03,0x24,0x74,0x4b,0xc2,0xac, -0x44,0x08,0x02,0x24,0x78,0x4b,0xc3,0xac,0x84,0x4b,0xc2,0xac,0x78,0x08,0x03,0x24, -0x0c,0x08,0x02,0x24,0x88,0x4b,0xc3,0xac,0x8c,0x4b,0xc2,0xac,0x14,0x08,0x03,0x24, -0x28,0x08,0x02,0x24,0x90,0x4b,0xc3,0xac,0x94,0x4b,0xc2,0xac,0x2c,0x08,0x03,0x24, -0x58,0x08,0x02,0x24,0x98,0x4b,0xc3,0xac,0x9c,0x4b,0xc2,0xac,0x58,0x0c,0x03,0x24, -0x5c,0x0c,0x02,0x24,0xa0,0x4b,0xc3,0xac,0xa4,0x4b,0xc2,0xac,0x1c,0x0c,0x03,0x24, -0x18,0x0c,0x02,0x24,0x64,0x08,0x05,0x24,0xa8,0x4b,0xc3,0xac,0xac,0x4b,0xc2,0xac, -0x88,0x0c,0x03,0x24,0x8c,0x0c,0x02,0x24,0x00,0x01,0x84,0x30,0xb4,0x4b,0xc2,0xac, -0x71,0x4b,0xc7,0xa0,0x80,0x4b,0xc5,0xac,0xb0,0x4b,0xc3,0xac,0x7c,0x4b,0xc5,0xac, -0xd6,0xff,0x80,0x10,0xa4,0x08,0x02,0x24,0xbc,0x08,0x02,0x24,0x08,0x00,0xe0,0x03, -0xb8,0x4b,0xc2,0xac,0x02,0x80,0x02,0x3c,0x68,0x15,0x42,0x24,0xac,0x08,0x03,0x24, -0xb8,0x4b,0x43,0xac,0x74,0x08,0x03,0x24,0xe4,0x08,0x04,0x24,0x74,0x4b,0x43,0xac, -0x4c,0x08,0x03,0x24,0x78,0x4b,0x44,0xac,0x84,0x4b,0x43,0xac,0x7c,0x08,0x04,0x24, -0x0c,0x08,0x03,0x24,0x88,0x4b,0x44,0xac,0x8c,0x4b,0x43,0xac,0x1c,0x08,0x04,0x24, -0x38,0x08,0x03,0x24,0x90,0x4b,0x44,0xac,0x94,0x4b,0x43,0xac,0x3c,0x08,0x04,0x24, -0x5c,0x08,0x03,0x24,0x98,0x4b,0x44,0xac,0x9c,0x4b,0x43,0xac,0x68,0x0c,0x04,0x24, -0x6c,0x0c,0x03,0x24,0xa0,0x4b,0x44,0xac,0xa4,0x4b,0x43,0xac,0x2c,0x0c,0x04,0x24, -0x28,0x0c,0x03,0x24,0x6c,0x08,0x05,0x24,0xa8,0x4b,0x44,0xac,0xac,0x4b,0x43,0xac, -0x98,0x0c,0x04,0x24,0x9c,0x0c,0x03,0x24,0x71,0x4b,0x47,0xa0,0x80,0x4b,0x45,0xac, -0xb0,0x4b,0x44,0xac,0xb4,0x4b,0x43,0xac,0x08,0x00,0xe0,0x03,0x7c,0x4b,0x45,0xac, -0x02,0x80,0x02,0x3c,0x68,0x15,0x42,0x24,0xa8,0x08,0x03,0x24,0xb8,0x4b,0x43,0xac, -0x74,0x08,0x03,0x24,0xe4,0x08,0x04,0x24,0x74,0x4b,0x43,0xac,0x48,0x08,0x03,0x24, -0x78,0x4b,0x44,0xac,0x84,0x4b,0x43,0xac,0x7c,0x08,0x04,0x24,0x0c,0x08,0x03,0x24, -0x88,0x4b,0x44,0xac,0x8c,0x4b,0x43,0xac,0x18,0x08,0x04,0x24,0x30,0x08,0x03,0x24, -0x90,0x4b,0x44,0xac,0x94,0x4b,0x43,0xac,0x34,0x08,0x04,0x24,0x5c,0x08,0x03,0x24, -0x98,0x4b,0x44,0xac,0x9c,0x4b,0x43,0xac,0x60,0x0c,0x04,0x24,0x64,0x0c,0x03,0x24, -0xa0,0x4b,0x44,0xac,0xa4,0x4b,0x43,0xac,0x24,0x0c,0x04,0x24,0x20,0x0c,0x03,0x24, -0x68,0x08,0x05,0x24,0xa8,0x4b,0x44,0xac,0xac,0x4b,0x43,0xac,0x90,0x0c,0x04,0x24, -0x94,0x0c,0x03,0x24,0x71,0x4b,0x47,0xa0,0x80,0x4b,0x45,0xac,0xb0,0x4b,0x44,0xac, -0xb4,0x4b,0x43,0xac,0x08,0x00,0xe0,0x03,0x7c,0x4b,0x45,0xac,0x36,0x43,0x00,0x08, -0x21,0x18,0x00,0x00,0x20,0x00,0x62,0x2c,0x06,0x00,0x40,0x10,0x00,0x00,0x00,0x00, -0x06,0x10,0x64,0x00,0x01,0x00,0x42,0x30,0xfa,0xff,0x40,0x10,0x01,0x00,0x63,0x24, -0xff,0xff,0x63,0x24,0x08,0x00,0xe0,0x03,0x21,0x10,0x60,0x00,0xd8,0xff,0xbd,0x27, -0x25,0xb0,0x02,0x3c,0x18,0x00,0xb2,0xaf,0x21,0x90,0x82,0x00,0xff,0xff,0x02,0x24, -0x1c,0x00,0xb3,0xaf,0x14,0x00,0xb1,0xaf,0x20,0x00,0xbf,0xaf,0x10,0x00,0xb0,0xaf, -0x21,0x88,0xa0,0x00,0x21,0x20,0xa0,0x00,0x21,0x18,0x40,0x02,0x10,0x00,0xa2,0x10, -0x21,0x98,0xc0,0x00,0x00,0x00,0x50,0x8e,0x31,0x43,0x00,0x0c,0x00,0x00,0x00,0x00, -0x04,0x10,0x53,0x00,0x27,0x18,0x11,0x00,0x25,0x18,0x62,0x00,0x24,0x18,0x70,0x00, -0x00,0x00,0x43,0xae,0x20,0x00,0xbf,0x8f,0x1c,0x00,0xb3,0x8f,0x18,0x00,0xb2,0x8f, -0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03,0x28,0x00,0xbd,0x27, -0x20,0x00,0xbf,0x8f,0x1c,0x00,0xb3,0x8f,0x18,0x00,0xb2,0x8f,0x14,0x00,0xb1,0x8f, -0x10,0x00,0xb0,0x8f,0x28,0x00,0xbd,0x27,0x00,0x00,0x66,0xac,0x08,0x00,0xe0,0x03, -0x00,0x00,0x00,0x00,0x02,0x80,0x02,0x3c,0x21,0x30,0x80,0x00,0xec,0x60,0x44,0x8c, -0x3d,0x43,0x00,0x08,0xff,0xff,0x05,0x24,0xe0,0xff,0xbd,0x27,0x25,0xb0,0x02,0x3c, -0x18,0x00,0xbf,0xaf,0x14,0x00,0xb1,0xaf,0x10,0x00,0xb0,0xaf,0x21,0x20,0x82,0x00, -0x00,0x00,0x90,0x8c,0x21,0x88,0xa0,0x00,0x31,0x43,0x00,0x0c,0x21,0x20,0xa0,0x00, -0x24,0x80,0x11,0x02,0x06,0x10,0x50,0x00,0x18,0x00,0xbf,0x8f,0x14,0x00,0xb1,0x8f, -0x10,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03,0x20,0x00,0xbd,0x27,0xd0,0xff,0xbd,0x27, -0x14,0x00,0xb1,0xaf,0x02,0x80,0x11,0x3c,0x28,0x00,0xbf,0xaf,0x20,0x00,0xb4,0xaf, -0x1c,0x00,0xb3,0xaf,0x18,0x00,0xb2,0xaf,0x24,0x00,0xb5,0xaf,0x10,0x00,0xb0,0xaf, -0x68,0x15,0x31,0x26,0x98,0x4b,0x22,0x8e,0x25,0xb0,0x12,0x3c,0x24,0x08,0x53,0x36, -0x21,0x10,0x52,0x00,0x00,0x00,0x70,0x8e,0x00,0x00,0x55,0x8c,0x7f,0x80,0x03,0x3c, -0xff,0x7f,0x02,0x3c,0xff,0xff,0x63,0x34,0xff,0xff,0x42,0x34,0x24,0x10,0x02,0x02, -0x24,0x18,0xa3,0x02,0xc0,0x25,0x04,0x00,0x25,0x18,0x64,0x00,0x00,0x80,0x14,0x3c, -0x00,0x00,0x62,0xae,0x01,0x00,0x04,0x24,0x84,0x0a,0x00,0x0c,0x25,0xa8,0x74,0x00, -0x98,0x4b,0x22,0x8e,0x25,0x80,0x14,0x02,0x01,0x00,0x04,0x24,0x21,0x10,0x52,0x00, -0x00,0x00,0x55,0xac,0x84,0x0a,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0xae, -0x84,0x0a,0x00,0x0c,0x01,0x00,0x04,0x24,0xb8,0x4b,0x24,0x8e,0x0f,0x00,0x05,0x3c, -0x28,0x00,0xbf,0x8f,0x24,0x00,0xb5,0x8f,0x20,0x00,0xb4,0x8f,0x1c,0x00,0xb3,0x8f, -0x18,0x00,0xb2,0x8f,0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f,0xff,0xff,0xa5,0x34, -0x68,0x43,0x00,0x08,0x30,0x00,0xbd,0x27,0xe0,0xff,0xbd,0x27,0x14,0x00,0xb1,0xaf, -0x02,0x80,0x11,0x3c,0x10,0x00,0xb0,0xaf,0x18,0x00,0xbf,0xaf,0x68,0x15,0x27,0x26, -0x73,0x4b,0xe5,0x90,0x01,0x80,0x03,0x3c,0x25,0xb0,0x02,0x3c,0xb0,0x0e,0x63,0x24, -0x18,0x03,0x42,0x34,0x02,0x00,0x06,0x24,0x00,0x00,0x43,0xac,0x34,0x00,0xa6,0x10, -0x21,0x80,0x80,0x00,0x03,0x00,0x03,0x24,0x3a,0x00,0xa3,0x10,0x2e,0x00,0x02,0x2e, -0x10,0x00,0x02,0x2e,0x07,0x00,0x40,0x10,0x00,0x00,0x00,0x00,0xff,0x00,0x04,0x32, -0x18,0x00,0xbf,0x8f,0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f,0x79,0x43,0x00,0x08, -0x20,0x00,0xbd,0x27,0xfa,0xff,0xa6,0x14,0xff,0x00,0x04,0x32,0x71,0x4b,0xe4,0x90, -0x01,0x00,0x02,0x24,0x33,0x00,0x82,0x10,0x02,0x00,0x82,0x28,0x38,0x00,0x40,0x14, -0x00,0x00,0x00,0x00,0x38,0x00,0x85,0x10,0x68,0x15,0x22,0x26,0x2e,0x00,0x83,0x10, -0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x24,0x68,0x43,0x00,0x0c,0xff,0xff,0x05,0x24, -0xff,0xfc,0x06,0x3c,0xff,0xff,0xc6,0x34,0x24,0x30,0x46,0x00,0x00,0x08,0x04,0x24, -0x3d,0x43,0x00,0x0c,0xff,0xff,0x05,0x24,0x68,0x15,0x22,0x26,0x71,0x4b,0x44,0x90, -0x01,0x00,0x03,0x24,0x07,0x00,0x83,0x10,0x02,0x00,0x82,0x28,0x2c,0x00,0x40,0x14, -0x02,0x00,0x02,0x24,0x2c,0x00,0x82,0x10,0x03,0x00,0x02,0x24,0xdb,0xff,0x82,0x14, -0x00,0x00,0x00,0x00,0x68,0x15,0x22,0x26,0x74,0x4b,0x44,0x8c,0x0f,0x00,0x05,0x3c, -0x3d,0x43,0x00,0x0c,0x21,0x30,0x00,0x00,0xc2,0x43,0x00,0x08,0xff,0x00,0x04,0x32, -0x25,0x00,0x82,0x2c,0xcc,0xff,0x40,0x14,0x03,0x00,0x03,0x24,0x18,0x00,0xbf,0x8f, -0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f,0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03, -0x20,0x00,0xbd,0x27,0xc7,0xff,0x40,0x14,0x10,0x00,0x02,0x2e,0x18,0x00,0xbf,0x8f, -0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f,0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03, -0x20,0x00,0xbd,0x27,0x68,0x15,0x22,0x26,0x74,0x4b,0x44,0x8c,0x0f,0x00,0x05,0x3c, -0x3d,0x43,0x00,0x0c,0x0f,0x00,0x06,0x24,0xd4,0x43,0x00,0x08,0x00,0x08,0x04,0x24, -0xcc,0xff,0x80,0x14,0x68,0x15,0x22,0x26,0x74,0x4b,0x44,0x8c,0x0f,0x00,0x05,0x24, -0x3d,0x43,0x00,0x0c,0x0f,0x00,0x06,0x24,0xd4,0x43,0x00,0x08,0x00,0x08,0x04,0x24, -0xb2,0xff,0x80,0x14,0x00,0x00,0x00,0x00,0x68,0x15,0x22,0x26,0x74,0x4b,0x44,0x8c, -0x0f,0x00,0x05,0x24,0x3d,0x43,0x00,0x0c,0x21,0x30,0x00,0x00,0xc2,0x43,0x00,0x08, -0xff,0x00,0x04,0x32,0xe0,0xff,0xbd,0x27,0x14,0x00,0xb1,0xaf,0x02,0x80,0x11,0x3c, -0x68,0x15,0x28,0x26,0x73,0x4b,0x06,0x91,0x01,0x80,0x03,0x3c,0x25,0xb0,0x02,0x3c, -0x5c,0x10,0x63,0x24,0x18,0x03,0x42,0x34,0x02,0x00,0x07,0x24,0x18,0x00,0xb2,0xaf, -0x10,0x00,0xb0,0xaf,0x1c,0x00,0xbf,0xaf,0x00,0x00,0x43,0xac,0x21,0x90,0xa0,0x00, -0x39,0x00,0xc7,0x10,0xff,0x00,0x90,0x30,0x03,0x00,0x03,0x24,0x3f,0x00,0xc3,0x10, -0x2e,0x00,0x02,0x2e,0x10,0x00,0x02,0x2e,0x0c,0x00,0x40,0x10,0x00,0x00,0x00,0x00, -0x0f,0x00,0x04,0x3c,0xff,0xff,0x84,0x34,0x24,0x20,0x44,0x02,0x00,0x15,0x10,0x00, -0x1c,0x00,0xbf,0x8f,0x18,0x00,0xb2,0x8f,0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f, -0x25,0x20,0x44,0x00,0x63,0x43,0x00,0x08,0x20,0x00,0xbd,0x27,0xf5,0xff,0xc7,0x14, -0x0f,0x00,0x04,0x3c,0x71,0x4b,0x04,0x91,0x01,0x00,0x02,0x24,0x33,0x00,0x82,0x10, -0x02,0x00,0x82,0x28,0x38,0x00,0x40,0x14,0x00,0x00,0x00,0x00,0x38,0x00,0x86,0x10, -0x68,0x15,0x22,0x26,0x2e,0x00,0x83,0x10,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x24, -0x68,0x43,0x00,0x0c,0xff,0xff,0x05,0x24,0xff,0xfc,0x06,0x3c,0xff,0xff,0xc6,0x34, -0x24,0x30,0x46,0x00,0x00,0x08,0x04,0x24,0x3d,0x43,0x00,0x0c,0xff,0xff,0x05,0x24, -0x68,0x15,0x22,0x26,0x71,0x4b,0x44,0x90,0x01,0x00,0x03,0x24,0x07,0x00,0x83,0x10, -0x02,0x00,0x82,0x28,0x2c,0x00,0x40,0x14,0x02,0x00,0x02,0x24,0x2c,0x00,0x82,0x10, -0x03,0x00,0x02,0x24,0xd6,0xff,0x82,0x14,0x00,0x00,0x00,0x00,0x68,0x15,0x22,0x26, -0x74,0x4b,0x44,0x8c,0x0f,0x00,0x05,0x3c,0x3d,0x43,0x00,0x0c,0x21,0x30,0x00,0x00, -0x2f,0x44,0x00,0x08,0x0f,0x00,0x04,0x3c,0x25,0x00,0x02,0x2e,0xc7,0xff,0x40,0x14, -0x03,0x00,0x03,0x24,0x1c,0x00,0xbf,0x8f,0x18,0x00,0xb2,0x8f,0x14,0x00,0xb1,0x8f, -0x10,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03,0x20,0x00,0xbd,0x27,0xc1,0xff,0x40,0x14, -0x00,0x00,0x00,0x00,0x1c,0x00,0xbf,0x8f,0x18,0x00,0xb2,0x8f,0x14,0x00,0xb1,0x8f, -0x10,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03,0x20,0x00,0xbd,0x27,0x68,0x15,0x22,0x26, -0x74,0x4b,0x44,0x8c,0x0f,0x00,0x05,0x3c,0x3d,0x43,0x00,0x0c,0x0f,0x00,0x06,0x24, -0x46,0x44,0x00,0x08,0x00,0x08,0x04,0x24,0xcc,0xff,0x80,0x14,0x68,0x15,0x22,0x26, -0x74,0x4b,0x44,0x8c,0x0f,0x00,0x05,0x24,0x3d,0x43,0x00,0x0c,0x0f,0x00,0x06,0x24, -0x46,0x44,0x00,0x08,0x00,0x08,0x04,0x24,0xad,0xff,0x80,0x14,0x00,0x00,0x00,0x00, -0x68,0x15,0x22,0x26,0x74,0x4b,0x44,0x8c,0x0f,0x00,0x05,0x24,0x3d,0x43,0x00,0x0c, -0x21,0x30,0x00,0x00,0x2f,0x44,0x00,0x08,0x0f,0x00,0x04,0x3c,0xe8,0xff,0xbd,0x27, -0x10,0x00,0xb0,0xaf,0x21,0x80,0x80,0x00,0x14,0x00,0xbf,0xaf,0x79,0x43,0x00,0x0c, -0x21,0x20,0x00,0x00,0x40,0x01,0x44,0x34,0x21,0x18,0x40,0x00,0x1f,0x00,0x02,0x2e, -0x00,0x23,0x04,0x00,0x10,0x00,0x40,0x10,0x10,0x00,0x05,0x2e,0x00,0x01,0x64,0x34, -0x06,0x00,0xa0,0x10,0x00,0x23,0x04,0x00,0x21,0x10,0x00,0x02,0x14,0x00,0xbf,0x8f, -0x10,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03,0x18,0x00,0xbd,0x27,0x63,0x43,0x00,0x0c, -0xf1,0xff,0x10,0x26,0x21,0x10,0x00,0x02,0x14,0x00,0xbf,0x8f,0x10,0x00,0xb0,0x8f, -0x08,0x00,0xe0,0x03,0x18,0x00,0xbd,0x27,0x63,0x43,0x00,0x0c,0xe2,0xff,0x10,0x26, -0x21,0x10,0x00,0x02,0x14,0x00,0xbf,0x8f,0x10,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03, -0x18,0x00,0xbd,0x27,0x25,0xb0,0x02,0x3c,0x27,0x38,0x05,0x00,0x21,0x40,0x82,0x00, -0xff,0xff,0x02,0x24,0x07,0x00,0xa2,0x10,0x25,0x38,0xe6,0x00,0x00,0x00,0x02,0x8d, -0x00,0x00,0x00,0x00,0x24,0x10,0xe2,0x00,0x00,0x00,0x02,0xad,0x08,0x00,0xe0,0x03, -0x00,0x00,0x00,0x00,0x00,0x00,0x06,0xad,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0x01,0x80,0x02,0x3c,0x25,0xb0,0x03,0x3c,0xe8,0x12,0x42,0x24,0x18,0x03,0x63,0x34, -0xd8,0xff,0xbd,0x27,0x00,0x00,0x62,0xac,0x0f,0x00,0x02,0x3c,0x14,0x00,0xb1,0xaf, -0xff,0xff,0x42,0x34,0x21,0x88,0xa0,0x00,0x1c,0x00,0xb3,0xaf,0x18,0x00,0xb2,0xaf, -0x20,0x00,0xbf,0xaf,0x10,0x00,0xb0,0xaf,0x21,0x90,0xc0,0x00,0x21,0x28,0xc0,0x00, -0x0a,0x00,0x22,0x12,0x21,0x98,0x80,0x00,0xac,0x43,0x00,0x0c,0x00,0x00,0x00,0x00, -0x21,0x20,0x20,0x02,0x31,0x43,0x00,0x0c,0x21,0x80,0x40,0x00,0x04,0x10,0x52,0x00, -0x27,0x28,0x11,0x00,0x25,0x28,0xa2,0x00,0x24,0x28,0xb0,0x00,0xff,0x00,0x64,0x32, -0x20,0x00,0xbf,0x8f,0x1c,0x00,0xb3,0x8f,0x18,0x00,0xb2,0x8f,0x14,0x00,0xb1,0x8f, -0x10,0x00,0xb0,0x8f,0x17,0x44,0x00,0x08,0x28,0x00,0xbd,0x27,0x01,0x80,0x03,0x3c, -0x25,0xb0,0x02,0x3c,0x74,0x13,0x63,0x24,0x18,0x03,0x42,0x34,0xe0,0xff,0xbd,0x27, -0x00,0x00,0x43,0xac,0x18,0x00,0xbf,0xaf,0x14,0x00,0xb1,0xaf,0x10,0x00,0xb0,0xaf, -0xac,0x43,0x00,0x0c,0x21,0x88,0xa0,0x00,0x21,0x80,0x40,0x00,0x31,0x43,0x00,0x0c, -0x21,0x20,0x20,0x02,0x24,0x80,0x11,0x02,0x06,0x10,0x50,0x00,0x18,0x00,0xbf,0x8f, -0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03,0x20,0x00,0xbd,0x27, -0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00, -0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00, -0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00, -0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00, -0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x01,0x00,0x02,0x24, -0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00, -0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00, -0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0xc8,0xff,0xbd,0x27,0x2c,0x00,0xb1,0xaf,0xff,0xff,0x05,0x24,0x21,0x88,0x80,0x00, -0x02,0x00,0x06,0x24,0x10,0x00,0xa4,0x27,0x34,0x00,0xbf,0xaf,0x30,0x00,0xb2,0xaf, -0x97,0x45,0x00,0x0c,0x28,0x00,0xb0,0xaf,0x08,0x00,0x30,0x96,0x02,0x80,0x02,0x3c, -0x21,0x28,0x00,0x00,0x25,0x80,0x02,0x02,0x21,0x20,0x00,0x02,0x97,0x45,0x00,0x0c, -0x10,0x00,0x06,0x24,0x20,0x00,0x02,0x96,0x24,0x00,0x04,0x26,0x10,0x00,0xa5,0x27, -0x03,0xff,0x42,0x30,0xc8,0x00,0x42,0x34,0x20,0x00,0x02,0xa6,0x9f,0x45,0x00,0x0c, -0x06,0x00,0x06,0x24,0x25,0xb0,0x03,0x3c,0x50,0x00,0x62,0x34,0x00,0x00,0x44,0x8c, -0x54,0x00,0x65,0x34,0x58,0x00,0x66,0x34,0x18,0x00,0xa4,0xaf,0x00,0x00,0xa2,0x8c, -0x5c,0x00,0x63,0x34,0x2a,0x00,0x04,0x26,0x1c,0x00,0xa2,0xaf,0x00,0x00,0xc7,0x8c, -0x18,0x00,0xa5,0x27,0x06,0x00,0x06,0x24,0x20,0x00,0xa7,0xaf,0x00,0x00,0x62,0x8c, -0x1a,0x00,0x12,0x24,0x9f,0x45,0x00,0x0c,0x24,0x00,0xa2,0xaf,0x30,0x00,0x04,0x26, -0x20,0x00,0xa5,0x27,0x9f,0x45,0x00,0x0c,0x06,0x00,0x06,0x24,0x13,0x00,0x03,0x24, -0x14,0x00,0x23,0xae,0x0c,0x00,0x32,0xae,0x08,0x00,0x05,0x8e,0x04,0x00,0x04,0x8e, -0xff,0xdf,0x02,0x3c,0x14,0x00,0x06,0x8e,0xff,0xff,0x42,0x34,0x10,0x00,0x07,0x8e, -0xff,0xe0,0x03,0x24,0x24,0x28,0xa2,0x00,0x00,0x40,0x02,0x3c,0x24,0x20,0x83,0x00, -0x25,0x28,0xa2,0x00,0xff,0x81,0x03,0x24,0xfe,0xff,0x02,0x3c,0x24,0x30,0xc3,0x00, -0xff,0xff,0x42,0x34,0x00,0x12,0x84,0x34,0x00,0x80,0x03,0x3c,0x24,0x20,0x82,0x00, -0x25,0x38,0xe3,0x00,0x00,0x26,0xc6,0x34,0x80,0x00,0xa5,0x34,0x20,0x00,0x02,0x24, -0x00,0x00,0x12,0xa6,0x10,0x00,0x07,0xae,0x02,0x00,0x02,0xa2,0x14,0x00,0x06,0xae, -0x04,0x00,0x04,0xae,0x08,0x00,0x05,0xae,0x34,0x00,0xbf,0x8f,0x30,0x00,0xb2,0x8f, -0x2c,0x00,0xb1,0x8f,0x28,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03,0x38,0x00,0xbd,0x27, -0x93,0x45,0x00,0x08,0xff,0x00,0xa5,0x30,0x00,0x00,0x85,0xa0,0xff,0xff,0xc6,0x24, -0x01,0x00,0x84,0x24,0xfc,0xff,0xc0,0x14,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03, -0x00,0x00,0x00,0x00,0x05,0x00,0xc0,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x85,0xac, -0xff,0xff,0xc6,0x24,0xfd,0xff,0xc0,0x14,0x04,0x00,0x84,0x24,0x08,0x00,0xe0,0x03, -0x00,0x00,0x00,0x00,0x21,0x38,0x80,0x00,0x08,0x00,0xc0,0x10,0xff,0xff,0xc3,0x24, -0xff,0xff,0x06,0x24,0x00,0x00,0xa2,0x90,0xff,0xff,0x63,0x24,0x01,0x00,0xa5,0x24, -0x00,0x00,0xe2,0xa0,0xfb,0xff,0x66,0x14,0x01,0x00,0xe7,0x24,0x08,0x00,0xe0,0x03, -0x21,0x10,0x80,0x00,0x21,0x38,0x80,0x00,0x08,0x00,0xc0,0x10,0xff,0xff,0xc3,0x24, -0xff,0xff,0x06,0x24,0x00,0x00,0xa2,0x8c,0xff,0xff,0x63,0x24,0x04,0x00,0xa5,0x24, -0x00,0x00,0xe2,0xac,0xfb,0xff,0x66,0x14,0x04,0x00,0xe7,0x24,0x08,0x00,0xe0,0x03, -0x21,0x10,0x80,0x00,0x2b,0x10,0xa4,0x00,0x0d,0x00,0x40,0x14,0xff,0xff,0x02,0x24, -0xff,0xff,0xc6,0x24,0x08,0x00,0xc2,0x10,0x21,0x18,0x80,0x00,0xff,0xff,0x07,0x24, -0x00,0x00,0xa2,0x90,0xff,0xff,0xc6,0x24,0x01,0x00,0xa5,0x24,0x00,0x00,0x62,0xa0, -0xfb,0xff,0xc7,0x14,0x01,0x00,0x63,0x24,0x08,0x00,0xe0,0x03,0x21,0x10,0x80,0x00, -0x21,0x28,0xa6,0x00,0x21,0x18,0x86,0x00,0xff,0xff,0xc6,0x24,0xfa,0xff,0xc2,0x10, -0x00,0x00,0x00,0x00,0xff,0xff,0x07,0x24,0xff,0xff,0xa5,0x24,0x00,0x00,0xa2,0x90, -0xff,0xff,0x63,0x24,0xff,0xff,0xc6,0x24,0xfb,0xff,0xc7,0x14,0x00,0x00,0x62,0xa0, -0x08,0x00,0xe0,0x03,0x21,0x10,0x80,0x00,0x0c,0x00,0xc0,0x10,0x00,0x00,0x00,0x00, -0x00,0x00,0x82,0x90,0x00,0x00,0xa3,0x90,0x01,0x00,0x84,0x24,0x23,0x10,0x43,0x00, -0x00,0x16,0x02,0x00,0x03,0x16,0x02,0x00,0x04,0x00,0x40,0x14,0x01,0x00,0xa5,0x24, -0xff,0xff,0xc6,0x24,0xf6,0xff,0xc0,0x14,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03, -0x21,0x10,0xc0,0x00,0xea,0x45,0x00,0x08,0x21,0x18,0x86,0x00,0x00,0x00,0x82,0x90, -0x00,0x00,0x00,0x00,0x04,0x00,0x45,0x10,0x00,0x00,0x00,0x00,0x01,0x00,0x84,0x24, -0xfa,0xff,0x83,0x14,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x21,0x10,0x80,0x00, -0x09,0x00,0xc0,0x10,0xff,0xff,0xc3,0x24,0xff,0x00,0xa5,0x30,0xff,0xff,0x06,0x24, -0x00,0x00,0x82,0x90,0xff,0xff,0x63,0x24,0x05,0x00,0x45,0x10,0x01,0x00,0x84,0x24, -0xfb,0xff,0x66,0x14,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00, -0x08,0x00,0xe0,0x03,0xff,0xff,0x82,0x24,0x21,0x38,0x00,0x00,0x1f,0x00,0xc0,0x10, -0x21,0x18,0x00,0x00,0x02,0x80,0x02,0x3c,0x80,0x95,0x4b,0x24,0x00,0x00,0x87,0x90, -0x00,0x00,0xa3,0x90,0xff,0xff,0xc6,0x24,0x01,0x00,0x84,0x24,0x21,0x10,0xeb,0x00, -0x16,0x00,0xe0,0x10,0x01,0x00,0xa5,0x24,0x14,0x00,0x60,0x10,0x21,0x48,0x6b,0x00, -0x10,0x00,0xe3,0x10,0x20,0x00,0xe8,0x24,0x00,0x00,0x42,0x90,0x00,0x00,0x00,0x00, -0x01,0x00,0x42,0x30,0x02,0x00,0x40,0x10,0x20,0x00,0x6a,0x24,0xff,0x00,0x07,0x31, -0x00,0x00,0x22,0x91,0x00,0x00,0x00,0x00,0x01,0x00,0x42,0x30,0x02,0x00,0x40,0x10, -0xff,0x00,0xe7,0x30,0xff,0x00,0x43,0x31,0xff,0x00,0x63,0x30,0x03,0x00,0xe3,0x14, -0x00,0x00,0x00,0x00,0xe5,0xff,0xc0,0x14,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03, -0x23,0x10,0xe3,0x00,0x21,0x18,0x80,0x00,0x00,0x00,0xa2,0x90,0x01,0x00,0xa5,0x24, -0x00,0x00,0x82,0xa0,0xfc,0xff,0x40,0x14,0x01,0x00,0x84,0x24,0x08,0x00,0xe0,0x03, -0x21,0x10,0x60,0x00,0x21,0x38,0x80,0x00,0xff,0xff,0x03,0x24,0xff,0xff,0xc6,0x24, -0x06,0x00,0xc3,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0xa2,0x90,0x01,0x00,0xa5,0x24, -0x00,0x00,0x82,0xa0,0xf9,0xff,0x40,0x14,0x01,0x00,0x84,0x24,0x08,0x00,0xe0,0x03, -0x21,0x10,0xe0,0x00,0x00,0x00,0x82,0x80,0x39,0x46,0x00,0x08,0x21,0x18,0x80,0x00, -0x01,0x00,0x84,0x24,0x00,0x00,0x82,0x80,0x00,0x00,0x00,0x00,0xfc,0xff,0x40,0x14, -0x00,0x00,0x00,0x00,0x00,0x00,0xa2,0x90,0x01,0x00,0xa5,0x24,0x00,0x00,0x82,0xa0, -0xfc,0xff,0x40,0x14,0x01,0x00,0x84,0x24,0x08,0x00,0xe0,0x03,0x21,0x10,0x60,0x00, -0x12,0x00,0xc0,0x10,0x21,0x18,0x80,0x00,0x00,0x00,0x82,0x80,0x4a,0x46,0x00,0x08, -0x00,0x00,0x00,0x00,0x01,0x00,0x84,0x24,0x00,0x00,0x82,0x80,0x00,0x00,0x00,0x00, -0xfc,0xff,0x40,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0xa2,0x90,0x01,0x00,0xa5,0x24, -0x00,0x00,0x82,0xa0,0x05,0x00,0x40,0x10,0x01,0x00,0x84,0x24,0xff,0xff,0xc6,0x24, -0xf9,0xff,0xc0,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xa0,0x08,0x00,0xe0,0x03, -0x21,0x10,0x60,0x00,0x00,0x00,0x83,0x90,0x00,0x00,0xa2,0x90,0x01,0x00,0x84,0x24, -0x23,0x10,0x62,0x00,0x00,0x16,0x02,0x00,0x03,0x16,0x02,0x00,0x03,0x00,0x40,0x14, -0x01,0x00,0xa5,0x24,0xf7,0xff,0x60,0x14,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03, -0x00,0x00,0x00,0x00,0x21,0x10,0x00,0x00,0x0b,0x00,0xc0,0x10,0x00,0x00,0x00,0x00, -0x00,0x00,0xa2,0x90,0x00,0x00,0x83,0x90,0xff,0xff,0xc6,0x24,0x23,0x10,0x62,0x00, -0x00,0x16,0x02,0x00,0x03,0x16,0x02,0x00,0x03,0x00,0x40,0x14,0x01,0x00,0xa5,0x24, -0xf5,0xff,0x60,0x14,0x01,0x00,0x84,0x24,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0x00,0x00,0x83,0x80,0x00,0x2e,0x05,0x00,0x21,0x10,0x80,0x00,0x7b,0x46,0x00,0x08, -0x03,0x2e,0x05,0x00,0x07,0x00,0x60,0x10,0x01,0x00,0x42,0x24,0x00,0x00,0x43,0x80, -0x00,0x00,0x00,0x00,0xfb,0xff,0x65,0x14,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03, -0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x00,0x00,0x00,0x82,0x80, -0x87,0x46,0x00,0x08,0x21,0x18,0x80,0x00,0x01,0x00,0x63,0x24,0x00,0x00,0x62,0x80, -0x00,0x00,0x00,0x00,0xfc,0xff,0x40,0x14,0x23,0x10,0x64,0x00,0x08,0x00,0xe0,0x03, -0x00,0x00,0x00,0x00,0xe0,0xff,0xbd,0x27,0x10,0x00,0xb0,0xaf,0x21,0x80,0xa0,0x00, -0x14,0x00,0xb1,0xaf,0x18,0x00,0xbf,0xaf,0x21,0x88,0x80,0x00,0x81,0x46,0x00,0x0c, -0x00,0x86,0x10,0x00,0x21,0x18,0x51,0x00,0x03,0x86,0x10,0x00,0x00,0x00,0x62,0x80, -0x00,0x00,0x00,0x00,0x0a,0x00,0x50,0x10,0x21,0x10,0x60,0x00,0xff,0xff,0x63,0x24, -0x2b,0x10,0x71,0x00,0xf9,0xff,0x40,0x10,0x21,0x10,0x00,0x00,0x18,0x00,0xbf,0x8f, -0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03,0x20,0x00,0xbd,0x27, -0x18,0x00,0xbf,0x8f,0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03, -0x20,0x00,0xbd,0x27,0x21,0x30,0x80,0x00,0x0d,0x00,0xa0,0x10,0xff,0xff,0xa3,0x24, -0x00,0x00,0x82,0x80,0x00,0x00,0x00,0x00,0x09,0x00,0x40,0x10,0x00,0x00,0x00,0x00, -0xff,0xff,0x05,0x24,0xff,0xff,0x63,0x24,0x05,0x00,0x65,0x10,0x01,0x00,0xc6,0x24, -0x00,0x00,0xc2,0x80,0x00,0x00,0x00,0x00,0xfa,0xff,0x40,0x14,0x00,0x00,0x00,0x00, -0x08,0x00,0xe0,0x03,0x23,0x10,0xc4,0x00,0x00,0x00,0x82,0x90,0x00,0x00,0x00,0x00, -0x19,0x00,0x40,0x10,0x21,0x40,0x00,0x00,0x00,0x00,0xa9,0x80,0x00,0x00,0x00,0x00, -0x17,0x00,0x20,0x11,0x21,0x30,0xa0,0x00,0x00,0x3e,0x02,0x00,0x03,0x3e,0x07,0x00, -0x21,0x18,0x20,0x01,0x15,0x00,0xe3,0x10,0x00,0x00,0x00,0x00,0x01,0x00,0xc6,0x24, -0x00,0x00,0xc2,0x90,0x00,0x00,0x00,0x00,0x00,0x1e,0x02,0x00,0x03,0x1e,0x03,0x00, -0xf8,0xff,0x60,0x14,0x00,0x16,0x02,0x00,0x03,0x16,0x02,0x00,0x06,0x00,0x40,0x10, -0x00,0x00,0x00,0x00,0x01,0x00,0x84,0x24,0x00,0x00,0x82,0x90,0x00,0x00,0x00,0x00, -0xeb,0xff,0x40,0x14,0x01,0x00,0x08,0x25,0x08,0x00,0xe0,0x03,0x21,0x10,0x00,0x01, -0x00,0x00,0xa2,0x90,0xcc,0x46,0x00,0x08,0x00,0x16,0x02,0x00,0x00,0x00,0xc2,0x90, -0xcc,0x46,0x00,0x08,0x00,0x16,0x02,0x00,0x00,0x00,0x87,0x90,0x00,0x00,0x00,0x00, -0x14,0x00,0xe0,0x10,0x21,0x10,0x80,0x00,0x00,0x00,0xa4,0x90,0x00,0x00,0x00,0x00, -0x00,0x1e,0x04,0x00,0x03,0x1e,0x03,0x00,0x09,0x00,0x60,0x10,0x21,0x30,0xa0,0x00, -0x00,0x3e,0x07,0x00,0x03,0x3e,0x07,0x00,0x0b,0x00,0xe3,0x10,0x01,0x00,0xc6,0x24, -0x00,0x00,0xc3,0x80,0x00,0x00,0x00,0x00,0xfb,0xff,0x60,0x14,0x00,0x00,0x00,0x00, -0x01,0x00,0x42,0x24,0x00,0x00,0x47,0x90,0x00,0x00,0x00,0x00,0xf0,0xff,0xe0,0x14, -0x00,0x00,0x00,0x00,0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0xe0,0xff,0xbd,0x27,0x14,0x00,0xb1,0xaf,0x10,0x00,0xb0,0xaf,0x18,0x00,0xbf,0xaf, -0x21,0x80,0x80,0x00,0x1d,0x00,0x80,0x10,0x21,0x88,0xa0,0x00,0xb8,0x46,0x00,0x0c, -0x21,0x20,0x00,0x02,0x21,0x80,0x02,0x02,0x00,0x00,0x02,0x82,0x21,0x28,0x20,0x02, -0x21,0x20,0x00,0x02,0x22,0x00,0x40,0x10,0x21,0x18,0x00,0x00,0xdc,0x46,0x00,0x0c, -0x00,0x00,0x00,0x00,0x05,0x00,0x40,0x10,0x21,0x18,0x40,0x00,0x00,0x00,0x42,0x80, -0x00,0x00,0x00,0x00,0x0a,0x00,0x40,0x14,0x00,0x00,0x00,0x00,0x02,0x80,0x02,0x3c, -0xa8,0x96,0x43,0xac,0x21,0x18,0x00,0x02,0x18,0x00,0xbf,0x8f,0x14,0x00,0xb1,0x8f, -0x10,0x00,0xb0,0x8f,0x21,0x10,0x60,0x00,0x08,0x00,0xe0,0x03,0x20,0x00,0xbd,0x27, -0x00,0x00,0x60,0xa0,0x0d,0x47,0x00,0x08,0x01,0x00,0x63,0x24,0x02,0x80,0x02,0x3c, -0xa8,0x96,0x50,0x8c,0x00,0x00,0x00,0x00,0xf3,0xff,0x00,0x12,0x21,0x18,0x00,0x00, -0xb8,0x46,0x00,0x0c,0x21,0x20,0x00,0x02,0x21,0x80,0x02,0x02,0x00,0x00,0x02,0x82, -0x21,0x28,0x20,0x02,0x21,0x20,0x00,0x02,0xe0,0xff,0x40,0x14,0x21,0x18,0x00,0x00, -0x18,0x00,0xbf,0x8f,0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f,0x02,0x80,0x02,0x3c, -0xa8,0x96,0x40,0xac,0x20,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03,0x21,0x10,0x60,0x00, -0xe0,0xff,0xbd,0x27,0x18,0x00,0xb2,0xaf,0x14,0x00,0xb1,0xaf,0x1c,0x00,0xbf,0xaf, -0x10,0x00,0xb0,0xaf,0x00,0x00,0x90,0x8c,0x21,0x90,0x80,0x00,0x21,0x88,0xa0,0x00, -0x21,0x18,0x00,0x00,0x0f,0x00,0x00,0x12,0x21,0x20,0x00,0x02,0xb8,0x46,0x00,0x0c, -0x00,0x00,0x00,0x00,0x21,0x80,0x02,0x02,0x00,0x00,0x02,0x82,0x21,0x28,0x20,0x02, -0x21,0x20,0x00,0x02,0x07,0x00,0x40,0x10,0x21,0x18,0x00,0x00,0xdc,0x46,0x00,0x0c, -0x00,0x00,0x00,0x00,0x21,0x18,0x40,0x00,0x09,0x00,0x40,0x14,0x00,0x00,0x42,0xae, -0x21,0x18,0x00,0x02,0x1c,0x00,0xbf,0x8f,0x18,0x00,0xb2,0x8f,0x14,0x00,0xb1,0x8f, -0x10,0x00,0xb0,0x8f,0x21,0x10,0x60,0x00,0x08,0x00,0xe0,0x03,0x20,0x00,0xbd,0x27, -0x00,0x00,0x42,0x80,0x00,0x00,0x00,0x00,0xf5,0xff,0x40,0x10,0x01,0x00,0x64,0x24, -0x00,0x00,0x60,0xa0,0x46,0x47,0x00,0x08,0x00,0x00,0x44,0xae,0xd8,0xff,0xbd,0x27, -0x14,0x00,0xb1,0xaf,0x21,0x88,0x80,0x00,0x21,0x20,0xa0,0x00,0x1c,0x00,0xb3,0xaf, -0x18,0x00,0xb2,0xaf,0x20,0x00,0xbf,0xaf,0x10,0x00,0xb0,0xaf,0x81,0x46,0x00,0x0c, -0x21,0x98,0xa0,0x00,0x21,0x90,0x40,0x00,0x08,0x00,0x40,0x16,0x21,0x10,0x20,0x02, -0x20,0x00,0xbf,0x8f,0x1c,0x00,0xb3,0x8f,0x18,0x00,0xb2,0x8f,0x14,0x00,0xb1,0x8f, -0x10,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03,0x28,0x00,0xbd,0x27,0x81,0x46,0x00,0x0c, -0x21,0x20,0x20,0x02,0x21,0x80,0x40,0x00,0x2a,0x10,0x52,0x00,0x0a,0x00,0x40,0x14, -0x00,0x00,0x00,0x00,0x21,0x20,0x20,0x02,0x21,0x28,0x60,0x02,0x21,0x30,0x40,0x02, -0xd4,0x45,0x00,0x0c,0xff,0xff,0x10,0x26,0x0b,0x00,0x40,0x10,0x2a,0x18,0x12,0x02, -0xf8,0xff,0x60,0x10,0x01,0x00,0x31,0x26,0x20,0x00,0xbf,0x8f,0x1c,0x00,0xb3,0x8f, -0x18,0x00,0xb2,0x8f,0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f,0x21,0x10,0x00,0x00, -0x08,0x00,0xe0,0x03,0x28,0x00,0xbd,0x27,0x62,0x47,0x00,0x08,0x21,0x10,0x20,0x02, -0x01,0x80,0x02,0x3c,0xc0,0xff,0xbd,0x27,0x08,0x1e,0x44,0x24,0x25,0xb0,0x02,0x3c, -0x28,0x00,0xb4,0xaf,0x02,0x80,0x03,0x3c,0x25,0xb0,0x14,0x3c,0x18,0x03,0x42,0x34, -0x38,0x00,0xbe,0xaf,0x34,0x00,0xb7,0xaf,0x30,0x00,0xb6,0xaf,0x2c,0x00,0xb5,0xaf, -0x24,0x00,0xb3,0xaf,0x3c,0x00,0xbf,0xaf,0x20,0x00,0xb2,0xaf,0x1c,0x00,0xb1,0xaf, -0x18,0x00,0xb0,0xaf,0x68,0x15,0x73,0x24,0x00,0x00,0x44,0xac,0x02,0x80,0x16,0x3c, -0x02,0x80,0x15,0x3c,0xc4,0x02,0x9e,0x36,0x64,0x03,0x97,0x36,0x01,0x80,0x04,0x3c, -0x08,0x1e,0x82,0x24,0x18,0x03,0x83,0x36,0x00,0x00,0x62,0xac,0xa0,0x02,0x87,0x36, -0x00,0x00,0xe4,0x8c,0xd8,0x63,0x63,0x8e,0xff,0x0f,0x02,0x3c,0xff,0xff,0x46,0x34, -0x24,0x80,0x86,0x00,0x01,0x00,0x05,0x3c,0x01,0x00,0x63,0x24,0x2b,0x10,0xb0,0x00, -0x07,0x00,0x40,0x10,0xd8,0x63,0x63,0xae,0xa4,0x02,0x82,0x36,0x00,0x00,0x51,0x8c, -0x00,0xb0,0x03,0x3c,0x25,0x80,0x03,0x02,0x00,0x00,0x11,0xae,0x00,0x00,0xe0,0xac, -0xb0,0x02,0x84,0x36,0x00,0x00,0x82,0x8c,0x00,0x00,0x00,0x00,0x24,0x80,0x46,0x00, -0x2b,0x18,0xb0,0x00,0x08,0x00,0x60,0x10,0xc0,0x02,0x82,0x36,0x00,0xb0,0x02,0x3c, -0x25,0x80,0x02,0x02,0x00,0x00,0x11,0x8e,0xb4,0x02,0x82,0x36,0x00,0x00,0x51,0xac, -0x00,0x00,0x80,0xac,0xc0,0x02,0x82,0x36,0x00,0x00,0x50,0x8c,0xff,0x00,0x08,0x3c, -0xff,0xff,0x02,0x35,0x2b,0x10,0x50,0x00,0x47,0x00,0x40,0x10,0x00,0x00,0x00,0x00, -0x00,0x00,0x82,0x8e,0x00,0xff,0x06,0x3c,0xac,0x02,0x84,0x36,0x01,0x00,0x45,0x24, -0xbc,0x02,0x83,0x36,0xff,0x00,0xc2,0x34,0x00,0xfd,0x07,0x3c,0x00,0x00,0x85,0xac, -0x00,0x00,0x70,0xac,0x24,0x18,0x02,0x02,0x07,0x00,0xe2,0x34,0x00,0x00,0x85,0x8c, -0x52,0x03,0x62,0x10,0x25,0xb0,0x12,0x3c,0x2b,0x10,0x43,0x00,0xa2,0x00,0x40,0x14, -0xa4,0x00,0xe2,0x34,0x00,0xf8,0x04,0x3c,0x15,0x00,0x82,0x34,0x57,0x03,0x62,0x10, -0x2b,0x10,0x43,0x00,0xc8,0x00,0x40,0x14,0x00,0xf9,0x05,0x3c,0x00,0xf0,0x05,0x3c, -0x20,0x00,0xa2,0x34,0x67,0x03,0x62,0x10,0x2b,0x10,0x43,0x00,0x20,0x01,0x40,0x14, -0x10,0x00,0x82,0x34,0x70,0x03,0x65,0x10,0x2b,0x10,0xa3,0x00,0xc8,0x01,0x40,0x14, -0x02,0x00,0xa2,0x34,0x00,0xd0,0x02,0x3c,0x2a,0x02,0x62,0x10,0x2b,0x10,0x43,0x00, -0xaf,0x02,0x40,0x14,0x00,0xe0,0x02,0x3c,0x00,0xc0,0x02,0x3c,0xbb,0x03,0x62,0x10, -0xff,0x00,0x03,0x3c,0x00,0xf0,0x02,0x3c,0x24,0x30,0x02,0x02,0x18,0x00,0xc2,0x10, -0x02,0x1d,0x10,0x00,0x00,0x70,0x05,0x3c,0x24,0x10,0x05,0x02,0x02,0x4f,0x02,0x00, -0x0f,0x00,0x02,0x3c,0xff,0xff,0x42,0x34,0x00,0x50,0x07,0x3c,0xff,0x00,0x68,0x30, -0xff,0x00,0x04,0x32,0x96,0x01,0xc7,0x10,0x24,0x18,0x02,0x02,0x2b,0x10,0xe6,0x00, -0x8a,0x01,0x40,0x14,0x00,0x80,0x02,0x3c,0x00,0x20,0x02,0x3c,0x1a,0x03,0xc2,0x10, -0x2b,0x10,0x46,0x00,0x82,0x02,0x40,0x14,0x00,0x30,0x02,0x3c,0x17,0x03,0xc0,0x10, -0x80,0x10,0x08,0x00,0x00,0x10,0x02,0x3c,0x14,0x03,0xc2,0x10,0x80,0x10,0x08,0x00, -0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34, -0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40,0x00,0x00,0xe2,0x92,0x25,0xb0,0x07,0x3c, -0xc8,0x7d,0xc2,0xa2,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40, -0xc8,0x7d,0xc2,0x92,0x00,0x00,0x00,0x00,0x01,0x00,0x42,0x30,0x4e,0x00,0x40,0x10, -0x02,0x80,0x03,0x3c,0x00,0x40,0x62,0x8e,0xf0,0xff,0x03,0x24,0xd7,0x42,0x60,0xa2, -0x24,0x10,0x43,0x00,0x01,0x00,0x42,0x34,0x00,0x40,0x62,0xae,0xc8,0x7d,0xc2,0x92, -0x00,0x00,0x00,0x00,0x02,0x00,0x42,0x30,0x3d,0x00,0x40,0x10,0x0f,0xff,0x03,0x24, -0x00,0x40,0x62,0x8e,0x00,0x00,0x00,0x00,0x24,0x10,0x43,0x00,0x10,0x00,0x42,0x34, -0x00,0x40,0x62,0xae,0xc8,0x7d,0xc2,0x92,0x00,0x00,0x00,0x00,0x04,0x00,0x42,0x30, -0x30,0x00,0x40,0x10,0xff,0xf0,0x03,0x24,0x00,0x40,0x62,0x8e,0x00,0x00,0x00,0x00, -0x24,0x10,0x43,0x00,0x00,0x01,0x42,0x34,0x25,0xb0,0x05,0x3c,0x00,0x40,0x62,0xae, -0x4c,0x00,0xa3,0x34,0x00,0x00,0x62,0x90,0x00,0x00,0x00,0x00,0x03,0x00,0x42,0x30, -0x05,0x00,0x40,0x14,0xff,0xff,0x02,0x3c,0x00,0x40,0x63,0x8e,0xff,0x0f,0x42,0x34, -0x24,0x18,0x62,0x00,0x00,0x40,0x63,0xae,0x00,0x7b,0xa4,0x8e,0x01,0x80,0x06,0x3c, -0x08,0x1f,0xc2,0x24,0x18,0x03,0xa3,0x34,0x00,0x7b,0xa6,0x26,0x00,0x00,0x62,0xac, -0x10,0x00,0x86,0x10,0x02,0x80,0x02,0x3c,0xbf,0x00,0xb2,0x34,0x68,0x15,0x51,0x24, -0x21,0x80,0xc0,0x00,0x00,0x00,0x42,0x92,0x00,0x00,0x00,0x00,0x04,0x00,0x42,0x2c, -0x09,0x00,0x40,0x10,0x02,0x80,0x07,0x3c,0x98,0x65,0x24,0x8e,0x8b,0x07,0x00,0x0c, -0x00,0x00,0x00,0x00,0x00,0x7b,0xa2,0x8e,0x00,0x00,0x00,0x00,0xf5,0xff,0x50,0x14, -0x00,0x00,0x00,0x00,0x02,0x80,0x07,0x3c,0x08,0x08,0xe4,0x24,0x21,0x28,0x00,0x00, -0x21,0x30,0x00,0x00,0x31,0x1c,0x00,0x0c,0x21,0x38,0x00,0x00,0x9a,0x47,0x00,0x08, -0x01,0x80,0x04,0x3c,0x00,0x40,0x62,0x8e,0x30,0x48,0x00,0x08,0x24,0x10,0x43,0x00, -0x00,0x40,0x62,0x8e,0x04,0x43,0x64,0x92,0x24,0x10,0x43,0x00,0x00,0x40,0x62,0xae, -0x27,0x48,0x00,0x08,0x04,0x43,0x64,0xae,0x68,0x15,0x66,0x24,0x00,0x40,0xc2,0x8c, -0xd7,0x42,0xc4,0x90,0xf0,0xff,0x03,0x24,0x24,0x10,0x43,0x00,0xb3,0xff,0x80,0x14, -0x00,0x40,0xc2,0xac,0x1c,0x00,0x04,0x24,0x58,0x0c,0xe5,0x34,0x50,0x0c,0xe3,0x34, -0x01,0x00,0x02,0x24,0xd7,0x42,0xc2,0xa0,0x00,0x00,0x64,0xa0,0x00,0x00,0xa4,0xa0, -0x1d,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0xb2,0x02,0x62,0x10,0x2b,0x10,0x43,0x00, -0x3f,0x00,0x40,0x14,0xaf,0x00,0xe2,0x34,0x20,0x00,0xe2,0x34,0xc0,0x02,0x62,0x10, -0x2b,0x10,0x43,0x00,0xe3,0x00,0x40,0x14,0x29,0x00,0xe2,0x34,0x15,0x00,0xe2,0x34, -0x0c,0x03,0x62,0x10,0x2b,0x10,0x43,0x00,0x9d,0x01,0x40,0x14,0x17,0x00,0xe2,0x34, -0x09,0x00,0xe2,0x34,0xd8,0x03,0x62,0x10,0x2b,0x10,0x62,0x00,0x81,0x02,0x40,0x14, -0x14,0x00,0xe2,0x34,0x64,0xff,0x62,0x14,0x00,0xf0,0x02,0x3c,0xff,0x00,0x07,0x3c, -0x00,0xff,0xe7,0x34,0x24,0x10,0x07,0x02,0x7a,0xff,0x40,0x10,0xc0,0x02,0x82,0x36, -0x04,0x43,0x64,0x92,0xff,0x00,0x02,0x3c,0x24,0x10,0x02,0x02,0x00,0xff,0x03,0x32, -0x02,0x14,0x02,0x00,0x02,0x1a,0x03,0x00,0xfb,0xff,0x45,0x24,0x1c,0x43,0x62,0xa2, -0x00,0x01,0x84,0x34,0xfb,0xff,0x66,0x24,0xc0,0x02,0x82,0x36,0x04,0x43,0x64,0xae, -0x1d,0x43,0x65,0xa2,0x1f,0x43,0x66,0xa2,0x1e,0x43,0x63,0xa2,0x00,0x00,0x40,0xac, -0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0x05,0x00,0xa2,0x34,0x91,0x02,0x62,0x10, -0x2b,0x10,0x43,0x00,0x8e,0x00,0x40,0x14,0x00,0x00,0x00,0x00,0xde,0x02,0x65,0x10, -0x2b,0x10,0xa3,0x00,0x32,0x01,0x40,0x14,0x02,0x00,0xa2,0x34,0x17,0x00,0x82,0x34, -0x61,0x04,0x62,0x10,0x2b,0x10,0x62,0x00,0xa9,0x03,0x40,0x14,0x18,0x00,0x82,0x34, -0x3d,0xff,0x62,0x14,0x00,0xf0,0x02,0x3c,0x74,0x0b,0x00,0x0c,0x00,0x00,0x00,0x00, -0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0xa8,0x02,0x62,0x10,0x2b,0x10,0x43,0x00,0x95,0x00,0x40,0x14,0x0c,0x00,0xc2,0x34, -0xaa,0x00,0xe2,0x34,0xdc,0x02,0x62,0x10,0x2b,0x10,0x43,0x00,0xd9,0x00,0x40,0x14, -0xac,0x00,0xe2,0x34,0xa6,0x00,0xe2,0x34,0x1c,0x04,0x62,0x10,0x2b,0x10,0x62,0x00, -0x69,0x03,0x40,0x14,0xa7,0x00,0xe2,0x34,0x27,0xff,0x62,0x14,0x00,0xf0,0x02,0x3c, -0x00,0xff,0x02,0x32,0xff,0x00,0x04,0x3c,0x02,0x8a,0x02,0x00,0x24,0x18,0x04,0x02, -0x01,0x00,0x02,0x24,0xa6,0x04,0x22,0x12,0x02,0x1c,0x03,0x00,0x02,0x00,0x02,0x24, -0xc9,0x04,0x22,0x12,0x03,0x00,0x02,0x24,0xdf,0x04,0x22,0x12,0x04,0x00,0x02,0x24, -0xd1,0x04,0x22,0x12,0x08,0x00,0x02,0x24,0x2e,0x05,0x22,0x12,0x09,0x00,0x02,0x24, -0x1e,0x05,0x22,0x12,0x0a,0x00,0x02,0x24,0x0e,0x05,0x22,0x12,0x0b,0x00,0x02,0x24, -0xfe,0x04,0x22,0x12,0x0c,0x00,0x02,0x24,0x5e,0x05,0x22,0x12,0x0d,0x00,0x02,0x24, -0x4e,0x05,0x22,0x12,0x0e,0x00,0x02,0x24,0x3e,0x05,0x22,0x12,0x0f,0x00,0x02,0x24, -0x2e,0x05,0x22,0x12,0x10,0x00,0x02,0x24,0x22,0xff,0x22,0x16,0xc0,0x02,0x82,0x36, -0xc0,0x10,0x03,0x00,0x21,0x10,0x43,0x00,0x80,0x10,0x02,0x00,0x21,0x10,0x43,0x00, -0x80,0x10,0x02,0x00,0x21,0x10,0x53,0x00,0x4c,0x51,0x43,0x94,0x48,0x51,0x44,0x94, -0x25,0xb0,0x06,0x3c,0x00,0x1c,0x03,0x00,0x21,0x20,0x83,0x00,0x00,0x00,0xc4,0xaf, -0x58,0x51,0x45,0x8c,0x54,0x51,0x43,0x8c,0x50,0x51,0x44,0x94,0xc8,0x02,0xc6,0x34, -0x21,0x18,0x65,0x00,0x00,0x1c,0x03,0x00,0x21,0x20,0x83,0x00,0xc0,0x02,0x82,0x36, -0x00,0x00,0xc4,0xac,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0x66,0x02,0x62,0x10,0x2b,0x10,0x43,0x00,0xbf,0x00,0x40,0x14,0x12,0x00,0x82,0x34, -0x00,0xf1,0x04,0x3c,0x01,0x00,0x82,0x34,0xc1,0x02,0x62,0x10,0x2b,0x10,0x43,0x00, -0xb7,0x01,0x40,0x14,0x02,0x00,0x82,0x34,0xe3,0xfe,0x64,0x14,0x00,0xf0,0x02,0x3c, -0xff,0x00,0x04,0x3c,0x00,0xff,0x84,0x34,0x24,0x10,0x04,0x02,0x02,0x8a,0x02,0x00, -0x80,0x1a,0x11,0x00,0x00,0xf4,0x63,0x24,0x94,0x00,0x82,0x36,0x00,0x00,0x51,0xa4, -0x26,0xb0,0x04,0x3c,0x42,0x89,0x03,0x00,0x98,0x00,0x86,0x36,0xff,0x01,0x02,0x24, -0x10,0x00,0x03,0x24,0x9a,0x00,0x85,0x36,0x00,0x00,0xa2,0xa4,0x7c,0x00,0x89,0x34, -0x00,0x00,0xc3,0xa4,0x01,0x00,0x02,0x24,0x04,0x00,0x03,0x24,0x96,0x00,0x87,0x36, -0x7a,0x00,0x84,0x34,0xb0,0x03,0x88,0x36,0x25,0xb0,0x06,0x3c,0x00,0x00,0xe2,0xa4, -0x44,0x00,0xc6,0x34,0x00,0x00,0x83,0xa0,0x00,0x00,0x11,0xad,0x00,0x00,0x31,0xa5, -0x00,0x00,0xc3,0x94,0xff,0xfd,0x02,0x24,0x24,0x18,0x62,0x00,0x00,0x00,0xc3,0xa4, -0x00,0x00,0xc2,0x94,0x00,0x00,0x00,0x00,0x00,0x02,0x42,0x34,0x00,0x00,0xc2,0xa4, -0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0x65,0x01,0x67,0x10,0x2b,0x10,0xe3,0x00,0xc5,0x00,0x40,0x14,0x02,0x00,0xe2,0x34, -0x07,0x00,0xa2,0x34,0xfc,0x02,0x62,0x10,0x2b,0x10,0x62,0x00,0xa9,0x01,0x40,0x14, -0x20,0x00,0xa2,0x34,0xb0,0xfe,0x62,0x14,0x00,0xf0,0x02,0x3c,0xff,0x00,0x03,0x3c, -0x00,0xff,0x63,0x34,0x24,0x10,0x03,0x02,0x02,0x3a,0x02,0x00,0x80,0x04,0xe0,0x10, -0x02,0x80,0x04,0x3c,0x05,0x00,0x02,0x24,0xc2,0xfe,0xe2,0x14,0xc0,0x02,0x82,0x36, -0x02,0x80,0x06,0x3c,0x8f,0x7d,0xc2,0x90,0x00,0x00,0x00,0x00,0x00,0x00,0xc2,0xaf, -0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0x2e,0x02,0x62,0x10,0x2b,0x10,0x43,0x00,0x98,0x00,0x40,0x14,0x0e,0x00,0xc2,0x34, -0x01,0x00,0xc2,0x34,0xab,0x03,0x62,0x10,0x2b,0x10,0x43,0x00,0x48,0x01,0x40,0x14, -0x00,0xff,0x02,0x3c,0x94,0xfe,0x66,0x14,0x00,0xf0,0x02,0x3c,0x5b,0x4e,0x00,0x0c, -0x21,0x20,0x00,0x00,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0x4c,0x02,0x62,0x10,0x2b,0x10,0x43,0x00,0xa6,0x00,0x40,0x14, -0xa1,0x00,0xe2,0x34,0x22,0x00,0xe2,0x34,0xbd,0x02,0x62,0x10,0x2b,0x10,0x62,0x00, -0x88,0x01,0x40,0x14,0x00,0x20,0x02,0x3c,0x28,0x00,0xe2,0x34,0x82,0xfe,0x62,0x14, -0x00,0xf0,0x02,0x3c,0x0f,0x00,0x04,0x3c,0xff,0xff,0x85,0x34,0x60,0x00,0x06,0x24, -0xba,0x44,0x00,0x0c,0x24,0x00,0x04,0x24,0x84,0x0a,0x00,0x0c,0xe8,0x03,0x04,0x24, -0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40, -0x0f,0x00,0x06,0x3c,0x24,0x00,0x04,0x24,0xdd,0x44,0x00,0x0c,0xff,0xff,0xc5,0x34, -0x1f,0x00,0x51,0x30,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40, -0xb3,0x0a,0x00,0x0c,0x64,0x00,0x04,0x24,0xc0,0x02,0x82,0x36,0x00,0x00,0xd1,0xa3, -0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0x18,0x02,0xc2,0x10, -0x2b,0x10,0x46,0x00,0x01,0x01,0x40,0x14,0x00,0xa0,0x02,0x3c,0x00,0x60,0x02,0x3c, -0x04,0x00,0xc2,0x10,0x80,0x10,0x08,0x00,0x7a,0xfe,0xc5,0x14,0xc0,0x02,0x82,0x36, -0x80,0x10,0x08,0x00,0x21,0x10,0x48,0x00,0x21,0x10,0x53,0x00,0x21,0x10,0x49,0x00, -0xc1,0x43,0x44,0xa0,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0x3f,0x03,0x62,0x10,0x2b,0x10,0x62,0x00,0xb6,0x02,0x40,0x14, -0xad,0x00,0xe2,0x34,0xc7,0x03,0x62,0x10,0xae,0x00,0xe2,0x34,0x4e,0xfe,0x62,0x14, -0x00,0xf0,0x02,0x3c,0xff,0x00,0x02,0x3c,0x24,0x20,0x02,0x02,0x00,0xff,0x05,0x32, -0x02,0x24,0x04,0x00,0x69,0x4f,0x00,0x0c,0x02,0x2a,0x05,0x00,0x00,0x00,0xc2,0xa3, -0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0x4b,0x02,0x62,0x10,0x2b,0x10,0x62,0x00,0x17,0x01,0x40,0x14,0x03,0x00,0xa2,0x34, -0x82,0x03,0x62,0x10,0x08,0x00,0xa2,0x34,0x3b,0xfe,0x62,0x14,0x00,0xf0,0x02,0x3c, -0x00,0xff,0x02,0x32,0x02,0x82,0x02,0x00,0xcc,0x02,0x83,0x36,0x00,0x00,0x70,0xac, -0x12,0x04,0x00,0x12,0x01,0x00,0x02,0x24,0x9c,0x04,0x02,0x12,0x00,0x00,0x00,0x00, -0x7a,0x42,0x00,0x0c,0x21,0x20,0x00,0x00,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac, -0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0x4e,0x02,0x62,0x10,0x2b,0x10,0x62,0x00, -0xe4,0x00,0x40,0x14,0x00,0xff,0x02,0x32,0x13,0x00,0x82,0x34,0x4c,0x03,0x62,0x10, -0x14,0x00,0x82,0x34,0x24,0xfe,0x62,0x14,0x00,0xf0,0x02,0x3c,0xd3,0x0a,0x00,0x0c, -0xfd,0x00,0x04,0x24,0x10,0x10,0x03,0x3c,0xa0,0x00,0x82,0x36,0x10,0x10,0x63,0x34, -0x00,0xc0,0x07,0x3c,0x25,0xb0,0x06,0x3c,0x00,0x00,0x43,0xac,0xa4,0x00,0x84,0x36, -0x00,0xa1,0xe7,0x34,0xa8,0x00,0xc6,0x34,0xc0,0x02,0x82,0x36,0x00,0x00,0x80,0xac, -0x00,0x00,0xc7,0xac,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0x60,0x02,0x62,0x10,0x2b,0x10,0x62,0x00,0xf6,0x00,0x40,0x14,0x03,0x00,0xa2,0x34, -0x4b,0x03,0x62,0x10,0x04,0x00,0xa2,0x34,0x0b,0xfe,0x62,0x14,0x00,0xf0,0x02,0x3c, -0xf4,0x63,0x62,0x92,0x00,0x00,0x00,0x00,0x00,0x00,0xc2,0xaf,0xc0,0x02,0x82,0x36, -0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0x61,0x02,0x62,0x10, -0x2b,0x10,0x62,0x00,0xfe,0x00,0x40,0x14,0x01,0x00,0x02,0x24,0x0f,0x00,0xc2,0x34, -0x63,0x03,0x62,0x10,0x10,0x00,0xc2,0x34,0xfb,0xfd,0x62,0x14,0x00,0xf0,0x02,0x3c, -0x00,0xff,0x03,0x32,0x00,0xff,0x02,0x34,0x9d,0x03,0x62,0x10,0xc0,0x02,0x82,0x36, -0x8c,0x65,0x60,0xae,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0x47,0x02,0x62,0x10,0x2b,0x10,0x62,0x00,0x02,0x01,0x40,0x14,0x03,0x00,0xe2,0x34, -0x8d,0x03,0x62,0x10,0x04,0x00,0xe2,0x34,0xeb,0xfd,0x62,0x14,0x00,0xf0,0x02,0x3c, -0x1e,0x57,0x00,0x0c,0x00,0x00,0x00,0x00,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac, -0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0x9b,0x01,0x62,0x10,0x2b,0x10,0x43,0x00, -0xcf,0x00,0x40,0x14,0xa2,0x00,0xe2,0x34,0xa0,0x00,0xe2,0x34,0xde,0xfd,0x62,0x14, -0x00,0xf0,0x02,0x3c,0x00,0x0f,0x02,0x32,0x02,0x22,0x02,0x00,0x01,0x00,0x03,0x24, -0x3c,0x04,0x83,0x10,0x02,0x00,0x02,0x24,0x34,0x04,0x82,0x10,0x03,0x00,0x02,0x24, -0x46,0x03,0x82,0x10,0x00,0x00,0x00,0x00,0xde,0x4f,0x00,0x0c,0x21,0x20,0x00,0x00, -0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0x46,0x02,0x62,0x10,0x2b,0x10,0x62,0x00,0xe6,0xfd,0x40,0x14,0xc0,0x02,0x82,0x36, -0x18,0x00,0xe2,0x34,0x45,0x03,0x62,0x10,0x19,0x00,0xe2,0x34,0xc6,0xfd,0x62,0x14, -0x00,0xf0,0x02,0x3c,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x94,0x0e,0x83,0x36, -0x9c,0x0e,0x82,0x36,0xa4,0x0e,0x84,0x36,0xac,0x0e,0x87,0x36,0x00,0x00,0x65,0x8c, -0x00,0x00,0x48,0x8c,0x00,0x00,0x8a,0x8c,0x00,0x00,0xe6,0x8c,0x02,0x80,0x07,0x3c, -0x68,0x15,0xed,0x24,0xb4,0x0e,0x82,0x36,0x00,0x00,0x47,0x8c,0x0c,0x40,0xa3,0x8d, -0xff,0x03,0x02,0x3c,0x10,0x40,0xa4,0x8d,0x24,0x28,0xa2,0x00,0x24,0x30,0xc2,0x00, -0xbc,0x0e,0x82,0x36,0x00,0x00,0x4b,0x8c,0x00,0xfc,0x02,0x24,0x02,0x2c,0x05,0x00, -0x24,0x18,0x62,0x00,0x02,0x34,0x06,0x00,0x24,0x20,0x82,0x00,0xc4,0x0e,0x82,0x36, -0x25,0x18,0x65,0x00,0x25,0x20,0x86,0x00,0x00,0x00,0x45,0x8c,0xff,0x03,0x06,0x3c, -0xf0,0xff,0x02,0x3c,0xff,0x03,0x42,0x34,0x24,0x38,0xe6,0x00,0x82,0x39,0x07,0x00, -0x24,0x20,0x82,0x00,0x24,0x40,0x06,0x01,0x08,0x40,0xa9,0x8d,0x25,0x20,0x87,0x00, -0xcc,0x0e,0x8c,0x36,0xff,0x03,0x07,0x3c,0x00,0x00,0x86,0x8d,0x24,0x18,0x62,0x00, -0x24,0x50,0x47,0x01,0x24,0x58,0x67,0x01,0x82,0x41,0x08,0x00,0xff,0x9f,0x02,0x3c, -0x0f,0xc0,0x07,0x3c,0xff,0xff,0xe7,0x34,0xff,0xff,0x42,0x34,0x25,0x18,0x68,0x00, -0x24,0x48,0x22,0x01,0x24,0x18,0x67,0x00,0xff,0x03,0x02,0x3c,0x24,0x20,0x87,0x00, -0xff,0x00,0x07,0x3c,0x24,0x28,0xa2,0x00,0x24,0x30,0xc2,0x00,0x00,0x51,0x0a,0x00, -0x00,0x20,0x02,0x3c,0x00,0x59,0x0b,0x00,0x00,0xff,0xe7,0x34,0x25,0x48,0x22,0x01, -0x25,0x18,0x6a,0x00,0x25,0x20,0x8b,0x00,0x02,0x2c,0x05,0x00,0x02,0x34,0x06,0x00, -0x24,0x10,0x07,0x02,0x08,0x40,0xa9,0xad,0x0c,0x40,0xa3,0xad,0x10,0x40,0xa4,0xad, -0x14,0x40,0xa5,0xa5,0x4e,0x03,0x40,0x10,0x16,0x40,0xa6,0xa5,0xff,0x00,0x02,0x3c, -0x24,0x10,0x02,0x02,0x02,0x14,0x02,0x00,0x02,0x1a,0x10,0x00,0xc7,0x42,0xa2,0xa1, -0xc3,0x42,0xa3,0xa1,0xc3,0x42,0x62,0x92,0x25,0xb0,0x03,0x3c,0x61,0x0c,0x63,0x34, -0x10,0x00,0xa4,0x27,0x00,0x00,0x62,0xa0,0x7a,0x54,0x00,0x0c,0x00,0x00,0x00,0x00, -0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0x95,0x00,0xc2,0x10,0x00,0x40,0x02,0x3c,0x09,0xff,0xc2,0x10,0xc0,0x02,0x82,0x36, -0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0x7b,0x02,0xc2,0x10, -0x2b,0x10,0x46,0x00,0x83,0x00,0x40,0x14,0x00,0xb0,0x02,0x3c,0x00,0x90,0x02,0x3c, -0x78,0xfd,0xc2,0x14,0xc0,0x02,0x82,0x36,0x21,0x10,0x13,0x01,0x73,0x44,0x44,0xa0, -0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0x55,0xfd,0x62,0x14,0x00,0xf0,0x02,0x3c,0x6a,0x56,0x00,0x0c,0x21,0x20,0x00,0x02, -0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0x07,0x00,0x42,0x34,0x4c,0xfd,0x62,0x14,0x00,0xf0,0x02,0x3c,0x5b,0x4e,0x00,0x0c, -0x07,0x00,0x04,0x24,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0x02,0x1a,0x02,0x00,0x21,0x88,0x00,0x00,0xaf,0x4a,0x00,0x08, -0x27,0xb0,0x06,0x3c,0x01,0x00,0x31,0x26,0x00,0x01,0x22,0x2e,0x08,0x00,0x40,0x10, -0xff,0x00,0x22,0x2e,0x00,0x00,0xc2,0x94,0x00,0x00,0x00,0x00,0xff,0x00,0x42,0x30, -0xf8,0xff,0x43,0x14,0x08,0x00,0xc6,0x24,0x00,0x00,0xd1,0xa7,0xff,0x00,0x22,0x2e, -0x50,0xfd,0x40,0x14,0xc0,0x02,0x82,0x36,0x12,0x87,0x02,0x3c,0x00,0x00,0xc2,0xaf, -0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0x2d,0xfd,0x62,0x14,0x00,0xf0,0x02,0x3c,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac, -0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0xff,0x00,0x03,0x3c,0x00,0xff,0x63,0x34, -0x24,0x10,0x03,0x02,0x02,0x82,0x02,0x00,0xcc,0x02,0x83,0x36,0x00,0x00,0x70,0xac, -0x00,0x00,0xd1,0x8f,0x21,0x10,0x14,0x02,0x00,0x00,0x51,0xac,0x00,0x00,0x51,0x8c, -0xc0,0x02,0x82,0x36,0x00,0x00,0xd1,0xaf,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0x00,0x64,0x62,0x92,0x00,0x00,0x00,0x00,0x00,0x00,0xc2,0xaf, -0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0xf4,0x02,0x62,0x10,0xa3,0x00,0xe2,0x34,0x0f,0xfd,0x62,0x14,0x00,0xf0,0x02,0x3c, -0xc0,0x02,0x82,0x36,0x8c,0x65,0x60,0xae,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0xec,0x63,0x62,0x92,0x00,0x00,0x00,0x00,0x00,0x00,0xc2,0xaf, -0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0xe6,0x63,0x62,0xa6,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0x08,0x40,0x63,0x8e,0xff,0x9f,0x07,0x3c,0xff,0xff,0xe7,0x34, -0x02,0x2c,0x10,0x00,0x00,0x1f,0x04,0x32,0x24,0x18,0x67,0x00,0x25,0x18,0x62,0x00, -0x02,0x8a,0x04,0x00,0x3f,0x00,0xa5,0x30,0xc0,0x02,0x82,0x36,0x08,0x40,0x63,0xae, -0xbc,0x42,0x71,0xa2,0xc1,0x42,0x65,0xa2,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0x00,0x00,0xe2,0x92,0x00,0x00,0x00,0x00,0xfa,0x00,0x42,0x30, -0x00,0x00,0xe2,0xa2,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0x00,0x00,0xe2,0x92,0x00,0x00,0x00,0x00,0xfd,0x00,0x42,0x30, -0x00,0x00,0xe2,0xa2,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0xf7,0xfc,0xc2,0x14,0xc0,0x02,0x82,0x36,0x80,0x10,0x08,0x00, -0x21,0x10,0x53,0x00,0x60,0x45,0x43,0xac,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac, -0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0x80,0x10,0x08,0x00,0x21,0x10,0x48,0x00, -0x21,0x10,0x53,0x00,0x21,0x10,0x49,0x00,0x34,0x43,0x44,0xa0,0xc0,0x02,0x82,0x36, -0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0x77,0x56,0x00,0x0c, -0x21,0x20,0x00,0x02,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0xff,0xff,0x02,0x34,0x8c,0x65,0x62,0xae,0xc0,0x02,0x82,0x36, -0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0x07,0x0b,0x00,0x0c, -0x00,0x00,0x00,0x00,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0xf0,0x63,0x62,0x92,0x00,0x00,0x00,0x00,0x00,0x00,0xc2,0xaf, -0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0x08,0x40,0x62,0x8e,0xff,0x9f,0x03,0x3c,0xff,0xff,0x63,0x34,0x24,0x10,0x43,0x00, -0x08,0x40,0x62,0xae,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x01,0x00,0x21,0x38, -0x00,0x60,0x81,0x40,0x22,0x51,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x60,0x01,0x40, -0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac, -0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0xff,0x00,0x07,0x3c,0x00,0xff,0xe7,0x34, -0x24,0x10,0x07,0x02,0x02,0x82,0x02,0x00,0xcc,0x02,0x43,0x36,0x00,0x00,0x70,0xac, -0x21,0x10,0x12,0x02,0x00,0x00,0x51,0x8c,0x00,0x00,0x00,0x00,0x00,0x00,0xd1,0xaf, -0x00,0x00,0x51,0x8c,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0xb7,0x4f,0x00,0x0c,0x00,0x00,0x00,0x00,0xc0,0x02,0x82,0x36, -0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0x21,0x88,0x00,0x00, -0x6c,0x4b,0x00,0x08,0x27,0xb0,0x04,0x3c,0x01,0x00,0x31,0x26,0x00,0x01,0x22,0x2e, -0x0a,0x00,0x40,0x10,0xff,0x00,0x22,0x2e,0x00,0x00,0x83,0x94,0x00,0x00,0x00,0x00, -0xff,0xff,0x67,0x30,0xff,0x00,0xe2,0x30,0xf0,0x00,0x42,0x28,0xf6,0xff,0x40,0x14, -0x08,0x00,0x84,0x24,0x00,0x00,0xc7,0xa7,0xff,0x00,0x22,0x2e,0x91,0xfc,0x40,0x14, -0xc0,0x02,0x82,0x36,0x12,0x87,0x02,0x3c,0x00,0x00,0xc2,0xaf,0xc0,0x02,0x82,0x36, -0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0xe4,0x63,0x62,0x96, -0x00,0x00,0x00,0x00,0x00,0x00,0xc2,0xa7,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac, -0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0x04,0x64,0x62,0x92,0x00,0x00,0x00,0x00, -0x00,0x00,0xc2,0xaf,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0x00,0xff,0x02,0x32,0x02,0x12,0x02,0x00,0x03,0x00,0x43,0x2c, -0x02,0x00,0x60,0x10,0x00,0x00,0x00,0x00,0x02,0x40,0x62,0xa2,0x02,0x40,0x63,0x92, -0x90,0x0c,0x42,0x36,0x00,0x00,0x43,0xa0,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac, -0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0xd7,0x56,0x00,0x0c,0x00,0x00,0x00,0x00, -0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0x21,0x10,0x13,0x01,0x56,0x44,0x44,0xa0,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac, -0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0xff,0x00,0x03,0x3c,0x24,0x20,0x03,0x02, -0x73,0x0e,0x00,0x0c,0x02,0x24,0x04,0x00,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac, -0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0x02,0x1c,0x10,0x00,0x00,0x1f,0x02,0x32, -0x02,0x8a,0x02,0x00,0x3f,0x00,0x65,0x30,0xc1,0x42,0x65,0xa2,0xbc,0x42,0x71,0xa2, -0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40, -0x1f,0x12,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0xc2,0xaf,0x00,0x60,0x01,0x40, -0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40,0x03,0x40,0x62,0x92,0x0e,0x0c,0x44,0x36, -0x01,0x00,0x42,0x24,0xff,0x00,0x43,0x30,0x00,0x00,0x83,0xa0,0x03,0x40,0x62,0xa2, -0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0x00,0xff,0x02,0x32,0x02,0x3a,0x02,0x00,0x1a,0x01,0xe0,0x10,0x4f,0x00,0x82,0x36, -0x94,0x00,0x42,0x36,0x00,0x00,0x43,0x94,0xff,0xff,0xe2,0x24,0xb0,0x03,0x45,0x36, -0xff,0xff,0x71,0x30,0x1b,0x00,0x27,0x02,0x02,0x00,0xe0,0x14,0x00,0x00,0x00,0x00, -0x0d,0x00,0x07,0x00,0xff,0xff,0x47,0x30,0x00,0x00,0xb1,0xac,0x80,0xff,0x02,0x24, -0x00,0x19,0x07,0x00,0x25,0x18,0x62,0x00,0x4f,0x00,0x44,0x36,0x9e,0x00,0x46,0x36, -0x00,0x00,0xa7,0xac,0x00,0x00,0x83,0xa0,0x25,0xb0,0x04,0x3c,0x44,0x00,0x84,0x34, -0x12,0x88,0x00,0x00,0x80,0x12,0x11,0x00,0x00,0xfc,0x42,0x24,0x00,0x00,0xb1,0xac, -0x00,0x00,0xd1,0xa4,0x42,0x89,0x02,0x00,0x26,0xb0,0x02,0x3c,0x7c,0x00,0x42,0x34, -0x00,0x00,0xb1,0xac,0x00,0x00,0x51,0xa4,0x25,0xb0,0x02,0x3c,0x44,0x00,0x42,0x34, -0x00,0x00,0x43,0x94,0xff,0xfd,0x02,0x24,0x24,0x18,0x62,0x00,0x00,0x00,0x83,0xa4, -0x00,0x00,0x82,0x94,0x00,0x00,0x00,0x00,0x00,0x02,0x42,0x34,0x00,0x00,0x82,0xa4, -0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0x24,0x10,0x08,0x02,0xcc,0x02,0x43,0x36,0x00,0xff,0x04,0x32,0x02,0x3c,0x02,0x00, -0x00,0x00,0x70,0xac,0x04,0x00,0xe0,0x10,0x02,0x82,0x04,0x00,0x01,0x00,0x02,0x24, -0x02,0x00,0xe2,0x10,0x01,0x00,0x04,0x24,0x21,0x20,0x00,0x00,0x7a,0x42,0x00,0x0c, -0x00,0x00,0x00,0x00,0x0f,0x00,0x06,0x3c,0x21,0x20,0x00,0x02,0xdd,0x44,0x00,0x0c, -0xff,0xff,0xc5,0x34,0x0f,0x00,0x07,0x3c,0xff,0xff,0xe7,0x34,0x24,0x88,0x47,0x00, -0xc0,0x02,0x82,0x36,0x00,0x00,0xd1,0xaf,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0x28,0xb0,0x02,0x3c,0x00,0x00,0x43,0x90,0xff,0x00,0x02,0x24, -0xff,0x00,0x70,0x30,0xf3,0xfb,0x02,0x12,0xc0,0x02,0x82,0x36,0x28,0xb0,0x05,0x3c, -0xff,0x00,0x04,0x24,0xc0,0x10,0x10,0x00,0x21,0x10,0x45,0x00,0x00,0x00,0x43,0x90, -0x00,0x00,0x00,0x00,0xff,0x00,0x70,0x30,0xfb,0xff,0x04,0x16,0xc0,0x10,0x10,0x00, -0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0x00,0x1f,0x02,0x32,0x02,0x1c,0x10,0x00,0x02,0x8a,0x02,0x00,0x3f,0x00,0x65,0x30, -0xc0,0x02,0x82,0x36,0xbc,0x42,0x71,0xa2,0xc1,0x42,0x65,0xa2,0x00,0x00,0x40,0xac, -0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0xff,0x00,0x07,0x3c,0x24,0x20,0x07,0x02, -0x15,0x51,0x00,0x0c,0x02,0x24,0x04,0x00,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac, -0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0xe8,0x63,0x62,0x92,0x00,0x00,0x00,0x00, -0x00,0x00,0xc2,0xaf,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0xfc,0x63,0x62,0x92,0x00,0x00,0x00,0x00,0x00,0x00,0xc2,0xaf, -0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0x00,0x00,0xe2,0x92,0x00,0x00,0x00,0x00,0xff,0x00,0x51,0x30,0x05,0x00,0x23,0x36, -0xc0,0x02,0x82,0x36,0x00,0x00,0xe3,0xa2,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0xc0,0x02,0x82,0x36,0xe6,0x63,0x60,0xa6,0x00,0x00,0x40,0xac, -0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0xbd,0x56,0x00,0x0c,0x21,0x20,0x00,0x02, -0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0x41,0x0b,0x00,0x0c,0x00,0x00,0x00,0x00,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac, -0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0xe2,0x92,0x00,0x00,0x00,0x00, -0xff,0x00,0x51,0x30,0x02,0x00,0x23,0x36,0xc0,0x02,0x82,0x36,0x00,0x00,0xe3,0xa2, -0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0x02,0x80,0x02,0x3c, -0xec,0x91,0x42,0x24,0x00,0x00,0x47,0x8c,0xc0,0x02,0x43,0x36,0x25,0xb0,0x0c,0x3c, -0x08,0x40,0xe4,0x8c,0x00,0x00,0x60,0xac,0x42,0x17,0x04,0x00,0x03,0x00,0x42,0x30, -0x60,0x00,0x40,0x14,0x03,0x0d,0x42,0x36,0x00,0x00,0x45,0x90,0x10,0x40,0xe6,0x8c, -0xff,0x9f,0x03,0x3c,0xff,0xff,0x63,0x34,0xff,0x3f,0x02,0x3c,0x24,0x20,0x83,0x00, -0xff,0xff,0x42,0x34,0x00,0x20,0x03,0x3c,0x24,0x58,0xc2,0x00,0x25,0x20,0x83,0x00, -0x00,0x40,0x02,0x3c,0x70,0x00,0xa5,0x30,0x25,0x58,0x62,0x01,0x08,0x01,0xa0,0x10, -0x08,0x40,0xe4,0xac,0x94,0x0e,0x82,0x35,0x9c,0x0e,0x83,0x35,0xa4,0x0e,0x86,0x35, -0x00,0x00,0x45,0x8c,0xac,0x0e,0x87,0x35,0x00,0x00,0x68,0x8c,0x00,0x00,0xca,0x8c, -0x02,0x80,0x06,0x3c,0x00,0x00,0xe4,0x8c,0x68,0x15,0xc6,0x24,0x0c,0x40,0xc3,0x8c, -0xb4,0x0e,0x82,0x35,0x00,0x00,0x47,0x8c,0xff,0x03,0x02,0x3c,0x00,0xfc,0x06,0x24, -0x24,0x28,0xa2,0x00,0x24,0x20,0x82,0x00,0xbc,0x0e,0x82,0x35,0x00,0x00,0x49,0x8c, -0x02,0x2c,0x05,0x00,0x24,0x10,0x66,0x01,0x24,0x18,0x66,0x00,0x02,0x24,0x04,0x00, -0xc4,0x0e,0x86,0x35,0x25,0x18,0x65,0x00,0x25,0x10,0x44,0x00,0x00,0x00,0xc5,0x8c, -0xff,0x03,0x04,0x3c,0xf0,0xff,0x06,0x3c,0xff,0x03,0xc6,0x34,0x24,0x38,0xe4,0x00, -0xcc,0x0e,0x8b,0x35,0x24,0x40,0x04,0x01,0x82,0x39,0x07,0x00,0x00,0x00,0x64,0x8d, -0x24,0x10,0x46,0x00,0x24,0x18,0x66,0x00,0x25,0x10,0x47,0x00,0x82,0x41,0x08,0x00, -0xff,0x03,0x07,0x3c,0x0f,0xc0,0x06,0x3c,0x24,0x50,0x47,0x01,0x24,0x48,0x27,0x01, -0xff,0xff,0xc6,0x34,0x25,0x18,0x68,0x00,0x24,0x28,0xa7,0x00,0x24,0x20,0x87,0x00, -0x00,0x51,0x0a,0x00,0x24,0x18,0x66,0x00,0x00,0x49,0x09,0x00,0x24,0x10,0x46,0x00, -0x02,0x80,0x07,0x3c,0x68,0x15,0xe7,0x24,0x25,0x18,0x6a,0x00,0x25,0x10,0x49,0x00, -0x02,0x2c,0x05,0x00,0x02,0x24,0x04,0x00,0x0c,0x40,0xe3,0xac,0x10,0x40,0xe2,0xac, -0x14,0x40,0xe5,0xa4,0x16,0x40,0xe4,0xa4,0x02,0x80,0x02,0x3c,0x68,0x15,0x43,0x24, -0x0c,0x40,0x62,0x8c,0x00,0x00,0x00,0x00,0xbd,0x00,0x40,0x04,0x00,0x00,0x00,0x00, -0x00,0xff,0x02,0x32,0xc6,0x00,0x40,0x10,0x00,0x00,0x00,0x00,0x02,0x12,0x02,0x00, -0xc3,0x42,0x62,0xa0,0x7a,0x54,0x00,0x0c,0x10,0x00,0xa4,0x27,0xc2,0x53,0x00,0x0c, -0x00,0x00,0x00,0x00,0x0c,0x40,0x62,0x8e,0x00,0x80,0x03,0x3c,0x25,0x10,0x43,0x00, -0x0c,0x40,0x62,0xae,0xc3,0x42,0x62,0x92,0x25,0xb0,0x03,0x3c,0x61,0x0c,0x63,0x34, -0x00,0x00,0x62,0xa0,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0xcf,0x4e,0x00,0x0c,0x21,0x20,0x00,0x02,0xc0,0x02,0x82,0x36, -0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0x17,0x51,0x00,0x0c, -0x00,0x00,0x00,0x00,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0x9e,0x00,0x83,0x36,0x00,0x00,0x40,0xa0,0x00,0x00,0x60,0xa4, -0x94,0x00,0x82,0x36,0x00,0x00,0x43,0x94,0x25,0xb0,0x06,0x3c,0x44,0x00,0xc6,0x34, -0xff,0xff,0x71,0x30,0x80,0x12,0x11,0x00,0x00,0xf8,0x42,0x24,0x42,0x89,0x02,0x00, -0x26,0xb0,0x02,0x3c,0xb0,0x03,0x83,0x36,0x7c,0x00,0x42,0x34,0x00,0x00,0x71,0xac, -0x00,0x00,0x51,0xa4,0x00,0x00,0xc3,0x94,0xff,0xfd,0x02,0x24,0x24,0x18,0x62,0x00, -0x00,0x00,0xc3,0xa4,0x00,0x00,0xc2,0x94,0x00,0x00,0x00,0x00,0x00,0x02,0x42,0x34, -0x00,0x00,0xc2,0xa4,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0x5b,0x4e,0x00,0x0c,0x01,0x00,0x04,0x24,0xc0,0x02,0x82,0x36, -0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0x80,0x10,0x08,0x00, -0x21,0x10,0x53,0x00,0xec,0x44,0x43,0xac,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac, -0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0xa7,0x0b,0x00,0x0c,0x00,0x00,0x00,0x00, -0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0x28,0xb0,0x11,0x3c,0x00,0x00,0x22,0x96,0xff,0x00,0x04,0x3c,0x24,0x18,0x04,0x02, -0x02,0x24,0x03,0x00,0xff,0x00,0x42,0x30,0x0a,0x00,0x82,0x10,0xff,0x7f,0x02,0x3c, -0x08,0x00,0x31,0x26,0x00,0x00,0x22,0x96,0xff,0xff,0x23,0x32,0xff,0x00,0x42,0x30, -0x03,0x00,0x82,0x10,0x00,0x08,0x63,0x2c,0xf9,0xff,0x60,0x14,0x00,0x00,0x00,0x00, -0xff,0x7f,0x02,0x3c,0xff,0xff,0x42,0x34,0x24,0x10,0x22,0x02,0x00,0x00,0xc2,0xaf, -0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0xf8,0x63,0x62,0x92,0x00,0x00,0x00,0x00,0x00,0x00,0xc2,0xaf,0xc0,0x02,0x82,0x36, -0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0xff,0x00,0x03,0x3c, -0x24,0x10,0x03,0x02,0x00,0xff,0x04,0x32,0xcc,0x02,0x83,0x36,0x02,0x3c,0x02,0x00, -0x00,0x00,0x70,0xac,0x04,0x00,0xe0,0x10,0x02,0x82,0x04,0x00,0x01,0x00,0x02,0x24, -0x02,0x00,0xe2,0x10,0x01,0x00,0x04,0x24,0x21,0x20,0x00,0x00,0x7a,0x42,0x00,0x0c, -0x00,0x00,0x00,0x00,0x00,0x00,0xd1,0x8f,0x0f,0x00,0x06,0x3c,0xff,0xff,0xc5,0x34, -0x21,0x20,0x00,0x02,0xba,0x44,0x00,0x0c,0x21,0x30,0x20,0x02,0x0f,0x00,0x07,0x3c, -0x21,0x20,0x00,0x02,0xdd,0x44,0x00,0x0c,0xff,0xff,0xe5,0x34,0x00,0x00,0xc2,0xaf, -0x21,0x88,0x40,0x00,0x25,0xb0,0x02,0x3c,0xc8,0x02,0x42,0x34,0x00,0x00,0x51,0xac, -0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0x25,0xb0,0x06,0x3c,0xff,0x00,0x02,0x24,0x56,0x01,0xc6,0x34,0x00,0x00,0xc2,0xa4, -0x01,0x00,0x03,0x24,0x02,0x80,0x07,0x3c,0xc0,0x02,0x82,0x36,0xb8,0x7d,0xe3,0xa0, -0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0xde,0x4f,0x00,0x0c, -0x03,0x00,0x04,0x24,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0xde,0x4e,0x00,0x0c,0x21,0x20,0x00,0x02,0xc0,0x02,0x82,0x36, -0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0x08,0x40,0x62,0x8e, -0xff,0x9f,0x04,0x3c,0xff,0xff,0x84,0x34,0x24,0x10,0x44,0x00,0x08,0x40,0x62,0xae, -0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0xc0,0x10,0x03,0x00,0x21,0x10,0x43,0x00,0x80,0x10,0x02,0x00,0x21,0x10,0x43,0x00, -0x80,0x10,0x02,0x00,0x21,0x10,0x53,0x00,0x70,0x51,0x43,0x8c,0xc0,0x02,0x82,0x36, -0x00,0x00,0xc3,0xaf,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0x7a,0x54,0x00,0x0c,0x10,0x00,0xa4,0x27,0xc3,0x42,0x62,0x92,0x25,0xb0,0x03,0x3c, -0x61,0x0c,0x63,0x34,0x00,0x00,0x62,0xa0,0xd4,0x4c,0x00,0x08,0xc0,0x02,0x82,0x36, -0x22,0x51,0x00,0x0c,0x10,0x40,0xeb,0xac,0xbd,0x4c,0x00,0x08,0x02,0x80,0x02,0x3c, -0xc6,0x4c,0x00,0x08,0x12,0x00,0x02,0x24,0x1a,0x57,0x00,0x0c,0x00,0x00,0x00,0x00, -0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0xff,0xff,0x02,0x34,0x8c,0x65,0x62,0xae,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac, -0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0xc0,0x10,0x03,0x00,0x21,0x10,0x43,0x00, -0x80,0x10,0x02,0x00,0x21,0x10,0x43,0x00,0x80,0x10,0x02,0x00,0x21,0x10,0x53,0x00, -0x74,0x51,0x43,0x8c,0xc0,0x02,0x82,0x36,0x00,0x00,0xc3,0xaf,0x00,0x00,0x40,0xac, -0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0xc0,0x10,0x03,0x00,0x21,0x10,0x43,0x00, -0x80,0x10,0x02,0x00,0x21,0x10,0x43,0x00,0x80,0x10,0x02,0x00,0x21,0x10,0x53,0x00, -0xd4,0x51,0x43,0x8c,0xc0,0x02,0x82,0x36,0x00,0x00,0xc3,0xaf,0x00,0x00,0x40,0xac, -0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0xc0,0x10,0x03,0x00,0x21,0x10,0x43,0x00, -0x80,0x10,0x02,0x00,0x21,0x10,0x43,0x00,0x02,0x80,0x06,0x3c,0x80,0x10,0x02,0x00, -0xe0,0x66,0xc3,0x24,0x21,0x10,0x43,0x00,0x00,0x00,0x44,0x8c,0xc0,0x02,0x82,0x36, -0x00,0x00,0xc4,0xaf,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00, -0x12,0x00,0x02,0x24,0xc7,0x42,0xa2,0xa1,0x77,0x4a,0x00,0x08,0xc3,0x42,0xa2,0xa1, -0x88,0x7d,0x82,0x94,0x00,0x00,0x00,0x00,0x00,0x00,0xc2,0xaf,0xc0,0x02,0x82,0x36, -0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0x7a,0x42,0x00,0x0c, -0x21,0x20,0x00,0x00,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0xff,0x00,0x06,0x3c,0x00,0xff,0xc6,0x34,0x00,0x00,0xc5,0x8f, -0x24,0x20,0x06,0x02,0xe1,0x50,0x00,0x0c,0x02,0x22,0x04,0x00,0xc0,0x02,0x82,0x36, -0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0xc0,0x10,0x03,0x00, -0x21,0x10,0x43,0x00,0x80,0x10,0x02,0x00,0x21,0x10,0x43,0x00,0x02,0x80,0x07,0x3c, -0x80,0x10,0x02,0x00,0xf0,0x66,0xe3,0x24,0x21,0x10,0x43,0x00,0x00,0x00,0x44,0x8c, -0xc0,0x02,0x82,0x36,0x00,0x00,0xc4,0xaf,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0xc0,0x10,0x03,0x00,0x21,0x10,0x43,0x00,0x80,0x10,0x02,0x00, -0x21,0x10,0x43,0x00,0x02,0x80,0x06,0x3c,0x80,0x10,0x02,0x00,0xec,0x66,0xc3,0x24, -0x21,0x10,0x43,0x00,0x00,0x00,0x44,0x8c,0xc0,0x02,0x82,0x36,0x00,0x00,0xc4,0xaf, -0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0xc0,0x10,0x03,0x00, -0x21,0x10,0x43,0x00,0x80,0x10,0x02,0x00,0x21,0x10,0x43,0x00,0x02,0x80,0x04,0x3c, -0xe8,0x66,0x83,0x24,0x80,0x10,0x02,0x00,0x21,0x10,0x43,0x00,0x00,0x00,0x44,0x8c, -0xc0,0x02,0x82,0x36,0x00,0x00,0xc4,0xaf,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0xc0,0x10,0x03,0x00,0x21,0x10,0x43,0x00,0x80,0x10,0x02,0x00, -0x21,0x10,0x43,0x00,0x02,0x80,0x07,0x3c,0x80,0x10,0x02,0x00,0xe4,0x66,0xe3,0x24, -0x21,0x10,0x43,0x00,0x00,0x00,0x44,0x8c,0xc0,0x02,0x82,0x36,0x00,0x00,0xc4,0xaf, -0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0xc0,0x10,0x03,0x00, -0x21,0x10,0x43,0x00,0x80,0x10,0x02,0x00,0x21,0x10,0x43,0x00,0x02,0x80,0x04,0x3c, -0x00,0x67,0x83,0x24,0x80,0x10,0x02,0x00,0x21,0x10,0x43,0x00,0x00,0x00,0x44,0x8c, -0xc0,0x02,0x82,0x36,0x00,0x00,0xc4,0xaf,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0xc0,0x10,0x03,0x00,0x21,0x10,0x43,0x00,0x80,0x10,0x02,0x00, -0x21,0x10,0x43,0x00,0x02,0x80,0x07,0x3c,0x80,0x10,0x02,0x00,0xfc,0x66,0xe3,0x24, -0x21,0x10,0x43,0x00,0x00,0x00,0x44,0x8c,0xc0,0x02,0x82,0x36,0x00,0x00,0xc4,0xaf, -0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0xc0,0x10,0x03,0x00, -0x21,0x10,0x43,0x00,0x80,0x10,0x02,0x00,0x21,0x10,0x43,0x00,0x02,0x80,0x06,0x3c, -0x80,0x10,0x02,0x00,0xf8,0x66,0xc3,0x24,0x21,0x10,0x43,0x00,0x00,0x00,0x44,0x8c, -0xc0,0x02,0x82,0x36,0x00,0x00,0xc4,0xaf,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0xc0,0x10,0x03,0x00,0x21,0x10,0x43,0x00,0x80,0x10,0x02,0x00, -0x21,0x10,0x43,0x00,0x02,0x80,0x04,0x3c,0xf4,0x66,0x83,0x24,0x80,0x10,0x02,0x00, -0x21,0x10,0x43,0x00,0x00,0x00,0x44,0x8c,0xc0,0x02,0x82,0x36,0x00,0x00,0xc4,0xaf, -0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0xde,0x4f,0x00,0x0c, -0x02,0x00,0x04,0x24,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0xde,0x4f,0x00,0x0c,0x01,0x00,0x04,0x24,0xc0,0x02,0x82,0x36, -0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08,0x00,0x00,0x00,0x00,0x7a,0x42,0x00,0x0c, -0x01,0x00,0x04,0x24,0xc0,0x02,0x82,0x36,0x00,0x00,0x40,0xac,0x08,0x48,0x00,0x08, -0x00,0x00,0x00,0x00,0x25,0xb0,0x05,0x3c,0x01,0x00,0x06,0x24,0x01,0x80,0x02,0x3c, -0x04,0x30,0x86,0x00,0xf1,0x02,0xa7,0x34,0xed,0x02,0xa4,0x34,0x6c,0x39,0x42,0x24, -0x18,0x03,0xa5,0x34,0x08,0x00,0x03,0x24,0x00,0x00,0xa2,0xac,0x00,0x00,0xe3,0xa0, -0x00,0x00,0x80,0xa0,0x00,0x00,0x86,0xa0,0x00,0x00,0x80,0xa0,0x00,0x00,0x86,0xa0, -0x00,0x00,0x80,0xa0,0x00,0x00,0x86,0xa0,0x00,0x00,0x80,0xa0,0x00,0x00,0x86,0xa0, -0x00,0x00,0x80,0xa0,0x00,0x00,0xe0,0xa0,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0x01,0x80,0x02,0x3c,0x25,0xb0,0x03,0x3c,0xc8,0x39,0x42,0x24,0x18,0x03,0x63,0x34, -0x00,0x00,0x62,0xac,0x00,0x00,0x83,0x90,0x30,0x00,0x02,0x24,0x05,0x00,0x62,0x10, -0x21,0x20,0x00,0x00,0x31,0x00,0x02,0x24,0x02,0x00,0x62,0x10,0x01,0x00,0x04,0x24, -0x07,0x00,0x04,0x24,0x5b,0x4e,0x00,0x08,0x00,0x00,0x00,0x00,0x01,0x80,0x02,0x3c, -0x25,0xb0,0x03,0x3c,0x04,0x3a,0x42,0x24,0x18,0x03,0x63,0x34,0x02,0x80,0x04,0x3c, -0x00,0x00,0x62,0xac,0x08,0x00,0xe0,0x03,0xc4,0x7d,0x80,0xac,0x02,0x80,0x02,0x3c, -0x08,0x7b,0x42,0x24,0xc0,0x20,0x04,0x00,0x21,0x20,0x82,0x00,0x21,0x28,0x00,0x00, -0x00,0x60,0x06,0x40,0x01,0x00,0xc1,0x34,0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40, -0x00,0x00,0x82,0x8c,0x00,0x00,0x00,0x00,0x09,0x00,0x44,0x10,0x00,0x00,0x00,0x00, -0x04,0x00,0x43,0x8c,0x21,0x28,0x40,0x00,0x00,0x00,0x42,0x8c,0x00,0x00,0x00,0x00, -0x00,0x00,0x62,0xac,0x04,0x00,0x43,0xac,0x00,0x00,0xa5,0xac,0x04,0x00,0xa5,0xac, -0x00,0x60,0x86,0x40,0x08,0x00,0xe0,0x03,0x21,0x10,0xa0,0x00,0x21,0x18,0x80,0x00, -0xe8,0xff,0xbd,0x27,0x01,0x01,0x62,0x2c,0x10,0x00,0xbf,0xaf,0x01,0x00,0x04,0x24, -0x01,0x02,0x65,0x2c,0x0a,0x00,0x40,0x14,0x21,0x30,0x00,0x00,0x02,0x00,0x04,0x24, -0x07,0x00,0xa0,0x14,0x01,0x08,0x62,0x2c,0x05,0x00,0x40,0x14,0x03,0x00,0x04,0x24, -0x10,0x00,0xbf,0x8f,0x21,0x10,0xc0,0x00,0x08,0x00,0xe0,0x03,0x18,0x00,0xbd,0x27, -0x89,0x4e,0x00,0x0c,0x00,0x00,0x00,0x00,0x10,0x00,0xbf,0x8f,0x21,0x30,0x40,0x00, -0x21,0x10,0xc0,0x00,0x08,0x00,0xe0,0x03,0x18,0x00,0xbd,0x27,0x02,0x80,0x03,0x3c, -0x20,0x7b,0x62,0x8c,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x00,0x60,0x06,0x40, -0x01,0x00,0xc1,0x34,0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40,0x10,0x00,0x83,0x8c, -0x02,0x80,0x02,0x3c,0x08,0x7b,0x42,0x24,0xc0,0x18,0x03,0x00,0x21,0x18,0x62,0x00, -0x00,0x00,0x65,0x8c,0x00,0x00,0x00,0x00,0x00,0x00,0x85,0xac,0x04,0x00,0xa4,0xac, -0x00,0x00,0x64,0xac,0x04,0x00,0x83,0xac,0x00,0x60,0x86,0x40,0x08,0x00,0xe0,0x03, -0x00,0x00,0x00,0x00,0x02,0x24,0x04,0x00,0xff,0x00,0x84,0x30,0xc0,0x18,0x04,0x00, -0x21,0x18,0x64,0x00,0x80,0x18,0x03,0x00,0x21,0x18,0x64,0x00,0x02,0x80,0x02,0x3c, -0x68,0x15,0x42,0x24,0x80,0x18,0x03,0x00,0x21,0x18,0x62,0x00,0x78,0x51,0x64,0x8c, -0xff,0xf1,0x02,0x24,0x24,0x20,0x82,0x00,0x08,0x00,0xe0,0x03,0x78,0x51,0x64,0xac, -0x02,0x24,0x04,0x00,0xff,0x00,0x84,0x30,0xc0,0x18,0x04,0x00,0x21,0x18,0x64,0x00, -0x80,0x18,0x03,0x00,0x21,0x18,0x64,0x00,0x02,0x80,0x02,0x3c,0x68,0x15,0x42,0x24, -0x80,0x18,0x03,0x00,0x21,0x18,0x62,0x00,0x78,0x51,0x64,0x8c,0xff,0xf1,0x02,0x24, -0x24,0x20,0x82,0x00,0x00,0x02,0x84,0x34,0x08,0x00,0xe0,0x03,0x78,0x51,0x64,0xac, -0xe0,0xff,0xbd,0x27,0x10,0x00,0xb0,0xaf,0xc0,0x80,0x04,0x00,0x21,0x80,0x04,0x02, -0x80,0x80,0x10,0x00,0x21,0x80,0x04,0x02,0x02,0x80,0x02,0x3c,0x68,0x15,0x42,0x24, -0x80,0x80,0x10,0x00,0x21,0x80,0x02,0x02,0x1c,0x00,0xbf,0xaf,0x18,0x00,0xb2,0xaf, -0x14,0x00,0xb1,0xaf,0x78,0x51,0x05,0x8e,0xff,0x1f,0x02,0x3c,0x25,0xb0,0x12,0x3c, -0xff,0xff,0x42,0x34,0x70,0x51,0x02,0xae,0x84,0x01,0x43,0x36,0xf8,0xff,0x02,0x24, -0x00,0x00,0x66,0x8c,0x24,0x28,0xa2,0x00,0xff,0xfe,0x02,0x24,0x24,0x28,0xa2,0x00, -0xff,0xef,0x03,0x24,0x24,0x28,0xa3,0x00,0x74,0x51,0x06,0xae,0x78,0x51,0x05,0xae, -0xce,0x0d,0x00,0x0c,0x21,0x88,0x80,0x00,0x7a,0x51,0x02,0x92,0x21,0x88,0x32,0x02, -0x1c,0x00,0xbf,0x8f,0x60,0x01,0x22,0xa2,0x18,0x00,0xb2,0x8f,0x64,0x51,0x00,0xae, -0x48,0x51,0x00,0xae,0x4c,0x51,0x00,0xae,0x50,0x51,0x00,0xae,0x54,0x51,0x00,0xae, -0x58,0x51,0x00,0xae,0x5c,0x51,0x00,0xae,0x60,0x51,0x00,0xae,0x14,0x00,0xb1,0x8f, -0x10,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03,0x20,0x00,0xbd,0x27,0xff,0x00,0xa5,0x30, -0xc0,0x10,0x05,0x00,0x21,0x10,0x45,0x00,0x80,0x10,0x02,0x00,0x21,0x10,0x45,0x00, -0x02,0x80,0x03,0x3c,0x68,0x15,0x63,0x24,0x80,0x10,0x02,0x00,0x21,0x10,0x43,0x00, -0x78,0x51,0x43,0x8c,0x25,0xb0,0x05,0x3c,0xff,0x00,0xc6,0x30,0x21,0x30,0xc5,0x00, -0xaf,0x01,0xc2,0x90,0x07,0x00,0x63,0x30,0x80,0x18,0x03,0x00,0x21,0x18,0x65,0x00, -0xff,0x00,0x88,0x30,0xff,0x00,0x49,0x30,0x84,0x01,0x66,0x8c,0x21,0x50,0x00,0x00, -0x21,0x58,0x00,0x00,0x2b,0x00,0x20,0x11,0x21,0x20,0x00,0x01,0x2b,0x00,0xc0,0x10, -0x2b,0x10,0x09,0x01,0x21,0x28,0x00,0x00,0x3e,0x4f,0x00,0x08,0x01,0x00,0x07,0x24, -0xff,0x00,0x65,0x30,0x1d,0x00,0xa2,0x2c,0x07,0x00,0x40,0x10,0xff,0xff,0x02,0x25, -0x04,0x10,0xa7,0x00,0x24,0x10,0x46,0x00,0xf9,0xff,0x40,0x10,0x01,0x00,0xa3,0x24, -0x21,0x58,0xa0,0x00,0xff,0xff,0x02,0x25,0xff,0x00,0x45,0x30,0x2b,0x18,0xab,0x00, -0x0f,0x00,0x60,0x14,0x2b,0x10,0x49,0x01,0x01,0x00,0x04,0x24,0x04,0x10,0xa4,0x00, -0x24,0x10,0x46,0x00,0xff,0xff,0xa7,0x24,0x04,0x00,0x40,0x10,0x01,0x00,0x43,0x25, -0x17,0x00,0x49,0x11,0xff,0x00,0x6a,0x30,0x21,0x40,0xa0,0x00,0xff,0x00,0xe5,0x30, -0x2b,0x10,0xab,0x00,0xf6,0xff,0x40,0x10,0x04,0x10,0xa4,0x00,0x2b,0x10,0x49,0x01, -0x08,0x00,0x40,0x10,0x21,0x20,0x00,0x01,0x23,0x10,0x2a,0x01,0x2a,0x10,0x62,0x01, -0x04,0x00,0x40,0x14,0x21,0x20,0x00,0x00,0x23,0x10,0x69,0x01,0x21,0x10,0x4a,0x00, -0xff,0x00,0x44,0x30,0x08,0x00,0xe0,0x03,0x21,0x10,0x80,0x00,0xfd,0xff,0x40,0x14, -0x21,0x20,0x00,0x00,0x23,0x10,0x09,0x01,0x5f,0x4f,0x00,0x08,0xff,0x00,0x44,0x30, -0x21,0x20,0x00,0x01,0x08,0x00,0xe0,0x03,0x21,0x10,0x80,0x00,0xff,0x00,0x84,0x30, -0xc0,0x10,0x04,0x00,0x21,0x10,0x44,0x00,0x80,0x10,0x02,0x00,0x21,0x10,0x44,0x00, -0x02,0x80,0x03,0x3c,0x68,0x15,0x63,0x24,0x80,0x10,0x02,0x00,0x21,0x10,0x43,0x00, -0x25,0xb0,0x06,0x3c,0x78,0x51,0x43,0x8c,0xff,0x00,0xa5,0x30,0x21,0x20,0x86,0x00, -0x21,0x28,0xa6,0x00,0x60,0x01,0x82,0x90,0xaf,0x01,0xa4,0x90,0x07,0x00,0x63,0x30, -0x80,0x18,0x03,0x00,0x21,0x18,0x66,0x00,0xff,0x00,0x48,0x30,0xff,0x00,0x89,0x30, -0x84,0x01,0x66,0x8c,0x21,0x50,0x00,0x00,0x21,0x58,0x00,0x00,0x2b,0x00,0x20,0x11, -0x21,0x20,0x00,0x01,0x2b,0x00,0xc0,0x10,0x2b,0x10,0x09,0x01,0x21,0x28,0x00,0x00, -0x8c,0x4f,0x00,0x08,0x01,0x00,0x07,0x24,0xff,0x00,0x65,0x30,0x1d,0x00,0xa2,0x2c, -0x07,0x00,0x40,0x10,0xff,0xff,0x02,0x25,0x04,0x10,0xa7,0x00,0x24,0x10,0x46,0x00, -0xf9,0xff,0x40,0x10,0x01,0x00,0xa3,0x24,0x21,0x58,0xa0,0x00,0xff,0xff,0x02,0x25, -0xff,0x00,0x45,0x30,0x2b,0x18,0xab,0x00,0x0f,0x00,0x60,0x14,0x2b,0x10,0x49,0x01, -0x01,0x00,0x04,0x24,0x04,0x10,0xa4,0x00,0x24,0x10,0x46,0x00,0xff,0xff,0xa7,0x24, -0x04,0x00,0x40,0x10,0x01,0x00,0x43,0x25,0x17,0x00,0x49,0x11,0xff,0x00,0x6a,0x30, -0x21,0x40,0xa0,0x00,0xff,0x00,0xe5,0x30,0x2b,0x10,0xab,0x00,0xf6,0xff,0x40,0x10, -0x04,0x10,0xa4,0x00,0x2b,0x10,0x49,0x01,0x08,0x00,0x40,0x10,0x21,0x20,0x00,0x01, -0x23,0x10,0x2a,0x01,0x2a,0x10,0x62,0x01,0x04,0x00,0x40,0x14,0x21,0x20,0x00,0x00, -0x23,0x10,0x69,0x01,0x21,0x10,0x4a,0x00,0xff,0x00,0x44,0x30,0x08,0x00,0xe0,0x03, -0x21,0x10,0x80,0x00,0xfd,0xff,0x40,0x14,0x21,0x20,0x00,0x00,0x23,0x10,0x09,0x01, -0xad,0x4f,0x00,0x08,0xff,0x00,0x44,0x30,0x21,0x20,0x00,0x01,0x08,0x00,0xe0,0x03, -0x21,0x10,0x80,0x00,0xe0,0xff,0xbd,0x27,0x02,0x80,0x02,0x3c,0x10,0x00,0xb0,0xaf, -0x68,0x15,0x50,0x24,0x18,0x00,0xb2,0xaf,0x14,0x00,0xb1,0xaf,0x1c,0x00,0xbf,0xaf, -0x21,0x88,0x00,0x00,0x21,0x90,0x00,0x02,0xee,0x4e,0x00,0x0c,0x21,0x20,0x20,0x02, -0x7a,0x51,0x02,0x92,0x21,0x28,0x00,0x00,0x80,0x10,0x02,0x00,0x21,0x10,0x52,0x00, -0xec,0x44,0x44,0x8c,0x60,0x45,0x43,0x8c,0x00,0x00,0x00,0x00,0x21,0x18,0x64,0x00, -0x42,0x18,0x03,0x00,0x44,0x51,0x03,0xae,0x21,0x10,0x05,0x02,0x01,0x00,0xa5,0x24, -0x1d,0x00,0xa3,0x28,0xb6,0x51,0x40,0xa0,0x7c,0x51,0x40,0xa0,0xfa,0xff,0x60,0x14, -0x99,0x51,0x40,0xa0,0x01,0x00,0x31,0x26,0x20,0x00,0x22,0x2a,0xd4,0x51,0x00,0xae, -0xe9,0xff,0x40,0x14,0x94,0x00,0x10,0x26,0x1c,0x00,0xbf,0x8f,0x18,0x00,0xb2,0x8f, -0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03,0x20,0x00,0xbd,0x27, -0xc8,0xff,0xbd,0x27,0x02,0x80,0x02,0x3c,0x30,0x00,0xbe,0xaf,0x28,0x00,0xb6,0xaf, -0x68,0x15,0x46,0x24,0x34,0x00,0xbf,0xaf,0x2c,0x00,0xb7,0xaf,0x24,0x00,0xb5,0xaf, -0x20,0x00,0xb4,0xaf,0x1c,0x00,0xb3,0xaf,0x18,0x00,0xb2,0xaf,0x14,0x00,0xb1,0xaf, -0x10,0x00,0xb0,0xaf,0x8c,0x65,0xc2,0x8c,0xff,0x00,0x8d,0x30,0xff,0x00,0x03,0x24, -0xff,0xff,0x42,0x38,0x21,0xf0,0x00,0x00,0xff,0xff,0x04,0x34,0x0a,0xf0,0x62,0x00, -0x8c,0x65,0xc4,0xac,0xb0,0x00,0xa0,0x11,0x08,0x00,0x16,0x24,0x02,0x80,0x02,0x3c, -0xb8,0x90,0x45,0x24,0x90,0x44,0xc4,0x24,0xff,0x4f,0x00,0x08,0x21,0x88,0x00,0x00, -0x01,0x00,0x31,0x26,0x00,0x00,0x82,0xa0,0x1d,0x00,0x22,0x2a,0x0b,0x00,0x40,0x10, -0x01,0x00,0x84,0x24,0x21,0x10,0x25,0x02,0x00,0x00,0x42,0x90,0x00,0x00,0x00,0x00, -0xf7,0xff,0x40,0x10,0xfd,0xff,0x43,0x24,0x01,0x00,0x31,0x26,0x1d,0x00,0x22,0x2a, -0x00,0x00,0x83,0xa0,0xf7,0xff,0x40,0x14,0x01,0x00,0x84,0x24,0x02,0x80,0x02,0x3c, -0x68,0x15,0x4a,0x24,0x02,0x80,0x03,0x3c,0x02,0x80,0x02,0x3c,0x50,0x8e,0x6c,0x24, -0xd8,0x8d,0x4b,0x24,0x21,0x88,0x00,0x00,0x21,0x48,0x00,0x00,0x21,0x30,0x00,0x00, -0x21,0x40,0x2a,0x01,0x21,0x38,0x2c,0x01,0x21,0x10,0xe6,0x00,0x91,0x00,0x44,0x90, -0x00,0x00,0x45,0x90,0x21,0x18,0x06,0x01,0x01,0x00,0xc6,0x24,0x05,0x00,0xc2,0x28, -0xc5,0x43,0x64,0xa0,0xf8,0xff,0x40,0x14,0x34,0x43,0x65,0xa0,0x21,0x10,0x2b,0x02, -0x1d,0x00,0x44,0x90,0x00,0x00,0x45,0x90,0x21,0x18,0x2a,0x02,0x01,0x00,0x31,0x26, -0x1d,0x00,0x22,0x2a,0x73,0x44,0x64,0xa0,0x56,0x44,0x65,0xa0,0xeb,0xff,0x40,0x14, -0x05,0x00,0x29,0x25,0xa6,0x00,0xa0,0x11,0x02,0x80,0x02,0x3c,0x68,0x15,0x48,0x24, -0x02,0x80,0x03,0x3c,0x02,0x80,0x02,0x3c,0x4c,0x91,0x69,0x24,0xd8,0x90,0x47,0x24, -0x21,0x88,0x00,0x00,0x80,0x18,0x11,0x00,0x21,0x10,0x69,0x00,0x21,0x20,0x67,0x00, -0x00,0x00,0x46,0x8c,0x00,0x00,0x85,0x8c,0x01,0x00,0x31,0x26,0x21,0x18,0x68,0x00, -0x04,0x00,0x22,0x2a,0xec,0x44,0x65,0xac,0xf6,0xff,0x40,0x14,0x60,0x45,0x66,0xac, -0x02,0x80,0x02,0x3c,0x68,0x15,0x49,0x24,0x02,0x80,0x03,0x3c,0x02,0x80,0x02,0x3c, -0x4c,0x91,0x68,0x24,0xd8,0x90,0x47,0x24,0x04,0x00,0x11,0x24,0x80,0x20,0x11,0x00, -0x21,0x10,0x88,0x00,0x21,0x30,0x87,0x00,0x00,0x00,0x45,0x8c,0x00,0x00,0xc3,0x8c, -0x01,0x00,0x31,0x26,0x21,0x20,0x89,0x00,0x82,0x28,0x05,0x00,0x82,0x18,0x03,0x00, -0x1d,0x00,0x22,0x2a,0xec,0x44,0x83,0xac,0xf4,0xff,0x40,0x14,0x60,0x45,0x85,0xac, -0x02,0x80,0x02,0x3c,0x68,0x15,0x55,0x24,0x21,0x88,0x00,0x00,0x21,0xb8,0xa0,0x02, -0x21,0xa0,0x00,0x00,0x5a,0x50,0x00,0x08,0x21,0x90,0xa0,0x02,0x01,0x00,0x31,0x26, -0x20,0x00,0x22,0x2a,0x94,0x00,0x52,0x26,0x38,0x00,0x40,0x10,0x94,0x00,0x94,0x26, -0x78,0x51,0x44,0x8e,0x01,0x00,0x03,0x24,0x02,0x13,0x04,0x00,0x01,0x00,0x53,0x30, -0xf6,0xff,0x63,0x16,0x07,0x00,0x82,0x30,0x25,0xb0,0x03,0x3c,0x80,0x10,0x02,0x00, -0x21,0x10,0x43,0x00,0x84,0x01,0x45,0x8c,0x70,0x51,0x43,0x8e,0x21,0x20,0x20,0x02, -0x24,0x28,0xa3,0x00,0xce,0x0d,0x00,0x0c,0x74,0x51,0x45,0xae,0x7a,0x51,0x44,0x92, -0x5c,0x0d,0x00,0x0c,0xff,0x00,0x25,0x32,0x7a,0x51,0x50,0x92,0x00,0x00,0x00,0x00, -0x21,0x20,0x00,0x02,0x63,0x0d,0x00,0x0c,0x80,0x80,0x10,0x00,0x21,0x80,0x17,0x02, -0x48,0x51,0x40,0xae,0x4c,0x51,0x40,0xae,0x50,0x51,0x40,0xae,0x54,0x51,0x40,0xae, -0x58,0x51,0x40,0xae,0x5c,0x51,0x40,0xae,0x60,0x51,0x40,0xae,0x64,0x51,0x40,0xae, -0xec,0x44,0x04,0x8e,0x60,0x45,0x03,0x8e,0x26,0x10,0x53,0x00,0x21,0x30,0x00,0x00, -0x21,0x18,0x64,0x00,0x42,0x18,0x03,0x00,0x04,0x00,0x04,0x24,0x0a,0xb0,0x82,0x00, -0x44,0x51,0x43,0xae,0x21,0x20,0x95,0x02,0x21,0x10,0x86,0x00,0x01,0x00,0xc6,0x24, -0x1d,0x00,0xc3,0x28,0xb6,0x51,0x40,0xa0,0x7c,0x51,0x40,0xa0,0xfa,0xff,0x60,0x14, -0x99,0x51,0x40,0xa0,0x01,0x00,0x31,0x26,0x20,0x00,0x22,0x2a,0xd4,0x51,0x80,0xac, -0x94,0x00,0x52,0x26,0xca,0xff,0x40,0x14,0x94,0x00,0x94,0x26,0x25,0xb0,0x02,0x3c, -0x80,0x01,0x42,0x34,0x00,0x00,0x56,0xa0,0x03,0x00,0xc0,0x17,0x02,0x80,0x03,0x3c, -0x68,0x15,0x62,0x24,0x8c,0x65,0x40,0xac,0x34,0x00,0xbf,0x8f,0x30,0x00,0xbe,0x8f, -0x2c,0x00,0xb7,0x8f,0x28,0x00,0xb6,0x8f,0x24,0x00,0xb5,0x8f,0x20,0x00,0xb4,0x8f, -0x1c,0x00,0xb3,0x8f,0x18,0x00,0xb2,0x8f,0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f, -0x08,0x00,0xe0,0x03,0x38,0x00,0xbd,0x27,0x02,0x80,0x02,0x3c,0xb8,0x90,0x45,0x24, -0x90,0x44,0xc4,0x24,0x21,0x88,0x00,0x00,0x21,0x10,0x25,0x02,0x00,0x00,0x43,0x90, -0x01,0x00,0x31,0x26,0x1d,0x00,0x22,0x2a,0x00,0x00,0x83,0xa0,0xfa,0xff,0x40,0x14, -0x01,0x00,0x84,0x24,0x02,0x80,0x02,0x3c,0x68,0x15,0x4a,0x24,0x02,0x80,0x03,0x3c, -0x02,0x80,0x02,0x3c,0x74,0x8f,0x6c,0x24,0x14,0x8e,0x4b,0x24,0x21,0x88,0x00,0x00, -0x21,0x48,0x00,0x00,0x21,0x30,0x00,0x00,0x21,0x40,0x2a,0x01,0x21,0x38,0x2c,0x01, -0x21,0x10,0xe6,0x00,0x91,0x00,0x44,0x90,0x00,0x00,0x45,0x90,0x21,0x18,0x06,0x01, -0x01,0x00,0xc6,0x24,0x05,0x00,0xc2,0x28,0xc5,0x43,0x64,0xa0,0xf8,0xff,0x40,0x14, -0x34,0x43,0x65,0xa0,0x21,0x10,0x2b,0x02,0x1d,0x00,0x44,0x90,0x00,0x00,0x45,0x90, -0x21,0x18,0x2a,0x02,0x01,0x00,0x31,0x26,0x1d,0x00,0x22,0x2a,0x73,0x44,0x64,0xa0, -0x56,0x44,0x65,0xa0,0xeb,0xff,0x40,0x14,0x05,0x00,0x29,0x25,0x02,0x80,0x02,0x3c, -0x68,0x15,0x49,0x24,0x02,0x80,0x03,0x3c,0x02,0x80,0x02,0x3c,0x4c,0x91,0x68,0x24, -0xd8,0x90,0x47,0x24,0x21,0x88,0x00,0x00,0x80,0x18,0x11,0x00,0x21,0x10,0x68,0x00, -0x21,0x20,0x67,0x00,0x00,0x00,0x46,0x8c,0x00,0x00,0x85,0x8c,0x01,0x00,0x31,0x26, -0x21,0x18,0x69,0x00,0x1d,0x00,0x22,0x2a,0xec,0x44,0x65,0xac,0xf6,0xff,0x40,0x14, -0x60,0x45,0x66,0xac,0x4f,0x50,0x00,0x08,0x02,0x80,0x02,0x3c,0xd8,0xff,0xbd,0x27, -0xff,0xff,0x84,0x30,0x18,0x00,0xb2,0xaf,0xf0,0x01,0x92,0x30,0x02,0x91,0x12,0x00, -0x14,0x00,0xb1,0xaf,0xc0,0x88,0x12,0x00,0x21,0x88,0x32,0x02,0x80,0x88,0x11,0x00, -0x21,0x88,0x32,0x02,0x02,0x80,0x02,0x3c,0x68,0x15,0x42,0x24,0x80,0x88,0x11,0x00, -0x21,0x88,0x22,0x02,0x20,0x00,0xbf,0xaf,0x1c,0x00,0xb3,0xaf,0x10,0x00,0xb0,0xaf, -0x78,0x51,0x30,0x8e,0x00,0x02,0x82,0x30,0xff,0xfe,0x03,0x24,0x2b,0x10,0x02,0x00, -0x00,0x10,0x10,0x36,0x24,0x80,0x03,0x02,0x00,0x12,0x02,0x00,0x25,0x80,0x02,0x02, -0x70,0x51,0x25,0xae,0x78,0x51,0x30,0xae,0xa0,0x0e,0x00,0x0c,0x21,0x98,0xa0,0x00, -0xf8,0xff,0x03,0x24,0x24,0x80,0x03,0x02,0x07,0x00,0x42,0x30,0x25,0x80,0x02,0x02, -0x07,0x00,0x03,0x32,0x25,0xb0,0x02,0x3c,0x80,0x18,0x03,0x00,0x78,0x51,0x30,0xae, -0x21,0x18,0x62,0x00,0x84,0x01,0x62,0x8c,0x21,0x20,0x40,0x02,0x24,0x10,0x53,0x00, -0xce,0x0d,0x00,0x0c,0x74,0x51,0x22,0xae,0x7a,0x51,0x24,0x92,0x21,0x28,0x40,0x02, -0x20,0x00,0xbf,0x8f,0x1c,0x00,0xb3,0x8f,0x18,0x00,0xb2,0x8f,0x14,0x00,0xb1,0x8f, -0x10,0x00,0xb0,0x8f,0x5c,0x0d,0x00,0x08,0x28,0x00,0xbd,0x27,0xee,0x4e,0x00,0x08, -0xff,0x00,0x84,0x30,0x02,0x80,0x02,0x3c,0x68,0x15,0x43,0x24,0x1f,0x00,0x04,0x24, -0x78,0x51,0x62,0x8c,0xff,0xff,0x84,0x24,0x00,0x10,0x42,0x34,0x78,0x51,0x62,0xac, -0xfb,0xff,0x81,0x04,0x94,0x00,0x63,0x24,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0x78,0xff,0xbd,0x27,0x60,0x00,0xb0,0xaf,0x25,0xb0,0x10,0x3c,0x70,0x00,0xb4,0xaf, -0xc4,0x02,0x14,0x36,0x00,0x00,0x80,0xae,0x74,0x00,0xb5,0xaf,0x6c,0x00,0xb3,0xaf, -0x68,0x00,0xb2,0xaf,0x64,0x00,0xb1,0xaf,0x84,0x00,0xbf,0xaf,0x80,0x00,0xbe,0xaf, -0x7c,0x00,0xb7,0xaf,0x78,0x00,0xb6,0xaf,0x04,0x00,0x02,0x36,0x04,0x0c,0x13,0x36, -0x00,0x00,0x43,0x8c,0x00,0x00,0x62,0x8e,0x0f,0x00,0x11,0x3c,0x24,0x18,0x71,0x00, -0x08,0x0c,0x12,0x36,0x4c,0x00,0xa2,0xaf,0x02,0xac,0x03,0x00,0x00,0x00,0x43,0x8e, -0x00,0x00,0x00,0x00,0x50,0x00,0xa3,0xaf,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34, -0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40,0x21,0x20,0x00,0x00,0xdd,0x44,0x00,0x0c, -0xff,0xff,0x25,0x36,0x10,0x00,0xa2,0xaf,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34, -0x00,0x60,0x81,0x40,0xb3,0x0a,0x00,0x0c,0x64,0x00,0x04,0x24,0x7a,0x42,0x00,0x0c, -0x01,0x00,0x04,0x24,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x01,0x00,0x21,0x38, -0x00,0x60,0x81,0x40,0x21,0x20,0x00,0x00,0xdd,0x44,0x00,0x0c,0xff,0xff,0x25,0x36, -0x14,0x00,0xa2,0xaf,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40, -0xb3,0x0a,0x00,0x0c,0x64,0x00,0x04,0x24,0x7a,0x42,0x00,0x0c,0x21,0x20,0x00,0x00, -0xe0,0x0e,0x05,0x36,0x00,0x00,0xad,0x8c,0xdc,0x0e,0x06,0x36,0x70,0x0e,0x07,0x36, -0x18,0x00,0xad,0xaf,0x00,0x00,0xc2,0x8c,0x74,0x0e,0x08,0x36,0x78,0x0e,0x09,0x36, -0x1c,0x00,0xa2,0xaf,0x00,0x00,0xe3,0x8c,0x7c,0x0e,0x0a,0x36,0x80,0x0e,0x0b,0x36, -0x20,0x00,0xa3,0xaf,0x00,0x00,0x0d,0x8d,0x84,0x0e,0x0c,0x36,0x88,0x0e,0x17,0x36, -0x24,0x00,0xad,0xaf,0x00,0x00,0x22,0x8d,0x8c,0x0e,0x0e,0x36,0xd0,0x0e,0x18,0x36, -0x28,0x00,0xa2,0xaf,0x00,0x00,0x43,0x8d,0xd8,0x0e,0x11,0x36,0xd4,0x0e,0x10,0x36, -0x2c,0x00,0xa3,0xaf,0x00,0x00,0x6d,0x8d,0xed,0x3f,0x04,0x3c,0xfb,0x92,0x84,0x34, -0x30,0x00,0xad,0xaf,0x00,0x00,0x82,0x8d,0x25,0xb0,0x1e,0x3c,0x21,0xb0,0x00,0x00, -0x34,0x00,0xa2,0xaf,0x00,0x00,0xe3,0x8e,0xff,0x03,0x0f,0x3c,0x38,0x00,0xa3,0xaf, -0x00,0x00,0xcd,0x8d,0x00,0x00,0x00,0x00,0x3c,0x00,0xad,0xaf,0x00,0x00,0x02,0x8f, -0x00,0x00,0x00,0x00,0x40,0x00,0xa2,0xaf,0x00,0x00,0x03,0x8e,0x00,0x00,0x00,0x00, -0x44,0x00,0xa3,0xaf,0x00,0x00,0x2d,0x8e,0x00,0x00,0x00,0x00,0x48,0x00,0xad,0xaf, -0x00,0x00,0xa4,0xac,0x00,0x00,0xc4,0xac,0x00,0x00,0xe4,0xac,0x00,0x00,0x04,0xad, -0x00,0x00,0x24,0xad,0x00,0x00,0x44,0xad,0x00,0x00,0x64,0xad,0x00,0x00,0x84,0xad, -0x00,0x00,0xe4,0xae,0x00,0x00,0xc4,0xad,0x00,0x00,0x04,0xaf,0x00,0x00,0x04,0xae, -0x00,0x00,0x24,0xae,0xd0,0x51,0x00,0x08,0x00,0x00,0x00,0x00,0x7a,0x00,0xa2,0x12, -0x00,0x10,0x03,0x3c,0xac,0x0e,0xc2,0x37,0x94,0x0e,0xc3,0x37,0x25,0xb0,0x09,0x3c, -0x00,0x00,0x4a,0x8c,0xbc,0x0e,0x29,0x35,0x00,0x00,0x64,0x8c,0xb4,0x0e,0xc2,0x37, -0x9c,0x0e,0xc3,0x37,0x00,0x00,0x45,0x8c,0x00,0x00,0x66,0x8c,0x00,0x00,0x27,0x8d, -0x24,0x20,0x8f,0x00,0x00,0xd8,0x02,0x3c,0x24,0x10,0x42,0x01,0x24,0x28,0xaf,0x00, -0x24,0x30,0xcf,0x00,0x24,0x38,0xef,0x00,0x02,0x24,0x04,0x00,0x20,0x01,0x03,0x24, -0x01,0x00,0x42,0x2c,0x02,0x2c,0x05,0x00,0x02,0x34,0x06,0x00,0xf2,0x00,0x83,0x10, -0x02,0x3c,0x07,0x00,0xf0,0x00,0xa3,0x10,0x20,0x00,0x03,0x24,0xee,0x00,0xc3,0x10, -0x00,0x00,0x00,0x00,0xec,0x00,0xe3,0x10,0x01,0x00,0x08,0x24,0x80,0x00,0x03,0x24, -0x08,0x00,0x83,0x10,0x21,0x20,0x00,0x00,0x06,0x00,0xa3,0x10,0x21,0x20,0x00,0x00, -0xe0,0x03,0x03,0x24,0x03,0x00,0xc3,0x10,0x00,0x00,0x00,0x00,0xe5,0x00,0xe3,0x10, -0x01,0x00,0x04,0x24,0x06,0x00,0x40,0x10,0x09,0x00,0x02,0x24,0x04,0x00,0x00,0x11, -0x00,0x00,0x00,0x00,0x6d,0x01,0x80,0x14,0x25,0xb0,0x12,0x3c,0x09,0x00,0x02,0x24, -0xde,0x00,0xc2,0x12,0x25,0xb0,0x04,0x3c,0x01,0x00,0xd6,0x26,0x0a,0x00,0xc2,0x2e, -0x1d,0x01,0x40,0x10,0x00,0x00,0x00,0x00,0xc8,0xff,0xa0,0x16,0x01,0x00,0x02,0x24, -0xa0,0x00,0x03,0x3c,0x25,0xb0,0x09,0x3c,0x30,0x54,0x62,0x34,0x04,0x0c,0x29,0x35, -0x00,0x00,0x22,0xad,0x25,0xb0,0x0d,0x3c,0x08,0x00,0x02,0x3c,0xe4,0x00,0x42,0x34, -0x08,0x0c,0xad,0x35,0x25,0xb0,0x09,0x3c,0x00,0x00,0xa2,0xad,0x28,0x0e,0x29,0x35, -0x80,0x80,0x02,0x3c,0x00,0x00,0x22,0xad,0x14,0x02,0x04,0x3c,0x16,0x68,0x02,0x3c, -0x48,0x01,0x83,0x34,0x40,0x0e,0xc5,0x37,0x44,0x0e,0xc6,0x37,0xa2,0x04,0x42,0x34, -0x25,0xb0,0x0d,0x3c,0x00,0x00,0xa3,0xac,0x4c,0x0e,0xad,0x35,0x00,0x00,0xc2,0xac, -0xd1,0x28,0x02,0x24,0x00,0x00,0xa2,0xad,0x14,0x02,0x03,0x3c,0x16,0x28,0x02,0x3c, -0x4d,0x01,0x63,0x34,0x60,0x0e,0xc7,0x37,0x64,0x0e,0xc8,0x37,0xba,0x08,0x42,0x34, -0x00,0x00,0xe3,0xac,0x25,0xb0,0x06,0x3c,0x00,0x00,0x02,0xad,0x00,0xfb,0x0d,0x3c, -0x25,0xb0,0x09,0x3c,0x00,0xf8,0x02,0x3c,0xd1,0x28,0x07,0x24,0x6c,0x0e,0xc6,0x34, -0x48,0x0e,0x29,0x35,0x01,0x00,0x42,0x34,0x01,0x00,0xad,0x35,0x00,0x00,0xc7,0xac, -0x03,0x00,0x04,0x24,0x00,0x00,0x2d,0xad,0x00,0x00,0x22,0xad,0x84,0x0a,0x00,0x0c, -0x58,0x00,0xaf,0xaf,0xa0,0x00,0x04,0x3c,0x25,0xb0,0x03,0x3c,0x25,0xb0,0x06,0x3c, -0x25,0xb0,0x07,0x3c,0xe4,0x00,0x02,0x24,0x33,0x54,0x84,0x34,0x04,0x0c,0x63,0x34, -0x08,0x0c,0xc6,0x34,0x28,0x0e,0xe7,0x34,0x00,0x00,0x64,0xac,0x00,0x00,0xc2,0xac, -0x00,0x00,0xe0,0xac,0x01,0x00,0x02,0x24,0x58,0x00,0xaf,0x8f,0x8a,0xff,0xa2,0x16, -0xac,0x0e,0xc2,0x37,0x00,0x10,0x03,0x3c,0x1f,0xdc,0x79,0x34,0x1f,0x8c,0x7f,0x34, -0x23,0x8c,0x6d,0x34,0xa0,0x00,0x03,0x3c,0x30,0x54,0x65,0x34,0x00,0x01,0x17,0x3c, -0x25,0xb0,0x09,0x3c,0x25,0xb0,0x03,0x3c,0x00,0x01,0xe2,0x36,0x20,0x08,0x29,0x35, -0x20,0x08,0x63,0x34,0x00,0x00,0x30,0x8d,0x00,0x00,0x62,0xac,0x25,0xb0,0x03,0x3c, -0x28,0x08,0x63,0x34,0x00,0x00,0x62,0xac,0x25,0xb0,0x02,0x3c,0x04,0x0c,0x42,0x34, -0x00,0x00,0x45,0xac,0x25,0xb0,0x03,0x3c,0x08,0x00,0x02,0x3c,0xe4,0x00,0x42,0x34, -0x08,0x0c,0x63,0x34,0x00,0x00,0x62,0xac,0x25,0xb0,0x03,0x3c,0x00,0x7c,0xf3,0x36, -0x00,0x48,0xf4,0x36,0x30,0x0e,0xc6,0x37,0x34,0x0e,0xc7,0x37,0x80,0x80,0x02,0x3c, -0x28,0x0e,0x63,0x34,0x00,0x00,0x62,0xac,0x00,0x00,0xd3,0xac,0x00,0x00,0xf4,0xac, -0x14,0x02,0x06,0x3c,0x16,0x68,0x07,0x3c,0x38,0x0e,0xc8,0x37,0x40,0x0e,0xca,0x37, -0x44,0x0e,0xcb,0x37,0x3c,0x0e,0xc9,0x37,0x02,0x01,0xc6,0x34,0xc7,0x04,0xe7,0x34, -0x00,0x00,0x19,0xad,0x25,0xb0,0x03,0x3c,0x00,0x00,0x3f,0xad,0x00,0x00,0x46,0xad, -0x25,0xb0,0x09,0x3c,0x00,0x00,0x67,0xad,0x25,0xb0,0x06,0x3c,0x00,0x10,0x07,0x3c, -0x50,0x0e,0xcc,0x37,0x58,0x0e,0xce,0x37,0x5c,0x0e,0xd8,0x37,0xd1,0x28,0x02,0x24, -0x23,0xdc,0xe7,0x34,0x4c,0x0e,0x29,0x35,0x6c,0x0e,0x63,0x34,0x54,0x0e,0xc6,0x34, -0x00,0x00,0x22,0xad,0x00,0x00,0x62,0xac,0x14,0x02,0x09,0x3c,0x00,0x00,0x93,0xad, -0x25,0xb0,0x02,0x3c,0x00,0x00,0xd4,0xac,0x00,0x00,0xc7,0xad,0x00,0x00,0x0d,0xaf, -0x16,0x28,0x0d,0x3c,0x48,0x0e,0x42,0x34,0x00,0xf8,0x06,0x3c,0x02,0x01,0x29,0x35, -0x07,0x0d,0xad,0x35,0x00,0xfb,0x03,0x3c,0x60,0x0e,0xd1,0x37,0x64,0x0e,0xd2,0x37, -0x00,0x00,0x29,0xae,0x03,0x00,0x04,0x24,0x00,0x00,0x4d,0xae,0x00,0x00,0x43,0xac, -0x00,0x00,0x46,0xac,0x84,0x0a,0x00,0x0c,0x58,0x00,0xaf,0xaf,0x00,0x02,0x02,0x3c, -0x25,0xb0,0x07,0x3c,0x25,0xb0,0x09,0x3c,0xd1,0x28,0x42,0x34,0x4c,0x0e,0xe7,0x34, -0x6c,0x0e,0x29,0x35,0x25,0xb0,0x0d,0x3c,0x00,0x00,0xe2,0xac,0x48,0x0e,0xad,0x35, -0x00,0x00,0x22,0xad,0x00,0xf8,0x03,0x3c,0x00,0xfb,0x02,0x3c,0x00,0x00,0xa2,0xad, -0x03,0x00,0x04,0x24,0x00,0x00,0xa3,0xad,0x84,0x0a,0x00,0x0c,0x00,0x00,0x00,0x00, -0x4c,0x00,0xa6,0x8f,0x25,0xb0,0x04,0x3c,0x04,0x0c,0x84,0x34,0x00,0x00,0x86,0xac, -0x50,0x00,0xa9,0x8f,0x25,0xb0,0x07,0x3c,0x25,0xb0,0x0d,0x3c,0x00,0x01,0x10,0x32, -0x08,0x0c,0xe7,0x34,0x28,0x0e,0xad,0x35,0x00,0x00,0xe9,0xac,0x2b,0x80,0x10,0x00, -0x00,0x00,0xa0,0xad,0x58,0x00,0xaf,0x8f,0x17,0xff,0x00,0x16,0xac,0x0e,0xc2,0x37, -0x25,0xb0,0x02,0x3c,0x25,0xb0,0x03,0x3c,0x20,0x08,0x42,0x34,0x28,0x08,0x63,0x34, -0x00,0x00,0x57,0xac,0x25,0xb0,0x09,0x3c,0x00,0x00,0x77,0xac,0xac,0x0e,0xc2,0x37, -0x94,0x0e,0xc3,0x37,0x00,0x00,0x4a,0x8c,0xbc,0x0e,0x29,0x35,0x00,0x00,0x64,0x8c, -0xb4,0x0e,0xc2,0x37,0x9c,0x0e,0xc3,0x37,0x00,0x00,0x45,0x8c,0x00,0x00,0x66,0x8c, -0x00,0x00,0x27,0x8d,0x24,0x20,0x8f,0x00,0x00,0xd8,0x02,0x3c,0x24,0x10,0x42,0x01, -0x24,0x28,0xaf,0x00,0x24,0x30,0xcf,0x00,0x24,0x38,0xef,0x00,0x02,0x24,0x04,0x00, -0x20,0x01,0x03,0x24,0x01,0x00,0x42,0x2c,0x02,0x2c,0x05,0x00,0x02,0x34,0x06,0x00, -0x10,0xff,0x83,0x14,0x02,0x3c,0x07,0x00,0x80,0x00,0x03,0x24,0x16,0xff,0x83,0x14, -0x21,0x40,0x00,0x00,0xc3,0x51,0x00,0x08,0x21,0x20,0x00,0x00,0xff,0xff,0x02,0x34, -0xc4,0x02,0x84,0x34,0x00,0x00,0x82,0xac,0x94,0x0e,0xc3,0x37,0x9c,0x0e,0xc2,0x37, -0xa4,0x0e,0xc4,0x37,0xac,0x0e,0xc7,0x37,0x00,0x00,0x66,0x8c,0x00,0x00,0x49,0x8c, -0x00,0x00,0x8b,0x8c,0x00,0x00,0xe5,0x8c,0x02,0x80,0x07,0x3c,0x68,0x15,0xe7,0x24, -0x0c,0x40,0xe3,0x8c,0x10,0x40,0xe4,0x8c,0xb4,0x0e,0xc2,0x37,0x00,0x00,0x47,0x8c, -0x25,0xb0,0x0d,0x3c,0x00,0xfc,0x02,0x24,0x24,0x30,0xcf,0x00,0x24,0x28,0xaf,0x00, -0xbc,0x0e,0xad,0x35,0x00,0x00,0xa8,0x8d,0x24,0x20,0x82,0x00,0x02,0x34,0x06,0x00, -0x24,0x18,0x62,0x00,0x02,0x2c,0x05,0x00,0xc4,0x0e,0xca,0x37,0xcc,0x0e,0xcc,0x37, -0xf0,0xff,0x02,0x3c,0xff,0x03,0x42,0x34,0x25,0x18,0x66,0x00,0x25,0x20,0x85,0x00, -0x00,0x00,0x46,0x8d,0x24,0x48,0x2f,0x01,0x00,0x00,0x85,0x8d,0x24,0x38,0xef,0x00, -0x24,0x20,0x82,0x00,0x24,0x18,0x62,0x00,0x82,0x49,0x09,0x00,0x82,0x39,0x07,0x00, -0x0f,0xc0,0x02,0x3c,0xff,0xff,0x42,0x34,0x25,0x18,0x69,0x00,0x25,0x20,0x87,0x00, -0x24,0x58,0x6f,0x01,0x24,0x40,0x0f,0x01,0x24,0x20,0x82,0x00,0x24,0x18,0x62,0x00, -0x00,0x59,0x0b,0x00,0x00,0x41,0x08,0x00,0x24,0x30,0xcf,0x00,0x24,0x28,0xaf,0x00, -0x02,0x80,0x02,0x3c,0x68,0x15,0x42,0x24,0x25,0x18,0x6b,0x00,0x25,0x20,0x88,0x00, -0x02,0x34,0x06,0x00,0x02,0x2c,0x05,0x00,0x01,0x00,0xd6,0x26,0x0c,0x40,0x43,0xac, -0x10,0x40,0x44,0xac,0x14,0x40,0x46,0xa4,0x16,0x40,0x45,0xa4,0x0a,0x00,0xc2,0x2e, -0xe5,0xfe,0x40,0x14,0x00,0x00,0x00,0x00,0x18,0x00,0xad,0x8f,0x25,0xb0,0x02,0x3c, -0xe0,0x0e,0x43,0x34,0x10,0x00,0xa6,0x8f,0x00,0x00,0x6d,0xac,0x1c,0x00,0xa3,0x8f, -0xdc,0x0e,0x47,0x34,0x70,0x0e,0x48,0x34,0x00,0x00,0xe3,0xac,0x20,0x00,0xa7,0x8f, -0x74,0x0e,0x49,0x34,0x78,0x0e,0x4a,0x34,0x00,0x00,0x07,0xad,0x24,0x00,0xad,0x8f, -0x7c,0x0e,0x4b,0x34,0x80,0x0e,0x4c,0x34,0x00,0x00,0x2d,0xad,0x28,0x00,0xa3,0x8f, -0x25,0xb0,0x0d,0x3c,0x84,0x0e,0xad,0x35,0x00,0x00,0x43,0xad,0x2c,0x00,0xa7,0x8f, -0x88,0x0e,0x52,0x34,0x8c,0x0e,0x4e,0x34,0x00,0x00,0x67,0xad,0x30,0x00,0xa9,0x8f, -0xd4,0x0e,0x51,0x34,0xd0,0x0e,0x42,0x34,0x00,0x00,0x89,0xad,0x34,0x00,0xa3,0x8f, -0x0f,0x00,0x10,0x3c,0xff,0xff,0x05,0x36,0x00,0x00,0xa3,0xad,0x38,0x00,0xa7,0x8f, -0x21,0x20,0x00,0x00,0x00,0x00,0x47,0xae,0x3c,0x00,0xa9,0x8f,0x00,0x00,0x00,0x00, -0x00,0x00,0xc9,0xad,0x40,0x00,0xad,0x8f,0x00,0x00,0x00,0x00,0x00,0x00,0x4d,0xac, -0x44,0x00,0xa2,0x8f,0x00,0x00,0x00,0x00,0x00,0x00,0x22,0xae,0x48,0x00,0xa3,0x8f, -0x00,0x00,0x00,0x00,0x00,0x00,0x43,0xae,0xba,0x44,0x00,0x0c,0x00,0x00,0x00,0x00, -0xb3,0x0a,0x00,0x0c,0x64,0x00,0x04,0x24,0x7a,0x42,0x00,0x0c,0x01,0x00,0x04,0x24, -0x14,0x00,0xa6,0x8f,0xff,0xff,0x05,0x36,0xba,0x44,0x00,0x0c,0x21,0x20,0x00,0x00, -0xb3,0x0a,0x00,0x0c,0x64,0x00,0x04,0x24,0x84,0x00,0xbf,0x8f,0x80,0x00,0xbe,0x8f, -0x7c,0x00,0xb7,0x8f,0x78,0x00,0xb6,0x8f,0x74,0x00,0xb5,0x8f,0x70,0x00,0xb4,0x8f, -0x6c,0x00,0xb3,0x8f,0x68,0x00,0xb2,0x8f,0x64,0x00,0xb1,0x8f,0x60,0x00,0xb0,0x8f, -0x21,0x20,0x00,0x00,0x7a,0x42,0x00,0x08,0x88,0x00,0xbd,0x27,0x94,0x0e,0x42,0x36, -0x9c,0x0e,0x43,0x36,0xa4,0x0e,0x44,0x36,0xac,0x0e,0x45,0x36,0x02,0x80,0x0d,0x3c, -0x00,0x00,0x47,0x8c,0x68,0x15,0xad,0x25,0x00,0x00,0x6a,0x8c,0x00,0x00,0x8c,0x8c, -0x00,0x00,0xa3,0x8c,0x10,0x40,0xa4,0x8d,0xb4,0x0e,0x42,0x36,0x00,0x00,0x48,0x8c, -0x0c,0x40,0xa5,0x8d,0x25,0xb0,0x02,0x3c,0x00,0xfc,0x13,0x24,0xbc,0x0e,0x42,0x34, -0x24,0x18,0x6f,0x00,0x00,0x00,0x49,0x8c,0x02,0x1c,0x03,0x00,0x24,0x38,0xef,0x00, -0x24,0x20,0x93,0x00,0xf0,0xff,0x06,0x3c,0x25,0x20,0x83,0x00,0xff,0x03,0xc6,0x34, -0x02,0x3c,0x07,0x00,0xc4,0x0e,0x42,0x36,0x24,0x28,0xb3,0x00,0x24,0x40,0x0f,0x01, -0xcc,0x0e,0x4b,0x36,0x25,0x28,0xa7,0x00,0x24,0x20,0x86,0x00,0x00,0x00,0x47,0x8c, -0x24,0x50,0x4f,0x01,0x00,0x00,0x63,0x8d,0x82,0x41,0x08,0x00,0x0f,0xc0,0x02,0x3c, -0xff,0xff,0x42,0x34,0x25,0x20,0x88,0x00,0x82,0x51,0x0a,0x00,0x24,0x28,0xa6,0x00, -0x24,0x48,0x2f,0x01,0x24,0x88,0x82,0x00,0x25,0x28,0xaa,0x00,0x24,0x60,0x8f,0x01, -0x00,0x49,0x09,0x00,0x25,0x88,0x29,0x02,0x24,0x28,0xa2,0x00,0x24,0x18,0x6f,0x00, -0x00,0x61,0x0c,0x00,0x24,0x38,0xef,0x00,0x25,0x28,0xac,0x00,0x02,0x3c,0x07,0x00, -0x02,0x1c,0x03,0x00,0x82,0x27,0x11,0x00,0x01,0x00,0x02,0x24,0x16,0x40,0xa3,0xa5, -0x14,0x40,0xa7,0xa5,0x0c,0x40,0xa5,0xad,0x4a,0x00,0x82,0x10,0x10,0x40,0xb1,0xad, -0x80,0x0c,0x4c,0x36,0x00,0x00,0x8a,0x8d,0x82,0x72,0x05,0x00,0xff,0x03,0xce,0x31, -0x00,0x02,0xc3,0x31,0x25,0x10,0xd3,0x01,0x0b,0x70,0x43,0x00,0x82,0x85,0x0a,0x00, -0x18,0x00,0xd0,0x01,0xff,0x03,0xaf,0x30,0x00,0x02,0xa3,0x30,0x25,0x10,0xf3,0x01, -0x0b,0x78,0x43,0x00,0x02,0x75,0x11,0x00,0xff,0x03,0xce,0x31,0xc0,0xff,0x08,0x3c, -0x25,0x18,0xd3,0x01,0x00,0x02,0xc2,0x31,0x00,0xfc,0x06,0x35,0x0b,0x70,0x62,0x00, -0x24,0x38,0x46,0x01,0x94,0x0c,0x4a,0x36,0xff,0x0f,0x09,0x3c,0xff,0xff,0x29,0x35, -0x88,0x0c,0x54,0x36,0x12,0x20,0x00,0x00,0x02,0x22,0x04,0x00,0x3f,0x00,0x82,0x30, -0x18,0x00,0xf0,0x01,0x82,0x7a,0x11,0x00,0xff,0x03,0xef,0x31,0x00,0x14,0x02,0x00, -0x25,0x38,0xe2,0x00,0x00,0x02,0xe3,0x31,0x25,0x10,0xf3,0x01,0x0b,0x78,0x43,0x00, -0xc0,0x03,0x84,0x30,0x80,0x25,0x04,0x00,0x9c,0x0c,0x4b,0x36,0x12,0x28,0x00,0x00, -0x02,0x2a,0x05,0x00,0xff,0x03,0xa2,0x30,0x25,0x10,0xe2,0x00,0x00,0x00,0x82,0xad, -0x00,0x00,0x42,0x8d,0x00,0x00,0x00,0x00,0x24,0x10,0x49,0x00,0x25,0x10,0x44,0x00, -0x00,0x00,0x42,0xad,0x00,0x00,0x8a,0x8e,0x00,0x00,0x00,0x00,0x24,0x40,0x48,0x01, -0x82,0x85,0x08,0x00,0x18,0x00,0xd0,0x01,0x24,0x30,0x46,0x01,0x12,0x18,0x00,0x00, -0x02,0x1a,0x03,0x00,0x3f,0x00,0x62,0x30,0x18,0x00,0xf0,0x01,0x00,0x14,0x02,0x00, -0x25,0x30,0xc2,0x00,0xc0,0x03,0x63,0x30,0x80,0x1d,0x03,0x00,0x12,0x20,0x00,0x00, -0x02,0x22,0x04,0x00,0xff,0x03,0x82,0x30,0x25,0x10,0xc2,0x00,0x00,0x00,0x82,0xae, -0x00,0x00,0x62,0x8d,0x00,0x00,0x00,0x00,0x24,0x10,0x49,0x00,0x25,0x10,0x43,0x00, -0x00,0x00,0x62,0xad,0x00,0x17,0x16,0x00,0x25,0xb0,0x03,0x3c,0xdd,0xdd,0x42,0x34, -0xc4,0x02,0x63,0x34,0x00,0x00,0x62,0xac,0xec,0x52,0x00,0x08,0x00,0x00,0x00,0x00, -0xe0,0xff,0xbd,0x27,0x44,0x00,0x02,0x24,0x10,0x00,0xa2,0xa3,0x49,0x00,0x03,0x24, -0x47,0x00,0x02,0x24,0x02,0x80,0x07,0x3c,0x8c,0x97,0xe7,0x24,0x11,0x00,0xa3,0xa3, -0x12,0x00,0xa2,0xa3,0x10,0x27,0x03,0x24,0x01,0x00,0x02,0x24,0x01,0x80,0x06,0x3c, -0x10,0x00,0xa5,0x27,0x21,0x20,0xe0,0x00,0xe8,0x51,0xc6,0x24,0x0c,0x00,0xe3,0xac, -0x14,0x00,0xe2,0xa0,0x18,0x00,0xbf,0xaf,0xfb,0x0c,0x00,0x0c,0x13,0x00,0xa0,0xa3, -0x18,0x00,0xbf,0x8f,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x20,0x00,0xbd,0x27, -0xd0,0xff,0xbd,0x27,0x25,0xb0,0x02,0x3c,0x20,0x00,0xb4,0xaf,0x1c,0x00,0xb3,0xaf, -0x03,0x0d,0x44,0x34,0x2c,0x00,0xbf,0xaf,0x28,0x00,0xb6,0xaf,0x24,0x00,0xb5,0xaf, -0x18,0x00,0xb2,0xaf,0x14,0x00,0xb1,0xaf,0x10,0x00,0xb0,0xaf,0x00,0x00,0x83,0x90, -0x42,0x00,0x45,0x34,0xff,0x00,0x73,0x30,0x70,0x00,0x74,0x32,0x29,0x00,0x80,0x16, -0x8f,0x00,0x62,0x32,0xff,0xff,0x02,0x24,0x00,0x00,0xa2,0xa0,0x00,0x60,0x01,0x40, -0x01,0x00,0x21,0x34,0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40,0x0f,0x00,0x11,0x3c, -0x18,0x00,0x04,0x24,0xdd,0x44,0x00,0x0c,0xff,0xff,0x25,0x36,0x21,0x80,0x40,0x00, -0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40,0xb3,0x0a,0x00,0x0c, -0x64,0x00,0x04,0x24,0x00,0x80,0x06,0x36,0xff,0xff,0x25,0x36,0xba,0x44,0x00,0x0c, -0x18,0x00,0x04,0x24,0x84,0x0a,0x00,0x0c,0x03,0x00,0x04,0x24,0x21,0x30,0xa0,0x02, -0xff,0xff,0x25,0x36,0x5c,0x00,0x80,0x16,0x21,0x20,0x00,0x00,0x2c,0x00,0xbf,0x8f, -0x28,0x00,0xb6,0x8f,0x24,0x00,0xb5,0x8f,0x20,0x00,0xb4,0x8f,0x1c,0x00,0xb3,0x8f, -0x18,0x00,0xb2,0x8f,0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f,0x25,0xb0,0x02,0x3c, -0x42,0x00,0x42,0x34,0x30,0x00,0xbd,0x27,0x00,0x00,0x40,0xa0,0x08,0x00,0xe0,0x03, -0x00,0x00,0x00,0x00,0x00,0x00,0x82,0xa0,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34, -0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40,0x0f,0x00,0x11,0x3c,0x21,0x20,0x00,0x00, -0xdd,0x44,0x00,0x0c,0xff,0xff,0x25,0x36,0x21,0xa8,0x40,0x00,0x00,0x60,0x01,0x40, -0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40,0xb3,0x0a,0x00,0x0c,0x64,0x00,0x04,0x24, -0x7a,0x42,0x00,0x0c,0x01,0x00,0x04,0x24,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34, -0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40,0x21,0x20,0x00,0x00,0xdd,0x44,0x00,0x0c, -0xff,0xff,0x25,0x36,0x21,0xb0,0x40,0x00,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34, -0x00,0x60,0x81,0x40,0x64,0x00,0x04,0x24,0xb3,0x0a,0x00,0x0c,0x08,0x00,0x10,0x3c, -0xff,0xff,0x10,0x36,0x7a,0x42,0x00,0x0c,0x21,0x20,0x00,0x00,0x01,0x00,0x12,0x3c, -0x24,0x30,0xb0,0x02,0x25,0x30,0xd2,0x00,0xff,0xff,0x25,0x36,0xba,0x44,0x00,0x0c, -0x21,0x20,0x00,0x00,0xb3,0x0a,0x00,0x0c,0x64,0x00,0x04,0x24,0x24,0x80,0xd0,0x02, -0x7a,0x42,0x00,0x0c,0x01,0x00,0x04,0x24,0x25,0x30,0x12,0x02,0xff,0xff,0x25,0x36, -0xba,0x44,0x00,0x0c,0x21,0x20,0x00,0x00,0xb3,0x0a,0x00,0x0c,0x64,0x00,0x04,0x24, -0x7a,0x42,0x00,0x0c,0x21,0x20,0x00,0x00,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34, -0x01,0x00,0x21,0x38,0x00,0x60,0x81,0x40,0x0f,0x00,0x11,0x3c,0x18,0x00,0x04,0x24, -0xdd,0x44,0x00,0x0c,0xff,0xff,0x25,0x36,0x21,0x80,0x40,0x00,0x00,0x60,0x01,0x40, -0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40,0xb3,0x0a,0x00,0x0c,0x64,0x00,0x04,0x24, -0x00,0x80,0x06,0x36,0xff,0xff,0x25,0x36,0xba,0x44,0x00,0x0c,0x18,0x00,0x04,0x24, -0x84,0x0a,0x00,0x0c,0x03,0x00,0x04,0x24,0x21,0x30,0xa0,0x02,0xff,0xff,0x25,0x36, -0xa6,0xff,0x80,0x12,0x21,0x20,0x00,0x00,0x25,0xb0,0x02,0x3c,0x03,0x0d,0x42,0x34, -0x00,0x00,0x53,0xa0,0xba,0x44,0x00,0x0c,0x00,0x00,0x00,0x00,0xb3,0x0a,0x00,0x0c, -0x64,0x00,0x04,0x24,0x7a,0x42,0x00,0x0c,0x01,0x00,0x04,0x24,0xff,0xff,0x25,0x36, -0x21,0x30,0xc0,0x02,0xba,0x44,0x00,0x0c,0x21,0x20,0x00,0x00,0xb3,0x0a,0x00,0x0c, -0x64,0x00,0x04,0x24,0x2c,0x00,0xbf,0x8f,0x28,0x00,0xb6,0x8f,0x24,0x00,0xb5,0x8f, -0x20,0x00,0xb4,0x8f,0x1c,0x00,0xb3,0x8f,0x18,0x00,0xb2,0x8f,0x14,0x00,0xb1,0x8f, -0x10,0x00,0xb0,0x8f,0x21,0x20,0x00,0x00,0x7a,0x42,0x00,0x08,0x30,0x00,0xbd,0x27, -0xd0,0xff,0xbd,0x27,0x28,0x00,0xb4,0xaf,0x02,0x80,0x14,0x3c,0x2c,0x00,0xbf,0xaf, -0x24,0x00,0xb3,0xaf,0x20,0x00,0xb2,0xaf,0x1c,0x00,0xb1,0xaf,0x18,0x00,0xb0,0xaf, -0x68,0x15,0x86,0x26,0x0c,0x40,0xc2,0x8c,0x00,0x00,0x00,0x00,0x82,0x17,0x02,0x00, -0x01,0x00,0x42,0x30,0x07,0x00,0x40,0x14,0x68,0x15,0x85,0x26,0x08,0x40,0xc2,0x8c, -0x01,0x00,0x03,0x24,0x42,0x17,0x02,0x00,0x03,0x00,0x42,0x30,0xf0,0x00,0x43,0x10, -0x25,0xb0,0x02,0x3c,0x0c,0x40,0xa2,0x8c,0x01,0x00,0x03,0x24,0x82,0x17,0x02,0x00, -0x01,0x00,0x44,0x30,0x0a,0x00,0x83,0x10,0x00,0x00,0x00,0x00,0x2c,0x00,0xbf,0x8f, -0x28,0x00,0xb4,0x8f,0x24,0x00,0xb3,0x8f,0x20,0x00,0xb2,0x8f,0x1c,0x00,0xb1,0x8f, -0x18,0x00,0xb0,0x8f,0x21,0x10,0x00,0x00,0x08,0x00,0xe0,0x03,0x30,0x00,0xbd,0x27, -0x08,0x40,0xa2,0x8c,0x00,0x00,0x00,0x00,0x42,0x17,0x02,0x00,0x03,0x00,0x42,0x30, -0xf2,0xff,0x44,0x14,0x25,0xb0,0x02,0x3c,0x0e,0x0c,0x44,0x34,0x00,0x00,0x83,0x90, -0x00,0x01,0x02,0x24,0xff,0x00,0x63,0x30,0x01,0x00,0x63,0x24,0x8b,0x01,0x62,0x10, -0x00,0x00,0x00,0x00,0x00,0x00,0x83,0xa0,0x68,0x15,0x84,0x26,0x10,0x40,0x82,0x8c, -0x01,0x00,0x03,0x24,0x82,0x17,0x02,0x00,0xa4,0x01,0x43,0x10,0x0f,0x00,0x10,0x3c, -0xc7,0x42,0x92,0x90,0x68,0x15,0x90,0x26,0xc6,0x42,0x03,0x92,0x25,0xb0,0x11,0x3c, -0x62,0x0c,0x22,0x36,0x00,0x00,0x52,0xa0,0x17,0x01,0x60,0x10,0x01,0x00,0x02,0x24, -0x03,0x0d,0x23,0x36,0x00,0x00,0x62,0x90,0x00,0x00,0x00,0x00,0x70,0x00,0x42,0x30, -0x3e,0x01,0x40,0x14,0x63,0x0c,0x23,0x36,0xc4,0x42,0x02,0x96,0x00,0x00,0x00,0x00, -0x23,0x20,0x52,0x00,0x2b,0x18,0x52,0x00,0x23,0x10,0x42,0x02,0x0a,0x10,0x83,0x00, -0x03,0x00,0x42,0x2c,0x0b,0x01,0x40,0x10,0x00,0x00,0x00,0x00,0xc4,0x42,0x03,0x96, -0x63,0x0c,0x22,0x36,0x00,0x00,0x43,0xa0,0x68,0x15,0x83,0x26,0xc3,0x42,0x62,0x90, -0x08,0x40,0x66,0x8c,0xc2,0x42,0x72,0xa0,0x23,0x20,0x52,0x00,0x2b,0x38,0x42,0x02, -0x23,0x50,0x42,0x02,0x02,0x2c,0x06,0x00,0x0b,0x50,0x87,0x00,0x3f,0x00,0xa5,0x30, -0x3f,0x00,0xc4,0x30,0x24,0x00,0x02,0x24,0x20,0x00,0x03,0x24,0x23,0x10,0x44,0x00, -0x2d,0x01,0x40,0x15,0x23,0x18,0x65,0x00,0x21,0x30,0x80,0x00,0x21,0x48,0xa0,0x00, -0x02,0x80,0x0b,0x3c,0x68,0x15,0x83,0x26,0x80,0x10,0x06,0x00,0x21,0x10,0x43,0x00, -0x0c,0x40,0x63,0x8c,0x18,0x40,0x44,0x8c,0xff,0x03,0x67,0x30,0x1b,0x01,0xe0,0x10, -0x82,0x2d,0x04,0x00,0x00,0x02,0x62,0x30,0x04,0x00,0x40,0x10,0x18,0x00,0xe5,0x00, -0x00,0xfc,0x02,0x24,0x25,0x38,0xe2,0x00,0x18,0x00,0xe5,0x00,0x82,0x22,0x03,0x00, -0xff,0x03,0x84,0x30,0x00,0x02,0x83,0x30,0x12,0x10,0x00,0x00,0x02,0x12,0x02,0x00, -0x03,0x00,0x60,0x10,0xff,0x03,0x48,0x30,0x00,0xfc,0x02,0x24,0x25,0x20,0x82,0x00, -0x18,0x00,0x85,0x00,0x80,0x2d,0x05,0x00,0x25,0xb0,0x06,0x3c,0x80,0x0c,0xc7,0x34, -0x94,0x0c,0xc6,0x34,0x12,0x20,0x00,0x00,0x02,0x22,0x04,0x00,0x3f,0x00,0x82,0x30, -0x00,0x14,0x02,0x00,0x25,0x28,0xa2,0x00,0x25,0x28,0xa8,0x00,0x10,0x00,0xa5,0xaf, -0x00,0x00,0xe5,0xac,0x00,0x00,0xc3,0x8c,0xff,0x0f,0x02,0x3c,0xc0,0x03,0x84,0x30, -0xff,0xff,0x42,0x34,0x80,0x25,0x04,0x00,0x24,0x18,0x62,0x00,0x25,0x18,0x64,0x00, -0x10,0x00,0xa3,0xaf,0x00,0x00,0xc3,0xac,0x68,0x15,0x83,0x26,0x08,0x40,0x62,0x8c, -0x00,0x00,0x00,0x00,0x08,0x01,0x40,0x04,0xc0,0x28,0x09,0x00,0x21,0x28,0xa3,0x00, -0xac,0x40,0xa3,0x90,0x25,0xb0,0x04,0x3c,0x22,0x0a,0x82,0x34,0x00,0x00,0x43,0xa0, -0xad,0x40,0xa6,0x90,0x23,0x0a,0x82,0x34,0x24,0x0a,0x87,0x34,0x00,0x00,0x46,0xa0, -0xae,0x40,0xa3,0x90,0x25,0x0a,0x86,0x34,0x26,0x0a,0x88,0x34,0x00,0x00,0xe3,0xa0, -0xaf,0x40,0xa2,0x90,0x27,0x0a,0x87,0x34,0x28,0x0a,0x89,0x34,0x00,0x00,0xc2,0xa0, -0xb0,0x40,0xa3,0x90,0x29,0x0a,0x84,0x34,0x00,0x00,0x03,0xa1,0xb1,0x40,0xa2,0x90, -0x00,0x00,0x00,0x00,0x00,0x00,0xe2,0xa0,0xb2,0x40,0xa3,0x90,0x00,0x00,0x00,0x00, -0x00,0x00,0x23,0xa1,0xb3,0x40,0xa2,0x90,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0xa0, -0x8e,0x7d,0x63,0x91,0x22,0x00,0x02,0x24,0x03,0x00,0x62,0x10,0x92,0x00,0x02,0x24, -0x62,0xff,0x62,0x14,0x00,0x00,0x00,0x00,0x68,0x15,0x82,0x26,0x08,0x40,0x43,0x8c, -0x01,0x00,0x44,0x39,0x24,0x00,0x02,0x24,0x02,0x1a,0x03,0x00,0x3f,0x00,0x63,0x30, -0x01,0x00,0x84,0x30,0x04,0x01,0x80,0x10,0x23,0x28,0x43,0x00,0x42,0x18,0x0a,0x00, -0x40,0x10,0x03,0x00,0x21,0x50,0x43,0x00,0x68,0x15,0x83,0x26,0xc3,0x42,0x62,0x90, -0x00,0x00,0x00,0x00,0x2b,0x10,0x42,0x02,0x08,0x01,0x40,0x10,0x21,0x20,0x00,0x00, -0x2b,0x10,0x45,0x01,0x07,0x00,0x40,0x10,0x24,0x00,0x04,0x24,0x08,0x40,0x62,0x8c, -0x00,0x00,0x00,0x00,0x02,0x12,0x02,0x00,0x3f,0x00,0x42,0x30,0x21,0x20,0x4a,0x00, -0x68,0x15,0x83,0x26,0x80,0x10,0x04,0x00,0x10,0x40,0x66,0x8c,0x21,0x10,0x43,0x00, -0x18,0x40,0x44,0x8c,0x82,0x3a,0x06,0x00,0xff,0x03,0xe7,0x30,0xf0,0x00,0xe0,0x10, -0x82,0x2d,0x04,0x00,0x00,0x02,0xe2,0x30,0x04,0x00,0x40,0x10,0x18,0x00,0xe5,0x00, -0x00,0xfc,0x02,0x24,0x25,0x38,0xe2,0x00,0x18,0x00,0xe5,0x00,0x02,0x25,0x06,0x00, -0xff,0x03,0x84,0x30,0x00,0x02,0x83,0x30,0x12,0x10,0x00,0x00,0x02,0x12,0x02,0x00, -0x03,0x00,0x60,0x10,0xff,0x03,0x48,0x30,0x00,0xfc,0x02,0x24,0x25,0x20,0x82,0x00, -0x18,0x00,0x85,0x00,0x80,0x2d,0x05,0x00,0x25,0xb0,0x06,0x3c,0x88,0x0c,0xc7,0x34, -0x9c,0x0c,0xc6,0x34,0x12,0x20,0x00,0x00,0x02,0x22,0x04,0x00,0x3f,0x00,0x82,0x30, -0x00,0x14,0x02,0x00,0x25,0x28,0xa2,0x00,0x25,0x28,0xa8,0x00,0x10,0x00,0xa5,0xaf, -0x00,0x00,0xe5,0xac,0x00,0x00,0xc3,0x8c,0xff,0x0f,0x02,0x3c,0xc0,0x03,0x84,0x30, -0xff,0xff,0x42,0x34,0x80,0x25,0x04,0x00,0x24,0x18,0x62,0x00,0x25,0x18,0x64,0x00, -0x10,0x00,0xa3,0xaf,0x00,0x00,0xc3,0xac,0x95,0x54,0x00,0x08,0x00,0x00,0x00,0x00, -0x80,0x0c,0x42,0x34,0x00,0x00,0x43,0x8c,0xc0,0xff,0x02,0x3c,0x21,0x88,0x00,0x00, -0x24,0x28,0x62,0x00,0xc0,0xff,0x04,0x3c,0x8a,0x55,0x00,0x08,0x18,0x40,0xc3,0x24, -0x01,0x00,0x31,0x26,0x25,0x00,0x22,0x2e,0x0d,0x00,0x40,0x10,0x02,0x80,0x0b,0x3c, -0x00,0x00,0x62,0x8c,0x00,0x00,0x00,0x00,0x24,0x10,0x44,0x00,0xf8,0xff,0x45,0x14, -0x04,0x00,0x63,0x24,0x08,0x40,0xc2,0x8c,0xc0,0xff,0x03,0x24,0x3f,0x00,0x24,0x32, -0x24,0x10,0x43,0x00,0x25,0x10,0x44,0x00,0x08,0x40,0xc2,0xac,0x02,0x80,0x0b,0x3c, -0x8e,0x7d,0x63,0x91,0x22,0x00,0x02,0x24,0x3e,0x00,0x62,0x10,0x92,0x00,0x02,0x24, -0x3d,0x00,0x62,0x10,0x25,0xb0,0x02,0x3c,0x25,0xb0,0x02,0x3c,0x24,0x0a,0x42,0x34, -0x00,0x00,0x44,0x8c,0x3f,0x3f,0x03,0x3c,0x3f,0x3f,0x63,0x34,0x24,0x20,0x83,0x00, -0x02,0x80,0x02,0x3c,0x02,0x80,0x03,0x3c,0x16,0x56,0x53,0x24,0x1e,0x57,0x72,0x24, -0x21,0x88,0x00,0x00,0xb1,0x55,0x00,0x08,0x10,0x00,0xa4,0xaf,0xd4,0x45,0x00,0x0c, -0x00,0x00,0x00,0x00,0x47,0x00,0x40,0x10,0x68,0x15,0x85,0x26,0x01,0x00,0x31,0x26, -0x21,0x00,0x22,0x2e,0x17,0x00,0x40,0x10,0x68,0x15,0x84,0x26,0xc0,0x80,0x11,0x00, -0x10,0x00,0xa4,0x27,0x21,0x28,0x13,0x02,0xd4,0x45,0x00,0x0c,0x04,0x00,0x06,0x24, -0x21,0x28,0x12,0x02,0x10,0x00,0xa4,0x27,0xf0,0xff,0x40,0x14,0x04,0x00,0x06,0x24, -0x68,0x15,0x85,0x26,0x08,0x40,0xa3,0x8c,0xc0,0xff,0x02,0x3c,0xff,0xff,0x42,0x34, -0x3f,0x00,0x24,0x32,0x24,0x18,0x62,0x00,0x00,0x24,0x04,0x00,0xff,0x7f,0x02,0x3c, -0x25,0x18,0x64,0x00,0xff,0xff,0x42,0x34,0x24,0x18,0x62,0x00,0x08,0x40,0xa3,0xac, -0x68,0x15,0x84,0x26,0x0c,0x40,0x83,0x8c,0x00,0x40,0x02,0x3c,0x25,0x18,0x62,0x00, -0x25,0xb0,0x02,0x3c,0x0e,0x0c,0x42,0x34,0x0c,0x40,0x83,0xac,0x00,0x00,0x40,0xa0, -0x8f,0x54,0x00,0x08,0x68,0x15,0x85,0x26,0xc6,0x42,0x02,0xa2,0xba,0x54,0x00,0x08, -0xc4,0x42,0x12,0xa6,0xda,0x53,0x00,0x0c,0x00,0x00,0x00,0x00,0xc9,0x54,0x00,0x08, -0xc4,0x42,0x12,0xa6,0x25,0xb0,0x02,0x3c,0x88,0x0c,0x42,0x34,0x00,0x00,0x44,0x8c, -0x02,0x80,0x03,0x3c,0x68,0x15,0x66,0x24,0xc0,0xff,0x02,0x3c,0x24,0x28,0x82,0x00, -0x21,0x88,0x00,0x00,0xc0,0xff,0x04,0x3c,0xe6,0x55,0x00,0x08,0x18,0x40,0xc3,0x24, -0x01,0x00,0x31,0x26,0x25,0x00,0x22,0x2e,0xb8,0xff,0x40,0x10,0x25,0xb0,0x02,0x3c, -0x00,0x00,0x62,0x8c,0x00,0x00,0x00,0x00,0x24,0x10,0x44,0x00,0xf8,0xff,0x45,0x14, -0x04,0x00,0x63,0x24,0x08,0x40,0xc2,0x8c,0x3f,0x00,0x23,0x32,0xff,0xc0,0x04,0x24, -0x24,0x10,0x44,0x00,0x00,0x1a,0x03,0x00,0x25,0x10,0x43,0x00,0x9c,0x55,0x00,0x08, -0x08,0x40,0xc2,0xac,0x08,0x40,0xa3,0x8c,0xc0,0xff,0x02,0x3c,0xff,0xff,0x42,0x34, -0x3f,0x00,0x24,0x32,0x24,0x18,0x62,0x00,0x00,0x24,0x04,0x00,0x25,0x18,0x64,0x00, -0x00,0x80,0x02,0x3c,0xc5,0x55,0x00,0x08,0x25,0x18,0x62,0x00,0xcc,0xff,0x02,0x24, -0x00,0x00,0x62,0xa0,0xcd,0x54,0x00,0x08,0x68,0x15,0x83,0x26,0x25,0xb0,0x02,0x3c, -0x94,0x0c,0x43,0x34,0x80,0x0c,0x42,0x34,0x00,0x00,0x44,0xac,0x00,0x00,0x60,0xac, -0x0d,0x55,0x00,0x08,0x68,0x15,0x83,0x26,0x2f,0x00,0xe0,0x10,0x21,0x30,0x00,0x00, -0x2b,0x10,0x42,0x01,0x21,0x20,0x8a,0x00,0x00,0x00,0x42,0x38,0x24,0x00,0x06,0x24, -0x2b,0x18,0x43,0x01,0x0b,0x30,0x82,0x00,0xcd,0xfe,0x60,0x10,0x20,0x00,0x09,0x24, -0x68,0x15,0x83,0x26,0x0a,0x40,0x62,0x94,0x02,0x80,0x0b,0x3c,0x3f,0x00,0x42,0x30, -0xe0,0x54,0x00,0x08,0x21,0x48,0x4a,0x00,0x21,0x28,0xa3,0x00,0xb4,0x41,0xa3,0x90, -0x25,0xb0,0x04,0x3c,0x22,0x0a,0x82,0x34,0x00,0x00,0x43,0xa0,0xb5,0x41,0xa6,0x90, -0x23,0x0a,0x82,0x34,0x24,0x0a,0x87,0x34,0x00,0x00,0x46,0xa0,0xb6,0x41,0xa3,0x90, -0x25,0x0a,0x86,0x34,0x26,0x0a,0x88,0x34,0x00,0x00,0xe3,0xa0,0xb7,0x41,0xa2,0x90, -0x27,0x0a,0x87,0x34,0x28,0x0a,0x89,0x34,0x00,0x00,0xc2,0xa0,0xb8,0x41,0xa3,0x90, -0x29,0x0a,0x84,0x34,0x00,0x00,0x03,0xa1,0xb9,0x41,0xa2,0x90,0x00,0x00,0x00,0x00, -0x00,0x00,0xe2,0xa0,0xba,0x41,0xa3,0x90,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0xa1, -0xbb,0x41,0xa2,0x90,0x2d,0x55,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xa0, -0xad,0x54,0x00,0x08,0x68,0x15,0x84,0x26,0x23,0x10,0x8a,0x00,0x2b,0x18,0x44,0x01, -0x2b,0x20,0x45,0x01,0x0b,0x30,0x43,0x00,0xa1,0xfe,0x80,0x14,0x23,0x48,0xaa,0x00, -0xde,0x54,0x00,0x08,0x21,0x48,0x00,0x00,0xff,0xff,0x43,0x25,0x42,0x18,0x03,0x00, -0x40,0x10,0x03,0x00,0x21,0x10,0x43,0x00,0x40,0x55,0x00,0x08,0x01,0x00,0x4a,0x24, -0x25,0xb0,0x02,0x3c,0x9c,0x0c,0x43,0x34,0x88,0x0c,0x42,0x34,0x00,0x00,0x44,0xac, -0x00,0x00,0x60,0xac,0x95,0x54,0x00,0x08,0x00,0x00,0x00,0x00,0x08,0x40,0x62,0x8c, -0x00,0x00,0x00,0x00,0x02,0x12,0x02,0x00,0x3f,0x00,0x42,0x30,0x23,0x18,0x4a,0x00, -0x2b,0x10,0x42,0x01,0x4e,0x55,0x00,0x08,0x0b,0x20,0x62,0x00,0xff,0xff,0x05,0x36, -0x60,0x00,0x06,0x24,0xba,0x44,0x00,0x0c,0x24,0x00,0x04,0x24,0x84,0x0a,0x00,0x0c, -0xe8,0x03,0x04,0x24,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x01,0x00,0x21,0x38, -0x00,0x60,0x81,0x40,0x24,0x00,0x04,0x24,0xdd,0x44,0x00,0x0c,0xff,0xff,0x05,0x36, -0x1f,0x00,0x52,0x30,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40, -0xb3,0x0a,0x00,0x0c,0x64,0x00,0x04,0x24,0xb4,0x54,0x00,0x08,0x68,0x15,0x90,0x26, -0x00,0xff,0x84,0x30,0x02,0x22,0x04,0x00,0x08,0x00,0x80,0x10,0x02,0x80,0x02,0x3c, -0xff,0x00,0x02,0x24,0x04,0x00,0x82,0x10,0xcc,0xff,0x03,0x24,0x02,0x80,0x02,0x3c, -0x08,0x00,0xe0,0x03,0x4e,0x58,0x43,0xa0,0x02,0x80,0x02,0x3c,0x08,0x00,0xe0,0x03, -0x4e,0x58,0x44,0xa0,0x02,0x24,0x04,0x00,0xff,0x00,0x84,0x30,0xc0,0x10,0x04,0x00, -0x21,0x10,0x44,0x00,0x80,0x10,0x02,0x00,0x21,0x10,0x44,0x00,0x02,0x80,0x03,0x3c, -0x80,0x10,0x02,0x00,0x68,0x15,0x63,0x24,0x20,0x00,0x84,0x2c,0x09,0x00,0x80,0x10, -0x21,0x10,0x43,0x00,0x68,0x51,0x43,0x8c,0x25,0xb0,0x02,0x3c,0xc4,0x02,0x42,0x34, -0x02,0x19,0x03,0x00,0x7f,0x00,0x63,0x30,0x00,0x00,0x43,0xac,0x08,0x00,0xe0,0x03, -0x00,0x00,0x00,0x00,0x02,0x80,0x02,0x3c,0x44,0x79,0x43,0x8c,0x25,0xb0,0x02,0x3c, -0xc4,0x02,0x42,0x34,0x02,0x19,0x03,0x00,0x7f,0x00,0x63,0x30,0x00,0x00,0x43,0xac, -0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0xff,0x00,0x85,0x30,0xd2,0xff,0xa3,0x24, -0xfe,0xff,0xa2,0x24,0xda,0xff,0xa4,0x24,0x04,0x00,0x63,0x2c,0x08,0x00,0x84,0x2c, -0x06,0x00,0x60,0x14,0xff,0x00,0x42,0x30,0xf0,0xff,0xa2,0x24,0xfc,0xff,0xa3,0x24, -0x16,0x00,0x46,0x2c,0x03,0x00,0x80,0x10,0xff,0x00,0x62,0x30,0x08,0x00,0xe0,0x03, -0x00,0x00,0x00,0x00,0xfa,0xff,0xa3,0x24,0xfc,0xff,0xc0,0x10,0x21,0x10,0xa0,0x00, -0x08,0x00,0xe0,0x03,0xff,0x00,0x62,0x30,0x25,0xb0,0x04,0x3c,0x03,0x0d,0x85,0x34, -0x00,0x00,0xa3,0x90,0x2d,0x0a,0x84,0x34,0xff,0x00,0x63,0x30,0x08,0x00,0x63,0x34, -0x00,0x00,0xa3,0xa0,0x00,0x00,0xa2,0x90,0x00,0x00,0x00,0x00,0xf7,0x00,0x42,0x30, -0x00,0x00,0xa2,0xa0,0x00,0x00,0x83,0x90,0x00,0x00,0x00,0x00,0x3f,0x00,0x63,0x30, -0x00,0x00,0x83,0xa0,0x00,0x00,0x82,0x90,0x80,0xff,0x03,0x24,0x25,0x10,0x43,0x00, -0x00,0x00,0x82,0xa0,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x25,0xb0,0x02,0x3c, -0xff,0x00,0x03,0x3c,0x82,0x01,0x49,0x34,0x81,0x01,0x48,0x34,0x24,0x10,0x83,0x00, -0x02,0x3c,0x02,0x00,0x00,0xff,0x63,0x34,0x02,0x80,0x02,0x3c,0x68,0x15,0x45,0x24, -0x02,0x32,0x04,0x00,0x01,0x00,0x02,0x24,0x24,0x20,0x83,0x00,0xc2,0x4c,0xa2,0xa0, -0xb0,0x4c,0xa0,0xac,0xb4,0x4c,0xa0,0xac,0xb8,0x4c,0xa0,0xac,0x06,0x00,0x80,0x14, -0xbc,0x4c,0xa0,0xac,0x00,0x00,0x02,0x91,0x00,0x00,0x23,0x91,0xc0,0x4c,0xa2,0xa0, -0x08,0x00,0xe0,0x03,0xc1,0x4c,0xa3,0xa0,0xc1,0x4c,0xa7,0xa0,0x08,0x00,0xe0,0x03, -0xc0,0x4c,0xa6,0xa0,0x02,0x80,0x03,0x3c,0x68,0x15,0x63,0x24,0xc1,0x4c,0x66,0x90, -0xc0,0x4c,0x65,0x90,0x25,0xb0,0x02,0x3c,0x82,0x01,0x44,0x34,0x81,0x01,0x42,0x34, -0x00,0x00,0x45,0xa0,0x00,0x00,0x86,0xa0,0x08,0x00,0xe0,0x03,0xc2,0x4c,0x60,0xa0, -0x02,0x80,0x08,0x3c,0x68,0x15,0x04,0x25,0xc2,0x4c,0x82,0x90,0x00,0x00,0x00,0x00, -0x15,0x00,0x40,0x10,0x21,0x18,0x00,0x00,0xb4,0x4c,0x82,0x8c,0xb0,0x4c,0x85,0x8c, -0x25,0xb0,0x03,0x3c,0x40,0x11,0x02,0x00,0x2b,0x10,0xa2,0x00,0x82,0x01,0x67,0x34, -0x0f,0x00,0x40,0x10,0x81,0x01,0x66,0x34,0xc1,0x4c,0x83,0x90,0xc0,0x4c,0x82,0x90, -0xf0,0x00,0x63,0x30,0x1f,0x00,0x42,0x30,0x00,0x00,0xc2,0xa0,0x00,0x00,0xe3,0xa0, -0x68,0x15,0x02,0x25,0x01,0x00,0x03,0x24,0xbc,0x4c,0x40,0xac,0xb0,0x4c,0x40,0xac, -0xb4,0x4c,0x40,0xac,0xb8,0x4c,0x40,0xac,0x08,0x00,0xe0,0x03,0x21,0x10,0x60,0x00, -0xb8,0x4c,0x82,0x8c,0x25,0xb0,0x03,0x3c,0x82,0x01,0x69,0x34,0x40,0x11,0x02,0x00, -0x2b,0x10,0xa2,0x00,0x0e,0x00,0x40,0x14,0x81,0x01,0x66,0x34,0xbc,0x4c,0x82,0x8c, -0x00,0x00,0x00,0x00,0x40,0x11,0x02,0x00,0x2b,0x10,0xa2,0x00,0x08,0x00,0x40,0x14, -0x00,0x00,0x00,0x00,0xc1,0x4c,0x83,0x90,0xc0,0x4c,0x82,0x90,0x00,0x00,0x00,0x00, -0x00,0x00,0xc2,0xa0,0x00,0x00,0x23,0xa1,0xf7,0x56,0x00,0x08,0x68,0x15,0x02,0x25, -0xc1,0x4c,0x83,0x90,0xc0,0x4c,0x82,0x90,0xf0,0x00,0x63,0x30,0x7f,0x00,0x42,0x30, -0x00,0x00,0xc2,0xa0,0x00,0x00,0x23,0xa1,0xf7,0x56,0x00,0x08,0x68,0x15,0x02,0x25, -0x02,0x00,0x03,0x24,0x02,0x80,0x02,0x3c,0x08,0x00,0xe0,0x03,0x3d,0x58,0x43,0xa0, -0xcc,0xff,0x03,0x24,0x02,0x80,0x02,0x3c,0x08,0x00,0xe0,0x03,0x3d,0x58,0x43,0xa0, -0x25,0xb0,0x03,0x3c,0x33,0x02,0x65,0x34,0x00,0x11,0x04,0x00,0x00,0x00,0xa2,0xa0, -0x30,0x02,0x63,0x34,0x00,0x00,0x65,0x8c,0x0f,0x00,0x02,0x3c,0xff,0xff,0x42,0x34, -0x24,0x28,0xa2,0x00,0x01,0x00,0x03,0x24,0x04,0x18,0x83,0x00,0x02,0x00,0xa0,0x10, -0x21,0x10,0x00,0x00,0xff,0xff,0x62,0x30,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0xe0,0xff,0xbd,0x27,0x14,0x00,0xb1,0xaf,0x25,0xb0,0x11,0x3c,0x18,0x00,0xb2,0xaf, -0x4c,0x00,0x22,0x36,0x1c,0x00,0xbf,0xaf,0x10,0x00,0xb0,0xaf,0x00,0x00,0x44,0x90, -0x02,0x80,0x03,0x3c,0x02,0x00,0x02,0x24,0xff,0x00,0x84,0x30,0x07,0x00,0x82,0x10, -0x68,0x15,0x72,0x24,0x1c,0x00,0xbf,0x8f,0x18,0x00,0xb2,0x8f,0x14,0x00,0xb1,0x8f, -0x10,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03,0x20,0x00,0xbd,0x27,0xe6,0x63,0x43,0x96, -0x01,0x00,0x02,0x24,0xf7,0xff,0x62,0x14,0x21,0x20,0x00,0x00,0x22,0x57,0x00,0x0c, -0x00,0x00,0x00,0x00,0x04,0x00,0x04,0x24,0x22,0x57,0x00,0x0c,0x21,0x80,0x40,0x00, -0x25,0x80,0x02,0x02,0x33,0x02,0x23,0x36,0x08,0x00,0x02,0x24,0xff,0xff,0x10,0x32, -0x40,0x00,0x25,0x36,0x00,0x00,0x62,0xa0,0xea,0xff,0x00,0x16,0x00,0x00,0x00,0x00, -0x00,0x00,0xa2,0x94,0xe4,0x63,0x43,0x96,0xff,0xdf,0x42,0x30,0x00,0x20,0x44,0x34, -0x01,0x00,0x63,0x24,0xe4,0x63,0x43,0xa6,0x00,0x00,0xa2,0xa4,0x00,0x00,0xa4,0xa4, -0x3f,0x57,0x00,0x08,0x00,0x00,0x00,0x00,0x01,0x80,0x03,0x3c,0x25,0xb0,0x02,0x3c, -0x18,0x03,0x42,0x34,0x80,0x5d,0x63,0x24,0x00,0x00,0x43,0xac,0x63,0x00,0x02,0x24, -0xff,0xff,0x42,0x24,0xff,0xff,0x41,0x04,0xff,0xff,0x42,0x24,0x02,0x80,0x02,0x3c, -0x88,0x7d,0x45,0x94,0x02,0x80,0x03,0x3c,0x02,0x80,0x02,0x3c,0x8b,0x7d,0x66,0x90, -0x98,0x7d,0x47,0x90,0x02,0x80,0x03,0x3c,0x02,0x80,0x02,0x3c,0xa3,0x7d,0x69,0x90, -0xa5,0x7d,0x4a,0x90,0x02,0x80,0x03,0x3c,0x02,0x80,0x02,0x3c,0xa8,0x7d,0x6b,0x90, -0xaa,0x7d,0x4c,0x90,0x07,0x00,0x03,0x24,0x02,0x80,0x02,0x3c,0x25,0xb0,0x04,0x3c, -0x95,0x7d,0x43,0xa0,0xb0,0x03,0x84,0x34,0x02,0x80,0x02,0x3c,0x02,0x80,0x18,0x3c, -0x8a,0x7d,0x08,0x93,0x00,0x00,0x85,0xac,0x96,0x7d,0x40,0xa0,0x02,0x80,0x02,0x3c, -0x00,0x00,0x86,0xac,0x02,0x80,0x0f,0x3c,0x97,0x7d,0x40,0xa0,0x02,0x80,0x02,0x3c, -0x00,0x00,0x87,0xac,0x68,0x15,0xee,0x25,0xb8,0x7d,0x40,0xa0,0xfd,0xff,0x02,0x24, -0xd5,0x4a,0xc2,0xa1,0x01,0x00,0x03,0x24,0x00,0x78,0x02,0x24,0xd4,0x4a,0xc3,0xa1, -0xd8,0x4a,0xc2,0xa5,0xff,0x07,0x03,0x24,0x0f,0x00,0x0d,0x31,0x02,0x00,0x02,0x24, -0xda,0x4a,0xc3,0xa5,0x00,0x00,0x88,0xac,0x00,0x00,0x89,0xac,0x00,0x00,0x8a,0xac, -0x00,0x00,0x8b,0xac,0x00,0x00,0x8c,0xac,0x17,0x00,0xa2,0x11,0x02,0x80,0x02,0x3c, -0x8a,0x7d,0x02,0x93,0x01,0x00,0x03,0x24,0x0f,0x00,0x42,0x30,0x05,0x00,0x43,0x10, -0x00,0x00,0x00,0x00,0x02,0x80,0x02,0x3c,0xca,0x7d,0x40,0xa4,0x08,0x00,0xe0,0x03, -0x00,0x00,0x00,0x00,0x00,0x80,0x02,0x3c,0x68,0x15,0xe4,0x25,0x02,0xbc,0x42,0x34, -0x68,0x4b,0x82,0xac,0x15,0x15,0x03,0x3c,0x02,0x02,0x02,0x3c,0x07,0x07,0x63,0x34, -0x64,0x4b,0x82,0xac,0x02,0x80,0x02,0x3c,0x60,0x4b,0x83,0xac,0xca,0x7d,0x40,0xa4, -0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x8f,0x7d,0x44,0x90,0x06,0x00,0x03,0x24, -0x15,0x00,0x83,0x10,0x0b,0x00,0x02,0x24,0x0a,0x00,0x82,0x10,0x00,0xe0,0x02,0x3c, -0x68,0x15,0xe4,0x25,0x00,0xb2,0x42,0x34,0x00,0x1c,0x03,0x3c,0x68,0x4b,0x82,0xac, -0x00,0x1c,0x63,0x34,0x00,0x04,0x02,0x24,0x60,0x4b,0x83,0xac,0x9a,0x57,0x00,0x08, -0x64,0x4b,0x82,0xac,0x00,0x80,0x02,0x3c,0x00,0xbc,0x42,0x34,0x15,0x15,0x03,0x3c, -0x68,0x4b,0xc2,0xad,0x07,0x07,0x63,0x34,0x03,0x03,0x02,0x3c,0x60,0x4b,0xc3,0xad, -0x9a,0x57,0x00,0x08,0x64,0x4b,0xc2,0xad,0x00,0xc0,0x02,0x3c,0x00,0xb2,0x42,0x34, -0x1c,0x1c,0x03,0x3c,0x68,0x4b,0xc2,0xad,0x07,0x07,0x63,0x34,0x00,0x04,0x02,0x24, -0x60,0x4b,0xc3,0xad,0x9a,0x57,0x00,0x08,0x64,0x4b,0xc2,0xad,0x25,0xb0,0x02,0x3c, -0x4d,0x00,0x44,0x34,0xff,0x00,0x03,0x3c,0xec,0x02,0x42,0x34,0x00,0x00,0x43,0xac, -0x00,0x00,0x80,0xa0,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x01,0x80,0x03,0x3c, -0x25,0xb0,0x02,0x3c,0x64,0x5f,0x63,0x24,0x18,0x03,0x42,0x34,0x00,0x00,0x43,0xac, -0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x7f,0x00,0x02,0x3c,0xfd,0xbf,0x45,0x34, -0x80,0x04,0x03,0x3c,0x25,0x28,0xa3,0x00,0x00,0x08,0x04,0x3c,0x02,0x80,0x02,0x3c, -0x68,0x15,0x42,0x24,0x25,0x28,0xa4,0x00,0x41,0xb0,0x03,0x3c,0x00,0x00,0x65,0xac, -0x04,0x4b,0x45,0xac,0xfc,0x4a,0x45,0xac,0x08,0x00,0x63,0x34,0x86,0x00,0x05,0x24, -0x00,0x00,0x65,0xa4,0x08,0x4b,0x45,0xa4,0x00,0x4b,0x40,0xac,0x0a,0x4b,0x40,0xa4, -0x0c,0x4b,0x45,0xa4,0x00,0x60,0x01,0x40,0x01,0x00,0x21,0x34,0x00,0x60,0x81,0x40, -0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0xf8,0x57,0x00,0x08,0x00,0x00,0x00,0x00, -0x42,0xb0,0x02,0x3c,0xa0,0xff,0x03,0x24,0x01,0x00,0x42,0x34,0xe8,0xff,0xbd,0x27, -0x21,0x20,0x00,0x00,0x01,0x00,0x05,0x24,0x00,0x01,0x06,0x24,0x00,0x00,0x43,0xa0, -0x10,0x00,0xbf,0xaf,0xc4,0x0c,0x00,0x0c,0x00,0x00,0x00,0x00,0x10,0x00,0xbf,0x8f, -0x03,0x00,0x04,0x24,0x01,0x00,0x05,0x24,0x40,0x1f,0x06,0x24,0xc4,0x0c,0x00,0x08, -0x18,0x00,0xbd,0x27,0xe8,0xff,0xbd,0x27,0x10,0x00,0xb0,0xaf,0x14,0x00,0xbf,0xaf, -0x21,0x5b,0x00,0x0c,0x00,0x00,0x00,0x00,0x02,0x80,0x02,0x3c,0x68,0x15,0x42,0x24, -0x48,0x01,0x03,0x24,0xe0,0x63,0x43,0xac,0xdc,0x63,0x43,0xac,0x21,0x80,0x40,0x00, -0x1f,0x00,0x03,0x24,0xff,0xff,0x63,0x24,0xc4,0x4c,0x40,0xa4,0xc6,0x4c,0x40,0xa4, -0xc8,0x4c,0x40,0xa4,0xca,0x4c,0x40,0xa4,0xcc,0x4c,0x40,0xa4,0xce,0x4c,0x40,0xa4, -0xd0,0x4c,0x40,0xa4,0xd2,0x4c,0x40,0xa4,0xd4,0x4c,0x40,0xa4,0xf5,0xff,0x61,0x04, -0x24,0x00,0x42,0x24,0x25,0xb0,0x02,0x3c,0x10,0x00,0x03,0x24,0xb0,0x03,0x42,0x34, -0x02,0x80,0x04,0x3c,0x8c,0x58,0x84,0x24,0x00,0x00,0x43,0xac,0x21,0x28,0x00,0x00, -0x97,0x45,0x00,0x0c,0x04,0x00,0x06,0x24,0xef,0x5b,0x00,0x0c,0x00,0x00,0x00,0x00, -0x71,0x5c,0x00,0x0c,0x8c,0x65,0x00,0xae,0xa7,0x5d,0x00,0x0c,0x00,0x00,0x00,0x00, -0x4b,0x5e,0x00,0x0c,0x00,0x00,0x00,0x00,0x02,0x80,0x03,0x3c,0x8e,0x7d,0x64,0x90, -0x92,0x00,0x02,0x24,0x03,0x00,0x82,0x10,0x00,0x00,0x00,0x00,0xf7,0x5d,0x00,0x0c, -0x00,0x00,0x00,0x00,0xdd,0x5d,0x00,0x0c,0x00,0x00,0x00,0x00,0x8b,0x5c,0x00,0x0c, -0x00,0x00,0x00,0x00,0xe4,0x63,0x00,0xa6,0x67,0x5e,0x00,0x0c,0xe6,0x63,0x00,0xa6, -0x14,0x00,0xbf,0x8f,0x10,0x00,0xb0,0x8f,0x02,0x80,0x04,0x3c,0x02,0x80,0x05,0x3c, -0xf8,0x7a,0x82,0x24,0x00,0x7b,0xa3,0x24,0x18,0x00,0xbd,0x27,0x04,0x00,0x42,0xac, -0xf8,0x7a,0x82,0xac,0x00,0x7b,0xa3,0xac,0x08,0x00,0xe0,0x03,0x04,0x00,0x63,0xac, -0xe8,0xff,0xbd,0x27,0x10,0x00,0xb0,0xaf,0x01,0x80,0x02,0x3c,0x25,0xb0,0x10,0x3c, -0x18,0x03,0x03,0x36,0x38,0x61,0x42,0x24,0x00,0x00,0x62,0xac,0x14,0x00,0xbf,0xaf, -0x60,0x57,0x00,0x0c,0x00,0x00,0x00,0x00,0xd5,0x58,0x00,0x0c,0x00,0x00,0x00,0x00, -0x01,0x00,0x03,0x24,0x02,0x80,0x02,0x3c,0xfd,0x5a,0x00,0x0c,0xdb,0x60,0x43,0xa0, -0xd1,0x57,0x00,0x0c,0x00,0x00,0x00,0x00,0x32,0x41,0x00,0x0c,0x00,0x00,0x00,0x00, -0x0b,0x58,0x00,0x0c,0x00,0x00,0x00,0x00,0x44,0x00,0x03,0x36,0x00,0x00,0x62,0x94, -0x00,0x00,0x00,0x00,0x40,0x00,0x42,0x34,0x00,0x00,0x62,0xa4,0xd9,0x57,0x00,0x0c, -0x00,0x00,0x00,0x00,0xfa,0x57,0x00,0x0c,0x00,0x00,0x00,0x00,0xc9,0x5a,0x00,0x0c, -0x00,0x00,0x00,0x00,0x8e,0x5a,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x3c, -0xb4,0x24,0x84,0x24,0xe6,0x5a,0x00,0x0c,0x01,0x00,0x05,0x24,0x01,0x80,0x04,0x3c, -0x08,0x1e,0x84,0x24,0xe6,0x5a,0x00,0x0c,0x02,0x00,0x05,0x24,0x81,0x4e,0x00,0x0c, -0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x3c,0x54,0x34,0x84,0x24,0xe6,0x5a,0x00,0x0c, -0x03,0x00,0x05,0x24,0x02,0x80,0x02,0x3c,0x98,0x7d,0x43,0x90,0x43,0x00,0x04,0x36, -0x29,0x00,0x60,0x10,0xd8,0x00,0x10,0x36,0x07,0x00,0x02,0x24,0x2b,0x00,0x62,0x10, -0x25,0xb0,0x04,0x3c,0x10,0x02,0x86,0x34,0x43,0x00,0x85,0x34,0x03,0x00,0x02,0x24, -0x10,0x00,0x03,0x24,0x00,0x00,0xa2,0xa0,0xd8,0x00,0x84,0x34,0x00,0x00,0xc3,0xa0, -0x00,0x00,0x82,0x90,0x80,0xff,0x03,0x24,0x42,0xb0,0x05,0x3c,0x25,0x10,0x43,0x00, -0x00,0x00,0x82,0xa0,0x25,0xb0,0x04,0x3c,0x44,0x00,0x84,0x34,0x00,0x00,0x82,0x94, -0x00,0x00,0x00,0x00,0xc0,0x00,0x42,0x34,0x00,0x00,0x82,0xa4,0x00,0x00,0xa3,0x90, -0x00,0x00,0x00,0x00,0x01,0x00,0x63,0x34,0x00,0x00,0xa3,0xa0,0xe0,0x57,0x00,0x0c, -0x00,0x00,0x00,0x00,0x02,0x80,0x04,0x3c,0x08,0x00,0x84,0x24,0x21,0x28,0x00,0x00, -0x21,0x30,0x00,0x00,0x31,0x1c,0x00,0x0c,0x21,0x38,0x00,0x00,0xf8,0x57,0x00,0x0c, -0x00,0x00,0x00,0x00,0x14,0x00,0xbf,0x8f,0x10,0x00,0xb0,0x8f,0x01,0x00,0x02,0x24, -0x08,0x00,0xe0,0x03,0x18,0x00,0xbd,0x27,0x00,0x00,0x80,0xa0,0x00,0x00,0x03,0x92, -0x80,0xff,0x02,0x24,0x25,0x18,0x62,0x00,0x00,0x00,0x03,0xa2,0x25,0xb0,0x04,0x3c, -0x44,0x00,0x84,0x34,0x00,0x00,0x82,0x94,0x42,0xb0,0x05,0x3c,0xc0,0x00,0x42,0x34, -0x00,0x00,0x82,0xa4,0x00,0x00,0xa3,0x90,0x00,0x00,0x00,0x00,0x01,0x00,0x63,0x34, -0x00,0x00,0xa3,0xa0,0xe0,0x57,0x00,0x0c,0x00,0x00,0x00,0x00,0x02,0x80,0x04,0x3c, -0x08,0x00,0x84,0x24,0x21,0x28,0x00,0x00,0x21,0x30,0x00,0x00,0x31,0x1c,0x00,0x0c, -0x21,0x38,0x00,0x00,0xf8,0x57,0x00,0x0c,0x00,0x00,0x00,0x00,0x14,0x00,0xbf,0x8f, -0x10,0x00,0xb0,0x8f,0x01,0x00,0x02,0x24,0x08,0x00,0xe0,0x03,0x18,0x00,0xbd,0x27, -0x21,0x20,0x00,0x00,0x20,0xb0,0x06,0x3c,0xff,0xff,0x05,0x34,0x21,0x18,0x86,0x00, -0x04,0x00,0x84,0x24,0x2a,0x10,0xa4,0x00,0x00,0x00,0x60,0xac,0xfb,0xff,0x40,0x10, -0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0xb8,0xff,0xbd,0x27, -0x25,0xb0,0x04,0x3c,0x44,0x00,0xbf,0xaf,0x40,0x00,0xbe,0xaf,0x3c,0x00,0xb7,0xaf, -0x38,0x00,0xb6,0xaf,0x34,0x00,0xb5,0xaf,0x30,0x00,0xb4,0xaf,0x2c,0x00,0xb3,0xaf, -0x28,0x00,0xb2,0xaf,0x24,0x00,0xb1,0xaf,0x20,0x00,0xb0,0xaf,0x0a,0x00,0x83,0x34, -0x00,0x00,0x62,0x90,0x00,0x00,0x00,0x00,0x20,0x00,0x42,0x30,0x0c,0x00,0x40,0x10, -0x4c,0x87,0x02,0x3c,0x00,0x00,0x62,0x90,0x00,0x00,0x00,0x00,0x10,0x00,0x42,0x30, -0x66,0x01,0x40,0x10,0x4c,0x87,0x02,0x3c,0x54,0x00,0x83,0x34,0x50,0x00,0x82,0x34, -0x00,0x00,0x45,0xac,0x00,0x00,0x65,0xa4,0xf9,0x58,0x00,0x08,0x02,0x80,0x03,0x3c, -0x54,0x00,0x85,0x34,0x00,0xe0,0x42,0x34,0x50,0x00,0x84,0x34,0x12,0x01,0x03,0x24, -0x00,0x00,0x82,0xac,0x00,0x00,0xa3,0xac,0x02,0x80,0x03,0x3c,0x68,0x15,0x62,0x24, -0xd5,0x4a,0x43,0x90,0xda,0x4a,0x45,0x94,0x25,0xb0,0x1e,0x3c,0x1c,0x00,0xa3,0xa3, -0x60,0x4b,0x43,0x8c,0x58,0x00,0xc6,0x37,0xff,0xff,0x04,0x24,0x10,0x00,0xa3,0xaf, -0x64,0x4b,0x43,0x8c,0x5c,0x00,0xc7,0x37,0x60,0x00,0xc8,0x37,0x14,0x00,0xa3,0xaf, -0x68,0x4b,0x42,0x8c,0x64,0x00,0xc9,0x37,0x8a,0x00,0xca,0x37,0x18,0x00,0xa2,0xaf, -0x24,0x10,0x02,0x3c,0x21,0x28,0xa2,0x00,0x4c,0x81,0x02,0x3c,0x00,0xe0,0x42,0x34, -0x00,0x00,0xc2,0xac,0x96,0x01,0x03,0x24,0x28,0x28,0x02,0x24,0x00,0x00,0xe3,0xac, -0x89,0x00,0xcb,0x37,0x00,0x00,0x04,0xad,0x8c,0x00,0xcc,0x37,0x00,0x00,0x24,0xad, -0x09,0x00,0x03,0x24,0x00,0x00,0x42,0xa5,0x10,0x10,0x02,0x24,0x00,0x00,0x63,0xa1, -0x8e,0x00,0xcd,0x37,0x00,0x00,0x82,0xa5,0x0a,0x0a,0x03,0x24,0x13,0x00,0x02,0x24, -0x90,0x00,0xce,0x37,0x00,0x00,0xa3,0xa5,0x00,0x00,0xc2,0xa1,0x25,0xb0,0x02,0x3c, -0x40,0x00,0x03,0x24,0x91,0x00,0x42,0x34,0x00,0x00,0x43,0xa0,0x25,0xb0,0x03,0x3c, -0x3a,0x01,0x02,0x24,0x92,0x00,0x63,0x34,0x00,0x00,0x62,0xa4,0xb5,0x00,0xd1,0x37, -0x21,0x00,0x03,0x24,0x00,0x00,0x23,0xa2,0x10,0x00,0xa2,0x8f,0xa0,0x00,0xd2,0x37, -0xa4,0x00,0xd3,0x37,0x00,0x00,0x42,0xae,0x14,0x00,0xa3,0x8f,0xa8,0x00,0xd4,0x37, -0xac,0x00,0xd5,0x37,0x00,0x00,0x63,0xae,0x18,0x00,0xa2,0x8f,0x25,0xb0,0x03,0x3c, -0xb0,0x00,0x63,0x34,0x00,0x00,0x82,0xae,0x21,0x10,0x02,0x3c,0xff,0x77,0x42,0x34, -0x00,0x00,0xa2,0xae,0x25,0xb0,0x02,0x3c,0xd8,0x00,0x42,0x34,0x00,0x00,0x65,0xac, -0x00,0x00,0x40,0xa0,0x1c,0x00,0xa2,0x93,0x25,0xb0,0x03,0x3c,0xb4,0x00,0x63,0x34, -0x00,0x00,0x62,0xa0,0x25,0xb0,0x03,0x3c,0x04,0x00,0x02,0x24,0xb6,0x00,0x63,0x34, -0x00,0x00,0x62,0xa0,0x25,0xb0,0x03,0x3c,0x0f,0x00,0x02,0x24,0xba,0x00,0x63,0x34, -0xb9,0x00,0xdf,0x37,0x00,0x00,0xe4,0xa3,0x00,0x00,0x62,0xa4,0x25,0xb0,0x02,0x3c, -0x1a,0x01,0x42,0x34,0x16,0x01,0xd0,0x37,0x18,0x01,0xcf,0x37,0x00,0x00,0x00,0xa6, -0x25,0xb0,0x03,0x3c,0x00,0x00,0xe0,0xa5,0x00,0x00,0x40,0xa4,0xff,0xff,0x02,0x3c, -0xff,0x0f,0x42,0x34,0xdc,0x00,0x63,0x34,0x00,0x00,0x62,0xac,0x2f,0x00,0x03,0x3c, -0x25,0xb0,0x02,0x3c,0x32,0x32,0x63,0x34,0xd0,0x01,0x42,0x34,0x00,0x00,0x43,0xac, -0x5e,0x00,0x02,0x3c,0x25,0xb0,0x03,0x3c,0x32,0x43,0x42,0x34,0xd4,0x01,0x63,0x34, -0x00,0x00,0x62,0xac,0x08,0x00,0x03,0x3c,0x25,0xb0,0x02,0x3c,0x30,0xa5,0x63,0x34, -0xd8,0x01,0x42,0x34,0x00,0x00,0x43,0xac,0xdc,0x01,0xc4,0x37,0x02,0x80,0x03,0x3c, -0x49,0xa5,0x02,0x34,0x8e,0x7d,0x6d,0x90,0x00,0x00,0x82,0xac,0xc2,0x00,0x02,0x3c, -0x1a,0x06,0x03,0x24,0x51,0x10,0x42,0x34,0xe0,0x01,0xc5,0x37,0xf4,0x01,0xc6,0x37, -0xf8,0x01,0xc7,0x37,0x07,0x07,0x04,0x24,0x00,0x00,0xa3,0xa4,0x00,0x02,0xc8,0x37, -0x00,0x00,0xc4,0xa4,0x26,0x00,0x03,0x24,0x00,0x00,0xe2,0xac,0x03,0x02,0xc9,0x37, -0x04,0x00,0x02,0x24,0x00,0x00,0x03,0xa5,0x36,0x02,0xca,0x37,0x00,0x00,0x22,0xa1, -0xc0,0x01,0x03,0x24,0x0c,0x00,0x02,0x24,0x34,0x02,0xcb,0x37,0x00,0x00,0x42,0xa1, -0x37,0x02,0xcc,0x37,0x00,0x00,0x63,0xa5,0x03,0x00,0x02,0x24,0x22,0x00,0x03,0x24, -0x00,0x00,0x82,0xa1,0xd6,0x00,0xa3,0x11,0x1b,0x1b,0x02,0x3c,0x13,0x13,0x02,0x3c, -0x13,0x13,0x42,0x34,0x60,0x01,0xc3,0x37,0x64,0x01,0xc4,0x37,0x68,0x01,0xc5,0x37, -0x7c,0x01,0xca,0x37,0x6c,0x01,0xc6,0x37,0x70,0x01,0xc7,0x37,0x74,0x01,0xc8,0x37, -0x78,0x01,0xc9,0x37,0x00,0x00,0x62,0xac,0x00,0x00,0x82,0xac,0x02,0x80,0x03,0x3c, -0x00,0x00,0xa2,0xac,0x00,0x00,0xc2,0xac,0x00,0x00,0xe2,0xac,0x00,0x00,0x02,0xad, -0x00,0x00,0x22,0xad,0x00,0x00,0x42,0xad,0x8e,0x7d,0x65,0x90,0x25,0xb0,0x0c,0x3c, -0x01,0x70,0x03,0x3c,0x80,0x01,0x82,0x35,0x08,0x5f,0x63,0x34,0x22,0x00,0x04,0x24, -0x00,0x00,0x43,0xac,0xb5,0x00,0xa4,0x10,0x0f,0x1f,0x02,0x3c,0x92,0x00,0x02,0x24, -0xb2,0x00,0xa2,0x10,0x0f,0x1f,0x02,0x3c,0x0f,0x10,0x02,0x3c,0x00,0xf0,0x51,0x34, -0xf7,0x01,0x92,0x35,0x15,0xf0,0x4d,0x34,0x77,0x00,0x0e,0x24,0x84,0x01,0x87,0x35, -0x88,0x01,0x88,0x35,0x10,0xf0,0x44,0x34,0x8c,0x01,0x85,0x35,0x05,0xf0,0x42,0x34, -0x00,0x00,0xed,0xac,0x90,0x01,0x83,0x35,0x00,0x00,0x04,0xad,0x94,0x01,0x86,0x35, -0x00,0x00,0xa2,0xac,0xf5,0x0f,0x02,0x24,0x00,0x00,0x71,0xac,0x25,0xb0,0x05,0x3c, -0x00,0x00,0xc2,0xac,0x98,0x01,0x89,0x35,0x9c,0x01,0x8a,0x35,0xf0,0x0f,0x03,0x24, -0x0d,0x00,0x02,0x24,0x00,0x00,0x23,0xad,0xa0,0x01,0x8b,0x35,0x00,0x00,0x42,0xad, -0xa7,0x01,0xb7,0x34,0xf6,0x01,0x8c,0x35,0xff,0xff,0x02,0x24,0x00,0x00,0x6d,0xad, -0x00,0x00,0x8e,0xa1,0x00,0x00,0x4e,0xa2,0x00,0x00,0xe2,0xa2,0x25,0xb0,0x02,0x3c, -0xa8,0x01,0xb6,0x34,0xff,0xff,0x09,0x24,0xac,0x01,0x42,0x34,0x00,0x00,0xc9,0xae, -0x03,0x04,0x04,0x3c,0x00,0x00,0x49,0xac,0x07,0x08,0x03,0x3c,0x25,0xb0,0x02,0x3c, -0x01,0x02,0x84,0x34,0x05,0x06,0x63,0x34,0xb4,0x01,0xb1,0x34,0xb8,0x01,0xb2,0x34, -0xbc,0x01,0xb3,0x34,0xb0,0x01,0x42,0x34,0x00,0x00,0x44,0xac,0x00,0x00,0x23,0xae, -0x25,0xb0,0x02,0x3c,0x00,0x00,0x44,0xae,0x00,0x00,0x63,0xae,0x25,0xb0,0x03,0x3c, -0x0c,0x00,0x06,0x24,0xc0,0x01,0xb4,0x34,0xc1,0x01,0xb5,0x34,0x0d,0x00,0x08,0x24, -0xc2,0x01,0x63,0x34,0xc3,0x01,0x42,0x34,0x00,0x00,0x86,0xa2,0xc4,0x01,0xab,0x34, -0x00,0x00,0xa6,0xa2,0xc5,0x01,0xac,0x34,0x00,0x00,0x66,0xa0,0x0e,0x00,0x07,0x24, -0x00,0x00,0x48,0xa0,0xc6,0x01,0xaa,0x34,0xc7,0x01,0xad,0x34,0x0f,0x00,0x02,0x24, -0x00,0x00,0x68,0xa1,0x00,0x00,0x87,0xa1,0x00,0x00,0x47,0xa1,0x00,0x00,0xa2,0xa1, -0x57,0x01,0x02,0x3c,0x48,0x00,0xbf,0x34,0x46,0x00,0xae,0x34,0x0e,0xe2,0x42,0x34, -0x00,0x00,0xc0,0xa5,0x4c,0x00,0xbe,0x34,0x00,0x00,0xe2,0xaf,0x4d,0x00,0xb9,0x34, -0x80,0xff,0x02,0x24,0x00,0x00,0xc0,0xa3,0x00,0x00,0x22,0xa3,0x25,0xb0,0x02,0x3c, -0xbc,0x00,0x03,0x24,0x40,0x00,0x42,0x34,0x00,0x00,0x43,0xa4,0x25,0xb0,0x03,0x3c, -0x64,0x03,0xb8,0x34,0xfc,0x37,0x02,0x24,0x40,0x00,0x63,0x34,0x00,0x00,0x00,0xa3, -0xd8,0x00,0xa7,0x34,0x00,0x00,0x62,0xa4,0x00,0x00,0xe3,0x90,0x2a,0xb0,0x04,0x3c, -0x80,0xff,0x02,0x24,0x26,0xb0,0x06,0x3c,0x25,0x18,0x62,0x00,0x30,0x00,0x89,0x34, -0x20,0x20,0x02,0x24,0x38,0x00,0x84,0x34,0x00,0x00,0xe3,0xa0,0x79,0x00,0xc8,0x34, -0x00,0x00,0x82,0xa4,0x40,0x00,0x03,0x24,0x16,0x00,0x02,0x24,0x00,0x00,0x23,0xa1, -0x94,0x00,0xaa,0x34,0x00,0x00,0x02,0xa1,0x98,0x00,0xab,0x34,0x64,0x00,0x03,0x24, -0x22,0x00,0x02,0x24,0x00,0x00,0x43,0xa5,0x7c,0x00,0xd1,0x34,0x00,0x00,0x62,0xa5, -0x04,0x00,0x12,0x24,0x9c,0x00,0xac,0x34,0x7a,0x00,0xc6,0x34,0x20,0x0c,0x02,0x24, -0x0a,0x00,0x03,0x24,0x00,0x00,0xd2,0xa0,0x9a,0x00,0xad,0x34,0x00,0x00,0x22,0xa6, -0x96,0x00,0xae,0x34,0x00,0x00,0x83,0xa1,0xff,0x03,0x02,0x24,0x02,0x00,0x03,0x24, -0x00,0x00,0xa2,0xa5,0x00,0x00,0xc3,0xa5,0x25,0xb0,0x03,0x3c,0x20,0x00,0x02,0x24, -0xb7,0x00,0x63,0x34,0x00,0x00,0x62,0xa0,0x25,0xb0,0x02,0x3c,0x09,0x00,0x03,0x24, -0x89,0x00,0x42,0x34,0x00,0x00,0x43,0xa0,0x44,0x00,0xa5,0x34,0x00,0x00,0xa2,0x94, -0x02,0x80,0x03,0x3c,0x68,0x15,0x66,0x24,0xff,0xfd,0x03,0x24,0x24,0x10,0x43,0x00, -0x00,0x00,0xa2,0xa4,0x00,0x00,0xa3,0x94,0xd5,0x4a,0xc4,0x90,0x29,0xb0,0x02,0x3c, -0x40,0x00,0x42,0x34,0x00,0x02,0x63,0x34,0x00,0x00,0xa3,0xa4,0x00,0x00,0x52,0xa0, -0xd3,0x0a,0x00,0x0c,0x00,0x00,0x00,0x00,0x44,0x00,0xbf,0x8f,0x40,0x00,0xbe,0x8f, -0x3c,0x00,0xb7,0x8f,0x38,0x00,0xb6,0x8f,0x34,0x00,0xb5,0x8f,0x30,0x00,0xb4,0x8f, -0x2c,0x00,0xb3,0x8f,0x28,0x00,0xb2,0x8f,0x24,0x00,0xb1,0x8f,0x20,0x00,0xb0,0x8f, -0x01,0x00,0x02,0x24,0x08,0x00,0xe0,0x03,0x48,0x00,0xbd,0x27,0x54,0x00,0x85,0x34, -0x00,0xe0,0x42,0x34,0x50,0x00,0x84,0x34,0x12,0x01,0x03,0x24,0x00,0x00,0x82,0xac, -0x00,0x00,0xa3,0xa4,0xf9,0x58,0x00,0x08,0x02,0x80,0x03,0x3c,0x00,0xf0,0x51,0x34, -0xf7,0x01,0x92,0x35,0x15,0xf0,0x4d,0x34,0xad,0x59,0x00,0x08,0xff,0xff,0x0e,0x24, -0x8b,0x59,0x00,0x08,0x1b,0x1b,0x42,0x34,0x25,0xb0,0x03,0x3c,0x25,0xb0,0x08,0x3c, -0xfc,0x37,0x02,0x24,0x40,0x00,0x63,0x34,0x02,0x80,0x04,0x3c,0x00,0x00,0x62,0xa4, -0x14,0x80,0x84,0x24,0xff,0x00,0x07,0x24,0xb0,0x03,0x06,0x35,0x00,0x00,0x83,0x94, -0x00,0x00,0x00,0x00,0xff,0x00,0x62,0x30,0x21,0x18,0x68,0x00,0x0a,0x00,0x47,0x10, -0xff,0x00,0x65,0x30,0x04,0x00,0x82,0x8c,0x00,0x00,0x00,0x00,0x00,0x00,0x62,0xac, -0x00,0x00,0xc3,0xac,0x04,0x00,0x82,0x8c,0x08,0x00,0x84,0x24,0x00,0x00,0xc2,0xac, -0xf2,0xff,0xa7,0x14,0x00,0x00,0x00,0x00,0x25,0xb0,0x08,0x3c,0x01,0x80,0x02,0x3c, -0x0c,0x7a,0x44,0x24,0xff,0x00,0x07,0x24,0xb0,0x03,0x06,0x35,0x00,0x00,0x83,0x94, -0x00,0x00,0x00,0x00,0xff,0x00,0x62,0x30,0x21,0x18,0x68,0x00,0x0a,0x00,0x47,0x10, -0xff,0x00,0x65,0x30,0x04,0x00,0x82,0x8c,0x00,0x00,0x00,0x00,0x00,0x00,0x62,0xac, -0x00,0x00,0xc3,0xac,0x04,0x00,0x82,0x8c,0x08,0x00,0x84,0x24,0x00,0x00,0xc2,0xac, -0xf2,0xff,0xa7,0x14,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00, -0x01,0x80,0x02,0x3c,0x02,0x80,0x05,0x3c,0x10,0x6b,0x42,0x24,0x02,0x80,0x03,0x3c, -0xcc,0x7d,0xa2,0xac,0x00,0x80,0x02,0x3c,0x6c,0x7e,0x60,0xac,0xcc,0x7d,0xa4,0x24, -0x02,0x80,0x03,0x3c,0xc8,0x06,0x42,0x24,0x70,0x7e,0x60,0xa4,0x08,0x00,0x82,0xac, -0x02,0x80,0x03,0x3c,0x00,0x80,0x02,0x3c,0x72,0x7e,0x60,0xa4,0x02,0x80,0x06,0x3c, -0x08,0x0a,0x42,0x24,0x00,0x80,0x03,0x3c,0x74,0x7e,0xc7,0x24,0x14,0x00,0x82,0xac, -0x38,0x08,0x63,0x24,0x02,0x80,0x02,0x3c,0x74,0x7e,0xc0,0xac,0x10,0x00,0x83,0xac, -0x04,0x00,0xe0,0xac,0x7c,0x7e,0x40,0xa0,0x00,0x80,0x02,0x3c,0x88,0x19,0x42,0x24, -0x3c,0x00,0x82,0xac,0x00,0x80,0x03,0x3c,0x00,0x80,0x02,0x3c,0x24,0x0c,0x63,0x24, -0x78,0x0f,0x42,0x24,0x1c,0x00,0x83,0xac,0x20,0x00,0x82,0xac,0x00,0x80,0x03,0x3c, -0x00,0x80,0x02,0x3c,0xc8,0x12,0x63,0x24,0x28,0x16,0x42,0x24,0x24,0x00,0x83,0xac, -0x28,0x00,0x82,0xac,0x00,0x80,0x03,0x3c,0x01,0x80,0x02,0x3c,0x4c,0x1f,0x63,0x24, -0xd0,0x04,0x42,0x24,0x2c,0x00,0x83,0xac,0x30,0x00,0x82,0xac,0x00,0x80,0x03,0x3c, -0x00,0x80,0x02,0x3c,0xe4,0x19,0x63,0x24,0x00,0x03,0x42,0x24,0x38,0x00,0x83,0xac, -0x08,0x00,0xe0,0x03,0x4c,0x00,0x82,0xac,0x25,0xb0,0x02,0x3c,0x08,0x00,0x42,0x34, -0x00,0x00,0x43,0x8c,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x02,0x80,0x0e,0x3c, -0x02,0x80,0x08,0x3c,0x02,0x80,0x02,0x3c,0x02,0x80,0x03,0x3c,0xf8,0x03,0x4d,0x24, -0x00,0x14,0x6c,0x24,0x01,0x00,0x07,0x24,0x00,0x00,0xcb,0x25,0xff,0xff,0x0a,0x24, -0x00,0x04,0x09,0x25,0x80,0x1a,0x07,0x00,0x21,0x10,0x6b,0x00,0x00,0x00,0x42,0xac, -0x90,0x00,0x4a,0xac,0x00,0x04,0x04,0x8d,0x01,0x00,0xe7,0x24,0x08,0x00,0x45,0x24, -0x21,0x18,0x6d,0x00,0x05,0x00,0xe6,0x28,0x04,0x00,0x82,0xac,0x00,0x00,0x44,0xac, -0x04,0x00,0x49,0xac,0x00,0x04,0x02,0xad,0x8c,0x00,0x40,0xac,0x6c,0x00,0xa3,0xac, -0xf0,0xff,0xc0,0x14,0x68,0x00,0xac,0xac,0x08,0x00,0xe0,0x03,0x00,0x00,0xc9,0xad, -0x05,0x00,0xa2,0x2c,0x13,0x00,0x40,0x10,0xff,0xff,0x07,0x24,0x02,0x80,0x02,0x3c, -0x80,0x1a,0x05,0x00,0x00,0x00,0x42,0x24,0x0e,0x00,0xa0,0x10,0x21,0x30,0x62,0x00, -0x90,0x00,0xc3,0x8c,0xff,0xff,0x02,0x24,0x0a,0x00,0x62,0x14,0x00,0x00,0x00,0x00, -0x8c,0x00,0xc2,0x8c,0x00,0x00,0x00,0x00,0x06,0x00,0x40,0x14,0x00,0x00,0x00,0x00, -0x01,0x00,0x02,0x24,0x88,0x00,0xc4,0xac,0x8c,0x00,0xc2,0xac,0x90,0x00,0xc5,0xac, -0x21,0x38,0xa0,0x00,0x08,0x00,0xe0,0x03,0x21,0x10,0xe0,0x00,0x25,0xb0,0x04,0x3c, -0x01,0x80,0x02,0x3c,0x18,0x03,0x85,0x34,0xf4,0x6b,0x42,0x24,0xe0,0xff,0xbd,0x27, -0x00,0x00,0xa2,0xac,0x1b,0x00,0x86,0x34,0xdb,0xff,0x03,0x24,0x27,0x00,0x84,0x34, -0x07,0x00,0x02,0x24,0x14,0x00,0xb1,0xaf,0x10,0x00,0xb0,0xaf,0x00,0x00,0x83,0xa0, -0x18,0x00,0xbf,0xaf,0x00,0x00,0xc2,0xa0,0x01,0x00,0x11,0x24,0x21,0x80,0x00,0x00, -0x7a,0x42,0x00,0x0c,0x21,0x20,0x00,0x02,0x01,0x00,0x02,0x26,0xff,0x00,0x50,0x30, -0x2b,0x18,0x30,0x02,0xfa,0xff,0x60,0x10,0x00,0x00,0x00,0x00,0x7a,0x42,0x00,0x0c, -0x21,0x20,0x00,0x00,0x18,0x00,0xbf,0x8f,0x14,0x00,0xb1,0x8f,0x10,0x00,0xb0,0x8f, -0x01,0x00,0x02,0x24,0x08,0x00,0xe0,0x03,0x20,0x00,0xbd,0x27,0x08,0x00,0xe0,0x03, -0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x02,0x80,0x02,0x3c, -0x68,0x15,0x42,0x24,0x40,0x10,0x03,0x3c,0xff,0xff,0x44,0x30,0x25,0xc0,0x83,0x00, -0x94,0x64,0x58,0xac,0x40,0x00,0x18,0x27,0xa0,0x64,0x58,0xac,0x40,0x00,0x18,0x27, -0xac,0x64,0x58,0xac,0x40,0x00,0x18,0x27,0xb8,0x64,0x58,0xac,0x40,0x00,0x18,0x27, -0xe0,0xff,0xbd,0x27,0xc4,0x64,0x58,0xac,0x40,0x00,0x18,0x27,0x1c,0x00,0xb7,0xaf, -0x18,0x00,0xb6,0xaf,0x14,0x00,0xb5,0xaf,0x10,0x00,0xb4,0xaf,0x0c,0x00,0xb3,0xaf, -0x08,0x00,0xb2,0xaf,0x04,0x00,0xb1,0xaf,0x00,0x00,0xb0,0xaf,0xd0,0x64,0x58,0xac, -0xa0,0x64,0x45,0x8c,0xac,0x64,0x46,0x8c,0xb8,0x64,0x47,0x8c,0xc4,0x64,0x48,0x8c, -0xd0,0x64,0x49,0x8c,0x40,0x00,0x18,0x27,0xdc,0x64,0x58,0xac,0x21,0x50,0x00,0x03, -0x25,0x20,0x83,0x00,0x40,0x00,0x18,0x27,0x20,0x10,0x03,0x3c,0x90,0x64,0x44,0xac, -0x9c,0x64,0x45,0xac,0xa8,0x64,0x46,0xac,0xb4,0x64,0x47,0xac,0xc0,0x64,0x48,0xac, -0xcc,0x64,0x49,0xac,0x25,0xb0,0x06,0x3c,0x28,0x64,0x43,0xac,0x24,0x64,0x43,0xac, -0x34,0x64,0x43,0xac,0x30,0x64,0x43,0xac,0x40,0x64,0x43,0xac,0x3c,0x64,0x43,0xac, -0x4c,0x64,0x43,0xac,0x48,0x64,0x43,0xac,0xe8,0x64,0x58,0xac,0x00,0x02,0x18,0x27, -0xd8,0x64,0x4a,0xac,0x00,0x65,0x58,0xac,0x58,0x64,0x43,0xac,0x54,0x64,0x43,0xac, -0x64,0x64,0x43,0xac,0x60,0x64,0x43,0xac,0x70,0x64,0x43,0xac,0x6c,0x64,0x43,0xac, -0xac,0x00,0xc4,0x34,0xb0,0x00,0xc5,0x34,0x00,0x00,0x92,0x8c,0xe8,0x64,0x50,0x8c, -0x00,0x00,0xb3,0x8c,0x21,0x10,0x04,0x3c,0x23,0x10,0x09,0x3c,0x22,0x10,0x0c,0x3c, -0x02,0x80,0x14,0x3c,0x02,0x80,0x15,0x3c,0x02,0x80,0x16,0x3c,0x02,0x80,0x17,0x3c, -0x24,0x10,0x05,0x3c,0x21,0x88,0x00,0x03,0x08,0x7b,0x87,0x26,0x00,0x04,0x18,0x27, -0x10,0x7b,0xa8,0x26,0x18,0x7b,0xca,0x26,0x20,0x7b,0xeb,0x26,0x00,0x04,0x2d,0x35, -0x00,0x40,0x8e,0x34,0x00,0x80,0x8f,0x35,0x00,0x01,0xc6,0x34,0xe4,0x64,0x50,0xac, -0xfc,0x64,0x51,0xac,0x64,0x65,0x4d,0xac,0x28,0x65,0x52,0xac,0x34,0x65,0x4e,0xac, -0x58,0x65,0x4f,0xac,0x4c,0x65,0x53,0xac,0x00,0x00,0xc5,0xac,0x48,0x65,0x45,0xac, -0x68,0x65,0x43,0xac,0x74,0x65,0x58,0xac,0x7c,0x64,0x43,0xac,0x78,0x64,0x43,0xac, -0x06,0x65,0x40,0xa4,0x05,0x65,0x40,0xa0,0x04,0x65,0x40,0xa0,0x5c,0x65,0x49,0xac, -0x60,0x65,0x49,0xac,0x20,0x65,0x44,0xac,0x24,0x65,0x44,0xac,0x2c,0x65,0x44,0xac, -0x30,0x65,0x44,0xac,0x50,0x65,0x4c,0xac,0x54,0x65,0x4c,0xac,0x44,0x65,0x45,0xac, -0x6c,0x65,0x43,0xac,0x78,0x65,0x58,0xac,0x04,0x00,0x08,0xad,0x08,0x7b,0x87,0xae, -0x04,0x00,0x4a,0xad,0x10,0x7b,0xa8,0xae,0x04,0x00,0x6b,0xad,0x18,0x7b,0xca,0xae, -0x20,0x7b,0xeb,0xae,0x04,0x00,0xe7,0xac,0x02,0x80,0x02,0x3c,0x00,0x14,0x43,0x24, -0x21,0x20,0xe0,0x00,0x03,0x00,0x06,0x24,0x21,0x10,0x80,0x00,0xff,0xff,0xc6,0x24, -0x08,0x00,0x78,0xac,0x00,0x00,0x63,0xac,0x10,0x00,0x60,0xac,0x00,0x00,0x67,0xac, -0x21,0x20,0x60,0x00,0x04,0x00,0x62,0xac,0x00,0x00,0x43,0xac,0x00,0x01,0x18,0x27, -0xf5,0xff,0xc1,0x04,0x18,0x00,0x63,0x24,0x02,0x80,0x02,0x3c,0x10,0x7b,0x49,0x24, -0x02,0x80,0x03,0x3c,0x02,0x80,0x02,0x3c,0x04,0x00,0x28,0x8d,0x60,0x14,0x4b,0x24, -0x04,0x00,0xe4,0xac,0x00,0x14,0x6a,0x24,0x01,0x00,0x07,0x24,0x21,0x28,0x00,0x00, -0x07,0x00,0x06,0x24,0x21,0x20,0xab,0x00,0x21,0x10,0xaa,0x00,0xff,0xff,0xc6,0x24, -0x68,0x00,0x58,0xac,0x70,0x00,0x47,0xac,0x18,0x00,0xa5,0x24,0x00,0x00,0x89,0xac, -0x04,0x00,0x88,0xac,0x00,0x00,0x04,0xad,0x00,0x01,0x18,0x27,0xf5,0xff,0xc1,0x04, -0x21,0x40,0x80,0x00,0x02,0x80,0x02,0x3c,0x18,0x7b,0x4a,0x24,0x02,0x80,0x03,0x3c, -0x02,0x80,0x02,0x3c,0x04,0x00,0x45,0x8d,0x20,0x15,0x4b,0x24,0x04,0x00,0x24,0xad, -0x02,0x00,0x07,0x24,0x00,0x14,0x69,0x24,0x21,0x20,0x00,0x00,0x01,0x00,0x06,0x24, -0x21,0x40,0x8b,0x00,0x21,0x10,0x89,0x00,0xff,0xff,0xc6,0x24,0x28,0x01,0x58,0xac, -0x30,0x01,0x47,0xac,0x18,0x00,0x84,0x24,0x00,0x00,0x0a,0xad,0x04,0x00,0x05,0xad, -0x00,0x00,0xa8,0xac,0x00,0x02,0x18,0x27,0xf5,0xff,0xc1,0x04,0x21,0x28,0x00,0x01, -0x02,0x80,0x05,0x3c,0x20,0x7b,0xa5,0x24,0x04,0x00,0xa6,0x8c,0x1c,0x00,0xb7,0x8f, -0x18,0x00,0xb6,0x8f,0x14,0x00,0xb5,0x8f,0x10,0x00,0xb4,0x8f,0x0c,0x00,0xb3,0x8f, -0x08,0x00,0xb2,0x8f,0x04,0x00,0xb1,0x8f,0x00,0x00,0xb0,0x8f,0x02,0x80,0x07,0x3c, -0x02,0x80,0x03,0x3c,0x50,0x15,0xe4,0x24,0x00,0x14,0x63,0x24,0x03,0x00,0x02,0x24, -0x20,0x00,0xbd,0x27,0x58,0x01,0x78,0xac,0x04,0x00,0x48,0xad,0x04,0x00,0xa4,0xac, -0x60,0x01,0x62,0xac,0x50,0x15,0xe5,0xac,0x04,0x00,0x86,0xac,0x08,0x00,0xe0,0x03, -0x00,0x00,0xc4,0xac,0xd0,0xff,0xbd,0x27,0x02,0x80,0x02,0x3c,0x20,0x00,0xb2,0xaf, -0x02,0x80,0x03,0x3c,0x4c,0x91,0x52,0x24,0x02,0x80,0x02,0x3c,0x28,0x00,0xb4,0xaf, -0x24,0x00,0xb3,0xaf,0x1c,0x00,0xb1,0xaf,0x18,0x00,0xb0,0xaf,0x2c,0x00,0xbf,0xaf, -0xd8,0x90,0x73,0x24,0x68,0x15,0x50,0x24,0x21,0x88,0x00,0x00,0x02,0x80,0x14,0x3c, -0xee,0x4e,0x00,0x0c,0x21,0x20,0x20,0x02,0x78,0x51,0x05,0x8e,0x6c,0x00,0x66,0x8e, -0xb8,0x90,0x82,0x26,0x6c,0x00,0x43,0x8e,0x1b,0x00,0x44,0x90,0xff,0xf1,0x02,0x24, -0x21,0x18,0x66,0x00,0x24,0x28,0xa2,0x00,0x00,0x21,0x04,0x00,0x42,0x18,0x03,0x00, -0x00,0x02,0xa5,0x34,0x44,0x51,0x03,0xae,0x68,0x51,0x04,0xae,0x78,0x51,0x05,0xae, -0x6c,0x51,0x04,0xae,0x21,0x30,0x00,0x00,0x21,0x10,0x06,0x02,0x01,0x00,0xc6,0x24, -0x1d,0x00,0xc3,0x28,0x99,0x51,0x40,0xa0,0x7c,0x51,0x40,0xa0,0xfa,0xff,0x60,0x14, -0xb6,0x51,0x40,0xa0,0x01,0x00,0x31,0x26,0x20,0x00,0x22,0x2a,0xd4,0x51,0x00,0xae, -0xe3,0xff,0x40,0x14,0x94,0x00,0x10,0x26,0x02,0x80,0x02,0x3c,0x02,0x80,0x03,0x3c, -0x68,0x15,0x4b,0x24,0x02,0x80,0x02,0x3c,0x4c,0x91,0x6f,0x24,0xd8,0x90,0x4d,0x24, -0x02,0x80,0x03,0x3c,0x02,0x80,0x02,0x3c,0xb8,0x90,0x6e,0x24,0x98,0x90,0x4c,0x24, -0x21,0x88,0x00,0x00,0x80,0x18,0x11,0x00,0x21,0x20,0x6d,0x00,0x21,0x10,0x6f,0x00, -0x21,0x28,0x2e,0x02,0x21,0x30,0x2c,0x02,0x00,0x00,0x88,0x8c,0x00,0x00,0xa9,0x90, -0x00,0x00,0xc7,0x90,0x00,0x00,0x4a,0x8c,0x21,0x10,0x2b,0x02,0x01,0x00,0x31,0x26, -0x21,0x18,0x6b,0x00,0x1d,0x00,0x24,0x2a,0xec,0x44,0x68,0xac,0xca,0x44,0x47,0xa0, -0x60,0x45,0x6a,0xac,0xef,0xff,0x80,0x14,0x90,0x44,0x49,0xa0,0x02,0x80,0x02,0x3c, -0x68,0x15,0x4a,0x24,0x02,0x80,0x03,0x3c,0x02,0x80,0x02,0x3c,0x74,0x8f,0x6b,0x24, -0x14,0x8e,0x4c,0x24,0x21,0x88,0x00,0x00,0x21,0x48,0x00,0x00,0x21,0x30,0x00,0x00, -0x21,0x40,0x2a,0x01,0x21,0x38,0x2b,0x01,0x21,0x10,0xe6,0x00,0x91,0x00,0x44,0x90, -0x00,0x00,0x45,0x90,0x21,0x18,0x06,0x01,0x01,0x00,0xc6,0x24,0x05,0x00,0xc2,0x28, -0xc5,0x43,0x64,0xa0,0xf8,0xff,0x40,0x14,0x34,0x43,0x65,0xa0,0x21,0x10,0x2c,0x02, -0x1d,0x00,0x44,0x90,0x00,0x00,0x45,0x90,0x21,0x18,0x2a,0x02,0x01,0x00,0x31,0x26, -0x1d,0x00,0x22,0x2a,0x73,0x44,0x64,0xa0,0x56,0x44,0x65,0xa0,0xeb,0xff,0x40,0x14, -0x05,0x00,0x29,0x25,0x52,0x00,0x02,0x24,0x10,0x00,0xa2,0xa3,0x41,0x00,0x03,0x24, -0x4d,0x00,0x02,0x24,0x02,0x80,0x07,0x3c,0x1c,0x97,0xe7,0x24,0x11,0x00,0xa3,0xa3, -0x12,0x00,0xa2,0xa3,0xe8,0x03,0x03,0x24,0x01,0x00,0x02,0x24,0x00,0x80,0x06,0x3c, -0x10,0x00,0xa5,0x27,0x21,0x20,0xe0,0x00,0xf0,0x37,0xc6,0x24,0x0c,0x00,0xe3,0xac, -0x14,0x00,0xe2,0xa0,0xfb,0x0c,0x00,0x0c,0x13,0x00,0xa0,0xa3,0x2c,0x00,0xbf,0x8f, -0x28,0x00,0xb4,0x8f,0x24,0x00,0xb3,0x8f,0x20,0x00,0xb2,0x8f,0x1c,0x00,0xb1,0x8f, -0x18,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03,0x30,0x00,0xbd,0x27,0xe0,0xff,0xbd,0x27, -0x02,0x80,0x02,0x3c,0x42,0x00,0x03,0x24,0x10,0x00,0xa3,0xa3,0x55,0x60,0x40,0xa0, -0x4e,0x00,0x03,0x24,0x43,0x00,0x02,0x24,0x02,0x80,0x07,0x3c,0x54,0x97,0xe7,0x24, -0x11,0x00,0xa2,0xa3,0x12,0x00,0xa3,0xa3,0xd0,0x07,0x02,0x24,0x01,0x00,0x03,0x24, -0x00,0x80,0x06,0x3c,0x10,0x00,0xa5,0x27,0x21,0x20,0xe0,0x00,0xdc,0x44,0xc6,0x24, -0x0c,0x00,0xe2,0xac,0x14,0x00,0xe3,0xa0,0x18,0x00,0xbf,0xaf,0xfb,0x0c,0x00,0x0c, -0x13,0x00,0xa0,0xa3,0x18,0x00,0xbf,0x8f,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03, -0x20,0x00,0xbd,0x27,0x48,0xfd,0xbd,0x27,0xb4,0x02,0xb3,0xaf,0x02,0x80,0x02,0x3c, -0x02,0x80,0x13,0x3c,0x24,0x92,0x46,0x24,0x68,0x15,0x63,0x26,0xb0,0x02,0xb2,0xaf, -0xac,0x02,0xb1,0xaf,0xa8,0x02,0xb0,0xaf,0x03,0x40,0x60,0xa0,0x21,0x38,0xa0,0x03, -0x90,0x00,0xc8,0x24,0x00,0x00,0xc2,0x8c,0x04,0x00,0xc3,0x8c,0x08,0x00,0xc4,0x8c, -0x0c,0x00,0xc5,0x8c,0x10,0x00,0xc6,0x24,0x00,0x00,0xe2,0xac,0x04,0x00,0xe3,0xac, -0x08,0x00,0xe4,0xac,0x0c,0x00,0xe5,0xac,0xf6,0xff,0xc8,0x14,0x10,0x00,0xe7,0x24, -0x00,0x00,0xc3,0x8c,0x02,0x80,0x02,0x3c,0xb8,0x92,0x58,0x24,0x00,0x00,0xe3,0xac, -0x98,0x00,0xb9,0x27,0x00,0x01,0x12,0x27,0x01,0x00,0x02,0x93,0x05,0x00,0x03,0x93, -0x09,0x00,0x04,0x93,0x0d,0x00,0x05,0x93,0x00,0x00,0x11,0x93,0x02,0x00,0x0d,0x93, -0x04,0x00,0x10,0x93,0x06,0x00,0x0c,0x93,0x08,0x00,0x0f,0x93,0x0a,0x00,0x07,0x93, -0x0c,0x00,0x0e,0x93,0x0e,0x00,0x06,0x93,0x03,0x00,0x08,0x93,0x07,0x00,0x09,0x93, -0x0b,0x00,0x0a,0x93,0x0f,0x00,0x0b,0x93,0x00,0x12,0x02,0x00,0x00,0x1a,0x03,0x00, -0x00,0x22,0x04,0x00,0x00,0x2a,0x05,0x00,0x25,0x10,0x51,0x00,0x25,0x18,0x70,0x00, -0x25,0x20,0x8f,0x00,0x25,0x28,0xae,0x00,0x00,0x6c,0x0d,0x00,0x00,0x64,0x0c,0x00, -0x00,0x3c,0x07,0x00,0x00,0x34,0x06,0x00,0x25,0x68,0xa2,0x01,0x25,0x60,0x83,0x01, -0x25,0x38,0xe4,0x00,0x25,0x30,0xc5,0x00,0x00,0x46,0x08,0x00,0x00,0x4e,0x09,0x00, -0x00,0x56,0x0a,0x00,0x00,0x5e,0x0b,0x00,0x25,0x40,0x0d,0x01,0x25,0x48,0x2c,0x01, -0x25,0x50,0x47,0x01,0x25,0x58,0x66,0x01,0x10,0x00,0x18,0x27,0x00,0x00,0x28,0xaf, -0x04,0x00,0x29,0xaf,0x08,0x00,0x2a,0xaf,0x0c,0x00,0x2b,0xaf,0xd2,0xff,0x12,0x17, -0x10,0x00,0x39,0x27,0x01,0x00,0x02,0x93,0x05,0x00,0x03,0x93,0x00,0x00,0x09,0x93, -0x02,0x00,0x04,0x93,0x04,0x00,0x08,0x93,0x06,0x00,0x05,0x93,0x07,0x00,0x06,0x93, -0x03,0x00,0x07,0x93,0x00,0x12,0x02,0x00,0x00,0x1a,0x03,0x00,0x25,0x10,0x49,0x00, -0x25,0x18,0x68,0x00,0x00,0x24,0x04,0x00,0x00,0x2c,0x05,0x00,0x25,0x20,0x82,0x00, -0x25,0x28,0xa3,0x00,0x00,0x3e,0x07,0x00,0x00,0x36,0x06,0x00,0x02,0x80,0x02,0x3c, -0x25,0x38,0xe4,0x00,0x25,0x30,0xc5,0x00,0xc0,0x93,0x58,0x24,0x04,0x00,0x26,0xaf, -0x00,0x00,0x27,0xaf,0x00,0x01,0x12,0x27,0xa0,0x01,0xb9,0x27,0x01,0x00,0x02,0x93, -0x05,0x00,0x03,0x93,0x09,0x00,0x04,0x93,0x0d,0x00,0x05,0x93,0x00,0x00,0x11,0x93, -0x02,0x00,0x0d,0x93,0x04,0x00,0x10,0x93,0x06,0x00,0x0c,0x93,0x08,0x00,0x0f,0x93, -0x0a,0x00,0x07,0x93,0x0c,0x00,0x0e,0x93,0x0e,0x00,0x06,0x93,0x03,0x00,0x08,0x93, -0x07,0x00,0x09,0x93,0x0b,0x00,0x0a,0x93,0x0f,0x00,0x0b,0x93,0x00,0x12,0x02,0x00, -0x00,0x1a,0x03,0x00,0x00,0x22,0x04,0x00,0x00,0x2a,0x05,0x00,0x25,0x10,0x51,0x00, -0x25,0x18,0x70,0x00,0x25,0x20,0x8f,0x00,0x25,0x28,0xae,0x00,0x00,0x6c,0x0d,0x00, -0x00,0x64,0x0c,0x00,0x00,0x3c,0x07,0x00,0x00,0x34,0x06,0x00,0x25,0x68,0xa2,0x01, -0x25,0x60,0x83,0x01,0x25,0x38,0xe4,0x00,0x25,0x30,0xc5,0x00,0x00,0x46,0x08,0x00, -0x00,0x4e,0x09,0x00,0x00,0x56,0x0a,0x00,0x00,0x5e,0x0b,0x00,0x25,0x40,0x0d,0x01, -0x25,0x48,0x2c,0x01,0x25,0x50,0x47,0x01,0x25,0x58,0x66,0x01,0x10,0x00,0x18,0x27, -0x00,0x00,0x28,0xaf,0x04,0x00,0x29,0xaf,0x08,0x00,0x2a,0xaf,0x0c,0x00,0x2b,0xaf, -0xd2,0xff,0x12,0x17,0x10,0x00,0x39,0x27,0x01,0x00,0x02,0x93,0x05,0x00,0x03,0x93, -0x00,0x00,0x09,0x93,0x02,0x00,0x04,0x93,0x04,0x00,0x08,0x93,0x06,0x00,0x05,0x93, -0x07,0x00,0x06,0x93,0x03,0x00,0x07,0x93,0x00,0x12,0x02,0x00,0x00,0x1a,0x03,0x00, -0x25,0x10,0x49,0x00,0x25,0x18,0x68,0x00,0x00,0x24,0x04,0x00,0x00,0x2c,0x05,0x00, -0x25,0x20,0x82,0x00,0x25,0x28,0xa3,0x00,0x00,0x3e,0x07,0x00,0x00,0x36,0x06,0x00, -0x25,0x30,0xc5,0x00,0x25,0x38,0xe4,0x00,0x02,0x80,0x02,0x3c,0x04,0x00,0x26,0xaf, -0x00,0x00,0x27,0xaf,0x68,0x15,0x46,0x24,0x21,0x50,0x00,0x00,0x80,0x20,0x0a,0x00, -0x21,0x10,0x9d,0x00,0x00,0x00,0x45,0x8c,0x01,0x00,0x43,0x25,0xff,0x00,0x6a,0x30, -0x21,0x20,0x86,0x00,0x25,0x00,0x42,0x2d,0xf8,0xff,0x40,0x14,0x18,0x40,0x85,0xac, -0x02,0x80,0x02,0x3c,0x68,0x15,0x4b,0x24,0x21,0x50,0x00,0x00,0xc0,0x10,0x0a,0x00, -0x21,0x48,0x5d,0x00,0x21,0x38,0x00,0x00,0x21,0x40,0x4b,0x00,0x21,0x10,0x27,0x01, -0xa0,0x01,0x46,0x90,0x98,0x00,0x45,0x90,0x01,0x00,0xe4,0x24,0x21,0x18,0x07,0x01, -0xff,0x00,0x87,0x30,0x08,0x00,0xe2,0x2c,0xb4,0x41,0x66,0xa0,0xf7,0xff,0x40,0x14, -0xac,0x40,0x65,0xa0,0x01,0x00,0x42,0x25,0xff,0x00,0x4a,0x30,0x21,0x00,0x43,0x2d, -0xef,0xff,0x60,0x14,0xc0,0x10,0x0a,0x00,0x25,0xb0,0x02,0x3c,0x0a,0x00,0x42,0x34, -0x00,0x00,0x43,0x90,0x00,0x00,0x00,0x00,0x20,0x00,0x63,0x30,0x42,0x00,0x60,0x10, -0x68,0x15,0x64,0x26,0x33,0x00,0x02,0x24,0xc1,0x42,0x62,0xa1,0x1c,0x00,0x03,0x24, -0x0f,0x00,0x02,0x24,0xbc,0x42,0x63,0xa1,0xbd,0x42,0x62,0xa1,0x68,0x15,0x65,0x26, -0x08,0x40,0xa4,0x8c,0xff,0x7f,0x08,0x3c,0xff,0xff,0x08,0x35,0xc0,0xff,0x02,0x24, -0x24,0x20,0x88,0x00,0x24,0x20,0x82,0x00,0x0c,0x00,0x84,0x34,0xff,0xc0,0x02,0x24, -0x24,0x20,0x82,0x00,0xc0,0xff,0x02,0x3c,0xff,0xff,0x42,0x34,0x00,0x18,0x84,0x34, -0xbf,0xff,0x03,0x3c,0x24,0x20,0x82,0x00,0xff,0xff,0x63,0x34,0x7f,0xff,0x02,0x3c, -0x24,0x20,0x83,0x00,0xff,0xff,0x42,0x34,0x24,0x20,0x82,0x00,0x0c,0x40,0xa6,0x8c, -0x7f,0xff,0x03,0x24,0x40,0x40,0x84,0x34,0xff,0xff,0x02,0x3c,0x24,0x20,0x83,0x00, -0xff,0x7f,0x42,0x34,0xff,0xbf,0x03,0x3c,0x10,0x40,0xa7,0x8c,0x24,0x20,0x82,0x00, -0xff,0xff,0x63,0x34,0xff,0x9f,0x02,0x3c,0x24,0x30,0xc3,0x00,0xff,0xff,0x42,0x34, -0xff,0x3f,0x03,0x3c,0x24,0x20,0x82,0x00,0xff,0xff,0x63,0x34,0x12,0x00,0x02,0x24, -0xb4,0x02,0xb3,0x8f,0xb0,0x02,0xb2,0x8f,0xac,0x02,0xb1,0x8f,0xa8,0x02,0xb0,0x8f, -0x24,0x38,0xe3,0x00,0xc7,0x42,0xa2,0xa0,0x1f,0x00,0x03,0x24,0x01,0x00,0x02,0x24, -0x24,0x30,0xc8,0x00,0xbe,0x42,0xa3,0xa0,0xc0,0x42,0xa2,0xa0,0xff,0x00,0x03,0x24, -0xff,0xff,0x02,0x24,0xb8,0x02,0xbd,0x27,0x08,0x40,0xa4,0xac,0x10,0x40,0xa7,0xac, -0x0c,0x40,0xa6,0xac,0xc2,0x42,0xa2,0xa0,0xc4,0x42,0xa3,0xa4,0xbf,0x42,0xa0,0xa0, -0x08,0x00,0xe0,0x03,0xc6,0x42,0xa0,0xa0,0x33,0x00,0x02,0x24,0xc1,0x42,0x82,0xa0, -0x0d,0x00,0x03,0x24,0x03,0x00,0x02,0x24,0xbc,0x42,0x83,0xa0,0x65,0x5d,0x00,0x08, -0xbd,0x42,0x82,0xa0,0xe0,0xff,0xbd,0x27,0x02,0x80,0x07,0x3c,0x68,0x15,0xe7,0x24, -0x18,0x00,0xbf,0xaf,0x00,0x40,0xe3,0x8c,0xf0,0xff,0x02,0x24,0x02,0x80,0x08,0x3c, -0x24,0x18,0x62,0x00,0xff,0xf0,0x02,0x24,0x24,0x18,0x62,0x00,0x00,0x40,0xe3,0xac, -0x1c,0x00,0x03,0x24,0x36,0x00,0x02,0x24,0xcf,0x42,0xe3,0xa0,0x20,0x00,0x03,0x24, -0xce,0x42,0xe2,0xa0,0xd1,0x42,0xe3,0xa0,0x32,0x00,0x02,0x24,0x20,0x00,0x03,0x24, -0xd0,0x42,0xe2,0xa0,0xc8,0x42,0xe3,0xa4,0x0a,0x00,0x02,0x24,0x00,0x02,0x03,0x24, -0xd2,0x42,0xe2,0xa0,0xcc,0x42,0xe3,0xa4,0x00,0x01,0x02,0x24,0x49,0x00,0x03,0x24, -0x38,0x97,0x08,0x25,0xff,0xff,0x0a,0x34,0x01,0x00,0x09,0x24,0x11,0x00,0xa3,0xa3, -0xca,0x42,0xe2,0xa4,0xd0,0x07,0x03,0x24,0x44,0x00,0x02,0x24,0x00,0x80,0x06,0x3c, -0x10,0x00,0xa2,0xa3,0x10,0x00,0xa5,0x27,0x47,0x00,0x02,0x24,0x21,0x20,0x00,0x01, -0x54,0x45,0xc6,0x24,0x04,0x40,0xea,0xac,0x02,0x40,0xe9,0xa0,0x0c,0x00,0x03,0xad, -0x14,0x00,0x09,0xa1,0xe6,0x42,0xe0,0xa0,0xdc,0x63,0xea,0xac,0xd7,0x42,0xe0,0xa0, -0x12,0x00,0xa2,0xa3,0xfb,0x0c,0x00,0x0c,0x13,0x00,0xa0,0xa3,0x18,0x00,0xbf,0x8f, -0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x20,0x00,0xbd,0x27,0xe0,0xff,0xbd,0x27, -0x02,0x80,0x02,0x3c,0x50,0x00,0x03,0x24,0x10,0x00,0xa3,0xa3,0x2a,0x62,0x40,0xa0, -0x41,0x00,0x03,0x24,0x52,0x00,0x02,0x24,0x02,0x80,0x07,0x3c,0xc4,0x97,0xe7,0x24, -0x11,0x00,0xa2,0xa3,0x12,0x00,0xa3,0xa3,0xd0,0x07,0x02,0x24,0x01,0x00,0x03,0x24, -0x01,0x80,0x06,0x3c,0x10,0x00,0xa5,0x27,0x21,0x20,0xe0,0x00,0x88,0x5b,0xc6,0x24, -0x0c,0x00,0xe2,0xac,0x14,0x00,0xe3,0xa0,0x18,0x00,0xbf,0xaf,0xfb,0x0c,0x00,0x0c, -0x13,0x00,0xa0,0xa3,0x18,0x00,0xbf,0x8f,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03, -0x20,0x00,0xbd,0x27,0xd8,0xff,0xbd,0x27,0x18,0x00,0xb0,0xaf,0x02,0x80,0x10,0x3c, -0x68,0x15,0x10,0x26,0x20,0x00,0xbf,0xaf,0x1c,0x00,0xb1,0xaf,0x00,0x40,0x09,0x8e, -0xff,0xff,0x02,0x24,0xff,0x00,0x4b,0x30,0x0f,0xff,0x02,0x24,0x24,0x48,0x22,0x01, -0xff,0xff,0x02,0x3c,0xff,0x0f,0x42,0x34,0x24,0x48,0x22,0x01,0x01,0x00,0x07,0x3c, -0x47,0x00,0x02,0x24,0x3b,0x00,0x03,0x24,0x02,0x80,0x08,0x3c,0x10,0x00,0xa2,0xa3, -0x11,0x00,0xa3,0xa3,0xe0,0x97,0x08,0x25,0x56,0x30,0xea,0x34,0xd0,0x07,0x02,0x24, -0x01,0x00,0x03,0x24,0xf4,0x98,0xe7,0x34,0x00,0x80,0x06,0x3c,0x04,0x43,0x0b,0xae, -0x00,0x40,0x09,0xae,0x43,0x00,0x11,0x24,0x10,0x00,0xa5,0x27,0x0c,0x43,0x07,0xae, -0x10,0x43,0x0a,0xae,0x0c,0x00,0x02,0xad,0x14,0x00,0x03,0xa1,0x08,0x43,0x00,0xae, -0x14,0x43,0x00,0xae,0x18,0x43,0x00,0xae,0x21,0x20,0x00,0x01,0xe4,0x4e,0xc6,0x24, -0x12,0x00,0xb1,0xa3,0xfb,0x0c,0x00,0x0c,0x13,0x00,0xa0,0xa3,0x1e,0x00,0x02,0x24, -0x21,0x43,0x02,0xa2,0x4a,0x00,0x03,0x24,0x45,0x00,0x02,0x24,0x1c,0x43,0x03,0xa2, -0x1d,0x43,0x02,0xa2,0x23,0x00,0x03,0x24,0x3e,0x00,0x02,0x24,0x1e,0x43,0x11,0xa2, -0x1f,0x43,0x02,0xa2,0x20,0x43,0x03,0xa2,0x20,0x00,0xbf,0x8f,0x1c,0x00,0xb1,0x8f, -0x18,0x00,0xb0,0x8f,0x08,0x00,0xe0,0x03,0x28,0x00,0xbd,0x27,0xe0,0xff,0xbd,0x27, -0x3b,0x00,0x02,0x24,0x43,0x00,0x03,0x24,0x10,0x00,0xa2,0xa3,0x11,0x00,0xa3,0xa3, -0x36,0x00,0x02,0x24,0x02,0x80,0x03,0x3c,0x02,0x80,0x07,0x3c,0xfc,0x97,0xe7,0x24, -0x12,0x00,0xa2,0xa3,0x3b,0x58,0x60,0xa0,0xd0,0x07,0x02,0x24,0x01,0x00,0x03,0x24, -0x00,0x80,0x06,0x3c,0x10,0x00,0xa5,0x27,0x21,0x20,0xe0,0x00,0x20,0x53,0xc6,0x24, -0x0c,0x00,0xe2,0xac,0x14,0x00,0xe3,0xa0,0x18,0x00,0xbf,0xaf,0xfb,0x0c,0x00,0x0c, -0x13,0x00,0xa0,0xa3,0x18,0x00,0xbf,0x8f,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03, -0x20,0x00,0xbd,0x27,0xff,0xff,0x07,0x24,0x02,0x80,0x02,0x3c,0xe0,0xff,0xbd,0x27, -0x3d,0x58,0x47,0xa0,0x3b,0x00,0x03,0x24,0x43,0x00,0x02,0x24,0x10,0x00,0xa3,0xa3, -0x11,0x00,0xa2,0xa3,0x36,0x00,0x03,0x24,0x16,0x00,0x02,0x24,0x02,0x80,0x08,0x3c, -0x18,0x98,0x08,0x25,0x12,0x00,0xa3,0xa3,0x13,0x00,0xa2,0xa3,0xd0,0x07,0x03,0x24, -0x01,0x00,0x02,0x24,0x00,0x80,0x06,0x3c,0x10,0x00,0xa5,0x27,0x21,0x20,0x00,0x01, -0x0c,0x00,0x03,0xad,0x14,0x00,0x02,0xa1,0x18,0x00,0xbf,0xaf,0xfb,0x0c,0x00,0x0c, -0xb8,0x54,0xc6,0x24,0x18,0x00,0xbf,0x8f,0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03, -0x20,0x00,0xbd,0x27,0xe0,0xff,0xbd,0x27,0x02,0x80,0x02,0x3c,0x52,0x00,0x03,0x24, -0x10,0x00,0xa3,0xa3,0x4c,0x79,0x40,0xa4,0x54,0x00,0x03,0x24,0x53,0x00,0x02,0x24, -0x02,0x80,0x07,0x3c,0x34,0x98,0xe7,0x24,0x11,0x00,0xa2,0xa3,0x12,0x00,0xa3,0xa3, -0xf4,0x01,0x02,0x24,0x01,0x00,0x03,0x24,0x01,0x80,0x06,0x3c,0x10,0x00,0xa5,0x27, -0x21,0x20,0xe0,0x00,0xc8,0x5c,0xc6,0x24,0x0c,0x00,0xe2,0xac,0x14,0x00,0xe3,0xa0, -0x18,0x00,0xbf,0xaf,0xfb,0x0c,0x00,0x0c,0x13,0x00,0xa0,0xa3,0x18,0x00,0xbf,0x8f, -0x00,0x00,0x00,0x00,0x08,0x00,0xe0,0x03,0x20,0x00,0xbd,0x27,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x78,0x0c,0x00,0x00,0x01,0x00,0x00,0x5e,0x78,0x0c,0x00,0x00, -0x01,0x00,0x01,0x5e,0x78,0x0c,0x00,0x00,0x01,0x00,0x02,0x5e,0x78,0x0c,0x00,0x00, -0x01,0x00,0x03,0x5e,0x78,0x0c,0x00,0x00,0x01,0x00,0x04,0x5d,0x78,0x0c,0x00,0x00, -0x01,0x00,0x05,0x5b,0x78,0x0c,0x00,0x00,0x01,0x00,0x06,0x59,0x78,0x0c,0x00,0x00, -0x01,0x00,0x07,0x57,0x78,0x0c,0x00,0x00,0x01,0x00,0x08,0x55,0x78,0x0c,0x00,0x00, -0x01,0x00,0x09,0x53,0x78,0x0c,0x00,0x00,0x01,0x00,0x0a,0x51,0x78,0x0c,0x00,0x00, -0x01,0x00,0x0b,0x4f,0x78,0x0c,0x00,0x00,0x01,0x00,0x0c,0x4d,0x78,0x0c,0x00,0x00, -0x01,0x00,0x0d,0x4b,0x78,0x0c,0x00,0x00,0x01,0x00,0x0e,0x49,0x78,0x0c,0x00,0x00, -0x01,0x00,0x0f,0x47,0x78,0x0c,0x00,0x00,0x01,0x00,0x10,0x45,0x78,0x0c,0x00,0x00, -0x01,0x00,0x11,0x43,0x78,0x0c,0x00,0x00,0x01,0x00,0x12,0x41,0x78,0x0c,0x00,0x00, -0x01,0x00,0x13,0x3f,0x78,0x0c,0x00,0x00,0x01,0x00,0x14,0x3d,0x78,0x0c,0x00,0x00, -0x01,0x00,0x15,0x3b,0x78,0x0c,0x00,0x00,0x01,0x00,0x16,0x39,0x78,0x0c,0x00,0x00, -0x01,0x00,0x17,0x37,0x78,0x0c,0x00,0x00,0x01,0x00,0x18,0x35,0x78,0x0c,0x00,0x00, -0x01,0x00,0x19,0x33,0x78,0x0c,0x00,0x00,0x01,0x00,0x1a,0x31,0x78,0x0c,0x00,0x00, -0x01,0x00,0x1b,0x2f,0x78,0x0c,0x00,0x00,0x01,0x00,0x1c,0x2d,0x78,0x0c,0x00,0x00, -0x01,0x00,0x1d,0x2b,0x78,0x0c,0x00,0x00,0x01,0x00,0x1e,0x29,0x78,0x0c,0x00,0x00, -0x01,0x00,0x1f,0x27,0x78,0x0c,0x00,0x00,0x01,0x00,0x20,0x25,0x78,0x0c,0x00,0x00, -0x01,0x00,0x21,0x23,0x78,0x0c,0x00,0x00,0x01,0x00,0x22,0x21,0x78,0x0c,0x00,0x00, -0x01,0x00,0x23,0x1f,0x78,0x0c,0x00,0x00,0x01,0x00,0x24,0x1d,0x78,0x0c,0x00,0x00, -0x01,0x00,0x25,0x1b,0x78,0x0c,0x00,0x00,0x01,0x00,0x26,0x19,0x78,0x0c,0x00,0x00, -0x01,0x00,0x27,0x17,0x78,0x0c,0x00,0x00,0x01,0x00,0x28,0x15,0x78,0x0c,0x00,0x00, -0x01,0x00,0x29,0x13,0x78,0x0c,0x00,0x00,0x01,0x00,0x2a,0x11,0x78,0x0c,0x00,0x00, -0x01,0x00,0x2b,0x0f,0x78,0x0c,0x00,0x00,0x01,0x00,0x2c,0x0d,0x78,0x0c,0x00,0x00, -0x01,0x00,0x2d,0x0b,0x78,0x0c,0x00,0x00,0x01,0x00,0x2e,0x09,0x78,0x0c,0x00,0x00, -0x01,0x00,0x2f,0x07,0x78,0x0c,0x00,0x00,0x01,0x00,0x30,0x05,0x78,0x0c,0x00,0x00, -0x01,0x00,0x31,0x03,0x78,0x0c,0x00,0x00,0x01,0x00,0x32,0x01,0x78,0x0c,0x00,0x00, -0x01,0x00,0x33,0x01,0x78,0x0c,0x00,0x00,0x01,0x00,0x34,0x01,0x78,0x0c,0x00,0x00, -0x01,0x00,0x35,0x01,0x78,0x0c,0x00,0x00,0x01,0x00,0x36,0x01,0x78,0x0c,0x00,0x00, -0x01,0x00,0x37,0x01,0x78,0x0c,0x00,0x00,0x01,0x00,0x38,0x01,0x78,0x0c,0x00,0x00, -0x01,0x00,0x39,0x01,0x78,0x0c,0x00,0x00,0x01,0x00,0x3a,0x01,0x78,0x0c,0x00,0x00, -0x01,0x00,0x3b,0x01,0x78,0x0c,0x00,0x00,0x01,0x00,0x3c,0x01,0x78,0x0c,0x00,0x00, -0x01,0x00,0x3d,0x01,0x78,0x0c,0x00,0x00,0x01,0x00,0x3e,0x01,0x78,0x0c,0x00,0x00, -0x01,0x00,0x3f,0x01,0x78,0x0c,0x00,0x00,0x01,0x00,0x40,0x5e,0x78,0x0c,0x00,0x00, -0x01,0x00,0x41,0x5e,0x78,0x0c,0x00,0x00,0x01,0x00,0x42,0x5e,0x78,0x0c,0x00,0x00, -0x01,0x00,0x43,0x5e,0x78,0x0c,0x00,0x00,0x01,0x00,0x44,0x5d,0x78,0x0c,0x00,0x00, -0x01,0x00,0x45,0x5b,0x78,0x0c,0x00,0x00,0x01,0x00,0x46,0x59,0x78,0x0c,0x00,0x00, -0x01,0x00,0x47,0x57,0x78,0x0c,0x00,0x00,0x01,0x00,0x48,0x55,0x78,0x0c,0x00,0x00, -0x01,0x00,0x49,0x53,0x78,0x0c,0x00,0x00,0x01,0x00,0x4a,0x51,0x78,0x0c,0x00,0x00, -0x01,0x00,0x4b,0x4f,0x78,0x0c,0x00,0x00,0x01,0x00,0x4c,0x4d,0x78,0x0c,0x00,0x00, -0x01,0x00,0x4d,0x4b,0x78,0x0c,0x00,0x00,0x01,0x00,0x4e,0x49,0x78,0x0c,0x00,0x00, -0x01,0x00,0x4f,0x47,0x78,0x0c,0x00,0x00,0x01,0x00,0x50,0x45,0x78,0x0c,0x00,0x00, -0x01,0x00,0x51,0x43,0x78,0x0c,0x00,0x00,0x01,0x00,0x52,0x41,0x78,0x0c,0x00,0x00, -0x01,0x00,0x53,0x3f,0x78,0x0c,0x00,0x00,0x01,0x00,0x54,0x3d,0x78,0x0c,0x00,0x00, -0x01,0x00,0x55,0x3b,0x78,0x0c,0x00,0x00,0x01,0x00,0x56,0x39,0x78,0x0c,0x00,0x00, -0x01,0x00,0x57,0x37,0x78,0x0c,0x00,0x00,0x01,0x00,0x58,0x35,0x78,0x0c,0x00,0x00, -0x01,0x00,0x59,0x33,0x78,0x0c,0x00,0x00,0x01,0x00,0x5a,0x31,0x78,0x0c,0x00,0x00, -0x01,0x00,0x5b,0x2f,0x78,0x0c,0x00,0x00,0x01,0x00,0x5c,0x2d,0x78,0x0c,0x00,0x00, -0x01,0x00,0x5d,0x2b,0x78,0x0c,0x00,0x00,0x01,0x00,0x5e,0x29,0x78,0x0c,0x00,0x00, -0x01,0x00,0x5f,0x27,0x78,0x0c,0x00,0x00,0x01,0x00,0x60,0x25,0x78,0x0c,0x00,0x00, -0x01,0x00,0x61,0x23,0x78,0x0c,0x00,0x00,0x01,0x00,0x62,0x21,0x78,0x0c,0x00,0x00, -0x01,0x00,0x63,0x1f,0x78,0x0c,0x00,0x00,0x01,0x00,0x64,0x1d,0x78,0x0c,0x00,0x00, -0x01,0x00,0x65,0x1b,0x78,0x0c,0x00,0x00,0x01,0x00,0x66,0x19,0x78,0x0c,0x00,0x00, -0x01,0x00,0x67,0x17,0x78,0x0c,0x00,0x00,0x01,0x00,0x68,0x15,0x78,0x0c,0x00,0x00, -0x01,0x00,0x69,0x13,0x78,0x0c,0x00,0x00,0x01,0x00,0x6a,0x11,0x78,0x0c,0x00,0x00, -0x01,0x00,0x6b,0x0f,0x78,0x0c,0x00,0x00,0x01,0x00,0x6c,0x0d,0x78,0x0c,0x00,0x00, -0x01,0x00,0x6d,0x0b,0x78,0x0c,0x00,0x00,0x01,0x00,0x6e,0x09,0x78,0x0c,0x00,0x00, -0x01,0x00,0x6f,0x07,0x78,0x0c,0x00,0x00,0x01,0x00,0x70,0x05,0x78,0x0c,0x00,0x00, -0x01,0x00,0x71,0x03,0x78,0x0c,0x00,0x00,0x01,0x00,0x72,0x01,0x78,0x0c,0x00,0x00, -0x01,0x00,0x73,0x01,0x78,0x0c,0x00,0x00,0x01,0x00,0x74,0x01,0x78,0x0c,0x00,0x00, -0x01,0x00,0x75,0x01,0x78,0x0c,0x00,0x00,0x01,0x00,0x76,0x01,0x78,0x0c,0x00,0x00, -0x01,0x00,0x77,0x01,0x78,0x0c,0x00,0x00,0x01,0x00,0x78,0x01,0x78,0x0c,0x00,0x00, -0x01,0x00,0x79,0x01,0x78,0x0c,0x00,0x00,0x01,0x00,0x7a,0x01,0x78,0x0c,0x00,0x00, -0x01,0x00,0x7b,0x01,0x78,0x0c,0x00,0x00,0x01,0x00,0x7c,0x01,0x78,0x0c,0x00,0x00, -0x01,0x00,0x7d,0x01,0x78,0x0c,0x00,0x00,0x01,0x00,0x7e,0x01,0x78,0x0c,0x00,0x00, -0x01,0x00,0x7f,0x01,0x78,0x0c,0x00,0x00,0x1e,0x00,0x00,0x30,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x01,0x30,0x78,0x0c,0x00,0x00,0x1e,0x00,0x02,0x30,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x03,0x30,0x78,0x0c,0x00,0x00,0x1e,0x00,0x04,0x30,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x05,0x30,0x78,0x0c,0x00,0x00,0x1e,0x00,0x06,0x30,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x07,0x30,0x78,0x0c,0x00,0x00,0x1e,0x00,0x08,0x3e,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x09,0x40,0x78,0x0c,0x00,0x00,0x1e,0x00,0x0a,0x42,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x0b,0x44,0x78,0x0c,0x00,0x00,0x1e,0x00,0x0c,0x46,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x0d,0x48,0x78,0x0c,0x00,0x00,0x1e,0x00,0x0e,0x48,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x0f,0x4a,0x78,0x0c,0x00,0x00,0x1e,0x00,0x10,0x4a,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x11,0x4c,0x78,0x0c,0x00,0x00,0x1e,0x00,0x12,0x4c,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x13,0x4e,0x78,0x0c,0x00,0x00,0x1e,0x00,0x14,0x50,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x15,0x50,0x78,0x0c,0x00,0x00,0x1e,0x00,0x16,0x50,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x17,0x52,0x78,0x0c,0x00,0x00,0x1e,0x00,0x18,0x52,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x19,0x52,0x78,0x0c,0x00,0x00,0x1e,0x00,0x1a,0x54,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x1b,0x54,0x78,0x0c,0x00,0x00,0x1e,0x00,0x1c,0x54,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x1d,0x56,0x78,0x0c,0x00,0x00,0x1e,0x00,0x1e,0x56,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x1f,0x56,0x78,0x0c,0x00,0x00,0x1e,0x00,0x20,0x56,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x21,0x58,0x78,0x0c,0x00,0x00,0x1e,0x00,0x22,0x58,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x23,0x58,0x78,0x0c,0x00,0x00,0x1e,0x00,0x24,0x58,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x25,0x5a,0x78,0x0c,0x00,0x00,0x1e,0x00,0x26,0x5a,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x27,0x5a,0x78,0x0c,0x00,0x00,0x1e,0x00,0x28,0x5c,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x29,0x5c,0x78,0x0c,0x00,0x00,0x1e,0x00,0x2a,0x5e,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x2b,0x5e,0x78,0x0c,0x00,0x00,0x1e,0x00,0x2c,0x5e,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x2d,0x5e,0x78,0x0c,0x00,0x00,0x1e,0x00,0x2e,0x5e,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x2f,0x5e,0x78,0x0c,0x00,0x00,0x1e,0x00,0x30,0x5e,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x31,0x5e,0x78,0x0c,0x00,0x00,0x1e,0x00,0x32,0x5e,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x33,0x5e,0x78,0x0c,0x00,0x00,0x1e,0x00,0x34,0x5e,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x35,0x5e,0x78,0x0c,0x00,0x00,0x1e,0x00,0x36,0x5e,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x37,0x5e,0x78,0x0c,0x00,0x00,0x1e,0x00,0x38,0x5e,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x39,0x5e,0x78,0x0c,0x00,0x00,0x1e,0x00,0x3a,0x5e,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x3b,0x5e,0x78,0x0c,0x00,0x00,0x1e,0x00,0x3c,0x5e,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x3d,0x5e,0x78,0x0c,0x00,0x00,0x1e,0x00,0x3e,0x5e,0x78,0x0c,0x00,0x00, -0x1e,0x00,0x3f,0x5e,0xff,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x08,0x00,0x00, -0x00,0x00,0x04,0x03,0x04,0x08,0x00,0x00,0x03,0x00,0x00,0x00,0x08,0x08,0x00,0x00, -0x00,0xfc,0x00,0x00,0x0c,0x08,0x00,0x00,0x0a,0x00,0x00,0x04,0x10,0x08,0x00,0x00, -0xff,0x10,0x10,0x80,0x14,0x08,0x00,0x00,0x10,0x3d,0x0c,0x02,0x18,0x08,0x00,0x00, -0xc5,0x03,0x00,0x00,0x1c,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x08,0x00,0x00, -0x04,0x00,0x00,0x00,0x24,0x08,0x00,0x00,0x00,0x02,0x69,0x00,0x28,0x08,0x00,0x00, -0x04,0x00,0x00,0x00,0x2c,0x08,0x00,0x00,0x00,0x02,0x69,0x00,0x30,0x08,0x00,0x00, -0x04,0x00,0x00,0x00,0x34,0x08,0x00,0x00,0x00,0x02,0x69,0x00,0x38,0x08,0x00,0x00, -0x04,0x00,0x00,0x00,0x3c,0x08,0x00,0x00,0x00,0x02,0x69,0x00,0x40,0x08,0x00,0x00, -0x00,0x00,0x00,0x00,0x44,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x08,0x00,0x00, -0x00,0x00,0x00,0x00,0x4c,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x08,0x00,0x00, -0x00,0x00,0x00,0x00,0x54,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x58,0x08,0x00,0x00, -0x65,0xa9,0x65,0xa9,0x5c,0x08,0x00,0x00,0x65,0xa9,0x65,0xa9,0x60,0x08,0x00,0x00, -0x30,0x01,0x7f,0x0f,0x64,0x08,0x00,0x00,0x30,0x01,0x7f,0x0f,0x68,0x08,0x00,0x00, -0x30,0x01,0x7f,0x0f,0x6c,0x08,0x00,0x00,0x30,0x01,0x7f,0x0f,0x70,0x08,0x00,0x00, -0x00,0x03,0x00,0x03,0x74,0x08,0x00,0x00,0x00,0x03,0x00,0x03,0x78,0x08,0x00,0x00, -0x00,0x00,0x00,0x00,0x7c,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x08,0x00,0x00, -0x00,0x00,0x00,0x00,0x94,0x08,0x00,0x00,0xfe,0xff,0xff,0xff,0x98,0x08,0x00,0x00, -0x10,0x20,0x30,0x40,0x9c,0x08,0x00,0x00,0x50,0x60,0x70,0x00,0xb0,0x08,0x00,0x00, -0x00,0x00,0x00,0x00,0xe0,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0xe4,0x08,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x0e,0x00,0x00,0x03,0x03,0x03,0x03,0x04,0x0e,0x00,0x00, -0x03,0x03,0x03,0x03,0x08,0x0e,0x00,0x00,0x03,0x03,0x00,0x00,0x0c,0x0e,0x00,0x00, -0x00,0x00,0x00,0x00,0x10,0x0e,0x00,0x00,0x03,0x03,0x03,0x03,0x14,0x0e,0x00,0x00, -0x03,0x03,0x03,0x03,0x18,0x0e,0x00,0x00,0x03,0x03,0x03,0x03,0x1c,0x0e,0x00,0x00, -0x03,0x03,0x03,0x03,0x00,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x09,0x00,0x00, -0x23,0x00,0x00,0x00,0x08,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x09,0x00,0x00, -0x33,0x13,0x32,0x03,0x08,0x0a,0x00,0x00,0x00,0x86,0x88,0x8f,0x2c,0x0a,0x00,0x00, -0x00,0x00,0x92,0x00,0x00,0x0c,0x00,0x00,0x80,0x00,0x00,0x00,0x04,0x0c,0x00,0x00, -0x33,0x54,0x00,0x00,0x08,0x0c,0x00,0x00,0xe4,0x00,0x00,0x00,0x0c,0x0c,0x00,0x00, -0x6c,0x6c,0x6c,0x6c,0x10,0x0c,0x00,0x00,0x00,0x00,0x00,0x08,0x14,0x0c,0x00,0x00, -0x00,0x01,0x00,0x40,0x18,0x0c,0x00,0x00,0x00,0x00,0x00,0x08,0x1c,0x0c,0x00,0x00, -0x00,0x01,0x00,0x40,0x20,0x0c,0x00,0x00,0x00,0x00,0x00,0x08,0x24,0x0c,0x00,0x00, -0x00,0x01,0x00,0x40,0x28,0x0c,0x00,0x00,0x00,0x00,0x00,0x08,0x2c,0x0c,0x00,0x00, -0x00,0x01,0x00,0x40,0x30,0x0c,0x00,0x00,0x44,0x6a,0xe9,0x8d,0x34,0x0c,0x00,0x00, -0xcd,0x52,0x96,0x46,0x38,0x0c,0x00,0x00,0x90,0x5a,0x01,0x48,0x3c,0x0c,0x00,0x00, -0x64,0x97,0x97,0x1a,0x40,0x0c,0x00,0x00,0x3f,0x42,0x7c,0x1f,0x44,0x0c,0x00,0x00, -0xb7,0x00,0x01,0x00,0x48,0x0c,0x00,0x00,0x00,0x00,0x02,0xec,0x4c,0x0c,0x00,0x00, -0x03,0x03,0xfc,0x00,0x50,0x0c,0x00,0x00,0x1c,0x34,0x54,0x69,0x54,0x0c,0x00,0x00, -0x94,0x00,0x3c,0x43,0x58,0x0c,0x00,0x00,0x1c,0x34,0x54,0x69,0x5c,0x0c,0x00,0x00, -0x94,0x00,0x3c,0x43,0x60,0x0c,0x00,0x00,0x1c,0x34,0x54,0x69,0x64,0x0c,0x00,0x00, -0x94,0x00,0x3c,0x43,0x68,0x0c,0x00,0x00,0x1c,0x34,0x54,0x69,0x6c,0x0c,0x00,0x00, -0x94,0x00,0x3c,0x43,0x70,0x0c,0x00,0x00,0x0d,0x00,0x5a,0x2c,0x74,0x0c,0x00,0x00, -0x1b,0x15,0x86,0x01,0x78,0x0c,0x00,0x00,0x1f,0x00,0x00,0x00,0x7c,0x0c,0x00,0x00, -0x12,0x16,0xb9,0x00,0x80,0x0c,0x00,0x00,0x80,0x00,0x00,0x20,0x84,0x0c,0x00,0x00, -0x00,0x00,0x00,0x00,0x88,0x0c,0x00,0x00,0x80,0x00,0x00,0x20,0x8c,0x0c,0x00,0x00, -0x00,0x00,0x20,0x08,0x90,0x0c,0x00,0x00,0x00,0x01,0x00,0x40,0x94,0x0c,0x00,0x00, -0x00,0x00,0x00,0x00,0x98,0x0c,0x00,0x00,0x00,0x01,0x00,0x40,0x9c,0x0c,0x00,0x00, -0x00,0x00,0x00,0x00,0xa0,0x0c,0x00,0x00,0x92,0x24,0x49,0x00,0xa4,0x0c,0x00,0x00, -0x00,0x00,0x00,0x00,0xa8,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0xac,0x0c,0x00,0x00, -0x00,0x00,0x00,0x00,0xb0,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0xb4,0x0c,0x00,0x00, -0x00,0x00,0x00,0x00,0xb8,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0xbc,0x0c,0x00,0x00, -0x92,0x24,0x49,0x00,0xc0,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0x0c,0x00,0x00, -0x00,0x00,0x00,0x00,0xc8,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0xcc,0x0c,0x00,0x00, -0x00,0x00,0x00,0x00,0xd0,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0xd4,0x0c,0x00,0x00, -0x00,0x00,0x00,0x00,0xd8,0x0c,0x00,0x00,0x27,0x24,0xb2,0x64,0xdc,0x0c,0x00,0x00, -0x32,0x69,0x76,0x00,0xe0,0x0c,0x00,0x00,0x22,0x22,0x22,0x00,0xe4,0x0c,0x00,0x00, -0x00,0x00,0x00,0x00,0xe8,0x0c,0x00,0x00,0x02,0x43,0x64,0x07,0x00,0x0d,0x00,0x00, -0x80,0x07,0x00,0x00,0x04,0x0d,0x00,0x00,0x03,0x04,0x00,0x00,0x08,0x0d,0x00,0x00, -0x7f,0x90,0x00,0x00,0x0c,0x0d,0x00,0x00,0x01,0x00,0x00,0x00,0x10,0x0d,0x00,0x00, -0x99,0x99,0x69,0xa0,0x14,0x0d,0x00,0x00,0x67,0x3c,0x99,0x99,0x18,0x0d,0x00,0x00, -0x6b,0x5b,0x8f,0x6a,0x1c,0x0d,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x0d,0x00,0x00, -0x00,0x00,0x00,0x00,0x24,0x0d,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x0d,0x00,0x00, -0x00,0x00,0x00,0x00,0x2c,0x0d,0x00,0x00,0x75,0x19,0x97,0xcc,0x30,0x0d,0x00,0x00, -0x00,0x00,0x00,0x00,0x34,0x0d,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x0d,0x00,0x00, -0x00,0x00,0x00,0x00,0x3c,0x0d,0x00,0x00,0x93,0x72,0x02,0x00,0x40,0x0d,0x00,0x00, -0x00,0x00,0x00,0x00,0x44,0x0d,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x0d,0x00,0x00, -0x00,0x00,0x00,0x00,0x50,0x0d,0x00,0x00,0x0a,0x14,0x37,0x64,0x54,0x0d,0x00,0x00, -0x02,0xbd,0x4d,0x02,0x58,0x0d,0x00,0x00,0x00,0x00,0x00,0x00,0x5c,0x0d,0x00,0x00, -0x64,0x20,0x03,0x30,0x60,0x0d,0x00,0x00,0x68,0xde,0x53,0x46,0x64,0x0d,0x00,0x00, -0x3c,0x8a,0x51,0x00,0x68,0x0d,0x00,0x00,0x06,0x01,0x00,0x00,0xff,0x00,0x00,0x00, -0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00, -0x44,0x05,0x01,0x80,0x10,0x00,0x00,0x00,0x74,0x05,0x01,0x80,0x10,0x00,0x00,0x00, -0xe0,0x2e,0x00,0x80,0x10,0x00,0x00,0x00,0xec,0x2e,0x00,0x80,0x10,0x00,0x00,0x00, -0xa0,0x08,0x01,0x80,0x08,0x00,0x00,0x00,0x38,0x06,0x01,0x80,0x00,0xb7,0x00,0x00, -0x01,0xe0,0x0e,0x00,0x02,0x4d,0x04,0x00,0x03,0x41,0x04,0x00,0x04,0xc3,0x08,0x00, -0x05,0x72,0x0c,0x00,0x06,0xe6,0x00,0x00,0x07,0x2a,0x08,0x00,0x08,0x3f,0x00,0x00, -0x09,0x35,0x03,0x00,0x0a,0xd4,0x09,0x00,0x0b,0xbb,0x07,0x00,0x0c,0x50,0x08,0x00, -0x0d,0xdf,0x0c,0x00,0x0e,0x2b,0x00,0x00,0x0f,0x14,0x01,0x00,0x00,0xb7,0x01,0x00, -0x01,0x01,0x00,0x00,0x02,0x00,0x04,0x00,0x01,0x02,0x00,0x00,0x02,0x01,0x04,0x00, -0x01,0x03,0x00,0x00,0x02,0x02,0x04,0x00,0x01,0x04,0x00,0x00,0x02,0x03,0x04,0x00, -0x01,0x05,0x00,0x00,0x02,0x04,0x04,0x00,0x01,0x06,0x00,0x00,0x02,0x05,0x04,0x00, -0x01,0x07,0x00,0x00,0x02,0x08,0x04,0x00,0x01,0x08,0x00,0x00,0x02,0x09,0x04,0x00, -0x01,0x09,0x00,0x00,0x02,0x0a,0x04,0x00,0x01,0x0a,0x00,0x00,0x02,0x0b,0x04,0x00, -0x01,0x0b,0x00,0x00,0x02,0x02,0x05,0x00,0x01,0x0c,0x00,0x00,0x02,0x03,0x05,0x00, -0x01,0x0d,0x00,0x00,0x02,0x04,0x05,0x00,0x01,0x0e,0x00,0x00,0x02,0x05,0x05,0x00, -0x01,0x0f,0x00,0x00,0x02,0x40,0x05,0x00,0x01,0x10,0x00,0x00,0x02,0x41,0x05,0x00, -0x01,0x11,0x00,0x00,0x02,0x42,0x05,0x00,0x01,0x12,0x00,0x00,0x02,0x43,0x05,0x00, -0x01,0x13,0x00,0x00,0x02,0x44,0x05,0x00,0x01,0x14,0x00,0x00,0x02,0x45,0x05,0x00, -0x01,0x15,0x00,0x00,0x02,0x80,0x05,0x00,0x01,0x16,0x00,0x00,0x02,0x81,0x05,0x00, -0x01,0x17,0x00,0x00,0x02,0x82,0x05,0x00,0x01,0x18,0x00,0x00,0x02,0x83,0x05,0x00, -0x01,0x19,0x00,0x00,0x02,0x84,0x05,0x00,0x01,0x1a,0x00,0x00,0x02,0x85,0x05,0x00, -0x01,0x1b,0x00,0x00,0x02,0x88,0x05,0x00,0x01,0x1c,0x00,0x00,0x02,0x89,0x05,0x00, -0x01,0x1d,0x00,0x00,0x02,0x8a,0x05,0x00,0x01,0x1e,0x00,0x00,0x02,0x8b,0x05,0x00, -0x01,0x1f,0x00,0x00,0x02,0x43,0x06,0x00,0x01,0x20,0x00,0x00,0x02,0x44,0x06,0x00, -0x01,0x21,0x00,0x00,0x02,0x45,0x06,0x00,0x01,0x22,0x00,0x00,0x02,0x80,0x06,0x00, -0x01,0x23,0x00,0x00,0x02,0x81,0x06,0x00,0x01,0x24,0x00,0x00,0x02,0x82,0x06,0x00, -0x01,0x25,0x00,0x00,0x02,0x83,0x06,0x00,0x01,0x26,0x00,0x00,0x02,0x84,0x06,0x00, -0x01,0x27,0x00,0x00,0x02,0x85,0x06,0x00,0x01,0x28,0x00,0x00,0x02,0x88,0x06,0x00, -0x01,0x29,0x00,0x00,0x02,0x89,0x06,0x00,0x01,0x2a,0x00,0x00,0x02,0x8a,0x06,0x00, -0x01,0x2b,0x00,0x00,0x02,0x8b,0x06,0x00,0x01,0x2c,0x00,0x00,0x02,0x8c,0x06,0x00, -0x01,0x2d,0x00,0x00,0x02,0x42,0x07,0x00,0x01,0x2e,0x00,0x00,0x02,0x43,0x07,0x00, -0x01,0x2f,0x00,0x00,0x02,0x44,0x07,0x00,0x01,0x30,0x00,0x00,0x02,0x45,0x07,0x00, -0x01,0x31,0x00,0x00,0x02,0x80,0x07,0x00,0x01,0x32,0x00,0x00,0x02,0x81,0x07,0x00, -0x01,0x33,0x00,0x00,0x02,0x82,0x07,0x00,0x01,0x34,0x00,0x00,0x02,0x83,0x07,0x00, -0x01,0x35,0x00,0x00,0x02,0x84,0x07,0x00,0x01,0x36,0x00,0x00,0x02,0x85,0x07,0x00, -0x01,0x37,0x00,0x00,0x02,0x88,0x07,0x00,0x01,0x38,0x00,0x00,0x02,0x89,0x07,0x00, -0x01,0x39,0x00,0x00,0x02,0x8a,0x07,0x00,0x01,0x3a,0x00,0x00,0x02,0x8b,0x07,0x00, -0x01,0x3b,0x00,0x00,0x02,0x8c,0x07,0x00,0x01,0x3c,0x00,0x00,0x02,0x8d,0x07,0x00, -0x01,0x3d,0x00,0x00,0x02,0x90,0x07,0x00,0x01,0x3e,0x00,0x00,0x02,0x91,0x07,0x00, -0x01,0x3f,0x00,0x00,0x02,0x92,0x07,0x00,0x01,0x40,0x00,0x00,0x02,0x93,0x07,0x00, -0x01,0x41,0x00,0x00,0x02,0x94,0x07,0x00,0x01,0x42,0x00,0x00,0x02,0x95,0x07,0x00, -0x01,0x43,0x00,0x00,0x02,0x98,0x07,0x00,0x01,0x44,0x00,0x00,0x02,0x99,0x07,0x00, -0x01,0x45,0x00,0x00,0x02,0x9a,0x07,0x00,0x01,0x46,0x00,0x00,0x02,0x9b,0x07,0x00, -0x01,0x47,0x00,0x00,0x02,0x9c,0x07,0x00,0x01,0x48,0x00,0x00,0x02,0x9d,0x07,0x00, -0x01,0x49,0x00,0x00,0x02,0xa0,0x07,0x00,0x01,0x4a,0x00,0x00,0x02,0xa1,0x07,0x00, -0x01,0x4b,0x00,0x00,0x02,0xa2,0x07,0x00,0x01,0x4c,0x00,0x00,0x02,0xa3,0x07,0x00, -0x01,0x4d,0x00,0x00,0x02,0xa4,0x07,0x00,0x01,0x4e,0x00,0x00,0x02,0xa5,0x07,0x00, -0x01,0x4f,0x00,0x00,0x02,0xa8,0x07,0x00,0x01,0x50,0x00,0x00,0x02,0xa9,0x07,0x00, -0x01,0x51,0x00,0x00,0x02,0xaa,0x03,0x00,0x01,0x52,0x00,0x00,0x02,0xab,0x03,0x00, -0x01,0x53,0x00,0x00,0x02,0xac,0x03,0x00,0x01,0x54,0x00,0x00,0x02,0xad,0x03,0x00, -0x01,0x55,0x00,0x00,0x02,0xb0,0x03,0x00,0x01,0x56,0x00,0x00,0x02,0xb1,0x03,0x00, -0x01,0x57,0x00,0x00,0x02,0xb2,0x03,0x00,0x01,0x58,0x00,0x00,0x02,0xb3,0x03,0x00, -0x01,0x59,0x00,0x00,0x02,0xb4,0x03,0x00,0x01,0x5a,0x00,0x00,0x02,0xb5,0x03,0x00, -0x01,0x5b,0x00,0x00,0x02,0xb8,0x03,0x00,0x01,0x5c,0x00,0x00,0x02,0xb9,0x03,0x00, -0x01,0x5d,0x00,0x00,0x02,0xba,0x03,0x00,0x01,0x5e,0x00,0x00,0x02,0xbb,0x03,0x00, -0x01,0x5f,0x00,0x00,0x02,0xbb,0x03,0x00,0x03,0x80,0x00,0x00,0x05,0x04,0x00,0x00, -0x00,0xb7,0x00,0x00,0xfe,0x00,0x00,0x00,0xfe,0x00,0x00,0x00,0xfe,0x00,0x00,0x00, -0x02,0x4d,0x0c,0x00,0xfe,0x00,0x00,0x00,0xfe,0x00,0x00,0x00,0x02,0x4d,0x04,0x00, -0x00,0xbf,0x02,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0x00,0xb7,0x00,0x00, -0x01,0xe0,0x0e,0x00,0x02,0x4d,0x04,0x00,0x03,0x41,0x04,0x00,0x04,0xc3,0x08,0x00, -0x05,0x72,0x0c,0x00,0x06,0xe6,0x00,0x00,0x07,0x2a,0x08,0x00,0x08,0x3f,0x00,0x00, -0x09,0x35,0x03,0x00,0x0a,0xd4,0x09,0x00,0x0b,0xbb,0x07,0x00,0x0c,0x50,0x08,0x00, -0x0d,0xdf,0x0c,0x00,0x0e,0x2b,0x00,0x00,0x0f,0x14,0x01,0x00,0x00,0xb7,0x01,0x00, -0x01,0x01,0x00,0x00,0x02,0x00,0x04,0x00,0x01,0x02,0x00,0x00,0x02,0x01,0x04,0x00, -0x01,0x03,0x00,0x00,0x02,0x02,0x04,0x00,0x01,0x04,0x00,0x00,0x02,0x03,0x04,0x00, -0x01,0x05,0x00,0x00,0x02,0x04,0x04,0x00,0x01,0x06,0x00,0x00,0x02,0x05,0x04,0x00, -0x01,0x07,0x00,0x00,0x02,0x08,0x04,0x00,0x01,0x08,0x00,0x00,0x02,0x09,0x04,0x00, -0x01,0x09,0x00,0x00,0x02,0x0a,0x04,0x00,0x01,0x0a,0x00,0x00,0x02,0x0b,0x04,0x00, -0x01,0x0b,0x00,0x00,0x02,0x02,0x05,0x00,0x01,0x0c,0x00,0x00,0x02,0x03,0x05,0x00, -0x01,0x0d,0x00,0x00,0x02,0x04,0x05,0x00,0x01,0x0e,0x00,0x00,0x02,0x05,0x05,0x00, -0x01,0x0f,0x00,0x00,0x02,0x40,0x05,0x00,0x01,0x10,0x00,0x00,0x02,0x41,0x05,0x00, -0x01,0x11,0x00,0x00,0x02,0x42,0x05,0x00,0x01,0x12,0x00,0x00,0x02,0x43,0x05,0x00, -0x01,0x13,0x00,0x00,0x02,0x44,0x05,0x00,0x01,0x14,0x00,0x00,0x02,0x45,0x05,0x00, -0x01,0x15,0x00,0x00,0x02,0x80,0x05,0x00,0x01,0x16,0x00,0x00,0x02,0x81,0x05,0x00, -0x01,0x17,0x00,0x00,0x02,0x82,0x05,0x00,0x01,0x18,0x00,0x00,0x02,0x83,0x05,0x00, -0x01,0x19,0x00,0x00,0x02,0x84,0x05,0x00,0x01,0x1a,0x00,0x00,0x02,0x85,0x05,0x00, -0x01,0x1b,0x00,0x00,0x02,0x88,0x05,0x00,0x01,0x1c,0x00,0x00,0x02,0x89,0x05,0x00, -0x01,0x1d,0x00,0x00,0x02,0x8a,0x05,0x00,0x01,0x1e,0x00,0x00,0x02,0x8b,0x05,0x00, -0x01,0x1f,0x00,0x00,0x02,0x43,0x06,0x00,0x01,0x20,0x00,0x00,0x02,0x44,0x06,0x00, -0x01,0x21,0x00,0x00,0x02,0x45,0x06,0x00,0x01,0x22,0x00,0x00,0x02,0x80,0x06,0x00, -0x01,0x23,0x00,0x00,0x02,0x81,0x06,0x00,0x01,0x24,0x00,0x00,0x02,0x82,0x06,0x00, -0x01,0x25,0x00,0x00,0x02,0x83,0x06,0x00,0x01,0x26,0x00,0x00,0x02,0x84,0x06,0x00, -0x01,0x27,0x00,0x00,0x02,0x85,0x06,0x00,0x01,0x28,0x00,0x00,0x02,0x88,0x06,0x00, -0x01,0x29,0x00,0x00,0x02,0x89,0x06,0x00,0x01,0x2a,0x00,0x00,0x02,0x8a,0x06,0x00, -0x01,0x2b,0x00,0x00,0x02,0x8b,0x06,0x00,0x01,0x2c,0x00,0x00,0x02,0x8c,0x06,0x00, -0x01,0x2d,0x00,0x00,0x02,0x42,0x07,0x00,0x01,0x2e,0x00,0x00,0x02,0x43,0x07,0x00, -0x01,0x2f,0x00,0x00,0x02,0x44,0x07,0x00,0x01,0x30,0x00,0x00,0x02,0x45,0x07,0x00, -0x01,0x31,0x00,0x00,0x02,0x80,0x07,0x00,0x01,0x32,0x00,0x00,0x02,0x81,0x07,0x00, -0x01,0x33,0x00,0x00,0x02,0x82,0x07,0x00,0x01,0x34,0x00,0x00,0x02,0x83,0x07,0x00, -0x01,0x35,0x00,0x00,0x02,0x84,0x07,0x00,0x01,0x36,0x00,0x00,0x02,0x85,0x07,0x00, -0x01,0x37,0x00,0x00,0x02,0x88,0x07,0x00,0x01,0x38,0x00,0x00,0x02,0x89,0x07,0x00, -0x01,0x39,0x00,0x00,0x02,0x8a,0x07,0x00,0x01,0x3a,0x00,0x00,0x02,0x8b,0x07,0x00, -0x01,0x3b,0x00,0x00,0x02,0x8c,0x07,0x00,0x01,0x3c,0x00,0x00,0x02,0x8d,0x07,0x00, -0x01,0x3d,0x00,0x00,0x02,0x90,0x07,0x00,0x01,0x3e,0x00,0x00,0x02,0x91,0x07,0x00, -0x01,0x3f,0x00,0x00,0x02,0x92,0x07,0x00,0x01,0x40,0x00,0x00,0x02,0x93,0x07,0x00, -0x01,0x41,0x00,0x00,0x02,0x94,0x07,0x00,0x01,0x42,0x00,0x00,0x02,0x95,0x07,0x00, -0x01,0x43,0x00,0x00,0x02,0x98,0x07,0x00,0x01,0x44,0x00,0x00,0x02,0x99,0x07,0x00, -0x01,0x45,0x00,0x00,0x02,0x9a,0x07,0x00,0x01,0x46,0x00,0x00,0x02,0x9b,0x07,0x00, -0x01,0x47,0x00,0x00,0x02,0x9c,0x07,0x00,0x01,0x48,0x00,0x00,0x02,0x9d,0x07,0x00, -0x01,0x49,0x00,0x00,0x02,0xa0,0x07,0x00,0x01,0x4a,0x00,0x00,0x02,0xa1,0x07,0x00, -0x01,0x4b,0x00,0x00,0x02,0xa2,0x07,0x00,0x01,0x4c,0x00,0x00,0x02,0xa3,0x07,0x00, -0x01,0x4d,0x00,0x00,0x02,0xa4,0x07,0x00,0x01,0x4e,0x00,0x00,0x02,0xa5,0x07,0x00, -0x01,0x4f,0x00,0x00,0x02,0xa8,0x07,0x00,0x01,0x50,0x00,0x00,0x02,0xa9,0x07,0x00, -0x01,0x51,0x00,0x00,0x02,0xaa,0x03,0x00,0x01,0x52,0x00,0x00,0x02,0xab,0x03,0x00, -0x01,0x53,0x00,0x00,0x02,0xac,0x03,0x00,0x01,0x54,0x00,0x00,0x02,0xad,0x03,0x00, -0x01,0x55,0x00,0x00,0x02,0xb0,0x03,0x00,0x01,0x56,0x00,0x00,0x02,0xb1,0x03,0x00, -0x01,0x57,0x00,0x00,0x02,0xb2,0x03,0x00,0x01,0x58,0x00,0x00,0x02,0xb3,0x03,0x00, -0x01,0x59,0x00,0x00,0x02,0xb4,0x03,0x00,0x01,0x5a,0x00,0x00,0x02,0xb5,0x03,0x00, -0x01,0x5b,0x00,0x00,0x02,0xb8,0x03,0x00,0x01,0x5c,0x00,0x00,0x02,0xb9,0x03,0x00, -0x01,0x5d,0x00,0x00,0x02,0xba,0x03,0x00,0x01,0x5e,0x00,0x00,0x02,0xbb,0x03,0x00, -0x01,0x5f,0x00,0x00,0x02,0xbb,0x03,0x00,0x03,0x80,0x00,0x00,0x05,0x04,0x00,0x00, -0x00,0xb7,0x00,0x00,0xfe,0x00,0x00,0x00,0xfe,0x00,0x00,0x00,0xfe,0x00,0x00,0x00, -0x02,0x4d,0x0c,0x00,0xfe,0x00,0x00,0x00,0xfe,0x00,0x00,0x00,0x02,0x4d,0x04,0x00, -0x00,0xbf,0x02,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0x0a,0x00,0x00,0x00, -0x4f,0x6e,0x41,0x73,0x73,0x6f,0x63,0x52,0x65,0x71,0x00,0x00,0x4f,0x6e,0x41,0x73, -0x73,0x6f,0x63,0x52,0x73,0x70,0x00,0x00,0x4f,0x6e,0x52,0x65,0x41,0x73,0x73,0x6f, -0x63,0x52,0x65,0x71,0x00,0x00,0x00,0x00,0x4f,0x6e,0x52,0x65,0x41,0x73,0x73,0x6f, -0x63,0x52,0x73,0x70,0x00,0x00,0x00,0x00,0x4f,0x6e,0x50,0x72,0x6f,0x62,0x65,0x52, -0x65,0x71,0x00,0x00,0x4f,0x6e,0x50,0x72,0x6f,0x62,0x65,0x52,0x73,0x70,0x00,0x00, -0x44,0x6f,0x52,0x65,0x73,0x65,0x72,0x76,0x65,0x64,0x00,0x00,0x44,0x6f,0x52,0x65, -0x73,0x65,0x72,0x76,0x65,0x64,0x00,0x00,0x4f,0x6e,0x42,0x65,0x61,0x63,0x6f,0x6e, -0x00,0x00,0x00,0x00,0x4f,0x6e,0x41,0x54,0x49,0x4d,0x00,0x00,0x4f,0x6e,0x44,0x69, -0x73,0x61,0x73,0x73,0x6f,0x63,0x00,0x00,0x4f,0x6e,0x41,0x75,0x74,0x68,0x00,0x00, -0x4f,0x6e,0x44,0x65,0x41,0x75,0x74,0x68,0x00,0x00,0x00,0x00,0x4f,0x6e,0x41,0x63, -0x74,0x69,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x8b,0x01,0x80, -0x28,0x14,0x01,0x80,0x10,0x00,0x00,0x00,0x94,0x8b,0x01,0x80,0x30,0x14,0x01,0x80, -0x20,0x00,0x00,0x00,0xa0,0x8b,0x01,0x80,0x28,0x14,0x01,0x80,0x30,0x00,0x00,0x00, -0xb0,0x8b,0x01,0x80,0x30,0x14,0x01,0x80,0x40,0x00,0x00,0x00,0xc0,0x8b,0x01,0x80, -0x38,0x14,0x01,0x80,0x50,0x00,0x00,0x00,0xcc,0x8b,0x01,0x80,0x40,0x14,0x01,0x80, -0x00,0x00,0x00,0x00,0xd8,0x8b,0x01,0x80,0xa8,0x14,0x01,0x80,0x00,0x00,0x00,0x00, -0xe4,0x8b,0x01,0x80,0xa8,0x14,0x01,0x80,0x80,0x00,0x00,0x00,0xf0,0x8b,0x01,0x80, -0x48,0x14,0x01,0x80,0x90,0x00,0x00,0x00,0xfc,0x8b,0x01,0x80,0x50,0x14,0x01,0x80, -0xa0,0x00,0x00,0x00,0x04,0x8c,0x01,0x80,0x58,0x14,0x01,0x80,0xb0,0x00,0x00,0x00, -0x10,0x8c,0x01,0x80,0x90,0x14,0x01,0x80,0xc0,0x00,0x00,0x00,0x18,0x8c,0x01,0x80, -0x98,0x14,0x01,0x80,0xd0,0x00,0x00,0x00,0x24,0x8c,0x01,0x80,0xa0,0x14,0x01,0x80, -0x00,0x00,0x00,0x00,0xdc,0x8c,0x01,0x80,0xdc,0x8c,0x01,0x80,0x31,0x10,0x10,0x00, -0x00,0x30,0x00,0x00,0x31,0x20,0x10,0x00,0x00,0x30,0x00,0x00,0x31,0x28,0x10,0x00, -0x00,0x30,0x00,0x00,0x31,0x2c,0x10,0x10,0x00,0x30,0x00,0x00,0x31,0x2f,0x10,0x10, -0x00,0x30,0x00,0x00,0x31,0x30,0x18,0x00,0x00,0x30,0x00,0x00,0x31,0x30,0x20,0x10, -0x00,0x30,0x00,0x00,0x22,0x20,0x18,0x08,0x00,0x20,0x00,0x00,0x22,0x21,0x14,0x08, -0x00,0x20,0x00,0x00,0x22,0x21,0x1c,0x08,0x00,0x20,0x00,0x00,0x22,0x21,0x20,0x08, -0x00,0x20,0x00,0x00,0x22,0x21,0x20,0x10,0x00,0x20,0x00,0x00,0x22,0x21,0x20,0x18, -0x00,0x20,0x00,0x00,0x1a,0x19,0x18,0x10,0x00,0x18,0x00,0x00,0x12,0x11,0x10,0x08, -0x00,0x10,0x00,0x00,0x0a,0x09,0x08,0x00,0x00,0x08,0x00,0x00,0x0a,0x09,0x08,0x02, -0x00,0x08,0x00,0x00,0x0a,0x09,0x08,0x04,0x00,0x08,0x00,0x00,0x0a,0x09,0x08,0x06, -0x00,0x08,0x00,0x00,0x08,0x07,0x06,0x04,0x00,0x06,0x00,0x00,0x06,0x05,0x04,0x02, -0x00,0x04,0x00,0x00,0x06,0x05,0x04,0x03,0x00,0x04,0x00,0x00,0x05,0x04,0x03,0x02, -0x00,0x03,0x00,0x00,0x09,0x08,0x07,0x06,0x07,0x06,0x06,0x05,0x05,0x04,0x04,0x03, -0x06,0x05,0x05,0x04,0x04,0x03,0x03,0x03,0x05,0x04,0x04,0x03,0x03,0x02,0x02,0x02, -0x00,0x09,0x08,0x07,0x06,0x07,0x06,0x06,0x05,0x05,0x04,0x04,0x03,0x05,0x04,0x04, -0x03,0x03,0x02,0x02,0x02,0x04,0x03,0x03,0x02,0x02,0x01,0x01,0x01,0x00,0x00,0x00, -0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x10,0x10,0x20,0x08,0x08,0x08,0x08, -0x20,0x20,0x20,0x20,0x08,0x08,0x08,0x08,0x08,0x20,0x20,0x20,0x30,0x08,0x08,0x08, -0x08,0x18,0x18,0x18,0x18,0x18,0x20,0x30,0x30,0x10,0x20,0x20,0x20,0x20,0x20,0x30, -0x30,0x08,0x10,0x20,0x30,0x30,0x30,0x30,0x30,0x30,0x00,0x00,0x08,0x08,0x08,0x08, -0x08,0x08,0x08,0x08,0x08,0x10,0x10,0x20,0x08,0x08,0x08,0x08,0x08,0x20,0x20,0x20, -0x08,0x08,0x08,0x08,0x08,0x20,0x20,0x20,0x20,0x08,0x08,0x08,0x08,0x18,0x18,0x18, -0x18,0x18,0x20,0x30,0x30,0x10,0x20,0x20,0x20,0x20,0x20,0x30,0x30,0x08,0x10,0x20, -0x30,0x30,0x30,0x30,0x30,0x30,0x00,0x00,0x0a,0x09,0x08,0x04,0x00,0x0a,0x09,0x08, -0x04,0x00,0x0a,0x09,0x08,0x04,0x00,0x0a,0x09,0x08,0x04,0x00,0x0a,0x09,0x08,0x00, -0x00,0x0a,0x09,0x08,0x00,0x00,0x0a,0x09,0x08,0x00,0x00,0x0a,0x09,0x08,0x00,0x00, -0x0a,0x09,0x08,0x00,0x00,0x12,0x11,0x10,0x08,0x00,0x12,0x11,0x10,0x08,0x00,0x22, -0x21,0x20,0x18,0x00,0x0a,0x09,0x08,0x00,0x00,0x0a,0x09,0x08,0x00,0x00,0x0a,0x09, -0x08,0x00,0x00,0x0a,0x09,0x08,0x00,0x00,0x22,0x21,0x20,0x18,0x00,0x22,0x21,0x20, -0x18,0x00,0x22,0x21,0x1c,0x08,0x00,0x22,0x20,0x18,0x08,0x00,0x0a,0x09,0x08,0x02, -0x00,0x0a,0x09,0x08,0x02,0x00,0x0a,0x09,0x08,0x02,0x00,0x0a,0x09,0x08,0x02,0x00, -0x0a,0x09,0x08,0x00,0x00,0x22,0x21,0x20,0x10,0x00,0x22,0x21,0x20,0x08,0x00,0x22, -0x21,0x1c,0x08,0x00,0x31,0x30,0x18,0x00,0x00,0x0a,0x09,0x08,0x04,0x00,0x0a,0x09, -0x08,0x04,0x00,0x0a,0x09,0x08,0x04,0x00,0x0a,0x09,0x08,0x04,0x00,0x1a,0x19,0x18, -0x10,0x00,0x1a,0x19,0x18,0x10,0x00,0x1a,0x19,0x18,0x10,0x00,0x1a,0x19,0x18,0x10, -0x00,0x1a,0x19,0x18,0x10,0x00,0x22,0x21,0x20,0x08,0x00,0x31,0x2c,0x10,0x10,0x00, -0x31,0x28,0x10,0x00,0x00,0x12,0x11,0x10,0x08,0x00,0x22,0x21,0x20,0x18,0x00,0x22, -0x21,0x20,0x18,0x00,0x22,0x21,0x20,0x08,0x00,0x22,0x21,0x14,0x08,0x00,0x22,0x20, -0x18,0x08,0x00,0x31,0x30,0x20,0x10,0x00,0x31,0x2c,0x10,0x10,0x00,0x0a,0x09,0x08, -0x00,0x00,0x12,0x11,0x10,0x08,0x00,0x22,0x21,0x20,0x18,0x00,0x22,0x21,0x20,0x18, -0x00,0x31,0x30,0x20,0x10,0x00,0x31,0x2f,0x10,0x10,0x00,0x31,0x2f,0x10,0x10,0x00, -0x31,0x10,0x10,0x00,0x00,0x31,0x2c,0x10,0x10,0x00,0x00,0x00,0x0a,0x09,0x08,0x04, -0x00,0x0a,0x09,0x08,0x04,0x00,0x0a,0x09,0x08,0x04,0x00,0x0a,0x09,0x08,0x04,0x00, -0x0a,0x09,0x08,0x00,0x00,0x0a,0x09,0x08,0x00,0x00,0x0a,0x09,0x08,0x00,0x00,0x0a, -0x09,0x08,0x00,0x00,0x0a,0x09,0x08,0x00,0x00,0x12,0x11,0x10,0x08,0x00,0x12,0x11, -0x10,0x08,0x00,0x22,0x21,0x20,0x18,0x00,0x0a,0x09,0x08,0x04,0x00,0x0a,0x09,0x08, -0x04,0x00,0x0a,0x09,0x08,0x02,0x00,0x0a,0x09,0x08,0x00,0x00,0x0a,0x09,0x08,0x00, -0x00,0x22,0x21,0x20,0x18,0x00,0x22,0x21,0x1c,0x08,0x00,0x22,0x21,0x14,0x08,0x00, -0x0a,0x09,0x08,0x02,0x00,0x0a,0x09,0x08,0x02,0x00,0x0a,0x09,0x08,0x02,0x00,0x0a, -0x09,0x08,0x02,0x00,0x0a,0x09,0x08,0x00,0x00,0x22,0x21,0x20,0x10,0x00,0x22,0x21, -0x20,0x08,0x00,0x22,0x21,0x14,0x08,0x00,0x22,0x21,0x14,0x08,0x00,0x0a,0x09,0x08, -0x04,0x00,0x0a,0x09,0x08,0x04,0x00,0x0a,0x09,0x08,0x04,0x00,0x0a,0x09,0x08,0x04, -0x00,0x1a,0x19,0x18,0x10,0x00,0x1a,0x19,0x18,0x10,0x00,0x1a,0x19,0x18,0x10,0x00, -0x1a,0x19,0x18,0x10,0x00,0x1a,0x19,0x18,0x10,0x00,0x22,0x21,0x20,0x08,0x00,0x31, -0x2c,0x10,0x10,0x00,0x31,0x28,0x10,0x00,0x00,0x12,0x11,0x10,0x08,0x00,0x22,0x21, -0x20,0x18,0x00,0x22,0x21,0x20,0x18,0x00,0x22,0x21,0x20,0x08,0x00,0x22,0x21,0x14, -0x08,0x00,0x22,0x20,0x18,0x08,0x00,0x31,0x30,0x20,0x10,0x00,0x31,0x2c,0x10,0x10, -0x00,0x0a,0x09,0x08,0x00,0x00,0x12,0x11,0x10,0x08,0x00,0x22,0x21,0x20,0x18,0x00, -0x22,0x21,0x20,0x18,0x00,0x31,0x30,0x20,0x10,0x00,0x31,0x2f,0x10,0x10,0x00,0x31, -0x2f,0x10,0x10,0x00,0x31,0x10,0x10,0x00,0x00,0x31,0x2c,0x10,0x10,0x00,0x00,0x00, -0x01,0x02,0x04,0x08,0x02,0x04,0x08,0x0c,0x10,0x18,0x20,0x30,0x02,0x04,0x08,0x0c, -0x10,0x18,0x20,0x30,0x06,0x0c,0x10,0x18,0x24,0x30,0x3c,0x48,0x48,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x27,0x2c,0x19,0x1b,0x1e,0x20, -0x23,0x29,0x2a,0x2b,0x00,0x00,0x00,0x00,0x25,0x29,0x2b,0x2e,0x2e,0x00,0x00,0x00, -0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x10,0x00,0x00,0x00, -0x18,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x48,0x00,0x00,0x00, -0x60,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0xd8,0x00,0x00,0x00, -0x50,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0xa0,0x00,0x00,0x00,0xc8,0x00,0x00,0x00, -0x40,0x01,0x00,0x00,0x90,0x01,0x00,0x00,0xe0,0x01,0x00,0x00,0x30,0x02,0x00,0x00, -0x2c,0x01,0x00,0x00,0x40,0x01,0x00,0x00,0xe0,0x01,0x00,0x00,0xd0,0x02,0x00,0x00, -0x80,0x0c,0x00,0x00,0x80,0x0c,0x00,0x00,0x80,0x0c,0x00,0x00,0xa0,0x0f,0x00,0x00, -0xa0,0x0f,0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x04,0x00,0x00,0x00, -0x08,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x18,0x00,0x00,0x00, -0x24,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x60,0x00,0x00,0x00, -0x6c,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x50,0x00,0x00,0x00, -0x64,0x00,0x00,0x00,0xa0,0x00,0x00,0x00,0xc8,0x00,0x00,0x00,0xf0,0x00,0x00,0x00, -0x18,0x01,0x00,0x00,0x64,0x00,0x00,0x00,0xa0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00, -0x68,0x01,0x00,0x00,0x40,0x06,0x00,0x00,0x40,0x06,0x00,0x00,0x40,0x06,0x00,0x00, -0xd0,0x07,0x00,0x00,0xd0,0x07,0x00,0x00,0x2c,0x05,0x00,0x80,0x20,0x05,0x00,0x80, -0x14,0x05,0x00,0x80,0x08,0x05,0x00,0x80,0xfc,0x04,0x00,0x80,0xf0,0x04,0x00,0x80, -0xe4,0x04,0x00,0x80,0xd8,0x04,0x00,0x80,0xcc,0x04,0x00,0x80,0xc0,0x04,0x00,0x80, -0x78,0x04,0x00,0x80,0x68,0x15,0x02,0x80,0xc0,0x3a,0x00,0x80,0xcc,0x3a,0x00,0x80, -0xd8,0x3a,0x00,0x80,0xe4,0x3a,0x00,0x80,0xc0,0x3a,0x00,0x80,0xc0,0x3a,0x00,0x80, -0xc0,0x3a,0x00,0x80,0xc0,0x3a,0x00,0x80,0xf0,0x3a,0x00,0x80,0xfc,0x3a,0x00,0x80, -0x08,0x3b,0x00,0x80,0x14,0x3b,0x00,0x80,0x68,0x15,0x02,0x80,0xfe,0x01,0x80,0x7f, -0xe2,0x01,0x80,0x78,0xc7,0x01,0xc0,0x71,0xae,0x01,0x80,0x6b,0x95,0x01,0x40,0x65, -0x7f,0x01,0xc0,0x5f,0x69,0x01,0x40,0x5a,0x55,0x01,0x40,0x55,0x42,0x01,0x80,0x50, -0x30,0x01,0x00,0x4c,0x1f,0x01,0xc0,0x47,0x0f,0x01,0xc0,0x43,0x00,0x01,0x00,0x40, -0xf2,0x00,0x80,0x3c,0xe4,0x00,0x00,0x39,0xd7,0x00,0xc0,0x35,0xcb,0x00,0xc0,0x32, -0xc0,0x00,0x00,0x30,0xb5,0x00,0x40,0x2d,0xab,0x00,0xc0,0x2a,0xa2,0x00,0x80,0x28, -0x98,0x00,0x00,0x26,0x90,0x00,0x00,0x24,0x88,0x00,0x00,0x22,0x80,0x00,0x00,0x20, -0x79,0x00,0x40,0x1e,0x72,0x00,0x80,0x1c,0x6c,0x00,0x00,0x1b,0x66,0x00,0x80,0x19, -0x60,0x00,0x00,0x18,0x5b,0x00,0xc0,0x16,0x56,0x00,0x80,0x15,0x51,0x00,0x40,0x14, -0x4c,0x00,0x00,0x13,0x48,0x00,0x00,0x12,0x44,0x00,0x00,0x11,0x40,0x00,0x00,0x10, -0x36,0x35,0x2e,0x25,0x1c,0x12,0x09,0x04,0x33,0x32,0x2b,0x23,0x1a,0x11,0x08,0x04, -0x30,0x2f,0x29,0x21,0x19,0x10,0x08,0x03,0x2d,0x2d,0x27,0x1f,0x18,0x0f,0x08,0x03, -0x2b,0x2a,0x25,0x1e,0x16,0x0e,0x07,0x03,0x28,0x28,0x22,0x1c,0x15,0x0d,0x07,0x03, -0x26,0x25,0x21,0x1b,0x14,0x0d,0x06,0x03,0x24,0x23,0x1f,0x19,0x13,0x0c,0x06,0x03, -0x22,0x21,0x1d,0x18,0x11,0x0b,0x06,0x02,0x20,0x20,0x1b,0x16,0x11,0x08,0x05,0x02, -0x1f,0x1e,0x1a,0x15,0x10,0x0a,0x05,0x02,0x1d,0x1c,0x18,0x14,0x0f,0x0a,0x05,0x02, -0x1b,0x1a,0x17,0x13,0x0e,0x09,0x04,0x02,0x1a,0x19,0x16,0x12,0x0d,0x09,0x04,0x02, -0x18,0x17,0x15,0x11,0x0c,0x08,0x04,0x02,0x17,0x16,0x13,0x10,0x0c,0x08,0x04,0x02, -0x16,0x15,0x12,0x0f,0x0b,0x07,0x04,0x01,0x14,0x14,0x11,0x0e,0x0b,0x07,0x03,0x02, -0x13,0x13,0x10,0x0d,0x0a,0x06,0x03,0x01,0x12,0x12,0x0f,0x0c,0x09,0x06,0x03,0x01, -0x11,0x11,0x0f,0x0c,0x09,0x06,0x03,0x01,0x10,0x10,0x0e,0x0b,0x08,0x05,0x03,0x01, -0x0f,0x0f,0x0d,0x0b,0x08,0x05,0x03,0x01,0x0e,0x0e,0x0c,0x0a,0x08,0x05,0x02,0x01, -0x0d,0x0d,0x0c,0x0a,0x07,0x05,0x02,0x01,0x0d,0x0c,0x0b,0x09,0x07,0x04,0x02,0x01, -0x0c,0x0c,0x0a,0x09,0x06,0x04,0x02,0x01,0x0b,0x0b,0x0a,0x08,0x06,0x04,0x02,0x01, -0x0b,0x0a,0x09,0x08,0x06,0x04,0x02,0x01,0x0a,0x0a,0x09,0x07,0x05,0x03,0x02,0x01, -0x0a,0x09,0x08,0x07,0x05,0x03,0x02,0x01,0x09,0x09,0x08,0x06,0x05,0x03,0x01,0x01, -0x09,0x08,0x07,0x06,0x04,0x03,0x01,0x01,0x36,0x35,0x2e,0x1b,0x00,0x00,0x00,0x00, -0x33,0x32,0x2b,0x19,0x00,0x00,0x00,0x00,0x30,0x2f,0x29,0x18,0x00,0x00,0x00,0x00, -0x2d,0x2d,0x17,0x17,0x00,0x00,0x00,0x00,0x2b,0x2a,0x25,0x15,0x00,0x00,0x00,0x00, -0x28,0x28,0x24,0x14,0x00,0x00,0x00,0x00,0x26,0x25,0x21,0x13,0x00,0x00,0x00,0x00, -0x24,0x23,0x1f,0x12,0x00,0x00,0x00,0x00,0x22,0x21,0x1d,0x11,0x00,0x00,0x00,0x00, -0x20,0x20,0x1b,0x10,0x00,0x00,0x00,0x00,0x1f,0x1e,0x1a,0x0f,0x00,0x00,0x00,0x00, -0x1d,0x1c,0x18,0x0e,0x00,0x00,0x00,0x00,0x1b,0x1a,0x17,0x0e,0x00,0x00,0x00,0x00, -0x1a,0x19,0x16,0x0d,0x00,0x00,0x00,0x00,0x18,0x17,0x15,0x0c,0x00,0x00,0x00,0x00, -0x17,0x16,0x13,0x0b,0x00,0x00,0x00,0x00,0x16,0x15,0x12,0x0b,0x00,0x00,0x00,0x00, -0x14,0x14,0x11,0x0a,0x00,0x00,0x00,0x00,0x13,0x13,0x10,0x0a,0x00,0x00,0x00,0x00, -0x12,0x12,0x0f,0x09,0x00,0x00,0x00,0x00,0x11,0x11,0x0f,0x09,0x00,0x00,0x00,0x00, -0x10,0x10,0x0e,0x08,0x00,0x00,0x00,0x00,0x0f,0x0f,0x0d,0x08,0x00,0x00,0x00,0x00, -0x0e,0x0e,0x0c,0x07,0x00,0x00,0x00,0x00,0x0d,0x0d,0x0c,0x07,0x00,0x00,0x00,0x00, -0x0d,0x0c,0x0b,0x06,0x00,0x00,0x00,0x00,0x0c,0x0c,0x0a,0x06,0x00,0x00,0x00,0x00, -0x0b,0x0b,0x0a,0x06,0x00,0x00,0x00,0x00,0x0b,0x0a,0x09,0x05,0x00,0x00,0x00,0x00, -0x0a,0x0a,0x09,0x05,0x00,0x00,0x00,0x00,0x0a,0x09,0x08,0x05,0x00,0x00,0x00,0x00, -0x09,0x09,0x08,0x05,0x00,0x00,0x00,0x00,0x09,0x08,0x07,0x04,0x00,0x00,0x00,0x00, -0x06,0x00,0x2a,0xb0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, -0x08,0x28,0x28,0x28,0x28,0x28,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08, -0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0xa0,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04, -0x04,0x04,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x41,0x41,0x41,0x41,0x41,0x41,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,0x10,0x42,0x42,0x42,0x42,0x42,0x42,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x19,0x77,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x26,0x72,0xb0,0x00,0x26,0x72,0xb0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x26,0x65,0x60,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x02, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xf2,0x30,0xb8,0xff,0xff,0xff,0xff, -}; - u8 Rtl8192SUFwMainArray[MainArrayLength] = { 0x0, }; diff --git a/drivers/staging/rtl8192su/r8192SU_HWImg.h b/drivers/staging/rtl8192su/r8192SU_HWImg.h index 96b15252ea86..36e84aff6ed6 100644 --- a/drivers/staging/rtl8192su/r8192SU_HWImg.h +++ b/drivers/staging/rtl8192su/r8192SU_HWImg.h @@ -5,8 +5,6 @@ /*Created on 2009/ 3/ 6, 5:29*/ -#define ImgArrayLength 68368 -extern u8 Rtl8192SUFwImgArray[ImgArrayLength]; #define MainArrayLength 1 extern u8 Rtl8192SUFwMainArray[MainArrayLength]; #define DataArrayLength 1 diff --git a/drivers/staging/rtl8192su/r8192S_firmware.c b/drivers/staging/rtl8192su/r8192S_firmware.c index ff65bd125afc..752a3f1fb3f5 100644 --- a/drivers/staging/rtl8192su/r8192S_firmware.c +++ b/drivers/staging/rtl8192su/r8192S_firmware.c @@ -360,117 +360,58 @@ bool FirmwareDownload92S(struct net_device *dev) RT_TRACE(COMP_FIRMWARE, " --->FirmwareDownload92S()\n"); - //3// - //3 //<1> Open Image file, and map file to contineous memory if open file success. - //3 // or read image file from array. Default load from BIN file - //3// - priv->firmware_source = FW_SOURCE_IMG_FILE;// We should decided by Reg. - - switch( priv->firmware_source ) +/* +* Load the firmware from RTL8192SU/rtl8192sfw.bin +*/ + if(pFirmware->szFwTmpBufferLen == 0) { - case FW_SOURCE_IMG_FILE: - if(pFirmware->szFwTmpBufferLen == 0) - { - - rc = request_firmware(&fw_entry, pFwImageFileName[ulInitStep],&priv->udev->dev);//===>1 - if(rc < 0 ) { - RT_TRACE(COMP_ERR, "request firmware fail!\n"); - goto DownloadFirmware_Fail; - } - - if(fw_entry->size > sizeof(pFirmware->szFwTmpBuffer)) - { - RT_TRACE(COMP_ERR, "img file size exceed the container buffer fail!\n"); - release_firmware(fw_entry); - goto DownloadFirmware_Fail; - } - - memcpy(pFirmware->szFwTmpBuffer,fw_entry->data,fw_entry->size); - pFirmware->szFwTmpBufferLen = fw_entry->size; - release_firmware(fw_entry); - - pucMappedFile = pFirmware->szFwTmpBuffer; - file_length = pFirmware->szFwTmpBufferLen; - - //Retrieve FW header. - pFirmware->pFwHeader = (PRT_8192S_FIRMWARE_HDR) pucMappedFile; - pFwHdr = pFirmware->pFwHeader; - RT_TRACE(COMP_FIRMWARE,"signature:%x, version:%x, size:%x, imemsize:%x, sram size:%x\n", \ - pFwHdr->Signature, pFwHdr->Version, pFwHdr->DMEMSize, \ - pFwHdr->IMG_IMEM_SIZE, pFwHdr->IMG_SRAM_SIZE); - pFirmware->FirmwareVersion = byte(pFwHdr->Version ,0); - if ((pFwHdr->IMG_IMEM_SIZE==0) || (pFwHdr->IMG_IMEM_SIZE > sizeof(pFirmware->FwIMEM))) - { - RT_TRACE(COMP_ERR, "%s: memory for data image is less than IMEM required\n",\ - __FUNCTION__); - goto DownloadFirmware_Fail; - } else { - pucMappedFile+=FwHdrSize; - - //Retrieve IMEM image. - memcpy(pFirmware->FwIMEM, pucMappedFile, pFwHdr->IMG_IMEM_SIZE); - pFirmware->FwIMEMLen = pFwHdr->IMG_IMEM_SIZE; - } - - if (pFwHdr->IMG_SRAM_SIZE > sizeof(pFirmware->FwEMEM)) - { - RT_TRACE(COMP_ERR, "%s: memory for data image is less than EMEM required\n",\ - __FUNCTION__); - goto DownloadFirmware_Fail; - } else { - pucMappedFile += pFirmware->FwIMEMLen; - - /* Retriecve EMEM image */ - memcpy(pFirmware->FwEMEM, pucMappedFile, pFwHdr->IMG_SRAM_SIZE);//===>6 - pFirmware->FwEMEMLen = pFwHdr->IMG_SRAM_SIZE; - } - - + rc = request_firmware(&fw_entry, pFwImageFileName[ulInitStep],&priv->udev->dev); + if(rc < 0 ) { + RT_TRACE(COMP_ERR, "request firmware fail!\n"); + goto DownloadFirmware_Fail; } - break; - case FW_SOURCE_HEADER_FILE: -#if 1 -#define Rtl819XFwImageArray Rtl8192SUFwImgArray - //2008.11.10 Add by tynli. - pucMappedFile = Rtl819XFwImageArray; - ulFileLength = ImgArrayLength; + if(fw_entry->size > sizeof(pFirmware->szFwTmpBuffer)) { + RT_TRACE(COMP_ERR, "img file size exceed the container buffer fail!\n"); + release_firmware(fw_entry); + goto DownloadFirmware_Fail; + } - RT_TRACE(COMP_INIT,"Fw download from header.\n"); - /* Retrieve FW header*/ + memcpy(pFirmware->szFwTmpBuffer,fw_entry->data,fw_entry->size); + pFirmware->szFwTmpBufferLen = fw_entry->size; + release_firmware(fw_entry); + + pucMappedFile = pFirmware->szFwTmpBuffer; + file_length = pFirmware->szFwTmpBufferLen; + + /* Retrieve FW header. */ pFirmware->pFwHeader = (PRT_8192S_FIRMWARE_HDR) pucMappedFile; pFwHdr = pFirmware->pFwHeader; RT_TRACE(COMP_FIRMWARE,"signature:%x, version:%x, size:%x, imemsize:%x, sram size:%x\n", \ pFwHdr->Signature, pFwHdr->Version, pFwHdr->DMEMSize, \ pFwHdr->IMG_IMEM_SIZE, pFwHdr->IMG_SRAM_SIZE); pFirmware->FirmwareVersion = byte(pFwHdr->Version ,0); - - if ((pFwHdr->IMG_IMEM_SIZE==0) || (pFwHdr->IMG_IMEM_SIZE > sizeof(pFirmware->FwIMEM))) - { - printk("FirmwareDownload92S(): memory for data image is less than IMEM required\n"); + if ((pFwHdr->IMG_IMEM_SIZE==0) || (pFwHdr->IMG_IMEM_SIZE > sizeof(pFirmware->FwIMEM))) { + RT_TRACE(COMP_ERR, "%s: memory for data image is less than IMEM required\n",\ + __FUNCTION__); goto DownloadFirmware_Fail; } else { pucMappedFile+=FwHdrSize; - //Retrieve IMEM image. + /* Retrieve IMEM image. */ memcpy(pFirmware->FwIMEM, pucMappedFile, pFwHdr->IMG_IMEM_SIZE); pFirmware->FwIMEMLen = pFwHdr->IMG_IMEM_SIZE; } - if (pFwHdr->IMG_SRAM_SIZE > sizeof(pFirmware->FwEMEM)) - { - printk(" FirmwareDownload92S(): memory for data image is less than EMEM required\n"); - goto DownloadFirmware_Fail; - } else { - pucMappedFile+= pFirmware->FwIMEMLen; - - //Retriecve EMEM image. - memcpy(pFirmware->FwEMEM, pucMappedFile, pFwHdr->IMG_SRAM_SIZE); - pFirmware->FwEMEMLen = pFwHdr->IMG_SRAM_SIZE; - } -#endif - break; - default: - break; + if (pFwHdr->IMG_SRAM_SIZE > sizeof(pFirmware->FwEMEM)) { + RT_TRACE(COMP_ERR, "%s: memory for data image is less than EMEM required\n",\ + __FUNCTION__); + goto DownloadFirmware_Fail; + } else { + pucMappedFile += pFirmware->FwIMEMLen; + /* Retriecve EMEM image */ + memcpy(pFirmware->FwEMEM, pucMappedFile, pFwHdr->IMG_SRAM_SIZE);//===>6 + pFirmware->FwEMEMLen = pFwHdr->IMG_SRAM_SIZE; + } } FwStatus = FirmwareGetNextStatus(pFirmware->FWStatus); diff --git a/drivers/staging/rtl8192su/r8192S_firmware.h b/drivers/staging/rtl8192su/r8192S_firmware.h index c525380e6473..2c2cf8032ded 100644 --- a/drivers/staging/rtl8192su/r8192S_firmware.h +++ b/drivers/staging/rtl8192su/r8192S_firmware.h @@ -59,12 +59,6 @@ typedef enum _desc_packet_type_e{ DESC_PACKET_TYPE_NORMAL = 1, }desc_packet_type_e; -typedef enum _firmware_source{ - FW_SOURCE_IMG_FILE = 0, - FW_SOURCE_HEADER_FILE = 1, -}firmware_source_e, *pfirmware_source_e; - - typedef enum _opt_rst_type{ OPT_SYSTEM_RESET = 0, OPT_FIRMWARE_RESET = 1, @@ -185,7 +179,6 @@ typedef enum _FIRMWARE_8192S_STATUS{ #define RTL8190_MAX_FIRMWARE_CODE_SIZE 64000 //64k typedef struct _rt_firmware{ - firmware_source_e eFWSource; PRT_8192S_FIRMWARE_HDR pFwHeader; FIRMWARE_8192S_STATUS FWStatus; u16 FirmwareVersion; diff --git a/drivers/staging/rtl8192su/r8192U.h b/drivers/staging/rtl8192su/r8192U.h index 2a11e0113d3a..ba87623f32ee 100644 --- a/drivers/staging/rtl8192su/r8192U.h +++ b/drivers/staging/rtl8192su/r8192U.h @@ -1258,7 +1258,6 @@ typedef struct r8192_priv u8 Rf_Mode; //add for Firmware RF -R/W switch prt_firmware pFirmware; rtl819xUsb_loopback_e LoopbackMode; - firmware_source_e firmware_source; bool usb_error; u16 EEPROMTxPowerDiff; From 29a1fbc88b822497a0a4d8e9cb7d8a471e70f339 Mon Sep 17 00:00:00 2001 From: Florian Schilhabel Date: Fri, 19 Feb 2010 20:11:37 +0100 Subject: [PATCH 325/367] Staging: rtl8192su: fix for rtl819xU:Error TX URB for zero byte xxx, error -2 according to 'linux device drivers', ENOENT, ECONNRESET, ESHUTDOWN are not real transmission errors. also, a little cosmetics. Signed-off-by: Florian Schilhabel Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192su/r8192U_core.c | 36 ++++++++++++++----------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c index 23d1d35be7ed..8393bc57bdfc 100644 --- a/drivers/staging/rtl8192su/r8192U_core.c +++ b/drivers/staging/rtl8192su/r8192U_core.c @@ -2340,25 +2340,24 @@ short rtl8192SU_tx(struct net_device *dev, struct sk_buff* skb) skb->len, rtl8192_tx_isr, skb); status = usb_submit_urb(tx_urb, GFP_ATOMIC); - if (!status){ -//we need to send 0 byte packet whenever 512N bytes/64N(HIGN SPEED/NORMAL SPEED) bytes packet has been transmitted. Otherwise, it will be halt to wait for another packet. WB. 2008.08.27 + if (!status) { + /* + * we need to send 0 byte packet whenever 512N bytes/64N(HIGN SPEED/NORMAL SPEED) bytes packet has been transmitted. + * Otherwise, it will be halt to wait for another packet. WB. 2008.08.27 + */ bool bSend0Byte = false; u8 zero = 0; - if(udev->speed == USB_SPEED_HIGH) - { + if(udev->speed == USB_SPEED_HIGH) { if (skb->len > 0 && skb->len % 512 == 0) bSend0Byte = true; } - else - { + else { if (skb->len > 0 && skb->len % 64 == 0) bSend0Byte = true; } - if (bSend0Byte) - { -#if 1 + if (bSend0Byte) { tx_urb_zero = usb_alloc_urb(0,GFP_ATOMIC); - if(!tx_urb_zero){ + if(!tx_urb_zero) { RT_TRACE(COMP_ERR, "can't alloc urb for zero byte\n"); return -ENOMEM; } @@ -2366,16 +2365,23 @@ short rtl8192SU_tx(struct net_device *dev, struct sk_buff* skb) usb_sndbulkpipe(udev,idx_pipe), &zero, 0, tx_zero_isr, dev); status = usb_submit_urb(tx_urb_zero, GFP_ATOMIC); - if (status){ - RT_TRACE(COMP_ERR, "Error TX URB for zero byte %d, error %d", atomic_read(&priv->tx_pending[tcb_desc->queue_index]), status); - return -1; + switch (status) { + case 0: + break; + case -ECONNRESET: + case -ENOENT: + case -ESHUTDOWN: + break; + default: + RT_TRACE(COMP_ERR, "Error TX URB for zero byte %d, error %d", + atomic_read(&priv->tx_pending[tcb_desc->queue_index]), status); + return -1; } -#endif } dev->trans_start = jiffies; atomic_inc(&priv->tx_pending[tcb_desc->queue_index]); return 0; - }else{ + } else { RT_TRACE(COMP_ERR, "Error TX URB %d, error %d", atomic_read(&priv->tx_pending[tcb_desc->queue_index]), status); return -1; From a99840b1aa66d3797bfe0be4fb6982bba62d815b Mon Sep 17 00:00:00 2001 From: Florian Schilhabel Date: Fri, 19 Feb 2010 20:11:54 +0100 Subject: [PATCH 326/367] Staging: rtl8192su: re-enable tx-stats currently, interface statistics look like this: wlan0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx inet addr:xxx.xxx.xxx.xxx Bcast:xxx.xxx.xxx.xxx Mask:xxx.xxx.xxx.xxx UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:435 errors:0 dropped:1 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:456758 (446.0 Kb) TX bytes:0 (0.0 b) after re-enabling the tx-stats it looks like this: wlan0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx inet addr:xxx.xxx.xxx.xxx Bcast:xxx.xxx.xxx.xxx Mask:xxx.xxx.xxx.xxx UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1269 errors:0 dropped:1 overruns:0 frame:0 TX packets:1049 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1667442 (1.5 Mb) TX bytes:82606 (80.6 Kb) Signed-off-by: Florian Schilhabel Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c index e46f3bc6a21a..1dfc9458f833 100644 --- a/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c @@ -2145,8 +2145,8 @@ void ieee80211_softmac_xmit(struct ieee80211_txb *txb, struct ieee80211_device * ieee80211_sta_wakeup(ieee,0); /* update the tx status */ -// ieee->stats.tx_bytes += txb->payload_size; -// ieee->stats.tx_packets++; + ieee->stats.tx_bytes += txb->payload_size; + ieee->stats.tx_packets++; tcb_desc = (cb_desc *)(txb->fragments[0]->cb + MAX_DEV_ADDR_SIZE); if(tcb_desc->bMulticast) { ieee->stats.multicast++; From 7bd795bfcd7eb2f2962d458bf787d5ee0d1167cd Mon Sep 17 00:00:00 2001 From: Florian Schilhabel Date: Fri, 19 Feb 2010 20:12:12 +0100 Subject: [PATCH 327/367] Staging: rtl8192su: use list_for_each_safe() in ieee80211_crypto_deinit Signed-off-by: Florian Schilhabel Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192su/TODO | 1 - .../rtl8192su/ieee80211/ieee80211_crypt.c | 19 ++++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/rtl8192su/TODO b/drivers/staging/rtl8192su/TODO index f11eec700030..3c8da157a93c 100644 --- a/drivers/staging/rtl8192su/TODO +++ b/drivers/staging/rtl8192su/TODO @@ -4,7 +4,6 @@ TODO: - cleanup ieee80211.h - move rtl8192su's specific code out from ieee80211.h - abstract rtl819su's specific code - - use list_for_each_safe() in ieee80211_crypto_deinit - switch to use shared "librtl" instead of private ieee80211 stack - switch to use LIB80211 - switch to use MAC80211 diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt.c index 521e7b989934..c4640e63196b 100644 --- a/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt.c +++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt.c @@ -226,19 +226,20 @@ out: void __exit ieee80211_crypto_deinit(void) { struct list_head *ptr, *n; + struct ieee80211_crypto_alg *alg = NULL; if (hcrypt == NULL) return; - for (ptr = hcrypt->algs.next, n = ptr->next; ptr != &hcrypt->algs; - ptr = n, n = ptr->next) { - struct ieee80211_crypto_alg *alg = - (struct ieee80211_crypto_alg *) ptr; - list_del(ptr); - printk(KERN_DEBUG "ieee80211_crypt: unregistered algorithm " - "'%s' (deinit)\n", alg->ops->name); - kfree(alg); + list_for_each_safe(ptr, n, &hcrypt->algs) { + alg = list_entry(ptr, struct ieee80211_crypto_alg, list); + if (alg) { + list_del(ptr); + printk(KERN_DEBUG + "ieee80211_crypt: unregistered algorithm '%s' (deinit)\n", + alg->ops->name); + kfree(alg); + } } - kfree(hcrypt); } From 02c7b237f6a01f580319187d4bdbf712b27a5460 Mon Sep 17 00:00:00 2001 From: Alessio Igor Bogani Date: Fri, 26 Feb 2010 08:44:27 +0100 Subject: [PATCH 328/367] Staging: Cleanup useless headers BKL isn't anymore present into these files thus it is no necessary still include smp_lock.h. Signed-off-by: Alessio Igor Bogani Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/comedi_compat32.c | 1 - drivers/staging/comedi/drivers/usbdux.c | 1 - drivers/staging/comedi/drivers/usbduxfast.c | 1 - drivers/staging/panel/panel.c | 1 - 4 files changed, 4 deletions(-) diff --git a/drivers/staging/comedi/comedi_compat32.c b/drivers/staging/comedi/comedi_compat32.c index a9fdcda5db7a..581aa5fee2e3 100644 --- a/drivers/staging/comedi/comedi_compat32.c +++ b/drivers/staging/comedi/comedi_compat32.c @@ -26,7 +26,6 @@ #define __NO_VERSION__ #include "comedi.h" -#include #include #include "comedi_compat32.h" diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/comedi/drivers/usbdux.c index bcf46dab2052..8942ae45708d 100644 --- a/drivers/staging/comedi/drivers/usbdux.c +++ b/drivers/staging/comedi/drivers/usbdux.c @@ -95,7 +95,6 @@ sampling rate. If you sample two channels you get 4kHz and so on. #include #include #include -#include #include #include #include diff --git a/drivers/staging/comedi/drivers/usbduxfast.c b/drivers/staging/comedi/drivers/usbduxfast.c index b96cf3b96fd3..e89b81812538 100644 --- a/drivers/staging/comedi/drivers/usbduxfast.c +++ b/drivers/staging/comedi/drivers/usbduxfast.c @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include "comedi_fc.h" diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c index 95c93e82ccec..377884f3480d 100644 --- a/drivers/staging/panel/panel.c +++ b/drivers/staging/panel/panel.c @@ -41,7 +41,6 @@ #include #include #include -#include #include #include #include From 48d07f2bf3fd6d0bbe7577f1844f7edfaf7399f6 Mon Sep 17 00:00:00 2001 From: d binderman Date: Sun, 21 Feb 2010 10:02:59 +0000 Subject: [PATCH 329/367] Staging: comedi: amplc_pci224.c: coding style cleanups Signed-off-by: David Binderman Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/amplc_pci224.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/staging/comedi/drivers/amplc_pci224.c b/drivers/staging/comedi/drivers/amplc_pci224.c index d9836879355e..b41e5e5963aa 100644 --- a/drivers/staging/comedi/drivers/amplc_pci224.c +++ b/drivers/staging/comedi/drivers/amplc_pci224.c @@ -1536,20 +1536,12 @@ static int pci224_detach(struct comedi_device *dev) s = dev->subdevices + 0; /* AO subdevice */ - if (s->range_table_list) { - kfree(s->range_table_list); - } + kfree(s->range_table_list); } if (devpriv) { - if (devpriv->ao_readback) { - kfree(devpriv->ao_readback); - } - if (devpriv->ao_scan_vals) { - kfree(devpriv->ao_scan_vals); - } - if (devpriv->ao_scan_order) { - kfree(devpriv->ao_scan_order); - } + kfree(devpriv->ao_readback); + kfree(devpriv->ao_scan_vals); + kfree(devpriv->ao_scan_order); if (devpriv->pci_dev) { if (dev->iobase) { comedi_pci_disable(devpriv->pci_dev); From 015fadba7c30a082cc8efa0f353be096b75e3952 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 26 Feb 2010 10:14:56 +0100 Subject: [PATCH 330/367] Staging: comedi: addi_amcc_S5920.c: Checkpatch cleanup WARNING: braces {} are not necessary for any arm of this statement + if (i_Counter == 0) { [...] + } else { [...] Signed-off-by: Andrea Gelmini Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c b/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c index bd7e4619b3df..97c10aaa691d 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c +++ b/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c @@ -173,11 +173,10 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead, } while (dw_eeprom_busy == EEPROM_BUSY); /* Select the upper address part */ - if (i_Counter == 0) { + if (i_Counter == 0) b_ReadLowByte = pb_ReadByte[0]; - } else { + else b_ReadHighByte = pb_ReadByte[0]; - } /* Sleep */ msleep(1); From a9ecb5bb5847b084d6d8bf5c60549fd5598c053a Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 26 Feb 2010 10:14:57 +0100 Subject: [PATCH 331/367] Staging: comedi: addi_common.h: Checkpatch cleanup ERROR: code indent should use tabs where possible + const struct comedi_lrange *pr_AiRangelist;^I/* rangelist for A/D */$ ERROR: code indent should use tabs where possible + const struct comedi_lrange *pr_AoRangelist;^I/* rangelist for D/A */$ Signed-off-by: Andrea Gelmini Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi-data/addi_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.h b/drivers/staging/comedi/drivers/addi-data/addi_common.h index 3ab27cf0facc..caeb6fd2d9b1 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_common.h +++ b/drivers/staging/comedi/drivers/addi-data/addi_common.h @@ -77,8 +77,8 @@ struct addi_board { int i_NbrAoChannel; /* num of D/A chans */ int i_AiMaxdata; /* resolution of A/D */ int i_AoMaxdata; /* resolution of D/A */ - const struct comedi_lrange *pr_AiRangelist; /* rangelist for A/D */ - const struct comedi_lrange *pr_AoRangelist; /* rangelist for D/A */ + const struct comedi_lrange *pr_AiRangelist; /* rangelist for A/D */ + const struct comedi_lrange *pr_AoRangelist; /* rangelist for D/A */ int i_NbrDiChannel; /* Number of DI channels */ int i_NbrDoChannel; /* Number of DO channels */ From 882e1233a1abb650149496b33eaeb1d09bbc0b7a Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 26 Feb 2010 10:14:58 +0100 Subject: [PATCH 332/367] Staging: comedi: hwdrv_apci1032.c: Checkpatch cleanup ERROR: do not initialise externals to 0 or NULL +unsigned int ui_InterruptStatus = 0; WARNING: braces {} are not necessary for single statement blocks + else { + outl(0x6, devpriv->iobase + APCI1032_DIGITAL_IP_IRQ); + } /* else if(data[1] == ADDIDATA_OR) */ WARNING: braces {} are not necessary for single statement blocks + if (data[1] == 1) { + *data = ui_InterruptStatus; + } /* if(data[1]==1) */ Signed-off-by: Andrea Gelmini Signed-off-by: Greg Kroah-Hartman --- .../staging/comedi/drivers/addi-data/hwdrv_apci1032.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c index 27c68aac32d1..fe06789699f3 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c @@ -54,7 +54,7 @@ You should also find the complete GPL in the COPYING file accompanying this sour #include "hwdrv_apci1032.h" #include /* Global variables */ -unsigned int ui_InterruptStatus = 0; +unsigned int ui_InterruptStatus; /* +----------------------------------------------------------------------------+ @@ -108,9 +108,9 @@ int i_APCI1032_ConfigDigitalInput(struct comedi_device *dev, struct comedi_subde ui_TmpValue = inl(devpriv->iobase + APCI1032_DIGITAL_IP_IRQ); } /* if (data[1] == ADDIDATA_OR) */ - else { + else outl(0x6, devpriv->iobase + APCI1032_DIGITAL_IP_IRQ); - } /* else if(data[1] == ADDIDATA_OR) */ + /* else if(data[1] == ADDIDATA_OR) */ } /* if( data[0] == ADDIDATA_ENABLE) */ else { ul_Command1 = ul_Command1 & 0xFFFF0000; @@ -221,9 +221,9 @@ int i_APCI1032_ReadMoreDigitalInput(struct comedi_device *dev, struct comedi_sub } /* switch(ui_NoOfChannels) */ } /* if(data[1]==0) */ else { - if (data[1] == 1) { + if (data[1] == 1) *data = ui_InterruptStatus; - } /* if(data[1]==1) */ + /* if(data[1]==1) */ } /* else if(data[1]==0) */ return insn->n; } From 2d238b2972bf365153ae8d699177c7a19a5f3056 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 26 Feb 2010 10:14:59 +0100 Subject: [PATCH 333/367] Staging: comedi: cb_pcidas.c: Checkpatch cleanup ERROR: "foo * bar" should be "foo *bar" + uint8_t * data); WARNING: braces {} are not necessary for single statement blocks + if (devpriv->s5933_config) { + comedi_pci_disable(devpriv->pci_dev); + } WARNING: braces {} are not necessary for single statement blocks + if (cmd->stop_src == TRIG_COUNT) { + devpriv->count = cmd->chanlist_len * cmd->stop_arg; + } WARNING: braces {} are not necessary for single statement blocks + if (cmd->stop_src == TRIG_COUNT) { + devpriv->ao_count = cmd->chanlist_len * cmd->stop_arg; + } WARNING: braces {} are not necessary for single statement blocks + if (cmd->stop_src == TRIG_COUNT) { + devpriv->ao_count -= num_points; + } WARNING: braces {} are not necessary for single statement blocks + if (dev->attached == 0) { + return IRQ_NONE; + } WARNING: braces {} are not necessary for single statement blocks + if ((status & (INT | EOAI | LADFUL | DAHFI | DAEMI)) == 0) { + comedi_error(dev, "spurious interrupt"); + } WARNING: braces {} are not necessary for single statement blocks + if (status & (DAHFI | DAEMI)) { + handle_ao_interrupt(dev, status); + } WARNING: braces {} are not necessary for single statement blocks + if (async->cmd.stop_src == TRIG_COUNT) { + devpriv->ao_count -= num_points; + } ERROR: "foo * bar" should be "foo *bar" + uint8_t * data) Signed-off-by: Andrea Gelmini Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/cb_pcidas.c | 28 ++++++++-------------- 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/drivers/staging/comedi/drivers/cb_pcidas.c b/drivers/staging/comedi/drivers/cb_pcidas.c index f3e66c440a38..434591de37c5 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas.c +++ b/drivers/staging/comedi/drivers/cb_pcidas.c @@ -518,7 +518,7 @@ static int trimpot_7376_write(struct comedi_device *dev, uint8_t value); static int trimpot_8402_write(struct comedi_device *dev, unsigned int channel, uint8_t value); static int nvram_read(struct comedi_device *dev, unsigned int address, - uint8_t * data); + uint8_t *data); static inline unsigned int cal_enable_bits(struct comedi_device *dev) { @@ -760,9 +760,8 @@ static int cb_pcidas_detach(struct comedi_device *dev) if (dev->subdevices) subdev_8255_cleanup(dev, dev->subdevices + 2); if (devpriv && devpriv->pci_dev) { - if (devpriv->s5933_config) { + if (devpriv->s5933_config) comedi_pci_disable(devpriv->pci_dev); - } pci_dev_put(devpriv->pci_dev); } @@ -1248,9 +1247,8 @@ static int cb_pcidas_ai_cmd(struct comedi_device *dev, cmd->flags & TRIG_ROUND_MASK); /* set number of conversions */ - if (cmd->stop_src == TRIG_COUNT) { + if (cmd->stop_src == TRIG_COUNT) devpriv->count = cmd->chanlist_len * cmd->stop_arg; - } /* enable interrupts */ spin_lock_irqsave(&dev->spinlock, flags); devpriv->adc_fifo_bits |= INTE; @@ -1449,9 +1447,8 @@ static int cb_pcidas_ao_cmd(struct comedi_device *dev, devpriv->ao_divisor2, 2); } /* set number of conversions */ - if (cmd->stop_src == TRIG_COUNT) { + if (cmd->stop_src == TRIG_COUNT) devpriv->ao_count = cmd->chanlist_len * cmd->stop_arg; - } /* set pacer source */ spin_lock_irqsave(&dev->spinlock, flags); switch (cmd->scan_begin_src) { @@ -1494,9 +1491,8 @@ static int cb_pcidas_ao_inttrig(struct comedi_device *dev, num_points * sizeof(short)); num_points = num_bytes / sizeof(short); - if (cmd->stop_src == TRIG_COUNT) { + if (cmd->stop_src == TRIG_COUNT) devpriv->ao_count -= num_points; - } /* write data to board's fifo */ outsw(devpriv->ao_registers + DACDATA, devpriv->ao_buffer, num_bytes); @@ -1534,9 +1530,8 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d) static const int timeout = 10000; unsigned long flags; - if (dev->attached == 0) { + if (dev->attached == 0) return IRQ_NONE; - } async = s->async; async->events = 0; @@ -1558,15 +1553,13 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d) status = inw(devpriv->control_status + INT_ADCFIFO); #ifdef CB_PCIDAS_DEBUG - if ((status & (INT | EOAI | LADFUL | DAHFI | DAEMI)) == 0) { + if ((status & (INT | EOAI | LADFUL | DAHFI | DAEMI)) == 0) comedi_error(dev, "spurious interrupt"); - } #endif /* check for analog output interrupt */ - if (status & (DAHFI | DAEMI)) { + if (status & (DAHFI | DAEMI)) handle_ao_interrupt(dev, status); - } /* check for analog input interrupts */ /* if fifo half-full */ if (status & ADHFI) { @@ -1675,9 +1668,8 @@ static void handle_ao_interrupt(struct comedi_device *dev, unsigned int status) num_points * sizeof(short)); num_points = num_bytes / sizeof(short); - if (async->cmd.stop_src == TRIG_COUNT) { + if (async->cmd.stop_src == TRIG_COUNT) devpriv->ao_count -= num_points; - } /* write data to board's fifo */ outsw(devpriv->ao_registers + DACDATA, devpriv->ao_buffer, num_points); @@ -1852,7 +1844,7 @@ static int wait_for_nvram_ready(unsigned long s5933_base_addr) } static int nvram_read(struct comedi_device *dev, unsigned int address, - uint8_t * data) + uint8_t *data) { unsigned long iobase = devpriv->s5933_config; From 20db7d7de7027ddee5df1b51b3d013568273b9df Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 26 Feb 2010 10:15:00 +0100 Subject: [PATCH 334/367] Staging: comedi: cb_pcidda.c: Checkpatch cleanup WARNING: braces {} are not necessary for single statement blocks + if (devpriv->dac) { + comedi_pci_disable(devpriv->pci_dev); + } WARNING: braces {} are not necessary for single statement blocks + if (inw_p(devpriv->dac + DACALIBRATION1) & SERIAL_OUT_BIT) { + value |= 1 << (value_width - i); + } WARNING: braces {} are not necessary for single statement blocks + for (i = 0; i < max_num_caldacs; i++) { + cal2_bits |= DESELECT_CALDAC_BIT(i); + } WARNING: braces {} are not necessary for single statement blocks + for (i = 0; i < max_num_caldacs; i++) { + cal2_bits |= DESELECT_CALDAC_BIT(i); + } Signed-off-by: Andrea Gelmini Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/cb_pcidda.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/staging/comedi/drivers/cb_pcidda.c b/drivers/staging/comedi/drivers/cb_pcidda.c index 782357732eed..81829d6fd287 100644 --- a/drivers/staging/comedi/drivers/cb_pcidda.c +++ b/drivers/staging/comedi/drivers/cb_pcidda.c @@ -410,9 +410,8 @@ static int cb_pcidda_detach(struct comedi_device *dev) */ if (devpriv) { if (devpriv->pci_dev) { - if (devpriv->dac) { + if (devpriv->dac) comedi_pci_disable(devpriv->pci_dev); - } pci_dev_put(devpriv->pci_dev); } } @@ -677,9 +676,8 @@ static unsigned int cb_pcidda_serial_in(struct comedi_device *dev) for (i = 1; i <= value_width; i++) { /* read bits most significant bit first */ - if (inw_p(devpriv->dac + DACALIBRATION1) & SERIAL_OUT_BIT) { + if (inw_p(devpriv->dac + DACALIBRATION1) & SERIAL_OUT_BIT) value |= 1 << (value_width - i); - } } return value; @@ -716,9 +714,8 @@ static unsigned int cb_pcidda_read_eeprom(struct comedi_device *dev, /* send serial output stream to eeprom */ cal2_bits = SELECT_EEPROM_BIT | DESELECT_REF_DAC_BIT | DUMMY_BIT; /* deactivate caldacs (one caldac for every two channels) */ - for (i = 0; i < max_num_caldacs; i++) { + for (i = 0; i < max_num_caldacs; i++) cal2_bits |= DESELECT_CALDAC_BIT(i); - } outw_p(cal2_bits, devpriv->dac + DACALIBRATION2); /* tell eeprom we want to read */ @@ -756,9 +753,8 @@ static void cb_pcidda_write_caldac(struct comedi_device *dev, */ cal2_bits = DESELECT_REF_DAC_BIT | DUMMY_BIT; /* deactivate caldacs (one caldac for every two channels) */ - for (i = 0; i < max_num_caldacs; i++) { + for (i = 0; i < max_num_caldacs; i++) cal2_bits |= DESELECT_CALDAC_BIT(i); - } /* activate the caldac we want */ cal2_bits &= ~DESELECT_CALDAC_BIT(caldac); outw_p(cal2_bits, devpriv->dac + DACALIBRATION2); From e3a21d0ac2ee4f6c1be5314e76939867a2d0b470 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 26 Feb 2010 10:15:01 +0100 Subject: [PATCH 335/367] Staging: comedi: cb_pcidio.c: Checkpatch cleanup WARNING: braces {} are not necessary for single statement blocks + if (devpriv->dio_reg_base) { + comedi_pci_disable(devpriv->pci_dev); + } WARNING: braces {} are not necessary for single statement blocks + for (i = 0; i < thisboard->n_8255; i++) { + subdev_8255_cleanup(dev, dev->subdevices + i); + } Signed-off-by: Andrea Gelmini Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/cb_pcidio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/cb_pcidio.c b/drivers/staging/comedi/drivers/cb_pcidio.c index 7daad0a17fb1..38ccd105fa35 100644 --- a/drivers/staging/comedi/drivers/cb_pcidio.c +++ b/drivers/staging/comedi/drivers/cb_pcidio.c @@ -283,17 +283,15 @@ static int pcidio_detach(struct comedi_device *dev) printk("comedi%d: cb_pcidio: remove\n", dev->minor); if (devpriv) { if (devpriv->pci_dev) { - if (devpriv->dio_reg_base) { + if (devpriv->dio_reg_base) comedi_pci_disable(devpriv->pci_dev); - } pci_dev_put(devpriv->pci_dev); } } if (dev->subdevices) { int i; - for (i = 0; i < thisboard->n_8255; i++) { + for (i = 0; i < thisboard->n_8255; i++) subdev_8255_cleanup(dev, dev->subdevices + i); - } } return 0; } From 7c2f1946a5d41da3cfc1696944aaa420db5b5145 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 26 Feb 2010 10:15:02 +0100 Subject: [PATCH 336/367] Staging: comedi: cb_pcimdas.c: Checkpatch cleanup WARNING: braces {} are not necessary for any arm of this statement + if (thisboard->has_dio) { [...] + } else { [...] WARNING: braces {} are not necessary for single statement blocks + if (devpriv->BADR0) { + comedi_pci_disable(devpriv->pci_dev); + } Signed-off-by: Andrea Gelmini Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/cb_pcimdas.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/cb_pcimdas.c b/drivers/staging/comedi/drivers/cb_pcimdas.c index cbbca05acb96..2e61727fc9a0 100644 --- a/drivers/staging/comedi/drivers/cb_pcimdas.c +++ b/drivers/staging/comedi/drivers/cb_pcimdas.c @@ -330,11 +330,10 @@ found: s = dev->subdevices + 2; /* digital i/o subdevice */ - if (thisboard->has_dio) { + if (thisboard->has_dio) subdev_8255_init(dev, s, NULL, devpriv->BADR4); - } else { + else s->type = COMEDI_SUBD_UNUSED; - } printk("attached\n"); @@ -365,9 +364,8 @@ static int cb_pcimdas_detach(struct comedi_device *dev) free_irq(dev->irq, dev); if (devpriv) { if (devpriv->pci_dev) { - if (devpriv->BADR0) { + if (devpriv->BADR0) comedi_pci_disable(devpriv->pci_dev); - } pci_dev_put(devpriv->pci_dev); } } From f1c54e82726fe51a55a18d15dc9377b8fd568ca2 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 26 Feb 2010 10:15:03 +0100 Subject: [PATCH 337/367] Staging: comedi: cb_pcimdda.c: Checkpatch cleanup WARNING: braces {} are not necessary for any arm of this statement + if (it->options[2]) { [...] + } else { [...] WARNING: braces {} are not necessary for single statement blocks + if (devpriv->registers) { + comedi_pci_disable(devpriv->pci_dev); + } Signed-off-by: Andrea Gelmini Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/cb_pcimdda.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/cb_pcimdda.c b/drivers/staging/comedi/drivers/cb_pcimdda.c index 980fa0aacf92..e32a31763d50 100644 --- a/drivers/staging/comedi/drivers/cb_pcimdda.c +++ b/drivers/staging/comedi/drivers/cb_pcimdda.c @@ -284,11 +284,10 @@ static int attach(struct comedi_device *dev, struct comedi_devconfig *it) s->n_chan = thisboard->ao_chans; s->maxdata = figure_out_maxdata(thisboard->ao_bits); /* this is hard-coded here */ - if (it->options[2]) { + if (it->options[2]) s->range_table = &range_bipolar10; - } else { + else s->range_table = &range_bipolar5; - } s->insn_write = &ao_winsn; s->insn_read = &ao_rinsn; @@ -337,9 +336,8 @@ static int detach(struct comedi_device *dev) } if (devpriv->pci_dev) { - if (devpriv->registers) { + if (devpriv->registers) comedi_pci_disable(devpriv->pci_dev); - } pci_dev_put(devpriv->pci_dev); } From 426054ce11ecb416048aa0f92628fa4ba93c3a0e Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 26 Feb 2010 10:15:04 +0100 Subject: [PATCH 338/367] Staging: comedi: contec_pci_dio.c: Checkpatch cleanup WARNING: braces {} are not necessary for single statement blocks + if (dev->iobase) { + comedi_pci_disable(devpriv->pci_dev); + } Signed-off-by: Andrea Gelmini Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/contec_pci_dio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/contec_pci_dio.c b/drivers/staging/comedi/drivers/contec_pci_dio.c index b16d652f7763..9511814e6413 100644 --- a/drivers/staging/comedi/drivers/contec_pci_dio.c +++ b/drivers/staging/comedi/drivers/contec_pci_dio.c @@ -173,9 +173,8 @@ static int contec_detach(struct comedi_device *dev) printk("comedi%d: contec: remove\n", dev->minor); if (devpriv && devpriv->pci_dev) { - if (dev->iobase) { + if (dev->iobase) comedi_pci_disable(devpriv->pci_dev); - } pci_dev_put(devpriv->pci_dev); } From d539047c7bb3d462b4b505accbb3cc31dce87801 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 26 Feb 2010 10:15:05 +0100 Subject: [PATCH 339/367] Staging: comedi: das08_cs.c: Checkpatch cleanup ERROR: code indent should use tabs where possible + NONE$ ERROR: do not initialise statics to 0 or NULL +static struct pcmcia_device *cur_dev = NULL; Signed-off-by: Andrea Gelmini Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das08_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/das08_cs.c b/drivers/staging/comedi/drivers/das08_cs.c index 9b945e5fdd32..f12ef1cd6f53 100644 --- a/drivers/staging/comedi/drivers/das08_cs.c +++ b/drivers/staging/comedi/drivers/das08_cs.c @@ -34,7 +34,7 @@ This is the PCMCIA-specific support split off from the das08 driver. Options (for pcm-das08): - NONE + NONE Command support does not exist, but could be added for this board. */ @@ -52,7 +52,7 @@ Command support does not exist, but could be added for this board. #include #include -static struct pcmcia_device *cur_dev = NULL; +static struct pcmcia_device *cur_dev; #define thisboard ((const struct das08_board_struct *)dev->board_ptr) From dd105f08c0e9d4081629f96b09abadc0bb51e0d8 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 26 Feb 2010 10:15:06 +0100 Subject: [PATCH 340/367] Staging: comedi: hwdrv_apci3120.c: Checkpatch cleanup ERROR: do not initialise statics to 0 or NULL +static unsigned int ui_Temp = 0; WARNING: braces {} are not necessary for any arm of this statement + if (data[1]) { [...] + } else [...] WARNING: braces {} are not necessary for single statement blocks + for (i = 0; i < devpriv->ui_AiNbrofChannels; i++) { + devpriv->ui_AiChannelList[i] = data[4 + i]; + } ERROR: that open brace { should be on the previous line + } else /* EOC */ + { WARNING: braces {} are not necessary for any arm of this statement + if (data[1]) { [...] + } else { [...] ERROR: that open brace { should be on the previous line + if (insn->unused[0] == 222) /* second insn read */ + { WARNING: braces {} are not necessary for single statement blocks + for (i = 0; i < insn->n; i++) { + data[i] = devpriv->ui_AiReadData[i]; + } WARNING: braces {} are not necessary for single statement blocks + if (cmd->start_src != TRIG_NOW && cmd->start_src != TRIG_EXT) { + err++; + } ERROR: that open brace { should be on the previous line + if (cmd->scan_begin_src == TRIG_TIMER) /* Test Delay timing */ + { ERROR: that open brace { should be on the previous line + if (cmd->convert_src == TRIG_TIMER) /* Test Acquisition timing */ + { WARNING: braces {} are not necessary for any arm of this statement + if (cmd->stop_src == TRIG_COUNT) { [...] + } else { [...] WARNING: braces {} are not necessary for single statement blocks + if (devpriv->b_ExttrigEnable == APCI3120_ENABLE) { + i_APCI3120_ExttrigEnable(dev); /* activate EXT trigger */ + } WARNING: braces {} are not necessary for single statement blocks + if (dmalen0 > (devpriv->ui_AiDataLength)) { + dmalen0 = devpriv->ui_AiDataLength; + } WARNING: braces {} are not necessary for single statement blocks + if (dmalen1 > (devpriv->ui_AiDataLength)) { + dmalen1 = devpriv->ui_AiDataLength; + } WARNING: braces {} are not necessary for any arm of this statement + if (CR_RANGE(chanlist[i]) < APCI3120_BIPOLAR_RANGES) { [...] + } else { [...] ERROR: that open brace { should be on the previous line + if (devpriv->b_EocEosInterrupt == APCI3120_ENABLE) /* enable this in without DMA ??? */ + { ERROR: that open brace { should be on the previous line + if (data[0] == APCI3120_TIMER) /* initialize timer */ + { ERROR: that open brace { should be on the previous line + } else /* Initialize Watch dog */ + { ERROR: that open brace { should be on the previous line + if (data[0] == 2) /* write new value */ + { ERROR: that open brace { should be on the previous line + if (devpriv->b_Timer2Mode == APCI3120_TIMER) /* start timer */ + { ERROR: that open brace { should be on the previous line + } else /* start watch dog */ + { ERROR: that open brace { should be on the previous line + if (devpriv->b_Timer2Mode == APCI3120_TIMER) /* start timer */ + { ERROR: that open brace { should be on the previous line + } else /* Read watch dog status */ + { WARNING: braces {} are not necessary for single statement blocks + if (!devpriv->b_OutputMemoryStatus) { + ui_Temp = 0; + + } /* if(!devpriv->b_OutputMemoryStatus ) */ ERROR: code indent should use tabs where possible + data[0] Value to be written$ ERROR: code indent should use tabs where possible + data[1] :1 Set digital o/p ON$ ERROR: code indent should use tabs where possible + data[1] 2 Set digital o/p OFF with memory ON$ ERROR: that open brace { should be on the previous line + if (ui_Range) /* if 1 then unipolar */ + { ERROR: that open brace { should be on the previous line + } else /* if 0 then bipolar */ + { ERROR: that open brace { should be on the previous line + do /* Waiting of DA_READY BIT */ + { Signed-off-by: Andrea Gelmini Signed-off-by: Greg Kroah-Hartman --- .../comedi/drivers/addi-data/hwdrv_apci3120.c | 119 +++++++----------- 1 file changed, 46 insertions(+), 73 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c index 07123fd766a3..f93ddd4eb06c 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c @@ -45,7 +45,7 @@ You should also find the complete GPL in the COPYING file accompanying this sour */ #include "hwdrv_apci3120.h" -static unsigned int ui_Temp = 0; +static unsigned int ui_Temp; /* FUNCTION DEFINITIONS */ @@ -98,25 +98,22 @@ int i_APCI3120_InsnConfigAnalogInput(struct comedi_device *dev, struct comedi_su devpriv->b_InterruptMode = APCI3120_EOS_MODE; - if (data[1]) { + if (data[1]) devpriv->b_EocEosInterrupt = APCI3120_ENABLE; - } else + else devpriv->b_EocEosInterrupt = APCI3120_DISABLE; /* Copy channel list and Range List to devpriv */ devpriv->ui_AiNbrofChannels = data[3]; - for (i = 0; i < devpriv->ui_AiNbrofChannels; i++) { + for (i = 0; i < devpriv->ui_AiNbrofChannels; i++) devpriv->ui_AiChannelList[i] = data[4 + i]; - } - } else /* EOC */ - { + } else { /* EOC */ devpriv->b_InterruptMode = APCI3120_EOC_MODE; - if (data[1]) { + if (data[1]) devpriv->b_EocEosInterrupt = APCI3120_ENABLE; - } else { + else devpriv->b_EocEosInterrupt = APCI3120_DISABLE; - } } return insn->n; @@ -166,13 +163,9 @@ int i_APCI3120_InsnReadAnalogInput(struct comedi_device *dev, struct comedi_subd devpriv->us_OutputRegister = 0; /* devpriv->b_DigitalOutputRegister=0; */ - if (insn->unused[0] == 222) /* second insn read */ - { - - for (i = 0; i < insn->n; i++) { + if (insn->unused[0] == 222) { /* second insn read */ + for (i = 0; i < insn->n; i++) data[i] = devpriv->ui_AiReadData[i]; - } - } else { devpriv->tsk_Current = current; /* Save the current process task structure */ /* @@ -519,9 +512,8 @@ int i_APCI3120_CommandTestAnalogInput(struct comedi_device *dev, struct comedi_s /* step 2: make sure trigger sources are unique and mutually compatible */ - if (cmd->start_src != TRIG_NOW && cmd->start_src != TRIG_EXT) { + if (cmd->start_src != TRIG_NOW && cmd->start_src != TRIG_EXT) err++; - } if (cmd->scan_begin_src != TRIG_TIMER && cmd->scan_begin_src != TRIG_FOLLOW) @@ -548,16 +540,14 @@ int i_APCI3120_CommandTestAnalogInput(struct comedi_device *dev, struct comedi_s err++; } - if (cmd->scan_begin_src == TRIG_TIMER) /* Test Delay timing */ - { + if (cmd->scan_begin_src == TRIG_TIMER) { /* Test Delay timing */ if (cmd->scan_begin_arg < this_board->ui_MinDelaytimeNs) { cmd->scan_begin_arg = this_board->ui_MinDelaytimeNs; err++; } } - if (cmd->convert_src == TRIG_TIMER) /* Test Acquisition timing */ - { + if (cmd->convert_src == TRIG_TIMER) { /* Test Acquisition timing */ if (cmd->scan_begin_src == TRIG_TIMER) { if ((cmd->convert_arg) && (cmd->convert_arg < @@ -653,11 +643,10 @@ int i_APCI3120_CommandAnalogInput(struct comedi_device *dev, struct comedi_subde /* UPDATE-0.7.57->0.7.68devpriv->ui_AiDataLength=s->async->data_len; */ devpriv->ui_AiDataLength = s->async->prealloc_bufsz; - if (cmd->stop_src == TRIG_COUNT) { + if (cmd->stop_src == TRIG_COUNT) devpriv->ui_AiNbrofScans = cmd->stop_arg; - } else { + else devpriv->ui_AiNbrofScans = 0; - } devpriv->ui_AiTimer0 = 0; /* variables changed to timer0,timer1 */ devpriv->ui_AiTimer1 = 0; @@ -849,9 +838,8 @@ int i_APCI3120_CyclicAnalogInput(int mode, struct comedi_device *dev, } /*** EL241003 End ******************************************************************************/ - if (devpriv->b_ExttrigEnable == APCI3120_ENABLE) { + if (devpriv->b_ExttrigEnable == APCI3120_ENABLE) i_APCI3120_ExttrigEnable(dev); /* activate EXT trigger */ - } switch (mode) { case 1: /* init timer0 in mode 2 */ @@ -1049,12 +1037,10 @@ int i_APCI3120_CyclicAnalogInput(int mode, struct comedi_device *dev, dmalen1 = 4; } } else { /* isn't output buff smaller that our DMA buff? */ - if (dmalen0 > (devpriv->ui_AiDataLength)) { + if (dmalen0 > (devpriv->ui_AiDataLength)) dmalen0 = devpriv->ui_AiDataLength; - } - if (dmalen1 > (devpriv->ui_AiDataLength)) { + if (dmalen1 > (devpriv->ui_AiDataLength)) dmalen1 = devpriv->ui_AiDataLength; - } } devpriv->ui_DmaBufferUsesize[0] = dmalen0; devpriv->ui_DmaBufferUsesize[1] = dmalen1; @@ -1356,11 +1342,10 @@ int i_APCI3120_SetupChannelList(struct comedi_device *dev, struct comedi_subdevi /* store range list to card */ us_TmpValue = CR_CHAN(chanlist[i]); /* get channel number; */ - if (CR_RANGE(chanlist[i]) < APCI3120_BIPOLAR_RANGES) { + if (CR_RANGE(chanlist[i]) < APCI3120_BIPOLAR_RANGES) us_TmpValue &= ((~APCI3120_UNIPOLAR) & 0xff); /* set bipolar */ - } else { + else us_TmpValue |= APCI3120_UNIPOLAR; /* enable unipolar...... */ - } gain = CR_RANGE(chanlist[i]); /* get gain number */ us_TmpValue |= ((gain & 0x03) << 4); /* <<4 for G0 and G1 bit in RAM */ @@ -1514,8 +1499,7 @@ void v_APCI3120_Interrupt(int irq, void *d) /* Check If EOS interrupt */ if ((int_daq & 0x2) && (devpriv->b_InterruptMode == APCI3120_EOS_MODE)) { - if (devpriv->b_EocEosInterrupt == APCI3120_ENABLE) /* enable this in without DMA ??? */ - { + if (devpriv->b_EocEosInterrupt == APCI3120_ENABLE) { /* enable this in without DMA ??? */ if (devpriv->b_AiCyclicAcquisition == APCI3120_ENABLE) { ui_Check = 0; @@ -1966,8 +1950,7 @@ int i_APCI3120_InsnConfigTimer(struct comedi_device *dev, struct comedi_subdevic APCI3120_DISABLE_EOS_INT; outb(devpriv->b_ModeSelectRegister, devpriv->iobase + APCI3120_WRITE_MODE_SELECT); - if (data[0] == APCI3120_TIMER) /* initialize timer */ - { + if (data[0] == APCI3120_TIMER) { /* initialize timer */ /* devpriv->b_ModeSelectRegister=devpriv->b_ModeSelectRegister | * APCI3120_ENABLE_TIMER_INT; */ @@ -2006,8 +1989,7 @@ int i_APCI3120_InsnConfigTimer(struct comedi_device *dev, struct comedi_subdevic /* timer2 in Timer mode enabled */ devpriv->b_Timer2Mode = APCI3120_TIMER; - } else /* Initialize Watch dog */ - { + } else { /* Initialize Watch dog */ /* Set the Timer 2 in mode 5(Watchdog) */ @@ -2092,8 +2074,7 @@ int i_APCI3120_InsnWriteTimer(struct comedi_device *dev, struct comedi_subdevice return -EINVAL; } - if (data[0] == 2) /* write new value */ - { + if (data[0] == 2) { /* write new value */ if (devpriv->b_Timer2Mode != APCI3120_TIMER) { comedi_error(dev, "write :timer2 not configured in TIMER MODE"); @@ -2113,13 +2094,11 @@ int i_APCI3120_InsnWriteTimer(struct comedi_device *dev, struct comedi_subdevice /* Reset FC_TIMER BIT */ inb(devpriv->iobase + APCI3120_TIMER_STATUS_REGISTER); - if (devpriv->b_Timer2Mode == APCI3120_TIMER) /* start timer */ - { + if (devpriv->b_Timer2Mode == APCI3120_TIMER) { /* start timer */ /* Enable Timer */ devpriv->b_ModeSelectRegister = devpriv->b_ModeSelectRegister & 0x0B; - } else /* start watch dog */ - { + } else { /* start watch dog */ /* Enable WatchDog */ devpriv->b_ModeSelectRegister = (devpriv-> @@ -2146,8 +2125,7 @@ int i_APCI3120_InsnWriteTimer(struct comedi_device *dev, struct comedi_subdevice outb(devpriv->b_ModeSelectRegister, devpriv->iobase + APCI3120_WRITE_MODE_SELECT); - if (devpriv->b_Timer2Mode == APCI3120_TIMER) /* start timer */ - { + if (devpriv->b_Timer2Mode == APCI3120_TIMER) { /* start timer */ /* For Timer mode is Gate2 must be activated **timer started */ devpriv->us_OutputRegister = devpriv-> @@ -2299,8 +2277,7 @@ int i_APCI3120_InsnReadTimer(struct comedi_device *dev, struct comedi_subdevice /* combining both words */ data[0] = (unsigned int) ((us_TmpValue) | ((us_TmpValue_2) << 16)); - } else /* Read watch dog status */ - { + } else { /* Read watch dog status */ us_StatusValue = inw(devpriv->iobase + APCI3120_RD_STATUS); us_StatusValue = @@ -2441,10 +2418,9 @@ int i_APCI3120_InsnConfigDigitalOutput(struct comedi_device *dev, devpriv->b_OutputMemoryStatus = APCI3120_DISABLE; devpriv->b_DigitalOutputRegister = 0; } - if (!devpriv->b_OutputMemoryStatus) { + if (!devpriv->b_OutputMemoryStatus) ui_Temp = 0; - - } /* if(!devpriv->b_OutputMemoryStatus ) */ + /* if(!devpriv->b_OutputMemoryStatus ) */ return insn->n; } @@ -2504,23 +2480,23 @@ int i_APCI3120_InsnBitsDigitalOutput(struct comedi_device *dev, /* +----------------------------------------------------------------------------+ -| Function name :int i_APCI3120_InsnWriteDigitalOutput(struct comedi_device *dev,| -|struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data) | -| | +| Function name :int i_APCI3120_InsnWriteDigitalOutput(struct comedi_device *dev,| +|struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data) | +| | +----------------------------------------------------------------------------+ -| Task : Write digiatl output | -| | +| Task : Write digiatl output | +| | +----------------------------------------------------------------------------+ -| Input Parameters : struct comedi_device *dev | -| struct comedi_subdevice *s | -| struct comedi_insn *insn | -| unsigned int *data | - data[0] Value to be written - data[1] :1 Set digital o/p ON - data[1] 2 Set digital o/p OFF with memory ON +| Input Parameters : struct comedi_device *dev | +| struct comedi_subdevice *s | +| struct comedi_insn *insn | +| unsigned int *data | + data[0] Value to be written + data[1] :1 Set digital o/p ON + data[1] 2 Set digital o/p OFF with memory ON +----------------------------------------------------------------------------+ -| Return Value : | -| | +| Return Value : | +| | +----------------------------------------------------------------------------+ */ @@ -2615,8 +2591,7 @@ int i_APCI3120_InsnWriteAnalogOutput(struct comedi_device *dev, ui_Channel = CR_CHAN(insn->chanspec); /* this_board->i_hwdrv_InsnWriteAnalogOutput(dev, ui_Range, ui_Channel,data[0]); */ - if (ui_Range) /* if 1 then unipolar */ - { + if (ui_Range) { /* if 1 then unipolar */ if (data[0] != 0) data[0] = @@ -2627,8 +2602,7 @@ int i_APCI3120_InsnWriteAnalogOutput(struct comedi_device *dev, ((((ui_Channel & 0x03) << 14) & 0xC000) | (1 << 13) | 8192); - } else /* if 0 then bipolar */ - { + } else { /* if 0 then bipolar */ data[0] = ((((ui_Channel & 0x03) << 14) & 0xC000) | (0 << 13) | data[0]); @@ -2639,8 +2613,7 @@ int i_APCI3120_InsnWriteAnalogOutput(struct comedi_device *dev, * out put n values at the given channel. printk("\nwaiting for * DA_READY BIT"); */ - do /* Waiting of DA_READY BIT */ - { + do { /* Waiting of DA_READY BIT */ us_TmpValue = ((unsigned short) inw(devpriv->iobase + APCI3120_RD_STATUS)) & 0x0001; From ecd89ddcabf8646651f152155bff5f8bed9c6e92 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 26 Feb 2010 10:15:07 +0100 Subject: [PATCH 341/367] Staging: comedi: das6402.c: Checkpatch cleanup ERROR: Macros with complex values should be enclosed in parenthesis +#define N_WORDS 3000*64 Signed-off-by: Andrea Gelmini Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das6402.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/das6402.c b/drivers/staging/comedi/drivers/das6402.c index 92487f58fd8b..a404a1831911 100644 --- a/drivers/staging/comedi/drivers/das6402.c +++ b/drivers/staging/comedi/drivers/das6402.c @@ -45,7 +45,7 @@ This driver has suffered bitrot. #define DAS6402_SIZE 16 -#define N_WORDS 3000*64 +#define N_WORDS (3000*64) #define STOP 0 #define START 1 From 882e5b32b5d68960f46331215fc3c301df508110 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 26 Feb 2010 10:15:08 +0100 Subject: [PATCH 342/367] Staging: comedi: cb_pcimdas.c: more Checkpatch cleanup WARNING: braces {} are not necessary for single statement blocks + if (fifo_empty) { + break; + } WARNING: braces {} are not necessary for single statement blocks + if (irq) { + printk(", irq %u", irq); + } Signed-off-by: Andrea Gelmini Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das800.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/das800.c b/drivers/staging/comedi/drivers/das800.c index ecb97cdbce26..aadc4971c909 100644 --- a/drivers/staging/comedi/drivers/das800.c +++ b/drivers/staging/comedi/drivers/das800.c @@ -399,9 +399,8 @@ static irqreturn_t das800_interrupt(int irq, void *d) } else { fifo_empty = 0; /* cio-das802/16 has no fifo empty status bit */ } - if (fifo_empty) { + if (fifo_empty) break; - } /* strip off extraneous bits for 12 bit cards */ if (thisboard->resolution == 12) dataPoint = (dataPoint >> 4) & 0xfff; @@ -457,9 +456,8 @@ static int das800_attach(struct comedi_device *dev, struct comedi_devconfig *it) int board; printk("comedi%d: das800: io 0x%lx", dev->minor, iobase); - if (irq) { + if (irq) printk(", irq %u", irq); - } printk("\n"); /* allocate and initialize dev->private */ From 20962c10c19862c58c03eec2434279a5d104c40e Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 26 Feb 2010 10:15:09 +0100 Subject: [PATCH 343/367] Staging: comedi: dmm32at.c: Checkpatch cleanup WARNING: braces {} are not necessary for any arm of this statement + if (data[0] == COMEDI_OUTPUT) { [...] + } else { [...] Signed-off-by: Andrea Gelmini Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dmm32at.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/dmm32at.c b/drivers/staging/comedi/drivers/dmm32at.c index 9db9a467c8f8..d5cbd515c370 100644 --- a/drivers/staging/comedi/drivers/dmm32at.c +++ b/drivers/staging/comedi/drivers/dmm32at.c @@ -1048,11 +1048,10 @@ static int dmm32at_dio_insn_config(struct comedi_device *dev, * value COMEDI_INPUT or COMEDI_OUTPUT. */ /* if output clear the bit, otherwise set it */ - if (data[0] == COMEDI_OUTPUT) { + if (data[0] == COMEDI_OUTPUT) devpriv->dio_config &= ~chanbit; - } else { + else devpriv->dio_config |= chanbit; - } /* get access to the DIO regs */ dmm_outb(dev, DMM32AT_CNTRL, DMM32AT_DIOACC); /* set the DIO's to the new configuration setting */ From fa93e19dcf8600c87a60160735b1065cd4bb4dbb Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 26 Feb 2010 10:15:10 +0100 Subject: [PATCH 344/367] Staging: comedi: dt2801.c: Checkpatch cleanup ERROR: code indent should use tabs where possible + 0 = [-10,10]$ ERROR: code indent should use tabs where possible + 0 = [-10,10]$ WARNING: braces {} are not necessary for single statement blocks + if (stat & (DT_S_COMPOSITE_ERROR | DT_S_READY)) { + return stat; + } WARNING: braces {} are not necessary for single statement blocks + if (stat & DT_S_COMPOSITE_ERROR) { + return stat; + } WARNING: braces {} are not necessary for single statement blocks + if (stat & DT_S_READY) { + return 0; + } WARNING: braces {} are not necessary for single statement blocks + if (stat & DT_S_COMPOSITE_ERROR) { + return stat; + } WARNING: braces {} are not necessary for single statement blocks + if (stat & DT_S_READY) { + return 0; + } WARNING: braces {} are not necessary for single statement blocks + if (!(stat & DT_S_READY)) { + printk("dt2801: !ready in dt2801_writecmd(), ignoring\n"); + } WARNING: braces {} are not necessary for single statement blocks + if (!timeout) { + printk("dt2801: timeout 1 status=0x%02x\n", stat); + } WARNING: braces {} are not necessary for single statement blocks + if (!timeout) { + printk("dt2801: timeout 2 status=0x%02x\n", stat); + } WARNING: braces {} are not necessary for any arm of this statement + if (stat == -ETIME) { [...] + } else { [...] Signed-off-by: Andrea Gelmini Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dt2801.c | 33 +++++++++---------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/drivers/staging/comedi/drivers/dt2801.c b/drivers/staging/comedi/drivers/dt2801.c index 7b9af5d755e0..3f365aee4822 100644 --- a/drivers/staging/comedi/drivers/dt2801.c +++ b/drivers/staging/comedi/drivers/dt2801.c @@ -18,10 +18,10 @@ Configuration options: [1] - unused [2] - A/D reference 0=differential, 1=single-ended [3] - A/D range - 0 = [-10,10] + 0 = [-10, 10] 1 = [0,10] [4] - D/A 0 range - 0 = [-10,10] + 0 = [-10, 10] 1 = [-5,5] 2 = [-2.5,2.5] 3 = [0,10] @@ -279,9 +279,8 @@ static int dt2801_readdata(struct comedi_device *dev, int *data) do { stat = inb_p(dev->iobase + DT2801_STATUS); - if (stat & (DT_S_COMPOSITE_ERROR | DT_S_READY)) { + if (stat & (DT_S_COMPOSITE_ERROR | DT_S_READY)) return stat; - } if (stat & DT_S_DATA_OUT_READY) { *data = inb_p(dev->iobase + DT2801_DATA); return 0; @@ -315,9 +314,8 @@ static int dt2801_writedata(struct comedi_device *dev, unsigned int data) do { stat = inb_p(dev->iobase + DT2801_STATUS); - if (stat & DT_S_COMPOSITE_ERROR) { + if (stat & DT_S_COMPOSITE_ERROR) return stat; - } if (!(stat & DT_S_DATA_IN_FULL)) { outb_p(data & 0xff, dev->iobase + DT2801_DATA); return 0; @@ -354,18 +352,15 @@ static int dt2801_wait_for_ready(struct comedi_device *dev) int stat; stat = inb_p(dev->iobase + DT2801_STATUS); - if (stat & DT_S_READY) { + if (stat & DT_S_READY) return 0; - } do { stat = inb_p(dev->iobase + DT2801_STATUS); - if (stat & DT_S_COMPOSITE_ERROR) { + if (stat & DT_S_COMPOSITE_ERROR) return stat; - } - if (stat & DT_S_READY) { + if (stat & DT_S_READY) return 0; - } } while (--timeout > 0); return -ETIME; @@ -382,9 +377,8 @@ static int dt2801_writecmd(struct comedi_device *dev, int command) printk ("dt2801: composite-error in dt2801_writecmd(), ignoring\n"); } - if (!(stat & DT_S_READY)) { + if (!(stat & DT_S_READY)) printk("dt2801: !ready in dt2801_writecmd(), ignoring\n"); - } outb_p(command, dev->iobase + DT2801_CMD); return 0; @@ -418,9 +412,8 @@ static int dt2801_reset(struct comedi_device *dev) if (stat & DT_S_READY) break; } while (timeout--); - if (!timeout) { + if (!timeout) printk("dt2801: timeout 1 status=0x%02x\n", stat); - } /* printk("dt2801: reading dummy\n"); */ /* dt2801_readdata(dev,&board_code); */ @@ -436,9 +429,8 @@ static int dt2801_reset(struct comedi_device *dev) if (stat & DT_S_READY) break; } while (timeout--); - if (!timeout) { + if (!timeout) printk("dt2801: timeout 2 status=0x%02x\n", stat); - } DPRINTK("dt2801: reading code\n"); dt2801_readdata(dev, &board_code); @@ -623,11 +615,10 @@ static int dt2801_detach(struct comedi_device *dev) static int dt2801_error(struct comedi_device *dev, int stat) { if (stat < 0) { - if (stat == -ETIME) { + if (stat == -ETIME) printk("dt2801: timeout\n"); - } else { + else printk("dt2801: error %d\n", stat); - } return stat; } printk("dt2801: error status 0x%02x, resetting...\n", stat); From a5a8695987b4c541f2003640d8583412b8c154ff Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 26 Feb 2010 10:15:11 +0100 Subject: [PATCH 345/367] Staging: arlan: arlan.h: Checkpatch cleanup ERROR: trailing whitespace + * Copyright (C) 1998 Elmer.Joandi@ut.ee, +37-255-13500^I$ WARNING: Use #include instead of +#include ERROR: do not use C99 // comments +//#define ARLAN_DEBUGGING 1 ERROR: "foo * bar" should be "foo *bar" +extern int arlan_command(struct net_device * dev, int command); ERROR: trailing whitespace + $ ERROR: trailing whitespace +#define IFDEBUG( L ) if ( (L) & arlan_debug ) $ ERROR: space prohibited after that open parenthesis '(' +#define IFDEBUG( L ) if ( (L) & arlan_debug ) ERROR: space prohibited before that close parenthesis ')' +#define IFDEBUG( L ) if ( (L) & arlan_debug ) ERROR: trailing whitespace +#define ARLAN_FAKE_HDR_LEN 12 $ ERROR: space required after that ',' (ctx:VxV) + #define ARLAN_DEBUG(a,b) printk(KERN_DEBUG a, b) ^ ERROR: trailing whitespace +^I#define ARLAN_DEBUG(a,b) $ ERROR: space required after that ',' (ctx:VxV) + #define ARLAN_DEBUG(a,b) ^ ERROR: open brace '{' following struct go on the same line +struct arlan_shmem +{ ERROR: trailing whitespace + /* Header Signature */ $ ERROR: trailing whitespace + $ ERROR: trailing whitespace + $ ERROR: trailing whitespace + $ ERROR: trailing whitespace + $ ERROR: trailing whitespace + int systemId; $ ERROR: open brace '{' following struct go on the same line +struct TxParam +{ ERROR: "foo * bar" should be "foo *bar" + struct arlan_shmem __iomem * card; ERROR: "foo * bar" should be "foo *bar" + struct arlan_shmem * conf; ERROR: trailing whitespace + struct arlan_conf_stru * Conf;^I $ ERROR: "foo * bar" should be "foo *bar" + struct arlan_conf_stru * Conf; ERROR: trailing whitespace + $ ERROR: space required after that ',' (ctx:VxV) +#define READSHM(to,from,atype) {\ ^ ERROR: space required after that ',' (ctx:VxV) +#define READSHM(to,from,atype) {\ ^ ERROR: space required after that ',' (ctx:VxO) + memcpy_fromio(&(tmp),&(from),sizeof(atype));\ ^ ERROR: space required before that '&' (ctx:OxV) + memcpy_fromio(&(tmp),&(from),sizeof(atype));\ ^ ERROR: space required after that ',' (ctx:VxV) + memcpy_fromio(&(tmp),&(from),sizeof(atype));\ ^ ERROR: space required after that ',' (ctx:VxV) +#define READSHMEM(from,atype)\ ^ ERROR: space required after that ',' (ctx:VxV) +#define WRITESHM(to,from,atype) \ ^ ERROR: space required after that ',' (ctx:VxV) +#define WRITESHM(to,from,atype) \ ^ ERROR: space required after that ',' (ctx:VxO) + memcpy_toio(&(to),&tmpSHM,sizeof(atype));\ ^ ERROR: space required before that '&' (ctx:OxV) + memcpy_toio(&(to),&tmpSHM,sizeof(atype));\ ^ ERROR: space required after that ',' (ctx:VxV) + memcpy_toio(&(to),&tmpSHM,sizeof(atype));\ ^ ERROR: space required after that ',' (ctx:VxV) +#define DEBUGSHM(levelSHM,stringSHM,stuff,atype) \ ^ ERROR: space required after that ',' (ctx:VxV) +#define DEBUGSHM(levelSHM,stringSHM,stuff,atype) \ ^ ERROR: space required after that ',' (ctx:VxV) +#define DEBUGSHM(levelSHM,stringSHM,stuff,atype) \ ^ ERROR: space required after that ',' (ctx:VxO) + memcpy_fromio(&tmpSHM,&(stuff),sizeof(atype));\ ^ ERROR: space required before that '&' (ctx:OxV) + memcpy_fromio(&tmpSHM,&(stuff),sizeof(atype));\ ^ ERROR: space required after that ',' (ctx:VxV) + memcpy_fromio(&tmpSHM,&(stuff),sizeof(atype));\ ^ ERROR: space required after that ',' (ctx:VxV) + IFDEBUG(levelSHM) printk(stringSHM,tmpSHM);\ ^ ERROR: space required after that ',' (ctx:VxO) + writeb(val,&(to)) ^ ERROR: space required before that '&' (ctx:OxV) + writeb(val,&(to)) ^ ERROR: space required after that ',' (ctx:VxO) + writew(val,&(to)) ^ ERROR: space required before that '&' (ctx:OxV) + writew(val,&(to)) ^ ERROR: space required after that ',' (ctx:VxO) + writel(val,&(to)) ^ ERROR: space required before that '&' (ctx:OxV) + writel(val,&(to)) ^ ERROR: space prohibited after that open parenthesis '(' + ( ( READSHMB(((struct arlan_private *)netdev_priv(dev))->card->registrationMode) > 0) && \ ERROR: space prohibited after that open parenthesis '(' + ( READSHMB(((struct arlan_private *)netdev_priv(dev))->card->registrationStatus) == 0) ) ERROR: space prohibited before that close parenthesis ')' + ( READSHMB(((struct arlan_private *)netdev_priv(dev))->card->registrationStatus) == 0) ) ERROR: code indent should use tabs where possible + ^IREADSHMB(((struct arlan_private *)netdev_priv(dev))->card->cntrlRegImage)$ ERROR: space required before the open brace '{' +#define writeControlRegister(dev, v){\ ERROR: space required after that ',' (ctx:WxV) + WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->cntrlRegImage ,((v) &0xF) );\ ^ ERROR: need consistent spacing around '&' (ctx:WxV) + WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->cntrlRegImage ,((v) &0xF) );\ ^ ERROR: space prohibited before that close parenthesis ')' + WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->cntrlRegImage ,((v) &0xF) );\ ERROR: space required after that ',' (ctx:WxV) + WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->controlRegister ,(v) );} ^ ERROR: space required after that ';' (ctx:VxV) + WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->controlRegister ,(v) );} ^ ERROR: space prohibited before that close parenthesis ')' + WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->controlRegister ,(v) );} WARNING: suspect code indent for conditional statements (3, 6) + if (cr & ARLAN_CHANNEL_ATTENTION){ \ + writeControlRegister(dev, (cr & ~ARLAN_CHANNEL_ATTENTION));\ ERROR: space required before the open brace '{' + if (cr & ARLAN_CHANNEL_ATTENTION){ \ ERROR: space required after that close brace '}' + }else \ ERROR: space required before the open brace '{' +#define clearChannelAttention(dev){ \ ERROR: space required after that ',' (ctx:VxV) + writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_CHANNEL_ATTENTION);} ^ ERROR: space required after that ';' (ctx:VxV) + writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_CHANNEL_ATTENTION);} ^ ERROR: space required after that ',' (ctx:VxV) + writeControlRegister(dev,readControlRegister(dev) | ARLAN_RESET);} ^ ERROR: space required after that ';' (ctx:VxV) + writeControlRegister(dev,readControlRegister(dev) | ARLAN_RESET);} ^ ERROR: space required after that ',' (ctx:VxV) + writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_RESET);} ^ ERROR: space required after that ';' (ctx:VxV) + writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_RESET);} ^ ERROR: space required before the open brace '{' +#define setInterruptEnable(dev){\ ERROR: space required after that ',' (ctx:VxV) + writeControlRegister(dev,readControlRegister(dev) | ARLAN_INTERRUPT_ENABLE) ;} ^ ERROR: space required after that ';' (ctx:WxV) + writeControlRegister(dev,readControlRegister(dev) | ARLAN_INTERRUPT_ENABLE) ;} ^ ERROR: space required before the open brace '{' +#define clearInterruptEnable(dev){\ ERROR: space required after that ',' (ctx:VxV) + writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_INTERRUPT_ENABLE) ;} ^ ERROR: space required after that ';' (ctx:WxV) + writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_INTERRUPT_ENABLE) ;} ^ ERROR: space required before the open brace '{' +#define setClearInterrupt(dev){\ ERROR: space required after that ',' (ctx:VxV) + writeControlRegister(dev,readControlRegister(dev) | ARLAN_CLEAR_INTERRUPT) ;} ^ ERROR: space required after that ';' (ctx:WxV) + writeControlRegister(dev,readControlRegister(dev) | ARLAN_CLEAR_INTERRUPT) ;} ^ ERROR: space required before the open brace '{' +#define clearClearInterrupt(dev){\ ERROR: space required after that ',' (ctx:VxV) + writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_CLEAR_INTERRUPT);} ^ ERROR: space required after that ';' (ctx:VxV) + writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_CLEAR_INTERRUPT);} ^ ERROR: space required before the open brace '{' +#define setPowerOff(dev){\ ERROR: space required after that ',' (ctx:VxV) + writeControlRegister(dev,readControlRegister(dev) | (ARLAN_POWER && ARLAN_ACCESS));\ ^ ERROR: space required after that ',' (ctx:VxV) + writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_ACCESS);} ^ ERROR: space required after that ';' (ctx:VxV) + writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_ACCESS);} ^ ERROR: space required before the open brace '{' +#define setPowerOn(dev){\ ERROR: space required after that ',' (ctx:VxV) + writeControlRegister(dev,readControlRegister(dev) & ~(ARLAN_POWER)); } ^ ERROR: space required before the open brace '{' +#define arlan_lock_card_access(dev){\ ERROR: space required after that ',' (ctx:VxV) + writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_ACCESS);} ^ ERROR: space required after that ';' (ctx:VxV) + writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_ACCESS);} ^ ERROR: space required before the open brace '{' +#define arlan_unlock_card_access(dev){\ ERROR: trailing whitespace + writeControlRegister(dev,readControlRegister(dev) | ARLAN_ACCESS ); } $ ERROR: space required after that ',' (ctx:VxV) + writeControlRegister(dev,readControlRegister(dev) | ARLAN_ACCESS ); } ^ ERROR: space prohibited before that close parenthesis ')' + writeControlRegister(dev,readControlRegister(dev) | ARLAN_ACCESS ); } ERROR: trailing whitespace + $ ERROR: trailing whitespace + $ Signed-off-by: Andrea Gelmini Signed-off-by: Greg Kroah-Hartman --- drivers/staging/arlan/arlan.h | 132 +++++++++++++++++----------------- 1 file changed, 64 insertions(+), 68 deletions(-) diff --git a/drivers/staging/arlan/arlan.h b/drivers/staging/arlan/arlan.h index fb3ad51a1caf..19161f1feb5b 100644 --- a/drivers/staging/arlan/arlan.h +++ b/drivers/staging/arlan/arlan.h @@ -1,6 +1,6 @@ /* * Copyright (C) 1997 Cullen Jennings - * Copyright (C) 1998 Elmer.Joandi@ut.ee, +37-255-13500 + * Copyright (C) 1998 Elmer.Joandi@ut.ee, +37-255-13500 * GNU General Public License applies */ @@ -20,14 +20,14 @@ #include #include #include -#include +#include #include #include #include #include -//#define ARLAN_DEBUGGING 1 +/* #define ARLAN_DEBUGGING 1 */ #define ARLAN_PROC_INTERFACE #define MAX_ARLANS 4 /* not more than 4 ! */ @@ -51,8 +51,8 @@ extern int arlan_debug; extern int arlan_entry_debug; extern int arlan_exit_debug; extern int testMemory; -extern int arlan_command(struct net_device * dev, int command); - +extern int arlan_command(struct net_device *dev, int command); + #define SIDUNKNOWN -1 #define radioNodeIdUNKNOWN -1 #define irqUNKNOWN 0 @@ -65,22 +65,21 @@ extern int arlan_command(struct net_device * dev, int command); #define registrationModeUNKNOWN -1 -#define IFDEBUG( L ) if ( (L) & arlan_debug ) -#define ARLAN_FAKE_HDR_LEN 12 +#define IFDEBUG(L) if ((L) & arlan_debug) +#define ARLAN_FAKE_HDR_LEN 12 #ifdef ARLAN_DEBUGGING #define DEBUG 1 #define ARLAN_ENTRY_EXIT_DEBUGGING 1 - #define ARLAN_DEBUG(a,b) printk(KERN_DEBUG a, b) + #define ARLAN_DEBUG(a, b) printk(KERN_DEBUG a, b) #else - #define ARLAN_DEBUG(a,b) + #define ARLAN_DEBUG(a, b) #endif #define ARLAN_SHMEM_SIZE 0x2000 -struct arlan_shmem -{ - /* Header Signature */ +struct arlan_shmem { + /* Header Signature */ volatile char textRegion[48]; volatile u_char resetFlag; volatile u_char diagnosticInfo; @@ -94,7 +93,7 @@ struct arlan_shmem volatile u_char radioModule;// shows EEPROM, can be overridden at 0x111 volatile u_char defaultChannelSet; // shows EEProm, can be overriiden at 0x10A volatile u_char _2[47]; - + /* Control/Status Block - 0x0080 */ volatile u_char interruptInProgress; /* not used by lancpu */ volatile u_char cntrlRegImage; /* not used by lancpu */ @@ -113,7 +112,7 @@ struct arlan_shmem volatile u_char rxQuality; volatile u_char scrambled; volatile u_char _4[1]; - + /* Transmit Status - 0x00b0 */ volatile u_char txStatus; volatile u_char txAckQuality; @@ -151,7 +150,7 @@ struct arlan_shmem volatile u_short routerId; volatile u_char _10[9]; volatile u_char txAttenuation; - volatile u_char systemId[4]; + volatile u_char systemId[4]; volatile u_short globalChecksum; volatile u_char _11[4]; volatile u_short maxDatagramSize; @@ -207,19 +206,19 @@ struct arlan_shmem volatile u_char hostcpuLock; volatile u_char lancpuLock; volatile u_char resetTime[18]; - + volatile u_char numDatagramsTransmitted[4]; volatile u_char numReTransmissions[4]; volatile u_char numFramesDiscarded[4]; volatile u_char numDatagramsReceived[4]; volatile u_char numDuplicateReceivedFrames[4]; volatile u_char numDatagramsDiscarded[4]; - + volatile u_short maxNumReTransmitDatagram; volatile u_short maxNumReTransmitFrames; volatile u_short maxNumConsecutiveDuplicateFrames; /* misaligned here so we have to go to characters */ - + volatile u_char numBytesTransmitted[4]; volatile u_char numBytesReceived[4]; volatile u_char numCRCErrors[4]; @@ -259,7 +258,7 @@ struct arlan_conf_stru { int channelNumber; int scramblingDisable; int txAttenuation; - int systemId; + int systemId; int maxDatagramSize; int maxFrameSize; int maxRetries; @@ -316,8 +315,7 @@ struct arlan_conf_stru { extern struct arlan_conf_stru arlan_conf[MAX_ARLANS]; -struct TxParam -{ +struct TxParam { volatile short offset; volatile short length; volatile u_char dest[6]; @@ -330,12 +328,12 @@ struct TxParam #define TX_RING_SIZE 2 /* Information that need to be kept for each board. */ struct arlan_private { - struct arlan_shmem __iomem * card; - struct arlan_shmem * conf; + struct arlan_shmem __iomem *card; + struct arlan_shmem *conf; - struct arlan_conf_stru * Conf; + struct arlan_conf_stru *Conf; int bad; - int reset; + int reset; unsigned long lastReset; struct timer_list timer; struct timer_list tx_delay_timer; @@ -407,38 +405,38 @@ struct arlan_private { #define TXBuffStart(dev) offsetof(struct arlan_shmem, txBuffer) #define TXBuffEnd(dev) offsetof(struct arlan_shmem, xxBuffer) - -#define READSHM(to,from,atype) {\ + +#define READSHM(to, from, atype) {\ atype tmp;\ - memcpy_fromio(&(tmp),&(from),sizeof(atype));\ + memcpy_fromio(&(tmp), &(from), sizeof(atype));\ to = tmp;\ } -#define READSHMEM(from,atype)\ +#define READSHMEM(from, atype)\ atype from; \ READSHM(from, arlan->from, atype); -#define WRITESHM(to,from,atype) \ +#define WRITESHM(to, from, atype) \ { atype tmpSHM = from;\ - memcpy_toio(&(to),&tmpSHM,sizeof(atype));\ + memcpy_toio(&(to), &tmpSHM, sizeof(atype));\ } -#define DEBUGSHM(levelSHM,stringSHM,stuff,atype) \ +#define DEBUGSHM(levelSHM, stringSHM, stuff, atype) \ { atype tmpSHM; \ - memcpy_fromio(&tmpSHM,&(stuff),sizeof(atype));\ - IFDEBUG(levelSHM) printk(stringSHM,tmpSHM);\ + memcpy_fromio(&tmpSHM, &(stuff), sizeof(atype));\ + IFDEBUG(levelSHM) printk(stringSHM, tmpSHM);\ } #define WRITESHMB(to, val) \ - writeb(val,&(to)) + writeb(val, &(to)) #define READSHMB(to) \ readb(&(to)) #define WRITESHMS(to, val) \ - writew(val,&(to)) + writew(val, &(to)) #define READSHMS(to) \ readw(&(to)) #define WRITESHMI(to, val) \ - writel(val,&(to)) + writel(val, &(to)) #define READSHMI(to) \ readl(&(to)) @@ -447,51 +445,51 @@ struct arlan_private { #define registrationBad(dev)\ - ( ( READSHMB(((struct arlan_private *)netdev_priv(dev))->card->registrationMode) > 0) && \ - ( READSHMB(((struct arlan_private *)netdev_priv(dev))->card->registrationStatus) == 0) ) + (( READSHMB(((struct arlan_private *)netdev_priv(dev))->card->registrationMode) > 0) && \ + ( READSHMB(((struct arlan_private *)netdev_priv(dev))->card->registrationStatus) == 0)) #define readControlRegister(dev)\ - READSHMB(((struct arlan_private *)netdev_priv(dev))->card->cntrlRegImage) + READSHMB(((struct arlan_private *)netdev_priv(dev))->card->cntrlRegImage) -#define writeControlRegister(dev, v){\ - WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->cntrlRegImage ,((v) &0xF) );\ - WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->controlRegister ,(v) );} +#define writeControlRegister(dev, v) {\ + WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->cntrlRegImage, ((v) & 0xF));\ + WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->controlRegister, (v)); } #define arlan_interrupt_lancpu(dev) {\ int cr; \ \ cr = readControlRegister(dev);\ - if (cr & ARLAN_CHANNEL_ATTENTION){ \ + if (cr & ARLAN_CHANNEL_ATTENTION) { \ writeControlRegister(dev, (cr & ~ARLAN_CHANNEL_ATTENTION));\ - }else \ + } else \ writeControlRegister(dev, (cr | ARLAN_CHANNEL_ATTENTION));\ } -#define clearChannelAttention(dev){ \ - writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_CHANNEL_ATTENTION);} +#define clearChannelAttention(dev) { \ + writeControlRegister(dev, readControlRegister(dev) & ~ARLAN_CHANNEL_ATTENTION); } #define setHardwareReset(dev) {\ - writeControlRegister(dev,readControlRegister(dev) | ARLAN_RESET);} + writeControlRegister(dev, readControlRegister(dev) | ARLAN_RESET); } #define clearHardwareReset(dev) {\ - writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_RESET);} -#define setInterruptEnable(dev){\ - writeControlRegister(dev,readControlRegister(dev) | ARLAN_INTERRUPT_ENABLE) ;} -#define clearInterruptEnable(dev){\ - writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_INTERRUPT_ENABLE) ;} -#define setClearInterrupt(dev){\ - writeControlRegister(dev,readControlRegister(dev) | ARLAN_CLEAR_INTERRUPT) ;} -#define clearClearInterrupt(dev){\ - writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_CLEAR_INTERRUPT);} -#define setPowerOff(dev){\ - writeControlRegister(dev,readControlRegister(dev) | (ARLAN_POWER && ARLAN_ACCESS));\ - writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_ACCESS);} -#define setPowerOn(dev){\ - writeControlRegister(dev,readControlRegister(dev) & ~(ARLAN_POWER)); } -#define arlan_lock_card_access(dev){\ - writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_ACCESS);} -#define arlan_unlock_card_access(dev){\ - writeControlRegister(dev,readControlRegister(dev) | ARLAN_ACCESS ); } + writeControlRegister(dev, readControlRegister(dev) & ~ARLAN_RESET); } +#define setInterruptEnable(dev) {\ + writeControlRegister(dev, readControlRegister(dev) | ARLAN_INTERRUPT_ENABLE) ; } +#define clearInterruptEnable(dev) {\ + writeControlRegister(dev, readControlRegister(dev) & ~ARLAN_INTERRUPT_ENABLE) ; } +#define setClearInterrupt(dev) {\ + writeControlRegister(dev, readControlRegister(dev) | ARLAN_CLEAR_INTERRUPT) ; } +#define clearClearInterrupt(dev) {\ + writeControlRegister(dev, readControlRegister(dev) & ~ARLAN_CLEAR_INTERRUPT); } +#define setPowerOff(dev) {\ + writeControlRegister(dev, readControlRegister(dev) | (ARLAN_POWER && ARLAN_ACCESS));\ + writeControlRegister(dev, readControlRegister(dev) & ~ARLAN_ACCESS); } +#define setPowerOn(dev) {\ + writeControlRegister(dev, readControlRegister(dev) & ~(ARLAN_POWER)); } +#define arlan_lock_card_access(dev) {\ + writeControlRegister(dev, readControlRegister(dev) & ~ARLAN_ACCESS); } +#define arlan_unlock_card_access(dev) {\ + writeControlRegister(dev, readControlRegister(dev) | ARLAN_ACCESS); } @@ -525,7 +523,6 @@ struct arlan_private { | ARLAN_COMMAND_RESET) - #define ARLAN_DEBUG_CHAIN_LOCKS 0x00001 #define ARLAN_DEBUG_RESET 0x00002 #define ARLAN_DEBUG_TIMING 0x00004 @@ -536,4 +533,3 @@ struct arlan_private { #define ARLAN_DEBUG_INTERRUPT 0x00080 #define ARLAN_DEBUG_STARTUP 0x00100 #define ARLAN_DEBUG_SHUTDOWN 0x00200 - From aa1468b3faca778274ed0a79da52613fee48672e Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 26 Feb 2010 17:36:57 +0100 Subject: [PATCH 346/367] Staging: rt3070: md4.h: Checkpatch cleanup WARNING: space prohibited between function name and open parenthesis '(' +void MD4Init (MD4_CTX *); WARNING: space prohibited between function name and open parenthesis '(' +void MD4Update (MD4_CTX *, u8 *, UINT); WARNING: space prohibited between function name and open parenthesis '(' +void MD4Final (u8 [16], MD4_CTX *); ERROR: do not use C99 // comments +#endif //__MD4_H__ Signed-off-by: Andrea Gelmini Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rt3070/md4.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rt3070/md4.h b/drivers/staging/rt3070/md4.h index a9cc7b0f3ee3..b3fb63726182 100644 --- a/drivers/staging/rt3070/md4.h +++ b/drivers/staging/rt3070/md4.h @@ -35,8 +35,8 @@ typedef struct _MD4_CTX_ { u8 buffer[64]; /* input buffer */ } MD4_CTX; -void MD4Init (MD4_CTX *); -void MD4Update (MD4_CTX *, u8 *, UINT); -void MD4Final (u8 [16], MD4_CTX *); +void MD4Init(MD4_CTX *); +void MD4Update(MD4_CTX *, u8 *, UINT); +void MD4Final(u8 [16], MD4_CTX *); -#endif //__MD4_H__ \ No newline at end of file +#endif /*__MD4_H__*/ From e22245b6c26fbb7dfb948382ceb242edccb3a7e3 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 26 Feb 2010 17:36:59 +0100 Subject: [PATCH 347/367] Staging: arlan: Makefile: Checkpatch cleanup ERROR: trailing whitespace +obj-$(CONFIG_ARLAN) += arlan.o $ Signed-off-by: Andrea Gelmini --- drivers/staging/arlan/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/arlan/Makefile b/drivers/staging/arlan/Makefile index 9e58e5fae7b9..5a84d4402f21 100644 --- a/drivers/staging/arlan/Makefile +++ b/drivers/staging/arlan/Makefile @@ -1,3 +1,3 @@ -obj-$(CONFIG_ARLAN) += arlan.o +obj-$(CONFIG_ARLAN) += arlan.o arlan-objs := arlan-main.o arlan-proc.o From b91665e95d1968c3cd8dd0c3a9a8d617639db1a6 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 26 Feb 2010 17:36:58 +0100 Subject: [PATCH 348/367] Staging: arlan: arlan.h: more Checkpatch cleanup ERROR: do not use C99 // comments + volatile u_char radioModule;// shows EEPROM, can be overridden at 0x111 ERROR: do not use C99 // comments + volatile u_char defaultChannelSet; // shows EEProm, can be overriiden at 0x10A Signed-off-by: Andrea Gelmini --- drivers/staging/arlan/arlan.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/arlan/arlan.h b/drivers/staging/arlan/arlan.h index 19161f1feb5b..ffcd3ea048aa 100644 --- a/drivers/staging/arlan/arlan.h +++ b/drivers/staging/arlan/arlan.h @@ -90,8 +90,8 @@ struct arlan_shmem { volatile u_char hardwareType; volatile u_char majorHardwareVersion; volatile u_char minorHardwareVersion; - volatile u_char radioModule;// shows EEPROM, can be overridden at 0x111 - volatile u_char defaultChannelSet; // shows EEProm, can be overriiden at 0x10A + volatile u_char radioModule;/* shows EEPROM, can be overridden at 0x111 */ + volatile u_char defaultChannelSet; /* shows EEProm, can be overriiden at 0x10A */ volatile u_char _2[47]; /* Control/Status Block - 0x0080 */ From 5617f9da4619ec975514e6b385a052e024215da3 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 26 Feb 2010 17:37:00 +0100 Subject: [PATCH 349/367] Staging: comedi: drivers.c: Checkpatch cleanup WARNING: Use #include instead of +#include WARNING: braces {} are not necessary for any arm of this statement + if (dev->driver) { [...] + } else { [...] WARNING: braces {} are not necessary for single statement blocks + if (insn->insn == INSN_READ) { + data[0] = (new_data[1] >> (chan - base_bitfield_channel)) & 1; + } WARNING: braces {} are not necessary for single statement blocks + if (async->prealloc_buf && async->prealloc_bufsz == new_size) { + return 0; + } WARNING: braces {} are not necessary for single statement blocks + if (async->buf_page_list[i].virt_addr == NULL) { + break; + } WARNING: braces {} are not necessary for single statement blocks + if ((int)(async->buf_write_alloc_count + nbytes - free_end) > 0) { + nbytes = free_end - async->buf_write_alloc_count; + } WARNING: braces {} are not necessary for single statement blocks + if ((int)(async->buf_write_alloc_count + nbytes - free_end) > 0) { + nbytes = 0; + } WARNING: braces {} are not necessary for single statement blocks + if (async->buf_write_ptr >= async->prealloc_bufsz) { + async->buf_write_ptr %= async->prealloc_bufsz; + } Signed-off-by: Andrea Gelmini --- drivers/staging/comedi/drivers.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c index c2a632d31c61..44d6b62c230d 100644 --- a/drivers/staging/comedi/drivers.c +++ b/drivers/staging/comedi/drivers.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include static int postconfig(struct comedi_device *dev); @@ -99,11 +99,10 @@ static void cleanup_device(struct comedi_device *dev) static void __comedi_device_detach(struct comedi_device *dev) { dev->attached = 0; - if (dev->driver) { + if (dev->driver) dev->driver->detach(dev); - } else { + else printk("BUG: dev->driver=NULL in comedi_device_detach()\n"); - } cleanup_device(dev); } @@ -380,9 +379,8 @@ static int insn_rw_emulate_bits(struct comedi_device *dev, if (ret < 0) return ret; - if (insn->insn == INSN_READ) { + if (insn->insn == INSN_READ) data[0] = (new_data[1] >> (chan - base_bitfield_channel)) & 1; - } return 1; } @@ -429,9 +427,9 @@ int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s, new_size = (new_size + PAGE_SIZE - 1) & PAGE_MASK; /* if no change is required, do nothing */ - if (async->prealloc_buf && async->prealloc_bufsz == new_size) { + if (async->prealloc_buf && async->prealloc_bufsz == new_size) return 0; - } + /* deallocate old buffer */ if (async->prealloc_buf) { vunmap(async->prealloc_buf); @@ -494,9 +492,9 @@ int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s, (void *) get_zeroed_page(GFP_KERNEL); } - if (async->buf_page_list[i].virt_addr == NULL) { + if (async->buf_page_list[i].virt_addr == NULL) break; - } + mem_map_reserve(virt_to_page (async->buf_page_list[i]. virt_addr)); @@ -619,9 +617,9 @@ unsigned int comedi_buf_write_alloc(struct comedi_async *async, { unsigned int free_end = async->buf_read_count + async->prealloc_bufsz; - if ((int)(async->buf_write_alloc_count + nbytes - free_end) > 0) { + if ((int)(async->buf_write_alloc_count + nbytes - free_end) > 0) nbytes = free_end - async->buf_write_alloc_count; - } + async->buf_write_alloc_count += nbytes; /* barrier insures the read of buf_read_count above occurs before we write data to the write-alloc'ed buffer space */ @@ -635,9 +633,9 @@ unsigned int comedi_buf_write_alloc_strict(struct comedi_async *async, { unsigned int free_end = async->buf_read_count + async->prealloc_bufsz; - if ((int)(async->buf_write_alloc_count + nbytes - free_end) > 0) { + if ((int)(async->buf_write_alloc_count + nbytes - free_end) > 0) nbytes = 0; - } + async->buf_write_alloc_count += nbytes; /* barrier insures the read of buf_read_count above occurs before we write data to the write-alloc'ed buffer space */ @@ -657,9 +655,9 @@ unsigned comedi_buf_write_free(struct comedi_async *async, unsigned int nbytes) async->buf_write_count += nbytes; async->buf_write_ptr += nbytes; comedi_buf_munge(async, async->buf_write_count - async->munge_count); - if (async->buf_write_ptr >= async->prealloc_bufsz) { + if (async->buf_write_ptr >= async->prealloc_bufsz) async->buf_write_ptr %= async->prealloc_bufsz; - } + return nbytes; } From 3a8954e8f22cf31791d8c524c2839433e39f9368 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Fri, 26 Feb 2010 17:58:07 -0700 Subject: [PATCH 350/367] staging: dt3155: revert u_long to u64 usage Commit 9c1390a923ddb6fba1cf9d7440743369140c6d8a replaced all u_int's with u32 and u_long's with u64. Unfortunately, a u_long is still only 32-bits so they should have been replaced with u32 also. This can be verified by the register definitions in dt3155_io.h. It specifically states that the memory mapped registers are 32-bit. Fix this by changing all the u64 to u32. Signed-off-by: H Hartley Sweeten Cc: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dt3155/allocator.c | 2 +- drivers/staging/dt3155/allocator.h | 2 +- drivers/staging/dt3155/dt3155.h | 24 ++-- drivers/staging/dt3155/dt3155_drv.c | 28 ++--- drivers/staging/dt3155/dt3155_io.c | 16 +-- drivers/staging/dt3155/dt3155_io.h | 174 ++++++++++++++-------------- drivers/staging/dt3155/dt3155_isr.c | 54 ++++----- drivers/staging/dt3155/dt3155_isr.h | 2 +- 8 files changed, 151 insertions(+), 151 deletions(-) diff --git a/drivers/staging/dt3155/allocator.c b/drivers/staging/dt3155/allocator.c index 114e2a86fefa..c74234c66895 100644 --- a/drivers/staging/dt3155/allocator.c +++ b/drivers/staging/dt3155/allocator.c @@ -195,7 +195,7 @@ int allocator_free_dma(unsigned long address) * On cleanup everything is released. If the list is not empty, that a * problem of our clients */ -int allocator_init(u64 *allocator_max) +int allocator_init(u32 *allocator_max) { /* check how much free memory is there */ void *remapped; diff --git a/drivers/staging/dt3155/allocator.h b/drivers/staging/dt3155/allocator.h index 4cd81bdb3faa..bdf3268ca52d 100644 --- a/drivers/staging/dt3155/allocator.h +++ b/drivers/staging/dt3155/allocator.h @@ -24,5 +24,5 @@ void allocator_free_dma(unsigned long address); unsigned long allocator_allocate_dma(unsigned long kilobytes, int priority); -int allocator_init(u64 *); +int allocator_init(u32 *); void allocator_cleanup(void); diff --git a/drivers/staging/dt3155/dt3155.h b/drivers/staging/dt3155/dt3155.h index 22292b102a33..1bf786364eec 100644 --- a/drivers/staging/dt3155/dt3155.h +++ b/drivers/staging/dt3155/dt3155.h @@ -79,8 +79,8 @@ struct dt3155_config_s { /* hold data for each frame */ typedef struct { - u64 addr; /* address of the buffer with the frame */ - u64 tag; /* unique number for the frame */ + u32 addr; /* address of the buffer with the frame */ + u32 tag; /* unique number for the frame */ struct timeval time; /* time that capture took place */ } frame_info_t; @@ -101,14 +101,14 @@ struct dt3155_fbuffer_s { int locked_buf; /* Buffers used by user */ int ready_que[BOARD_MAX_BUFFS]; - u64 ready_head; /* The most recent buffer located here */ - u64 ready_len; /* The number of ready buffers */ + u32 ready_head; /* The most recent buffer located here */ + u32 ready_len; /* The number of ready buffers */ int even_happened; int even_stopped; int stop_acquire; /* Flag to stop interrupts */ - u64 frame_count; /* Counter for frames acquired by this card */ + u32 frame_count; /* Counter for frames acquired by this card */ }; @@ -122,13 +122,13 @@ struct dt3155_fbuffer_s { /* There is one status structure for each card. */ typedef struct dt3155_status_s { int fixed_mode; /* if 1, we are in fixed frame mode */ - u64 reg_addr; /* Register address for a single card */ - u64 mem_addr; /* Buffer start addr for this card */ - u64 mem_size; /* This is the amount of mem available */ + u32 reg_addr; /* Register address for a single card */ + u32 mem_addr; /* Buffer start addr for this card */ + u32 mem_size; /* This is the amount of mem available */ u32 irq; /* this card's irq */ struct dt3155_config_s config; /* configuration struct */ struct dt3155_fbuffer_s fbuffer; /* frame buffer state struct */ - u64 state; /* this card's state */ + u32 state; /* this card's state */ u32 device_installed; /* Flag if installed. 1=installed */ } dt3155_status_t; @@ -161,9 +161,9 @@ extern struct dt3155_status_s dt3155_status[MAXBOARDS]; /* User code will probably want to declare one of these for each card */ typedef struct dt3155_read_s { - u64 offset; - u64 frame_seq; - u64 state; + u32 offset; + u32 frame_seq; + u32 state; frame_info_t frame_info; } dt3155_read_t; diff --git a/drivers/staging/dt3155/dt3155_drv.c b/drivers/staging/dt3155/dt3155_drv.c index 930a3e666c0a..a67c622869d2 100644 --- a/drivers/staging/dt3155/dt3155_drv.c +++ b/drivers/staging/dt3155/dt3155_drv.c @@ -137,7 +137,7 @@ u32 dt3155_dev_open[ MAXBOARDS ] = {0 }; u32 ndevices = 0; -u64 unique_tag = 0;; +u32 unique_tag = 0;; /* @@ -180,7 +180,7 @@ static inline void dt3155_isr( int irq, void *dev_id, struct pt_regs *regs ) int minor = -1; int index; unsigned long flags; - u64 buffer_addr; + u32 buffer_addr; /* find out who issued the interrupt */ for ( index = 0; index < ndevices; index++ ) { @@ -249,7 +249,7 @@ static inline void dt3155_isr( int irq, void *dev_id, struct pt_regs *regs ) { /* GCS (Aug 2, 2002) -- In field mode, dma the odd field into the lower half of the buffer */ - const u64 stride = dt3155_status[ minor ].config.cols; + const u32 stride = dt3155_status[ minor ].config.cols; buffer_addr = dt3155_fbuffer[ minor ]-> frame_info[ dt3155_fbuffer[ minor ]->active_buf ].addr + (DT3155_MAX_ROWS / 2) * stride; @@ -312,7 +312,7 @@ static inline void dt3155_isr( int irq, void *dev_id, struct pt_regs *regs ) dt3155_fbuffer[ minor ]->even_stopped = 0; printk(KERN_DEBUG "dt3155: state is now %x\n", - (u32)dt3155_status[minor].state); + dt3155_status[minor].state); } else { @@ -428,7 +428,7 @@ static inline void dt3155_isr( int irq, void *dev_id, struct pt_regs *regs ) *****************************************************/ static void dt3155_init_isr(int minor) { - const u64 stride = dt3155_status[ minor ].config.cols; + const u32 stride = dt3155_status[ minor ].config.cols; switch (dt3155_status[ minor ].state & DT3155_STATE_MODE) { @@ -706,7 +706,7 @@ static int dt3155_open( struct inode* inode, struct file* filep) if (dt3155_status[ minor ].state != DT3155_STATE_IDLE) { printk ("DT3155: Not in idle state (state = %x)\n", - (u32)dt3155_status[ minor ].state); + dt3155_status[ minor ].state); return -EBUSY; } @@ -762,7 +762,7 @@ static ssize_t dt3155_read(struct file *filep, char __user *buf, { /* which device are we reading from? */ int minor = MINOR(filep->f_dentry->d_inode->i_rdev); - u64 offset; + u32 offset; int frame_index; frame_info_t *frame_info_p; @@ -820,11 +820,11 @@ static ssize_t dt3155_read(struct file *filep, char __user *buf, offset = frame_info_p->addr - dt3155_status[minor].mem_addr; put_user(offset, (unsigned int *) buf); - buf += sizeof(u64); + buf += sizeof(u32); put_user( dt3155_status[minor].fbuffer.frame_count, (unsigned int *) buf); - buf += sizeof(u64); + buf += sizeof(u32); put_user(dt3155_status[minor].state, (unsigned int *) buf); - buf += sizeof(u64); + buf += sizeof(u32); if (copy_to_user(buf, frame_info_p, sizeof(frame_info_t))) return -EFAULT; @@ -931,7 +931,7 @@ static int find_PCI (void) dt3155_status[ pci_index-1 ].device_installed = 1; printk("DT3155: Installing device %d w/irq %d and address %p\n", pci_index, - (u32)dt3155_status[pci_index-1].irq, + dt3155_status[pci_index-1].irq, dt3155_lbase[pci_index-1]); } @@ -944,7 +944,7 @@ err: return DT_3155_FAILURE; } -u64 allocatorAddr = 0; +u32 allocatorAddr = 0; /***************************************************** * init_module() @@ -1024,9 +1024,9 @@ int init_module(void) dt3155_status[ index ].config.rows); printk("DT3155: m_addr = 0x%x; m_size = %ld; " "state = %d; device_installed = %d\n", - (u32)dt3155_status[ index ].mem_addr, + dt3155_status[ index ].mem_addr, (long int)dt3155_status[ index ].mem_size, - (u32)dt3155_status[ index ].state, + dt3155_status[ index ].state, dt3155_status[ index ].device_installed); } diff --git a/drivers/staging/dt3155/dt3155_io.c b/drivers/staging/dt3155/dt3155_io.c index 1c15604f4313..6b9c68501a61 100644 --- a/drivers/staging/dt3155/dt3155_io.c +++ b/drivers/staging/dt3155/dt3155_io.c @@ -27,12 +27,12 @@ /****** local copies of board's 32 bit registers ******/ -u64 even_dma_start_r; /* bit 0 should always be 0 */ -u64 odd_dma_start_r; /* .. */ -u64 even_dma_stride_r; /* bits 0&1 should always be 0 */ -u64 odd_dma_stride_r; /* .. */ -u64 even_pixel_fmt_r; -u64 odd_pixel_fmt_r; +u32 even_dma_start_r; /* bit 0 should always be 0 */ +u32 odd_dma_start_r; /* .. */ +u32 even_dma_stride_r; /* bits 0&1 should always be 0 */ +u32 odd_dma_stride_r; /* .. */ +u32 even_pixel_fmt_r; +u32 odd_pixel_fmt_r; FIFO_TRIGGER_R fifo_trigger_r; XFER_MODE_R xfer_mode_r; @@ -40,8 +40,8 @@ CSR1_R csr1_r; RETRY_WAIT_CNT_R retry_wait_cnt_r; INT_CSR_R int_csr_r; -u64 even_fld_mask_r; -u64 odd_fld_mask_r; +u32 even_fld_mask_r; +u32 odd_fld_mask_r; MASK_LENGTH_R mask_length_r; FIFO_FLAG_CNT_R fifo_flag_cnt_r; diff --git a/drivers/staging/dt3155/dt3155_io.h b/drivers/staging/dt3155/dt3155_io.h index a135aada5902..d1a25100169f 100644 --- a/drivers/staging/dt3155/dt3155_io.h +++ b/drivers/staging/dt3155/dt3155_io.h @@ -36,8 +36,8 @@ MA 02111-1307 USA /* macros to access registers */ -#define WriteMReg(Address, Data) (*((u64 *)(Address)) = Data) -#define ReadMReg(Address, Data) (Data = *((u64 *)(Address))) +#define WriteMReg(Address, Data) (*((u32 *)(Address)) = Data) +#define ReadMReg(Address, Data) (Data = *((u32 *)(Address))) /***************** 32 bit register globals **************/ @@ -71,114 +71,114 @@ MA 02111-1307 USA /******** Assignments and Typedefs for 32 bit Memory Mapped Registers ********/ typedef union fifo_trigger_tag { - u64 reg; + u32 reg; struct { - u64 PACKED:6; - u64 :9; - u64 PLANER:7; - u64 :9; + u32 PACKED:6; + u32 :9; + u32 PLANER:7; + u32 :9; } fld; } FIFO_TRIGGER_R; typedef union xfer_mode_tag { - u64 reg; + u32 reg; struct { - u64 :2; - u64 FIELD_TOGGLE:1; - u64 :5; - u64 :2; - u64 :22; + u32 :2; + u32 FIELD_TOGGLE:1; + u32 :5; + u32 :2; + u32 :22; } fld; } XFER_MODE_R; typedef union csr1_tag { - u64 reg; + u32 reg; struct { - u64 CAP_CONT_EVE:1; - u64 CAP_CONT_ODD:1; - u64 CAP_SNGL_EVE:1; - u64 CAP_SNGL_ODD:1; - u64 FLD_DN_EVE :1; - u64 FLD_DN_ODD :1; - u64 SRST :1; - u64 FIFO_EN :1; - u64 FLD_CRPT_EVE:1; - u64 FLD_CRPT_ODD:1; - u64 ADDR_ERR_EVE:1; - u64 ADDR_ERR_ODD:1; - u64 CRPT_DIS :1; - u64 RANGE_EN :1; - u64 :16; + u32 CAP_CONT_EVE:1; + u32 CAP_CONT_ODD:1; + u32 CAP_SNGL_EVE:1; + u32 CAP_SNGL_ODD:1; + u32 FLD_DN_EVE :1; + u32 FLD_DN_ODD :1; + u32 SRST :1; + u32 FIFO_EN :1; + u32 FLD_CRPT_EVE:1; + u32 FLD_CRPT_ODD:1; + u32 ADDR_ERR_EVE:1; + u32 ADDR_ERR_ODD:1; + u32 CRPT_DIS :1; + u32 RANGE_EN :1; + u32 :16; } fld; } CSR1_R; typedef union retry_wait_cnt_tag { - u64 reg; + u32 reg; struct { - u64 RTRY_WAIT_CNT:8; - u64 :24; + u32 RTRY_WAIT_CNT:8; + u32 :24; } fld; } RETRY_WAIT_CNT_R; typedef union int_csr_tag { - u64 reg; + u32 reg; struct { - u64 FLD_END_EVE :1; - u64 FLD_END_ODD :1; - u64 FLD_START :1; - u64 :5; - u64 FLD_END_EVE_EN:1; - u64 FLD_END_ODD_EN:1; - u64 FLD_START_EN :1; - u64 :21; + u32 FLD_END_EVE :1; + u32 FLD_END_ODD :1; + u32 FLD_START :1; + u32 :5; + u32 FLD_END_EVE_EN:1; + u32 FLD_END_ODD_EN:1; + u32 FLD_START_EN :1; + u32 :21; } fld; } INT_CSR_R; typedef union mask_length_tag { - u64 reg; + u32 reg; struct { - u64 MASK_LEN_EVE:5; - u64 :11; - u64 MASK_LEN_ODD:5; - u64 :11; + u32 MASK_LEN_EVE:5; + u32 :11; + u32 MASK_LEN_ODD:5; + u32 :11; } fld; } MASK_LENGTH_R; typedef union fifo_flag_cnt_tag { - u64 reg; + u32 reg; struct { - u64 AF_COUNT:7; - u64 :9; - u64 AE_COUNT:7; - u64 :9; + u32 AF_COUNT:7; + u32 :9; + u32 AE_COUNT:7; + u32 :9; } fld; } FIFO_FLAG_CNT_R; typedef union iic_clk_dur { - u64 reg; + u32 reg; struct { - u64 PHASE_1:8; - u64 PHASE_2:8; - u64 PHASE_3:8; - u64 PHASE_4:8; + u32 PHASE_1:8; + u32 PHASE_2:8; + u32 PHASE_3:8; + u32 PHASE_4:8; } fld; } IIC_CLK_DUR_R; typedef union iic_csr1_tag { - u64 reg; + u32 reg; struct { - u64 AUTO_EN :1; - u64 BYPASS :1; - u64 SDA_OUT :1; - u64 SCL_OUT :1; - u64 :4; - u64 AUTO_ABORT :1; - u64 DIRECT_ABORT:1; - u64 SDA_IN :1; - u64 SCL_IN :1; - u64 :4; - u64 AUTO_ADDR :8; - u64 RD_DATA :8; + u32 AUTO_EN :1; + u32 BYPASS :1; + u32 SDA_OUT :1; + u32 SCL_OUT :1; + u32 :4; + u32 AUTO_ABORT :1; + u32 DIRECT_ABORT:1; + u32 SDA_IN :1; + u32 SCL_IN :1; + u32 :4; + u32 AUTO_ADDR :8; + u32 RD_DATA :8; } fld; } IIC_CSR1_R; @@ -186,14 +186,14 @@ typedef union iic_csr1_tag { * iic_csr2_tag */ typedef union iic_csr2_tag { - u64 reg; + u32 reg; struct { - u64 DIR_WR_DATA :8; - u64 DIR_SUB_ADDR:8; - u64 DIR_RD :1; - u64 DIR_ADDR :7; - u64 NEW_CYCLE :1; - u64 :7; + u32 DIR_WR_DATA :8; + u32 DIR_SUB_ADDR:8; + u32 DIR_RD :1; + u32 DIR_ADDR :7; + u32 NEW_CYCLE :1; + u32 :7; } fld; } IIC_CSR2_R; @@ -203,10 +203,10 @@ typedef union iic_csr2_tag { * dma_upper_lmt_tag */ typedef union dma_upper_lmt_tag { - u64 reg; + u32 reg; struct { - u64 DMA_UPPER_LMT_VAL:24; - u64 :8; + u32 DMA_UPPER_LMT_VAL:24; + u32 :8; } fld; } DMA_UPPER_LMT_R; @@ -214,12 +214,12 @@ typedef union dma_upper_lmt_tag { /* * Global declarations of local copies of boards' 32 bit registers */ -extern u64 even_dma_start_r; /* bit 0 should always be 0 */ -extern u64 odd_dma_start_r; /* .. */ -extern u64 even_dma_stride_r; /* bits 0&1 should always be 0 */ -extern u64 odd_dma_stride_r; /* .. */ -extern u64 even_pixel_fmt_r; -extern u64 odd_pixel_fmt_r; +extern u32 even_dma_start_r; /* bit 0 should always be 0 */ +extern u32 odd_dma_start_r; /* .. */ +extern u32 even_dma_stride_r; /* bits 0&1 should always be 0 */ +extern u32 odd_dma_stride_r; /* .. */ +extern u32 even_pixel_fmt_r; +extern u32 odd_pixel_fmt_r; extern FIFO_TRIGGER_R fifo_trigger_r; extern XFER_MODE_R xfer_mode_r; @@ -227,8 +227,8 @@ extern CSR1_R csr1_r; extern RETRY_WAIT_CNT_R retry_wait_cnt_r; extern INT_CSR_R int_csr_r; -extern u64 even_fld_mask_r; -extern u64 odd_fld_mask_r; +extern u32 even_fld_mask_r; +extern u32 odd_fld_mask_r; extern MASK_LENGTH_R mask_length_r; extern FIFO_FLAG_CNT_R fifo_flag_cnt_r; diff --git a/drivers/staging/dt3155/dt3155_isr.c b/drivers/staging/dt3155/dt3155_isr.c index 5b790867c292..fd7f93d6c33d 100644 --- a/drivers/staging/dt3155/dt3155_isr.c +++ b/drivers/staging/dt3155/dt3155_isr.c @@ -220,7 +220,7 @@ inline void printques( int m ) * the start address up to the beginning of the * next 4MB chunk (assuming bufsize < 4MB). *****************************************************/ -u64 adjust_4MB (u64 buf_addr, u64 bufsize) { +u32 adjust_4MB (u32 buf_addr, u32 bufsize) { if (((buf_addr+bufsize) & UPPER_10_BITS) != (buf_addr & UPPER_10_BITS)) return (buf_addr+bufsize) & UPPER_10_BITS; else @@ -235,26 +235,26 @@ u64 adjust_4MB (u64 buf_addr, u64 bufsize) { * buffers. If there is not enough free space * try for less memory. *****************************************************/ -void allocate_buffers (u64 *buf_addr, u64* total_size_kbs, - u64 bufsize) +void allocate_buffers (u32 *buf_addr, u32* total_size_kbs, + u32 bufsize) { /* Compute the minimum amount of memory guaranteed to hold all MAXBUFFERS such that no buffer crosses the 4MB boundary. Store this value in the variable "full_size" */ - u64 allocator_max; - u64 bufs_per_chunk = (FOUR_MB / bufsize); - u64 filled_chunks = (MAXBUFFERS-1) / bufs_per_chunk; - u64 leftover_bufs = MAXBUFFERS - filled_chunks * bufs_per_chunk; + u32 allocator_max; + u32 bufs_per_chunk = (FOUR_MB / bufsize); + u32 filled_chunks = (MAXBUFFERS-1) / bufs_per_chunk; + u32 leftover_bufs = MAXBUFFERS - filled_chunks * bufs_per_chunk; - u64 full_size = bufsize /* possibly unusable part of 1st chunk */ + u32 full_size = bufsize /* possibly unusable part of 1st chunk */ + filled_chunks * FOUR_MB /* max # of completely filled 4mb chunks */ + leftover_bufs * bufsize; /* these buffs will be in a partly filled chunk at beginning or end */ - u64 full_size_kbs = 1 + (full_size-1) / 1024; - u64 min_size_kbs = 2*ndevices*bufsize / 1024; - u64 size_kbs; + u32 full_size_kbs = 1 + (full_size-1) / 1024; + u32 min_size_kbs = 2*ndevices*bufsize / 1024; + u32 size_kbs; /* Now, try to allocate full_size. If this fails, keep trying for less & less memory until it succeeds. */ @@ -264,13 +264,13 @@ void allocate_buffers (u64 *buf_addr, u64* total_size_kbs, #endif size_kbs = full_size_kbs; *buf_addr = 0; - printk ("DT3155: We would like to get: %d KB\n", (u32)(full_size_kbs)); - printk ("DT3155: ...but need at least: %d KB\n", (u32)(min_size_kbs)); - printk ("DT3155: ...the allocator has: %d KB\n", (u32)(allocator_max)); + printk("DT3155: We would like to get: %d KB\n", full_size_kbs); + printk("DT3155: ...but need at least: %d KB\n", min_size_kbs); + printk("DT3155: ...the allocator has: %d KB\n", allocator_max); size_kbs = (full_size_kbs <= allocator_max ? full_size_kbs : allocator_max); if (size_kbs > min_size_kbs) { if ((*buf_addr = allocator_allocate_dma (size_kbs, GFP_KERNEL)) != 0) { - printk ("DT3155: Managed to allocate: %d KB\n", (u32)size_kbs); + printk("DT3155: Managed to allocate: %d KB\n", size_kbs); *total_size_kbs = size_kbs; return; } @@ -298,17 +298,17 @@ void allocate_buffers (u64 *buf_addr, u64* total_size_kbs, * 4MB boundary. Also, add error checking. This * function will return -ENOMEM when not enough memory. *****************************************************/ -u64 dt3155_setup_buffers(u64 *allocatorAddr) +u32 dt3155_setup_buffers(u32 *allocatorAddr) { - u64 index; - u64 rambuff_addr; /* start of allocation */ - u64 rambuff_size; /* total size allocated to driver */ - u64 rambuff_acm; /* accumlator, keep track of how much + u32 index; + u32 rambuff_addr; /* start of allocation */ + u32 rambuff_size; /* total size allocated to driver */ + u32 rambuff_acm; /* accumlator, keep track of how much is left after being split up*/ - u64 rambuff_end; /* end of rambuff */ - u64 numbufs; /* number of useful buffers allocated (per device) */ - u64 bufsize = DT3155_MAX_ROWS * DT3155_MAX_COLS; + u32 rambuff_end; /* end of rambuff */ + u32 numbufs; /* number of useful buffers allocated (per device) */ + u32 bufsize = DT3155_MAX_ROWS * DT3155_MAX_COLS; int m; /* minor # of device, looped for all devs */ /* zero the fbuffer status and address structure */ @@ -326,9 +326,9 @@ u64 dt3155_setup_buffers(u64 *allocatorAddr) /* allocate a large contiguous chunk of RAM */ allocate_buffers (&rambuff_addr, &rambuff_size, bufsize); - printk( "DT3155: mem info\n" ); - printk( " - rambuf_addr = 0x%x \n", (u32)rambuff_addr ); - printk( " - length (kb) = %u \n", (u32)rambuff_size ); + printk("DT3155: mem info\n"); + printk(" - rambuf_addr = 0x%x \n", rambuff_addr); + printk(" - length (kb) = %u \n", rambuff_size); if( rambuff_addr == 0 ) { printk( KERN_INFO @@ -350,7 +350,7 @@ u64 dt3155_setup_buffers(u64 *allocatorAddr) /* Following line is OK, will waste buffers if index * not evenly divisible by ndevices -NJC*/ numbufs = index / ndevices; - printk (" - numbufs = %u\n", (u32) numbufs); + printk(" - numbufs = %u\n", numbufs); if (numbufs < 2) { printk( KERN_INFO "DT3155: Error setup_buffers() couldn't allocate 2 bufs/board\n" ); diff --git a/drivers/staging/dt3155/dt3155_isr.h b/drivers/staging/dt3155/dt3155_isr.h index 7f27910eb941..7595cb16c988 100644 --- a/drivers/staging/dt3155/dt3155_isr.h +++ b/drivers/staging/dt3155/dt3155_isr.h @@ -42,7 +42,7 @@ extern struct dt3155_fbuffer_s *dt3155_fbuffer[MAXBOARDS]; /* Initialize the buffering system. This should */ /* be called prior to enabling interrupts */ -u64 dt3155_setup_buffers(u64 *allocatorAddr); +u32 dt3155_setup_buffers(u32 *allocatorAddr); /* Get the next frame of data if it is ready. Returns */ /* zero if no data is ready. If there is data but */ From 52d83bde6f10480268c454b3373bfcec8c2e3c3e Mon Sep 17 00:00:00 2001 From: Chihau Chau Date: Thu, 4 Feb 2010 22:27:05 -0300 Subject: [PATCH 351/367] Staging: comedi: poc: fix coding style issues This fixes a line over 80 characters and a brace warnings. Signed-off-by: Chihau Chau Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/poc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/poc.c b/drivers/staging/comedi/drivers/poc.c index d23e588d0632..28eba6d3cb5a 100644 --- a/drivers/staging/comedi/drivers/poc.c +++ b/drivers/staging/comedi/drivers/poc.c @@ -136,8 +136,8 @@ static int poc_attach(struct comedi_device *dev, struct comedi_devconfig *it) /* check if io addresses are available */ if (!request_region(iobase, iosize, "dac02")) { printk - ("I/O port conflict: failed to allocate ports 0x%lx to 0x%lx\n", - iobase, iobase + iosize - 1); + ("I/O port conflict: failed to allocate ports 0x%lx to " + "0x%lx\n", iobase, iobase + iosize - 1); return -EIO; } dev->iobase = iobase; @@ -156,9 +156,8 @@ static int poc_attach(struct comedi_device *dev, struct comedi_devconfig *it) s->insn_write = this_board->winsn; s->insn_read = this_board->rinsn; s->insn_bits = this_board->insnbits; - if (s->type == COMEDI_SUBD_AO || s->type == COMEDI_SUBD_DO) { + if (s->type == COMEDI_SUBD_AO || s->type == COMEDI_SUBD_DO) s->subdev_flags = SDF_WRITABLE; - } return 0; } From dedf3ad1534ff5e30a2eba88afe64bbe7beecfb6 Mon Sep 17 00:00:00 2001 From: Benjamin Adolphi Date: Sat, 6 Feb 2010 20:06:50 +0100 Subject: [PATCH 352/367] Staging: comedi: pcmad: Checkpatch cleanups This fixes all checkpatch issues in the pcmad comedi driver. Signed-off-by: Benjamin Adolphi Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcmad.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcmad.c b/drivers/staging/comedi/drivers/pcmad.c index acac67090810..f7991a9e0a78 100644 --- a/drivers/staging/comedi/drivers/pcmad.c +++ b/drivers/staging/comedi/drivers/pcmad.c @@ -34,11 +34,11 @@ Configuration options: [0] - I/O port base [1] - unused [2] - Analog input reference - 0 = single ended - 1 = differential + 0 = single ended + 1 = differential [3] - Analog input encoding (must match jumpers) - 0 = straight binary - 1 = two's complement + 0 = straight binary + 1 = two's complement */ #include @@ -113,9 +113,8 @@ static int pcmad_ai_insn_read(struct comedi_device *dev, data[n] = inb(dev->iobase + PCMAD_LSB); data[n] |= (inb(dev->iobase + PCMAD_MSB) << 8); - if (devpriv->twos_comp) { + if (devpriv->twos_comp) data[n] ^= (1 << (this_board->n_ai_bits - 1)); - } } return n; @@ -135,7 +134,7 @@ static int pcmad_attach(struct comedi_device *dev, struct comedi_devconfig *it) unsigned long iobase; iobase = it->options[0]; - printk("comedi%d: pcmad: 0x%04lx ", dev->minor, iobase); + printk(KERN_INFO "comedi%d: pcmad: 0x%04lx ", dev->minor, iobase); if (!request_region(iobase, PCMAD_SIZE, "pcmad")) { printk("I/O port conflict\n"); return -EIO; @@ -166,11 +165,11 @@ static int pcmad_attach(struct comedi_device *dev, struct comedi_devconfig *it) static int pcmad_detach(struct comedi_device *dev) { - printk("comedi%d: pcmad: remove\n", dev->minor); + printk(KERN_INFO "comedi%d: pcmad: remove\n", dev->minor); - if (dev->irq) { + if (dev->irq) free_irq(dev->irq, dev); - } + if (dev->iobase) release_region(dev->iobase, PCMAD_SIZE); From c2ca6a476a2fde7239a576c1bde8d7cd2ded87a8 Mon Sep 17 00:00:00 2001 From: Graham M Howe Date: Tue, 9 Feb 2010 23:42:25 +0000 Subject: [PATCH 353/367] Staging: comedi: fix bracing coding style issue in ni_65xx.c This is a patch to the ni_65xx.c file that fixes up a brace warning found by the checkpatch.pl tool Signed-off-by: Graham M Howe Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_65xx.c | 31 +++++++++++++----------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_65xx.c b/drivers/staging/comedi/drivers/ni_65xx.c index bbf75eb6d7f2..dad79d5efec6 100644 --- a/drivers/staging/comedi/drivers/ni_65xx.c +++ b/drivers/staging/comedi/drivers/ni_65xx.c @@ -26,12 +26,13 @@ /* Driver: ni_65xx Description: National Instruments 65xx static dio boards -Author: Jon Grierson , Frank Mori Hess +Author: Jon Grierson , + Frank Mori Hess Status: testing -Devices: [National Instruments] PCI-6509 (ni_65xx), PXI-6509, PCI-6510, PCI-6511, - PXI-6511, PCI-6512, PXI-6512, PCI-6513, PXI-6513, PCI-6514, PXI-6514, PCI-6515, - PXI-6515, PCI-6516, PCI-6517, PCI-6518, PCI-6519, PCI-6520, PCI-6521, PXI-6521, - PCI-6528, PXI-6528 +Devices: [National Instruments] PCI-6509 (ni_65xx), PXI-6509, PCI-6510, + PCI-6511, PXI-6511, PCI-6512, PXI-6512, PCI-6513, PXI-6513, PCI-6514, + PXI-6514, PCI-6515, PXI-6515, PCI-6516, PCI-6517, PCI-6518, PCI-6519, + PCI-6520, PCI-6521, PXI-6521, PCI-6528, PXI-6528 Updated: Wed Oct 18 08:59:11 EDT 2006 Based on the PCI-6527 driver by ds. @@ -418,7 +419,8 @@ static int ni_65xx_dio_insn_bits(struct comedi_device *dev, return -EINVAL; base_bitfield_channel = CR_CHAN(insn->chanspec); for (j = 0; j < max_ports_per_bitfield; ++j) { - const unsigned port_offset = ni_65xx_port_by_channel(base_bitfield_channel) + j; + const unsigned port_offset = + ni_65xx_port_by_channel(base_bitfield_channel) + j; const unsigned port = sprivate(s)->base_port + port_offset; unsigned base_port_channel; @@ -463,11 +465,11 @@ static int ni_65xx_dio_insn_bits(struct comedi_device *dev, * subdevice.) */ port_read_bits ^= 0xFF; } - if (bitshift > 0) { + if (bitshift > 0) port_read_bits <<= bitshift; - } else { + else port_read_bits >>= -bitshift; - } + read_bits |= port_read_bits; } data[1] = read_bits; @@ -532,7 +534,8 @@ static int ni_65xx_intr_cmdtest(struct comedi_device *dev, if (err) return 1; - /* step 2: make sure trigger sources are unique and mutually compatible */ + /* step 2: make sure trigger sources are unique and mutually + compatible */ if (err) return 2; @@ -790,9 +793,9 @@ static int ni_65xx_detach(struct comedi_device *dev) Master_Interrupt_Control); } - if (dev->irq) { + if (dev->irq) free_irq(dev->irq, dev); - } + if (private(dev)) { unsigned i; @@ -802,9 +805,9 @@ static int ni_65xx_detach(struct comedi_device *dev) dev->subdevices[i].private = NULL; } } - if (private(dev)->mite) { + if (private(dev)->mite) mite_unsetup(private(dev)->mite); - } + } return 0; } From 0054a361e44bf71b8bb79b863bcf00e04dc4a464 Mon Sep 17 00:00:00 2001 From: Graham M Howe Date: Wed, 10 Feb 2010 18:11:47 +0000 Subject: [PATCH 354/367] Staging: comedi: fix bracing coding style and 80 character issues in ni_660x.c This is a patch to the ni_660x.c file that fixes up the brace and 80 character issues found by the checkpatch tool Signed-off-by: Graham M Howe Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_660x.c | 48 ++++++++++++------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c index 404d3c516ed1..df61e5a03ae1 100644 --- a/drivers/staging/comedi/drivers/ni_660x.c +++ b/drivers/staging/comedi/drivers/ni_660x.c @@ -52,7 +52,8 @@ enum ni_660x_constants { }; #define NUM_PFI_CHANNELS 40 -/* really there are only up to 3 dma channels, but the register layout allows for 4 */ +/* really there are only up to 3 dma channels, but the register layout allows +for 4 */ #define MAX_DMA_CHANNEL 4 /* See Register-Level Programmer Manual page 3.1 */ @@ -198,7 +199,7 @@ struct NI_660xRegisterData { const char *name; /* Register Name */ int offset; /* Offset from base address from GPCT chip */ enum ni_660x_register_direction direction; - enum ni_660x_register_width size; /* 1 byte, 2 bytes, or 4 bytes */ + enum ni_660x_register_width size; /*1 byte, 2 bytes, or 4 bytes*/ }; static const struct NI_660xRegisterData registerData[NumRegisters] = { @@ -382,8 +383,8 @@ enum global_interrupt_config_register_bits { }; /* Offset of the GPCT chips from the base-adress of the card */ -static const unsigned GPCT_OFFSET[2] = { 0x0, 0x800 }; /* First chip is at base-address + - 0x00, etc. */ +/* First chip is at base-address + 0x00, etc. */ +static const unsigned GPCT_OFFSET[2] = { 0x0, 0x800 }; /* Board description*/ struct ni_660x_board { @@ -993,9 +994,9 @@ static int ni_660x_allocate_private(struct comedi_device *dev) spin_lock_init(&private(dev)->mite_channel_lock); spin_lock_init(&private(dev)->interrupt_lock); spin_lock_init(&private(dev)->soft_reg_copy_lock); - for (i = 0; i < NUM_PFI_CHANNELS; ++i) { + for (i = 0; i < NUM_PFI_CHANNELS; ++i) private(dev)->pfi_output_selects[i] = pfi_output_select_counter; - } + return 0; } @@ -1008,9 +1009,8 @@ static int ni_660x_alloc_mite_rings(struct comedi_device *dev) for (j = 0; j < counters_per_chip; ++j) { private(dev)->mite_rings[i][j] = mite_alloc_ring(private(dev)->mite); - if (private(dev)->mite_rings[i][j] == NULL) { + if (private(dev)->mite_rings[i][j] == NULL) return -ENOMEM; - } } } return 0; @@ -1022,9 +1022,8 @@ static void ni_660x_free_mite_rings(struct comedi_device *dev) unsigned j; for (i = 0; i < board(dev)->n_chips; ++i) { - for (j = 0; j < counters_per_chip; ++j) { + for (j = 0; j < counters_per_chip; ++j) mite_free_ring(private(dev)->mite_rings[i][j]); - } } } @@ -1078,15 +1077,16 @@ static int ni_660x_attach(struct comedi_device *dev, s->insn_bits = ni_660x_dio_insn_bits; s->insn_config = ni_660x_dio_insn_config; s->io_bits = 0; /* all bits default to input */ - /* we use the ioconfig registers to control dio direction, so zero output enables in stc dio control reg */ + /* we use the ioconfig registers to control dio direction, so zero + output enables in stc dio control reg */ ni_660x_write_register(dev, 0, 0, STCDIOControl); private(dev)->counter_dev = ni_gpct_device_construct(dev, - &ni_gpct_write_register, - &ni_gpct_read_register, - ni_gpct_variant_660x, - ni_660x_num_counters - (dev)); + &ni_gpct_write_register, + &ni_gpct_read_register, + ni_gpct_variant_660x, + ni_660x_num_counters + (dev)); if (private(dev)->counter_dev == NULL) return -ENOMEM; for (i = 0; i < NI_660X_MAX_NUM_COUNTERS; ++i) { @@ -1118,12 +1118,12 @@ static int ni_660x_attach(struct comedi_device *dev, s->type = COMEDI_SUBD_UNUSED; } } - for (i = 0; i < board(dev)->n_chips; ++i) { + for (i = 0; i < board(dev)->n_chips; ++i) init_tio_chip(dev, i); - } - for (i = 0; i < ni_660x_num_counters(dev); ++i) { + + for (i = 0; i < ni_660x_num_counters(dev); ++i) ni_tio_init_counter(&private(dev)->counter_dev->counters[i]); - } + for (i = 0; i < NUM_PFI_CHANNELS; ++i) { if (i < min_counter_pfi_chan) ni_660x_set_pfi_routing(dev, i, pfi_output_select_do); @@ -1134,9 +1134,9 @@ static int ni_660x_attach(struct comedi_device *dev, } /* to be safe, set counterswap bits on tio chips after all the counter outputs have been set to high impedance mode */ - for (i = 0; i < board(dev)->n_chips; ++i) { + for (i = 0; i < board(dev)->n_chips; ++i) set_tio_counterswap(dev, i); - } + ret = request_irq(mite_irq(private(dev)->mite), ni_660x_interrupt, IRQF_SHARED, "ni_660x", dev); if (ret < 0) { @@ -1193,9 +1193,9 @@ static void init_tio_chip(struct comedi_device *dev, int chipset) private(dev)-> dma_configuration_soft_copies[chipset], DMAConfigRegister); - for (i = 0; i < NUM_PFI_CHANNELS; ++i) { + for (i = 0; i < NUM_PFI_CHANNELS; ++i) ni_660x_write_register(dev, chipset, 0, IOConfigReg(i)); - } + } static int From 49c9b5c7bd6cf87ccc1d820dec8d23ba3ae53f64 Mon Sep 17 00:00:00 2001 From: Chihau Chau Date: Thu, 11 Feb 2010 15:47:47 -0300 Subject: [PATCH 355/367] Staging: dream: camera: msm_camera: fix coding style issues This fixes some coding style issues like to use __func__ instead __FUNCTION__, "foo *bar" instead "foo* bar" and a initial comment with "/* */" instead "//" Signed-off-by: Chihau Chau Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dream/camera/msm_camera.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/dream/camera/msm_camera.c b/drivers/staging/dream/camera/msm_camera.c index 7d938772eacc..4f808dc2ca48 100644 --- a/drivers/staging/dream/camera/msm_camera.c +++ b/drivers/staging/dream/camera/msm_camera.c @@ -2,7 +2,7 @@ * Copyright (C) 2008-2009 QUALCOMM Incorporated. */ -//FIXME: most allocations need not be GFP_ATOMIC +/* FIXME: most allocations need not be GFP_ATOMIC */ /* FIXME: management of mutexes */ /* FIXME: msm_pmem_region_lookup return values */ /* FIXME: way too many copy to/from user */ @@ -361,7 +361,7 @@ static int __msm_get_frame(struct msm_sync *sync, if (!frame->buffer) { pr_err("%s: cannot get frame, invalid lookup address " "y=%x cbcr=%x offset=%d\n", - __FUNCTION__, + __func__, pphy->y_phy, pphy->cbcr_phy, frame->y_off); @@ -455,7 +455,7 @@ static int msm_disable_vfe(struct msm_sync *sync, void __user *arg) return rc; } -static struct msm_queue_cmd* __msm_control(struct msm_sync *sync, +static struct msm_queue_cmd *__msm_control(struct msm_sync *sync, struct msm_control_device_queue *queue, struct msm_queue_cmd *qcmd, int timeout) From 71508ee489e09dc206ea3f62542dd3bd11c0e201 Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Mon, 15 Feb 2010 12:25:22 +0100 Subject: [PATCH 356/367] Staging: wlan-ng: fix most of the style issues in hfa384x.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch fixes all the errors and the majority of the warnings found with checkpatch.pl script in hfa384x.h, following Gábor Stefanik hints Signed-off-by: Alessandro Ghedini Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/hfa384x.h | 178 ++++++++++++++++++------------ 1 file changed, 105 insertions(+), 73 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h index 46cce8159e59..5984d74dfce2 100644 --- a/drivers/staging/wlan-ng/hfa384x.h +++ b/drivers/staging/wlan-ng/hfa384x.h @@ -61,17 +61,17 @@ #include /*--- Mins & Maxs -----------------------------------*/ -#define HFA384x_PORTID_MAX ((u16)7) -#define HFA384x_NUMPORTS_MAX ((u16)(HFA384x_PORTID_MAX+1)) -#define HFA384x_PDR_LEN_MAX ((u16)512) /* in bytes, from EK */ -#define HFA384x_PDA_RECS_MAX ((u16)200) /* a guess */ -#define HFA384x_PDA_LEN_MAX ((u16)1024) /* in bytes, from EK */ -#define HFA384x_SCANRESULT_MAX ((u16)31) -#define HFA384x_HSCANRESULT_MAX ((u16)31) -#define HFA384x_CHINFORESULT_MAX ((u16)16) -#define HFA384x_RID_GUESSING_MAXLEN 2048 /* I'm not really sure */ -#define HFA384x_RIDDATA_MAXLEN HFA384x_RID_GUESSING_MAXLEN -#define HFA384x_USB_RWMEM_MAXLEN 2048 +#define HFA384x_PORTID_MAX ((u16)7) +#define HFA384x_NUMPORTS_MAX ((u16)(HFA384x_PORTID_MAX+1)) +#define HFA384x_PDR_LEN_MAX ((u16)512) /* in bytes, from EK */ +#define HFA384x_PDA_RECS_MAX ((u16)200) /* a guess */ +#define HFA384x_PDA_LEN_MAX ((u16)1024) /* in bytes, from EK*/ +#define HFA384x_SCANRESULT_MAX ((u16)31) +#define HFA384x_HSCANRESULT_MAX ((u16)31) +#define HFA384x_CHINFORESULT_MAX ((u16)16) +#define HFA384x_RID_GUESSING_MAXLEN 2048 /* I'm not really sure */ +#define HFA384x_RIDDATA_MAXLEN HFA384x_RID_GUESSING_MAXLEN +#define HFA384x_USB_RWMEM_MAXLEN 2048 /*--- Support Constants -----------------------------*/ #define HFA384x_PORTTYPE_IBSS ((u16)0) @@ -114,9 +114,9 @@ #define HFA384x_ADDR_AUX_OFF_MASK (0x007f) /* Make a 32-bit flat address from AUX format 16-bit page and offset */ -#define HFA384x_ADDR_AUX_MKFLAT(p, o) \ - (((u32)(((u16)(p))&HFA384x_ADDR_AUX_PAGE_MASK)) << 7) | \ - ((u32)(((u16)(o))&HFA384x_ADDR_AUX_OFF_MASK)) +#define HFA384x_ADDR_AUX_MKFLAT(p, o) \ + ((((u32)(((u16)(p))&HFA384x_ADDR_AUX_PAGE_MASK)) << 7) | \ + ((u32)(((u16)(o))&HFA384x_ADDR_AUX_OFF_MASK))) /* Make CMD format offset and page from a 32-bit flat address */ #define HFA384x_ADDR_CMD_MKPAGE(f) \ @@ -135,12 +135,21 @@ #define HFA384x_DLSTATE_FLASHENABLED 2 /*--- Register Field Masks --------------------------*/ -#define HFA384x_CMD_AINFO ((u16)(BIT(14) | BIT(13) | BIT(12) | BIT(11) | BIT(10) | BIT(9) | BIT(8))) -#define HFA384x_CMD_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8))) +#define HFA384x_CMD_AINFO ((u16)(BIT(14) | BIT(13) \ + | BIT(12) | BIT(11) \ + | BIT(10) | BIT(9) \ + | BIT(8))) +#define HFA384x_CMD_MACPORT ((u16)(BIT(10) | BIT(9) | \ + BIT(8))) #define HFA384x_CMD_PROGMODE ((u16)(BIT(9) | BIT(8))) -#define HFA384x_CMD_CMDCODE ((u16)(BIT(5) | BIT(4) | BIT(3) | BIT(2) | BIT(1) | BIT(0))) +#define HFA384x_CMD_CMDCODE ((u16)(BIT(5) | BIT(4) | \ + BIT(3) | BIT(2) | \ + BIT(1) | BIT(0))) -#define HFA384x_STATUS_RESULT ((u16)(BIT(14) | BIT(13) | BIT(12) | BIT(11) | BIT(10) | BIT(9) | BIT(8))) +#define HFA384x_STATUS_RESULT ((u16)(BIT(14) | BIT(13) \ + | BIT(12) | BIT(11) \ + | BIT(10) | BIT(9) \ + | BIT(8))) /*--- Command Code Constants --------------------------*/ /*--- Controller Commands --------------------------*/ @@ -244,8 +253,10 @@ Information RID Lengths: MAC Information This is the length of JUST the DATA part of the RID (does not include the len or code fields) --------------------------------------------------------------------*/ -#define HFA384x_RID_DBMCOMMSQUALITY_LEN ((u16)sizeof(hfa384x_dbmcommsquality_t)) -#define HFA384x_RID_JOINREQUEST_LEN ((u16)sizeof(hfa384x_JoinRequest_data_t)) +#define HFA384x_RID_DBMCOMMSQUALITY_LEN \ + ((u16) sizeof(hfa384x_dbmcommsquality_t)) +#define HFA384x_RID_JOINREQUEST_LEN \ + ((u16)sizeof(hfa384x_JoinRequest_data_t)) /*-------------------------------------------------------------------- Information RIDs: Modem Information @@ -322,9 +333,11 @@ PD Record codes /*--- Register Test/Get/Set Field macros ------------------------*/ -#define HFA384x_CMD_AINFO_SET(value) ((u16)((u16)(value) << 8)) -#define HFA384x_CMD_MACPORT_SET(value) ((u16)HFA384x_CMD_AINFO_SET(value)) -#define HFA384x_CMD_PROGMODE_SET(value) ((u16)HFA384x_CMD_AINFO_SET((u16)value)) +#define HFA384x_CMD_AINFO_SET(value) ((u16)((u16)(value) << 8)) +#define HFA384x_CMD_MACPORT_SET(value) \ + ((u16)HFA384x_CMD_AINFO_SET(value)) +#define HFA384x_CMD_PROGMODE_SET(value) \ + ((u16)HFA384x_CMD_AINFO_SET((u16)value)) #define HFA384x_CMD_CMDCODE_SET(value) ((u16)(value)) #define HFA384x_STATUS_RESULT_SET(value) (((u16)(value)) << 8) @@ -402,7 +415,7 @@ typedef struct hfa384x_authenticateStation_data { /*-- Configuration Record: WPAData (data portion only) --*/ typedef struct hfa384x_WPAData { u16 datalen; - u8 data[0]; // max 80 + u8 data[0]; /* max 80 */ } __attribute__ ((packed)) hfa384x_WPAData_t; /*-------------------------------------------------------------------- @@ -479,7 +492,8 @@ Communication Frames: Field Masks for Transmit Frames #define HFA384x_TXSTATUS_AGEDERR ((u16)BIT(1)) #define HFA384x_TXSTATUS_RETRYERR ((u16)BIT(0)) /*-- Transmit Control Field --*/ -#define HFA384x_TX_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8))) +#define HFA384x_TX_MACPORT ((u16)(BIT(10) | \ + BIT(9) | BIT(8))) #define HFA384x_TX_STRUCTYPE ((u16)(BIT(4) | BIT(3))) #define HFA384x_TX_TXEX ((u16)BIT(2)) #define HFA384x_TX_TXOK ((u16)BIT(1)) @@ -496,7 +510,8 @@ Communication Frames: Test/Get/Set Field Values for Transmit Frames #define HFA384x_TX_SET(v, m, s) ((((u16)(v))<<((u16)(s)))&((u16)(m))) #define HFA384x_TX_MACPORT_SET(v) HFA384x_TX_SET(v, HFA384x_TX_MACPORT, 8) -#define HFA384x_TX_STRUCTYPE_SET(v) HFA384x_TX_SET(v, HFA384x_TX_STRUCTYPE, 3) +#define HFA384x_TX_STRUCTYPE_SET(v) HFA384x_TX_SET(v, \ + HFA384x_TX_STRUCTYPE, 3) #define HFA384x_TX_TXEX_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXEX, 2) #define HFA384x_TX_TXOK_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXOK, 1) /*-------------------------------------------------------------------- @@ -534,13 +549,17 @@ Communication Frames: Field Masks for Receive Frames --------------------------------------------------------------------*/ /*-- Status Fields --*/ -#define HFA384x_RXSTATUS_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8))) +#define HFA384x_RXSTATUS_MACPORT ((u16)(BIT(10) | \ + BIT(9) | \ + BIT(8))) #define HFA384x_RXSTATUS_FCSERR ((u16)BIT(0)) /*-------------------------------------------------------------------- Communication Frames: Test/Get/Set Field Values for Receive Frames --------------------------------------------------------------------*/ -#define HFA384x_RXSTATUS_MACPORT_GET(value) ((u16)((((u16)(value)) & HFA384x_RXSTATUS_MACPORT) >> 8)) -#define HFA384x_RXSTATUS_ISFCSERR(value) ((u16)(((u16)(value)) & HFA384x_RXSTATUS_FCSERR)) +#define HFA384x_RXSTATUS_MACPORT_GET(value) ((u16)((((u16)(value)) \ + & HFA384x_RXSTATUS_MACPORT) >> 8)) +#define HFA384x_RXSTATUS_ISFCSERR(value) ((u16)(((u16)(value)) \ + & HFA384x_RXSTATUS_FCSERR)) /*-------------------------------------------------------------------- FRAME STRUCTURES: Information Types and Information Frame Structures ---------------------------------------------------------------------- @@ -1133,7 +1152,7 @@ struct hfa384x; typedef void (*ctlx_cmdcb_t) (struct hfa384x *, const struct hfa384x_usbctlx *); -typedef void (*ctlx_usercb_t) (struct hfa384x * hw, +typedef void (*ctlx_usercb_t) (struct hfa384x *hw, void *ctlxresult, void *usercb_data); typedef struct hfa384x_usbctlx { @@ -1174,14 +1193,14 @@ typedef struct hfa484x_metacmd { } hfa384x_metacmd_t; #define MAX_GRP_ADDR 32 -#define WLAN_COMMENT_MAX 80 /* Max. length of user comment string. */ +#define WLAN_COMMENT_MAX 80 /* Max. length of user comment string. */ -#define WLAN_AUTH_MAX 60 /* Max. # of authenticated stations. */ -#define WLAN_ACCESS_MAX 60 /* Max. # of stations in an access list. */ -#define WLAN_ACCESS_NONE 0 /* No stations may be authenticated. */ -#define WLAN_ACCESS_ALL 1 /* All stations may be authenticated. */ -#define WLAN_ACCESS_ALLOW 2 /* Authenticate only "allowed" stations. */ -#define WLAN_ACCESS_DENY 3 /* Do not authenticate "denied" stations. */ +#define WLAN_AUTH_MAX 60 /* Max. # of authenticated stations. */ +#define WLAN_ACCESS_MAX 60 /* Max. # of stations in an access list. */ +#define WLAN_ACCESS_NONE 0 /* No stations may be authenticated. */ +#define WLAN_ACCESS_ALL 1 /* All stations may be authenticated. */ +#define WLAN_ACCESS_ALLOW 2 /* Authenticate only "allowed" stations. */ +#define WLAN_ACCESS_DENY 3 /* Do not authenticate "denied" stations. */ /* XXX These are going away ASAP */ typedef struct prism2sta_authlist { @@ -1294,10 +1313,23 @@ typedef struct hfa384x { hfa384x_caplevel_t cap_sup_ap; /* Actor compatibility ranges */ - hfa384x_caplevel_t cap_act_pri_cfi; /* pri f/w to controller interface */ - hfa384x_caplevel_t cap_act_sta_cfi; /* sta f/w to controller interface */ + hfa384x_caplevel_t cap_act_pri_cfi; /* + * pri f/w to controller + * interface + */ + + hfa384x_caplevel_t cap_act_sta_cfi; /* + * sta f/w to controller + * interface + */ + hfa384x_caplevel_t cap_act_sta_mfi; /* sta f/w to modem interface */ - hfa384x_caplevel_t cap_act_ap_cfi; /* ap f/w to controller interface */ + + hfa384x_caplevel_t cap_act_ap_cfi; /* + * ap f/w to controller + * interface + */ + hfa384x_caplevel_t cap_act_ap_mfi; /* ap f/w to modem interface */ u32 psusercount; /* Power save user count. */ @@ -1320,25 +1352,25 @@ typedef struct hfa384x { } hfa384x_t; -void hfa384x_create(hfa384x_t * hw, struct usb_device *usb); -void hfa384x_destroy(hfa384x_t * hw); +void hfa384x_create(hfa384x_t *hw, struct usb_device *usb); +void hfa384x_destroy(hfa384x_t *hw); int -hfa384x_corereset(hfa384x_t * hw, int holdtime, int settletime, int genesis); -int hfa384x_drvr_commtallies(hfa384x_t * hw); -int hfa384x_drvr_disable(hfa384x_t * hw, u16 macport); -int hfa384x_drvr_enable(hfa384x_t * hw, u16 macport); -int hfa384x_drvr_flashdl_enable(hfa384x_t * hw); -int hfa384x_drvr_flashdl_disable(hfa384x_t * hw); -int hfa384x_drvr_flashdl_write(hfa384x_t * hw, u32 daddr, void *buf, u32 len); -int hfa384x_drvr_getconfig(hfa384x_t * hw, u16 rid, void *buf, u16 len); -int hfa384x_drvr_ramdl_enable(hfa384x_t * hw, u32 exeaddr); -int hfa384x_drvr_ramdl_disable(hfa384x_t * hw); -int hfa384x_drvr_ramdl_write(hfa384x_t * hw, u32 daddr, void *buf, u32 len); -int hfa384x_drvr_readpda(hfa384x_t * hw, void *buf, unsigned int len); -int hfa384x_drvr_setconfig(hfa384x_t * hw, u16 rid, void *buf, u16 len); +hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime, int genesis); +int hfa384x_drvr_commtallies(hfa384x_t *hw); +int hfa384x_drvr_disable(hfa384x_t *hw, u16 macport); +int hfa384x_drvr_enable(hfa384x_t *hw, u16 macport); +int hfa384x_drvr_flashdl_enable(hfa384x_t *hw); +int hfa384x_drvr_flashdl_disable(hfa384x_t *hw); +int hfa384x_drvr_flashdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len); +int hfa384x_drvr_getconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len); +int hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr); +int hfa384x_drvr_ramdl_disable(hfa384x_t *hw); +int hfa384x_drvr_ramdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len); +int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len); +int hfa384x_drvr_setconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len); -static inline int hfa384x_drvr_getconfig16(hfa384x_t * hw, u16 rid, void *val) +static inline int hfa384x_drvr_getconfig16(hfa384x_t *hw, u16 rid, void *val) { int result = 0; result = hfa384x_drvr_getconfig(hw, rid, val, sizeof(u16)); @@ -1347,46 +1379,46 @@ static inline int hfa384x_drvr_getconfig16(hfa384x_t * hw, u16 rid, void *val) return result; } -static inline int hfa384x_drvr_setconfig16(hfa384x_t * hw, u16 rid, u16 val) +static inline int hfa384x_drvr_setconfig16(hfa384x_t *hw, u16 rid, u16 val) { u16 value = cpu_to_le16(val); return hfa384x_drvr_setconfig(hw, rid, &value, sizeof(value)); } int -hfa384x_drvr_getconfig_async(hfa384x_t * hw, +hfa384x_drvr_getconfig_async(hfa384x_t *hw, u16 rid, ctlx_usercb_t usercb, void *usercb_data); int -hfa384x_drvr_setconfig_async(hfa384x_t * hw, +hfa384x_drvr_setconfig_async(hfa384x_t *hw, u16 rid, void *buf, u16 len, ctlx_usercb_t usercb, void *usercb_data); static inline int -hfa384x_drvr_setconfig16_async(hfa384x_t * hw, u16 rid, u16 val) +hfa384x_drvr_setconfig16_async(hfa384x_t *hw, u16 rid, u16 val) { u16 value = cpu_to_le16(val); return hfa384x_drvr_setconfig_async(hw, rid, &value, sizeof(value), NULL, NULL); } -int hfa384x_drvr_start(hfa384x_t * hw); -int hfa384x_drvr_stop(hfa384x_t * hw); +int hfa384x_drvr_start(hfa384x_t *hw); +int hfa384x_drvr_stop(hfa384x_t *hw); int -hfa384x_drvr_txframe(hfa384x_t * hw, struct sk_buff *skb, - p80211_hdr_t * p80211_hdr, p80211_metawep_t * p80211_wep); -void hfa384x_tx_timeout(wlandevice_t * wlandev); +hfa384x_drvr_txframe(hfa384x_t *hw, struct sk_buff *skb, + p80211_hdr_t *p80211_hdr, p80211_metawep_t *p80211_wep); +void hfa384x_tx_timeout(wlandevice_t *wlandev); -int hfa384x_cmd_initialize(hfa384x_t * hw); -int hfa384x_cmd_enable(hfa384x_t * hw, u16 macport); -int hfa384x_cmd_disable(hfa384x_t * hw, u16 macport); -int hfa384x_cmd_allocate(hfa384x_t * hw, u16 len); -int hfa384x_cmd_monitor(hfa384x_t * hw, u16 enable); +int hfa384x_cmd_initialize(hfa384x_t *hw); +int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport); +int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport); +int hfa384x_cmd_allocate(hfa384x_t *hw, u16 len); +int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable); int -hfa384x_cmd_download(hfa384x_t * hw, +hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr, u16 highaddr, u16 codelen); -#endif /* __KERNEL__ */ +#endif /*__KERNEL__ */ -#endif /* _HFA384x_H */ +#endif /*_HFA384x_H */ From d4023a5ee2f683f57636346c0baf94cda710055a Mon Sep 17 00:00:00 2001 From: Chihau Chau Date: Thu, 25 Feb 2010 18:13:00 -0300 Subject: [PATCH 357/367] Staging: dream: camera: msm_camera: fix some code style issues This fixes some code style issues like else staments after the close braces '}' and to use __func__ instead of __FUNCTION__. Signed-off-by: Chihau Chau Acked-by: Pavel Machek Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dream/camera/msm_camera.c | 37 +++++++++++------------ 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/drivers/staging/dream/camera/msm_camera.c b/drivers/staging/dream/camera/msm_camera.c index 4f808dc2ca48..925e16c324d2 100644 --- a/drivers/staging/dream/camera/msm_camera.c +++ b/drivers/staging/dream/camera/msm_camera.c @@ -670,7 +670,7 @@ static int msm_get_stats(struct msm_sync *sync, void __user *arg) &(stats.fd)); if (!stats.buffer) { pr_err("%s: msm_pmem_stats_ptov_lookup error\n", - __FUNCTION__); + __func__); rc = -EINVAL; goto failure; } @@ -718,8 +718,7 @@ static int msm_get_stats(struct msm_sync *sync, void __user *arg) buf.fmain.buffer = (unsigned long)region.vaddr; buf.fmain.fd = region.fd; - } - else { + } else { pr_err("%s: pmem lookup failed\n", __func__); rc = -EINVAL; @@ -838,8 +837,8 @@ static int msm_ctrl_cmd_done(struct msm_control_device *ctrl_pmsm, kfree(qcmd); goto end; } - } - else ctrlcmd->value = NULL; + } else + ctrlcmd->value = NULL; end: CDBG("msm_ctrl_cmd_done: end rc = %d\n", rc); @@ -876,7 +875,7 @@ static int msm_config_vfe(struct msm_sync *sync, void __user *arg) MSM_PMEM_AEC_AWB, ®ion[0], NUM_WB_EXP_STAT_OUTPUT_BUFFERS); if (!axi_data.bufnum1) { - pr_err("%s: pmem region lookup error\n", __FUNCTION__); + pr_err("%s: pmem region lookup error\n", __func__); return -EINVAL; } axi_data.region = ®ion[0]; @@ -888,7 +887,7 @@ static int msm_config_vfe(struct msm_sync *sync, void __user *arg) MSM_PMEM_AF, ®ion[0], NUM_AF_STAT_OUTPUT_BUFFERS); if (!axi_data.bufnum1) { - pr_err("%s: pmem region lookup error\n", __FUNCTION__); + pr_err("%s: pmem region lookup error\n", __func__); return -EINVAL; } axi_data.region = ®ion[0]; @@ -899,7 +898,7 @@ static int msm_config_vfe(struct msm_sync *sync, void __user *arg) break; default: pr_err("%s: unknown command type %d\n", - __FUNCTION__, cfgcmd.cmd_type); + __func__, cfgcmd.cmd_type); return -EINVAL; } @@ -928,7 +927,7 @@ static int msm_frame_axi_cfg(struct msm_sync *sync, msm_pmem_region_lookup(&sync->frame, pmem_type, ®ion[0], 8); if (!axi_data.bufnum1) { - pr_err("%s: pmem region lookup error\n", __FUNCTION__); + pr_err("%s: pmem region lookup error\n", __func__); return -EINVAL; } break; @@ -939,7 +938,7 @@ static int msm_frame_axi_cfg(struct msm_sync *sync, msm_pmem_region_lookup(&sync->frame, pmem_type, ®ion[0], 8); if (!axi_data.bufnum2) { - pr_err("%s: pmem region lookup error\n", __FUNCTION__); + pr_err("%s: pmem region lookup error\n", __func__); return -EINVAL; } break; @@ -950,7 +949,7 @@ static int msm_frame_axi_cfg(struct msm_sync *sync, msm_pmem_region_lookup(&sync->frame, pmem_type, ®ion[0], 8); if (!axi_data.bufnum1) { - pr_err("%s: pmem region lookup error\n", __FUNCTION__); + pr_err("%s: pmem region lookup error\n", __func__); return -EINVAL; } @@ -959,7 +958,7 @@ static int msm_frame_axi_cfg(struct msm_sync *sync, msm_pmem_region_lookup(&sync->frame, pmem_type, ®ion[axi_data.bufnum1], 8); if (!axi_data.bufnum2) { - pr_err("%s: pmem region lookup error\n", __FUNCTION__); + pr_err("%s: pmem region lookup error\n", __func__); return -EINVAL; } break; @@ -970,7 +969,7 @@ static int msm_frame_axi_cfg(struct msm_sync *sync, msm_pmem_region_lookup(&sync->frame, pmem_type, ®ion[0], 8); if (!axi_data.bufnum2) { - pr_err("%s: pmem region lookup error\n", __FUNCTION__); + pr_err("%s: pmem region lookup error\n", __func__); return -EINVAL; } break; @@ -981,7 +980,7 @@ static int msm_frame_axi_cfg(struct msm_sync *sync, default: pr_err("%s: unknown command type %d\n", - __FUNCTION__, cfgcmd->cmd_type); + __func__, cfgcmd->cmd_type); return -EINVAL; } @@ -1047,7 +1046,7 @@ static int __msm_put_frame_buf(struct msm_sync *sync, rc = sync->vfefn.vfe_config(&cfgcmd, &pphy); } else { pr_err("%s: msm_pmem_frame_vtop_lookup failed\n", - __FUNCTION__); + __func__); rc = -EINVAL; } @@ -1131,7 +1130,7 @@ static int msm_stats_axi_cfg(struct msm_sync *sync, break; default: pr_err("%s: unknown command type %d\n", - __FUNCTION__, cfgcmd->cmd_type); + __func__, cfgcmd->cmd_type); return -EINVAL; } @@ -1140,7 +1139,7 @@ static int msm_stats_axi_cfg(struct msm_sync *sync, msm_pmem_region_lookup(&sync->stats, pmem_type, ®ion[0], NUM_WB_EXP_STAT_OUTPUT_BUFFERS); if (!axi_data.bufnum1) { - pr_err("%s: pmem region lookup error\n", __FUNCTION__); + pr_err("%s: pmem region lookup error\n", __func__); return -EINVAL; } axi_data.region = ®ion[0]; @@ -1177,7 +1176,7 @@ static int msm_put_stats_buffer(struct msm_sync *sync, void __user *arg) cfgcmd.cmd_type = CMD_STATS_AF_BUF_RELEASE; else { pr_err("%s: invalid buf type %d\n", - __FUNCTION__, + __func__, buf.type); rc = -EINVAL; goto put_done; @@ -1223,7 +1222,7 @@ static int msm_axi_config(struct msm_sync *sync, void __user *arg) default: pr_err("%s: unknown command type %d\n", - __FUNCTION__, + __func__, cfgcmd.cmd_type); return -EINVAL; } From a917d4c4251314afc196fd7a7d9d10faff2effda Mon Sep 17 00:00:00 2001 From: Chihau Chau Date: Thu, 25 Feb 2010 17:40:28 -0300 Subject: [PATCH 358/367] Staging: comedi: poc: Adding some KERN_ facility level This fixes some coding style issues like include KERN_ facility levels in some printk() and one trailing whitespace error. Signed-off-by: Chihau Chau Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/poc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/poc.c b/drivers/staging/comedi/drivers/poc.c index 28eba6d3cb5a..e15fbd7d3141 100644 --- a/drivers/staging/comedi/drivers/poc.c +++ b/drivers/staging/comedi/drivers/poc.c @@ -122,22 +122,21 @@ static int poc_attach(struct comedi_device *dev, struct comedi_devconfig *it) unsigned int iosize; iobase = it->options[0]; - printk("comedi%d: poc: using %s iobase 0x%lx\n", dev->minor, + printk(KERN_INFO "comedi%d: poc: using %s iobase 0x%lx\n", dev->minor, this_board->name, iobase); dev->board_name = this_board->name; if (iobase == 0) { - printk("io base address required\n"); + printk(KERN_ERR "io base address required\n"); return -EINVAL; } iosize = this_board->iosize; /* check if io addresses are available */ if (!request_region(iobase, iosize, "dac02")) { - printk - ("I/O port conflict: failed to allocate ports 0x%lx to " - "0x%lx\n", iobase, iobase + iosize - 1); + printk(KERN_ERR "I/O port conflict: failed to allocate ports " + "0x%lx to 0x%lx\n", iobase, iobase + iosize - 1); return -EIO; } dev->iobase = iobase; From 8377e813c75cf5aca46032fb780ca74c923dbe86 Mon Sep 17 00:00:00 2001 From: Maurice Dawson Date: Fri, 19 Feb 2010 10:53:13 +0000 Subject: [PATCH 359/367] Staging: comedi: fix brace coding style issue in ni_labpc.c This is a patch to the ni_labpc.c file that fixes up a brace warning found by the checkpatch.pl tool. Signed-off-by: Maurice Dawson Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_labpc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index dc3f398cb3ed..a01e35d4b31e 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -483,12 +483,10 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase, printk("comedi%d: ni_labpc: %s, io 0x%lx", dev->minor, thisboard->name, iobase); - if (irq) { + if (irq) printk(", irq %u", irq); - } - if (dma_chan) { + if (dma_chan) printk(", dma %u", dma_chan); - } printk("\n"); if (iobase == 0) { From 2bb9c335902a5d59fc084170aaae0ccc9d9d4012 Mon Sep 17 00:00:00 2001 From: Maurice Dawson Date: Fri, 19 Feb 2010 10:53:14 +0000 Subject: [PATCH 360/367] Staging: comedi: fix another brace coding style issues in ni_labpc.c This is a patch to the ni_labpc.c file that fixes up a brace warning found by the checkpatch.pl tool Signed-off-by: Maurice Dawson Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_labpc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index a01e35d4b31e..5dc8606009aa 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -638,9 +638,8 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase, s->insn_read = labpc_eeprom_read_insn; s->insn_write = labpc_eeprom_write_insn; - for (i = 0; i < EEPROM_SIZE; i++) { + for (i = 0; i < EEPROM_SIZE; i++) devpriv->eeprom_data[i] = labpc_eeprom_read(dev, i); - } #ifdef LABPC_DEBUG printk(" eeprom:"); for (i = 0; i < EEPROM_SIZE; i++) { From 65d6d26c6bcd802ebe2b22a29d9b6bbebfd8d7f8 Mon Sep 17 00:00:00 2001 From: Maurice Dawson Date: Fri, 19 Feb 2010 10:53:15 +0000 Subject: [PATCH 361/367] Staging: comedi: fix yet another brace coding style issue in ni_labpc.c This is a patch to the ni_labpc.c file that fixes up all the brace warnings found by the checkpatch.pl tool Signed-off-by: Maurice Dawson Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_labpc.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index 5dc8606009aa..d6b5c05ee199 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -642,9 +642,8 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase, devpriv->eeprom_data[i] = labpc_eeprom_read(dev, i); #ifdef LABPC_DEBUG printk(" eeprom:"); - for (i = 0; i < EEPROM_SIZE; i++) { + for (i = 0; i < EEPROM_SIZE; i++) printk(" %i:0x%x ", i, devpriv->eeprom_data[i]); - } printk("\n"); #endif } else @@ -676,9 +675,8 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it) case pci_bustype: #ifdef CONFIG_COMEDI_PCI retval = labpc_find_device(dev, it->options[0], it->options[1]); - if (retval < 0) { + if (retval < 0) return retval; - } retval = mite_setup(devpriv->mite); if (retval < 0) return retval; @@ -1005,9 +1003,9 @@ static int labpc_ai_cmdtest(struct comedi_device *dev, err++; } - if (!cmd->chanlist_len) { + if (!cmd->chanlist_len) err++; - } + if (cmd->scan_end_arg != cmd->chanlist_len) { cmd->scan_end_arg = cmd->chanlist_len; err++; @@ -1102,9 +1100,9 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) devpriv->write_byte(devpriv->command3_bits, dev->iobase + COMMAND3_REG); /* initialize software conversion count */ - if (cmd->stop_src == TRIG_COUNT) { + if (cmd->stop_src == TRIG_COUNT) devpriv->count = cmd->stop_arg * cmd->chanlist_len; - } + /* setup hardware conversion counter */ if (cmd->stop_src == TRIG_EXT) { /* load counter a1 with count of 3 (pc+ manual says this is minimum allowed) using mode 0 */ @@ -1476,9 +1474,9 @@ static void labpc_drain_dma(struct comedi_device *dev) } /* write data to comedi buffer */ - for (i = 0; i < num_points; i++) { + for (i = 0; i < num_points; i++) cfc_write_to_buffer(s, devpriv->dma_buffer[i]); - } + if (async->cmd.stop_src == TRIG_COUNT) devpriv->count -= num_points; @@ -1861,9 +1859,9 @@ static unsigned int labpc_serial_in(struct comedi_device *dev) udelay(1); devpriv->status2_bits = devpriv->read_byte(dev->iobase + STATUS2_REG); - if (devpriv->status2_bits & EEPROM_OUT_BIT) { + if (devpriv->status2_bits & EEPROM_OUT_BIT) value |= 1 << (value_width - i); - } + } return value; From 639b9f1ee5987270be2bca4bf8b7e6110d3b47ec Mon Sep 17 00:00:00 2001 From: Stewart Robertson Date: Sun, 21 Feb 2010 11:21:37 +0000 Subject: [PATCH 362/367] Staging: comedi: fix suspect code indent in ni_labpc.c This is a patch to the ni_labpc.c file that fixes suspect code indent for conditional statements found by the checkpatch.pl tool Signed-off-by: Stewart Robertson Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_labpc.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index d6b5c05ee199..ddc3b0715dc3 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -583,8 +583,11 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase, /* analog output */ s = dev->subdevices + 1; if (thisboard->has_ao) { -/* Could provide command support, except it only has a one sample - * hardware buffer for analog output and no underrun flag. */ + /* + * Could provide command support, except it only has a + * one sample hardware buffer for analog output and no + * underrun flag. + */ s->type = COMEDI_SUBD_AO; s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_GROUND; s->n_chan = NUM_AO_CHAN; @@ -1356,7 +1359,10 @@ static irqreturn_t labpc_interrupt(int irq, void *d) } if (devpriv->current_transfer == isa_dma_transfer) { - /* if a dma terminal count of external stop trigger has occurred */ + /* + * if a dma terminal count of external stop trigger + * has occurred + */ if (devpriv->status1_bits & DMATC_BIT || (thisboard->register_layout == labpc_1200_layout && devpriv->status2_bits & A1_TC_BIT)) { From 6705b68d0be284e2f9949f3657ea65d426d0f988 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 26 Feb 2010 10:14:55 +0100 Subject: [PATCH 363/367] Staging: comedi: comedi_fops.c: Checkpatch cleanup ERROR: do not initialise externals to 0 or NULL +int comedi_num_legacy_minors = 0; WARNING: braces {} are not necessary for single statement blocks + if (s->subdev_flags & SDF_CMD_READ) { + kill_fasync(&dev->async_queue, SIGIO, POLL_IN); + } WARNING: braces {} are not necessary for single statement blocks + if (s->subdev_flags & SDF_CMD_WRITE) { + kill_fasync(&dev->async_queue, SIGIO, POLL_OUT); + } Signed-off-by: Andrea Gelmini Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/comedi_fops.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 8117748ad5a5..aca96747e5e2 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -63,7 +63,7 @@ module_param(comedi_debug, int, 0644); int comedi_autoconfig = 1; module_param(comedi_autoconfig, bool, 0444); -int comedi_num_legacy_minors = 0; +int comedi_num_legacy_minors; module_param(comedi_num_legacy_minors, int, 0444); static DEFINE_SPINLOCK(comedi_file_info_table_lock); @@ -1510,7 +1510,7 @@ static unsigned int comedi_poll(struct file *file, poll_table * wait) } static ssize_t comedi_write(struct file *file, const char *buf, size_t nbytes, - loff_t * offset) + loff_t *offset) { struct comedi_subdevice *s; struct comedi_async *async; @@ -1612,7 +1612,7 @@ done: } static ssize_t comedi_read(struct file *file, char *buf, size_t nbytes, - loff_t * offset) + loff_t *offset) { struct comedi_subdevice *s; struct comedi_async *async; @@ -2004,12 +2004,10 @@ void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s) if (async->cb_mask & s->async->events) { if (comedi_get_subdevice_runflags(s) & SRF_USER) { wake_up_interruptible(&async->wait_head); - if (s->subdev_flags & SDF_CMD_READ) { + if (s->subdev_flags & SDF_CMD_READ) kill_fasync(&dev->async_queue, SIGIO, POLL_IN); - } - if (s->subdev_flags & SDF_CMD_WRITE) { + if (s->subdev_flags & SDF_CMD_WRITE) kill_fasync(&dev->async_queue, SIGIO, POLL_OUT); - } } else { if (async->cb_func) async->cb_func(s->async->events, async->cb_arg); From ef1a0ed7f1793531e5fb3ee489cb1e2b627f76fd Mon Sep 17 00:00:00 2001 From: Andrew Elwell Date: Thu, 18 Feb 2010 23:56:12 +0100 Subject: [PATCH 364/367] Staging: wlan-ng - checkpatch.pl fixups Basic fixups in the staging/wlan-ng directory. (First kernel patch - thanks to FOSDEM talk) Signed-off-by: Andrew Elwell Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/hfa384x_usb.c | 12 ++--- drivers/staging/wlan-ng/p80211conv.h | 4 +- drivers/staging/wlan-ng/p80211metadef.h | 18 +++---- drivers/staging/wlan-ng/p80211mgmt.h | 42 +++++++-------- drivers/staging/wlan-ng/p80211netdev.c | 4 +- drivers/staging/wlan-ng/p80211netdev.h | 42 +++++++-------- drivers/staging/wlan-ng/p80211req.c | 2 +- drivers/staging/wlan-ng/p80211req.h | 2 +- drivers/staging/wlan-ng/p80211types.h | 12 ++--- drivers/staging/wlan-ng/p80211wext.c | 56 ++++++++++---------- drivers/staging/wlan-ng/prism2fw.c | 69 ++++++++++++------------- drivers/staging/wlan-ng/prism2mgmt.c | 30 +++++------ drivers/staging/wlan-ng/prism2mgmt.h | 48 ++++++++--------- drivers/staging/wlan-ng/prism2mib.c | 11 ++-- drivers/staging/wlan-ng/prism2sta.c | 23 ++++----- 15 files changed, 182 insertions(+), 193 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 925678babd9e..730d085c3f87 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -118,15 +118,15 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include #include -#define SUBMIT_URB(u,f) usb_submit_urb(u,f) +#define SUBMIT_URB(u, f) usb_submit_urb(u, f) #include "p80211types.h" #include "p80211hdr.h" @@ -627,7 +627,7 @@ static hfa384x_usbctlx_t *usbctlx_alloc(void) { hfa384x_usbctlx_t *ctlx; - ctlx = kmalloc(sizeof(*ctlx), in_interrupt()? GFP_ATOMIC : GFP_KERNEL); + ctlx = kmalloc(sizeof(*ctlx), in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); if (ctlx != NULL) { memset(ctlx, 0, sizeof(*ctlx)); init_completion(&ctlx->done); @@ -675,7 +675,7 @@ struct usbctlx_cmd_completor { }; typedef struct usbctlx_cmd_completor usbctlx_cmd_completor_t; -static int usbctlx_cmd_completor_fn(usbctlx_completor_t * head) +static int usbctlx_cmd_completor_fn(usbctlx_completor_t *head) { usbctlx_cmd_completor_t *complete = (usbctlx_cmd_completor_t *) head; return usbctlx_get_status(complete->cmdresp, complete->result); @@ -3642,7 +3642,7 @@ static void hfa384x_int_rxmonitor(wlandevice_t *wlandev, /* check for unencrypted stuff if WEP bit set. */ if (*(datap - hdrlen + 1) & 0x40) /* wep set */ if ((*(datap) == 0xaa) && (*(datap + 1) == 0xaa)) - *(datap - hdrlen + 1) &= 0xbf; // clear wep; it's the 802.2 header! + *(datap - hdrlen + 1) &= 0xbf; /* clear wep; it's the 802.2 header! */ } if (hw->sniff_fcs) { diff --git a/drivers/staging/wlan-ng/p80211conv.h b/drivers/staging/wlan-ng/p80211conv.h index 0c62df19fa7f..6fe163be24f6 100644 --- a/drivers/staging/wlan-ng/p80211conv.h +++ b/drivers/staging/wlan-ng/p80211conv.h @@ -153,8 +153,8 @@ struct wlandevice; int skb_p80211_to_ether(struct wlandevice *wlandev, u32 ethconv, struct sk_buff *skb); int skb_ether_to_p80211(struct wlandevice *wlandev, u32 ethconv, - struct sk_buff *skb, p80211_hdr_t * p80211_hdr, - p80211_metawep_t * p80211_wep); + struct sk_buff *skb, p80211_hdr_t *p80211_hdr, + p80211_metawep_t *p80211_wep); int p80211_stt_findproto(u16 proto); diff --git a/drivers/staging/wlan-ng/p80211metadef.h b/drivers/staging/wlan-ng/p80211metadef.h index da8b6f53c74f..0ccfba1294de 100644 --- a/drivers/staging/wlan-ng/p80211metadef.h +++ b/drivers/staging/wlan-ng/p80211metadef.h @@ -190,9 +190,9 @@ (P80211DID_MKSECTION(2) | \ P80211DID_MKGROUP(1)) #define DIDmib_dot11mac_dot11OperationTable_dot11MACAddress \ - (P80211DID_MKSECTION(2) | \ - P80211DID_MKGROUP(1) | \ - P80211DID_MKITEM(1) | 0x18000000) + (P80211DID_MKSECTION(2) | \ + P80211DID_MKGROUP(1) | \ + P80211DID_MKITEM(1) | 0x18000000) #define DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold \ (P80211DID_MKSECTION(2) | \ P80211DID_MKGROUP(1) | \ @@ -210,18 +210,18 @@ P80211DID_MKGROUP(1) | \ P80211DID_MKITEM(5) | 0x18000000) #define DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime \ - (P80211DID_MKSECTION(2) | \ - P80211DID_MKGROUP(1) | \ - P80211DID_MKITEM(6) | 0x10000000) + (P80211DID_MKSECTION(2) | \ + P80211DID_MKGROUP(1) | \ + P80211DID_MKITEM(6) | 0x10000000) #define DIDmib_cat_dot11phy \ P80211DID_MKSECTION(3) #define DIDmib_dot11phy_dot11PhyOperationTable \ (P80211DID_MKSECTION(3) | \ P80211DID_MKGROUP(1)) #define DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel \ - (P80211DID_MKSECTION(3) | \ - P80211DID_MKGROUP(3) | \ - P80211DID_MKITEM(10) | 0x18000000) + (P80211DID_MKSECTION(3) | \ + P80211DID_MKGROUP(3) | \ + P80211DID_MKITEM(10) | 0x18000000) #define DIDmib_dot11phy_dot11PhyDSSSTable \ (P80211DID_MKSECTION(3) | \ P80211DID_MKGROUP(5)) diff --git a/drivers/staging/wlan-ng/p80211mgmt.h b/drivers/staging/wlan-ng/p80211mgmt.h index 14cdc86d1676..deb52f5fd780 100644 --- a/drivers/staging/wlan-ng/p80211mgmt.h +++ b/drivers/staging/wlan-ng/p80211mgmt.h @@ -100,7 +100,7 @@ #ifndef _P80211MGMT_H #define _P80211MGMT_H -#ifndef _P80211HDR_H +#ifndef _P80211HDR_H #include "p80211hdr.h" #endif @@ -496,25 +496,25 @@ typedef struct wlan_fr_deauthen { } wlan_fr_deauthen_t; -void wlan_mgmt_encode_beacon(wlan_fr_beacon_t * f); -void wlan_mgmt_decode_beacon(wlan_fr_beacon_t * f); -void wlan_mgmt_encode_disassoc(wlan_fr_disassoc_t * f); -void wlan_mgmt_decode_disassoc(wlan_fr_disassoc_t * f); -void wlan_mgmt_encode_assocreq(wlan_fr_assocreq_t * f); -void wlan_mgmt_decode_assocreq(wlan_fr_assocreq_t * f); -void wlan_mgmt_encode_assocresp(wlan_fr_assocresp_t * f); -void wlan_mgmt_decode_assocresp(wlan_fr_assocresp_t * f); -void wlan_mgmt_encode_reassocreq(wlan_fr_reassocreq_t * f); -void wlan_mgmt_decode_reassocreq(wlan_fr_reassocreq_t * f); -void wlan_mgmt_encode_reassocresp(wlan_fr_reassocresp_t * f); -void wlan_mgmt_decode_reassocresp(wlan_fr_reassocresp_t * f); -void wlan_mgmt_encode_probereq(wlan_fr_probereq_t * f); -void wlan_mgmt_decode_probereq(wlan_fr_probereq_t * f); -void wlan_mgmt_encode_proberesp(wlan_fr_proberesp_t * f); -void wlan_mgmt_decode_proberesp(wlan_fr_proberesp_t * f); -void wlan_mgmt_encode_authen(wlan_fr_authen_t * f); -void wlan_mgmt_decode_authen(wlan_fr_authen_t * f); -void wlan_mgmt_encode_deauthen(wlan_fr_deauthen_t * f); -void wlan_mgmt_decode_deauthen(wlan_fr_deauthen_t * f); +void wlan_mgmt_encode_beacon(wlan_fr_beacon_t *f); +void wlan_mgmt_decode_beacon(wlan_fr_beacon_t *f); +void wlan_mgmt_encode_disassoc(wlan_fr_disassoc_t *f); +void wlan_mgmt_decode_disassoc(wlan_fr_disassoc_t *f); +void wlan_mgmt_encode_assocreq(wlan_fr_assocreq_t *f); +void wlan_mgmt_decode_assocreq(wlan_fr_assocreq_t *f); +void wlan_mgmt_encode_assocresp(wlan_fr_assocresp_t *f); +void wlan_mgmt_decode_assocresp(wlan_fr_assocresp_t *f); +void wlan_mgmt_encode_reassocreq(wlan_fr_reassocreq_t *f); +void wlan_mgmt_decode_reassocreq(wlan_fr_reassocreq_t *f); +void wlan_mgmt_encode_reassocresp(wlan_fr_reassocresp_t *f); +void wlan_mgmt_decode_reassocresp(wlan_fr_reassocresp_t *f); +void wlan_mgmt_encode_probereq(wlan_fr_probereq_t *f); +void wlan_mgmt_decode_probereq(wlan_fr_probereq_t *f); +void wlan_mgmt_encode_proberesp(wlan_fr_proberesp_t *f); +void wlan_mgmt_decode_proberesp(wlan_fr_proberesp_t *f); +void wlan_mgmt_encode_authen(wlan_fr_authen_t *f); +void wlan_mgmt_decode_authen(wlan_fr_authen_t *f); +void wlan_mgmt_encode_deauthen(wlan_fr_deauthen_t *f); +void wlan_mgmt_decode_deauthen(wlan_fr_deauthen_t *f); #endif /* _P80211MGMT_H */ diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c index 22424c8903ee..e27d72cf5714 100644 --- a/drivers/staging/wlan-ng/p80211netdev.c +++ b/drivers/staging/wlan-ng/p80211netdev.c @@ -646,7 +646,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr) /* Set up some convenience pointers. */ mibattr = &dot11req.mibattribute; - macaddr = (p80211item_pstr6_t *) & mibattr->data; + macaddr = (p80211item_pstr6_t *) &mibattr->data; resultcode = &dot11req.resultcode; /* Set up a dot11req_mibset */ @@ -674,7 +674,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr) resultcode->data = 0; /* now fire the request */ - result = p80211req_dorequest(dev->ml_priv, (u8 *) & dot11req); + result = p80211req_dorequest(dev->ml_priv, (u8 *) &dot11req); /* If the request wasn't successful, report an error and don't * change the netdev address diff --git a/drivers/staging/wlan-ng/p80211netdev.h b/drivers/staging/wlan-ng/p80211netdev.h index 8bd9dfb3b9b4..3c8c64800567 100644 --- a/drivers/staging/wlan-ng/p80211netdev.h +++ b/drivers/staging/wlan-ng/p80211netdev.h @@ -179,16 +179,16 @@ typedef struct wlandevice { unsigned int ethconv; /* device methods (init by MSD, used by p80211 */ - int (*open) (struct wlandevice * wlandev); - int (*close) (struct wlandevice * wlandev); - void (*reset) (struct wlandevice * wlandev); - int (*txframe) (struct wlandevice * wlandev, struct sk_buff * skb, - p80211_hdr_t * p80211_hdr, - p80211_metawep_t * p80211_wep); - int (*mlmerequest) (struct wlandevice * wlandev, p80211msg_t * msg); - int (*set_multicast_list) (struct wlandevice * wlandev, - netdevice_t * dev); - void (*tx_timeout) (struct wlandevice * wlandev); + int (*open) (struct wlandevice *wlandev); + int (*close) (struct wlandevice *wlandev); + void (*reset) (struct wlandevice *wlandev); + int (*txframe) (struct wlandevice *wlandev, struct sk_buff *skb, + p80211_hdr_t *p80211_hdr, + p80211_metawep_t *p80211_wep); + int (*mlmerequest) (struct wlandevice *wlandev, p80211msg_t *msg); + int (*set_multicast_list) (struct wlandevice *wlandev, + netdevice_t *dev); + void (*tx_timeout) (struct wlandevice *wlandev); /* 802.11 State */ u8 bssid[WLAN_BSSID_LEN]; @@ -227,16 +227,16 @@ typedef struct wlandevice { } wlandevice_t; /* WEP stuff */ -int wep_change_key(wlandevice_t * wlandev, int keynum, u8 * key, int keylen); -int wep_decrypt(wlandevice_t * wlandev, u8 * buf, u32 len, int key_override, - u8 * iv, u8 * icv); -int wep_encrypt(wlandevice_t * wlandev, u8 * buf, u8 * dst, u32 len, int keynum, - u8 * iv, u8 * icv); +int wep_change_key(wlandevice_t *wlandev, int keynum, u8 *key, int keylen); +int wep_decrypt(wlandevice_t *wlandev, u8 *buf, u32 len, int key_override, + u8 *iv, u8 *icv); +int wep_encrypt(wlandevice_t *wlandev, u8 *buf, u8 *dst, u32 len, int keynum, + u8 *iv, u8 *icv); -int wlan_setup(wlandevice_t * wlandev); -int wlan_unsetup(wlandevice_t * wlandev); -int register_wlandev(wlandevice_t * wlandev); -int unregister_wlandev(wlandevice_t * wlandev); -void p80211netdev_rx(wlandevice_t * wlandev, struct sk_buff *skb); -void p80211netdev_hwremoved(wlandevice_t * wlandev); +int wlan_setup(wlandevice_t *wlandev); +int wlan_unsetup(wlandevice_t *wlandev); +int register_wlandev(wlandevice_t *wlandev); +int unregister_wlandev(wlandevice_t *wlandev); +void p80211netdev_rx(wlandevice_t *wlandev, struct sk_buff *skb); +void p80211netdev_hwremoved(wlandevice_t *wlandev); #endif diff --git a/drivers/staging/wlan-ng/p80211req.c b/drivers/staging/wlan-ng/p80211req.c index c88156cdf681..c2e95f166828 100644 --- a/drivers/staging/wlan-ng/p80211req.c +++ b/drivers/staging/wlan-ng/p80211req.c @@ -94,7 +94,7 @@ static int p80211req_mibset_mibget(wlandevice_t *wlandev, * Potentially blocks the caller, so it's a good idea to * not call this function from an interrupt context. ----------------------------------------------------------------*/ -int p80211req_dorequest(wlandevice_t * wlandev, u8 * msgbuf) +int p80211req_dorequest(wlandevice_t *wlandev, u8 *msgbuf) { int result = 0; p80211msg_t *msg = (p80211msg_t *) msgbuf; diff --git a/drivers/staging/wlan-ng/p80211req.h b/drivers/staging/wlan-ng/p80211req.h index 5d9176762ba7..a95a45a6814d 100644 --- a/drivers/staging/wlan-ng/p80211req.h +++ b/drivers/staging/wlan-ng/p80211req.h @@ -48,6 +48,6 @@ #ifndef _LINUX_P80211REQ_H #define _LINUX_P80211REQ_H -int p80211req_dorequest(wlandevice_t * wlandev, u8 * msgbuf); +int p80211req_dorequest(wlandevice_t *wlandev, u8 *msgbuf); #endif diff --git a/drivers/staging/wlan-ng/p80211types.h b/drivers/staging/wlan-ng/p80211types.h index 2b83ab0c711b..db235517df92 100644 --- a/drivers/staging/wlan-ng/p80211types.h +++ b/drivers/staging/wlan-ng/p80211types.h @@ -168,10 +168,10 @@ P80211DID_MASK_ISTABLE, \ P80211DID_LSB_ISTABLE) -#define P80211DID_MKID(s,g,i,n,t,a) (P80211DID_MKSECTION(s) | \ +#define P80211DID_MKID(s, g, i, n, t, a) (P80211DID_MKSECTION(s) | \ P80211DID_MKGROUP(g) | \ - P80211DID_MKITEM(i) | \ - P80211DID_MKINDEX(n) | \ + P80211DID_MKITEM(i) | \ + P80211DID_MKINDEX(n) | \ P80211DID_MKISTABLE(t) | \ (a)) @@ -340,11 +340,11 @@ struct catlistitem; /* metadata items. Some components may choose to use more, */ /* less or different metadata items. */ -typedef void (*p80211_totext_t) (struct catlistitem *, u32 did, u8 * itembuf, +typedef void (*p80211_totext_t) (struct catlistitem *, u32 did, u8 *itembuf, char *textbuf); -typedef void (*p80211_fromtext_t) (struct catlistitem *, u32 did, u8 * itembuf, +typedef void (*p80211_fromtext_t) (struct catlistitem *, u32 did, u8 *itembuf, char *textbuf); -typedef u32(*p80211_valid_t) (struct catlistitem *, u32 did, u8 * itembuf); +typedef u32(*p80211_valid_t) (struct catlistitem *, u32 did, u8 *itembuf); /*----------------------------------------------------------------*/ /* Enumeration Lists */ diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c index 74d8022adb24..040c9e3e1d51 100644 --- a/drivers/staging/wlan-ng/p80211wext.c +++ b/drivers/staging/wlan-ng/p80211wext.c @@ -46,8 +46,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -137,7 +137,7 @@ static int p80211wext_dorequest(wlandevice_t *wlandev, u32 did, u32 data) mibitem.did = did; mibitem.data = data; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); return result; } @@ -174,7 +174,7 @@ static int p80211wext_autojoin(wlandevice_t *wlandev) memcpy(msg.ssid.data.data, ssid, data.length); msg.ssid.data.len = data.length; - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -211,7 +211,7 @@ struct iw_statistics *p80211wext_get_wireless_stats(netdevice_t *dev) if (wlandev->mlmerequest == NULL) return NULL; - retval = wlandev->mlmerequest(wlandev, (p80211msg_t *) & quality); + retval = wlandev->mlmerequest(wlandev, (p80211msg_t *) &quality); wstats->qual.qual = qual_as_percent(quality.link.data); /* overall link quality */ wstats->qual.level = quality.level.data; /* instant signal level */ @@ -271,7 +271,7 @@ static int p80211wext_giwfreq(netdevice_t *dev, msg.msgcode = DIDmsg_dot11req_mibget; mibitem.did = DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -318,7 +318,7 @@ static int p80211wext_siwfreq(netdevice_t *dev, mibitem.data = p80211_mhz_to_channel(freq->m); memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -399,7 +399,7 @@ static int p80211wext_siwmode(netdevice_t *dev, mibitem.did = DIDmib_p2_p2Static_p2CnfPortType; mibitem.data = (*mode == IW_MODE_ADHOC) ? 0 : 1; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) err = -EFAULT; @@ -621,7 +621,7 @@ static int p80211wext_siwencode(netdevice_t *dev, msg.msgcode = DIDmsg_dot11req_mibset; memcpy(&msg.mibattribute.data, &pstr, sizeof(pstr)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -729,7 +729,7 @@ static int p80211wext_siwessid(netdevice_t *dev, msg.ssid.data.len = length; pr_debug("autojoin_ssid for %s \n", essid); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); pr_debug("autojoin_ssid %d\n", result); if (result) { @@ -773,7 +773,7 @@ static int p80211wext_giwrate(netdevice_t *dev, msg.msgcode = DIDmsg_dot11req_mibget; mibitem.did = DIDmib_p2_p2MAC_p2CurrentTxRate; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -824,7 +824,7 @@ static int p80211wext_giwrts(netdevice_t *dev, msg.msgcode = DIDmsg_dot11req_mibget; mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -864,7 +864,7 @@ static int p80211wext_siwrts(netdevice_t *dev, mibitem.data = rts->value; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -889,7 +889,7 @@ static int p80211wext_giwfrag(netdevice_t *dev, mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -931,7 +931,7 @@ static int p80211wext_siwfrag(netdevice_t *dev, mibitem.data = frag->value; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -965,7 +965,7 @@ static int p80211wext_giwretry(netdevice_t *dev, mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11ShortRetryLimit; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -979,7 +979,7 @@ static int p80211wext_giwretry(netdevice_t *dev, mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11LongRetryLimit; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -994,7 +994,7 @@ static int p80211wext_giwretry(netdevice_t *dev, DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -1055,7 +1055,7 @@ static int p80211wext_siwretry(netdevice_t *dev, mibitem.data = rrq->value /= 1024; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -1069,7 +1069,7 @@ static int p80211wext_siwretry(netdevice_t *dev, memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -1084,7 +1084,7 @@ static int p80211wext_siwretry(netdevice_t *dev, memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -1121,7 +1121,7 @@ static int p80211wext_siwtxpow(netdevice_t *dev, else mibitem.data = rrq->value; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -1147,7 +1147,7 @@ static int p80211wext_giwtxpow(netdevice_t *dev, DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel; memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) { err = -EFAULT; @@ -1295,7 +1295,7 @@ static int p80211wext_siwscan(netdevice_t *dev, msg.maxchanneltime.data = 250; msg.minchanneltime.data = 200; - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if (result) err = prism2_result2err(msg.resultcode.data); @@ -1414,7 +1414,7 @@ static int p80211wext_giwscan(netdevice_t *dev, msg.msgcode = DIDmsg_dot11req_scan_results; msg.bssindex.data = i; - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); if ((result != 0) || (msg.resultcode.data != P80211ENUM_resultcode_success)) { break; @@ -1489,7 +1489,7 @@ static int p80211wext_set_encodeext(struct net_device *dev, memcpy(wlandev->wep_keys[idx], ext->key, ext->key_len); memset(&msg, 0, sizeof(msg)); - pstr = (p80211item_pstr32_t *) & msg.mibattribute.data; + pstr = (p80211item_pstr32_t *) &msg.mibattribute.data; memcpy(pstr->data.data, ext->key, ext->key_len); pstr->data.len = ext->key_len; switch (idx) { @@ -1513,7 +1513,7 @@ static int p80211wext_set_encodeext(struct net_device *dev, break; } msg.msgcode = DIDmsg_dot11req_mibset; - result = p80211req_dorequest(wlandev, (u8 *) & msg); + result = p80211req_dorequest(wlandev, (u8 *) &msg); pr_debug("result (%d)\n", result); } return result; @@ -1737,7 +1737,7 @@ struct iw_handler_def p80211wext_handler_def = { .get_wireless_stats = p80211wext_get_wireless_stats }; -int p80211wext_event_associated(wlandevice_t * wlandev, int assoc) +int p80211wext_event_associated(wlandevice_t *wlandev, int assoc) { union iwreq_data data; diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c index aaa70ed57710..343614561f4c 100644 --- a/drivers/staging/wlan-ng/prism2fw.c +++ b/drivers/staging/wlan-ng/prism2fw.c @@ -108,9 +108,9 @@ typedef struct pda { } pda_t; typedef struct imgchunk { - u32 addr; /* start address */ - u32 len; /* in bytes */ - u16 crc; /* CRC value (if it falls at a chunk boundary) */ + u32 addr; /* start address */ + u32 len; /* in bytes */ + u16 crc; /* CRC value (if it falls at a chunk boundary) */ u8 *data; } imgchunk_t; @@ -264,7 +264,7 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev) /* Build the PDA we're going to use. */ if (read_cardpda(&pda, wlandev)) { printk(KERN_ERR "load_cardpda failed, exiting.\n"); - return (1); + return 1; } /* read the card's PRI-SUP */ @@ -286,9 +286,8 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev) /* DIDmsg_dot11req_mibget */ prism2mgmt_mibset_mibget(wlandev, &getmsg); - if (getmsg.resultcode.data != P80211ENUM_resultcode_success) { + if (getmsg.resultcode.data != P80211ENUM_resultcode_success) printk(KERN_ERR "Couldn't fetch PRI-SUP info\n"); - } /* Already in host order */ priid.role = *data++; @@ -301,19 +300,19 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev) result = read_fwfile(rfptr); if (result) { printk(KERN_ERR "Failed to read the data exiting.\n"); - return (1); + return 1; } result = validate_identity(); if (result) { printk(KERN_ERR "Incompatible firmware image.\n"); - return (1); + return 1; } if (startaddr == 0x00000000) { printk(KERN_ERR "Can't RAM download a Flash image!\n"); - return (1); + return 1; } /* Make the image chunks */ @@ -323,20 +322,20 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev) result = plugimage(fchunk, nfchunks, s3plug, ns3plug, &pda); if (result) { printk(KERN_ERR "Failed to plug data.\n"); - return (1); + return 1; } /* Insert any CRCs */ if (crcimage(fchunk, nfchunks, s3crc, ns3crc)) { printk(KERN_ERR "Failed to insert all CRCs\n"); - return (1); + return 1; } /* Write the image */ result = writeimage(wlandev, fchunk, nfchunks); if (result) { printk(KERN_ERR "Failed to ramwrite image data.\n"); - return (1); + return 1; } /* clear any allocated memory */ @@ -434,9 +433,8 @@ void free_chunks(imgchunk_t *fchunk, unsigned int *nfchunks) { int i; for (i = 0; i < *nfchunks; i++) { - if (fchunk[i].data != NULL) { + if (fchunk[i].data != NULL) kfree(fchunk[i].data); - } } *nfchunks = 0; memset(fchunk, 0, sizeof(*fchunk)); @@ -531,7 +529,7 @@ int mkimage(imgchunk_t *clist, unsigned int *ccnt) if (clist[i].data == NULL) { printk(KERN_ERR "failed to allocate image space, exitting.\n"); - return (1); + return 1; } memset(clist[i].data, 0, clist[i].len); pr_debug("chunk[%d]: addr=0x%06x len=%d\n", @@ -545,15 +543,14 @@ int mkimage(imgchunk_t *clist, unsigned int *ccnt) for (j = 0; j < *ccnt; j++) { cstart = clist[j].addr; cend = cstart + clist[j].len - 1; - if (s3start >= cstart && s3end <= cend) { + if (s3start >= cstart && s3end <= cend) break; - } } if (((unsigned int)j) >= (*ccnt)) { printk(KERN_ERR "s3rec(a=0x%06x,l=%d), no chunk match, exiting.\n", s3start, s3data[i].len); - return (1); + return 1; } coffset = s3start - cstart; memcpy(clist[j].data + coffset, s3data[i].data, s3data[i].len); @@ -586,7 +583,7 @@ int mkpdrlist(pda_t *pda) curroff = 0; while (curroff < (HFA384x_PDA_LEN_MAX / 2) && le16_to_cpu(pda16[curroff + 1]) != HFA384x_PDR_END_OF_PDA) { - pda->rec[pda->nrec] = (hfa384x_pdrec_t *) & (pda16[curroff]); + pda->rec[pda->nrec] = (hfa384x_pdrec_t *) &(pda16[curroff]); if (le16_to_cpu(pda->rec[pda->nrec]->code) == HFA384x_PDR_NICID) { memcpy(&nicid, &pda->rec[pda->nrec]->data.nicid, @@ -623,10 +620,10 @@ int mkpdrlist(pda_t *pda) printk(KERN_ERR "no end record found or invalid lengths in " "PDR data, exiting. %x %d\n", curroff, pda->nrec); - return (1); + return 1; } if (le16_to_cpu(pda16[curroff + 1]) == HFA384x_PDR_END_OF_PDA) { - pda->rec[pda->nrec] = (hfa384x_pdrec_t *) & (pda16[curroff]); + pda->rec[pda->nrec] = (hfa384x_pdrec_t *) &(pda16[curroff]); (pda->nrec)++; } return result; @@ -869,7 +866,7 @@ int read_fwfile(const struct ihex_binrec *record) ptr16 = (u16 *) record->data; /* parse what was an S3 srec and put it in the right array */ - switch(addr) { + switch (addr) { case S3ADDR_START: startaddr = *ptr32; pr_debug(" S7 start addr, record=%d " @@ -890,7 +887,7 @@ int read_fwfile(const struct ihex_binrec *record) s3plug[ns3plug].len); ns3plug++; - if ( ns3plug == S3PLUG_MAX ) { + if (ns3plug == S3PLUG_MAX) { printk(KERN_ERR "S3 plugrec limit reached - aborting\n"); return 1; } @@ -907,7 +904,7 @@ int read_fwfile(const struct ihex_binrec *record) s3crc[ns3crc].len, s3crc[ns3crc].dowrite); ns3crc++; - if ( ns3crc == S3CRC_MAX ) { + if (ns3crc == S3CRC_MAX) { printk(KERN_ERR "S3 crcrec limit reached - aborting\n"); return 1; } @@ -921,12 +918,12 @@ int read_fwfile(const struct ihex_binrec *record) rcnt, s3info[ns3info].len, s3info[ns3info].type); - if ( ((s3info[ns3info].len - 1) * sizeof(u16)) > sizeof(s3info[ns3info].info) ) { + if (((s3info[ns3info].len - 1) * sizeof(u16)) > sizeof(s3info[ns3info].info)) { printk(KERN_ERR " S3 inforec length too long - aborting\n"); return 1; } - tmpinfo = (u16*)&(s3info[ns3info].info.version); + tmpinfo = (u16 *)&(s3info[ns3info].info.version); pr_debug(" info="); for (i = 0; i < s3info[ns3info].len - 1; i++) { tmpinfo[i] = *(ptr16 + 2 + i); @@ -935,7 +932,7 @@ int read_fwfile(const struct ihex_binrec *record) pr_debug("\n"); ns3info++; - if ( ns3info == S3INFO_MAX ) { + if (ns3info == S3INFO_MAX) { printk(KERN_ERR "S3 inforec limit reached - aborting\n"); return 1; } @@ -945,7 +942,7 @@ int read_fwfile(const struct ihex_binrec *record) s3data[ns3data].len = len; s3data[ns3data].data = (uint8_t *) record->data; ns3data++; - if ( ns3data == S3DATA_MAX ) { + if (ns3data == S3DATA_MAX) { printk(KERN_ERR "S3 datarec limit reached - aborting\n"); return 1; } @@ -1023,7 +1020,7 @@ int writeimage(wlandevice_t *wlandev, imgchunk_t *fchunk, rstatemsg.enable.data = P80211ENUM_truth_true; rstatemsg.exeaddr.data = startaddr; - msgp = (p80211msg_t *) & rstatemsg; + msgp = (p80211msg_t *) &rstatemsg; result = prism2mgmt_ramdl_state(wlandev, msgp); if (result) { printk(KERN_ERR @@ -1063,7 +1060,7 @@ int writeimage(wlandevice_t *wlandev, imgchunk_t *fchunk, ("Sending xxxdl_write message addr=%06x len=%d.\n", currdaddr, currlen); - msgp = (p80211msg_t *) & rwritemsg; + msgp = (p80211msg_t *) &rwritemsg; result = prism2mgmt_ramdl_write(wlandev, msgp); /* Check the results */ @@ -1090,7 +1087,7 @@ int writeimage(wlandevice_t *wlandev, imgchunk_t *fchunk, rstatemsg.enable.data = P80211ENUM_truth_false; rstatemsg.exeaddr.data = 0; - msgp = (p80211msg_t *) & rstatemsg; + msgp = (p80211msg_t *) &rstatemsg; result = prism2mgmt_ramdl_state(wlandev, msgp); if (result) { printk(KERN_ERR @@ -1160,10 +1157,7 @@ int validate_identity(void) } /* SEC compat range */ if ((s3info[i].info.compat.role == 1) && - (s3info[i].info.compat.id == 4)) { - - } - + (s3info[i].info.compat.id == 4)) break; case 3: pr_debug("Seq: %#x\n", s3info[i].info.buildseq); @@ -1196,8 +1190,9 @@ int validate_identity(void) pr_debug("Unknown inforec type %d\n", s3info[i].type); } } - // walk through + /* walk through */ - if (trump && (result != 2)) result = 0; + if (trump && (result != 2)) + result = 0; return result; } diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c index 9f7d96cae8e3..ad163da72ae4 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.c +++ b/drivers/staging/wlan-ng/prism2mgmt.c @@ -67,7 +67,7 @@ #include #include #include -#include +#include #include #include #include @@ -541,7 +541,7 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp) /*** STATION ***/ /* Set the REQUIRED config items */ /* SSID */ - pstr = (p80211pstrd_t *) & (msg->ssid.data); + pstr = (p80211pstrd_t *) &(msg->ssid.data); prism2mgmt_pstr2bytestr(p2bytestr, pstr); result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFOWNSSID, bytebuf, HFA384x_RID_CNFOWNSSID_LEN); @@ -1034,7 +1034,7 @@ int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp) /* Set the ssid */ memset(bytebuf, 0, 256); - pstr = (p80211pstrd_t *) & (msg->ssid.data); + pstr = (p80211pstrd_t *) &(msg->ssid.data); prism2mgmt_pstr2bytestr(p2bytestr, pstr); result = hfa384x_drvr_setconfig(hw, HFA384x_RID_CNFDESIREDSSID, bytebuf, @@ -1123,8 +1123,8 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) if (hw->presniff_port_type != 0) { word = hw->presniff_port_type; result = hfa384x_drvr_setconfig16(hw, - HFA384x_RID_CNFPORTTYPE, - word); + HFA384x_RID_CNFPORTTYPE, + word); if (result) { pr_debug ("failed to restore porttype, result=%d\n", @@ -1156,10 +1156,8 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) if (wlandev->netdev->type == ARPHRD_ETHER) { /* Save macport 0 state */ result = hfa384x_drvr_getconfig16(hw, - HFA384x_RID_CNFPORTTYPE, - & - (hw-> - presniff_port_type)); + HFA384x_RID_CNFPORTTYPE, + &(hw->presniff_port_type)); if (result) { pr_debug ("failed to read porttype, result=%d\n", @@ -1168,10 +1166,8 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) } /* Save the wepflags state */ result = hfa384x_drvr_getconfig16(hw, - HFA384x_RID_CNFWEPFLAGS, - & - (hw-> - presniff_wepflags)); + HFA384x_RID_CNFWEPFLAGS, + &(hw->presniff_wepflags)); if (result) { pr_debug ("failed to read wepflags, result=%d\n", @@ -1218,8 +1214,8 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) /* Set the port type to pIbss */ word = HFA384x_PORTTYPE_PSUEDOIBSS; result = hfa384x_drvr_setconfig16(hw, - HFA384x_RID_CNFPORTTYPE, - word); + HFA384x_RID_CNFPORTTYPE, + word); if (result) { pr_debug ("failed to set porttype %d, result=%d\n", @@ -1235,8 +1231,8 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) HFA384x_WEPFLAGS_DISABLE_RXCRYPT; result = hfa384x_drvr_setconfig16(hw, - HFA384x_RID_CNFWEPFLAGS, - word); + HFA384x_RID_CNFWEPFLAGS, + word); } if (result) { diff --git a/drivers/staging/wlan-ng/prism2mgmt.h b/drivers/staging/wlan-ng/prism2mgmt.h index bdf2b3e03253..07eecebeb6cc 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.h +++ b/drivers/staging/wlan-ng/prism2mgmt.h @@ -63,43 +63,43 @@ extern int prism2_reset_holdtime; extern int prism2_reset_settletime; -u32 prism2sta_ifstate(wlandevice_t * wlandev, u32 ifstate); +u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate); -void prism2sta_ev_info(wlandevice_t * wlandev, hfa384x_InfFrame_t * inf); -void prism2sta_ev_txexc(wlandevice_t * wlandev, u16 status); -void prism2sta_ev_tx(wlandevice_t * wlandev, u16 status); -void prism2sta_ev_rx(wlandevice_t * wlandev, struct sk_buff *skb); -void prism2sta_ev_alloc(wlandevice_t * wlandev); +void prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf); +void prism2sta_ev_txexc(wlandevice_t *wlandev, u16 status); +void prism2sta_ev_tx(wlandevice_t *wlandev, u16 status); +void prism2sta_ev_rx(wlandevice_t *wlandev, struct sk_buff *skb); +void prism2sta_ev_alloc(wlandevice_t *wlandev); -int prism2mgmt_mibset_mibget(wlandevice_t * wlandev, void *msgp); -int prism2mgmt_scan(wlandevice_t * wlandev, void *msgp); -int prism2mgmt_scan_results(wlandevice_t * wlandev, void *msgp); -int prism2mgmt_start(wlandevice_t * wlandev, void *msgp); -int prism2mgmt_wlansniff(wlandevice_t * wlandev, void *msgp); -int prism2mgmt_readpda(wlandevice_t * wlandev, void *msgp); -int prism2mgmt_ramdl_state(wlandevice_t * wlandev, void *msgp); -int prism2mgmt_ramdl_write(wlandevice_t * wlandev, void *msgp); -int prism2mgmt_flashdl_state(wlandevice_t * wlandev, void *msgp); -int prism2mgmt_flashdl_write(wlandevice_t * wlandev, void *msgp); -int prism2mgmt_autojoin(wlandevice_t * wlandev, void *msgp); +int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp); +int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp); +int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp); +int prism2mgmt_start(wlandevice_t *wlandev, void *msgp); +int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp); +int prism2mgmt_readpda(wlandevice_t *wlandev, void *msgp); +int prism2mgmt_ramdl_state(wlandevice_t *wlandev, void *msgp); +int prism2mgmt_ramdl_write(wlandevice_t *wlandev, void *msgp); +int prism2mgmt_flashdl_state(wlandevice_t *wlandev, void *msgp); +int prism2mgmt_flashdl_write(wlandevice_t *wlandev, void *msgp); +int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp); /*--------------------------------------------------------------- * conversion functions going between wlan message data types and * Prism2 data types ---------------------------------------------------------------*/ /* byte area conversion functions*/ -void prism2mgmt_pstr2bytearea(u8 * bytearea, p80211pstrd_t * pstr); -void prism2mgmt_bytearea2pstr(u8 * bytearea, p80211pstrd_t * pstr, int len); +void prism2mgmt_pstr2bytearea(u8 *bytearea, p80211pstrd_t *pstr); +void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len); /* byte string conversion functions*/ -void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t * bytestr, p80211pstrd_t * pstr); -void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t * bytestr, p80211pstrd_t * pstr); +void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr); +void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr); /* functions to convert Group Addresses */ -void prism2mgmt_get_grpaddr(u32 did, p80211pstrd_t * pstr, hfa384x_t * priv); +void prism2mgmt_get_grpaddr(u32 did, p80211pstrd_t *pstr, hfa384x_t *priv); int prism2mgmt_set_grpaddr(u32 did, - u8 * prism2buf, p80211pstrd_t * pstr, - hfa384x_t * priv); + u8 *prism2buf, p80211pstrd_t *pstr, + hfa384x_t *priv); int prism2mgmt_get_grpaddr_index(u32 did); void prism2sta_processing_defer(struct work_struct *data); diff --git a/drivers/staging/wlan-ng/prism2mib.c b/drivers/staging/wlan-ng/prism2mib.c index 2fff0a110bcb..0cbbe510307e 100644 --- a/drivers/staging/wlan-ng/prism2mib.c +++ b/drivers/staging/wlan-ng/prism2mib.c @@ -113,8 +113,7 @@ static int prism2mib_flag(mibrec_t *mib, p80211msg_dot11req_mibset_t *msg, void *data); static int prism2mib_wepdefaultkey(mibrec_t *mib, - int isget, - wlandevice_t * wlandev, + int isget, wlandevice_t *wlandev, hfa384x_t *hw, p80211msg_dot11req_mibset_t *msg, void *data); @@ -726,7 +725,7 @@ static int prism2mib_priv(mibrec_t *mib, if (isget) { hfa384x_drvr_getconfig(hw, HFA384x_RID_CNFWPADATA, - (u8 *) & wpa, + (u8 *) &wpa, sizeof(wpa)); pstr->len = le16_to_cpu(wpa.datalen); memcpy(pstr->data, wpa.data, pstr->len); @@ -736,9 +735,9 @@ static int prism2mib_priv(mibrec_t *mib, result = hfa384x_drvr_setconfig(hw, - HFA384x_RID_CNFWPADATA, - (u8 *) & wpa, - sizeof(wpa)); + HFA384x_RID_CNFWPADATA, + (u8 *) &wpa, + sizeof(wpa)); } break; } diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index 50f301d65212..32a3db854625 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -64,7 +64,7 @@ #include #include -#include +#include #include #include #include @@ -1023,13 +1023,13 @@ static void prism2sta_inf_tallies(wlandevice_t *wlandev, cnt = sizeof(hfa384x_CommTallies32_t) / sizeof(u32); if (inf->framelen > 22) { - dst = (u32 *) & hw->tallies; - src32 = (u32 *) & inf->info.commtallies32; + dst = (u32 *) &hw->tallies; + src32 = (u32 *) &inf->info.commtallies32; for (i = 0; i < cnt; i++, dst++, src32++) *dst += le32_to_cpu(*src32); } else { - dst = (u32 *) & hw->tallies; - src16 = (u16 *) & inf->info.commtallies16; + dst = (u32 *) &hw->tallies; + src16 = (u16 *) &inf->info.commtallies16; for (i = 0; i < cnt; i++, dst++, src16++) *dst += le16_to_cpu(*src16); } @@ -1280,9 +1280,8 @@ void prism2sta_processing_defer(struct work_struct *data) HFA384x_RID_CURRENTSSID, result); goto failed; } - prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) & ssid, - (p80211pstrd_t *) & - wlandev->ssid); + prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) &ssid, + (p80211pstrd_t *) &wlandev->ssid); /* Collect the port status */ result = hfa384x_drvr_getconfig16(hw, @@ -1368,8 +1367,8 @@ void prism2sta_processing_defer(struct work_struct *data) HFA384x_RID_CURRENTSSID, result); goto failed; } - prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) & ssid, - (p80211pstrd_t *) & wlandev->ssid); + prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) &ssid, + (p80211pstrd_t *) &wlandev->ssid); hw->link_status = HFA384x_LINK_CONNECTED; netif_carrier_on(wlandev->netdev); @@ -2028,8 +2027,8 @@ void prism2sta_commsqual_defer(struct work_struct *data) HFA384x_RID_CURRENTSSID, result); goto done; } - prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) & ssid, - (p80211pstrd_t *) & wlandev->ssid); + prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) &ssid, + (p80211pstrd_t *) &wlandev->ssid); /* Reschedule timer */ mod_timer(&hw->commsqual_timer, jiffies + HZ); From 3f4b4e779714ae2dd55757617a8033ab338fa7f0 Mon Sep 17 00:00:00 2001 From: Andrew Elwell Date: Thu, 18 Feb 2010 23:56:13 +0100 Subject: [PATCH 365/367] Staging: wlan-ng: More checkpatch.pl error cleanups Signed-off-by: Andrew Elwell Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/hfa384x_usb.c | 28 ++++++++++++++------------ drivers/staging/wlan-ng/p80211conv.c | 14 ++++++------- drivers/staging/wlan-ng/p80211netdev.c | 3 ++- drivers/staging/wlan-ng/p80211wext.c | 8 ++++---- 4 files changed, 28 insertions(+), 25 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 730d085c3f87..d3a85f249e96 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -1909,18 +1909,19 @@ int hfa384x_drvr_flashdl_enable(hfa384x_t *hw) return -EINVAL; /* Retrieve the buffer loc&size and timeout */ - if ((result = hfa384x_drvr_getconfig(hw, HFA384x_RID_DOWNLOADBUFFER, - &(hw->bufinfo), - sizeof(hw->bufinfo)))) { + result = hfa384x_drvr_getconfig(hw, HFA384x_RID_DOWNLOADBUFFER, + &(hw->bufinfo), sizeof(hw->bufinfo)); + if (result) return result; - } + hw->bufinfo.page = le16_to_cpu(hw->bufinfo.page); hw->bufinfo.offset = le16_to_cpu(hw->bufinfo.offset); hw->bufinfo.len = le16_to_cpu(hw->bufinfo.len); - if ((result = hfa384x_drvr_getconfig16(hw, HFA384x_RID_MAXLOADTIME, - &(hw->dltimeout)))) { + result = hfa384x_drvr_getconfig16(hw, HFA384x_RID_MAXLOADTIME, + &(hw->dltimeout)); + if (result) return result; - } + hw->dltimeout = le16_to_cpu(hw->dltimeout); pr_debug("flashdl_enable\n"); @@ -3071,9 +3072,9 @@ static void hfa384x_usbctlxq_run(hfa384x_t *hw) hfa384x_ctlxout_callback, hw); hw->ctlx_urb.transfer_flags |= USB_QUEUE_BULK; - /* Now submit the URB and update the CTLX's state - */ - if ((result = SUBMIT_URB(&hw->ctlx_urb, GFP_ATOMIC)) == 0) { + /* Now submit the URB and update the CTLX's state */ + result = SUBMIT_URB(&hw->ctlx_urb, GFP_ATOMIC); + if (result == 0) { /* This CTLX is now running on the active queue */ head->state = CTLX_REQ_SUBMITTED; @@ -3599,7 +3600,8 @@ static void hfa384x_int_rxmonitor(wlandevice_t *wlandev, skblen - sizeof(p80211_caphdr_t)); } - if ((skb = dev_alloc_skb(skblen)) == NULL) { + skb = dev_alloc_skb(skblen); + if (skb == NULL) { printk(KERN_ERR "alloc_skb failed trying to allocate %d bytes\n", skblen); @@ -3870,9 +3872,9 @@ retry: delresp: if (delete_resptimer) { - if ((timer_ok = del_timer(&hw->resptimer)) != 0) { + timer_ok = del_timer(&hw->resptimer); + if (timer_ok != 0) hw->resp_timer_done = 1; - } } spin_unlock_irqrestore(&hw->ctlxq.lock, flags); diff --git a/drivers/staging/wlan-ng/p80211conv.c b/drivers/staging/wlan-ng/p80211conv.c index 5952c671073f..3ba5eabdb583 100644 --- a/drivers/staging/wlan-ng/p80211conv.c +++ b/drivers/staging/wlan-ng/p80211conv.c @@ -207,11 +207,10 @@ int skb_ether_to_p80211(wlandevice_t *wlandev, u32 ethconv, p80211_wep->data = kmalloc(skb->len, GFP_ATOMIC); - if ((foo = wep_encrypt(wlandev, skb->data, p80211_wep->data, - skb->len, - (wlandev->hostwep & - HOSTWEP_DEFAULTKEY_MASK), - p80211_wep->iv, p80211_wep->icv))) { + foo = wep_encrypt(wlandev, skb->data, p80211_wep->data, + skb->len, (wlandev->hostwep &HOSTWEP_DEFAULTKEY_MASK), + p80211_wep->iv, p80211_wep->icv); + if (foo) { printk(KERN_WARNING "Host en-WEP failed, dropping frame (%d).\n", foo); @@ -323,11 +322,12 @@ int skb_p80211_to_ether(wlandevice_t *wlandev, u32 ethconv, skb->len); return 1; } - if ((foo = wep_decrypt(wlandev, skb->data + payload_offset + 4, + foo = wep_decrypt(wlandev, skb->data + payload_offset + 4, payload_length - 8, -1, skb->data + payload_offset, skb->data + payload_offset + - payload_length - 4))) { + payload_length - 4); + if (foo) { /* de-wep failed, drop skb. */ pr_debug("Host de-WEP failed, dropping frame (%d).\n", foo); diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c index e27d72cf5714..763ab1187a1c 100644 --- a/drivers/staging/wlan-ng/p80211netdev.c +++ b/drivers/staging/wlan-ng/p80211netdev.c @@ -586,7 +586,8 @@ static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd) } /* Allocate a buf of size req->len */ - if ((msgbuf = kmalloc(req->len, GFP_KERNEL))) { + msgbuf = kmalloc(req->len, GFP_KERNEL); + if (msgbuf) { if (copy_from_user(msgbuf, (void __user *)req->data, req->len)) result = -EFAULT; else diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c index 040c9e3e1d51..108a8060d1f5 100644 --- a/drivers/staging/wlan-ng/p80211wext.c +++ b/drivers/staging/wlan-ng/p80211wext.c @@ -549,14 +549,14 @@ static int p80211wext_siwencode(netdevice_t *dev, } /* Check the Key index first. */ - if ((i = (erq->flags & IW_ENCODE_INDEX))) { - + i = (erq->flags & IW_ENCODE_INDEX); + if (i) { if ((i < 1) || (i > NUM_WEPKEYS)) { err = -EINVAL; goto exit; - } else + } else { i--; - + } /* Set current key number only if no keys are given */ if (erq->flags & IW_ENCODE_NOKEY) { result = From df84f941e9370be6798fa11aa5a77396d8869fdc Mon Sep 17 00:00:00 2001 From: Chihau Chau Date: Thu, 25 Feb 2010 19:57:39 -0300 Subject: [PATCH 366/367] Staging: dream: camera: msm_camera: fix code style issues This fixes some code style issues like to add one space after a while or switch statement and before a open parenthesis '(', and to include KERN_ facility level in the printk() functions. Signed-off-by: Chihau Chau Acked-by: Pavel Machek Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dream/camera/msm_camera.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/staging/dream/camera/msm_camera.c b/drivers/staging/dream/camera/msm_camera.c index 925e16c324d2..223918f858e7 100644 --- a/drivers/staging/dream/camera/msm_camera.c +++ b/drivers/staging/dream/camera/msm_camera.c @@ -76,14 +76,14 @@ static LIST_HEAD(msm_sensors); list_del_init(&qcmd->list); \ kfree(qcmd); \ }; \ -} while(0) +} while (0) #define MSM_DRAIN_QUEUE(sync, name) do { \ unsigned long flags; \ spin_lock_irqsave(&(sync)->name##_lock, flags); \ MSM_DRAIN_QUEUE_NOSYNC(sync, name); \ spin_unlock_irqrestore(&(sync)->name##_lock, flags); \ -} while(0) +} while (0) static int check_overlap(struct hlist_head *ptype, unsigned long paddr, @@ -868,7 +868,7 @@ static int msm_config_vfe(struct msm_sync *sync, void __user *arg) return -EFAULT; } - switch(cfgcmd.cmd_type) { + switch (cfgcmd.cmd_type) { case CMD_STATS_ENABLE: axi_data.bufnum1 = msm_pmem_region_lookup(&sync->stats, @@ -1621,7 +1621,8 @@ static int msm_release_control(struct inode *node, struct file *filep) int rc; struct msm_control_device *ctrl_pmsm = filep->private_data; struct msm_device *pmsm = ctrl_pmsm->pmsm; - printk("msm_camera: RELEASE %s\n", filep->f_path.dentry->d_name.name); + printk(KERN_INFO "msm_camera: RELEASE %s\n", + filep->f_path.dentry->d_name.name); rc = __msm_release(pmsm->sync); if (!rc) { MSM_DRAIN_QUEUE(&ctrl_pmsm->ctrl_q, ctrl_status_q); @@ -1635,7 +1636,8 @@ static int msm_release_frame(struct inode *node, struct file *filep) { int rc; struct msm_device *pmsm = filep->private_data; - printk("msm_camera: RELEASE %s\n", filep->f_path.dentry->d_name.name); + printk(KERN_INFO "msm_camera: RELEASE %s\n", + filep->f_path.dentry->d_name.name); rc = __msm_release(pmsm->sync); if (!rc) { MSM_DRAIN_QUEUE(pmsm->sync, prev_frame_q); @@ -1719,7 +1721,7 @@ static void msm_vfe_sync(struct msm_vfe_resp *vdata, qcmd->type = qtype; if (qtype == MSM_CAM_Q_VFE_MSG) { - switch(vdata->type) { + switch (vdata->type) { case VFE_MSG_OUTPUT1: case VFE_MSG_OUTPUT2: qcmd_frame = @@ -1928,7 +1930,8 @@ static int __msm_v4l2_control(struct msm_sync *sync, memcpy(out->value, ctrl->value, ctrl->length); end: - if (rcmd) kfree(rcmd); + if (rcmd) + kfree(rcmd); CDBG("__msm_v4l2_control: end rc = %d\n", rc); return rc; } From b94c765ac31f8eb9c6fe895ba611bb446b799635 Mon Sep 17 00:00:00 2001 From: Chihau Chau Date: Thu, 25 Feb 2010 20:20:09 -0300 Subject: [PATCH 367/367] Staging: dream: camera: sk5k3e2fx: fix code style issues This fixes some code style issues about assignments in if conditions. Signed-off-by: Chihau Chau Acked-by: Pavel Machek Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dream/camera/s5k3e2fx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/dream/camera/s5k3e2fx.c b/drivers/staging/dream/camera/s5k3e2fx.c index edba19889b0f..2426f5e5b2aa 100644 --- a/drivers/staging/dream/camera/s5k3e2fx.c +++ b/drivers/staging/dream/camera/s5k3e2fx.c @@ -743,12 +743,12 @@ static int s5k3e2fx_sensor_open_init(const struct msm_camera_sensor_info *data) } /* initialize AF */ - if ((rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, - 0x3146, 0x3A)) < 0) + rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, 0x3146, 0x3A); + if (rc < 0) goto init_fail1; - if ((rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, - 0x3130, 0x03)) < 0) + rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, 0x3130, 0x03); + if (rc < 0) goto init_fail1; goto init_done;