Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

UM0851 Datasheet(PDF) 59 Page - STMicroelectronics

Part # UM0851
Description  SPEAr is a family of highly customizable ARM-based embedded
PDF  245 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

UM0851 Datasheet(HTML) 59 Page - STMicroelectronics

Back Button UM0851 Datasheet HTML 55Page - STMicroelectronics UM0851 Datasheet HTML 56Page - STMicroelectronics UM0851 Datasheet HTML 57Page - STMicroelectronics UM0851 Datasheet HTML 58Page - STMicroelectronics UM0851 Datasheet HTML 59Page - STMicroelectronics UM0851 Datasheet HTML 60Page - STMicroelectronics UM0851 Datasheet HTML 61Page - STMicroelectronics UM0851 Datasheet HTML 62Page - STMicroelectronics UM0851 Datasheet HTML 63Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 59 / 245 page
background image
UM0851
Communication device drivers
Doc ID 16604 Rev 2
59/245
/* this function will register the mdio bus basic operation and scan all PHYs in this
bus */
mdiobus_register(&bp->mii_bus);
/* after this function, if there's a valid PHY at address “addr”,
“bp->mii_bus.phy_map[phy_addr]” will point to a phy_device structure,
otherwise it is NULL */
Through platform_device/driver, the MACB drivers will get the phy_device structure and the
MAC base register address from the top layer. The following code is in MACB driver
drivers/net/arm/spear_macb.c
/* to start the PHY */
phy_start(bp->phy_dev);
/* in the run time, the network environment may change. So the state of PHY
(link on/off, 100M/10M) may also change. At the same time, it is necessary
to change the MAC setting in software. This can be done through a callback
function "macb_handle_link_change */
phydev = phy_connect(bp->dev, bp->phy_dev->dev.bus_id, &macb_handle_link_change, 0);
General kernel interface
Please refer to the corresponding chapter of the GMAC section (GMAC interface to kernel)
4.2.4
Socket buffer management
Please refer to the corresponding chapter of the GMAC section (Section 4.1.4: Concept of
socket buffers).
4.2.5
Cache coherency
Working with the CPU cache results in increased performance, but introduces
cache/memory coherence problems as external DMAs can only access the external
memory.
There are two cache strategies in the MACB driver.
●
FIFO descriptor memory is allocated as an uncached memory block. It uses the void*
dma_alloc_coherent(struct device*, size_t, dma_addr_t*, gfp_t) function to allocate the
uncached memory, which uses the pgprot_noncached macro to set the page table.
Since there is never a cached copy of this buffer, CPU access is slower but there are no
such coherency problems.
●
The real data buffer whose address is stored in the FIFO descriptor is allocated as a
cached memory block. The driver allocates the RX buffers directly using kmalloc(),
while the TX buffers are allocated by network stack upper layers. In both cases the skb-
>data field is populated with a data buffer pointer. Since these RX/TX buffers are
cached, the driver must explicitly guarantee the coherence between memory and
cache. For this purpose, the Linux kernel provides the function dma_addr_t
dma_map_single(struct device *dev, void *ptr, size_t size,enum dma_data_direction
dir). The last parameter may be set to DMA_FROM_DEVICE or DMA_TO_DEVICE
according to whether the cache must be invalidated (to read incoming data) or flushed
(to send outcoming data). The dma_unmap_single() routine is not present in Linux for
ARM.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com