Commit Graph

192 Commits

Author SHA1 Message Date
rpaulo
7028f4570c Fix previous commit: led_func() doesn't exist, it should be fled_cb().
Pointed out by:	bz
2010-02-22 14:49:52 +00:00
rpaulo
821d1f8732 Turn on the front LED at boot time like we do with the Avila. 2010-02-10 11:40:18 +00:00
rpaulo
f7db53a9d1 Intel XScale hwpmc(4) support.
This brings hwpmc(4) support for 2nd and 3rd generation XScale cores.
Right now it's enabled by default to make sure we test this a bit.
When the time comes it can be disabled by default.
Tested on Gateworks boards.

A man page is coming.

Obtained from:	//depot/user/rpaulo/xscalepmc/...
2009-12-23 23:16:54 +00:00
rpaulo
dd6f0c84fe Remove remaining bits of performance counter support.
Submitted by:	Tom Judge <tom at tomjudge.com>
2009-10-03 13:59:15 +00:00
rpaulo
d3d5e9896c Remove performance counter headers. This code came from NetBSD, but our
hardware perf. counter support is different, so we don't need these
files.

Reviewed by:	freebsd-arm (no comments)
2009-10-02 11:10:05 +00:00
cognet
58a0303f67 No need to remove the same flag multiple times. 2009-08-23 19:54:36 +00:00
rwatson
be5740a255 Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/
IF_ADDR_UNLOCK() across network device drivers when accessing the
per-interface multicast address list, if_multiaddrs.  This will
allow us to change the locking strategy without affecting our driver
programming interface or binary interface.

For two wireless drivers, remove unnecessary locking, since they
don't actually access the multicast address list.

Approved by:	re (kib)
MFC after:	6 weeks
2009-06-26 11:45:06 +00:00
jeff
5bc3a65e40 Implement a facility for dynamic per-cpu variables.
- Modules and kernel code alike may use DPCPU_DEFINE(),
   DPCPU_GET(), DPCPU_SET(), etc. akin to the statically defined
   PCPU_*.  Requires only one extra instruction more than PCPU_* and is
   virtually the same as __thread for builtin and much faster for shared
   objects.  DPCPU variables can be initialized when defined.
 - Modules are supported by relocating the module's per-cpu linker set
   over space reserved in the kernel.  Modules may fail to load if there
   is insufficient space available.
 - Track space available for modules with a one-off extent allocator.
   Free may block for memory to allocate space for an extent.

Reviewed by:    jhb, rwatson, kan, sam, grehan, marius, marcel, stas
2009-06-23 22:42:39 +00:00
sam
5010737b39 Now that we have UARTs running with fast interrupt handlers the ata
driver's i/o ops must be locked to avoid chaos.  Extend the cambria
bus tag to support ata and add a spin lock.  The ata driver is
hacked to use that instead of it's builtin hack for ixp425.  Once
the ata driver is fixed to not be confused about byte order we can
generalize the cambria bus tag code and make it generally useful.

While here take advantage of our being ixp435-specific to remove
delays when switching between byte+word accesses and to eliminate
the 2us delay for the uarts (the spin lock overhead looks to do
this for us).
2009-06-23 19:29:23 +00:00
sam
880b7f2044 use consistent style 2009-06-23 19:05:02 +00:00
sam
0d93c7da52 o add a bus space tag that forces a 2usec delay between r/w ops; this is
used for the optional GPS+RS485 uarts on the Gateworks Cambria boards
  which otherwise are unreliable
o setup the hack bus space tag for the GPS+RS485 uarts
o program the gpio interrupts for the uarts to be edge-rising
o force timing on the expansion bus for the uarts to be "slow"

Thanks to Chris Lang of Gateworks for these tips.
2009-06-22 22:54:13 +00:00
sam
b7d1149459 o remove hack to write UUE+RTOIE in the uart's IER; force them with hints
o honor hints for the rclk
2009-06-22 22:46:37 +00:00
sam
ff0565d717 hook arm_post_filter to ACK GPIO interrupts; this fixes the interrupt
storm observed on the GPS+RS485 uarts on Gateworks Cambria boards

Reviewed by:	cognet
2009-06-22 20:57:51 +00:00
sam
ad949a216c always define Cambria GPS+RS485 mappings as they are no longer conditional 2009-06-22 20:42:28 +00:00
sam
769971bb0f map the optional GPS and RS485 uart's on the Gateworks Cambria board
(may want to make these conditional)
2009-06-22 20:41:02 +00:00
sam
8c798bdc53 add ixp425_set_gpio to program the gpio interrupt type 2009-06-22 20:38:55 +00:00
sam
e8030f4a28 rewrite arm_get_next_irq to always make forward progress (should be optimized) 2009-06-22 20:36:22 +00:00
sam
bb5f483a5c kill stray whitespace 2009-06-22 20:34:50 +00:00
sam
28b9b94c03 move logic to ACK a GPIO to a separate function 2009-06-22 20:33:59 +00:00
sam
7a46e0bad6 swap order in ddb show gpio printf 2009-06-22 20:31:06 +00:00
sam
54fe20a74c make type use consistent 2009-06-22 20:30:02 +00:00
sam
3ba294127c Add workaround to get IXP435 NPE-A working: reseting NPE-A after NPE-C
causes both to become inoperative; this apparently was done by the original
IAL code as a workaround for IMEM parity errors which we've not seen so
just disable the reset.

Note this problem does not occur on IXP425 boards. The linux driver does
fuse-resets on each NPE but in the order NPE-A < NPE-B < NPE-C (when probing
for which NPE's are present/operational); we may want to switch to a similar
scheme but for now disable the resets until we see an issue.
2009-06-17 17:57:52 +00:00
sam
c00ecac84f correct data/instruction memory sizes for non-ixp425 parts (these
are only used to bounds-check writes when loading firmware)
2009-06-17 03:09:13 +00:00
sam
8052549ad2 remove IAL vestige for defining the max data/instruction memory size;
instead of defining them according to ixp46x add new defines so we can
do this at run time
2009-06-17 02:55:53 +00:00
sam
87856a200e o correct default miibase for NPE-B and NPE-C; these values are
normally taken from the hints file so this should have no effect
o set the port address "just in case"
o add NPE-A support to the tx done qmgr callback
2009-06-17 02:53:05 +00:00
sam
e7b6dbfc39 add ixp4xx_write_feature_bits 2009-06-17 02:51:16 +00:00
imp
7df225e7ce devclass_find_free_unit(xxx, 0) is identical to -1 for most
applications (including this one).  Switch to it since the former is a
racy interface.
2009-06-12 00:07:09 +00:00
avg
024c4eba43 strict kobj signatures: number of fixes for arm architecture
no functional changes should result

Reviewed by:	imp, current@
Approved by:	jhb (mentor)
2009-06-11 17:05:13 +00:00
marcel
898dda825c Pass the previously returned IRQ back to arm_get_next_irq() so that
the implementation can guarantee forward progress in the event of
a stuck interrupt or interrupt storm. This is especially critical
for fast interrupt handlers, as they can cause a hard hang in that
case. When first called, arm_get_next_irq() is passed -1.

Obtained from:	Juniper Networks, Inc.
2009-06-09 18:18:41 +00:00
sam
2c8e83d6b6 maintain existing style 2009-05-30 18:23:55 +00:00
attilio
b523608331 When user_frac in the polling subsystem is low it is going to busy the
CPU for too long period than necessary.  Additively, interfaces are kept
polled (in the tick) even if no more packets are available.
In order to avoid such situations a new generic mechanism can be
implemented in proactive way, keeping track of the time spent on any
packet and fragmenting the time for any tick, stopping the processing
as soon as possible.

In order to implement such mechanism, the polling handler needs to
change, returning the number of packets processed.
While the intended logic is not part of this patch, the polling KPI is
broken by this commit, adding an int return value and the new flag
IFCAP_POLLING_NOCOUNT (which will signal that the return value is
meaningless for the installed handler and checking should be skipped).

Bump __FreeBSD_version in order to signal such situation.

Reviewed by:	emaste
Sponsored by:	Sandvine Incorporated
2009-05-30 15:14:44 +00:00
thompsa
14ea3ee2bb Delete the old USB stack. The new stack has settled in and has all the
drivers/functionality and then some.
2009-05-27 16:16:56 +00:00
sam
c5da81aed1 accumulate npe statistics and expose them through dev.npe.X.stats 2009-05-23 19:14:20 +00:00
sam
f9723c20c0 add IXP4XX_FLASH_SIZE config knob that can be used to override the default
flash size; this is necessary at the moment because we map all of flash at
boot, eventually we'll do this on the fly
2009-03-10 21:49:22 +00:00
sam
96c45a369c map CS0 on 2358 so flash is accessible 2009-03-10 21:47:17 +00:00
sam
102dd06b50 mark device capable of vlan-size frames
Obtained from:	netbsd
2009-03-10 19:35:37 +00:00
sam
4bac5fc418 turn off inclusion of FCS in rx'd frames; we don't use it anywhere and
dhclient gets annoyed when it receives FCS in frames via bpf
2009-03-10 19:18:11 +00:00
sam
384ed4accc o add missing bus_release_resource and bus_deactivate_resource that just
operate on the resource (we have no local resources to manage); this
  fixes drivers that alloc/release resources in their probe method and
  then do it again in attach
o while here add some prints to catch failures and massage style a bit
2009-03-10 19:15:35 +00:00
sam
500112f44a bring in ddb "show gpio" support from Cambria branch 2009-03-10 17:19:45 +00:00
sam
3d9037abb9 Small cleanup of memory resource allocation from Cambria branch:
o encode need for A4 bus space tag hackery according to the memory
  address; checking for "uart" breaks down with the GPS chip support
  which is also a uart but does not require the same hackery
o encode the correct memory window instead of carving up all of i/o
  space, potentially with a larger window than a device should have;
  this likely should be handled in the drivers by using a proper bus
  alloc call but since some drivers depend on the bus support to figure
  this out we cannot simply mod them
o add optional GPS and RS485 support (conditionally as the support
  isn't ready yet)
2009-03-10 17:16:16 +00:00
sam
3c6380766d catch up with r189306; handle delayed activation of resources
Submitted by:	jhb
2009-03-10 16:42:49 +00:00
sam
094f090e7f o mark unexpected callbacks more clearly
o unwrap some lines
2009-03-08 23:45:56 +00:00
sam
d4b227a5fa Cleanup virtual device mapping some more:
o improves understandability by replacing numerous relative address
  calculations with fixed addresses; everything should now match up
  more easily with the vm layout shown at the top of the file
o move the expansion bus chip select regions to be contiguous with
  the expansion bus configuration area; this is not exploited right
  now but allows map consolidation in the future
o leave a gap between the expansion bus regions and the pci config
  space in case we want to map more exp bus cs regions

Reviewed by:	imp, thompsa
2009-03-06 23:32:45 +00:00
sam
280ce52aab remove unneeded static mappings for NPE and MAC regions; these are
already mapped through the IO region so never used

Reviewed by:	imp, thompsa
2009-03-06 23:29:00 +00:00
sam
c7014ac9b6 fix legacy usb configuration 2009-03-06 23:22:09 +00:00
sam
0315cdff03 o simplify code in ixppcib_conf_setup
o fixup debug printfs
2009-03-06 20:40:09 +00:00
thompsa
fc03dc2730 Update paths for ehci_ixp4xx.c in the old and new stacks. 2009-02-24 23:34:02 +00:00
sam
c11da81185 fix ARM_USE_SMALL_ALLOC after memory layout changes
Submitted by:	cognet
2009-02-11 22:34:50 +00:00
sam
0a4dfa3cb8 Add support for the StrataFlash on 2348 boards:
o add bus shim for cfi driver
o add static mapping for CS0 (we map all 16M as the cfi driver doesn't
  support demand mapping)

Note this needs some tweaking to work for 2358 boards which is why the
CAMBRIA config is not touched.
2009-02-03 19:16:04 +00:00
cognet
6d87ada9d2 Remove a duplicate #include. 2009-01-16 19:31:27 +00:00