diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-07-18 09:44:30 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-10 10:44:53 -0400 |
commit | ec6df24c15822e671801eeeb53758e14f3b28381 (patch) | |
tree | c364138af33799161128f1c95b538a0eded7215b /drivers/edac | |
parent | c77720b9544d8825ff5b9546d0ee038cfa4d4eb2 (diff) |
i7core: better document i7core_get_active_channels()
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/i7core_edac.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c index 79636b58ec52..bf0374062e3d 100644 --- a/drivers/edac/i7core_edac.c +++ b/drivers/edac/i7core_edac.c | |||
@@ -333,7 +333,6 @@ static inline int numcol(u32 col) | |||
333 | return cols[col & 0x3]; | 333 | return cols[col & 0x3]; |
334 | } | 334 | } |
335 | 335 | ||
336 | |||
337 | /**************************************************************************** | 336 | /**************************************************************************** |
338 | Memory check routines | 337 | Memory check routines |
339 | ****************************************************************************/ | 338 | ****************************************************************************/ |
@@ -355,6 +354,23 @@ static struct pci_dev *get_pdev_slot_func(u8 socket, unsigned slot, | |||
355 | return NULL; | 354 | return NULL; |
356 | } | 355 | } |
357 | 356 | ||
357 | /** | ||
358 | * i7core_get_active_channels() - gets the number of channels and csrows | ||
359 | * @socket: Quick Path Interconnect socket | ||
360 | * @channels: Number of channels that will be returned | ||
361 | * @csrows: Number of csrows found | ||
362 | * | ||
363 | * Since EDAC core needs to know in advance the number of available channels | ||
364 | * and csrows, in order to allocate memory for csrows/channels, it is needed | ||
365 | * to run two similar steps. At the first step, implemented on this function, | ||
366 | * it checks the number of csrows/channels present at one socket. | ||
367 | * this is used in order to properly allocate the size of mci components. | ||
368 | * | ||
369 | * It should be noticed that none of the current available datasheets explain | ||
370 | * or even mention how csrows are seen by the memory controller. So, we need | ||
371 | * to add a fake description for csrows. | ||
372 | * So, this driver is attributing one DIMM memory for one csrow. | ||
373 | */ | ||
358 | static int i7core_get_active_channels(u8 socket, unsigned *channels, | 374 | static int i7core_get_active_channels(u8 socket, unsigned *channels, |
359 | unsigned *csrows) | 375 | unsigned *csrows) |
360 | { | 376 | { |